From 57de39bac22d7a03350d862bce109cf356c8db82 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 11 Feb 2022 14:28:34 -0600 Subject: [PATCH 01/54] A compilable version --- sbncode/CMakeLists.txt | 1 + sbncode/SinglePhotonAnalysis/CMakeLists.txt | 72 + sbncode/SinglePhotonAnalysis/README.md | 3 + .../SinglePhoton_module.cc | 2254 +++++++++++++++++ .../SinglePhoton_module.h | 1900 ++++++++++++++ sbncode/SinglePhotonAnalysis/TruncMean.h | 260 ++ .../analyze_EventWeight.h | 392 +++ sbncode/SinglePhotonAnalysis/analyze_Geant4.h | 94 + .../SinglePhotonAnalysis/analyze_MCTruth.h | 685 +++++ .../SinglePhotonAnalysis/analyze_OpFlashes.h | 212 ++ .../SinglePhotonAnalysis/analyze_Showers.h | 1659 ++++++++++++ sbncode/SinglePhotonAnalysis/analyze_Slice.h | 1010 ++++++++ sbncode/SinglePhotonAnalysis/analyze_Tracks.h | 1276 ++++++++++ .../SinglePhotonAnalysis/fiducial_volume.h | 299 +++ .../SinglePhotonAnalysis/helper_functions.h | 174 ++ sbncode/SinglePhotonAnalysis/isolation.h | 662 +++++ .../SinglePhotonAnalysis/job/CMakeLists.txt | 3 + .../job/microboone_singlephoton.fcl | 78 + .../job/run_SinglePhoton.fcl | 67 + .../reco_truth_matching.h | 868 +++++++ .../second_shower_search.h | 2169 ++++++++++++++++ 21 files changed, 14138 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/README.md create mode 100644 sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc create mode 100644 sbncode/SinglePhotonAnalysis/SinglePhoton_module.h create mode 100644 sbncode/SinglePhotonAnalysis/TruncMean.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_EventWeight.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_Geant4.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_MCTruth.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_OpFlashes.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_Showers.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_Slice.h create mode 100644 sbncode/SinglePhotonAnalysis/analyze_Tracks.h create mode 100644 sbncode/SinglePhotonAnalysis/fiducial_volume.h create mode 100644 sbncode/SinglePhotonAnalysis/helper_functions.h create mode 100644 sbncode/SinglePhotonAnalysis/isolation.h create mode 100644 sbncode/SinglePhotonAnalysis/job/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/job/microboone_singlephoton.fcl create mode 100644 sbncode/SinglePhotonAnalysis/job/run_SinglePhoton.fcl create mode 100644 sbncode/SinglePhotonAnalysis/reco_truth_matching.h create mode 100644 sbncode/SinglePhotonAnalysis/second_shower_search.h diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 3c1daf080..905287bfc 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -5,6 +5,7 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) +add_subdirectory(SinglePhotonAnalysis) add_subdirectory(SBNEventWeight) add_subdirectory(NuMuSelection) add_subdirectory(OpDet) diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt new file mode 100644 index 000000000..4355a5679 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -0,0 +1,72 @@ +link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) + +art_make( BASENAME_ONLY + LIB_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + larpandoraobj + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larpandora_LArPandoraInterface + ${PANDORASDK} + ${PANDORAMONITORING} + LArPandoraContent + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} + MODULE_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larpandora_LArPandoraInterface + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} ) + +#add_subdirectory(SEAview) +add_subdirectory(job) +install_headers() +install_fhicl() +install_source() diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md new file mode 100644 index 000000000..4e48e00e3 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -0,0 +1,3 @@ +# SinglePhotonModule +Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` froen on Jan. 18 2022 + diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc new file mode 100644 index 000000000..ab17c08c4 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -0,0 +1,2254 @@ +#include "SinglePhoton_module.h" +#include "analyze_OpFlashes.h" +#include "analyze_Tracks.h" +#include "analyze_Showers.h" +//#include "analyze_Template.h" +#include "analyze_MCTruth.h" +#include "analyze_EventWeight.h" +#include "analyze_Slice.h" +#include "analyze_Geant4.h" +#include "fiducial_volume.h" +#include "second_shower_search.h" +#include "isolation.h" + +namespace single_photon +{ + + //Constructor from .fcl parameters + SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) + { + this->reconfigure(pset); + //Set up some detector, timing, spacecharge and geometry services +// CHECK +// theDetector = lar::providerFrom(); +// detClocks = lar::providerFrom(); + SCE = lar::providerFrom(); + geom = lar::providerFrom(); + + } + + //Reconfigure the internal class parameters from .fcl parameters + void SinglePhoton::reconfigure(fhicl::ParameterSet const &pset) + { + //input parameters for what file/mode were running in + m_print_out_event = pset.get("PrintOut", false); + m_is_verbose = pset.get("Verbose",false); + m_is_data = pset.get("isData",false); + m_is_overlayed = pset.get("isOverlayed",false); + m_is_textgen = pset.get("isTextGen",false); + + //some specific additonal info, default not include + m_use_PID_algorithms = pset.get("usePID",false); + m_use_delaunay = pset.get("useDelaunay",false); + m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); + + //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) + m_fill_trees = pset.get("FillTrees",true); + m_run_pi0_filter = pset.get("RunPi0Filter",false); + m_run_pi0_filter_2g1p = pset.get("FilterMode2g1p",false); + m_run_pi0_filter_2g0p = pset.get("FilterMode2g0p",false); + + if(m_run_pi0_filter) m_is_data = true;// If running in filter mode, treat all as data + + //Some output for logging + std::cout<<"SinglePhoton::reconfigure || whats configured? "<("SelectEvent", false); + m_selected_event_list = pset.get("SelectEventList", ""); + + //Studies for photo nuclear EventWeights + m_runPhotoNuTruth = pset.get("RunPhotoNu",false); + + //Ability to save some FULL eventweight components, rather than run later. Useful for systematic studies. Harcoded to two currently (TODO) + m_runTrueEventweight = pset.get("RunTrueEventWeight",false); + m_true_eventweight_label = pset.get("true_eventweight_label","eventweight"); + m_Spline_CV_label = pset.get("SplineCVLabel", "eventweight");//4to4aFix"); + + + //Input ArtRoot data products + m_pandoraLabel = pset.get("PandoraLabel"); + m_trackLabel = pset.get("TrackLabel"); + m_sliceLabel = pset.get("SliceLabel","pandora"); + m_showerLabel = pset.get("ShowerLabel"); + m_caloLabel = pset.get("CaloLabel"); + m_flashLabel = pset.get("FlashLabel"); + m_potLabel = pset.get("POTLabel"); + m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); + m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); + m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); + m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + m_generatorLabel = pset.get("GeneratorLabel","generator"); + m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); + m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); + m_geantModuleLabel = pset.get("GeantModule","largeant"); + m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); + m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); + m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); + m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); + + //Flash related variables. + m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change + m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); + + // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); + m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); + + //CRT related variables, should run only for RUN3+ enabled + m_runCRT = pset.get("runCRT",false); + m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); + m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); + + //Some track calorimetry parameters + m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); + m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); + m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? + m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); + + //Some shower calorimetry parameters + m_work_function = pset.get("work_function"); + m_recombination_factor =pset.get("recombination_factor"); + m_gain_mc =pset.get>("gain_mc"); + m_gain_data =pset.get>("gain_data"); + m_wire_spacing = pset.get("wire_spacing"); + m_width_dqdx_box = pset.get("width_box"); + m_length_dqdx_box = pset.get("length_box"); + m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); + + //A seperate mode to run over AllPFPs and not just slice particles + m_run_all_pfps = pset.get("runAllPFPs",false); + + + //Some paramaters for counting protons & photons + m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); + m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); + m_mass_pi0_mev = 139.57; + + //SEAviwer Settings for shower clustering and proton stub finding + //Have two sets: + //Base SEAview is for Second Shower Veto + m_runSEAview = pset.get("runSEAviewShower", false); + m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); + m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); + m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); + m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); + m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); + m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); + m_SEAviewNumRecoShower = pset.get("SEAviewShowerNumRecoShower", -1); + m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); + + // Second set is for Proton Stub finding + m_runSEAviewStub = pset.get("runSEAviewStub", false); + m_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); + m_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); + m_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); + m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); + m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); + m_SEAviewStubNumRecoShower = pset.get("SEAviewStubNumRecoShower", -1); + m_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); + + bool_make_sss_plots = true; + + //Misc setup + this->setTPCGeom(); + rangen = new TRandom3(22); + + //Whats a Delta? + std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; + std::vector delta_pdg_list = {2224,2214,1114,2114}; + for(size_t i=0; i< delta_pdg_list.size(); ++i){ + is_delta_map[delta_pdg_list[i]] = delta_names[i]; + is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; + } + + + //Text print event? Depreciated at the moment. + if (m_print_out_event ){ + out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); + if (!out_stream.is_open()){ + std::cout<<"ERROR output file not open"< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; + //sssVetov1 = new ReadBDT(inputVars); + + } + + //------------------------------------------------------------------------------------------------------------------------------------------ + + + + //--------------------------------------- Primary Filter------------------------------------------------------------------------------------ + // Runs over every artroot event + bool SinglePhoton::filter(art::Event &evt) + { +//CHECK +// std::cout<<"---------------------------------------------------------------------------------"<ClearVertex(); +// +// //Some event based properties +// m_subrun_counts++; +// m_number_of_events++; +// m_run_number = evt.run(); +// m_subrun_number = evt.subRun(); +// m_event_number = evt.id().event(); +// +// +// //if module is run in selected-event mode, and current event is not in the list, skip it +// if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ +// std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; +// return true; +// } +// +// //Timing and TPC info +// auto const TPC = (*geom).begin_TPC(); +// auto ID = TPC.ID(); +// m_Cryostat = ID.Cryostat; +// m_TPC = ID.TPC; +////CHECK +//// _time2cm = theDetector->SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc +// +// +// //******************************Setup*****************Setup**************************************/ +// //******************************Setup*****************Setup**************************************/ +// // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. +// // Make sure under the hood you understand this! +// // ------------------------ +// // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g +// // tracks->pfparticles->hits +// // tracks->pfparticles->spacepoints ..etc.. +// // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. +// //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. +// +// +// // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. +// art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); +// std::vector> hitVector; +// art::fill_ptr_vector(hitVector,hitHandle); +// +// //Lets do "THE EXACT SAME STUFF" for Optical Flashes +// art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); +// std::vector> flashVector; +// art::fill_ptr_vector(flashVector,flashHandle); +// +// //tracks +// art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); +// std::vector> trackVector; +// art::fill_ptr_vector(trackVector,trackHandle); +// +// //BadChannels// Fill later +// art::Handle > badChannelHandle; +// std::vector badChannelVector; +// if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ +// badChannelVector = *(badChannelHandle); +// } +// +// //Collect the PFParticles from the event. This is the core! +// art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); +// std::vector> pfParticleVector; +// art::fill_ptr_vector(pfParticleVector,pfParticleHandle); +// //So a cross check +// if (!pfParticleHandle.isValid()) +// { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; +// return (m_run_pi0_filter ? false : true) ; +// } +// +// //get the cluster handle for the dQ/dx calc +// art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); +// std::vector< art::Ptr > clusterVector; +// art::fill_ptr_vector(clusterVector,clusterHandle); +// +// // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; +// // typedef std::map< size_t, art::Ptr> +// // Produce a map of the PFParticle IDs for fast navigation through the hierarchy +// PFParticleIdMap pfParticleMap; +// this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); +// +// //Slices +// art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); +// std::vector> sliceVector; +// art::fill_ptr_vector(sliceVector,sliceHandle); +// +// //And some associations +// art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); +// art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); +// +// //Slice to PFParticle +// std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; +// std::map> > sliceIDToPFParticlesMap; +// for(size_t i=0; i< sliceVector.size(); ++i){ +// auto slice = sliceVector[i]; +// sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); +// sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); +// } +// +// //Slice to Hits +// std::map< art::Ptr, std::vector> > sliceToHitsMap; +// std::map> > sliceIDToHitsMap; +// for(size_t i=0; i< sliceVector.size(); ++i){ +// auto slice = sliceVector[i]; +// sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); +// sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); +// } +// +// //And some verticies. +// art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); +// std::vector> vertexVector; +// art::fill_ptr_vector(vertexVector,vertexHandle); +// if(vertexVector.size()>0) m_number_of_vertices++; +// +// //PFParticle to Vertices +// art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); +// std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// auto pfp = pfParticleVector[i]; +// pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); +// } +// +// //------- 3D showers +// art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); +// std::map, art::Ptr> pfParticlesToShowerReco3DMap; +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// auto pfp = pfParticleVector[i]; +// if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ +// pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); +// } +// +// } +// //---------Kalman Track Showers +// art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); +// std::map, art::Ptr> pfParticlesToShowerKalmanMap; +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// auto pfp = pfParticleVector[i]; +// if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ +// pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); +// } +// } +// +// //----- kalmon Cali +// art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); +// std::vector> kalmanTrackVector; +// art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); +// +// art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); +// std::map,std::vector>> kalmanTrackToCaloMap; +// for(size_t i=0; i< kalmanTrackVector.size(); ++i){ +// auto trk = kalmanTrackVector[i]; +// if(cali_per_kalmantrack.at(trk.key()).size()!=0){ +// kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); +// } +// } +// +// // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: +// //-------------------------------- +// // Produce two PFParticle vectors containing final-state particles: +// // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis +// // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis +// std::vector< art::Ptr > crParticles; +// std::vector< art::Ptr > nuParticles; +// this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); +// +// +// //if not running over neutrino slice only, use all pfp's in event +// if (m_run_all_pfps ==true){ +// nuParticles = pfParticleVector; +// } +// +// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); +// std::map, std::vector> > pfParticleToSpacePointsMap; +// for(size_t i=0; i< nuParticles.size(); ++i){ +// const art::Ptr pfp = nuParticles[i]; +// pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); +// } +// +// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); +// std::map, std::vector> > pfParticleToMetadataMap; +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// const art::Ptr pfp = pfParticleVector[i]; +// pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); +// } +// +// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); +// art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); +// std::map, std::vector> > pfParticleToClustersMap; +// std::map, std::vector> > clusterToHitsMap; +// //fill map PFP to Clusters +// for(size_t i=0; i< nuParticles.size(); ++i){ +// auto pfp = nuParticles[i]; +// pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); +// } +// //fill map Cluster to Hits +// for(size_t i=0; i< clusterVector.size(); ++i){ +// auto cluster = clusterVector[i]; +// clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); +// } +// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; +// +// +// //use pfp->cluster and cluster->hit to build pfp->hit map +// //for each PFP +// for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; +// +// //make empty vector to store hits +// std::vector> hits_for_pfp = {}; +// +// +// //for each cluster, get the associated hits +// for (art::Ptr cluster: clusters_vec){ +// std::vector> hits_vec = clusterToHitsMap[cluster]; +// +// //insert hits into vector +// hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); +// } +// +// //fill the map +// pfParticleToHitsMap[pfp] = hits_for_pfp; +// +// }//for each pfp +// +// +// +// /************************************************************************** +// * For SEAview: grab cosmic-related PFPaticles and recob::Hits +// * +// **************************************************************************/ +// std::map, std::vector> > cr_pfParticleToClustersMap; +// std::map, std::vector> > cr_pfParticleToHitsMap; +// +// //first, collect all daughters of primary cosmic +// int num_primary_cosmic_particle = crParticles.size(); +// for(int i =0; i!=num_primary_cosmic_particle; ++i){ +// auto& pParticle = crParticles[i]; +// for(const size_t daughterId : pParticle->Daughters()) +// { +// if (pfParticleMap.find(daughterId) == pfParticleMap.end()) +// throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; +// +// crParticles.push_back(pfParticleMap.at(daughterId)); +// } +// } +// +// //second, build PFP to hits map for cosmic-related PFParticles +// for(size_t i=0; i< crParticles.size(); ++i){ +// auto pfp = crParticles[i]; +// cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); +// } +// for(size_t i=0; i< crParticles.size(); ++i){ +// auto pfp = crParticles[i]; +// +// // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; +// +// //make empty vector to store hits +// std::vector> hits_for_pfp = {}; +// +// // std::cout<<"-- there are "< cluster: clusters_vec){ +// std::vector> hits_vec = clusterToHitsMap[cluster]; +// +// // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()< nu_scores; +// bool isSelectedSlice = false; +// int primaries = 0; +// int primary_pdg = 0; +// +// for(auto &pfp: pfps){ +// std::vector> metadatas = pfParticleToMetadataMap[pfp]; +// for(auto &meta: metadatas){ +// std::map propertiesmap = meta->GetPropertiesMap(); +// //for each of the things in the list +// if(propertiesmap.count("NuScore")==1){ +// nu_scores.push_back(propertiesmap["NuScore"]); +// } +// if(propertiesmap.count("IsNeutrino")==1){ +// isSelectedSlice = true; +// } +// } +// +// if (pfp->IsPrimary()) { +// primaries++; +// primary_pdg = (pfp->PdgCode()); +// } +// /*if (!pfp->IsPrimary()) continue; +// // Check if this particle is identified as the neutrino +// const int pdg(pfp->PdgCode()); +// const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); +// if(isNeutrino){ +// isSelectedSlice = true; +// }*/ +// } +// +// if(nu_scores.size()>0){ +// double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); +// if(mean!=nu_scores.front()){ +// std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. +// //tracks is a vector of recob::Tracks and same for showers. +// //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. +// std::vector< art::Ptr > tracks; +// std::vector< art::Ptr > showers; +// std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; +// std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; +// +// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); +// +// //Track Calorimetry. Bit odd here but bear with me, good to match and fill here +// art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); +// std::map, std::vector> > trackToCalorimetryMap; +// //So a cross check +// if (!calo_per_track.isValid()) +// { +// mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; +// return (m_run_pi0_filter ? false : true); +// } +// +// //Loop over all tracks we have to fill calorimetry map +// for(size_t i=0; i< tracks.size(); ++i){ +// if(calo_per_track.at(tracks[i].key()).size() ==0){ +// std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, m_pidLabel); +// std::map, art::Ptr > trackToPIDMap; +// +// // If we want PID algorithms to run. do so here +// // Build a map to get PID from PFParticles, then call PID collection function +// if(m_use_PID_algorithms){ +// for(size_t i=0; i< tracks.size(); ++i){ +// trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); +// } +// } +// +// +// +// //**********************************************************************************************/ +// //**********************************************************************************************/ +// //---------------------------------- MC TRUTH, MC Only--------------------------- +// //**********************************************************************************************/ +// //**********************************************************************************************/ +// +// //Get the MCtruth handles and vectors +// std::vector> mcTruthVector; +// std::vector> mcParticleVector; +// +// //Then build a map from MCparticles to Hits and vice versa +// std::map< art::Ptr, std::vector > > mcParticleToHitsMap; +// std::map< art::Ptr, art::Ptr > hitToMCParticleMap; +// +// //Apparrently a MCParticle doesn't know its origin (thanks Andy!) +// //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa +// //Note which map is which! //First is one-to-many. //Second is one-to-one +// std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; +// std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; +// std::map > MCParticleToTrackIdMap; +// +// std::vector> mcTrackVector; +// std::vector> mcShowerVector; +// +// std::vector> matchedMCParticleVector; +// std::map, art::Ptr > trackToMCParticleMap; +// std::map, art::Ptr > showerToMCParticleMap; +// +// //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower +// std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; +// std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; +// +// if(m_is_verbose){ +// std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; +// std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; +// std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; +// std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; +// std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; +// } +// +// //**********************************************************************************************/ +// //**********************************************************************************************/ +// +// //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). +////CHECK +//// if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); +//// badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); +// +// +// //*******************************Slices***************************************************************/ +// //*******************************Slices***************************************************************/ +// +// //these are all filled in analyze slice +// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind +// std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind +// std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score +// std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise +// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's +// std::map,bool> PFPToNuSliceMap; +// std::map,double> PFPToTrackScoreMap; +// std::map sliceIdToNumPFPsMap; +// std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); +// +// if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<Self()<> pfp_vec = pair.second; +// int slice_id = pair.first; +// //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) +// for(auto pfp: pfp_vec){ +// if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ +// std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; +// +// if(m_runCRT){ +// art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); +// for(size_t i=0; i< flashVector.size(); ++i){ +// crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); +// } +// } +// +// art::Handle> crthit_h; //only filled when there are hits, otherwise empty +// art::Handle rawHandle_DAQHeader; +// double evt_timeGPS_nsec = -999 ; +// if(m_runCRT){ +// evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); +// evt.getByLabel(m_CRTHitProducer, crthit_h); +// raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); +// art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); +// evt_timeGPS_nsec = evtTimeGPS.timeLow(); +// std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); +// +// +// +// //******************************* Common Optical Filter **************************************************************/ +// //******************************* Common Optical Filter **************************************************************/ +// //Raw Optical fltr +// art::Handle uBooNE_common_optFltr; +// if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ +// m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); +// m_flash_optfltr_pe_beam_tot = uBooNE_common_optFltr->PE_Beam_Total(); +// m_flash_optfltr_pe_veto = uBooNE_common_optFltr->PE_Veto(); +// m_flash_optfltr_pe_veto_tot = uBooNE_common_optFltr->PE_Veto_Total(); +// }else{ +// m_flash_optfltr_pe_beam = -999; +// m_flash_optfltr_pe_beam_tot = -999; +// m_flash_optfltr_pe_veto = -999; +// m_flash_optfltr_pe_veto_tot = -999; +// std::cout<<"No opfiltercommon product:"<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); +// this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); +// +// //Run over PID? +// if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); +// +// +// //******************************* Showers **************************************************************/ +// //******************************* Showers **************************************************************/ +// std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); +// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); +// +// +// //Some misc things thrown in here rather than in a proper helper function. TODO. fix +// //Calc a fake shower "end" distance. How to define an end distance? good question +// for(size_t i_shr = 0; i_shr s = showers[i_shr]; +// const art::Ptr pfp = showerToNuPFParticleMap[s]; +// const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; +// +// m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; +// m_reco_shower_end_dist_to_SCB[i_shr] = 99999; +// +// for(auto &sp: shr_spacepoints){ +// std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; +// m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); +// double tmo; +// this->distToSCB(tmo,tmp_spt); +// m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); +// +// //This section runs for only 1 shower events for purpose of testing delta specifics +// if(showers.size()==1){ +// m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); +// m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); +// m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); +// } +// +// } +// } +// +// +// //******************************* MCTruth **************************************************************/ +// //******************************* MCTruth **************************************************************/ +// +// //Grab the backtracker info for MCTruth Matching +// art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); +// +// // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. +// // MCShower and MCTrack come from energy depositions in GEANT4 +// +// //Only run if its not data :) +// if(!m_is_data){ +// +// std::vector> gTruthVector; +// if(!m_is_textgen){ +// +// // if Text is in the generator label, skip it. TODO this is a bit simple but works, maybe add a boolean +// art::ValidHandle> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); +// art::fill_ptr_vector(gTruthVector,gTruthHandle); +// if(m_is_verbose){ +// for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); +// art::fill_ptr_vector(mcTruthVector,mcTruthHandle); +// +// //get MCPartilces (GEANT4) +// art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); +// art::fill_ptr_vector(mcParticleVector,mcParticleHandle); +// +// //Found inanalyze_Geant4.h +// //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! +// this->AnalyzeGeant4(mcParticleVector); +// +// +// //Get the MCParticles (move to do this ourselves later) +// this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); +// +// +// //mcc9 march miniretreat fix +// std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP +// std::vector match_vec; //vector of some backtracker thing +// m_test_matched_hits = 0; +// +// for(size_t j=0; j hit = hitVector[j]; +// +// particle_vec.clear(); match_vec.clear(); //only store per hit +// mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); +// if(particle_vec.size() > 0){ +// m_test_matched_hits++; +// } +// } +// +// +// //Important map, given a MCparticle, whats the "hits" associated +// this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); +// +// +// //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly +// std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); +// std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); +// +// //photoNuclearTesting(matchedMCParticleVector); +// +// std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); +// +// std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); +// +// +// std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); +// +// +// //added since last time? +// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind +// +// /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind +// std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID +// std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); +// std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ +// std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); +// +// //if(!m_run_pi0_filter){ +// // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); +// //} +// +// std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); +// +// if (m_print_out_event){ +// if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ +// out_stream <<"run subrunevent "<> ev_evw ; +// if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ +// +// std::map> const & weight_map = ev_evw->front().fWeight; +// if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; +// +// for (auto const& x : weight_map){ +// std::cout << x.first // string (key) +// << ':' +// << x.second.size() << std::endl ; +// if(x.second.size()==1 && x.first == "splines_general_Spline"){ +// m_genie_spline_weight = x.second.front(); +// std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; +// if( evt.getByLabel("eventweight",ev_evw_ph)){ +// std::map> const & weight_map = ev_evw_ph->front().fWeight; +// for (auto const& x : weight_map){ +// std::cout << x.first // string (key) +// << ':' +// << x.second.size() << std::endl ; +// if(x.first == "photonuclear_photon_PhotoNuclear"){ +// auto vec = x.second; +// double ph_low = vec[1]; +// double ph_high = vec[0]; +// std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); +// std::map> const & weight_map = ev_evw_true->front().fWeight; +// if(ev_evw_true->size() > 1) { +// std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" +// << "WARNING: eventweight has more than one entry\n"; +// } +// fmcweight=weight_map; +// } +// +// }//end NOT textgen +// +// +// +// std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"< IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap); +// +// +// +// +// // ################################################### SEAview SEAview ######################################################### +// // ################################################### SEAview SEAview ######################################################### +// +// +// // ################################################### Proton Stub ########################################### +// // ------------- stub clustering --------------------------- +// std::cout << "----------------- Stub clustering --------------------------- " << std::endl; +// std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; +// +// if(!m_run_pi0_filter && m_runSEAviewStub && (m_SEAviewStubNumRecoShower == -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ +// +// // grab all hits in the slice of the reco shower +// art::Ptr p_shr = showers.front(); +// art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; +// std::vector> p_hits = pfParticleToHitsMap[p_pfp]; +// +// int p_sliceid = PFPToSliceIdMap[p_pfp]; +// auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; +// +// std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); +// +// //Setup seaviewr object +// seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector ); +// //Pass in any bad channels you like +// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); +// //Give it a vertex to center around +// sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); +// +// //Add the hits from just this slice, as well as hits within 150cm of the vertex +// sevd.addHitsToConsider(hitVector); // std::vector> +// sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view +// sevd.addHitsToConsider(p_slice_hits); +// +// sevd.addAllHits(hitVector); // std::vector> +// sevd.setHitThreshold(m_SEAviewStubHitThreshold); +// +// +// //Add all the "nice " PFParticle Hits, as well as what to label +// //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string +// sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string +// +// //and add the SingleShower we like +// sevd.addShower(p_shr); // art::Ptr +// +// //Add all track PFP +// int i_trk = 0; +// for(auto &trk: tracks){ +// art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; +// std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; +// //sevd.addPFParticleHits(p_hits_trk,"track"); +// sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); +// sevd.addTrack(trk); +// ++i_trk; +// } +// +// //Add all cosmic-relatd PFP +// for(auto &cr: crParticles){ +// std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; +// sevd.addPFParticleHits(p_hits_cr,"cosmic"); +// } +// +// +// //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. +// auto vnh= sevd.calcUnassociatedHits(); +// m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; +// m_trackstub_unassociated_hits_below_threshold = vnh[2]; +// m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; +// +// //Recluster, group unassociated hits into different clusters +// sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); +// +// //And some plotting +// // If we want to plot pdfs again later, then we can't plot here +// //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); +// +// //Analyze formed clusters and save info +// std::vector vec_SEAclusters ; +// sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); +// +// +// //And save to file. +// std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); +// int remerge = clu.getShowerRemerge(); +// seaview::cluster_score * ssscorz = clu.getScore(); +// +// std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ +// //decide not to add energy of the cluster to reco shower if it's matched +// // +// //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; +// //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; +// //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; +// +// continue;// Dont include this as a viable cluster! +// } +// +// ++m_trackstub_num_candidates; +// //determine if this cluster is in neutrino slice +// m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); +// +// //Fill All the bits +// m_trackstub_candidate_num_hits.push_back((int)hitz.size()); +// m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); +// m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); +// m_trackstub_candidate_plane.push_back(pl); +// m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); +// m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); +// m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); +// m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); +// m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); +// m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); +// m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); +// m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); +// m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); +// m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); +// m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); +// m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); +// m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); +// m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); +// m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); +// m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); +// m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); +// m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); +// m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); +// m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); +// m_trackstub_candidate_energy.push_back(Ep); +// m_trackstub_candidate_remerge.push_back(remerge); +// +// +// //MCTruth matching for pi0's +// if(m_is_data){ +// m_trackstub_candidate_matched.push_back(-1); +// m_trackstub_candidate_pdg.push_back(-1); +// m_trackstub_candidate_parent_pdg.push_back(-1); +// m_trackstub_candidate_trackid.push_back(-1); +// m_trackstub_candidate_true_energy.push_back(-1); +// m_trackstub_candidate_overlay_fraction.push_back(-1); +// m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); +// }else{ +// +// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); +// m_trackstub_candidate_matched.push_back(ssmatched[0]); +// m_trackstub_candidate_pdg.push_back(ssmatched[1]); +// m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); +// m_trackstub_candidate_trackid.push_back(ssmatched[3]); +// m_trackstub_candidate_true_energy.push_back(ssmatched[4]); +// m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); +// m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); +// +// //Guanqun: print out (best-matched) truth information of the cluster +// std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; +// std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; +// std::cout << "===============================================================" << std::endl; +// } +// +// sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); +// +// +// } //end of cluster loop +// +// // Plot the event +// if(m_SEAviewStubMakePDF){ +// sevd.Print(m_SEAviewStubPlotDistance); +// } +// +// //group clusters HERE +// std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); +// m_trackstub_num_candidate_groups = group_result.first; +// m_grouped_trackstub_candidate_indices = group_result.second.first; +// m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; +// } +// +// +// // --------------- shower clustering -------------------------- +// std::cout << "------------- Shower clustering --------------------" << std::endl; +// std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; +// +// if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ +// +// art::Ptr p_shr = showers.front(); +// art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; +// std::vector> p_hits = pfParticleToHitsMap[p_pfp]; +// +// +// int p_sliceid = PFPToSliceIdMap[p_pfp]; +// auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; +// +// std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); +// +// //Setup seaviewr object +// seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); +// //Pass in any bad channels you like +// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); +// //Give it a vertex to center around +// sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); +// +// //Add hits to consider for clustering +// //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV +// //sevd.filterConsideredHits(150); +// sevd.addHitsToConsider(p_slice_hits); +// +// //Add all hits in the events +// sevd.addAllHits(hitVector); // std::vector> +// sevd.setHitThreshold(m_SEAviewHitThreshold); +// +// //Add all the "nice " PFParticle Hits, as well as what to label +// //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string +// sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string +// +// //and add the SingleShower we like +// sevd.addShower(p_shr); // art::Ptr +// +// //Add all track PFP +// int i_trk = 0; +// for(auto &trk: tracks){ +// art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; +// std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; +// //sevd.addPFParticleHits(p_hits_trk,"track"); +// sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); +// sevd.addTrack(trk); +// ++i_trk; +// } +// +// //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 +// /*for(auto &cr: crParticles){ +// std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; +// sevd.addPFParticleHits(p_hits_cr,"cosmic"); +// } +// */ +// +// //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. +// auto vnh= sevd.calcUnassociatedHits(); +// m_sss_num_unassociated_hits =vnh[1]+vnh[2]; +// m_sss_num_unassociated_hits_below_threshold = vnh[2]; +// m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; +// +// //Recluster, group unassociated hits into different clusters +// sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); +// +// +// //This is the place I will put the new Second Shower Search +// std::vector vec_SEAclusters ; +// sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); +// +// //And save to file. +// std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); +// int remerge = clu.getShowerRemerge(); +// seaview::cluster_score * ssscorz = clu.getScore(); +// +// std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ +// if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; +// if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; +// if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; +// +// continue;// Dont include this as a viable cluster! +// } +// +// ++m_sss_num_candidates; +// +// //determine if this cluster is in neutrino slice +// m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); +// +// //Fill All the bits +// m_sss_candidate_num_hits.push_back((int)hitz.size()); +// m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); +// m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); +// m_sss_candidate_plane.push_back(pl); +// m_sss_candidate_PCA.push_back(ssscorz->pca_0); +// m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); +// m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); +// m_sss_candidate_fit_constant.push_back(clu.getFitCons()); +// m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); +// m_sss_candidate_max_tick.push_back(ssscorz->max_tick); +// m_sss_candidate_min_tick.push_back(ssscorz->min_tick); +// m_sss_candidate_min_wire.push_back(ssscorz->min_wire); +// m_sss_candidate_max_wire.push_back(ssscorz->max_wire); +// m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); +// m_sss_candidate_min_dist.push_back(ssscorz->min_dist); +// m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); +// m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); +// m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); +// m_sss_candidate_energy.push_back(Ep); +// m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); +// m_sss_candidate_remerge.push_back(remerge); +// +// +// //MCTruth matching for pi0's +// if(m_is_data){ +// m_sss_candidate_matched.push_back(-1); +// m_sss_candidate_pdg.push_back(-1); +// m_sss_candidate_parent_pdg.push_back(-1); +// m_sss_candidate_trackid.push_back(-1); +// m_sss_candidate_true_energy.push_back(-1); +// m_sss_candidate_overlay_fraction.push_back(-1); +// m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); +// }else{ +// +// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); +// m_sss_candidate_matched.push_back(ssmatched[0]); +// m_sss_candidate_pdg.push_back(ssmatched[1]); +// m_sss_candidate_parent_pdg.push_back(ssmatched[2]); +// m_sss_candidate_trackid.push_back(ssmatched[3]); +// m_sss_candidate_true_energy.push_back(ssmatched[4]); +// m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); +// m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); +// +// //Guanqun: print out (best-matched) truth information of the cluster +// std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; +// std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; +// std::cout << "===============================================================" << std::endl; +// } +// +// +// sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); +// +// } //end of cluster loop +// +// // Plot the event +// if(m_SEAviewMakePDF){ +// sevd.Print(m_SEAviewPlotDistance); +// } +// +// } +// +// for(int i =0; i<(int)showers.size(); i++){ +// m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); +// } +// +// // ################################################### END SEAview END SEAview ######################################################### +// // ##################################################################################################################################### +// +// +// +// // PandoraAllOutComes +// // I.e This runs over all 3D reco showers in the whole event and find second shower candidates +// if(!m_run_pi0_filter){ +// std::cout<<"------------ Shower3D --------------"<Self()<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); +// +// +// //And cluster the 2d and 3d second showers. Very simple TODO +// this->SimpleSecondShowerCluster(); +// +// } +// +// +// // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### +// +// size_t n_neutrino_slice=0; +// size_t n_neutrino_candidate_pfp_id=0; +// +// for(size_t s=0; s< sliceVector.size(); s++){ +// auto slice = sliceVector[s]; +// std::vector> pfps = sliceToPFParticlesMap[slice]; +// +// int primaries=0; +// int n_dau=0; +// int found = 0; +// //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; +// // Check if this particle is identified as the neutrino +// const int pdg(pfp->PdgCode()); +// const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); +// primaries++; +// // If it is, lets get the vertex position +// if(isNeutrino){ +// found++; +// //Ok this is neutrino candidate. +// +// std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); +// for (const size_t daughterId : pfp->Daughters()){ +// n_dau++; +// auto dau = pfParticleMap[daughterId]; +// std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ +// while(tmp->NumDaughters()>0 && n_gen < 4){ +// for(int k=0; k< n_gen; k++){ +// std::cout<<"---> "; +// } +// auto grandau = pfParticleMap[granDaughterId]; +// std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; +// } +// +// } +// std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ +// std::cout<<"We're Missing Something!."<1){ +// throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "<Fill(); +// ncdelta_slice_tree->Fill(); +// eventweight_tree->Fill(); +// true_eventweight_tree->Fill(); +// geant4_tree->Fill(); +// } +// +// +// //Rest the vertex after filling +// this->ClearVertex(); +// +// if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; +// else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; +// +// //if not in filter mode pass all + return true; + + }// end filter_module main class + + + + //------------------------------------------------------------------------------------------- + void SinglePhoton::endJob() + { + if (m_print_out_event){ + out_stream.close(); + } + pot_tree->Fill(); + } + + //------------------------------------------------------------------------------------------- + + //This runs ONCE at the start of the job and sets up all the necessary services and TTrees + void SinglePhoton::beginJob() + { + mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; +//CHECK +// art::ServiceHandle tfs; +// +// vertex_tree = tfs->make("vertex_tree", "vertex_tree"); +// pot_tree = tfs->make("pot_tree", "pot_tree"); +// eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); +// ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); +// run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); +// geant4_tree = tfs->make("geant4_tree","geant4_tree"); +// +// //run_subrun_tree, reset some POT +// m_run = 0; +// m_subrun = 0; +// m_subrun_pot = 0; +// run_subrun_tree->Branch("run",&m_run,"run/I"); +// run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); +// run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); +// run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); +// +// true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); +// true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); +// +// // --------------------- POT Releated variables ----------------- +// m_number_of_events = 0; +// m_number_of_vertices = 0; +// m_pot_count=0; +// m_pot_per_event = 0; +// m_pot_per_subrun = 0; +// m_number_of_events_in_subrun=0; +// +// +// pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); +// pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); +// pot_tree->Branch("POT",&m_pot_count,"POT/D"); +// +// // --------------------- Event Related variables ------------ +// vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); +// vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); +// vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); +// +// vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); +// vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); +// vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); +// +// +// vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); +// vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); +// +// vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); +// vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); +// +// vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); +// +// // --------------------- Vertex Related variables ------------ +// vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); +// vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); +// vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); +// vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); +// vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); +// vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); +// vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); +// +// vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); +// +// vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); +// vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); +// vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); +// vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); +// +// //create branches as found in individual analyze_XXX.h +// this->CreateIsolationBranches(); +// this->CreateSecondShowerBranches(); +// this->CreateSecondShowerBranches3D(); +// this->CreateStubBranches(); +// this->CreateFlashBranches(); +// this->CreateShowerBranches(); +// this->CreateSliceBranches(); +// this->CreateMCTruthBranches(); +// this->CreateEventWeightBranches(); +// this->CreateGeant4Branches(); +// this->CreateTrackBranches(); +// +// //hardcode some info (TODO change) +// std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; +// +// //Get the info for length->energy conversion from PSTAR database. +// TFile *fileconv; +// struct stat buffer; +// +// //some useful input data +// if(!m_run_pi0_filter){ +// if(stat("proton_conversion.root", &buffer) == 0){ +// fileconv = new TFile("proton_conversion.root", "read"); +// }else{ +// fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); +// } +// +// proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); +// proton_length2energy_tgraph.GetMean(); +// fileconv->Close(); +// } +// +// //bad channels +// std::string bad_channel_file = "MCC9_channel_list.txt"; +// +// if(!m_run_pi0_filter){ +// if(stat(bad_channel_file.c_str(), &buffer) != 0){ +// bad_channel_file = gpvm_location+bad_channel_file; +// } +// +// std::ifstream bc_file(bad_channel_file); +// +// if (bc_file.is_open()) +// { +// std::string line; +// while ( getline (bc_file,line) ) +// { +// std::vector res; +// std::istringstream iss(line); +// for(std::string s; iss >> s; ) +// res.push_back( std::stof(s)); +// +// std::pair t(res[0],res[1]); +// bad_channel_list_fixed_mcc9.push_back(t); +// } +// bc_file.close(); +// } +// } +// +// +// //------------------- List of Selected Events to run -------- +// if(m_runSelectedEvent){ +// std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; +// +// std::ifstream infile(m_selected_event_list); +// if(!infile){ +// std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; +// return; +// } +// +// //read from file, run number, subrun number ,event number that should be run +// m_selected_set.clear(); +// std::string line; +// while(std::getline(infile, line)){ +// std::istringstream ss(line); +// +// std::vector event_info; +// for(int i; ss >> i; ) event_info.push_back(i); +// +// m_selected_set.insert(event_info); +// } +// +// infile.close(); +// +// if(m_is_verbose){ +// std::cout << "Selected Events: " << std::endl; +// std::cout << "Run \t SubRun \t Event" << std::endl; +// for(auto & v: m_selected_set){ +// std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); +// std::cout << std::endl; +// } +// } +// } + + std::cout<<"SinglePhoton \t||\t beginJob() is complete"<ClearIsolation(); + this->ClearSecondShowers(); + this->ClearSecondShowers3D(); + this->ClearStubs(); + this->ClearFlashes(); + this->ClearTracks(); + this->ClearShowers(); + this->ClearMCTruths(); + this->ClearEventWeightBranches(); + fmcweight.clear(); + this->ClearGeant4Branches(); + this->ClearSlices(); + + + } + + + bool SinglePhoton::beginSubRun(art::SubRun& sr) { + + + m_run = sr.run(); + m_subrun = sr.subRun(); + + double this_pot = 0; + + //reset subrun count + m_subrun_counts = 0; + + + if(m_potLabel != ""){ + if(m_potLabel == "generator"){ + + art::Handle gen_pot_hand; + if(sr.getByLabel(m_potLabel,gen_pot_hand)){ + this_pot = gen_pot_hand->totgoodpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; + if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ + this_pot =potSummaryHandlebnbETOR875->totpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<Fill(); + return true; + } + + + + + + + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + + void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; + int n_vert =0; + + //std::cout<<"There are "<second; + if (!vertexVector.empty()) + { + if (vertexVector.size() !=1) + std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; + + const art::Ptr vertex = *(vertexVector.begin()); + double xyz[3] = {0.0, 0.0, 0.0} ; + vertex->XYZ(xyz); + + n_vert++; + //std::cout<<"Vertex!"<<"\t "< tmp = {xyz[0],xyz[1],xyz[2]}; + m_reco_vertex_in_SCB = 0;//CHECK this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = 0;//CHECK this->distToTPCActive(tmp); +//CHECK +// if(!m_run_pi0_filter){ +// m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// } + + }else{ + std::cout << " Error: vertexVector associated with this particle is empty " << "\n"; + std::cerr << " Error: vertexVector associated with this particle is empty " << "\n"; + //exit(0); + + } + } + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) + { + const art::Ptr pParticle(pfParticleHandle, i); + // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) + { + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + } + + + void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) + { + + int found = 0; + int primaries = 0; + int full = 0; + for (PFParticleIdMap::const_iterator it = pfParticleMap.begin(); it != pfParticleMap.end(); ++it) + { + const art::Ptr pParticle(it->second); + + full++; + // Only look for primary particles + if (!pParticle->IsPrimary()) continue; + + // Check if this particle is identified as the neutrino +//CHECK const int pdg(pParticle->PdgCode()); + const bool isNeutrino = true;//CHECK (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + + + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + this->GetVertex(pfParticlesToVerticesMap, pParticle ); + + } + + // All non-neutrino primary particles are reconstructed under the cosmic hypothesis + if (!isNeutrino) + { + crParticles.push_back(pParticle); + continue; + } + + // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. + // If this is not the case please handle accordingly + if (!nuParticles.empty()) + { + throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; + } + + // Add the daughters of the neutrino PFParticle to the nuPFParticles vector + for (const size_t daughterId : pParticle->Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + nuParticles.push_back(pfParticleMap.at(daughterId)); + } + } + std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + + + // Get the associations between PFParticles and tracks/showers from the event + art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + + //if running over the neutrino slice only + if (m_run_all_pfps == false){ + for (const art::Ptr &pParticle : particles) { + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + } + } else{ //if running over all slices + std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; + + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + } + } + + + } + + void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + + const unsigned int nTracks(associatedTracks.size()); + const unsigned int nShowers(associatedShowers.size()); + + + // Check if the PFParticle has no associated tracks or showers + if (nTracks == 0 && nShowers == 0) + { + // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; + return; + } + + // Check if there is an associated track + if (nTracks == 1 && nShowers == 0) + { + + tracks.push_back(associatedTracks.front()); + trackToNuPFParticleMap[tracks.back()]= pParticle; + //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); + + } + + + + + double SinglePhoton::triangle_area(double a1, double a2, double b1, double b2, double c1, double c2){ + double m1 = 0.3; + double m2 = 1.0/25.0; + + return fabs((a1*m1*(b2*m2-c2*m2)+b1*m1*(c2*m2-a2*m2)+c1*m1*(a2*m2-b2*m2))/2.0); + } + + int SinglePhoton::quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area){ + + std::vector z(n,0.0); + + TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); + TGraphDelaunay delan(g); + delan.SetMarginBinsContent(0); + delan.ComputeZ(0,0); + delan.FindAllTriangles(); + (*num_triangles)=delan.GetNdt(); // number of Delaunay triangles found + + //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays + Int_t *MT = delan.GetMTried(); + Int_t *NT = delan.GetNTried(); + Int_t *PT = delan.GetPTried(); + + (*area)=0.0; + for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ + + int n = hits.size(); + std::vector C0,T0; + std::vector C1,T1; + std::vector C2,T2; + size_t n_0=0; + size_t n_1=0; + size_t n_2=0; + + for(int i=0;i hit = hits[i]; + switch(hit->View()){ + case 0: + C0.push_back((double)hit->WireID().Wire); + T0.push_back(hit->PeakTime()); + n_0++; + break; + case 1: + C1.push_back((double)hit->WireID().Wire); + T1.push_back(hit->PeakTime()); + n_1++; + break; + case 2: + C2.push_back((double)hit->WireID().Wire); + T2.push_back(hit->PeakTime()); + n_2++; + break; + default: + break; + } + } + if(m_use_delaunay){ + if(n_0>0 && (int)n_0 < m_delaunay_max_hits) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); + if(n_1>0 && (int)n_1 < m_delaunay_max_hits) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); + if(n_2>0 && (int)n_2 < m_delaunay_max_hits) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); + } + num_hits[0] = n_0; + num_hits[1] = n_1; + num_hits[2] = n_2; + + //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ + corrected.resize(3); + + double kx = input[0]; + double ky = input[1]; + double kz = input[2]; + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + // CHECK + // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + // double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & mcparticle, std::vector & corrected){ + corrected.resize(3); + + double kx = mcparticle->Vx(); + double ky = mcparticle->Vy(); + double kz = mcparticle->Vz(); + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + //double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & corrected){ + corrected.resize(3); + //Space Charge Effect! functionize this soon. + double kx = mcparticle.Vx(); + double ky = mcparticle.Vy(); + double kz = mcparticle.Vz(); + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky + scecorr.Y(); + corrected[2]=kz + scecorr.Z(); + return 0; + } + + void SinglePhoton::CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr > & MCParticleToTrackIdMap) + { + + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(label, theParticles); + + if (!theParticles.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, label); + + for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) + { + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + truthToParticles[truth].push_back(particle); + particlesToTruth[particle] = truth; + MCParticleToTrackIdMap[particle->TrackId()] = particle; + } + + std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) + { + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + + art::Handle< std::vector > theSimChannels; + evt.getByLabel(label, theSimChannels); + + if (!theSimChannels.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; + } + + for (unsigned int i = 0; i < theSimChannels->size(); ++i) + { + const art::Ptr channel(theSimChannels, i); + simChannelVector.push_back(channel); + } + } + + + void SinglePhoton::BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap) + { + std::vector< art::Ptr > simChannelVector; + std::map< art::Ptr, std::vector> > truthToParticles; + std::map< art::Ptr, art::Ptr > particlesToTruth; + std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; + + this->CollectSimChannels(evt, label, simChannelVector); + this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); +// CHECK +// lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); +// lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + + + } + + bool SinglePhoton::Pi0PreselectionFilter() + { + + if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; + if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; + if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=1) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_conversion_distance.size()!=2) return false; + if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; + + return true; + } + + + + bool SinglePhoton::Pi0PreselectionFilter2g0p() + { + + if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; + if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; + if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=0) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_energy_max.size()!=2) return false; + //if the maximum energy of all showers on all planes is smaller than 30 + if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; + + return true; + } + + bool SinglePhoton::IsEventInList(int run, int subrun, int event){ + if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ + if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ + if(m_selected_set.find({run}) == m_selected_set.end()) + return false; + } + } + return true; + } + +} //namespace diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h new file mode 100644 index 000000000..afb535375 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -0,0 +1,1900 @@ +#ifndef SINGLE_PHOTON_ANALYSIS +#define SINGLE_PHOTON_ANALYSIS + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +//#include "art/Framework/Services/Optional/TFileService.h" +//#include "art/Framework/Services/Optional/TFileDirectory.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +//KENG +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +//#include "ubobj/Optical/UbooneOpticalFilter.h" + +// Helper function for PID stuff +//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" +#include "TGeoPolygon.h" + +//#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "helper_functions.h" +//CHECK +//#include "bad_channel_matching.h" +//#include "DBSCAN.h" +// +//#include "SEAview/SEAviewer.h" + + +//------------------------------------------------------------------------------------------------------------------------------------------ + +namespace single_photon +{ + + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; /* wire of hit that's closest to vertex */ + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; /* number of wires hits correspond to */ + int n_ticks; + + bool pass; + + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of class sss_score + + class cluster { + + public: + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts,&wires[0],&ticks[0]); + f_graph = af_graph; + + }; + + int getID() {return f_ID;} + int getN() {return f_npts;} + int getPlane(){ return f_plane;} + TGraph * getGraph(){ return &f_graph;} + std::vector> getHits(){return f_hits;} + int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} + sss_score * getSSScore(){return f_SSScore;} + private: + + int f_ID; + int f_npts; + int f_plane; + std::vector> f_pts; + std::vector> f_hits; + TGraph f_graph; + sss_score *f_SSScore; + }; // end of class cluster + + + + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDFilter + { + public: + // name alias from pandora + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + bool filter(art::Event &evt) override; + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob() override; + + /** + * @brief End the job, setting down ! + * + */ + void endJob() override; + /** + * @brief: grab run, subrun number, and subrun POT, fill the TTree */ + bool beginSubRun(art::SubRun& sr) override; + bool endSubRun(art::SubRun& sr) override; + + private: + /** + * @brief: reset/clear data members + */ + void ClearVertex(); + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleHandle the handle for the PFParticle collection + * @param pfParticleMap the mapping from ID to PFParticle + */ + void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); + + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ + void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; + + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleMap the mapping from ID to PFParticle + * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis + * @param nuParticles a vector to hold the final-states of the reconstruced neutrino + */ + void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); + + /** + * @brief Collect associated tracks and showers to particles in an input particle vector + * + * @param particles a vector holding PFParticles from which to find the associated tracks and showers + * @param pfParticleHandle the handle for the PFParticle collection + * @param evt the art event to analyze + * @param tracks a vector to hold the associated tracks + * @param showers a vector to hold the associated showers + */ + void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: analyze associated tracks/showers for an PFParticle + * @param: pParticle: PFParticle to be analyzed + * @param: associatedTracks: a vector of asso track for pParticle + * @param: associatedShowers: a vector of asso shower for pParticle + * @param: tracks: associated track will be added into tracks + * @param: showers: associated shower will be added into showers + * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle + */ + void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: get vertex for particle + * @param: particle: a primary neutrino + */ + void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); + + void CollectCalo(const art::Event &evt,const art::Ptr &shower); + + + /* + *@brief Calculated the shower energy by looping over all the hits and summing the charge + *@param hits - an art pointer of all the hits in a shower + * */ + double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ + + int getNHitsPlane(std::vector> hits, int this_plane); + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + + /** + *@brief Takes a hit and multiplies the charge by the gain + *@param thishitptr art pointer to a hit + *@param plane the plane the hit is on + **/ + double GetQHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV for a given hit + * @param thishit - an individual hit + * + * + * */ + double QtoEConversionHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV from a given Q value + * @param q - the charge value + * + * */ + double QtoEConversion(double q); + + + /** + *@brief Takes a vector of dQ/dx values and converts to dE/dx + *@param dqdx - vector of dqdx points + * + * */ + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + /** + * + *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane + *@param shower - a Pandora shower + *@param clusters - all of the clusters in the shower + *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster + *@param plane - a single plane + * * */ + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane); + /** + *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) + *@param shower_dir - the 3D shower direction + *@param plane - a single plane + * */ + double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ + TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ + double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + + double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ + int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + + double degToRad(double deg); + double radToDeg(double rad); + /** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); + + /** + *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle + *@param thishit_pos - 2d location of a hit in cm + *@param rectangle - vector of the positions of the four corners of the rectangle + * + * */ + bool insideBox(std::vector thishit_pos, std::vector> rectangle); + + /** + * + *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary + *uses triangle area check + * + * */ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + + double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); + + /*** + *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 + *@param thisvector - vector of doubles + * + * */ + double getMedian(std::vector thisvector); + + + //---------------- Templatees ---------------------------- + void AnalyzeTemplates(); + void ClearTemplates(); + void ResizeTemplates(size_t); + void CreateTemplateBranches(); + + //---------------- Potential Track Stub -------------------- + void ClearStubs(); + void CreateStubBranches(); + + /* @brief: given indices of clusters, determine if they overlap in time + * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters + * candidate_indices provided the indices of clusters of which we'd like to check the overlap + */ + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information + * @brief: candidate clusters on different plane that overlap in time tick will be grouped together + * @return: return.first -> number of possible matches + * return.second.first -> 2D vector, indices of clusters in every possible match + * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match + */ + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + + //---------------- SecondShower---- + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + + void SimpleSecondShowerCluster(); + + + void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); + + + /* this function is now redundant, not in use anymore */ + void SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits + * and return a vector of 7 elements: + * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} + */ + std::vectorSecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + /* analyze a cluster of hits, and return corresponding sss_score */ + sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); + + /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits + * This function is currently used in function 'SecondShowerSearch' + * @parameter: plane, cluster are not in use + * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire + */ + TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); + + + /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ + int CompareToShowers(int,int,std::vector>& hitz,double,double, + const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); + //---------------- Isolation ----------------- + + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + + /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ + void IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); + + + + //---------------- Flashes ---------------------------- + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + + + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + + //---------------- Tracks ---------------------------- + /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ + void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, + std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap + ); + + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); + + + /* @brief: analyze MCParticle related to recob::Track if it has one + * variables starting with 'm_sim_track_' will be updated + * */ + void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector& vec); + + + /* collect information from anab::sParticleIDAlgScores of reco track */ + void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); + TGraph proton_length2energy_tgraph; + + //---------------- Showers ---------------------------- + + void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr> &PFPtoShowerReco3DMap + ); + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, + std::map,art::Ptr> & pfptotrkmap, + std::map,std::vector>> & trktocalomap, + std::map, std::vector>> & pfParticleToHitMap + ); + + void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector); + + /** + * @brief: match showers to MCParticles + * @arguments filled during function execution: + * mcParticleVector: vector of mother particles of showers + * objectToMCParticleMap: map of shower to its mother particle + */ + void showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap); + + + /* tranverse through mcParticleVector, and print out infos for photons */ + int photoNuclearTesting(std::vector>& mcParticleVector); + + // ------------ Fid Volume and SCB------------------------- // + double m_tpc_active_x_low; + double m_tpc_active_x_high; + double m_tpc_active_y_low; + double m_tpc_active_y_high; + double m_tpc_active_z_low ; + double m_tpc_active_z_high; + + double m_SCB_YX_TOP_y1_array; + std::vector m_SCB_YX_TOP_x1_array; + std::vector m_SCB_YX_TOP_y2_array; + double m_SCB_YX_TOP_x2_array; + double m_SCB_YX_BOT_y1_array; + std::vector m_SCB_YX_BOT_x1_array; + std::vector m_SCB_YX_BOT_y2_array; + double m_SCB_YX_BOT_x2_array; + + double m_SCB_ZX_Up_z1_array ; + double m_SCB_ZX_Up_x1_array ; + double m_SCB_ZX_Up_z2_array ; + double m_SCB_ZX_Up_x2_array ; + + double m_SCB_ZX_Dw_z1_array; + std::vector m_SCB_ZX_Dw_x1_array; + std::vector m_SCB_ZX_Dw_z2_array; + double m_SCB_ZX_Dw_x2_array; + + int isInTPCActive(std::vector&); /* if point is in active TPC volume */ + int isInTPCActive(double cut,std::vector&); + double distToTPCActive(std::vector&vec); + /* if point in active TPC, returns distance from point to closest TPC wall + * otherwise, returns -999 */ + + int isInSCB(std::vector&); /* if point is inside SCB */ + int isInSCB(double cut,std::vector&); + int distToSCB(double & dist, std::vector &vec); + /* calc the minimum distance from point to the SC boundary,save to dist. + * return value (0, or 1) indicates whether the point is in SCB */ + int setTPCGeom(); + /* This function is wrong, and Not used */ + bool loadSCB_YX(std::vector&zpolygons); + + //---------------- MCTruths ---------------------------- + + /** + * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) + */ + void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); + + std::map is_delta_map; + + //---------------- EventWeight ---------------------------- + + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + + //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. + + + //---------------- Geant4 ---------------------------- + + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); + + + + + + /** + * @brief: given an event and a label, collect all the SimChannel with that label + * @ param: simChannelVector: a vector of SimChannel [to be filled] + */ + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + + /** + * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use + * @param: evt: event, label: given label + * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] + * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] + * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] + */ + void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + + //-------------- Slices/Pandora Metadata ---------------// + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + //void CreateMatchedSliceBranches(); + + + /** + * brief: analyze metadata of PFParticles, and fill in all these maps + * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap + * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby + */ + void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> & primaryPFPSliceIdVec, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap); + + // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumPFPsMap ); + + std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ + //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); + + /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ + int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + + int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + //can also look at things like shower energy, conversion length, etc. + + + /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ + std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap ); + // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + // std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumShowersMap ); + + + /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ + std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap); + + /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info + * to determine how many eligible tracks and showers there are in the event + */ + void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap, + std::map, int>& PFPToSliceIdMap); + + + void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); + + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + //------- matched shower ------------------------------------- + + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + + //------------------ Delaunay triangle tools -----------// + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found + * and total area of these triangles, + * save to num_triangles & area */ + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ + + // given a MCParticle, get its corrected vertex + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + // given a particle, and input location calculate its corrected true position, so we can compare it to reco + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); + + //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 + std::vector> bad_channel_list_fixed_mcc9; + std::map bad_channel_map_fixed_mcc9; + + + /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ + bool IsEventInList(int run, int subrun, int event); + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + std::string m_badChannelLabel; + std::string m_badChannelProducer; + std::string m_mcTrackLabel; + std::string m_mcShowerLabel; + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer; + std::ofstream out_stream; + + double m_mass_pi0_mev; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); + detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + //double m_gain; + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + + int m_Cryostat; + int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + + bool bool_make_sss_plots; + + + //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + + + int m_reco_asso_showers; + + double m_reco_vertex_to_nearest_dead_wire_plane0; + double m_reco_vertex_to_nearest_dead_wire_plane1; + double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + int m_reco_num_templates; + std::vector m_reco_template; /* temp comment: does not seem to be used */ + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + + double m_CRT_dt; //time between flash and nearest CRT hit + + //------------ Track related Variables ------------- + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + // ---- corresponding variables on the best plane of reco track, which is defined as such------ + // if plane 2 have good hits, then plane 2 is the best-plane + // otherwise, which plane of plane 0 and 1 has more good hits will be best plane + // if none of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + + std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + std::vector m_reco_track_end_to_nearest_dead_wire_plane1; + std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + /* event origin types: + * kUnknown: ??? + * kBeamNeutrino: Beam neutrinos. + * kCosmicRay: Cosmic rays. + * kSuperNovaNeutrino: Supernova neutrinos. + * kSingleParticle: single particles thrown at the detector + */ + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + * if there is no shower hits, set to 999 + * if there is shower hits but no track hits, set to -999 + */ + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + * of each plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + * set to -999 if there is no unassociated hits or track hits on plane + */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + * on each plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + + /*-------------------------------------------------------------------------------------*/ + + //------------ Shower related Variables ------------- + + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + //end flash matching + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + + + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + + + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + * plane 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + + + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + + double m_mctruth_leading_exiting_proton_energy; + + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + + + int m_mctruth_num_reconstructable_protons; + + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + * close enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + + + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + + + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + double _time2cm;//value modeled from David's shower code + + // PID-related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + //Geant4 + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + + + + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ + bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ + }; + + DEFINE_ART_MODULE(SinglePhoton) + +} // namespace lar_pandora +#endif +//------------------------------------------------------------------------------------------------------------------------------------------ +// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/TruncMean.h b/sbncode/SinglePhotonAnalysis/TruncMean.h new file mode 100644 index 000000000..b8dbf1d09 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/TruncMean.h @@ -0,0 +1,260 @@ +/** + * \file TruncMean.h + * + * \ingroup 3DMichel + * + * \brief Class def header for a class TruncMean + * + * @author david caratelli [davidc@fnal.gov] + * Written 08/02/2018. + */ + +#ifndef TRUNCMEAN_H +#define TRUNCMEAN_H + +#include +#include +#include +#include +#include +#include + +/** + \class TruncMean + The truncated mean class allows to compute the following quantities + 1) the truncated mean profile of an ordered vector of values, such as + the charge profile along a particle's track. + To create such a profile use the function CalcTruncMeanProfile() + 2) Get the truncated mean value of a distribution. This function + iteratively hones in on the truncated mean of a distribution by + updating the mean and cutting the tails after each iteration. + For this functionality use CalcIterativeTruncMean() + doxygen documentation! +*/ + +static const double kINVALID_FLOAT = std::numeric_limits::max(); + +class TruncMean{ + + public: + + /// Default constructor + TruncMean(){} + + /// Default destructor + ~TruncMean(){} + + /** + @brief Given residual range and dq vectors return truncated local dq. + Input vectors are assumed to be match pair-wise (nth entry in rr_v + corresponds to nth entry in dq_v vector). + Input rr_v values are also assumed to be ordered: monotonically increasing + or decreasing. + For every dq value a truncated linear dq value is calculated as follows: + 0) all dq values within a rr range set by the class variable _rad are selected. + 1) the median and rms of these values is calculated. + 2) the subset of local dq values within the range [median-rms, median+rms] is selected. + 3) the resulting local truncated dq is the average of this truncated subset. + @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) + @input std::vector dq_v -> vector of measured values for which truncated profile is requested + (i.e. charge profile of a track) + @input std::vector dq_trunc_v -> passed by reference -> output stored here + @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation + */ + void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma = 1); + + /** + @brief Iteratively calculate the truncated mean of a distribution + @brief: mean is returned if vecter's size is too small, or reach the max iteration, or median has converged + @input std::vector v -> vector of values for which truncated mean is asked + @input size_t nmin -> minimum number of iterations to converge on truncated mean + @input size_t nmax -> maximum number of iterations to converge on truncated mean + @input size_t lmin -> minimum number of entries in vector before exiting and returning current value + @input size_t currentiteration -> current iteration + @input double convergencelimit -> fractional difference between successive iterations + under which the iteration is completed, provided nmin iterations have occurred. + @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. + */ + double CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed = kINVALID_FLOAT); + + /** + @brief Set the smearing radius over which to take hits for truncated mean computaton. + */ + void setRadius(const double& rad) { _rad = rad; } + + private: + + double Mean (const std::vector& v); + double Median(const std::vector& v); + double RMS (const std::vector& v); + + /** + Smearing radius over which charge from neighboring hits is scanned to calculate local + truncated mean + */ + double _rad; + +}; + +double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed) +{ + + auto const& mean = Mean(v); + auto const& med = Median(v); + auto const& rms = RMS(v); + + // if the vector length is below the lower limit -> return + if (v.size() < lmin) + return mean; + + // if we have passed the maximum number of iterations -> return + if (currentiteration >= nmax) + return mean; + + // if we passed the minimum number of iterations and the mean is close enough to the old value + double fracdiff = fabs(med-oldmed) / oldmed; + if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) + return mean; + + // if reached here it means we have to go on for another iteration + + // cutoff tails of distribution surrounding the mean + // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom + // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions + v.erase( std::remove_if( v.begin(), v.end(), + [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed + v.end()); + + return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); +} + +void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma) +{ + + // how many points to sample + int Nneighbor = (int)(_rad * 3 * 2); + + dq_trunc_v.clear(); + dq_trunc_v.reserve( rr_v.size() ); + + int Nmax = dq_v.size()-1; + + for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size + + // current residual range + double rr = rr_v.at(n); + + int nmin = n - Nneighbor; + int nmax = n + Nneighbor; + + if (nmin < 0) nmin = 0; + if (nmax > Nmax) nmax = Nmax; + + // vector for local dq values + std::vector dq_local_v; + + for (int i=nmin; i < nmax; i++) { + + double dr = rr - rr_v[i]; + if (dr < 0) dr *= -1; + + if (dr > _rad) continue; + + dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough + + }// for all ticks we want to scan + + if (dq_local_v.size() == 0 ) { + dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself + continue; + } + + // calculate median and rms + double median = Median(dq_local_v); + double rms = RMS(dq_local_v); + + double truncated_dq = 0.; + int npts = 0; + for (auto const& dq : dq_local_v) { + if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ + truncated_dq += dq; + npts += 1; + } + } + + dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma + + if(dq_trunc_v.back() != dq_trunc_v.back()){ + std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) +{ + + double mean = 0.; + for (auto const& n : v) mean += n; + mean /= v.size(); + + return mean; +} + +double TruncMean::Median(const std::vector& v) +{ + + if (v.size() == 1) return v[0]; + + std::vector vcpy = v; + + std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order + + double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice + + return median; +} + +double TruncMean::RMS(const std::vector& v) +{ + + if(v.size()==1) return v.front(); + + double avg = 0.; + for (auto const& val : v) avg += val; + avg /= v.size(); + double rms = 0.; + for (auto const& val : v) rms += (val-avg)*(val-avg); + rms = sqrt( rms / ( v.size() - 1 ) ); + + + if(rms!=rms){ + std::cout<<"ERROR || TruncMean::RMS || is returning nan."<Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); + eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); + eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); + eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); + eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); + eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); + eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); + eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); + eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"< > mcFluxHandle; + e.getByLabel("generator", mcFluxHandle); + if (!mcFluxHandle.isValid()) return; + std::vector< art::Ptr > mcFluxVec; + art::fill_ptr_vector(mcFluxVec, mcFluxHandle); + if (mcFluxVec.size() == 0){ + std::cout << ">> No MCFlux information" << std::endl; + return; + } + + art::Handle< std::vector > mcTruthHandle; + e.getByLabel("generator", mcTruthHandle); + if (!mcTruthHandle.isValid()) return; + std::vector< art::Ptr > mcTruthVec; + art::fill_ptr_vector(mcTruthVec, mcTruthHandle); + if (mcTruthVec.size() == 0){ + std::cout << ">> No MCTruth information" << std::endl; + return; + } + + art::Handle< std::vector< simb::GTruth > > gTruthHandle; + e.getByLabel("generator", gTruthHandle); + if (!gTruthHandle.isValid()) return; + std::vector< art::Ptr > gTruthVec; + art::fill_ptr_vector(gTruthVec, gTruthHandle); + if (gTruthVec.size() == 0){ + std::cout << ">> No GTruth information" << std::endl; + return; + } + + const art::Ptr mcFlux = mcFluxVec.at(0); + const art::Ptr mcTruth = mcTruthVec.at(0); + const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); + const art::Ptr gTruth = gTruthVec.at(0); + + m_run_number_eventweight = e.run(); + m_subrun_number_eventweight = e.subRun(); + m_event_number_eventweight = e.event(); + + // possibly the wrong variables, but let's see for now... + //m_mcflux_evtno = mcFlux->fevtno; + m_mcflux_nu_pos_x = nu.Vx(); + m_mcflux_nu_pos_y = nu.Vy(); + m_mcflux_nu_pos_z = nu.Vz(); + m_mcflux_nu_mom_x = nu.Px(); + m_mcflux_nu_mom_y = nu.Py(); + m_mcflux_nu_mom_z = nu.Pz(); + m_mcflux_nu_mom_E = nu.E(); + m_mcflux_ntype = mcFlux->fntype; + m_mcflux_ptype = mcFlux->fptype; + m_mcflux_nimpwt = mcFlux->fnimpwt; + m_mcflux_dk2gen = mcFlux->fdk2gen; + m_mcflux_nenergyn = mcFlux->fnenergyn; + m_mcflux_tpx = mcFlux->ftpx; + m_mcflux_tpy = mcFlux->ftpy; + m_mcflux_tpz = mcFlux->ftpz; + m_mcflux_tptype = mcFlux->ftptype; + m_mcflux_vx = mcFlux->fvx; + m_mcflux_vy = mcFlux->fvy; + m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for m_mctruth object + + m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < m_mctruth_nparticles; i++){ + + const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); + + m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + m_mctruth_particles_mother[i] = mcParticle.Mother(); + m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + + for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + + const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); + m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + + } + + m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + m_mctruth_particles_px0[i] = mcParticle.Px(0); + m_mctruth_particles_py0[i] = mcParticle.Py(0); + m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + m_mctruth_particles_e0[i] = mcParticle.E(0); + m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + } + + const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); + + m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + m_mctruth_neutrino_mode = mcNeutrino.Mode(); + m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + m_mctruth_neutrino_target = mcNeutrino.Target(); + m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + m_mctruth_neutrino_w = mcNeutrino.W(); + m_mctruth_neutrino_x = mcNeutrino.X(); + m_mctruth_neutrino_y = mcNeutrino.Y(); + m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + m_gtruth_tgt_pdg = gTruth->ftgtPDG; + m_gtruth_tgt_A = gTruth->ftgtA; + m_gtruth_tgt_Z = gTruth->ftgtZ; + m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); + m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); + m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); + m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); + + m_gtruth_weight = gTruth->fweight; + m_gtruth_probability = gTruth->fprobability; + m_gtruth_xsec = gTruth->fXsec; + m_gtruth_diff_xsec = gTruth->fDiffXsec; + m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + m_gtruth_vertex_x = gTruth->fVertex.X(); + m_gtruth_vertex_y = gTruth->fVertex.Y(); + m_gtruth_vertex_z = gTruth->fVertex.Z(); + m_gtruth_vertex_T = gTruth->fVertex.T(); + m_gtruth_gscatter = gTruth->fGscatter; + m_gtruth_gint = gTruth->fGint; + m_gtruth_res_num = gTruth->fResNum; + m_gtruth_num_piplus = gTruth->fNumPiPlus; + m_gtruth_num_pi0 = gTruth->fNumPi0; + m_gtruth_num_piminus = gTruth->fNumPiMinus; + m_gtruth_num_proton = gTruth->fNumProton; + m_gtruth_num_neutron = gTruth->fNumNeutron; + m_gtruth_is_charm = gTruth->fIsCharm; + m_gtruth_is_strange = gTruth->fIsStrange; + m_gtruth_decay_mode = gTruth->fDecayMode; + m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; + m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; + m_gtruth_gx = gTruth->fgX; + m_gtruth_gy = gTruth->fgY; + m_gtruth_gt = gTruth->fgT; + m_gtruth_gw = gTruth->fgW; + m_gtruth_gQ2 = gTruth->fgQ2; + m_gtruth_gq2 = gTruth->fgq2; + m_gtruth_probe_pdg = gTruth->fProbePDG; + m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; + m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + + //moved to inside singlphoontmodule.cc for filter reasons + //eventweight_tree->Fill(); + std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<Branch("geant4_pdg",&m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_geant4_px); + geant4_tree->Branch("geant4_py", &m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_geant4_process); + + + } + + void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< mcp = mcParticleVector[j]; + std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()); + m_geant4_trackid.push_back(mcp->TrackId()); + m_geant4_statuscode.push_back(mcp->StatusCode()); + m_geant4_mother.push_back(mcp->Mother()); + m_geant4_E.push_back(mcp->E()); + m_geant4_mass.push_back(mcp->Mass()); + m_geant4_px.push_back(mcp->Px()); + m_geant4_py.push_back(mcp->Py()); + m_geant4_pz.push_back(mcp->Pz()); + m_geant4_vx.push_back(mcp->Vx()); + m_geant4_vy.push_back(mcp->Vy()); + m_geant4_vz.push_back(mcp->Vz()); + m_geant4_end_process.push_back(mcp->EndProcess()); + m_geant4_process.push_back(mcp->Process()); + m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + + + + if(j>2)break; + + } + + + } +} diff --git a/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h new file mode 100644 index 000000000..c15ef16b7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h @@ -0,0 +1,685 @@ +#include "SinglePhoton_module.h" + +namespace single_photon +{ + void SinglePhoton::ClearMCTruths(){ + m_mctruth_num = 0; + m_mctruth_origin = -99; + m_mctruth_mode = -99; + m_mctruth_interaction_type = -99; + m_mctruth_nu_vertex_x = -9999; + m_mctruth_nu_vertex_y = -9999; + m_mctruth_nu_vertex_z = -9999; + m_mctruth_reco_vertex_dist = -9999; + m_mctruth_ccnc = -99; + m_mctruth_qsqr = -99; + m_mctruth_nu_E = -99; + m_mctruth_nu_pdg = 0; + m_mctruth_lepton_pdg = 0; + m_mctruth_num_daughter_particles = -99; + m_mctruth_daughters_pdg.clear(); + m_mctruth_daughters_E.clear(); + + m_mctruth_daughters_status_code.clear(); + m_mctruth_daughters_trackID.clear(); + m_mctruth_daughters_mother_trackID.clear(); + m_mctruth_daughters_px.clear(); + m_mctruth_daughters_py.clear(); + m_mctruth_daughters_pz.clear(); + m_mctruth_daughters_startx.clear(); + m_mctruth_daughters_starty.clear(); + m_mctruth_daughters_startz.clear(); + m_mctruth_daughters_time.clear(); + m_mctruth_daughters_endx.clear(); + m_mctruth_daughters_endy.clear(); + m_mctruth_daughters_endz.clear(); + m_mctruth_daughters_endtime.clear(); + m_mctruth_daughters_process.clear(); + m_mctruth_daughters_end_process.clear(); + + + m_mctruth_is_delta_radiative = 0; + m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + m_mctruth_delta_photon_energy=-999; + m_mctruth_delta_proton_energy=-999; + m_mctruth_delta_neutron_energy=-999; + + m_mctruth_num_exiting_photons =0; + m_mctruth_num_exiting_protons =0; + m_mctruth_num_exiting_pi0 =0; + m_mctruth_num_exiting_pipm =0; + m_mctruth_num_exiting_neutrons=0; + m_mctruth_num_exiting_delta0=0; + m_mctruth_num_exiting_deltapm=0; + m_mctruth_num_exiting_deltapp=0; + + m_mctruth_num_reconstructable_protons = 0; + + m_mctruth_is_reconstructable_1g1p = 0; + m_mctruth_is_reconstructable_1g0p = 0; + + m_mctruth_leading_exiting_proton_energy = -9999; + + m_mctruth_exiting_pi0_E.clear(); + m_mctruth_exiting_pi0_mom.clear(); + m_mctruth_exiting_pi0_px.clear(); + m_mctruth_exiting_pi0_py.clear(); + m_mctruth_exiting_pi0_pz.clear(); + + m_mctruth_pi0_leading_photon_energy = -9999; + m_mctruth_pi0_subleading_photon_energy = -9999; + m_mctruth_pi0_leading_photon_end_process = "none"; + m_mctruth_pi0_subleading_photon_end_process = "none"; + m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_exiting_TPC = -999; + m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + m_mctruth_exiting_delta0_num_daughters.clear(); + + m_mctruth_exiting_photon_mother_trackID.clear(); + m_mctruth_exiting_photon_trackID.clear(); + m_mctruth_exiting_photon_from_delta_decay.clear(); + m_mctruth_exiting_photon_energy.clear(); + m_mctruth_exiting_photon_px.clear(); + m_mctruth_exiting_photon_py.clear(); + m_mctruth_exiting_photon_pz.clear(); + + m_mctruth_exiting_proton_mother_trackID.clear(); + m_mctruth_exiting_proton_trackID.clear(); + m_mctruth_exiting_proton_from_delta_decay.clear(); + m_mctruth_exiting_proton_energy.clear(); + m_mctruth_exiting_proton_px.clear(); + m_mctruth_exiting_proton_py.clear(); + m_mctruth_exiting_proton_pz.clear(); + + m_mctruth_exiting_neutron_mother_trackID.clear(); + m_mctruth_exiting_neutron_trackID.clear(); + m_mctruth_exiting_neutron_from_delta_decay.clear(); + m_mctruth_exiting_neutron_energy.clear(); + m_mctruth_exiting_neutron_px.clear(); + m_mctruth_exiting_neutron_py.clear(); + m_mctruth_exiting_neutron_pz.clear(); + + } + + void SinglePhoton::ResizeMCTruths(size_t size){ + m_mctruth_daughters_pdg.resize(size); + m_mctruth_daughters_E.resize(size); + m_mctruth_daughters_status_code.resize(size); + m_mctruth_daughters_trackID.resize(size); + m_mctruth_daughters_mother_trackID.resize(size); + m_mctruth_daughters_px.resize(size); + m_mctruth_daughters_py.resize(size); + m_mctruth_daughters_pz.resize(size); + m_mctruth_daughters_startx.resize(size); + m_mctruth_daughters_starty.resize(size); + m_mctruth_daughters_startz.resize(size); + m_mctruth_daughters_time.resize(size); + m_mctruth_daughters_endx.resize(size); + m_mctruth_daughters_endy.resize(size); + m_mctruth_daughters_endz.resize(size); + m_mctruth_daughters_endtime.resize(size); + m_mctruth_daughters_end_process.resize(size); + m_mctruth_daughters_process.resize(size); + + } + + //add into vertex tree? + void SinglePhoton::CreateMCTruthBranches(){ + vertex_tree->Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); + vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); + vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); + vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); + vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); + vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); + vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); + vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); + vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); + vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); + vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); + vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); + vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); + vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); + vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); + vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); + + + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); + vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); + vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); + vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); + vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); + + vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); + vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); + vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); + vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); + + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); + vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); + vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); + vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); + vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); + vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ + m_mctruth_num = mcTruthVector.size(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< truth = mcTruthVector[i]; + + + m_mctruth_origin = truth->Origin(); + if(m_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ + if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); + if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); + if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); + if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); + if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); + if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); + if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); + if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); + if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); + // get corrected lepton position + this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); + + m_mctruth_nu_vertex_x = corrected[0]; + m_mctruth_nu_vertex_y = corrected[1]; + m_mctruth_nu_vertex_z = corrected[2]; + m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); + + } + + + + if(m_is_verbose) std::cout<<"We are working with : "; + m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles + if(m_is_verbose) std::cout<ResizeMCTruths(m_mctruth_num_daughter_particles); + + + //some temp variables to see if its 1g1p or 1g1n + int tmp_n_photons_from_delta = 0; + int tmp_n_protons_from_delta = 0; + int tmp_n_neutrons_from_delta = 0; + + + m_mctruth_leading_exiting_proton_energy = -9999; + + for(int j=0; j< m_mctruth_num_daughter_particles; j++){ + + const simb::MCParticle par = truth->GetParticle(j); + m_mctruth_daughters_pdg[j] = par.PdgCode(); + m_mctruth_daughters_E[j] = par.E(); + + m_mctruth_daughters_status_code[j] = par.StatusCode(); + m_mctruth_daughters_trackID[j] = par.TrackId(); + m_mctruth_daughters_mother_trackID[j] = par.Mother(); + m_mctruth_daughters_px[j] = par.Px(); + m_mctruth_daughters_py[j] = par.Py(); + m_mctruth_daughters_pz[j] = par.Pz(); + m_mctruth_daughters_startx[j] = par.Vx(); + m_mctruth_daughters_starty[j] = par.Vy(); + m_mctruth_daughters_startz[j] = par.Vz(); + m_mctruth_daughters_time[j] = par.T(); + m_mctruth_daughters_endx[j] = par.EndX(); + m_mctruth_daughters_endy[j] = par.EndY(); + m_mctruth_daughters_endz[j] = par.EndZ(); + m_mctruth_daughters_endtime[j] = par.EndT(); + m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string + m_mctruth_daughters_end_process[j] = par.EndProcess(); + + if(m_is_textgen) continue; //quick hack, fix in files + + switch(m_mctruth_daughters_pdg[j]){ + case(22): // if it's a gamma + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_photons++; + m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); + m_mctruth_exiting_photon_energy.push_back(par.E()); + m_mctruth_exiting_photon_px.push_back(par.Px()); + m_mctruth_exiting_photon_py.push_back(par.Py()); + m_mctruth_exiting_photon_pz.push_back(par.Pz()); + } + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); + + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_photon_energy = par.E(); + tmp_n_photons_from_delta ++; + m_mctruth_is_delta_radiative++; + } + } + } + break; + case(111): // if it's a pi0 + { + // Make sure the pi0 actually exits the nucleus + if (par.StatusCode() == 1) { + m_mctruth_exiting_pi0_E.push_back(par.E()); + m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); + m_mctruth_exiting_pi0_px.push_back(par.Px()); + m_mctruth_exiting_pi0_py.push_back(par.Py()); + m_mctruth_exiting_pi0_pz.push_back(par.Pz()); + m_mctruth_num_exiting_pi0++; + } + break; + } + case(211): + case(-211): // it's pi+ or pi- + if (par.StatusCode() == 1) { + m_mctruth_num_exiting_pipm++; + } + break; + case(2212): // if it's a proton + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_protons++; + m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); + m_mctruth_exiting_proton_energy.push_back(par.E()); + m_mctruth_exiting_proton_px.push_back(par.Px()); + m_mctruth_exiting_proton_py.push_back(par.Py()); + m_mctruth_exiting_proton_pz.push_back(par.Pz()); + } + + + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_proton_energy = par.E(); + tmp_n_protons_from_delta ++; + } + } + + + break; + } + case(2112): // if it's a neutron + { + + m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it + m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); + m_mctruth_exiting_neutron_energy.push_back(par.E()); + m_mctruth_exiting_neutron_px.push_back(par.Px()); + m_mctruth_exiting_neutron_py.push_back(par.Py()); + m_mctruth_exiting_neutron_pz.push_back(par.Pz()); + + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_neutron_energy = par.E(); + tmp_n_neutrons_from_delta ++; + } + } + } + + break; + case(-2224): + case(2224): + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } + break; + case(-2214): + case(2214): + case(-1114): + case(1114): // if it's delta-, or delta+ + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } + break; + case(-2114): + case(2114): // if it's delta0 + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_delta0++; + m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ + m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + } + } + + + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t This event is "; + if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ + m_mctruth_delta_radiative_1g1p_or_1g1n = 1; + std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ + m_mctruth_num_reconstructable_protons++; + + }//if g above threshold + } + + //if it's a true delta radiative event, check the energies + + + + if (m_mctruth_is_delta_radiative==true){ + for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ + m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. + + }//if g above threshold + }//for all exiting g + for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ + if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ + //if it's already 1g1p then we've found a 1g2p which we aren't counting + // Guanqun: limit to only 1 reconstructable proton? + if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ + m_mctruth_is_reconstructable_1g1p = false; + } + //if there's a photon then it's actually a 1g1p + if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ + m_mctruth_is_reconstructable_1g1p = true; + m_mctruth_is_reconstructable_1g0p = false; + } + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); + + if(m_is_verbose){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + mymap[mcp->TrackId()] = k; + } + + + //Just some VERY hacky pi^0 photon stuff + int npi0check = 0; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + + if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; + + // if it's a pi0, its mother trackID is 0 and it has two daughters + if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ + npi0check++; + // get its two daughters + const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; + const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; + + if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); + double e2 = dau2->E(); + + std::vector raw_1_End ={dau1->EndX(), dau1->EndY(), dau1->EndZ()}; + std::vector raw_1_Start ={dau1->Vx(), dau1->Vy(), dau1->Vz()}; + + std::vector raw_2_End ={dau2->EndX(), dau2->EndY(), dau2->EndZ()}; + std::vector raw_2_Start ={dau2->Vx(), dau2->Vy(), dau2->Vz()}; + + std::vector corrected_1_start(3), corrected_2_start(3); + std::vector corrected_1_end(3), corrected_2_end(3); + + this->spacecharge_correction(dau1, corrected_1_start, raw_1_Start); + this->spacecharge_correction(dau1, corrected_1_end, raw_1_End); + + this->spacecharge_correction(dau2, corrected_2_start, raw_2_Start); + this->spacecharge_correction(dau2, corrected_2_end, raw_2_End); + + for(int p1=0; p1NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; + std::cout<<"Post1 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau2->Daughter(p1)]]; + std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<isInTPCActive(corrected_1_end); + int exit2 = this->isInTPCActive(corrected_2_end); + + if(e2EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_1_start; + m_mctruth_pi0_leading_photon_end = corrected_1_end; + m_mctruth_pi0_subleading_photon_start = corrected_2_start; + m_mctruth_pi0_subleading_photon_end = corrected_2_end; + //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! + m_mctruth_pi0_leading_photon_exiting_TPC =exit1; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; + m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + }else{ + m_mctruth_pi0_leading_photon_energy = e2; + m_mctruth_pi0_subleading_photon_energy = e1; + m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_2_start; + m_mctruth_pi0_leading_photon_end = corrected_2_end; + m_mctruth_pi0_subleading_photon_start = corrected_1_start; + m_mctruth_pi0_subleading_photon_end = corrected_1_end; + m_mctruth_pi0_leading_photon_exiting_TPC = exit2; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; + m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + } + + } + } + + if(npi0check>1) std::cout<<"WARNING WARNING!!!! there are "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + } + + + void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ + + // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ + + + for(auto pair: crtvetoToFlashMap){ + std::cout<<"for flash at time "<< pair.first->Time()<<" has "<< pair.second.size() << " associated CRT hits "< 0){ + for (auto hit: pair.second){ + std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); + } + + } + m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits + } + + size_t flash_size = flashes.size(); + m_reco_num_flashes = flash_size; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; + + this->ResizeFlashes(flash_size); + + for(size_t i = 0; i < flash_size; ++i) { + + + art::Ptr const & flash = flashes[i]; + + m_reco_flash_total_pe[i]=(flash->TotalPE()); + m_reco_flash_time[i]=(flash->Time()); + m_reco_flash_time_width[i]=flash->TimeWidth(); + m_reco_flash_abs_time[i]=flash->AbsTime(); + m_reco_flash_frame[i]=flash->Frame(); + m_reco_flash_ycenter[i]=flash->YCenter(); + m_reco_flash_ywidth[i]=flash->YWidth(); + m_reco_flash_zcenter[i]=flash->ZCenter(); + m_reco_flash_zwidth[i]=flash->ZWidth(); + + // m_beamgate_flash_end/m_beamgate_flash_start are read from pset + if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ + m_reco_num_flashes_in_beamgate++; + m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); + m_reco_flash_time_in_beamgate[i]=(flash->Time()); + m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); + m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); + } + + + + } + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); + + double _dt_abs = 100000.0; + // double _within_resolution = 0; + double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? + + // Loop over the CRT hits. + for (int j = 0; j < _nCRThits_in_event; j++) + { + /* + if (verbose) + std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; + */ + double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); + + // Fill the vector variables. + m_CRT_hits_time.push_back(_crt_time_temp); + m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); + m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); + m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); + m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); + + if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) + { + _dt_abs = fabs(_beam_flash_time - _crt_time_temp); + m_CRT_dt = _beam_flash_time - _crt_time_temp; + m_CRT_min_hit_time = _crt_time_temp; + // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. + if (_dt_abs < m_Resolution) + { + //_within_resolution = 1; + // Set the position information and the intensity of the CRT hit. + m_CRT_min_hit_PE = crthit_h->at(j).peshit; + m_CRT_min_hit_x = crthit_h->at(j).x_pos; + m_CRT_min_hit_y = crthit_h->at(j).y_pos; + m_CRT_min_hit_z = crthit_h->at(j).z_pos; + + + // if (verbose) + // { + std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; + std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; + std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; + std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; + // } + break; + } + } // End of conditional for closest CRT hit time. + } // End of loop over CRT hits. + } //if there is 1 flash in beamgate + }//if runCRT + + + }//analyze flashes + + + } diff --git a/sbncode/SinglePhotonAnalysis/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/analyze_Showers.h new file mode 100644 index 000000000..0614f70ec --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/analyze_Showers.h @@ -0,0 +1,1659 @@ +#include "SinglePhoton_module.h" +#include "reco_truth_matching.h" + +namespace single_photon +{ + void SinglePhoton::ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_SCB.clear(); + m_reco_shower_start_in_SCB.clear(); + m_reco_shower_end_dist_to_active_TPC.clear(); + m_reco_shower_end_dist_to_SCB.clear(); + + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + + m_reco_shower_reclustered_energy_plane0.clear(); + m_reco_shower_reclustered_energy_plane1.clear(); + m_reco_shower_reclustered_energy_plane2.clear(); + m_reco_shower_reclustered_energy_max.clear(); + + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + m_reco_shower_plane0_meanRMS.clear(); + m_reco_shower_plane1_meanRMS.clear(); + m_reco_shower_plane2_meanRMS.clear(); + + m_reco_shower_hit_tick.clear(); + m_reco_shower_hit_wire.clear(); + m_reco_shower_hit_plane.clear(); + m_reco_shower_spacepoint_x.clear(); + m_reco_shower_spacepoint_y.clear(); + m_reco_shower_spacepoint_z.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + + m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + m_reco_shower_pfparticle_pdg.clear(); + + } + + void SinglePhoton::ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower_reclustered_energy_plane0.resize(size); + m_reco_shower_reclustered_energy_plane1.resize(size); + m_reco_shower_reclustered_energy_plane2.resize(size); + m_reco_shower_reclustered_energy_max.resize(size); + + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_SCB.resize(size); + m_reco_shower_start_in_SCB.resize(size); + + m_reco_shower_end_dist_to_active_TPC.resize(size); + m_reco_shower_end_dist_to_SCB.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + m_reco_shower_plane0_meanRMS.resize(size); + m_reco_shower_plane1_meanRMS.resize(size); + m_reco_shower_plane2_meanRMS.resize(size); + + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + + m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + m_reco_shower_pfparticle_pdg.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + + + + + + } + + void SinglePhoton::CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); + vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); + vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); + + + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); + vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); + vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); + + vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); + vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); + vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); + vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); + + vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); + vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); + vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); + + vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); + vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); + vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void SinglePhoton::AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap, std::map, std::vector> > & pfParticleToClusterMap,std::map, std::vector> > & clusterToHitMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr>& PFPtoShowerReco3DMap + ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); + + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + + art::Ptr shower3d; + if(PFPtoShowerReco3DMap.count(pfp)==0){ + //std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; + const std::vector> clusters = pfParticleToClusterMap[pfp]; + + + //int m_shrid = shower->ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); + + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); + + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; + m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); + + m_reco_shower_dirx[i_shr] = shr_dir.X(); + m_reco_shower_diry[i_shr] = shr_dir.Y(); + m_reco_shower_dirz[i_shr] = shr_dir.Z(); + m_reco_shower_length[i_shr] = m_length; + m_reco_shower_openingangle[i_shr] = m_open_angle; + + m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + m_reco_shower3d_length[i_shr] = shower3d->Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + + double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); + m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + + + + m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); + m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + + m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); + m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + + + m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + std::vector t_num(3,0); // num of triangles on each plane + std::vector t_numhits(3,0); // num of hits on each plane + std::vector t_area(3,0.0); + + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); + + //auto finish = std::chrono::high_resolution_clock::now(); + //auto microseconds = std::chrono::duration_cast(finish-start); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + //const int shr3d_bestplane = shower3d->best_plane(); + + // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); + int wire = h->WireID().Wire; + int tick = h->PeakTime(); + + m_reco_shower_hit_tick.push_back(tick); + m_reco_shower_hit_plane.push_back(plane); + m_reco_shower_hit_wire.push_back(wire); + + + + + } + + } + + + + //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); //corresponding PFParticle + if(m_reco_shower_num_daughters[i_shr]>0){ + //currently just look at 1 daughter + m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + //------------and finally some slice info----------------- + + m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; + //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; + //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<PdgCode(); + } else{ + m_reco_shower_trackscore[i_shr] = -999; + m_reco_shower_pfparticle_pdg[i_shr] = -999; + } + + if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ + + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; + for(int plane =0; plane < 3; plane++){ + if (m_is_data == false && m_is_overlayed == false){ + gains[plane] = m_gain_mc[plane] ; + } if (m_is_data == true || m_is_overlayed == true){ + gains[plane] = m_gain_data[plane] ; + } + } + + + int i_shr=0; + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + std::vector> hitz = pfParticleToHitMap[pfp]; + + if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; + + if(kalmanTrackToCaloMap.count(kalman)==0){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; + + if(calo.size()!=3){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; + if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? + + std::vector t_dEdx; //in XX cm only (4 for now) + std::vector t_res; + + + for(size_t ix=0; ixResidualRange().size(); ++ix){ + + double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; + if(rr <= res_range_lim){ + // Guanqun: why is here a gains[plane], it's not converting ADC to E? + t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); + //t_dQdx.push_back(*calo[p]->dQdx()[x]); + t_res.push_back(rr); + } + } + /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); + if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); + + switch(plane){ + case 0: + m_reco_shower_kalman_mean_dEdx_plane0[i_shr] = tmean ; + m_reco_shower_kalman_median_dEdx_plane0[i_shr] = tmedian ; + break; + case 1: + m_reco_shower_kalman_mean_dEdx_plane1[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane1[i_shr] = tmedian; + break; + case 2: + m_reco_shower_kalman_mean_dEdx_plane2[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane2[i_shr] = tmedian; + break; + default: + break; + } + + + const std::vector< anab::Point_t > kal_pts = calo[p]->XYZ(); + double circle = 1.0;//in cm + std::vector pts_within; + std::vector pts_x; + + for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); + + double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); + double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); + + //loop over all hits + for(auto &hit: hitz){ + if(plane != hit->View())continue; + double this_w = (double)hit->WireID().Wire; + double this_t = (double)hit->PeakTime(); + double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); + if(dist<=circle) pts_within.back()++; + } + //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ + TCanvas *c = new TCanvas(); + c->cd(); + + TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); + g->SetLineColor(kRed); + g->SetLineWidth(2); + g->Draw("alp"); + g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); + c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); + } + } + + + // some kalman averaging + double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; + double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; + double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; + double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); + double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); + double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); + + double thresh = 0.01; + + if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ + tmp_kal_2 = 0; + wei_2 = 0.0; + } + if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ + tmp_kal_1 = 0; + wei_1 = 0.0; + } + if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ + tmp_kal_0 = 0; + wei_0 = 0.0; + } + double kal_norm = wei_0+wei_1+wei_2; + + if(kal_norm!=0.0){ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); + }else{ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; + } + + + + + + + i_shr++; + } + return; + } + + + //----------------------------------------------------------------------------------------------------------------------------------------- + void SinglePhoton::RecoMCShowers(const std::vector>& showers, + std::map, art::Ptr> & showerToPFParticleMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector + ){ + //OBSOLETE OBSOLETE + + + if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; + m_sim_shower_matched[i_shr] = 0; + if(showerToMCParticleMap.count(shower) > 0){ + + + + const art::Ptr mcparticle = showerToMCParticleMap[shower]; + const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; + + std::vector corrected(3); + this->spacecharge_correction(mcparticle, corrected); + m_sim_shower_matched[i_shr] = 1; + m_sim_shower_energy[i_shr] = mcparticle->E(); + m_sim_shower_mass[i_shr] = mcparticle->Mass(); + m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); + m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); + m_sim_shower_process[i_shr] = mcparticle->Process(); + m_sim_shower_start_x[i_shr] = corrected[0]; + m_sim_shower_start_y[i_shr] = corrected[1]; + m_sim_shower_start_z[i_shr] =corrected[2]; + + m_sim_shower_origin[i_shr] = mctruth->Origin(); + //so this might be broken still due to mcparticle. must chcek + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_shower_parent_pdg[i_shr] = -999; + }else{ + m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + //OK is this photon matched to a delta? + + /* + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ + + nth_mother = crap_map[nth_mother->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]< &shower) + { + + } + + double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ + double energy = 0.; + + //for each hit in the shower + for (auto &thishitptr : hits){ + //check the plane + int plane= thishitptr->View(); + + //skip invalid planes + if (plane != this_plane ) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy += E; + }//for each hit + + return energy; + + } + + double SinglePhoton::CalcEShower(const std::vector> &hits){ + double energy[3] = {0., 0., 0.}; + + //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); + + //skip invalid planes + if (plane > 2 || plane < 0) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy[plane] += E; + }//for each hiti + + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; + } + } + // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ + double gain; + //choose gain based on whether data/mc and by plane + if (m_is_data == false && m_is_overlayed == false){ + gain = m_gain_mc[plane] ; + //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; + return Q; + } + + double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ + return QtoEConversion(GetQHit(thishitptr, plane)); + + } + + double SinglePhoton::QtoEConversion(double Q){ + //return the energy value converted to MeV (the factor of 1e-6) + double E = Q* m_work_function *1e-6 /m_recombination_factor; + return E; + + } + + + std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ + int n = dqdx.size(); + std::vector dedx(n,0.0); + for (int i = 0; i < n; i++){ + //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane){ + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; + + //get the 3D shower direction + //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented + TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); + + //calculate the pitch for this plane + double pitch = getPitch(shower_dir, plane); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ + //keep only clusters on the plane + if(thiscluster->View() != plane) continue; + + //calculate the cluster direction + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + + //get the cluster start and and in CM + //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {0};//CHECK {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; + std::vector cluster_end = {0};//CHECK{thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; + + //check that the cluster has non-zero length + double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + //resizes the branches that are filled for every slice int the event + void SinglePhoton::ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size); + m_reco_slice_num_pfps.resize(size); + m_reco_slice_num_showers.resize(size); + m_reco_slice_num_tracks.resize(size); + + } + + /* + //resize the branches that are filled for matched track and shower objects + void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ + m_reco_slice_shower_matched_sliceId.resize(size_shower); + m_reco_slice_track_matched_sliceId.resize( size_track); + m_reco_slice_shower_matched_energy.resize(size_shower); + m_reco_slice_track_matched_energy.resize( size_track); + m_reco_slice_shower_matched_conversion.resize(size_shower); + m_reco_slice_shower_matched_overlay_frac.resize(size_shower); + + } + */ + + + void SinglePhoton::CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + + } + + /* + void SinglePhoton::CreateMatchedSliceBranches(){ + vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); + vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); + vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); + vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); + vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); + vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); + } + */ + + //called once per event to get all the slice info + //fills a map between the neutrino score for the slice and the primary reco PFP + //loops over all PFP's to find the primary and then associate to a slice + void SinglePhoton::AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> &primaryPFPSliceIdVec, + std::map &sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap){ + + + //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index + // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score + std::vector> clearCosmicPFP; + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + + std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event + std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event + //std::vector> primary_pfps; //store the primary PFP for each slice + // sliceIdToPFPMap.clear(); //clear between events + + /* + * Grabbed this info from Giuseppe: + * Here's the structure of these Metadata + * Primary PfParticles are either + * 1) IsClearCosmic = 1 (for unambiguous cosmics) + * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) + * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) + * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: + * 4) TrackScore = 0.671488 + * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata + */ + + + //for all PFP metadata in the event + for (auto pair: pfParticleToMetadataMap){ + std::vector> metadatalist= pair.second; //get the metadata + art::Ptr pfp = pair.first; //get the corresponding PFP + + //will be empty in circumstances outlined above, not every PFP has stored metadata + if (!metadatalist.empty()){ + + //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ + + //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); + + //get the metadata properties + std::map propertiesmap = data->GetPropertiesMap(); + //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; + PFPToTrackScoreMap[pfp] = it.second; + } + + }//for each item in properties map + + //if there is a neutrino score it's the primary PFP, so save the score+slice info + if(temp_score != -1.0){ + primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); + //primaryToSliceIdMap[pfp] = temp_ind; + sliceIdToNuScoreMap[temp_ind] = temp_score; + if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()< 0){ + //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + //for all pfp's in the event + //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; + + //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ + for(auto item: pfParticleMap){ + art::Ptr start_pfp = item.second; + //no longer skipping pfp's that are clear cosmics + //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); + //if(iter != clearCosmicPFP.end()) continue; + + // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; + art::Ptr parent_pfp ; + + //if this is a primary particle, skip next part + if(!this_pfp->IsPrimary()){ + parent_pfp = pfParticleMap[this_pfp->Parent()]; + //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ + // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; + this_pfp = parent_pfp; + }//while not primary, iterate up chain + } else{ + parent_pfp = start_pfp; + } + + //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); + m_reco_slice_nuscore = nuscore_slices; + /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); + // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); + m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice + m_reco_slice_num_showers; //the subset of PFP's that are showers + m_reco_slice_num_tracks; + + */ + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; + //for(auto item: allPFPSliceIdVec){ + //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); + // } + } + + // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ + std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); + //return sliceIdToNumPFPsvec; + + //std::cout<<"starting to look at the PFP's per slice"<Self()<<" in slice "< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); + + /* + int max_pfp = -1; + for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { + int this_pfp = it->first->Self(); + if (this_pfp> max_pfp) { + max_pfp = this_pfp; + } + + } + std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; + + //check if this is a valid PFP + //if (pfp->self() > PFPToSliceIdMap.size()){ + // std::cout<<"ERROR, this pfp is out of bounds " + + // } + + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< pfp = pair.second; + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ + std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap){ + + std::vector matched_reco_slice_shower_overlay_fraction; + std::vector> matched_reco_slice_shower_MCP; + //std::vector matched_reco_slice_track_matched; + std::vector> matched_reco_slice_track_MCP; + + + //first check if in the event there's a match to a given signal + if(signal_def == "ncdelta"){ + //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; + // std::cout<<"found sim photon shower with track ID "< 0){ + //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); + matched_reco_slice_shower_MCP.push_back(mcp); + + //save the overlay fraction and whether it's matched + matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); + //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; + + if (m_sim_track_matched[k] > 0){ + if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ + + matched_reco_slice_track_MCP.push_back(mcp); + + // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ + //get the recob shower + art::Ptr this_shr; + for(auto pair: showerToMCParticleMap){ + if (pair.second == mcp){ + this_shr = pair.first; + } + } + art::Ptr this_pfp; + if(!this_shr.isNull()){ + this_pfp = showerToPFParticleMap[this_shr]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ + //get the recob track + art::Ptr this_trk; + for(auto pair: trackToMCParticleMap){ + if (pair.second == mcp){ + this_trk = pair.first; + } + } + art::Ptr this_pfp; + if(!this_trk.isNull()){ + this_pfp = trackToNuPFParticleMap[this_trk]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); + vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); + vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); + vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); + vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); + + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); + vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); + vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); + vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + vertex_tree->Branch("sim_track_px",&m_sim_track_px); + vertex_tree->Branch("sim_track_py",&m_sim_track_py); + vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); + vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); + vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); + vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); + vertex_tree->Branch("sim_track_length",&m_sim_track_length); + + vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + + + } + + + + + + + void SinglePhoton::AnalyzeTracks(const std::vector>& tracks, + std::map, art::Ptr> & trackToNuPFParticleMap, + std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int> &PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap){ + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); + + //const double adc2eU(5.1e-3); + //const double adc2eV(5.2e-3); + // const double adc2eW(5.4e-3); + + + // const double tau(theDetector->ElectronLifetime()); + + + //loop over each recob::Track + for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) + { + + const art::Ptr track = *iter; + const art::Ptr pfp = trackToNuPFParticleMap[track]; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; + const std::vector> trk_hits = pfParticleToHitsMap[pfp]; + + int m_trkid = track->ID(); + double m_length = track->Length(); + auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector + //first: direction of first point, second: direction of the end of track + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); + m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); + m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); + m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); + + m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); + + + m_reco_track_startx[i_trk]= track->Start().X(); + m_reco_track_starty[i_trk]= track->Start().Y(); + m_reco_track_startz[i_trk]= track->Start().Z(); + + m_reco_track_length[i_trk] =m_length; + m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); + m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); + m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + + m_reco_track_endx[i_trk] = track->End().X(); + m_reco_track_endy[i_trk]= track->End().Y(); + m_reco_track_endz[i_trk]= track->End().Z(); + + std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + + m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); + m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + + m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); + m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + + + m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); + m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + + std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + double max_dist_from_line = -9999999; + + m_reco_track_spacepoint_chi[i_trk] = 0.0; + //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; + principal->AddRow(&tmp_spacepoints[0]); + + // distance between track direction and spacepoint + double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); + if(dist> max_dist_from_line) max_dist_from_line = dist; + m_reco_track_spacepoint_chi[i_trk] += dist*dist; + } + m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + + principal->MakePrincipals(); + TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); + + m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + + delete principal; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<Self()<<" is: "<NumDaughters(); + if(m_reco_track_num_daughters[i_trk]>0){ + //currently just look at 1 daughter + m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); + } else{ + m_reco_track_trackscore[i_trk] = -999; + m_reco_track_pfparticle_pdg[i_trk] = -999; + } + + //A loop over the trajectory points + size_t const traj_size = track->CountValidPoints(); + m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + + for(unsigned int p = 0; p < traj_size; ++p) { + //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); + //recob::Track::Point_t const & pos = trajp.position; + //recob::Track::Vector_t const & mom = trajp.momentum; + + } + + + i_trk++; + + } // end of recob::Track loop + + //Lets sort and order the showers + m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); + m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, + std::map, art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector & vfrac + ){ + + + //if(m_is_verbose) + std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; + m_sim_track_matched[i_trk] = 0; + + if(trackToMCParticleMap.count(track)>0){ + + const art::Ptr mcparticle = trackToMCParticleMap[track]; + std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; + const art::Ptr pfp = trackToPFParticleMap[track]; + + std::vector correctedstart(3); + std::vector correctedend(3); + std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; + // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); + this->spacecharge_correction(mcparticle, correctedend, raw_End); + + //std::cout<<"the corrected end of this mcparticle is "<E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = correctedstart[0]; + m_sim_track_starty[i_trk] = correctedstart[1]; + m_sim_track_startz[i_trk] = correctedstart[2]; + + m_sim_track_endx[i_trk]= correctedend[0]; + m_sim_track_endy[i_trk]= correctedend[1]; + m_sim_track_endz[i_trk]= correctedend[2]; + + m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + + m_sim_track_px[i_trk]= mcparticle->Px(); + m_sim_track_py[i_trk]= mcparticle->Py(); + m_sim_track_pz[i_trk]= mcparticle->Pz(); + + + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + + m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; + + + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + + + } + i_trk++; + } + + return; + } + + + + + + void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::map,std::vector> > &trackToCaloMap) + { + + if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; + + if(trackToCaloMap[track].size()!=3){ + std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; + const art::Ptr calo_p1 = trackToCaloMap[track][1]; + const art::Ptr calo_p2 = trackToCaloMap[track][2]; + + + size_t calo_length_p0 = calo_p0->dEdx().size(); + size_t calo_length_p1 = calo_p1->dEdx().size(); + size_t calo_length_p2 = calo_p2->dEdx().size(); + + TruncMean tm_p0; + TruncMean tm_p1; + TruncMean tm_p2; + + std::vector trunc_dEdx_p0; + std::vector res_range_good_p0; + std::vector dEdx_good_p0; + + std::vector trunc_dEdx_p1; + std::vector res_range_good_p1; + std::vector dEdx_good_p1; + + std::vector trunc_dEdx_p2; + std::vector res_range_good_p2; + std::vector dEdx_good_p2; + + m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + + m_reco_track_best_calo_plane[i_trk]=-1; + + // guanqun: vectors have been clear and resized, so probably not need to reset their values? + m_reco_track_good_calo_p0[i_trk] = 0; + m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + m_reco_track_good_calo_p1[i_trk] = 0; + m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + m_reco_track_good_calo_p2[i_trk] = 0; + m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + + + + //First off look over ALL points + //--------------------------------- plane 0 ----------- Induction + for (size_t k = 0; k < calo_length_p0; ++k) { + double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track + double dEdx = calo_p0->dEdx()[k]; + + m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + if(k <= calo_length_p0/2){ + m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; // != has higher precedence than = + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ + res_range_good_p0.push_back(res_range); + dEdx_good_p0.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p0.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p0.setRadius(rad); + tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ + double dEdx = trunc_dEdx_p0[k]; + m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + if(k <= trunc_dEdx_p0.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p1->dEdx()[k]; + + m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + if(k <= calo_length_p1/2){ + m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ + res_range_good_p1.push_back(res_range); + dEdx_good_p1.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p1.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p1.setRadius(rad); + tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ + double dEdx = trunc_dEdx_p1[k]; + m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + if(k <= trunc_dEdx_p1.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p2->dEdx()[k]; + + m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + if(k <= calo_length_p2/2){ + m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ + res_range_good_p2.push_back(res_range); + dEdx_good_p2.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p2.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p2.setRadius(rad); + tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ + double dEdx = trunc_dEdx_p2[k]; + m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + if(k <= trunc_dEdx_p2.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ + m_reco_track_best_calo_plane[i_trk] = 0; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; + + + }else if(m_reco_track_good_calo_p1[i_trk]!=0){ + m_reco_track_best_calo_plane[i_trk] = 1; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + + + + }else{ + m_reco_track_best_calo_plane[i_trk] = -1; + } + + + } + } + + + + void SinglePhoton::CollectPID( std::vector> & tracks, + std::map< art::Ptr, art::Ptr> & trackToPIDMap){ + + for(size_t i_trk=0; i_trk track = tracks[i_trk]; + art::Ptr pid = trackToPIDMap[track]; + if (!pid) { + std::cout << "[analyze_Tracks] bad PID object" << std::endl; + continue; + } + + // For each PID object, create vector of PID scores for each algorithm + // Loop over this and get scores for algorithm of choice + // But first, prepare garbage values, just in case + std::vector AlgScoresVec = pid->ParticleIDAlgScores(); + double pidScore_BL_mu_plane0 = -999; + double pidScore_BL_mu_plane1 = -999; + double pidScore_BL_mu_plane2 = -999; + double pidScore_BL_p_plane0 = -999; + double pidScore_BL_p_plane1 = -999; + double pidScore_BL_p_plane2 = -999; + double pidScore_BL_mip_plane0 = -999; + double pidScore_BL_mip_plane1 = -999; + double pidScore_BL_mip_plane2 = -999; + double pidScore_PIDA_plane0 = -999; + double pidScore_PIDA_plane1 = -999; + double pidScore_PIDA_plane2 = -999; + double pidScore_chi2_mu_plane0 = -999; + double pidScore_chi2_mu_plane1 = -999; + double pidScore_chi2_mu_plane2 = -999; + double pidScore_chi2_p_plane0 = -999; + double pidScore_chi2_p_plane1 = -999; + double pidScore_chi2_p_plane2 = -999; + double pidScore_three_plane_proton = -999; + + //int planeid = 2; + for (size_t i_algscore=0; i_algscore & vec){ + return isInTPCActive(0.0,vec); + } + + /* determine if point vec is inside TPC active volume, returns 1 - in TPC active, 0 - out of TPC active */ + int SinglePhoton::isInTPCActive(double cut,std::vector & vec){ + bool is_x = (vec[0] > m_tpc_active_x_low+cut && vec[0]< m_tpc_active_x_high-cut ); + bool is_y = (vec[1] > m_tpc_active_y_low+cut && vec[1]< m_tpc_active_y_high-cut); + bool is_z = (vec[2] > m_tpc_active_z_low+cut && vec[2]&vec){ + if(isInTPCActive(vec)==0) return -999; + double min_x = std::min( fabs(vec[0] - m_tpc_active_x_low) , fabs(vec[0] - m_tpc_active_x_high)); + double min_y = std::min( fabs(vec[1] - m_tpc_active_y_low) , fabs(vec[1] - m_tpc_active_y_high)); + double min_z = std::min( fabs(vec[2] - m_tpc_active_z_low) , fabs(vec[2] - m_tpc_active_z_high)); + + return ( (min_x& zpolygons){ + //TGeoManager *geom = new TGeoManager("save scb", "save scb"); + //cout << "size of " << zpolygons.size() << endl; + + //DEPRECIATED SHOULD NOT BE USED!!! + std::cout<<"ERROR ERROR ERROR DEPRECIATED DEPRECIATED. "<SetXY(ptX,ptY); + polyXY->FinishPolygon(); + zpolygons.push_back(polyXY); // Guanqun: not sure pushing pack pointers works as expect?? + } + + //cout << "size of " < & vec){ + return isInSCB(0.0,vec); + } + + int SinglePhoton::distToSCB(double & dist, std::vector &vec){ + //this one returns the distance to the boundary + bool ans = false; + double dist_yx = 999999; + + int iseg = 0; + if (!isInTPCActive(vec)){ + dist=-1; + return 0; // is it in active volume? + } + double cut = 0.0; + + TVector3 pt(&vec[0]); + + Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes + + Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); + polyXY->FinishPolygon(); + double testpt[2] = {pt.X(), pt.Y()}; + + //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; + + //polyXY->Draw(); + + Bool_t XY_contain = polyXY->Contains(testpt); + dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. + + if(0-116.5) y_idx = 0; //just the 0.5cm + if(y_idx<0 || y_idx>9) { + dist = -1; + delete polyXY; + return 0; + } + + Bool_t ZX_contain = false; + double arbit_out = 55555; + + double d_dist = -1; + + //upstream + if(z_idx==0){ + double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; + double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; + + TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); + polyXZ_Up->SetXY(ptX_Up,ptZ_Up); + polyXZ_Up->FinishPolygon(); + + double testpt_Up[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Up->Contains(testpt_Up); + d_dist = polyXZ_Up->Safety(testpt_Up,iseg); + delete polyXZ_Up; + + } + if (z_idx==10){ + double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; + double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; + + ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; + ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; + + TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); + polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); + polyXZ_Dw->FinishPolygon(); + + double testpt_Dw[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Dw->Contains(testpt_Dw); + d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); + delete polyXZ_Dw; + } + + delete polyXY; + + ans = XY_contain && ZX_contain; + ans ? dist = std::min(d_dist,min_y) : dist=-1; + + return (ans ? 1 : 0); + } + + + int SinglePhoton::isInSCB(double cut, std::vector &vec){ + + if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? + TVector3 pt(&vec[0]); + + Int_t z_idx = (Int_t)pt.Z()/100; + + Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); + polyXY->FinishPolygon(); + double testpt[2] = {pt.X(), pt.Y()}; + + //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; + + //polyXY->Draw(); + + Bool_t XY_contain = polyXY->Contains(testpt); + + if(0-116.5) y_idx = 0; //just the 0.5cm + + if(y_idx<0 || y_idx>9) { + delete polyXY; + return 0; + } + + Bool_t ZX_contain = false; + + if(z_idx==0){ + double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; + double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; + + TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); + polyXZ_Up->SetXY(ptX_Up,ptZ_Up); + polyXZ_Up->FinishPolygon(); + + double testpt_Up[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Up->Contains(testpt_Up); + delete polyXZ_Up; + } + + else if (z_idx==10){ + double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; + double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; + + ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; + ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; + + TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); + polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); + polyXZ_Dw->FinishPolygon(); + + double testpt_Dw[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Dw->Contains(testpt_Dw); + delete polyXZ_Dw; + } + + delete polyXY; + return (XY_contain && ZX_contain); + + } + +} diff --git a/sbncode/SinglePhotonAnalysis/helper_functions.h b/sbncode/SinglePhotonAnalysis/helper_functions.h new file mode 100644 index 000000000..b4d672cd3 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/helper_functions.h @@ -0,0 +1,174 @@ + +namespace single_photon +{ +//-----------------HELPER FUNCTIONS ----------- + //CHECK Copy from bad_channel_matching.h + ////line between x1 and x2, point x0; + double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + + return sqrt(d2); + + } + // minimum distance between point and dead wire + double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9 ){ + + double min_dist = 999999; + + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int channel = bad_channel_list_fixed_mcc9[i].first; + int is_ok = bad_channel_list_fixed_mcc9[i].second; + if(is_ok>1)continue; + + auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel + auto result = geom->WireEndPoints(wireids[0]); + + //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + std::vector end = {0.0,result.end().Y(),result.end().Z()}; + std::vector point = {0.0,Ypoint,Zpoint}; + double dist = dist_line_point(start,end,point); + min_dist = std::min(dist,min_dist); + } + + return min_dist; + + } + +//--------------- end of copying from bad_channel_matching.h + + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); + + } + + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; + + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + + } + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); + + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + } + + + + // sort indices in descending order + template + std::vector sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + // sort indices such that elements in v are in ascending order + template + std::vector sort_indexes_rev(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); + + return idx; + } + + + // check if two vectors have same elements (regardless of the order), and arrange their elements in order + template + bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + return v1 == v2; + } + + + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ + double time = 0;//CHECK detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + +//----------- END OF HELPER FUNCTIONS ----------- + + +} diff --git a/sbncode/SinglePhotonAnalysis/isolation.h b/sbncode/SinglePhotonAnalysis/isolation.h new file mode 100644 index 000000000..160b8db28 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/isolation.h @@ -0,0 +1,662 @@ +#include "SinglePhoton_module.h" +#include "TCanvas.h" +#include "TGraph.h" +#include "TFile.h" +#include "TAxis.h" +#include "TLine.h" +#include "TLatex.h" +#include "TLegend.h" +#include "TPrincipal.h" +#include "TVectorD.h" +#include "TMatrixD.h" +#include "TF1.h" +#include "TEllipse.h" + +#include "TH1.h" + +// override function of sorts for max_element function comparison +bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second < p2.second); +} + +// override function of sorts for min_element function comparison +bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second > p2.second); +} + +namespace single_photon{ + +void SinglePhoton::ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); +} + +void SinglePhoton::CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + +} + + +/* Arguments to Function IsolationStudy (all are const): + * 1. vector named tracks of art ptr to recob track + * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle + * 3. vector named showers of art ptr to recob showers + * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle + * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit + * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int + * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit +*/ +void SinglePhoton::IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) +{ + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector< art::Ptr > associated_hits; + std::vector< art::Ptr > unassociated_hits; + std::vector< art::Ptr > unassociated_hits_plane0; + std::vector< art::Ptr > unassociated_hits_plane1; + std::vector< art::Ptr > unassociated_hits_plane2; + + std::vector< std::map >> > v_newClusterToHitsMap(3); + +// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + std::vector> slicehits = sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = pfParticleToHitsMap.at(pfp); + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id != -999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id!=-999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ + std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); + + TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); + TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); + TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); + std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; + + +std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; +// saving wire and time coordinates + std::vector> pts_trk( tracks.size(), std::vector(3) ); + + art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); // peak time of track hits on 3 planes. + std::vector> t_vec_c(3); // wire number of track hits on 3 planes. + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + +std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; +std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; +std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + +std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance (in sh_dist) on each plane + std::vector< std::pair, double > > max_min_hit(3); + + art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + auto showerhits = pfParticleToHitsMap.at(pfp_s); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; //minimum distance between this shower hit and all track hits + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + + +//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower +std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; + + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); + + for(int plane = 0; plane < 3; plane++){ + minDist_tot[plane] = 999; + std::vector vec_t; + std::vector vec_c; + + for(auto &uh: unassociated_hits_all[plane]){ + + if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane + + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); + + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); + + if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } + + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; + + } // end looping unassociated_hits_all + + g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + } // end looping planes + + // place data into appropriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + } + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + } + + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + +/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ +/* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); +*/ + + delete histcan; + + +//PLOTTING NOW +//SET-UP + double plot_point_size = 0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + } + +// ******************************** DeadWireRegions ******************************************** + //plot dead wire + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + // std::cout<<"WIRE "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + l->SetLineColor(kGray+1); + l->Draw("same"); + } + } + + // plot track + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + // plot shower hits + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + // plot unassociated hits + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } + + + + +//******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + +// PLOTTING SHOWER? + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + +// PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"< +//#include + +namespace single_photon +{ + + //recoMCmatching but specifically for recob::showers + void SinglePhoton::showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap){ + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + if(reco_verbose) std::cout<<"Strting "< pfp = objectToPFParticleMap[object]; + + if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); + if (parentIterator == pfParticleIdMap.end()){ + std::cout<<"error: no parent but not primary"<second->PdgCode(); + std::cout<<"the parent pdg code is "<Daughters(); + //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; + // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); + //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + /** + * + * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower + * + **/ + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + + bool found_a_match = false; + + //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<View(); + + particle_vec.clear(); match_vec.clear(); //only store per hit + + //for the hit, fill the backtracker info + mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); + // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + + } // end loop over hits + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; // a vector of mother MCP + std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; // number of associated MCP that has mothers + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + //Guanqun: this line here doesn't really cosider other break cases than finding primary particle + if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + if(match->PdgCode()==22){ // if it's a gamma + std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; + this->spacecharge_correction(match, corrected_start, tmp ); + m_sim_shower_is_true_shower[i] = 1; + }else if(abs(match->PdgCode())==11){ // if it's e+/e- + this->spacecharge_correction(match, corrected_start); + m_sim_shower_is_true_shower[i] = 1; + }else{ + corrected_start = {-999,-999,-999}; + m_sim_shower_is_true_shower[i] = 0; + } + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + + if (match_mother.isNull()){ + m_sim_shower_parent_pdg[i] = -1; + m_sim_shower_parent_trackID[i] = -1; + + }else{ + m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + } + + + + m_sim_shower_matched[i] = 1; + m_sim_shower_energy[i] = match->E(); + m_sim_shower_mass[i] = match->Mass(); + m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + m_sim_shower_pdg[i] = match->PdgCode(); + m_sim_shower_trackID[i] = match->TrackId(); + m_sim_shower_process[i] = match->Process(); + m_sim_shower_end_process[i] = match->EndProcess(); + m_sim_shower_vertex_x[i] = corrected_vertex[0]; + m_sim_shower_vertex_y[i] = corrected_vertex[1]; + m_sim_shower_vertex_z[i] =corrected_vertex[2]; + + m_sim_shower_start_x[i] = corrected_start[0]; + m_sim_shower_start_y[i] = corrected_start[1]; + m_sim_shower_start_z[i] =corrected_start[2]; + + m_sim_shower_px[i] = match->Px(); + m_sim_shower_py[i] = match->Py(); + m_sim_shower_pz[i] = match->Pz(); + + // should've use 'best_mother_plane' here + m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; + + m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + + mcParticleVector.push_back(match); + objectToMCParticleMap[object] = mcParticleVector.back(); + + m_sim_shower_sliceId[i] = PFPToSliceIdMap[pfp]; + m_sim_shower_nuscore[i] = sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; + m_sim_shower_isclearcosmic[i] = PFPToClearCosmicMap[pfp]; + if (m_sim_shower_isclearcosmic[i]== false){ + std::cout<<"sim shower is matched to non-clear cosmic PFP "<Self()<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<> mother_contributing_MCP; //stores all the MCP's in the chain for all mothers-> this can probably be modified to only store ones which contribute to the reco shower + std::vector all_contributing_MCP; //all the MCP's in the chain for this mother + + //for each of the mother particles + for(auto pair: mother_MCP_map){ + all_contributing_MCP.clear(); + art::Ptr particle = pair.second;//get the mother MCP + all_contributing_MCP.push_back(pair.first);//save the MCP track id + int numDaughters = -1;//the number of daughters for the current generation + std::vector current_ids; //the track id's for the current generation + std::vector next_ids;//the track id's for the next generation (daughters of current generatiob) + + //std::cout<<"starting from mother particle at head of chain with pdg code "<PdgCode()<<" and track id "<NumberDaughters();//start with the number of daughters for the mother mother particle + + //std::cout<<"this particle has "<Daughter(i); //get the track id of the MCP + current_ids.push_back(id);//save the id to the list of the current generation + all_contributing_MCP.push_back(id);//save it to the list of all of the MCP's in the chain + } + + + //while there are more generations of daughter particles (not at the end of the chain) + while(numDaughters>0){ + //for each MCP in the current generation + for(int id:current_ids){ + //get the particle and check it's valid + art::Ptr particle = MCParticleToTrackIdMap[id]; + if (particle.isNull()) continue; + + //get the number of daughters + int n = particle->NumberDaughters(); + + //loop over the daughters + for (int i = 0; i < n; i++){ + int daughterId = particle->Daughter(i); + + //save daughters to list of all contributing mcps + all_contributing_MCP.push_back(daughterId); + + //add daughters to list for next gen + next_ids.push_back(daughterId); + + } + } + + numDaughters = current_ids.size(); //update the number of daughters in the next generation + + //std::cout<<"num daughters after this generation is "< count_vec(mother_contributing_MCP.size()); //stores the number of MCP's in the chain from each mother which match to the reco shower + std::vector energy_contributing_MCP(mother_contributing_MCP.size()); //the total energy of all the MCP's in the chain from the mother which contribute to the shower + //for each MCP from the chain of mother mother particle and daughters, check how much it overlaps with the MCP's that contribute to the shower + for (unsigned int i = 0; i< mother_contributing_MCP.size(); i++){ + std::vector mcp_vec = mother_contributing_MCP[i]; + int count = 0; + + std::cout<<"SinglePhoton::recoMC()\t||\t on mother_contributing_MCP: "<0){ + //check the total number of contributing MCP + std::cout<<"SinglePhoton::recoMC()\t||\t the number of MCP associated with the first mother mother particle that also deposit hits in the recob::shower is "< + std::vector recoMCmatching(std::vector& objectVector, + std::map>& objectToMCParticleMap, + std::map>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector){ + + std::vector trk_overlay_vec; + std::vector vec_fraction_matched; + bool reco_verbose = false; + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + bool found_a_match = false; + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; + found_a_match = true; + } + }//end loop over particles per hit + } + + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + trk_overlay_vec.push_back(fraction_num_hits_overlay); + if(n_associated_mcparticle_hits == 0){ + //This will only occur if the whole recob::PFParticle is associated with an overlay object + //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" + << " pdg=" << best_matched_mcparticle->PdgCode() + << " trkid=" << best_matched_mcparticle->TrackId() + << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; + } + + }//end vector loop. + //return vec_fraction_matched; + return trk_overlay_vec; + } + + + //Typenamed for simb::MCTrack and sim::MCShower + /* @brief: tranverse through mcParticleVector, for each mcParticle, if an mcObject is found with same track ID + * put the particle and object in the mcParticleToMCObjectMap as a pair + */ + template + void perfectRecoMatching( + std::vector>& mcParticleVector, + std::vector& mcObjectVector, + std::map,T>& mcParticleToMCObjectMap + ){ + + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); + std::cout<<"KRANK: "< particle = mcParticleVector[ip]; + int particle_trackID = particle->TrackId(); + + std::vector id_matches; + std::vector mother_id_matches; + std::vector ancestor_id_matches; + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + + if(object_trackID == particle_trackID ) id_matches.push_back(io); + if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); + if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); + } + + int num_id_matches=id_matches.size(); + int num_mother_id_matches=mother_id_matches.size(); + int num_ancestor_id_matches=ancestor_id_matches.size(); + + //So im not sure how this works but something like this + if(num_id_matches > 1){ + std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; + }else if(num_ancestor_id_matches == 1){ + //We have a mother match? I guess this is like Neutron->photon->e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; + }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ + std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector){ + + + for(auto &mcp: mcParticleVector){ + int pdg = mcp->PdgCode(); + std::string end_process = mcp->EndProcess(); + int status = mcp->StatusCode() ; + + + if(pdg==22){ + std::cout<<"PHOTO: "<>& mcParticleVector, const art::Event &evt){ + + std::map > crap_map; + for(size_t j=0;j< mcParticleVector.size();j++){ + const art::Ptr mcp = mcParticleVector[j]; +//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; +} +art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); +art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); + +std::vector> GenieMCTruth; +std::vector geninfo; + + + +for(size_t i=0; i< mcParticleVector.size();i++){ + + +art::Ptr nth_mother = mcParticleVector[i]; + +//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; + +std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother() != 0){ + +nth_mother = crap_map[nth_mother->Mother()]; +std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ +std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); +std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); + vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); + + + vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); + vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); + vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); + vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); + vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); + vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); + vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); + vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); + + vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); + vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); + vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); + vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); + vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); + vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); + vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); + vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); + + + vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); + vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); + vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); + vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); + vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); + vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); + + vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); + vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); + vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); + vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); + vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); + vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); + + vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); + vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); + vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); + vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); + vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); + vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + + } + + void SinglePhoton::CreateStubBranches(){ + + vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); + vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); + vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); + vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); + vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); + vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); + vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); + vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); + vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); + vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); + vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); + vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); + vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); + vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); + vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); + vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); + vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); + vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); + vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); + vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); + vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); + vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); + vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); + vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); + vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); + vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); + vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); + vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); + vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); + vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); + vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); + + + vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); + vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + + } + + + + void SinglePhoton::SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + + + + std::cout<<"ERROR! SecondShowerSearch has been made redundant by SEAview methodology. see SEAview/SEAview.h for details. This shouldnt be running at all"<> associated_hits; + std::vector> unassociated_hits; + std::vector> unassociated_hits_plane0; + std::vector> unassociated_hits_plane1; + std::vector> unassociated_hits_plane2; + + std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane + + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + int sliceid = pfParticleToSliceIDMap.at(pfp); + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto trackhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"SinglePhoton::SSS\t||\ttrack "< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + int sliceid = pfParticleToSliceIDMap.at(pfp); + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ + std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ + + //TFile *f = new TFile("t.root","recreate"); + //f->cd(); + + std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); + can->Divide(4,3,0,0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr pfp = showerToPFParticleMap.at(showers[s]); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: showerhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + //vec_c[(int)h->View()].push_back((double)h->Channel()); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_shr[s] = t_pts; + } + + + std::vector> pts_trk( tracks.size(), std::vector(3) ); + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); + auto trackhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: trackhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_trk[t] = t_pts; + } + //Now the "Unassociated Hits" + + std::vector g_unass(3); + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + for(int i=0; i<3; i++){ + + std::vector vec_t; + std::vector vec_c; + + for(auto &h: unassociated_hits_all[i]){ + + double wire = (double)h->WireID().Wire; + vec_c.push_back(wire); + vec_t.push_back((double)h->PeakTime()); + + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //for reclustering + std::vector pt = {wire,vec_t.back()}; + pts_to_recluster[(int)h->View()].push_back(pt); + mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; + } + + g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + + + } + //Plotting now + double plot_point_size=0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + can->cd(i+5); + g_vertex[i]->Draw("ap"); + + can->cd(i+9); + g_vertex[i]->Draw("ap"); + + + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + //std::cout<<"KNK: "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); + l->SetLineColor(kGray+1); + l->Draw("same"); + can->cd(thisp+5); + l->Draw("same"); + can->cd(thisp+9); + l->Draw("same"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + for(int i=0; i<3; i++){ + can->cd(i+1); + + if(g_unass[i]->GetN()>0){ + g_unass[i]->Draw("p same"); + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + can->cd(i+5); + g_vertex[i]->Draw("p same"); + can->cd(i+9); + g_vertex[i]->Draw("p same"); + + double rad_cm = 12.0; + TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); + ell_p->SetLineColor(kRed); + ell_p->SetFillStyle(0); + ell_p->Draw("same"); + + } + + + + + + + //*****************************DBSCAN*********************************** + //CHECK +// int min_pts = m_SEAviewDbscanMinPts; +// double eps = m_SEAviewDbscanEps; +// std::vector num_clusters(3,0); +// +// std::vector> g_clusters(3); +// std::vector> cluster_labels(3); +// +// +// std::vector vec_clusters; +// +// for(int i=0; i<3; i++){ +// +// std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; +// std::vector> hitz; +// for(size_t p=0; p< pts_to_recluster[i].size(); p++){ +// if(cluster_labels[i][p] == 0) continue;//noise +// if(cluster_labels[i][p] == c){ +// +// pts.push_back(pts_to_recluster[i][p]); +// hitz.push_back(mapPointIndexToHit[i].at(p)); +// } +// +// } +// if(hitz.size()!=0){ +// vec_clusters.emplace_back(c,i,pts,hitz); +// std::cout<<"SinglePhoton::SSS\t||\t Cluster "< h = mapPointIndexToHit[i].at(p);// Get the hit +// size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise +// +// //std::cout<> t_hs= {h}; +// v_newClusterToHitsMap[i][cluster_label] = t_hs; +// }else{ +// v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list +// } +// } +// } +// +// +// //for(size_t i=0; i<3; i++){ +// // for(int c=0; c cluster_colors(max_n_clusters,0); +// std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; +// +// for(int j=0; j< max_n_clusters; j++){ +// int b = (int)rangen->Uniform(0,11); +// int mod = (int)rangen->Uniform(-10,+3); +// +// cluster_colors[j] = base_col[b]+mod; +// } +// int c_offset = 0; +// +// //Step next, loop over and make plots again +// for(int i=0; i<3; i++){ +// std::vector> vec_time(num_clusters[i]+1); +// std::vector> vec_wire(num_clusters[i]+1); +// std::vector tmp_g_clusters(num_clusters[i]+1); +// +// if(cluster_labels[i].size() != pts_to_recluster[i].size()){ +// std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; +// tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); +// can->cd(i+5); +// if( +// tmp_g_clusters[c]->GetN()>0){ +// tmp_g_clusters[c]->Draw("p same"); +// tmp_g_clusters[c]->SetMarkerColor(tcol); +// tmp_g_clusters[c]->SetFillColor(tcol); +// tmp_g_clusters[c]->SetMarkerStyle(20); +// tmp_g_clusters[c]->SetMarkerSize(plot_point_size); +// } +// } +// g_clusters[i] = tmp_g_clusters; +// c_offset += num_clusters[i]; +// } + + //******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + //Clusters + + /* if(m_is_data==false){ + for(auto &c: vec_clusters){ + //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); + //c.setSSScore(ssscor); + + int thisid = m_sim_shower_trackID[0]; + + for(auto &h: c.getHits()){ + + + } + } + } + */ + +//CHECK +// can->cd(8); +// for(int i=0; i<3; i++){ +// TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); +// +// TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); +// +// for(int c=0; c< num_clusters[i]+1; c++){ +// if(c==0)continue; +// +// int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); +// auto hitz = v_newClusterToHitsMap[i][c]; +// auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); +// int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); +// +// double mean_summed_ADC = 0.0; +// for(auto &h:hitz){ +// mean_summed_ADC +=h->SummedADC(); +// } +// mean_summed_ADC = mean_summed_ADC/(double)num_hits_in_cluster; +// +// +// +// // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); +// +// std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; +// l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); +// +// //Here we will only plot those that pass in bottom: +// //We are also going to put a hard threshold of 70cm? +// // +// if(ssscorz.pass && is_in_shower ==-1 ){ +// can->cd(i+9); +// if(g_clusters[i][c]->GetN()>0){ +// TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); +// +// int Npts =m_SEAviewMaxPtsLinFit; +// TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); +// +// core->Draw("p same"); +// tmp->Draw("p same"); +// +// double fmax = -999; +// double fmin = 99999; +// for(int b=0; bGetN(); b++){ +// double ttx=0; +// double tty=0; +// core->GetPoint(b,ttx,tty); +// fmax = std::max(fmax, ttx); +// fmin = std::min(fmin,ttx); +// } +// +//// std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); +// core->GetFunction("pol1")->SetLineWidth(1); +// core->GetFunction("pol1")->SetLineStyle(3); +// core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); +// con = core->GetFunction("pol1")->GetParameter(0); +// slope = core->GetFunction("pol1")->GetParameter(1); +// } +// //lets map (wire,tick) to a rudamentary (cm,cm); +// //double slope2 = slope*25*0.3; +// //double con2 = con*25; +// +// double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); +// +// //rudimentary! +// for(double k=chan_min[i]; k< chan_max[i];k++){ +// double y = slope*k+con; +// double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); +// impact_parameter = std::min(impact_parameter,dist); +// } +// +// //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower +// //vertex_wire[i] vertex_tick[i] (already calcuated) +// //cluster closest point )ssscorz.close_wire and close_tick +// //recob::Shower start point, convered to wire tick. +// +// double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); +// double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); +// +// std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; +// std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; +// double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); +// double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); +// double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); +// //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); +// m_sss_candidate_angle_to_shower.push_back(kinda_angle); +// +// +// if(m_is_data){ +// m_sss_candidate_matched.push_back(-1); +// m_sss_candidate_pdg.push_back(-1); +// m_sss_candidate_parent_pdg.push_back(-1); +// m_sss_candidate_trackid.push_back(-1); +// m_sss_candidate_overlay_fraction.push_back(-1); +// m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); +// }else{ +// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); +// m_sss_candidate_matched.push_back(ssmatched[0]); +// m_sss_candidate_pdg.push_back(ssmatched[1]); +// m_sss_candidate_parent_pdg.push_back(ssmatched[2]); +// m_sss_candidate_trackid.push_back(ssmatched[3]); +// m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); +// m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[5]); +// } +// +// +// std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; +// l_bot2->AddEntry(tmp,sname2.c_str(),"f"); +// } +// } +// +// } +// +// //Some time matching +// +// +// //Closest neightor +// for(int l=0; l< m_sss_num_candidates; l++){ +// int this_p = m_sss_candidate_plane[l]; +// double close = 1e10; +// for(int m=0; m< m_sss_num_candidates;m++){ +// if(this_p == m_sss_candidate_plane[m]) continue; +// double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); +// close = std::min(dup,close); +// } +// m_sss_candidate_closest_neighbour.push_back(close); +// } +// +// for(int l=0; l< m_sss_num_candidates; l++){ +// +// std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; +// +// +// //double score = sssVetov1->GetMvaValue(thisvars); +// double score = -1; +// m_sss_candidate_veto_score.push_back(score); +// +// } +// +// +// can->cd(8); +// l_bot->SetLineWidth(0); +// l_bot->SetLineColor(kWhite); +// l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); +// l_bot->Draw("same"); +// +// can->cd(12); +// l_bot2->SetLineWidth(0); +// l_bot2->SetLineColor(kWhite); +// l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); +// l_bot2->Draw("same"); +// +// +// +// +// +// +// +// +// } + //********** Some Error Checking ********************// + + /*for(int i=0; i<3; i++){ + + std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); + //can->Write(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + //f->Close(); + std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; // wire of all hits + std::vectorall_tick; + std::vectorall_dist; // distance to vertex of all hits + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + sss_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + // this can be moved to inclass initializer + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + //requires that hit in hits has to be on the same plane as vertex_wire. + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + + double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + std::vectorSinglePhoton::SecondShowerMatching( + std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr> & MCParticleToTrackIdMap + ){ + + + std::vector ans; //matched,pdg,parentpdg,trkid + + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + bool found_a_match = false; + + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < hitz.size(); ++i_h){ + int which_plane = (int)hitz[i_h]->View(); + particle_vec.clear(); match_vec.clear(); //only store per hit + //for the hit, fill the backtracker info + mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); + + //if there is an MCParticle associated to this hit + if(particle_vec.size()>0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + } // end loop over hit + if(found_a_match){ + std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP + + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; + } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; + } + + + num_bt_mothers++; + } else{ + if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + int par_pdg = -1; + if (match_mother.isNull()){ + par_pdg = -1; + + }else{ + par_pdg = match_mother->PdgCode(); + } + + ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; + + return ans; + }//end sss matching; + + + + + + + //************************************************ Shower Search Slice Second SSS3D ********** / + + void SinglePhoton::ClearSecondShowers3D(){ + + m_sss3d_num_showers = 0; + m_sss3d_shower_start_x.clear(); + m_sss3d_shower_start_y.clear(); + m_sss3d_shower_start_z.clear(); + m_sss3d_shower_dir_x.clear(); + m_sss3d_shower_dir_y.clear(); + m_sss3d_shower_dir_z.clear(); + m_sss3d_shower_length.clear(); + m_sss3d_shower_conversion_dist.clear(); + m_sss3d_shower_invariant_mass.clear(); + m_sss3d_shower_implied_invariant_mass.clear(); + m_sss3d_shower_impact_parameter.clear(); + m_sss3d_shower_energy_max.clear(); + m_sss3d_shower_score.clear(); + m_sss3d_slice_nu.clear(); + m_sss3d_slice_clear_cosmic.clear(); + m_sss3d_shower_ioc_ratio.clear(); + } + + + void SinglePhoton::CreateSecondShowerBranches3D(){ + vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); + + vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); + vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); + vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); + vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); + vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); + vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); + + vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); + vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); + vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); + vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); + vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); + vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); + vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); + vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); + //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); + //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + } + + + void SinglePhoton::SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ + + std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" + double max_conv_dist = 80.0; + + art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); + std::vector> allShowerVector; + art::fill_ptr_vector(allShowerVector,allShowerHandle); + std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, std::vector> > showerToHitsMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); + } + + art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, art::Ptr > showerToPFParticleMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); + } + + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); + std::vector> allPFParticleVector; + art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); + + //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); + //pfPartToMetadataAssoc.at(pfp.key()); + + size_t n_all_shr = allShowerVector.size(); + m_sss3d_num_showers = (int)n_all_shr-showers.size(); + + if(showers.size()==0) return; + + auto primary_shower = showers.front(); + + std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); + if(dist>max_conv_dist) continue; + + auto pfp = showerToPFParticleMap[shr]; + //for(auto &prr: allPFParticleVector){ + // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; + + /* + std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + + for (auto it:propertiesmap ){ + std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); + //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); + //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"<CalcEShower(showerToHitsMap[shr]); + double invar = implied_invar_mass(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, primary_shower, m_reco_shower_energy_max[0], shr, senergy); + double implied_invar = invar_mass(primary_shower, m_reco_shower_energy_max[0], shr, senergy) ; + double shr_score = 0.0; //need pfp and metadata to get score, and might give slice! (This will be harder..) but on reflection, kinda important. PCA spread might be a good rplacement. + int is_clear_cosmic_slice = 0 ; + int is_nu_slice = 0; + + + m_sss3d_shower_start_x.push_back(shr->ShowerStart().X()); + m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); + m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); + m_sss3d_shower_dir_x.push_back(shr->Direction().X()); + m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); + m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); + m_sss3d_shower_length.push_back(shr->Length()); + m_sss3d_shower_conversion_dist.push_back(dist); + m_sss3d_shower_invariant_mass.push_back(invar); + m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); + double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); + m_sss3d_shower_impact_parameter.push_back(imp); + + if(dist!=0) { + m_sss3d_shower_ioc_ratio.push_back(imp/dist); + }else{ + m_sss3d_shower_ioc_ratio.push_back(0); + + } + m_sss3d_shower_energy_max.push_back(senergy);// + m_sss3d_shower_score.push_back(shr_score); + m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); + m_sss3d_slice_nu.push_back(is_nu_slice); + } + + return; + } + + + + void SinglePhoton::SimpleSecondShowerCluster(){ + + std::string base = "sss3d_"; + std::vector mod = {"ioc_ranked","invar_ranked"}; + + m_sss3d_ioc_ranked_en = -9; + m_sss3d_ioc_ranked_conv = -9; + m_sss3d_ioc_ranked_invar = -9; + m_sss3d_ioc_ranked_implied_invar = -9; + m_sss3d_ioc_ranked_ioc = -9; + m_sss3d_ioc_ranked_opang = -9; + m_sss3d_ioc_ranked_implied_opang = -9; + m_sss3d_ioc_ranked_id = -9; + + m_sss3d_invar_ranked_en = -9; + m_sss3d_invar_ranked_conv = -9; + m_sss3d_invar_ranked_invar = -9; + m_sss3d_invar_ranked_implied_invar = -9; + m_sss3d_invar_ranked_ioc = -9; + m_sss3d_invar_ranked_opang = -9; + m_sss3d_invar_ranked_implied_opang = -9; + m_sss3d_invar_ranked_id = -9; + + + std::string base2d = "sss_"; + std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; + + m_sss2d_ioc_ranked_en = -9; + m_sss2d_ioc_ranked_conv = -9; + m_sss2d_ioc_ranked_ioc = -9; + m_sss2d_ioc_ranked_pca = -9; + m_sss2d_ioc_ranked_invar = -9; + m_sss2d_ioc_ranked_angle_to_shower = -9; + m_sss2d_ioc_ranked_num_planes = -9; + + m_sss2d_conv_ranked_en = -9; + m_sss2d_conv_ranked_conv = -9; + m_sss2d_conv_ranked_ioc = -9; + m_sss2d_conv_ranked_pca = -9; + m_sss2d_conv_ranked_invar = -9; + m_sss2d_conv_ranked_angle_to_shower = -9; + m_sss2d_conv_ranked_num_planes = -9; + + m_sss2d_invar_ranked_en = -9; + m_sss2d_invar_ranked_conv = -9; + m_sss2d_invar_ranked_ioc = -9; + m_sss2d_invar_ranked_pca = -9; + m_sss2d_invar_ranked_invar = -9; + m_sss2d_invar_ranked_angle_to_shower = -9; + m_sss2d_invar_ranked_num_planes = -9; + + //--------------------------------------- + //First off, the 3D showers + //First some 3D shower information + if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ + //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; + for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); + + std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); + std::vector ranked_invar = sort_indexes_rev((inv)); + std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); + std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); + + int to_consider = m_sss3d_shower_conversion_dist.size(); + + if(false){ + std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ + //std::cout<<"2D clusters: "< nplans(3,0); + std::vector> indexmap(3); + + + for(int i=0; i< m_sss_num_candidates; i++){ + //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; + + for(int i=0; i< m_sss_num_candidates; i++){ + int ip = m_sss_candidate_plane.at(i); + //int nhits = sss_candidate_num_hits.at(i); + nplans[ip]++; + indexmap[ip].push_back(i); + + //Two passes to build up all "Candidates" for 2 and 3 plane matches + for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; + if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; + // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + + //If this matches well with Either last candidate, include as a possibility + if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ + uniq_candidates[i].push_back(k); + } + + } + } + } + //Check which candidates have been used where + std::vector used_candidates(m_sss_num_candidates); + for(int i = 0; i< (int)uniq_candidates.size(); i++){ + for(auto &j: uniq_candidates[i]){ + used_candidates[j]++; + } + } + + //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own + for(int i = 0; i< (int)used_candidates.size(); i++){ + if(used_candidates[i]==0) uniq_candidates.push_back({i}); + } + + //Now lets delete any permutations + std::vector> uniq_candidates2; + uniq_candidates2.push_back(uniq_candidates.front()); + + for(int i = 1; i< (int)uniq_candidates.size(); i++){ + + bool perm = false; + for(int j = 0; j< (int)uniq_candidates2.size(); j++){ + perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); + if(perm) break; + } + if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); + } + + //Printing candidates (After perm check) + std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); + std::vector candidates_en(uniq_candidates2.size(),0); + std::vector candidates_ioc(uniq_candidates2.size(),0); + std::vector candidates_conv(uniq_candidates2.size(),0); + std::vector candidates_pca(uniq_candidates2.size(),0); + std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); + std::vector candidates_num_planes(uniq_candidates2.size(),0); + std::vector candidates_eff_invar(uniq_candidates2.size(),0); + std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); + + //rank by min_impat/max_min_dist and select + //rank by Energy energy + + for(int j=0; j<(int)uniq_candidates2.size();j++){ + int nt=uniq_candidates2[j].size(); + //std::cout<<"Candidate #: "< is_in_slice; + + for(int c=0; c< nt;++c){ + int ic = uniq_candidates2[j][c]; + + //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); + std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); + std::vector ranked_conv = sort_indexes_rev(candidates_conv); + + std::cout<<"========== Ranking ======== "<> SinglePhoton::clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + + size_t size = candidate_indices.size(); + if(size == 0){ + throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); + } + + // at most 3 cluster indices (for 3 planes) + std::vector planes; + std::vector max_ticks; + std::vector min_ticks; + std::vector tick_length; + + for(auto i : candidate_indices){ + planes.push_back(cluster_planes[i]); + + max_ticks.push_back(cluster_max_ticks[i]); + min_ticks.push_back(cluster_min_ticks[i]); + tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); + } + + + //if candidates are not on different planes + if( size == 2 && planes[0] == planes[1]) + return {false, std::vector(2, -1.0)}; + if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) + return {false, std::vector(3, -1.0)}; + + //calculate the overlapping tick-span + double tick_overlap = DBL_MAX; + + //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction + for(auto max_e : max_ticks) + for(auto min_e : min_ticks) + if(max_e - min_e < tick_overlap) + tick_overlap = max_e - min_e; + + // if tick overlap is negative, meaning these clusters are not overlapping + if(tick_overlap < 0) + return {false, std::vector(size, -1.0)}; + else{ + std::vector overlap_fraction; + for(auto l: tick_length){ + overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); + } + return {true, overlap_fraction}; + } + } + + + std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; + + int num_cluster_groups=0; // number of matched cluster groups in total + std::vector> grouped_cluster_indices; + std::vector cluster_group_timeoverlap_fraction; + if(num_clusters <= 1) + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + + for(int i = 0; i != num_clusters -1; ++i){ + for(int j = i+1; j != num_clusters; ++j){ + + //first, look at candidate pairs + auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if( pair_result.first){ + + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j}); + double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + + // if the pair is succefully grouped, look at possible trios + for(int k = j+1; k!= num_clusters; ++k){ + auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if(tri_result.first){ + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); + min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + } + } //k loop + } + }//j loop + }//i loop + + std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; + + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + } + +} From c0c3fad3842a10d251aef912800cbbbb6e0174f9 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 15 Feb 2022 21:40:43 -0600 Subject: [PATCH 02/54] Update DetectorPropertiesServices to match the new class members. --- sbncode/SinglePhotonAnalysis/README.md | 2 + .../SinglePhoton_module.cc | 281 +++++++++--------- .../SinglePhoton_module.h | 23 +- .../SinglePhotonAnalysis/analyze_MCTruth.h | 1 + .../SinglePhotonAnalysis/analyze_Showers.h | 14 +- .../SinglePhotonAnalysis/helper_functions.h | 5 +- sbncode/SinglePhotonAnalysis/isolation.h | 5 +- .../job/run_SinglePhoton.fcl | 67 ----- .../second_shower_search.h | 6 +- 9 files changed, 179 insertions(+), 225 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/job/run_SinglePhoton.fcl diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 4e48e00e3..edcb4a512 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -1,3 +1,5 @@ # SinglePhotonModule Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` froen on Jan. 18 2022 +The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge)[https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge] + diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index ab17c08c4..7c5169250 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -17,19 +17,22 @@ namespace single_photon //Constructor from .fcl parameters SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) { + std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<reconfigure(pset); //Set up some detector, timing, spacecharge and geometry services -// CHECK + //Keng, grab theDetector and detClocks in each event. // theDetector = lar::providerFrom(); // detClocks = lar::providerFrom(); - SCE = lar::providerFrom(); + SCE = lar::providerFrom();//Get space charge service geom = lar::providerFrom(); + std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<("PrintOut", false); m_is_verbose = pset.get("Verbose",false); @@ -178,6 +181,7 @@ namespace single_photon exit(0); } } + std::cout<<">>>> CHECK finish reconfigure() at line"<<__LINE__< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; @@ -193,58 +197,62 @@ namespace single_photon // Runs over every artroot event bool SinglePhoton::filter(art::Event &evt) { + std::cout<<"---------------------------------------------------------------------------------"<()->DataFor(evt); + auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks); + + //Clear all output branches + this->ClearVertex(); + + //Some event based properties + m_subrun_counts++; + m_number_of_events++; + m_run_number = evt.run(); + m_subrun_number = evt.subRun(); + m_event_number = evt.id().event(); + + + //if module is run in selected-event mode, and current event is not in the list, skip it + if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ + std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; + return true; + } + + //Timing and TPC info + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + m_Cryostat = ID.Cryostat; + m_TPC = ID.TPC; + + _time2cm = sampling_rate(detClocks) / 1000.0 * theDetector.DriftVelocity( theDetector.Efield(), theDetector.Temperature() );//found in ProtoShowerPandora_tool.cc + + + //******************************Setup*****************Setup**************************************/ + //******************************Setup*****************Setup**************************************/ + // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. + // Make sure under the hood you understand this! + // ------------------------ + // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g + // tracks->pfparticles->hits + // tracks->pfparticles->spacepoints ..etc.. + // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. + //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. + + + // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. + art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); + std::vector> hitVector; + art::fill_ptr_vector(hitVector,hitHandle); + + //Lets do "THE EXACT SAME STUFF" for Optical Flashes + art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); + std::vector> flashVector; + art::fill_ptr_vector(flashVector,flashHandle); //CHECK -// std::cout<<"---------------------------------------------------------------------------------"<ClearVertex(); -// -// //Some event based properties -// m_subrun_counts++; -// m_number_of_events++; -// m_run_number = evt.run(); -// m_subrun_number = evt.subRun(); -// m_event_number = evt.id().event(); -// -// -// //if module is run in selected-event mode, and current event is not in the list, skip it -// if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ -// std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; -// return true; -// } -// -// //Timing and TPC info -// auto const TPC = (*geom).begin_TPC(); -// auto ID = TPC.ID(); -// m_Cryostat = ID.Cryostat; -// m_TPC = ID.TPC; -////CHECK -//// _time2cm = theDetector->SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc -// -// -// //******************************Setup*****************Setup**************************************/ -// //******************************Setup*****************Setup**************************************/ -// // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. -// // Make sure under the hood you understand this! -// // ------------------------ -// // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g -// // tracks->pfparticles->hits -// // tracks->pfparticles->spacepoints ..etc.. -// // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. -// //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. -// -// -// // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. -// art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); -// std::vector> hitVector; -// art::fill_ptr_vector(hitVector,hitHandle); -// -// //Lets do "THE EXACT SAME STUFF" for Optical Flashes -// art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); -// std::vector> flashVector; -// art::fill_ptr_vector(flashVector,flashHandle); -// // //tracks // art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); // std::vector> trackVector; @@ -769,7 +777,7 @@ namespace single_photon // std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); +// this->AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); //CHECK, add theDetector // this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); // // @@ -1475,20 +1483,12 @@ namespace single_photon - //------------------------------------------------------------------------------------------- - void SinglePhoton::endJob() - { - if (m_print_out_event){ - out_stream.close(); - } - pot_tree->Fill(); - } - //------------------------------------------------------------------------------------------- //This runs ONCE at the start of the job and sets up all the necessary services and TTrees void SinglePhoton::beginJob() { + std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__< tfs; @@ -1657,12 +1657,70 @@ namespace single_photon // } // } - std::cout<<"SinglePhoton \t||\t beginJob() is complete"<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__< gen_pot_hand; + if(sr.getByLabel(m_potLabel,gen_pot_hand)){ + this_pot = gen_pot_hand->totgoodpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; + if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ + this_pot =potSummaryHandlebnbETOR875->totpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<Fill(); + return true; + } + + void SinglePhoton::endJob() + { + std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__<Fill(); + + std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__<ClearGeant4Branches(); this->ClearSlices(); - - } - - - bool SinglePhoton::beginSubRun(art::SubRun& sr) { - - - m_run = sr.run(); - m_subrun = sr.subRun(); - - double this_pot = 0; - - //reset subrun count - m_subrun_counts = 0; - - - if(m_potLabel != ""){ - if(m_potLabel == "generator"){ - - art::Handle gen_pot_hand; - if(sr.getByLabel(m_potLabel,gen_pot_hand)){ - this_pot = gen_pot_hand->totgoodpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; - if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ - this_pot =potSummaryHandlebnbETOR875->totpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<Fill(); - return true; - } - - - - - //----------------------------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------------------------- @@ -2054,27 +2061,27 @@ namespace single_photon int SinglePhoton::spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input){ corrected.resize(3); - double kx = input[0]; +//CHECK double kx = input[0]; double ky = input[1]; double kz = input[2]; - - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); +//CHECK +// auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // CHECK - // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); +//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); // double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials corrected[1]=ky+yOffset; corrected[2]=kz+zOffset; //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()<Vy(); double kz = mcparticle->Vz(); - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); +//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); +//CHECK double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); //double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[0]= kx;//CHECK- scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials corrected[1]=ky+yOffset; corrected[2]=kz+zOffset; //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()<GetPosOffsets( geo::Point_t(kx,ky,kz)); -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); +//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); +//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); - corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; - corrected[1]=ky + scecorr.Y(); - corrected[2]=kz + scecorr.Z(); + corrected[0]=kx;//CHECK - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky;//CHECK + scecorr.Y(); + corrected[2]=kz;//CHECK + scecorr.Z(); return 0; } diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index afb535375..f3ea422d6 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -150,7 +150,8 @@ namespace single_photon public: - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) + :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { f_npts = f_pts.size(); if(pts.size() != hits.size()){ @@ -454,7 +455,9 @@ namespace single_photon art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + detinfo::DetectorPropertiesService const & theDetector + ); /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits @@ -492,7 +495,9 @@ namespace single_photon const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + detinfo::DetectorPropertiesService const & theDetector + ); @@ -545,15 +550,15 @@ namespace single_photon std::map,bool> &PFPToNuSliceMap, std::map,double> &PFPToTrackScoreMap, PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap - ); + std::map, art::Ptr> &PFPtoShowerReco3DMap); void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map,art::Ptr> & pfptotrkmap, std::map,std::vector>> & trktocalomap, - std::map, std::vector>> & pfParticleToHitMap + std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesService const & theDetector ); void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, @@ -810,6 +815,7 @@ namespace single_photon int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ // given a MCParticle, get its corrected vertex + //CHECK can merge three in one? int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); // given a particle, and input location calculate its corrected true position, so we can compare it to reco @@ -909,8 +915,9 @@ namespace single_photon double m_track_calo_min_dEdx_hits; double m_track_calo_trunc_fraction; - detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); - detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + //Keng, DetectorClocks now is declared in each event +// detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); +// detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); spacecharge::SpaceCharge const * SCE; geo::GeometryCore const * geom; double m_work_function; //value provided by pset diff --git a/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h index c15ef16b7..131a8fd5e 100644 --- a/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h @@ -281,6 +281,7 @@ namespace single_photon if(m_is_verbose) std::cout<<"Getting SC corrected vertex position"< corrected(3); // get corrected lepton position + // CHECK, turn simb::mcparticle to art::Ptrspacecharge_correction( truth->GetNeutrino().Lepton(),corrected); m_mctruth_nu_vertex_x = corrected[0]; diff --git a/sbncode/SinglePhotonAnalysis/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/analyze_Showers.h index 0614f70ec..58f73d6c5 100644 --- a/sbncode/SinglePhotonAnalysis/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/analyze_Showers.h @@ -570,8 +570,7 @@ namespace single_photon std::map,bool> &PFPToNuSliceMap, std::map,double> &PFPToTrackScoreMap, PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap - ){ + std::map, art::Ptr>& PFPtoShowerReco3DMap){ if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ + void SinglePhoton::AnalyzeKalmanShowers( const std::vector>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesService const & theDetector){ std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("<ResidualRange().back()-calo[p]->ResidualRange()[ix]); double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); - double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); + double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); //loop over all hits for(auto &hit: hitz){ @@ -1387,8 +1387,8 @@ namespace single_photon //convert the cluster start and end positions to time and wire coordinates std::cout<<" CHECK "<<__LINE__<<" at "<<__FILE__<<" segmen fault warning"< cluster_start = {0};//CHECK {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; - std::vector cluster_end = {0};//CHECK{thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; + std::vector cluster_start = {0};//CHECK {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->trigger_offset())* _time2cm}; + std::vector cluster_end = {0};//CHECK{thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->trigger_offset())* _time2cm }; //check that the cluster has non-zero length double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); @@ -1408,7 +1408,7 @@ namespace single_photon //for each hit in the cluster for (art::Ptr &thishit: hits){ //get the hit position in cm from the wire and time - std::vector thishit_pos ={0};//CHECK {thishit->WireID().Wire * m_wire_spacing, (thishit->PeakTime() - theDetector->TriggerOffset())* _time2cm}; + std::vector thishit_pos ={0};//CHECK {thishit->WireID().Wire * m_wire_spacing, (thishit->PeakTime() - theDetector->trigger_offset())* _time2cm}; //check if inside the box bool v2 = isInsidev2(thishit_pos, rectangle); diff --git a/sbncode/SinglePhotonAnalysis/helper_functions.h b/sbncode/SinglePhotonAnalysis/helper_functions.h index b4d672cd3..cf3d9d6c0 100644 --- a/sbncode/SinglePhotonAnalysis/helper_functions.h +++ b/sbncode/SinglePhotonAnalysis/helper_functions.h @@ -162,8 +162,9 @@ namespace single_photon } - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ - double time = 0;//CHECK detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesService const& detprop){ + + double time = (detprop.DataForJob()).ConvertXToTicks(X, plane, fTPC,fCryostat); return time; } diff --git a/sbncode/SinglePhotonAnalysis/isolation.h b/sbncode/SinglePhotonAnalysis/isolation.h index 160b8db28..1fafce09b 100644 --- a/sbncode/SinglePhotonAnalysis/isolation.h +++ b/sbncode/SinglePhotonAnalysis/isolation.h @@ -84,7 +84,8 @@ void SinglePhoton::IsolationStudy( const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + detinfo::DetectorPropertiesService const & theDetector) { int total_track_hits =0; @@ -497,7 +498,7 @@ std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing w if(i==0 ) pader->SetLeftMargin(0.1); std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; vertex_time[i] = time[0]; vertex_wire[i] = wire[0]; diff --git a/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton.fcl b/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton.fcl deleted file mode 100644 index e16d6af57..000000000 --- a/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton.fcl +++ /dev/null @@ -1,67 +0,0 @@ -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "microboone_singlephoton.fcl" - -process_name : SinglePhoton #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties -} - -outputs: { - # optionalout: { module_type: RootOutput - # fileName: "output_file.root" - # fastCloning: false } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - #pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - analyzers: {} - filters : { - #singlephotonfil: @local::singlephoton_filter #run in filtering mode - singlephotonana: @local::singlephoton_analyzer #run in ana mode - } - pathana : [ singlephotonana] #path for analysis - trigger_paths : [pathana] - end_paths: [ ] - -} -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - diff --git a/sbncode/SinglePhotonAnalysis/second_shower_search.h b/sbncode/SinglePhotonAnalysis/second_shower_search.h index 5793a7e32..d6b3ef6be 100644 --- a/sbncode/SinglePhotonAnalysis/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/second_shower_search.h @@ -251,7 +251,9 @@ namespace single_photon art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + detinfo::DetectorPropertiesService const & theDetector + ){ @@ -497,7 +499,7 @@ namespace single_photon if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; vertex_time[i] = time[0]; vertex_wire[i] = wire[0]; From 4819e51d4a7befd12e3e606253fad6104f015131 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 16 Feb 2022 23:29:46 -0600 Subject: [PATCH 03/54] updatre TFileService.h location --- .../SinglePhoton_module.cc | 1273 ++++++++--------- .../SinglePhoton_module.h | 4 + 2 files changed, 640 insertions(+), 637 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 7c5169250..7a623dfba 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -252,478 +252,478 @@ namespace single_photon art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); std::vector> flashVector; art::fill_ptr_vector(flashVector,flashHandle); + //tracks + art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); + std::vector> trackVector; + art::fill_ptr_vector(trackVector,trackHandle); + + //BadChannels// Fill later + art::Handle > badChannelHandle; + std::vector badChannelVector; + if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ + badChannelVector = *(badChannelHandle); + } + + //Collect the PFParticles from the event. This is the core! + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> pfParticleVector; + art::fill_ptr_vector(pfParticleVector,pfParticleHandle); + //So a cross check + if (!pfParticleHandle.isValid()) + { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; + return (m_run_pi0_filter ? false : true) ; + } + + //get the cluster handle for the dQ/dx calc + art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector< art::Ptr > clusterVector; + art::fill_ptr_vector(clusterVector,clusterHandle); + + // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; + // typedef std::map< size_t, art::Ptr> + // Produce a map of the PFParticle IDs for fast navigation through the hierarchy + PFParticleIdMap pfParticleMap; + this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); + + //Slices + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> sliceVector; + art::fill_ptr_vector(sliceVector,sliceHandle); + + //And some associations + art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); + + //Slice to PFParticle + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map> > sliceIDToPFParticlesMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + } + + //Slice to Hits + std::map< art::Ptr, std::vector> > sliceToHitsMap; + std::map> > sliceIDToHitsMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); + sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); + } + + //And some verticies. + art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> vertexVector; + art::fill_ptr_vector(vertexVector,vertexHandle); + if(vertexVector.size()>0) m_number_of_vertices++; + + //PFParticle to Vertices + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); + } + + //------- 3D showers + art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); + std::map, art::Ptr> pfParticlesToShowerReco3DMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ + pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); + } + + } + //---------Kalman Track Showers + art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); + std::map, art::Ptr> pfParticlesToShowerKalmanMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ + pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); + } + } + + //----- kalmon Cali + art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); + std::vector> kalmanTrackVector; + art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); + + art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); + std::map,std::vector>> kalmanTrackToCaloMap; + for(size_t i=0; i< kalmanTrackVector.size(); ++i){ + auto trk = kalmanTrackVector[i]; + if(cali_per_kalmantrack.at(trk.key()).size()!=0){ + kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); + } + } + + // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: + //-------------------------------- + // Produce two PFParticle vectors containing final-state particles: + // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis + // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis + std::vector< art::Ptr > crParticles; + std::vector< art::Ptr > nuParticles; + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + + + //if not running over neutrino slice only, use all pfp's in event + if (m_run_all_pfps ==true){ + nuParticles = pfParticleVector; + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToSpacePointsMap; + for(size_t i=0; i< nuParticles.size(); ++i){ + const art::Ptr pfp = nuParticles[i]; + pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToMetadataMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + const art::Ptr pfp = pfParticleVector[i]; + pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToClustersMap; + std::map, std::vector> > clusterToHitsMap; + //fill map PFP to Clusters + for(size_t i=0; i< nuParticles.size(); ++i){ + auto pfp = nuParticles[i]; + pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } + //fill map Cluster to Hits + for(size_t i=0; i< clusterVector.size(); ++i){ + auto cluster = clusterVector[i]; + clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); + } + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; + + + //use pfp->cluster and cluster->hit to build pfp->hit map + //for each PFP + for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; + + //make empty vector to store hits + std::vector> hits_for_pfp = {}; + + + //for each cluster, get the associated hits + for (art::Ptr cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; + + //insert hits into vector + hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); + } + + //fill the map + pfParticleToHitsMap[pfp] = hits_for_pfp; + + }//for each pfp + + + + /************************************************************************** + * For SEAview: grab cosmic-related PFPaticles and recob::Hits + * + **************************************************************************/ + std::map, std::vector> > cr_pfParticleToClustersMap; + std::map, std::vector> > cr_pfParticleToHitsMap; + + //first, collect all daughters of primary cosmic + int num_primary_cosmic_particle = crParticles.size(); + for(int i =0; i!=num_primary_cosmic_particle; ++i){ + auto& pParticle = crParticles[i]; + for(const size_t daughterId : pParticle->Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + crParticles.push_back(pfParticleMap.at(daughterId)); + } + } + + //second, build PFP to hits map for cosmic-related PFParticles + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; + cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; + + // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; + + //make empty vector to store hits + std::vector> hits_for_pfp = {}; + + // std::cout<<"-- there are "< cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; + + // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()< nu_scores; + bool isSelectedSlice = false; + int primaries = 0; + int primary_pdg = 0; + + for(auto &pfp: pfps){ + std::vector> metadatas = pfParticleToMetadataMap[pfp]; + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + //for each of the things in the list + if(propertiesmap.count("NuScore")==1){ + nu_scores.push_back(propertiesmap["NuScore"]); + } + if(propertiesmap.count("IsNeutrino")==1){ + isSelectedSlice = true; + } + } + + if (pfp->IsPrimary()) { + primaries++; + primary_pdg = (pfp->PdgCode()); + } + /*if (!pfp->IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + if(isNeutrino){ + isSelectedSlice = true; + }*/ + } + + if(nu_scores.size()>0){ + double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); + if(mean!=nu_scores.front()){ + std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. + //tracks is a vector of recob::Tracks and same for showers. + //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. + std::vector< art::Ptr > tracks; + std::vector< art::Ptr > showers; + std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; + std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + //Track Calorimetry. Bit odd here but bear with me, good to match and fill here + art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); + std::map, std::vector> > trackToCalorimetryMap; + //So a cross check + if (!calo_per_track.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; + return (m_run_pi0_filter ? false : true); + } + + //Loop over all tracks we have to fill calorimetry map + for(size_t i=0; i< tracks.size(); ++i){ + if(calo_per_track.at(tracks[i].key()).size() ==0){ + std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, m_pidLabel); + std::map, art::Ptr > trackToPIDMap; + + // If we want PID algorithms to run. do so here + // Build a map to get PID from PFParticles, then call PID collection function + if(m_use_PID_algorithms){ + for(size_t i=0; i< tracks.size(); ++i){ + trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); + } + } + + + + //**********************************************************************************************/ + //**********************************************************************************************/ + //---------------------------------- MC TRUTH, MC Only--------------------------- + //**********************************************************************************************/ + //**********************************************************************************************/ + + //Get the MCtruth handles and vectors + std::vector> mcTruthVector; + std::vector> mcParticleVector; + + //Then build a map from MCparticles to Hits and vice versa + std::map< art::Ptr, std::vector > > mcParticleToHitsMap; + std::map< art::Ptr, art::Ptr > hitToMCParticleMap; + + //Apparrently a MCParticle doesn't know its origin (thanks Andy!) + //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa + //Note which map is which! //First is one-to-many. //Second is one-to-one + std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; + std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + std::map > MCParticleToTrackIdMap; + + std::vector> mcTrackVector; + std::vector> mcShowerVector; + + std::vector> matchedMCParticleVector; + std::map, art::Ptr > trackToMCParticleMap; + std::map, art::Ptr > showerToMCParticleMap; + + //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower + std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; + std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; + + if(m_is_verbose){ + std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; + } + + //**********************************************************************************************/ + //**********************************************************************************************/ + + //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). +//CHECK +// if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); +// badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + + + //*******************************Slices***************************************************************/ + //*******************************Slices***************************************************************/ + + //these are all filled in analyze slice + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind + std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score + std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise + std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's + std::map,bool> PFPToNuSliceMap; + std::map,double> PFPToTrackScoreMap; + std::map sliceIdToNumPFPsMap; + std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); + + if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<Self()<> pfp_vec = pair.second; + int slice_id = pair.first; + //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) + for(auto pfp: pfp_vec){ + if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ + std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; + + if(m_runCRT){ + art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); + for(size_t i=0; i< flashVector.size(); ++i){ + crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); + } + } + //CHECK -// //tracks -// art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); -// std::vector> trackVector; -// art::fill_ptr_vector(trackVector,trackHandle); -// -// //BadChannels// Fill later -// art::Handle > badChannelHandle; -// std::vector badChannelVector; -// if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ -// badChannelVector = *(badChannelHandle); -// } -// -// //Collect the PFParticles from the event. This is the core! -// art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); -// std::vector> pfParticleVector; -// art::fill_ptr_vector(pfParticleVector,pfParticleHandle); -// //So a cross check -// if (!pfParticleHandle.isValid()) -// { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; -// return (m_run_pi0_filter ? false : true) ; -// } -// -// //get the cluster handle for the dQ/dx calc -// art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); -// std::vector< art::Ptr > clusterVector; -// art::fill_ptr_vector(clusterVector,clusterHandle); -// -// // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; -// // typedef std::map< size_t, art::Ptr> -// // Produce a map of the PFParticle IDs for fast navigation through the hierarchy -// PFParticleIdMap pfParticleMap; -// this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); -// -// //Slices -// art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); -// std::vector> sliceVector; -// art::fill_ptr_vector(sliceVector,sliceHandle); -// -// //And some associations -// art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); -// art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); -// -// //Slice to PFParticle -// std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; -// std::map> > sliceIDToPFParticlesMap; -// for(size_t i=0; i< sliceVector.size(); ++i){ -// auto slice = sliceVector[i]; -// sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); -// sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); -// } -// -// //Slice to Hits -// std::map< art::Ptr, std::vector> > sliceToHitsMap; -// std::map> > sliceIDToHitsMap; -// for(size_t i=0; i< sliceVector.size(); ++i){ -// auto slice = sliceVector[i]; -// sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); -// sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); -// } -// -// //And some verticies. -// art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); -// std::vector> vertexVector; -// art::fill_ptr_vector(vertexVector,vertexHandle); -// if(vertexVector.size()>0) m_number_of_vertices++; -// -// //PFParticle to Vertices -// art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); -// std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// auto pfp = pfParticleVector[i]; -// pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); -// } -// -// //------- 3D showers -// art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); -// std::map, art::Ptr> pfParticlesToShowerReco3DMap; -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// auto pfp = pfParticleVector[i]; -// if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ -// pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); -// } -// -// } -// //---------Kalman Track Showers -// art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); -// std::map, art::Ptr> pfParticlesToShowerKalmanMap; -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// auto pfp = pfParticleVector[i]; -// if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ -// pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); -// } -// } -// -// //----- kalmon Cali -// art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); -// std::vector> kalmanTrackVector; -// art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); -// -// art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); -// std::map,std::vector>> kalmanTrackToCaloMap; -// for(size_t i=0; i< kalmanTrackVector.size(); ++i){ -// auto trk = kalmanTrackVector[i]; -// if(cali_per_kalmantrack.at(trk.key()).size()!=0){ -// kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); -// } -// } -// -// // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: -// //-------------------------------- -// // Produce two PFParticle vectors containing final-state particles: -// // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis -// // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis -// std::vector< art::Ptr > crParticles; -// std::vector< art::Ptr > nuParticles; -// this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); -// -// -// //if not running over neutrino slice only, use all pfp's in event -// if (m_run_all_pfps ==true){ -// nuParticles = pfParticleVector; -// } -// -// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); -// std::map, std::vector> > pfParticleToSpacePointsMap; -// for(size_t i=0; i< nuParticles.size(); ++i){ -// const art::Ptr pfp = nuParticles[i]; -// pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); -// } -// -// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); -// std::map, std::vector> > pfParticleToMetadataMap; -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// const art::Ptr pfp = pfParticleVector[i]; -// pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); -// } -// -// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); -// art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); -// std::map, std::vector> > pfParticleToClustersMap; -// std::map, std::vector> > clusterToHitsMap; -// //fill map PFP to Clusters -// for(size_t i=0; i< nuParticles.size(); ++i){ -// auto pfp = nuParticles[i]; -// pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); -// } -// //fill map Cluster to Hits -// for(size_t i=0; i< clusterVector.size(); ++i){ -// auto cluster = clusterVector[i]; -// clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); -// } -// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; -// -// -// //use pfp->cluster and cluster->hit to build pfp->hit map -// //for each PFP -// for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; -// -// //make empty vector to store hits -// std::vector> hits_for_pfp = {}; -// -// -// //for each cluster, get the associated hits -// for (art::Ptr cluster: clusters_vec){ -// std::vector> hits_vec = clusterToHitsMap[cluster]; -// -// //insert hits into vector -// hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); -// } -// -// //fill the map -// pfParticleToHitsMap[pfp] = hits_for_pfp; -// -// }//for each pfp -// -// -// -// /************************************************************************** -// * For SEAview: grab cosmic-related PFPaticles and recob::Hits -// * -// **************************************************************************/ -// std::map, std::vector> > cr_pfParticleToClustersMap; -// std::map, std::vector> > cr_pfParticleToHitsMap; -// -// //first, collect all daughters of primary cosmic -// int num_primary_cosmic_particle = crParticles.size(); -// for(int i =0; i!=num_primary_cosmic_particle; ++i){ -// auto& pParticle = crParticles[i]; -// for(const size_t daughterId : pParticle->Daughters()) -// { -// if (pfParticleMap.find(daughterId) == pfParticleMap.end()) -// throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; -// -// crParticles.push_back(pfParticleMap.at(daughterId)); -// } -// } -// -// //second, build PFP to hits map for cosmic-related PFParticles -// for(size_t i=0; i< crParticles.size(); ++i){ -// auto pfp = crParticles[i]; -// cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); -// } -// for(size_t i=0; i< crParticles.size(); ++i){ -// auto pfp = crParticles[i]; -// -// // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; -// -// //make empty vector to store hits -// std::vector> hits_for_pfp = {}; -// -// // std::cout<<"-- there are "< cluster: clusters_vec){ -// std::vector> hits_vec = clusterToHitsMap[cluster]; -// -// // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()< nu_scores; -// bool isSelectedSlice = false; -// int primaries = 0; -// int primary_pdg = 0; -// -// for(auto &pfp: pfps){ -// std::vector> metadatas = pfParticleToMetadataMap[pfp]; -// for(auto &meta: metadatas){ -// std::map propertiesmap = meta->GetPropertiesMap(); -// //for each of the things in the list -// if(propertiesmap.count("NuScore")==1){ -// nu_scores.push_back(propertiesmap["NuScore"]); -// } -// if(propertiesmap.count("IsNeutrino")==1){ -// isSelectedSlice = true; -// } -// } -// -// if (pfp->IsPrimary()) { -// primaries++; -// primary_pdg = (pfp->PdgCode()); -// } -// /*if (!pfp->IsPrimary()) continue; -// // Check if this particle is identified as the neutrino -// const int pdg(pfp->PdgCode()); -// const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); -// if(isNeutrino){ -// isSelectedSlice = true; -// }*/ -// } -// -// if(nu_scores.size()>0){ -// double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); -// if(mean!=nu_scores.front()){ -// std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. -// //tracks is a vector of recob::Tracks and same for showers. -// //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. -// std::vector< art::Ptr > tracks; -// std::vector< art::Ptr > showers; -// std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; -// std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; -// -// if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); -// -// //Track Calorimetry. Bit odd here but bear with me, good to match and fill here -// art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); -// std::map, std::vector> > trackToCalorimetryMap; -// //So a cross check -// if (!calo_per_track.isValid()) -// { -// mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; -// return (m_run_pi0_filter ? false : true); -// } -// -// //Loop over all tracks we have to fill calorimetry map -// for(size_t i=0; i< tracks.size(); ++i){ -// if(calo_per_track.at(tracks[i].key()).size() ==0){ -// std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, m_pidLabel); -// std::map, art::Ptr > trackToPIDMap; -// -// // If we want PID algorithms to run. do so here -// // Build a map to get PID from PFParticles, then call PID collection function -// if(m_use_PID_algorithms){ -// for(size_t i=0; i< tracks.size(); ++i){ -// trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); -// } -// } -// -// -// -// //**********************************************************************************************/ -// //**********************************************************************************************/ -// //---------------------------------- MC TRUTH, MC Only--------------------------- -// //**********************************************************************************************/ -// //**********************************************************************************************/ -// -// //Get the MCtruth handles and vectors -// std::vector> mcTruthVector; -// std::vector> mcParticleVector; -// -// //Then build a map from MCparticles to Hits and vice versa -// std::map< art::Ptr, std::vector > > mcParticleToHitsMap; -// std::map< art::Ptr, art::Ptr > hitToMCParticleMap; -// -// //Apparrently a MCParticle doesn't know its origin (thanks Andy!) -// //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa -// //Note which map is which! //First is one-to-many. //Second is one-to-one -// std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; -// std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; -// std::map > MCParticleToTrackIdMap; -// -// std::vector> mcTrackVector; -// std::vector> mcShowerVector; -// -// std::vector> matchedMCParticleVector; -// std::map, art::Ptr > trackToMCParticleMap; -// std::map, art::Ptr > showerToMCParticleMap; -// -// //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower -// std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; -// std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; -// -// if(m_is_verbose){ -// std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; -// std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; -// std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; -// std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; -// std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; -// } -// -// //**********************************************************************************************/ -// //**********************************************************************************************/ -// -// //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). -////CHECK -//// if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); -//// badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); -// -// -// //*******************************Slices***************************************************************/ -// //*******************************Slices***************************************************************/ -// -// //these are all filled in analyze slice -// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind -// std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind -// std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score -// std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise -// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's -// std::map,bool> PFPToNuSliceMap; -// std::map,double> PFPToTrackScoreMap; -// std::map sliceIdToNumPFPsMap; -// std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); -// -// if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<Self()<> pfp_vec = pair.second; -// int slice_id = pair.first; -// //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) -// for(auto pfp: pfp_vec){ -// if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ -// std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; -// -// if(m_runCRT){ -// art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); -// for(size_t i=0; i< flashVector.size(); ++i){ -// crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); -// } -// } -// // art::Handle> crthit_h; //only filled when there are hits, otherwise empty // art::Handle rawHandle_DAQHeader; // double evt_timeGPS_nsec = -999 ; @@ -1490,172 +1490,171 @@ namespace single_photon { std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__< tfs; -// -// vertex_tree = tfs->make("vertex_tree", "vertex_tree"); -// pot_tree = tfs->make("pot_tree", "pot_tree"); -// eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); -// ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); -// run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); -// geant4_tree = tfs->make("geant4_tree","geant4_tree"); -// -// //run_subrun_tree, reset some POT -// m_run = 0; -// m_subrun = 0; -// m_subrun_pot = 0; -// run_subrun_tree->Branch("run",&m_run,"run/I"); -// run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); -// run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); -// run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); -// -// true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); -// true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); -// -// // --------------------- POT Releated variables ----------------- -// m_number_of_events = 0; -// m_number_of_vertices = 0; -// m_pot_count=0; -// m_pot_per_event = 0; -// m_pot_per_subrun = 0; -// m_number_of_events_in_subrun=0; -// -// -// pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); -// pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); -// pot_tree->Branch("POT",&m_pot_count,"POT/D"); -// -// // --------------------- Event Related variables ------------ -// vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); -// vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); -// vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); -// -// vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); -// vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); -// vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); -// -// -// vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); -// vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); -// -// vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); -// vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); -// -// vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); -// -// // --------------------- Vertex Related variables ------------ -// vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); -// vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); -// vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); -// vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); -// vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); -// vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); -// vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); -// -// vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); -// -// vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); -// vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); -// vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); -// vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); -// -// //create branches as found in individual analyze_XXX.h -// this->CreateIsolationBranches(); -// this->CreateSecondShowerBranches(); -// this->CreateSecondShowerBranches3D(); -// this->CreateStubBranches(); -// this->CreateFlashBranches(); -// this->CreateShowerBranches(); -// this->CreateSliceBranches(); -// this->CreateMCTruthBranches(); -// this->CreateEventWeightBranches(); -// this->CreateGeant4Branches(); -// this->CreateTrackBranches(); -// -// //hardcode some info (TODO change) -// std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; -// -// //Get the info for length->energy conversion from PSTAR database. -// TFile *fileconv; -// struct stat buffer; -// -// //some useful input data -// if(!m_run_pi0_filter){ -// if(stat("proton_conversion.root", &buffer) == 0){ -// fileconv = new TFile("proton_conversion.root", "read"); -// }else{ -// fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); -// } -// -// proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); -// proton_length2energy_tgraph.GetMean(); -// fileconv->Close(); -// } -// -// //bad channels -// std::string bad_channel_file = "MCC9_channel_list.txt"; -// -// if(!m_run_pi0_filter){ -// if(stat(bad_channel_file.c_str(), &buffer) != 0){ -// bad_channel_file = gpvm_location+bad_channel_file; -// } -// -// std::ifstream bc_file(bad_channel_file); -// -// if (bc_file.is_open()) -// { -// std::string line; -// while ( getline (bc_file,line) ) -// { -// std::vector res; -// std::istringstream iss(line); -// for(std::string s; iss >> s; ) -// res.push_back( std::stof(s)); -// -// std::pair t(res[0],res[1]); -// bad_channel_list_fixed_mcc9.push_back(t); -// } -// bc_file.close(); -// } -// } -// -// -// //------------------- List of Selected Events to run -------- -// if(m_runSelectedEvent){ -// std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; -// -// std::ifstream infile(m_selected_event_list); -// if(!infile){ -// std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; -// return; -// } -// -// //read from file, run number, subrun number ,event number that should be run -// m_selected_set.clear(); -// std::string line; -// while(std::getline(infile, line)){ -// std::istringstream ss(line); -// -// std::vector event_info; -// for(int i; ss >> i; ) event_info.push_back(i); -// -// m_selected_set.insert(event_info); -// } -// -// infile.close(); -// -// if(m_is_verbose){ -// std::cout << "Selected Events: " << std::endl; -// std::cout << "Run \t SubRun \t Event" << std::endl; -// for(auto & v: m_selected_set){ -// std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); -// std::cout << std::endl; -// } -// } -// } + + art::ServiceHandle tfs;//output ROOT + + vertex_tree = tfs->make("vertex_tree", "vertex_tree"); + pot_tree = tfs->make("pot_tree", "pot_tree"); + eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); + ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); + run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); + geant4_tree = tfs->make("geant4_tree","geant4_tree"); + + //run_subrun_tree, reset some POT + m_run = 0; + m_subrun = 0; + m_subrun_pot = 0; + run_subrun_tree->Branch("run",&m_run,"run/I"); + run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); + run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); + run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + + true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); + true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); + + // --------------------- POT Releated variables ----------------- + m_number_of_events = 0; + m_number_of_vertices = 0; + m_pot_count=0; + m_pot_per_event = 0; + m_pot_per_subrun = 0; + m_number_of_events_in_subrun=0; + + + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); + vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); + vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + + vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); + vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); + vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); + vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); + vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); + vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); + vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + + //create branches as found in individual analyze_XXX.h + this->CreateIsolationBranches(); + this->CreateSecondShowerBranches(); + this->CreateSecondShowerBranches3D(); + this->CreateStubBranches(); + this->CreateFlashBranches(); + this->CreateShowerBranches(); + this->CreateSliceBranches(); + this->CreateMCTruthBranches(); + this->CreateEventWeightBranches(); + this->CreateGeant4Branches(); + this->CreateTrackBranches(); + + //hardcode some info (TODO change) + std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; + + //Get the info for length->energy conversion from PSTAR database. + TFile *fileconv; + struct stat buffer; + + //some useful input data + if(!m_run_pi0_filter){ + if(stat("proton_conversion.root", &buffer) == 0){ + fileconv = new TFile("proton_conversion.root", "read"); + }else{ + fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); + } + + proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); + proton_length2energy_tgraph.GetMean(); + fileconv->Close(); + } + + //bad channels + std::string bad_channel_file = "MCC9_channel_list.txt"; + + if(!m_run_pi0_filter){ + if(stat(bad_channel_file.c_str(), &buffer) != 0){ + bad_channel_file = gpvm_location+bad_channel_file; + } + + std::ifstream bc_file(bad_channel_file); + + if (bc_file.is_open()) + { + std::string line; + while ( getline (bc_file,line) ) + { + std::vector res; + std::istringstream iss(line); + for(std::string s; iss >> s; ) + res.push_back( std::stof(s)); + + std::pair t(res[0],res[1]); + bad_channel_list_fixed_mcc9.push_back(t); + } + bc_file.close(); + } + } + + //------------------- List of Selected Events to run -------- + if(m_runSelectedEvent){ + std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; + + std::ifstream infile(m_selected_event_list); + if(!infile){ + std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; + return; + } + + //read from file, run number, subrun number ,event number that should be run + m_selected_set.clear(); + std::string line; + while(std::getline(infile, line)){ + std::istringstream ss(line); + + std::vector event_info; + for(int i; ss >> i; ) event_info.push_back(i); + + m_selected_set.insert(event_info); + } + + infile.close(); + + if(m_is_verbose){ + std::cout << "Selected Events: " << std::endl; + std::cout << "Run \t SubRun \t Event" << std::endl; + for(auto & v: m_selected_set){ + std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); + std::cout << std::endl; + } + } + } std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__< Date: Fri, 18 Feb 2022 12:05:05 -0600 Subject: [PATCH 04/54] Add subdirectories, but SEAview CMakeList.txt is not working yet --- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 2 + .../SinglePhotonAnalysis/Libraries/DBSCAN.h | 149 ++ .../Libraries/SinglePhoton_module.h | 1908 +++++++++++++++++ .../{ => Libraries}/TruncMean.h | 0 .../{ => Libraries}/analyze_EventWeight.h | 0 .../{ => Libraries}/analyze_Geant4.h | 0 .../{ => Libraries}/analyze_MCTruth.h | 0 .../{ => Libraries}/analyze_OpFlashes.h | 0 .../{ => Libraries}/analyze_Showers.h | 2 +- .../{ => Libraries}/analyze_Slice.h | 4 +- .../{ => Libraries}/analyze_Tracks.h | 0 .../Libraries/bad_channel_matching.h | 131 ++ .../{ => Libraries}/fiducial_volume.h | 0 .../{ => Libraries}/isolation.h | 2 +- .../{ => Libraries}/reco_truth_matching.h | 0 .../{ => Libraries}/second_shower_search.h | 2 +- sbncode/SinglePhotonAnalysis/README.md | 11 + .../SEAview/CMakeLists.txt | 74 + .../SinglePhotonAnalysis/SEAview/SEAviewer.cc | 1304 +++++++++++ .../SinglePhotonAnalysis/SEAview/SEAviewer.h | 453 ++++ .../SinglePhotonAnalysis/SEAview/seaDBSCAN.h | 159 ++ .../SinglePhoton_module.cc | 701 +++--- .../SinglePhoton_module.h | 23 +- .../SinglePhotonAnalysis/helper_functions.h | 175 -- sbncode/SinglePhotonAnalysis/job/README.md | 3 + .../job/run_SinglePhoton_sbnd.fcl | 75 + 26 files changed, 4637 insertions(+), 541 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h rename sbncode/SinglePhotonAnalysis/{ => Libraries}/TruncMean.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_EventWeight.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_Geant4.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_MCTruth.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_OpFlashes.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_Showers.h (99%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_Slice.h (99%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/analyze_Tracks.h (100%) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h rename sbncode/SinglePhotonAnalysis/{ => Libraries}/fiducial_volume.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/isolation.h (99%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/reco_truth_matching.h (100%) rename sbncode/SinglePhotonAnalysis/{ => Libraries}/second_shower_search.h (99%) create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h delete mode 100644 sbncode/SinglePhotonAnalysis/helper_functions.h create mode 100644 sbncode/SinglePhotonAnalysis/job/README.md create mode 100644 sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index 4355a5679..2aa1a90ff 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -67,6 +67,8 @@ art_make( BASENAME_ONLY #add_subdirectory(SEAview) add_subdirectory(job) +add_subdirectory(Libraries) +add_subdirectory(HelperFunctions) install_headers() install_fhicl() install_source() diff --git a/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h b/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h new file mode 100644 index 000000000..d9a83488b --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h @@ -0,0 +1,149 @@ +/** + * \file DBSCAN.h + * + * + * \brief Class def header for a class DBSCAN + * + * @author mark ross-lonergan markrl@nevis.columbia.edu + * Written 20th May 2019. + */ + +#ifndef DBSCAN_H +#define DBSCAN_H + +#include +#include +#include +#include +#include +#include + + +class DBSCAN{ + + public: + double m_eps; + int m_minpts; + + /// constructor + DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + // Guanqun: probably not needed + ~DBSCAN(){} + + // scan over points, and group them into different clusters + std::vector Scan2D(std::vector> &pts); + // grab neighbours of point i. + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // merge neighbours in seed and pts together into seed + int UnionSets(std::vector> &seed, std::vector> &pts); +}; + +std::vector DBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + +} + + + +std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; +} + + +int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; +} + + +#endif diff --git a/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h new file mode 100644 index 000000000..c74a81432 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h @@ -0,0 +1,1908 @@ +#ifndef SINGLE_PHOTON_ANALYSIS +#define SINGLE_PHOTON_ANALYSIS + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" + +//KENG, should use these in sbndcode +//#include "art/Framework/Services/Optional/TFileService.h" +//#include "art/Framework/Services/Optional/TFileDirectory.h" +#include "art_root_io/TFileService.h" +#include "art_root_io/TFileDirectory.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +//KENG +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +//#include "ubobj/Optical/UbooneOpticalFilter.h" + +// Helper function for PID stuff +//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" +#include "TGeoPolygon.h" + +//#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "helper_functions.h" + +#include "bad_channel_matching.h" +#include "DBSCAN.h" + +#include "SEAview/SEAviewer.h" + + +//------------------------------------------------------------------------------------------------------------------------------------------ + +namespace single_photon +{ + + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; /* wire of hit that's closest to vertex */ + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; /* number of wires hits correspond to */ + int n_ticks; + + bool pass; + + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of class sss_score + + class cluster { + + public: + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) + :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts,&wires[0],&ticks[0]); + f_graph = af_graph; + + }; + + int getID() {return f_ID;} + int getN() {return f_npts;} + int getPlane(){ return f_plane;} + TGraph * getGraph(){ return &f_graph;} + std::vector> getHits(){return f_hits;} + int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} + sss_score * getSSScore(){return f_SSScore;} + private: + + int f_ID; + int f_npts; + int f_plane; + std::vector> f_pts; + std::vector> f_hits; + TGraph f_graph; + sss_score *f_SSScore; + }; // end of class cluster + + + + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDFilter + { + public: + // name alias from pandora + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + bool filter(art::Event &evt) override; + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob() override; + + /** + * @brief End the job, setting down ! + * + */ + void endJob() override; + /** + * @brief: grab run, subrun number, and subrun POT, fill the TTree */ + bool beginSubRun(art::SubRun& sr) override; + bool endSubRun(art::SubRun& sr) override; + + private: + /** + * @brief: reset/clear data members + */ + void ClearVertex(); + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleHandle the handle for the PFParticle collection + * @param pfParticleMap the mapping from ID to PFParticle + */ + void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); + + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ + void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; + + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleMap the mapping from ID to PFParticle + * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis + * @param nuParticles a vector to hold the final-states of the reconstruced neutrino + */ + void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); + + /** + * @brief Collect associated tracks and showers to particles in an input particle vector + * + * @param particles a vector holding PFParticles from which to find the associated tracks and showers + * @param pfParticleHandle the handle for the PFParticle collection + * @param evt the art event to analyze + * @param tracks a vector to hold the associated tracks + * @param showers a vector to hold the associated showers + */ + void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: analyze associated tracks/showers for an PFParticle + * @param: pParticle: PFParticle to be analyzed + * @param: associatedTracks: a vector of asso track for pParticle + * @param: associatedShowers: a vector of asso shower for pParticle + * @param: tracks: associated track will be added into tracks + * @param: showers: associated shower will be added into showers + * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle + */ + void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: get vertex for particle + * @param: particle: a primary neutrino + */ + void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); + + void CollectCalo(const art::Event &evt,const art::Ptr &shower); + + + /* + *@brief Calculated the shower energy by looping over all the hits and summing the charge + *@param hits - an art pointer of all the hits in a shower + * */ + double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ + + int getNHitsPlane(std::vector> hits, int this_plane); + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + + /** + *@brief Takes a hit and multiplies the charge by the gain + *@param thishitptr art pointer to a hit + *@param plane the plane the hit is on + **/ + double GetQHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV for a given hit + * @param thishit - an individual hit + * + * + * */ + double QtoEConversionHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV from a given Q value + * @param q - the charge value + * + * */ + double QtoEConversion(double q); + + + /** + *@brief Takes a vector of dQ/dx values and converts to dE/dx + *@param dqdx - vector of dqdx points + * + * */ + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + /** + * + *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane + *@param shower - a Pandora shower + *@param clusters - all of the clusters in the shower + *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster + *@param plane - a single plane + * * */ + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane); + /** + *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) + *@param shower_dir - the 3D shower direction + *@param plane - a single plane + * */ + double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ + TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ + double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + + double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ + int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + + double degToRad(double deg); + double radToDeg(double rad); + /** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); + + /** + *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle + *@param thishit_pos - 2d location of a hit in cm + *@param rectangle - vector of the positions of the four corners of the rectangle + * + * */ + bool insideBox(std::vector thishit_pos, std::vector> rectangle); + + /** + * + *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary + *uses triangle area check + * + * */ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + + double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); + + /*** + *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 + *@param thisvector - vector of doubles + * + * */ + double getMedian(std::vector thisvector); + + + //---------------- Templatees ---------------------------- + void AnalyzeTemplates(); + void ClearTemplates(); + void ResizeTemplates(size_t); + void CreateTemplateBranches(); + + //---------------- Potential Track Stub -------------------- + void ClearStubs(); + void CreateStubBranches(); + + /* @brief: given indices of clusters, determine if they overlap in time + * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters + * candidate_indices provided the indices of clusters of which we'd like to check the overlap + */ + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information + * @brief: candidate clusters on different plane that overlap in time tick will be grouped together + * @return: return.first -> number of possible matches + * return.second.first -> 2D vector, indices of clusters in every possible match + * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match + */ + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + + //---------------- SecondShower---- + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + + void SimpleSecondShowerCluster(); + + + void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); + + + /* this function is now redundant, not in use anymore */ + void SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + detinfo::DetectorPropertiesData const & theDetector); + + + /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits + * and return a vector of 7 elements: + * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} + */ + std::vectorSecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + /* analyze a cluster of hits, and return corresponding sss_score */ + sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); + + /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits + * This function is currently used in function 'SecondShowerSearch' + * @parameter: plane, cluster are not in use + * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire + */ + TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); + + + /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ + int CompareToShowers(int,int,std::vector>& hitz,double,double, + const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); + //---------------- Isolation ----------------- + + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + + /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ + void IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + detinfo::DetectorPropertiesData const & theDetector); + + + + //---------------- Flashes ---------------------------- + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + + + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + + //---------------- Tracks ---------------------------- + /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ + void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, + std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap + ); + + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); + + + /* @brief: analyze MCParticle related to recob::Track if it has one + * variables starting with 'm_sim_track_' will be updated + * */ + void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector& vec); + + + /* collect information from anab::sParticleIDAlgScores of reco track */ + void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); + TGraph proton_length2energy_tgraph; + + //---------------- Showers ---------------------------- + + void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr> &PFPtoShowerReco3DMap); + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, + std::map,art::Ptr> & pfptotrkmap, + std::map,std::vector>> & trktocalomap, + std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesData const & theDetector); + + void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector); + + /** + * @brief: match showers to MCParticles + * @arguments filled during function execution: + * mcParticleVector: vector of mother particles of showers + * objectToMCParticleMap: map of shower to its mother particle + */ + void showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap); + + + /* tranverse through mcParticleVector, and print out infos for photons */ + int photoNuclearTesting(std::vector>& mcParticleVector); + + // ------------ Fid Volume and SCB------------------------- // + double m_tpc_active_x_low; + double m_tpc_active_x_high; + double m_tpc_active_y_low; + double m_tpc_active_y_high; + double m_tpc_active_z_low ; + double m_tpc_active_z_high; + + double m_SCB_YX_TOP_y1_array; + std::vector m_SCB_YX_TOP_x1_array; + std::vector m_SCB_YX_TOP_y2_array; + double m_SCB_YX_TOP_x2_array; + double m_SCB_YX_BOT_y1_array; + std::vector m_SCB_YX_BOT_x1_array; + std::vector m_SCB_YX_BOT_y2_array; + double m_SCB_YX_BOT_x2_array; + + double m_SCB_ZX_Up_z1_array ; + double m_SCB_ZX_Up_x1_array ; + double m_SCB_ZX_Up_z2_array ; + double m_SCB_ZX_Up_x2_array ; + + double m_SCB_ZX_Dw_z1_array; + std::vector m_SCB_ZX_Dw_x1_array; + std::vector m_SCB_ZX_Dw_z2_array; + double m_SCB_ZX_Dw_x2_array; + + int isInTPCActive(std::vector&); /* if point is in active TPC volume */ + int isInTPCActive(double cut,std::vector&); + double distToTPCActive(std::vector&vec); + /* if point in active TPC, returns distance from point to closest TPC wall + * otherwise, returns -999 */ + + int isInSCB(std::vector&); /* if point is inside SCB */ + int isInSCB(double cut,std::vector&); + int distToSCB(double & dist, std::vector &vec); + /* calc the minimum distance from point to the SC boundary,save to dist. + * return value (0, or 1) indicates whether the point is in SCB */ + int setTPCGeom(); + /* This function is wrong, and Not used */ + bool loadSCB_YX(std::vector&zpolygons); + + //---------------- MCTruths ---------------------------- + + /** + * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) + */ + void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); + + std::map is_delta_map; + + //---------------- EventWeight ---------------------------- + + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + + //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. + + + //---------------- Geant4 ---------------------------- + + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); + + + + + + /** + * @brief: given an event and a label, collect all the SimChannel with that label + * @ param: simChannelVector: a vector of SimChannel [to be filled] + */ + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + + /** + * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use + * @param: evt: event, label: given label + * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] + * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] + * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] + */ + void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + + //-------------- Slices/Pandora Metadata ---------------// + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + //void CreateMatchedSliceBranches(); + + + /** + * brief: analyze metadata of PFParticles, and fill in all these maps + * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap + * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby + */ + void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> & primaryPFPSliceIdVec, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap); + + // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumPFPsMap ); + + std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ + //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); + + /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ + int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + + int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + //can also look at things like shower energy, conversion length, etc. + + + /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ + std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap ); + // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + // std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumShowersMap ); + + + /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ + std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap); + + /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info + * to determine how many eligible tracks and showers there are in the event + */ + void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap, + std::map, int>& PFPToSliceIdMap); + + + void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); + + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + //------- matched shower ------------------------------------- + + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + + //------------------ Delaunay triangle tools -----------// + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found + * and total area of these triangles, + * save to num_triangles & area */ + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ + + // given a MCParticle, get its corrected vertex + //CHECK can merge three in one? + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + // given a particle, and input location calculate its corrected true position, so we can compare it to reco + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); + + //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 + std::vector> bad_channel_list_fixed_mcc9; + std::map bad_channel_map_fixed_mcc9; + + + /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ + bool IsEventInList(int run, int subrun, int event); + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + std::string m_badChannelLabel; + std::string m_badChannelProducer; + std::string m_mcTrackLabel; + std::string m_mcShowerLabel; + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer;//"daq" + std::ofstream out_stream; + + double m_mass_pi0_mev; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + //Keng, DetectorClocks now is declared in each event +// detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); +// detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + //double m_gain; + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + + int m_Cryostat; + int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + + bool bool_make_sss_plots; + + + //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + + + int m_reco_asso_showers; + + double m_reco_vertex_to_nearest_dead_wire_plane0; + double m_reco_vertex_to_nearest_dead_wire_plane1; + double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + int m_reco_num_templates; + std::vector m_reco_template; /* temp comment: does not seem to be used */ + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + + double m_CRT_dt; //time between flash and nearest CRT hit + + //------------ Track related Variables ------------- + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + // ---- corresponding variables on the best plane of reco track, which is defined as such------ + // if plane 2 have good hits, then plane 2 is the best-plane + // otherwise, which plane of plane 0 and 1 has more good hits will be best plane + // if none of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + + std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + std::vector m_reco_track_end_to_nearest_dead_wire_plane1; + std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + /* event origin types: + * kUnknown: ??? + * kBeamNeutrino: Beam neutrinos. + * kCosmicRay: Cosmic rays. + * kSuperNovaNeutrino: Supernova neutrinos. + * kSingleParticle: single particles thrown at the detector + */ + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + * if there is no shower hits, set to 999 + * if there is shower hits but no track hits, set to -999 + */ + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + * of each plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + * set to -999 if there is no unassociated hits or track hits on plane + */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + * on each plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + + /*-------------------------------------------------------------------------------------*/ + + //------------ Shower related Variables ------------- + + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + //end flash matching + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + + + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + + + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + * plane 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + + + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + + double m_mctruth_leading_exiting_proton_energy; + + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + + + int m_mctruth_num_reconstructable_protons; + + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + * close enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + + + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + + + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + double _time2cm;//value modeled from David's shower code + + // PID-related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + //Geant4 + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + + + + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ + bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ + }; + + DEFINE_ART_MODULE(SinglePhoton) + +} // namespace lar_pandora +#endif +//------------------------------------------------------------------------------------------------------------------------------------------ +// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/TruncMean.h b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/TruncMean.h rename to sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h diff --git a/sbncode/SinglePhotonAnalysis/analyze_EventWeight.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/analyze_EventWeight.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h diff --git a/sbncode/SinglePhotonAnalysis/analyze_Geant4.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/analyze_Geant4.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h diff --git a/sbncode/SinglePhotonAnalysis/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/analyze_MCTruth.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h diff --git a/sbncode/SinglePhotonAnalysis/analyze_OpFlashes.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/analyze_OpFlashes.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h diff --git a/sbncode/SinglePhotonAnalysis/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h similarity index 99% rename from sbncode/SinglePhotonAnalysis/analyze_Showers.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 58f73d6c5..cffe7ab33 100644 --- a/sbncode/SinglePhotonAnalysis/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -1008,7 +1008,7 @@ namespace single_photon } void SinglePhoton::AnalyzeKalmanShowers( const std::vector>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesService const & theDetector){ + detinfo::DetectorPropertiesData const & theDetector){ std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("<>> sliceIdToPFPMap; - //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ + //for (unsigned int i = 0; i< pfParticleVector.size(); i++){} for(auto item: pfParticleMap){ art::Ptr start_pfp = item.second; //no longer skipping pfp's that are clear cosmics @@ -378,7 +378,7 @@ namespace single_photon // } } - // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ + // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){} std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); //return sliceIdToNumPFPsvec; diff --git a/sbncode/SinglePhotonAnalysis/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/analyze_Tracks.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h diff --git a/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h b/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h new file mode 100644 index 000000000..d7c5a44f5 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h @@ -0,0 +1,131 @@ +#include "SinglePhoton_module.h" + + +namespace single_photon +{ + + //line between x1 and x2, point x0; + //Keng: have move this +// double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ +// double x1 =X1.at(0); +// double y1 =X1.at(1); +// double z1 =X1.at(2); +// +// double x2 =X2.at(0); +// double y2 =X2.at(1); +// double z2 =X2.at(2); +// +// double x0 =point.at(0); +// double y0 =point.at(1); +// double z0 =point.at(2); +// +// double x10 = x1-x0; +// double y10 = y1-y0; +// double z10 = z1-z0; +// +// double x21 = x2-x1; +// double y21 = y2-y1; +// double z21 = z2-z1; +// +// double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); +// +// // right, but can be simplified +// double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); +// +// +// return sqrt(d2); +// +// } + + + // minimum distance between point and dead wire + // Keng, have moved this; +// double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, +// const geo::GeometryCore * geom, +// std::vector> & bad_channel_list_fixed_mcc9 ){ +// +// double min_dist = 999999; +// +// for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ +// int channel = bad_channel_list_fixed_mcc9[i].first; +// int is_ok = bad_channel_list_fixed_mcc9[i].second; +// if(is_ok>1)continue; +// +// auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel +// auto result = geom->WireEndPoints(wireids[0]); +// +// //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; +// std::vector end = {0.0,result.end().Y(),result.end().Z()}; +// std::vector point = {0.0,Ypoint,Zpoint}; +// double dist = dist_line_point(start,end,point); +// min_dist = std::min(dist,min_dist); +// } +// +// return min_dist; +// +// } + + + //Typenamed for recob::Track and recob::Shower + //Guanqun: this function didn't do anything? + template + int badChannelMatching(std::vector& badchannels, + std::vector& objects, + std::map< T, art::Ptr > & objectToPFParticleMap, + std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9){ + + + + + for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; + const std::vector> hits = pfParticleToHitsMap[pfp]; + + int min_dist_from_bad_channel = 99999; + + for(size_t h=0; h hit = hits[h]; + + + //int nch = (int)badchannels.size()/3; + //for(int i=0; i1)continue; + int dist =hit->Channel()-bc; + auto hs = geom->ChannelToWire(bc); + //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); + std::vector end(3); + auto result = geom->WireEndPoints(hs[0]); + + // std::cout<<"KNK: "<>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesService const & theDetector) + detinfo::DetectorPropertiesData const & theDetector) { int total_track_hits =0; diff --git a/sbncode/SinglePhotonAnalysis/reco_truth_matching.h b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h similarity index 100% rename from sbncode/SinglePhotonAnalysis/reco_truth_matching.h rename to sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h diff --git a/sbncode/SinglePhotonAnalysis/second_shower_search.h b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h similarity index 99% rename from sbncode/SinglePhotonAnalysis/second_shower_search.h rename to sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h index d6b3ef6be..10b0e98c0 100644 --- a/sbncode/SinglePhotonAnalysis/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h @@ -252,7 +252,7 @@ namespace single_photon std::vector>& mcParticleVector, std::map< size_t, art::Ptr> & pfParticleIdMap, std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - detinfo::DetectorPropertiesService const & theDetector + detinfo::DetectorPropertiesData const & theDetector ){ diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index edcb4a512..a0be4c4c7 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -3,3 +3,14 @@ Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` froen on Jan. 18 The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge)[https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge] + +## Whats in the directories +`App` contains the main code. + +`Libraries` contains essential headers for this module. + +`SEAview` is an additional module runs inside this module. + +`job` contains jobs for running the module. + +`Utilities` contains helper functions for simple calculations. diff --git a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt new file mode 100644 index 000000000..5f2c1ba90 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt @@ -0,0 +1,74 @@ +link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) + +art_make( BASENAME_ONLY + LIB_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larpandora_LArPandoraInterface + ${PANDORASDK} + ${PANDORAMONITORING} + LArPandoraContent + nusimdata_SimulationBase + ${UB_DATA_TYPES} + ${Boost_SERIALIZATION_LIBRARY} + nurandom::RandomUtils_NuRandomService_service + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} + MODULE_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larpandora_LArPandoraInterface + SignalShapingServiceMicroBooNE_service + nusimdata_SimulationBase + ${UB_DATA_TYPES} + ${Boost_SERIALIZATION_LIBRARY} + nurandom::RandomUtils_NuRandomService_service + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} ) + +install_headers() +install_fhicl() +install_source() diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc new file mode 100644 index 000000000..8f280fee4 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc @@ -0,0 +1,1304 @@ +#include "SEAviewer.h" +#include +#include + +namespace seaview{ + + int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ + + const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); + bool found_hit_in_slice = false, found_hit_not_in_slice = false; + for(auto hit : f_hits){ + auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); + if( iter == slice_hits.end()) + found_hit_not_in_slice = true; + else{ + found_hit_in_slice = true; + } + + if(found_hit_in_slice && found_hit_not_in_slice) return 0; + } + + return found_hit_in_slice ? 1 : -1; + } + + + void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ + + //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC + double max_ioc_to_shower_start = DBL_MIN; + size_t num_hits = cl.f_hits.size(); + + + for(size_t i = 0; i!= num_hits; ++i){ + auto &h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + //geometric properties + double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); + double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); + double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; + cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); + cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); + + //remember two hits with min/max IOC + if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ + cl.f_min_ioc_to_shower_start = ioc_to_shower_start; + cl.start_hit_idx = i; + } + if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. + max_ioc_to_shower_start = ioc_to_shower_start; + cl.end_hit_idx = i; + } + + + } //end of hit loop + + + // second round: group hits in two categories, first half and second half + // get the direction of the cluster + auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); + std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; + std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; + std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; + std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; + cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); + + cl.f_hit_group.resize(num_hits); + for(size_t i = 0; i!=num_hits; ++i){ + auto h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; + + if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ + cl.f_hit_group[i] = 1; + cl.f_mean_ADC_first_half += h->SummedADC(); + } + else{ + cl.f_hit_group[i] = 2; + cl.f_mean_ADC_second_half += h->SummedADC(); + } + } + cl.f_track_treated = true; + + size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); + size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); + if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; + if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; + cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); + + if( num_hits < 2){ + std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; + return; + } + + //angle between the track cluster and the shower direction + //cluster direction unit vector + double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); + std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; + //shower direction unit vector + double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); + std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; + //angle between two unit vector, in radian + cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); + + + if(cl.f_score.min_wire == cl.f_score.max_wire){ + std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; + return; + } + //fit to wire-tick plot of the cluster, see how straight cluster is + TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); + //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); + //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + if(fit_status == 0){ + //f1 = graph_copy->GetFunction("f1"); + f1 = cl.f_graph.GetFunction("f1"); + cl.f_fit_chi2 = f1->GetChisquare(); + } + //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; + } + + + // constructor + // CHECK, this constructor is not found; + SEAviewer::SEAviewer(std::string intag, + geo::GeometryCore const * ingeom, + detinfo::DetectorPropertiesData const & intheDetector ) + : tag(intag), geom(ingeom), theDetector(intheDetector){ + chan_max = {-9999,-9999,-9999}; + chan_min = {9999,9999,9999}; + tick_max = -99999; + tick_min = 99999; + + plot_true_vertex = false; + vertex_tick.resize(3); + vertex_chan.resize(3); + vertex_graph.resize(3); + + true_vertex_tick.resize(3); + true_vertex_chan.resize(3); + true_vertex_graph.resize(3); + + tick_shift = 350; + chan_shift = 100; + + n_showers=0; + n_pfps = 0; + has_been_clustered = false; + hit_threshold = -10; + + rangen = new TRandom3(0); //same seed everytime + } + + + int SEAviewer::setBadChannelList(std::vector> &in){ + m_bad_channel_list = in; + return 0; + } + + int SEAviewer::addHitsToConsider(std::vector>& hits){ + for(auto &h: hits){ + map_unassociated_hits[h] = true; + map_considered_hits[h] = true; + } + return 0; + } + + int SEAviewer::filterConsideredHits(double dist_to_vertex){ + + //collect all hits that are under consideration for clustering + std::vector> current_hits; + for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ + current_hits.push_back(map_iter->first); + } + + //remove hits that are too far from vertex + for(auto &h: current_hits){ + int p = h->View(); + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); + + if(dist > dist_to_vertex){ + map_unassociated_hits.erase(h); + map_considered_hits.erase(h); + } + } + return 0; + } + + int SEAviewer::setHitThreshold(double h){ + hit_threshold = h; + return 0; + } + + int SEAviewer::addAllHits(std::vector>& hits){ + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto&h: hits){ + if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + //tick_max = std::max(tick_max, (double)h->PeakTime()); + //tick_min = std::min(tick_min, (double)h->PeakTime()); + //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + } + + for(int i=0; i<3; i++){ + vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph + } + + vec_all_ticks = vec_tick; + vec_all_chans = vec_chan; + + return 0; + } + + std::vector SEAviewer::calcUnassociatedHits(){ + int n_unassoc=0; + int n_below_thresh = 0; + std::vector> vec_tick(3); + std::vector> vec_chan(3); + std::vector>> vec_pts(3); + std::vector>> vec_hits(3); + + + int n_all =map_considered_hits.size(); + + for(const auto &pair: map_considered_hits ){ + auto& h = pair.first; //type of h: recob::Hit + if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ + + if(h->SummedADC() < hit_threshold){ + n_below_thresh++; + continue; + } + + // if summed ADC of the hit passes threshold + n_unassoc++; + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back(tick); + + vec_pts[(int)h->View()].push_back({wire,tick}); + vec_hits[(int)h->View()].push_back(h); + tick_max = std::max(tick_max, tick); + tick_min = std::min(tick_min, tick); + //chan_max, chan_min stores: max, min unassociated channel for each plane + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + + } + + for(int i=0; i<3; i++){ + vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + + vec_unass_ticks = vec_tick; + vec_unass_chans = vec_chan; + vec_unass_pts = vec_pts; + vec_unass_hits = vec_hits; + + return {n_all,n_unassoc,n_below_thresh}; + } + + + int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ + n_pfps++; + + format_legend(legend, arg1, arg2, arg3); + + vec_pfp_legend.push_back(legend); + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto &h: hits){ + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //remove from unassociated hits + map_unassociated_hits[h] = false; + } + + std::vector t_graphs; + for(int i=0; i<3; i++){ + t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + vec_graphs.push_back(t_graphs); + vec_ticks.push_back(vec_tick); + vec_chans.push_back(vec_chan); + return 0; + } + + int SEAviewer::addShower(art::Ptr&shr){ + n_showers++; + + vec_showers.push_back(shr); + + return 0; + } + + int SEAviewer::addTrack(art::Ptr&trk){ + n_tracks++; + + vec_tracks.push_back(trk); + + return 0; + } + + + std::vector> SEAviewer::to2D(std::vector & threeD){ + + auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + std::vector> ans(3); + + for(int i=0; i<3; i++){ + double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); + double time = calcTime(threeD[0], i, fTPC,fCryostat, theDetector); + + ans[i] = {wire,time}; + } + + return ans; + } + + + + int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + // use vector here, so that to plot the single point using TGraph + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + + vertex_tick[i] = time[0]; + vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + plot_true_vertex = true; + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + + true_vertex_tick[i] = time[0]; + true_vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + true_vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::Print(double plot_distance){ + + + std::string print_name = "SEAview_"+tag; + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); + can->Divide(4,1,0,0.1); + + double plot_point_size=0.4; + + //******************************* First plot "Vertex" *************************************** + + //Calculate some things + //Guanqun: what does tick_min - tick_shift actually mean? + double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; + double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; + //double real_tick_min = tick_min-tick_shift ; + //double real_tick_max = tick_max+tick_shift ; + + + std::vector real_wire_min(3); //real x axis edges for 3 planes + std::vector real_wire_max(3); + + for(int i=0; i<3; i++){ + TPad * pader = (TPad*)can->cd(i+1); + + if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); + + //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) + real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; + real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; + + //fix the area to show, always show area large enough to hold all track/showers + //real_wire_min[i] = chan_min[i]-chan_shift ; + //real_wire_max[i] = chan_max[i]+chan_shift ; + + vertex_graph[i].SetMarkerStyle(29); + vertex_graph[i].SetMarkerSize(2); + vertex_graph[i].SetMarkerColor(kMagenta-3); + vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); + vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); + vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); + vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); + vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + vertex_graph[i].Draw("ap"); + + if(i>0){ + vertex_graph[i].GetYaxis()->SetLabelOffset(999); + vertex_graph[i].GetYaxis()->SetLabelSize(0); + } + } + + /********************************* Non Slice Hits ****************************/ + + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + vec_all_graphs[i].Draw("p same"); + vec_all_graphs[i].SetMarkerColor(kGray); + vec_all_graphs[i].SetFillColor(kWhite); + vec_all_graphs[i].SetMarkerStyle(20); + vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); + } + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< m_bad_channel_list.size(); i++){ + int badchan = m_bad_channel_list[i].first; + int ok = m_bad_channel_list[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + + if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ + //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){} + can->cd(thisp+1); + TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); + //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); + l->SetLineColor(kGray+1); + l->Draw("same"); + //can->cd(thisp+5);// Guanqun: how many values can plane ID take? + //l->Draw("same"); + //can->cd(thisp+9); + //l->Draw("same"); + } + } + + + ///******************************** Plotting all PFP's *********************************8 + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + + if(n_pfps > (int)tcols.size()){ + for(int i =0; i< (int)(n_pfps +2); i++){ + //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + tcols.push_back(kRed); + } + } + + + for(int p=0; pcd(i+1); + if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_graphs[p][i].Draw("p same"); + vec_graphs[p][i].SetMarkerColor(tcol); + vec_graphs[p][i].SetFillColor(tcol); + vec_graphs[p][i].SetMarkerStyle(20); + vec_graphs[p][i].SetMarkerSize(plot_point_size); + } + } + } + + + //Plot all Shower lines. Might need a bit of work here.. + std::vector lines; + + for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + //std::cout<cd(i+1); + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0]cd(i+1); + TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); + lines.push_back(l); + l->SetLineColorAlpha(tcols[s],0.5); + l->SetLineWidth(1); + l->SetLineStyle(2); + l->Draw(); + + } + + } + + /********************************* Unassociated Hits ****************************/ + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_unass_graphs[i].Draw("p same"); + vec_unass_graphs[i].SetMarkerColor(kBlack); + vec_unass_graphs[i].SetFillColor(kBlack); + vec_unass_graphs[i].SetMarkerStyle(20); + vec_unass_graphs[i].SetMarkerSize(plot_point_size); + } + } + + /******************************* Clustered Hits ***********************************/ + // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. + if(has_been_clustered){ + + std::vector cluster_colors(vec_clusters.size()+1,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(size_t j=0; j< vec_clusters.size()+1; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + for(auto &c: vec_clusters){ + int pl = c.getPlane(); + can->cd(pl+1); + if (c.getGraph()->GetN()>0){ + c.getGraph()->Draw("p same"); + c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); + c.getGraph()->SetFillColor(cluster_colors[c_offset]); + c.getGraph()->SetMarkerStyle(20); + //c.getGraph()->SetMarkerSize(plot_point_size); + c.getGraph()->SetMarkerSize(plot_point_size*1.5); + //std::cout<<"Printing cluster "<cd(i+1); + vertex_graph[i].Draw("p same"); + + double rad_cm = 12.0; + TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); + ell_p.SetLineColor(kRed); + ell_p.SetFillStyle(0); + ell_p.Draw("same"); + } + + //**************************** INFO ***************************/ + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + /*TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + */ + TLegend l_top(0.1,0.0,0.9,1.0); + l_top.SetTextSize(0.05); + + for(int p=0; p0){ + l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][1].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][2].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); + } + + } + + // draw legend for clustered hits if there is any + for(const auto &cluster : vec_clusters){ + + // only consider clusters that are second shower candidates + if(cluster.getLegend().empty()) continue; + + // if the cluster is out of the plotting range, do not include it in the legend + if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ + l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); + } + } + + l_top.SetHeader(print_name.c_str(),"C"); + l_top.SetLineWidth(0); + l_top.SetLineColor(kWhite); + l_top.Draw("same"); + + + + can->Update(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + + + return 0; + } + + int SEAviewer::runseaDBSCAN(double min_pts, double eps){ + + has_been_clustered = true; + num_clusters = {0,0,0}; + cluster_labels.resize(3); + + for(int i=0; i<3; i++){ + + std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; + std::vector> hitz; + + + for(size_t p=0; p< vec_unass_pts[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ + + t_pts.push_back(vec_unass_pts[i][p]); + hitz.push_back(vec_unass_hits[i][p]); + } + + } + + if(hitz.size()!=0){ + std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + + // Grab the shower start and shower direction + std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + vec_clusters[c].setShowerRemerge(is_in_shower); + + std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); + std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + /* + std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); + for(size_t c=0; c< vec_clusters.size(); c++){ + //Loop over all hits in this clusters + for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ + int n2_hits = vec_clusters[c2].getHits().size(); + int n2_matched = 0; + if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane + for(auto &h : vec_clusters[c].getHits()){ + //get time spread of this hit. + double pp = h->PeakTimePlusRMS(1.0); + double pm = h->PeakTimeMinusRMS(1.0); + for(auto &h2 : vec_clusters[c2].getHits()){ + if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; + } + } + percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; + std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); + std::cout<0){ + + + TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); + + int Npts = 20; + //TODO need to write this function + TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + + //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + } + + double impact_parameter = 1e10; + + //rudimentary! + for(double k=chan_min[pl]; k< chan_max[pl];k++){ + double y = slope*k+con; + double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); + impact_parameter = std::min(impact_parameter,dist); + } + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; + double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); + double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); + double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); + + + std::cout<<"SSSNEW "<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + std::vector> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; + double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); + + if(dist< min_d){ + min_p = (int)p; + min_d = dist; + } + } + + } + + + + } + + } + */ + + return {0}; + + + } + + double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ + // convert {wire, tick} coordinate to [cm, cm] coordinate + double x1 =X1.at(0)*wire_con; + double y1 =X1.at(1)*tick_con; + + double x2 =X2.at(0)*wire_con; + double y2 =X2.at(1)*tick_con; + + double x0 =point.at(0)*wire_con; + double y0 =point.at(1)*tick_con; + + double x10 = x1-x0; + double y10 = y1-y0; + + double x21 = x2-x1; + double y21 = y2-y1; + + double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); + + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); + + + return sqrt(d2); + + } + + cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + cluster_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } // end of hitz loop + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; + std::vectorall_tick; + std::vectorall_dist; + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + // sorted_in has indices of elements in all_dist in descending order + std::vector sorted_in = seaview_sort_indexes(all_dist); + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i>& hitz = cl.getHits(); + cl.f_ADC_hist.StatOverflows(kTRUE); + + for(auto& h : hitz){ + cl.f_ADC_hist.Fill(h->SummedADC()); + } + + cl.f_meanADC = cl.f_ADC_hist.GetMean(); + cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); + return; + } + + + + void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ + + //grab the plane number, and impact parameter of the cluster + int plane = vec_clusters.at(cluster).getPlane(); + double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); + + //need to use stringstream to control the number of digits.. + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << energy; + ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; + ss3 << std::setprecision(2) << std::fixed << overlay_fraction; + + std::string legend; + //add the truth information to the legend if the cluster is matched to a MCParticle + if(is_matched == 1){ + legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " + + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; + } + else{ + legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); + } + vec_clusters.at(cluster).setLegend(legend); + } + + + void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << arg1; + ss2 << std::setprecision(2) << std::fixed << arg2; + ss3 << std::setprecision(1) << std::fixed << arg3; + + if(leg == "Shower"){ + leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " + + ss3.str() + " impact par.}"; + //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; + + }else{ + //for tracks, 3rd argument is not used + leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; + } + } +} diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h new file mode 100644 index 000000000..929b4ac4f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h @@ -0,0 +1,453 @@ +#ifndef SEAVIEWER_H +#define SEAVIEWER_H + +#include + +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include + +#include + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "larcore/Geometry/Geometry.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "TCanvas.h" +#include "TGraph.h" +#include "TFile.h" +#include "TAxis.h" +#include "TLine.h" +#include "TLatex.h" +#include "TLegend.h" +#include "TPrincipal.h" +#include "TFitResultPtr.h" +#include "TVectorD.h" +#include "TMatrixD.h" +#include "TF1.h" +#include "TH1D.h" +#include "TEllipse.h" +#include "TRandom3.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "seaDBSCAN.h" +namespace seaview { + + class SEAviewer; + + template + std::vector seaview_sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); //fill the range with sequentially increasing values + + // sort indexes based on comparing values in v (descending order) + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + + + struct cluster_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; /* number of wires spanned by the cluster */ + int n_ticks; /* number of ticks spanned by the cluster */ + + bool pass; + + cluster_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of cluster_score class + + + + + class cluster { + friend class SEAviewer; + + public: + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){ + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts, &wires[0], &ticks[0]); + f_graph = af_graph; + + }; + int setScore(cluster_score &in_score){ f_score = in_score;return 0;} + void setLegend(const std::string &in_leg){ + f_legend = in_leg; + } + + void setWireTickBasedLength( double d) { f_wire_tick_based_length = d;} + double getWireTickBasedLength() const {return f_wire_tick_based_length; } + bool isTrackAnalyzed() const {return f_track_treated; } + cluster_score * getScore(){return &f_score;}; + int getID() const {return f_ID;} + int getPlane() const {return f_plane; } + std::vector> getPTS() const {return f_pts;} + TGraph * getGraph(){ return &f_graph;} + TH1D* getADCHist() {return &f_ADC_hist;} + const TGraph * getGraph() const { return &f_graph;} + const std::string &getLegend() const {return f_legend; } + const std::vector>& getHits(){return f_hits;} + int getShowerRemerge() const {return f_shower_remerge;} + int setShowerRemerge(int remerge_in){ + f_shower_remerge = remerge_in; + return f_shower_remerge; + } + double getMeanADC() const { return f_meanADC; } + double getADCrms() const {return f_ADC_RMS;} + + //----------------------- second-shower relatd function ----------------------- + void setImpactParam(double d) {f_ImpactParameter = d; } + + /* brief: set the angle between direction of second shower candidate cluster and direction of the primary shower*/ + void setAngleWRTShower(double d) {f_AngleWRTShower = d;} + void setFitSlope(double d) { f_FitSlope = d;} + void setFitCons(double d) { f_FitCons = d;} + double getAngleWRTShower() const {return f_AngleWRTShower;} + double getFitSlope() const {return f_FitSlope; } + double getFitCons() const {return f_FitCons;} + double getImpactParam() const {return f_ImpactParameter; } + + + // ----------------------- track search related function ----------------------- + double getMinHitImpactParam() const {return f_min_impact_parameter_to_shower; } + double getMinHitConvDist() const { return f_min_conversion_dist_to_shower_start; } + double getMinHitIOC() const {return f_min_ioc_to_shower_start;} + double getIOCbasedLength() const {return f_ioc_based_length; } + size_t getTrackStartIdx() const {return start_hit_idx; } + size_t getTrackEndIdx() const {return end_hit_idx;} + double getMeanADCFirstHalf() const { return f_mean_ADC_first_half; } + double getMeanADCSecondHalf() const {return f_mean_ADC_second_half; } + double getMeanADCRatio() const {return f_mean_ADC_first_to_second_ratio; } + double getTrackAngleToShowerDirection() const {return f_angle_wrt_shower_direction; } + double getLinearChi() const {return f_fit_chi2; } + + /* brief: check if this cluster is fully in given slice or not + * return: 1 -> Fully in given Slice; -1 --> Fully not in given slice; 0: parts in given slices, parts not + */ + int InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID); + + // determine if the cluster is within the plot range + // tick_max, tick_min, wire_max, and wire_min are the edges of the X axis(wire) and Y axis(tick) + bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const{ + return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max; + } + + + private: + int f_ID; + int f_npts; + int f_plane; + bool f_track_treated = false; //boolean indicating whether the hits have been analyzed as track candidate + + std::vector> f_pts; //vector of {wire, tick} pairs of all the hits + std::vector> f_hits; + std::vector f_hit_group; //group the hits in two groups: first half, second half (directionality-wise) + cluster_score f_score; + int f_shower_remerge = -1; //index of the reco shower if the cluseter is close enough to a reco shower, otherwise -1. + TGraph f_graph; //2D {wire, tick} graph + TH1D f_ADC_hist; // histograms of ADC of every hit + std::string f_legend; //legend of the f_graph + + + // -------- track-like properties ------------------------- + + //add a few parameters that are useful to find tracks in no recob::track events + double f_min_impact_parameter_to_shower = 1e10; // mininum impact parameter of hits to the recob::shower direction + // will be default value if the cluster didn't pass cut on ssscore + double f_min_conversion_dist_to_shower_start = 1e10; //minimum distance of hits to the recob::shower start + double f_min_ioc_to_shower_start = 1e10; //minimum ioc of all hits to the recob::shower direction + double f_ioc_based_length = -1.0; // length of the cluster, calculated based on the IOC of hits + double f_wire_tick_based_length = -1.0; + + size_t start_hit_idx = SIZE_MAX; //index of the start hit + size_t end_hit_idx = SIZE_MAX; //index of the end hit + double f_mean_ADC_first_half = 0.0; + double f_mean_ADC_second_half = 0.0; + double f_mean_ADC_first_to_second_ratio = 0.0; + + double f_angle_wrt_shower_direction = -1.0; // angle between the cluster direction and the shower direction, in radian + // for track search, for proton track veto + double f_fit_chi2 = 0.0; //chi2 of the linear fit to the cluster (2D) + double f_ADC_RMS = -1.0; //RMS of the summed ADC of hits + double f_meanADC = -1.0; // mean of hits ADC + + + //-------- shower-like properties ------------------------------- + + double f_ImpactParameter = -1.0; //impact parameter of the vertex wrt to the cluster + double f_FitSlope = 0.0; //slope of the fitted shower/cluster direction + double f_FitCons = 0.0; //intercept of the fitted shower/cluster direction + + double f_AngleWRTShower = -1.0; //angle between cluster-vertex direction and primary_shower_start-vertex direction, assuming cluster and primary shower both point back to the vertex + // specific for second shower search for 1g1p analysis + + }; // end of class cluster + + + class SEAviewer { + + public: + + //constructor + //Keng, DetectorProperties--> DetectorPropertiesData + SEAviewer(std::string tag,geo::GeometryCore const * geom,detinfo::DetectorPropertiesData const & theDetector ); + + void configure(const fhicl::ParameterSet& pset){}; + + int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z); + int addTrueVertex(double x, double y,double z); + + /* @brief: add all the given hits to be considered for clustering + * @note: these hits are subject to further selection by filterConsideredHits() before clustering + */ + int addHitsToConsider(std::vector>& hits); + int addAllHits(std::vector>& hits); + + /* @brief: filter given hits before further clustering - only use hits near vertex for clustering + * @param: dist_to_vertex - distance to vertex in cm + */ + int filterConsideredHits(double dist_to_vertex); + + /* @brief: add hits for PFParticles + * @param: leg - legend for this PFParticle, for plotting purposes + * @param: if leg is 'shower', arg1 expects shower energy; arg2 expects conversion distance; arg3 expects impact parameter + * @param: if leg is 'track', arg1 expects track length; arg2 expects PCA; arg3 currently not used + */ + int addPFParticleHits(std::vector>& hits, std::string leg , double arg1 = 0.0, double arg2 = 0.0, double arg3=0.0); + int setBadChannelList(std::vector> &in); + int addShower(art::Ptr&shr); + int addTrack(art::Ptr&trk); + std::vector calcUnassociatedHits(); + int setHitThreshold(double); + int Print(double plot_distance); + int runseaDBSCAN(double min_pts, double eps); + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + //WireCoordinate returns the index of the nearest wire to the specified position. + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detprop){ + double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + /* @brief: given a 3D space point, calculate the [wire, tick] of the point on 3 planes */ + std::vector> to2D(std::vector & threeD); + + + /* @brief: given two points on a line, and another point (in 2D space), calculate the impact parameter + * @param: 3 parameter of std::vector are {wire, tick} vectors + */ + double dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point); + + + //distance between two {wire, tick} points, in cm + double dist_point_point(double w1, double t1, double w2, double t2) const{ + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + } + + + //@brief: given a cluster, loop through all its hits, calc and update info on mean ADC, ADC RMS. + void BasicClusterCalorimetry(cluster& cl); + + // @brief: given primary shower, analyze all the clusters in a track-like way with the assumtion that primary shower will point back to the cluster + // @param: vec_c: vector of clusters to be filled + std::vector analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); + + + // @brief: given primary shower, analyze all the clusters, draw them on the canvas, together with fitted direction of the cluseter (with the assumption that the cluster and primary shower both pointing back to the vertex) + // @param: vec_c: vector of clusters to be filled + std::vector analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); + + + // @brief: analyze cluster cl as a track candidate, and save track-related information in the cluster object + // @param: shower_start_pt_2D, shower_other_pt_2D: {wire, tick} coordinate of shower start, and another point on shower direction line, projected to the plane cl is on. + void TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D); + + + // @brief: check if there is a hit in hitz close enought to one of the reco showers, if so return the index of that reco shower + // @param: hitz is usually a cluster of unassociated hits + int SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); + + // Guanqun: @brief: analyze a cluster of hits and summarize its property into an cluster_score + // argument shower is not used in the function body + cluster_score SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); + + //@ brief: as name says, get Npts hits that're nearest from vertex + // return the {wire, tick} info of these hits as a TGraph + TGraph* SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + + void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction); + + + + //conversion from wire, tick to cm + static constexpr double wire_con = 0.3; + static constexpr double tick_con = 1.0/25.0; + + protected: + + int n_pfps; // num of PFParticles (including shower & track) + int n_showers; //num of showers + int n_tracks; //num of tracks + + std::string tag; + double hit_threshold; + bool has_been_clustered; + // PFP, Plane: index + std::vector> vec_graphs; //vector of graphs of [tick vs. wire] for hits of PFParticles. + + std::vector vec_pfp_legend; //legend for each PFParticle, for plotting purpose + // PFP, Plane: index + std::vector>> vec_ticks; //vector of ticks on each plane for all PFParticles + std::vector>> vec_chans; //vector of wires on each plane for all PFParticle + + geo::GeometryCore const * geom; + detinfo::DetectorPropertiesData const & theDetector ; + + double tick_shift; + double chan_shift; + + double tick_max; //min, max tick of all hits + double tick_min; + std::vector chan_max; //min, max wire of all (including vertex) + std::vector chan_min; + + std::vector> m_bad_channel_list; + + //Vertex, size of 3 (on 3 planes) + std::vector vertex_tick; + std::vector vertex_chan; + std::vector vertex_graph; + + bool plot_true_vertex; + //True vertex, size of 3 + std::vector true_vertex_tick; + std::vector true_vertex_chan; + std::vector true_vertex_graph; + + //std::vector> considered_hits; //all hits considered for clustering + //std::vector> all_hits; + std::map,bool> map_unassociated_hits; + std::map, bool> map_considered_hits; + + //Plane: index + std::vector vec_unass_graphs; //graph of [tick vs wire] for unassociated hits that pass the hit threshold + std::vector> vec_unass_ticks; //tick of unassso hits that pass threshold + std::vector> vec_unass_chans; + std::vector>> vec_unass_pts; // [wire, tick] pair for unassociatd hits that pass threshold on each plane + std::vector>> vec_unass_hits; //vector of unasso hits that pss hit threshold on each plane + + + //Plane: index + std::vector vec_all_graphs; //graph of [tick vs wire] for all hits that are not in the slice + std::vector> vec_all_ticks; //tick of all hits that are not in the slice (grouped by plane #) + std::vector> vec_all_chans; //wire of all hits that are not in the slice on each plane. + + std::vector num_clusters; //number of clusters for unassociated hits on each plane + std::vector> cluster_labels; //one-to-one mapped cluster labels for unassociated hits in `vec_unass_pts` + TRandom3 *rangen; + + // all clusters on all 3 planes, each cluster includes points/hits identified for that cluster + std::vector vec_clusters; + std::vector> vec_showers; //vector of recob::Shower contained in this class + std::vector> vec_tracks; + + //-----helper function----------- + + // form legend for recob::shower and recob::track objects + void format_legend(std::string &leg, double arg1 = 0.0, double arg2 = 0.0, double arg3 = 0.0); + + }; + + //define wire conversion, tick conversion factor + constexpr double SEAviewer::wire_con; + constexpr double SEAviewer::tick_con; + +}// namespace + +#endif + diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h new file mode 100644 index 000000000..3bd274140 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h @@ -0,0 +1,159 @@ +/** + * \file seaDBSCAN.h + * + * + * \brief Class def header for a class seaDBSCAN + * + * @author mark ross-lonergan markrl@nevis.columbia.edu + * Written 20th May 2019. + */ + +#ifndef seaDBSCAN_H +#define seaDBSCAN_H + +#include +#include +#include +#include +#include +#include + + +class seaDBSCAN{ + + public: + double m_eps; + int m_minpts; + + /// constructor + seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + ~seaDBSCAN(){} + + // identify each hit to a certain cluster, or identify as noise + std::vector Scan2D(std::vector> &pts); + // get neighbour points for point i from vector pts + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // combine elements in pts to seed if not found in seed + int UnionSets(std::vector> &seed, std::vector> &pts); + // calculate distance between (w1, t1) and (w2, t2) + double SimpleDist(double w1, double t1, double w2, double t2); + +}; + +std::vector seaDBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + //Guanqun: change vector while looping over its elements + //new elements are pushed back to seed_set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + +} + + + +std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; +} + +int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; +} + +double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ + // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 + double wire_con = 0.3; + double tick_con = 1.0/25.0; + + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + +} + +#endif diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 7a623dfba..017fc949f 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,15 +1,16 @@ #include "SinglePhoton_module.h" -#include "analyze_OpFlashes.h" -#include "analyze_Tracks.h" -#include "analyze_Showers.h" +#include "Libraries/analyze_OpFlashes.h" +#include "Libraries/analyze_Tracks.h" +#include "Libraries/analyze_Showers.h" //#include "analyze_Template.h" -#include "analyze_MCTruth.h" -#include "analyze_EventWeight.h" -#include "analyze_Slice.h" -#include "analyze_Geant4.h" -#include "fiducial_volume.h" -#include "second_shower_search.h" -#include "isolation.h" +#include "Libraries/analyze_MCTruth.h" +#include "Libraries/analyze_EventWeight.h" +#include "Libraries/analyze_Slice.h" +#include "Libraries/analyze_Geant4.h" +#include "Libraries/fiducial_volume.h" +#include "Libraries/second_shower_search.h" +#include "Libraries/isolation.h" + namespace single_photon { @@ -202,8 +203,8 @@ namespace single_photon // //Grab services //CHECK ATTEMPTS - auto detClocks = art::ServiceHandle()->DataFor(evt); - auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks); + auto detClocks = art::ServiceHandle()->DataFor(evt);//it is detinfo::DetectorClocksData + auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData //Clear all output branches this->ClearVertex(); @@ -723,27 +724,31 @@ namespace single_photon } } + art::Handle> crthit_h; //only filled when there are hits, otherwise empty + //CHECK + //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; + double evt_timeGPS_nsec = -999 ; + if(m_runCRT){ +//CHECK evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + //CHECK -// art::Handle> crthit_h; //only filled when there are hits, otherwise empty -// art::Handle rawHandle_DAQHeader; -// double evt_timeGPS_nsec = -999 ; -// if(m_runCRT){ -// evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); -// evt.getByLabel(m_CRTHitProducer, crthit_h); // raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); -// art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); -// evt_timeGPS_nsec = evtTimeGPS.timeLow(); -// std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); -// -// -// -// //******************************* Common Optical Filter **************************************************************/ -// //******************************* Common Optical Filter **************************************************************/ -// //Raw Optical fltr + //Keng, time() is set to the trigger time. + art::Timestamp evtTimeGPS = evt.time();//CHECK = my_DAQHeader.gps_time(); + evt_timeGPS_nsec = evtTimeGPS.timeLow(); + + evt.getByLabel(m_CRTHitProducer, crthit_h); + std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); + + + //******************************* Common Optical Filter **************************************************************/ + //******************************* Common Optical Filter **************************************************************/ + //Raw Optical fltr +//CHECK now Optical Filter // art::Handle uBooNE_common_optFltr; // if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ // m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); @@ -757,279 +762,279 @@ namespace single_photon // m_flash_optfltr_pe_veto_tot = -999; // std::cout<<"No opfiltercommon product:"<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); -// this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); -// -// //Run over PID? -// if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); -// -// -// //******************************* Showers **************************************************************/ -// //******************************* Showers **************************************************************/ -// std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); //CHECK, add theDetector -// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); -// -// -// //Some misc things thrown in here rather than in a proper helper function. TODO. fix -// //Calc a fake shower "end" distance. How to define an end distance? good question -// for(size_t i_shr = 0; i_shr s = showers[i_shr]; -// const art::Ptr pfp = showerToNuPFParticleMap[s]; -// const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; -// -// m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; -// m_reco_shower_end_dist_to_SCB[i_shr] = 99999; -// -// for(auto &sp: shr_spacepoints){ -// std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; -// m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); -// double tmo; -// this->distToSCB(tmo,tmp_spt); -// m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); -// -// //This section runs for only 1 shower events for purpose of testing delta specifics -// if(showers.size()==1){ -// m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); -// m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); -// m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); -// } -// -// } -// } -// -// -// //******************************* MCTruth **************************************************************/ -// //******************************* MCTruth **************************************************************/ -// -// //Grab the backtracker info for MCTruth Matching -// art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); -// -// // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. -// // MCShower and MCTrack come from energy depositions in GEANT4 -// -// //Only run if its not data :) -// if(!m_is_data){ -// -// std::vector> gTruthVector; -// if(!m_is_textgen){ -// -// // if Text is in the generator label, skip it. TODO this is a bit simple but works, maybe add a boolean -// art::ValidHandle> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); -// art::fill_ptr_vector(gTruthVector,gTruthHandle); -// if(m_is_verbose){ -// for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); -// art::fill_ptr_vector(mcTruthVector,mcTruthHandle); -// -// //get MCPartilces (GEANT4) -// art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); -// art::fill_ptr_vector(mcParticleVector,mcParticleHandle); -// -// //Found inanalyze_Geant4.h -// //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! -// this->AnalyzeGeant4(mcParticleVector); -// -// -// //Get the MCParticles (move to do this ourselves later) -// this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); -// -// -// //mcc9 march miniretreat fix -// std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP -// std::vector match_vec; //vector of some backtracker thing -// m_test_matched_hits = 0; -// -// for(size_t j=0; j hit = hitVector[j]; -// -// particle_vec.clear(); match_vec.clear(); //only store per hit -// mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); -// if(particle_vec.size() > 0){ -// m_test_matched_hits++; -// } -// } -// -// -// //Important map, given a MCparticle, whats the "hits" associated -// this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); -// -// -// //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly -// std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); -// std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); -// -// //photoNuclearTesting(matchedMCParticleVector); -// -// std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); -// -// std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); -// -// -// std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); -// -// -// //added since last time? -// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind -// -// /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind -// std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID -// std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); -// std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ -// std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); -// -// //if(!m_run_pi0_filter){ -// // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); -// //} -// -// std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); -// -// if (m_print_out_event){ -// if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ -// out_stream <<"run subrunevent "<> ev_evw ; -// if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ -// -// std::map> const & weight_map = ev_evw->front().fWeight; -// if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; -// -// for (auto const& x : weight_map){ -// std::cout << x.first // string (key) -// << ':' -// << x.second.size() << std::endl ; -// if(x.second.size()==1 && x.first == "splines_general_Spline"){ -// m_genie_spline_weight = x.second.front(); -// std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; -// if( evt.getByLabel("eventweight",ev_evw_ph)){ -// std::map> const & weight_map = ev_evw_ph->front().fWeight; -// for (auto const& x : weight_map){ -// std::cout << x.first // string (key) -// << ':' -// << x.second.size() << std::endl ; -// if(x.first == "photonuclear_photon_PhotoNuclear"){ -// auto vec = x.second; -// double ph_low = vec[1]; -// double ph_high = vec[0]; -// std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); -// std::map> const & weight_map = ev_evw_true->front().fWeight; -// if(ev_evw_true->size() > 1) { -// std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" -// << "WARNING: eventweight has more than one entry\n"; -// } -// fmcweight=weight_map; -// } -// -// }//end NOT textgen -// -// -// -// std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"< IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap); -// -// -// -// -// // ################################################### SEAview SEAview ######################################################### -// // ################################################### SEAview SEAview ######################################################### -// -// -// // ################################################### Proton Stub ########################################### -// // ------------- stub clustering --------------------------- -// std::cout << "----------------- Stub clustering --------------------------- " << std::endl; -// std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; -// -// if(!m_run_pi0_filter && m_runSEAviewStub && (m_SEAviewStubNumRecoShower == -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ -// -// // grab all hits in the slice of the reco shower -// art::Ptr p_shr = showers.front(); -// art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; -// std::vector> p_hits = pfParticleToHitsMap[p_pfp]; -// -// int p_sliceid = PFPToSliceIdMap[p_pfp]; -// auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; -// -// std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); -// -// //Setup seaviewr object -// seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector ); + + + + //******************************* Tracks **************************************************************/ + //******************************* Tracks **************************************************************/ + std::cout<<"SinglePhoton::analyze \t||\t Start on Track Analysis "<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); + this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); + + //Run over PID? + if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); + + + //******************************* Showers **************************************************************/ + //******************************* Showers **************************************************************/ + std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); //CHECK, add theDetector + + this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); + + + //Some misc things thrown in here rather than in a proper helper function. TODO. fix + //Calc a fake shower "end" distance. How to define an end distance? good question + for(size_t i_shr = 0; i_shr s = showers[i_shr]; + const art::Ptr pfp = showerToNuPFParticleMap[s]; + const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; + + m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; + m_reco_shower_end_dist_to_SCB[i_shr] = 99999; + + for(auto &sp: shr_spacepoints){ + std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; + m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); + double tmo; + this->distToSCB(tmo,tmp_spt); + m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); + + //This section runs for only 1 shower events for purpose of testing delta specifics + if(showers.size()==1){ + m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); + m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); + m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); + } + + } + } + + //******************************* MCTruth **************************************************************/ + //******************************* MCTruth **************************************************************/ + + //Grab the backtracker info for MCTruth Matching + art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); + + // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. + // MCShower and MCTrack come from energy depositions in GEANT4 + + //Only run if its not data :) + if(!m_is_data){ + + std::vector> gTruthVector; + if(!m_is_textgen){ + + // if Text is in the generator label, skip it. TODO this is a bit simple but works, maybe add a boolean + art::ValidHandle> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); + art::fill_ptr_vector(gTruthVector,gTruthHandle); + if(m_is_verbose){ + for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); + art::fill_ptr_vector(mcTruthVector,mcTruthHandle); + + //get MCPartilces (GEANT4) + art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); + art::fill_ptr_vector(mcParticleVector,mcParticleHandle); + + //Found inanalyze_Geant4.h + //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! + this->AnalyzeGeant4(mcParticleVector); + + + //Get the MCParticles (move to do this ourselves later) + this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); + + + //mcc9 march miniretreat fix + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + m_test_matched_hits = 0; + + for(size_t j=0; j hit = hitVector[j]; + + particle_vec.clear(); match_vec.clear(); //only store per hit + mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); + if(particle_vec.size() > 0){ + m_test_matched_hits++; + } + } + + + //Important map, given a MCparticle, whats the "hits" associated + this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); + + + //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); + + //photoNuclearTesting(matchedMCParticleVector); + + std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); + + std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); + + + std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); + + + //added since last time? + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); + std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ + std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); + + //if(!m_run_pi0_filter){ + // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); + //} + + std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); + + if (m_print_out_event){ + if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ + out_stream <<"run subrunevent "<> ev_evw ; + if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ + + std::map> const & weight_map = ev_evw->front().fWeight; + if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; + + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.second.size()==1 && x.first == "splines_general_Spline"){ + m_genie_spline_weight = x.second.front(); + std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; + if( evt.getByLabel("eventweight",ev_evw_ph)){ + std::map> const & weight_map = ev_evw_ph->front().fWeight; + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.first == "photonuclear_photon_PhotoNuclear"){ + auto vec = x.second; + double ph_low = vec[1]; + double ph_high = vec[0]; + std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); + std::map> const & weight_map = ev_evw_true->front().fWeight; + if(ev_evw_true->size() > 1) { + std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" + << "WARNING: eventweight has more than one entry\n"; + } + fmcweight=weight_map; + } + + }//end NOT textgen + + + + std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"< IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + + + + // ################################################### SEAview SEAview ######################################################### + // ################################################### SEAview SEAview ######################################################### + + + // ################################################### Proton Stub ########################################### + // ------------- stub clustering --------------------------- + std::cout << "----------------- Stub clustering --------------------------- " << std::endl; + std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + + if(!m_run_pi0_filter && m_runSEAviewStub && (m_SEAviewStubNumRecoShower == -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ + + // grab all hits in the slice of the reco shower + art::Ptr p_shr = showers.front(); + art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + int p_sliceid = PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + + //Setup seaviewr object +////CHECK undefined reference? Found in header, but not defined; +// seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector); // //Pass in any bad channels you like // sevd.setBadChannelList(bad_channel_list_fixed_mcc9); // //Give it a vertex to center around @@ -1061,8 +1066,8 @@ namespace single_photon // sevd.addTrack(trk); // ++i_trk; // } -// -// //Add all cosmic-relatd PFP + + //Add all cosmic-relatd PFP // for(auto &cr: crParticles){ // std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; // sevd.addPFParticleHits(p_hits_cr,"cosmic"); @@ -1085,11 +1090,11 @@ namespace single_photon // //Analyze formed clusters and save info // std::vector vec_SEAclusters ; // sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); -// -// -// //And save to file. + + + //And save to file. // std::cout<<"After SEAview we have "<>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); -// m_trackstub_num_candidate_groups = group_result.first; -// m_grouped_trackstub_candidate_indices = group_result.second.first; -// m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; -// } -// + + //group clusters HERE + std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); + m_trackstub_num_candidate_groups = group_result.first; + m_grouped_trackstub_candidate_indices = group_result.second.first; + m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; + } +//CHECK // // // --------------- shower clustering -------------------------- // std::cout << "------------- Shower clustering --------------------" << std::endl; // std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; // -// if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ +// if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ // // art::Ptr p_shr = showers.front(); // art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; @@ -1376,7 +1381,7 @@ namespace single_photon // //And cluster the 2d and 3d second showers. Very simple TODO // this->SimpleSecondShowerCluster(); // -// } +// } // // // // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### @@ -1450,33 +1455,33 @@ namespace single_photon // // } // } -// -// -// -// -// //---------------------- END OF LOOP, fill vertex --------------------- -// -// -// -// bool filter_pass_2g1p = Pi0PreselectionFilter(); -// bool filter_pass_2g0p = Pi0PreselectionFilter2g0p(); -// -// if (m_fill_trees && ( (filter_pass_2g1p && m_run_pi0_filter_2g1p) || (filter_pass_2g0p && m_run_pi0_filter_2g0p) || !m_run_pi0_filter ) ) { -// vertex_tree->Fill(); -// ncdelta_slice_tree->Fill(); -// eventweight_tree->Fill(); -// true_eventweight_tree->Fill(); -// geant4_tree->Fill(); -// } -// -// -// //Rest the vertex after filling -// this->ClearVertex(); -// -// if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; -// else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; -// -// //if not in filter mode pass all + + + + + //---------------------- END OF LOOP, fill vertex --------------------- + + + + bool filter_pass_2g1p = Pi0PreselectionFilter(); + bool filter_pass_2g0p = Pi0PreselectionFilter2g0p(); + + if (m_fill_trees && ( (filter_pass_2g1p && m_run_pi0_filter_2g1p) || (filter_pass_2g0p && m_run_pi0_filter_2g0p) || !m_run_pi0_filter ) ) { + vertex_tree->Fill(); + ncdelta_slice_tree->Fill(); + eventweight_tree->Fill(); + true_eventweight_tree->Fill(); + geant4_tree->Fill(); + } + + + //Rest the vertex after filling + this->ClearVertex(); + + if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; + else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; + + //if not in filter mode pass all return true; }// end filter_module main class diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 7a350e805..a49485986 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -95,12 +95,12 @@ #include #include -#include "helper_functions.h" -//CHECK -//#include "bad_channel_matching.h" -//#include "DBSCAN.h" -// -//#include "SEAview/SEAviewer.h" +#include "HelperFunctions/helper_functions.h" + +#include "Libraries/bad_channel_matching.h" +#include "Libraries/DBSCAN.h" + +#include "SEAview/SEAviewer.h" //------------------------------------------------------------------------------------------------------------------------------------------ @@ -460,8 +460,7 @@ namespace single_photon std::vector>& mcParticleVector, std::map< size_t, art::Ptr> & pfParticleIdMap, std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - detinfo::DetectorPropertiesService const & theDetector - ); + detinfo::DetectorPropertiesData const & theDetector); /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits @@ -500,8 +499,7 @@ namespace single_photon const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesService const & theDetector - ); + detinfo::DetectorPropertiesData const & theDetector); @@ -562,8 +560,7 @@ namespace single_photon std::map,art::Ptr> & pfptotrkmap, std::map,std::vector>> & trktocalomap, std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesService const & theDetector - ); + detinfo::DetectorPropertiesData const & theDetector); void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, std::vector> & mcParticleVector); @@ -906,7 +903,7 @@ namespace single_photon bool m_runCRT; double m_DTOffset; double m_Resolution; - std::string m_DAQHeaderProducer; + std::string m_DAQHeaderProducer;//"daq" std::ofstream out_stream; double m_mass_pi0_mev; diff --git a/sbncode/SinglePhotonAnalysis/helper_functions.h b/sbncode/SinglePhotonAnalysis/helper_functions.h deleted file mode 100644 index cf3d9d6c0..000000000 --- a/sbncode/SinglePhotonAnalysis/helper_functions.h +++ /dev/null @@ -1,175 +0,0 @@ - -namespace single_photon -{ -//-----------------HELPER FUNCTIONS ----------- - //CHECK Copy from bad_channel_matching.h - ////line between x1 and x2, point x0; - double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; - - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; - - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - - // right, but can be simplified - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - - - return sqrt(d2); - - } - // minimum distance between point and dead wire - double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9 ){ - - double min_dist = 999999; - - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int channel = bad_channel_list_fixed_mcc9[i].first; - int is_ok = bad_channel_list_fixed_mcc9[i].second; - if(is_ok>1)continue; - - auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel - auto result = geom->WireEndPoints(wireids[0]); - - //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - std::vector end = {0.0,result.end().Y(),result.end().Z()}; - std::vector point = {0.0,Ypoint,Zpoint}; - double dist = dist_line_point(start,end,point); - min_dist = std::min(dist,min_dist); - } - - return min_dist; - - } - -//--------------- end of copying from bad_channel_matching.h - - double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ - - std::vector vert = {x,y,z}; - std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; - std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; - - return dist_line_point(start, abit, vert); - - } - - // invariant mass of a particle that decays to two showers - double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->ShowerStart().X()-vx; - double s1y = s1->ShowerStart().Y()-vy; - double s1z = s1->ShowerStart().Z()-vz; - double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); - s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) - s1y = s1y/norm1; - s1z = s1z/norm1; - - double s2x = s2->ShowerStart().X()-vx; - double s2y = s2->ShowerStart().Y()-vy; - double s2z = s2->ShowerStart().Z()-vz; - double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); - s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) - s2y = s2y/norm2; - s2z = s2z/norm2; - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - - } - - // invariant mass of two showers, calculated directly from shower directions - double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->Direction().X(); - double s1y = s1->Direction().Y(); - double s1z = s1->Direction().Z(); - - double s2x = s2->Direction().X(); - double s2y = s2->Direction().Y(); - double s2z = s2->Direction().Z(); - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - } - - - - // sort indices in descending order - template - std::vector sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - - return idx; - } - - // sort indices such that elements in v are in ascending order - template - std::vector sort_indexes_rev(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); - - return idx; - } - - - // check if two vectors have same elements (regardless of the order), and arrange their elements in order - template - bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) - { - std::sort(v1.begin(), v1.end()); - std::sort(v2.begin(), v2.end()); - return v1 == v2; - } - - - - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } - - - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesService const& detprop){ - - double time = (detprop.DataForJob()).ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } - - -//----------- END OF HELPER FUNCTIONS ----------- - - -} diff --git a/sbncode/SinglePhotonAnalysis/job/README.md b/sbncode/SinglePhotonAnalysis/job/README.md new file mode 100644 index 000000000..3e9d04367 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/job/README.md @@ -0,0 +1,3 @@ +Use `microboone_singlephoton.fcl` to configure detector independent features of the module; + +Use `run_SinglePhoton_sbnd.fcl` to configure the dector settings; diff --git a/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl new file mode 100644 index 000000000..44724c3cc --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl @@ -0,0 +1,75 @@ +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "larproperties.fcl" +#include "microboone_singlephoton.fcl" +#include "spacecharge.fcl" + +#For SBND: +#include "services_sbnd.fcl" +#include "geometry_sbnd.fcl" +#include "spacecharge_sbnd.fcl" + +process_name : SinglePhoton #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::sbnd_geometry_helper + Geometry: @local::sbnd_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::sbnd_detectorclocks + DetectorPropertiesService: @local::sbnd_detproperties + + TimeTracker: { printSummary: true } + SpaceCharge: @local::sbnd_spacecharge +} + +outputs: { + # optionalout: { module_type: RootOutput + # fileName: "output_file.root" + # fastCloning: false } +} + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + #pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + } + analyzers: {} + filters : { + #singlephotonfil: @local::singlephoton_filter #run in filtering mode + singlephotonana: @local::singlephoton_analyzer #run in ana mode + } + pathana : [ singlephotonana] #path for analysis + trigger_paths : [pathana] + end_paths: [ ] + +} +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +#physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" + +##services.SpaceCharge.EnableCorrSCE: true +##services.SpaceCharge.EnableSimEfieldSCE: true +##services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + From ef8772924ff606e92478098630b5e613f24df0f6 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 18 Feb 2022 12:06:00 -0600 Subject: [PATCH 05/54] add two more directoreis --- .../HelperFunctions/CMakeLists.txt | 4 + .../HelperFunctions/helper_functions.h | 175 ++++++++++++++++++ .../Libraries/CMakeLists.txt | 70 +++++++ 3 files changed, 249 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt new file mode 100644 index 000000000..484834e5b --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt @@ -0,0 +1,4 @@ +link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) +install_headers() +install_fhicl() +install_source() diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h new file mode 100644 index 000000000..d9c92121f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h @@ -0,0 +1,175 @@ + +namespace single_photon +{ +//-----------------HELPER FUNCTIONS ----------- + //CHECK Copy from bad_channel_matching.h + ////line between x1 and x2, point x0; + double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + + return sqrt(d2); + + } + // minimum distance between point and dead wire + double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9 ){ + + double min_dist = 999999; + + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int channel = bad_channel_list_fixed_mcc9[i].first; + int is_ok = bad_channel_list_fixed_mcc9[i].second; + if(is_ok>1)continue; + + auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel + auto result = geom->WireEndPoints(wireids[0]); + + //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + std::vector end = {0.0,result.end().Y(),result.end().Z()}; + std::vector point = {0.0,Ypoint,Zpoint}; + double dist = dist_line_point(start,end,point); + min_dist = std::min(dist,min_dist); + } + + return min_dist; + + } + +//--------------- end of copying from bad_channel_matching.h + + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); + + } + + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; + + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + + } + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); + + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + } + + + + // sort indices in descending order + template + std::vector sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + // sort indices such that elements in v are in ascending order + template + std::vector sort_indexes_rev(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); + + return idx; + } + + + // check if two vectors have same elements (regardless of the order), and arrange their elements in order + template + bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + return v1 == v2; + } + + + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ + + double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + +//----------- END OF HELPER FUNCTIONS ----------- + + +} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt new file mode 100644 index 000000000..efef81222 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt @@ -0,0 +1,70 @@ +link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) + +art_make( BASENAME_ONLY + LIB_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + larpandoraobj + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larpandora_LArPandoraInterface + ${PANDORASDK} + ${PANDORAMONITORING} + LArPandoraContent + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} + MODULE_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larpandora_LArPandoraInterface + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} ) + +install_headers() +install_fhicl() +install_source() From 71771c31c5a69664ed175af0b65f40e6d5d5bae7 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Mon, 21 Feb 2022 13:01:42 -0600 Subject: [PATCH 06/54] use find_package(larpandora) to solve compiling error --- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 2 +- sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index 2aa1a90ff..c7777189e 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -65,7 +65,7 @@ art_make( BASENAME_ONLY ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} ) -#add_subdirectory(SEAview) +add_subdirectory(SEAview) add_subdirectory(job) add_subdirectory(Libraries) add_subdirectory(HelperFunctions) diff --git a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt index 5f2c1ba90..d98565714 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt @@ -1,4 +1,5 @@ link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) +find_package(larpandora) art_make( BASENAME_ONLY LIB_LIBRARIES @@ -13,8 +14,6 @@ art_make( BASENAME_ONLY larsim_MCCheater_BackTrackerService_service larsim_MCCheater_ParticleInventoryService_service larpandora_LArPandoraInterface - ${PANDORASDK} - ${PANDORAMONITORING} LArPandoraContent nusimdata_SimulationBase ${UB_DATA_TYPES} @@ -62,7 +61,6 @@ art_make( BASENAME_ONLY art_Persistency_Provenance canvas art_Utilities canvas ${MF_MESSAGELOGGER} - ${FHICLCPP} cetlib cetlib_except ${CLHEP} From cf0cb9a0625541e121273d4eb724c4adbc5057f5 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 4 Mar 2022 11:31:34 -0600 Subject: [PATCH 07/54] A working version, but need to check if there are missing functionality --- sbncode/CMakeLists.txt | 36 +- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 3 +- .../HelperFunctions/CMakeLists.txt | 1 - .../HelperFunctions/helper_functions.h | 10 +- .../Libraries/analyze_MCTruth.h | 1 + .../Libraries/analyze_OpFlashes.h | 2 +- .../Libraries/analyze_Showers.h | 26 +- .../Libraries/analyze_Slice.h | 3 +- .../Libraries/isolation.h | 25 +- .../Libraries/second_shower_search.h | 826 +-------------- .../SEAview/CMakeLists.txt | 125 ++- .../SinglePhoton_module.cc | 994 +++++++++--------- .../SinglePhoton_module.h | 40 +- .../SinglePhotonAnalysis/job/CMakeLists.txt | 3 - sbncode/SinglePhotonAnalysis/job/README.md | 3 - .../job/microboone_singlephoton.fcl | 78 -- .../job/run_SinglePhoton_sbnd.fcl | 75 -- 17 files changed, 644 insertions(+), 1607 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/job/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/job/README.md delete mode 100644 sbncode/SinglePhotonAnalysis/job/microboone_singlephoton.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 905287bfc..1f09ba47e 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -7,21 +7,21 @@ find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) add_subdirectory(SBNEventWeight) -add_subdirectory(NuMuSelection) -add_subdirectory(OpDet) -add_subdirectory(OpT0Finder) - -add_subdirectory(CAFMaker) -add_subdirectory(Metadata) - -add_subdirectory(Calibration) -add_subdirectory(FlashMatch) -add_subdirectory(LArRecoProducer) -add_subdirectory(TPCReco) - - -add_subdirectory(BeamSpillInfoRetriever) -add_subdirectory(FluxReader) -add_subdirectory(EventGenerator) -add_subdirectory(PID) -add_subdirectory(GeometryTools) +#add_subdirectory(NuMuSelection) +#add_subdirectory(OpDet) +#add_subdirectory(OpT0Finder) +# +#add_subdirectory(CAFMaker) +#add_subdirectory(Metadata) +# +#add_subdirectory(Calibration) +#add_subdirectory(FlashMatch) +#add_subdirectory(LArRecoProducer) +#add_subdirectory(TPCReco) +# +# +#add_subdirectory(BeamSpillInfoRetriever) +#add_subdirectory(FluxReader) +#add_subdirectory(EventGenerator) +#add_subdirectory(PID) +#add_subdirectory(GeometryTools) diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index c7777189e..eb00c17d0 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -36,6 +36,7 @@ art_make( BASENAME_ONLY ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} MODULE_LIBRARIES + sbncode_SinglePhotonAnalysis_SEAview larcorealg_Geometry larcore_Geometry_Geometry_service lardata_Utilities @@ -66,7 +67,7 @@ art_make( BASENAME_ONLY ${ROOT_GEOM} ) add_subdirectory(SEAview) -add_subdirectory(job) +add_subdirectory(jobs) add_subdirectory(Libraries) add_subdirectory(HelperFunctions) install_headers() diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt index 484834e5b..4aca51a83 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt @@ -1,4 +1,3 @@ -link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) install_headers() install_fhicl() install_source() diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h index d9c92121f..362d63536 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h @@ -162,11 +162,11 @@ namespace single_photon } - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ - - double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } +// double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ +// +// double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); +// return time; +// } //----------- END OF HELPER FUNCTIONS ----------- diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 131a8fd5e..93b746efb 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -239,6 +239,7 @@ namespace single_photon vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); } + //CHECK how is this different from MCReco matching? void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h index f05be7087..70f54b1c4 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h @@ -96,7 +96,7 @@ namespace single_photon void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ - // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ + // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){} for(auto pair: crtvetoToFlashMap){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index cffe7ab33..ed5284edd 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -570,7 +570,10 @@ namespace single_photon std::map,bool> &PFPToNuSliceMap, std::map,double> &PFPToTrackScoreMap, PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap){ + std::map, art::Ptr>& PFPtoShowerReco3DMap, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ){ if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResidualRange().back()-calo[p]->ResidualRange()[ix]); double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); - double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); +// double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); + double time = theDetector.ConvertXToTicks(kal_pts[ix].X(), plane, m_TPC,m_Cryostat); //loop over all hits for(auto &hit: hitz){ @@ -1362,7 +1365,9 @@ namespace single_photon std::vector SinglePhoton::CalcdQdxShower( const art::Ptr& shower, const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane){ + std::map, std::vector> > & clusterToHitMap ,int plane, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector){ //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; @@ -1386,9 +1391,8 @@ namespace single_photon //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {0};//CHECK {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->trigger_offset())* _time2cm}; - std::vector cluster_end = {0};//CHECK{thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->trigger_offset())* _time2cm }; + std::vector cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; //check that the cluster has non-zero length double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); @@ -1408,7 +1412,7 @@ namespace single_photon //for each hit in the cluster for (art::Ptr &thishit: hits){ //get the hit position in cm from the wire and time - std::vector thishit_pos ={0};//CHECK {thishit->WireID().Wire * m_wire_spacing, (thishit->PeakTime() - theDetector->trigger_offset())* _time2cm}; + std::vector thishit_pos ={thishit->WireID().Wire * m_wire_spacing, (thishit->PeakTime() - triggeroffset)* _time2cm}; //check if inside the box bool v2 = isInsidev2(thishit_pos, rectangle); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index 2683500e1..63e5e7c0b 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -315,6 +315,7 @@ namespace single_photon allPFPSliceIdVec.push_back(std::pair(start_pfp,slice_id)); // PFPToSliceIdMap[start_pfp] = slice_id; } + //std::cout<<"CHECK "<<__LINE__<<" work on slice ID: "<Self()<<" and slice id "<Self()<<", isNeutrino = "<>& tracks, std::map, art::Ptr> & trackToPFParticleMap, const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, + const std::map>>& sliceIDToHitsMap, detinfo::DetectorPropertiesData const & theDetector) { @@ -113,8 +114,9 @@ void SinglePhoton::IsolationStudy( std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; total_track_hits += trackhits.size(); +//CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs, need to fix this; if(nu_slice_id != sliceid && nu_slice_id != -999){ - std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; art::Ptr pfp = showerToPFParticleMap.at(shower); int sliceid = pfParticleToSliceIDMap.at(pfp); + if(sliceid<0) continue; //negative sliceid is bad CHECK + //CHECK ID not found? + std::cout<<"CHECK "<<__LINE__<<" find hits at ID "<= 0){ std::cout<<"*SSS: So that leaves "<SetLeftMargin(0.1); std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + std::vector time = {theDetector.ConvertXToTicks(m_vertex_pos_x, i, fTPC,fCryostat)}; vertex_time[i] = time[0]; vertex_wire[i] = wire[0]; @@ -645,19 +654,9 @@ std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing w std::cout<<"*PRINTING"<>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - detinfo::DetectorPropertiesData const & theDetector - ){ - - - - std::cout<<"ERROR! SecondShowerSearch has been made redundant by SEAview methodology. see SEAview/SEAview.h for details. This shouldnt be running at all"<> associated_hits; - std::vector> unassociated_hits; - std::vector> unassociated_hits_plane0; - std::vector> unassociated_hits_plane1; - std::vector> unassociated_hits_plane2; - - std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane - - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - int sliceid = pfParticleToSliceIDMap.at(pfp); - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto trackhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"SinglePhoton::SSS\t||\ttrack "< shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - int sliceid = pfParticleToSliceIDMap.at(pfp); - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ - std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); - for(auto &h: slicehits){ - - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ - - //TFile *f = new TFile("t.root","recreate"); - //f->cd(); - - std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); - can->Divide(4,3,0,0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr pfp = showerToPFParticleMap.at(showers[s]); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: showerhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - //vec_c[(int)h->View()].push_back((double)h->Channel()); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_shr[s] = t_pts; - } - - - std::vector> pts_trk( tracks.size(), std::vector(3) ); - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); - auto trackhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: trackhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_trk[t] = t_pts; - } - //Now the "Unassociated Hits" - - std::vector g_unass(3); - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - for(int i=0; i<3; i++){ - - std::vector vec_t; - std::vector vec_c; - - for(auto &h: unassociated_hits_all[i]){ - - double wire = (double)h->WireID().Wire; - vec_c.push_back(wire); - vec_t.push_back((double)h->PeakTime()); - - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - //for reclustering - std::vector pt = {wire,vec_t.back()}; - pts_to_recluster[(int)h->View()].push_back(pt); - mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; - } - - g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - - - } - //Plotting now - double plot_point_size=0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - can->cd(i+5); - g_vertex[i]->Draw("ap"); - - can->cd(i+9); - g_vertex[i]->Draw("ap"); - - - } - - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - //std::cout<<"KNK: "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); - l->SetLineColor(kGray+1); - l->Draw("same"); - can->cd(thisp+5); - l->Draw("same"); - can->cd(thisp+9); - l->Draw("same"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - for(int i=0; i<3; i++){ - can->cd(i+1); - - if(g_unass[i]->GetN()>0){ - g_unass[i]->Draw("p same"); - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - can->cd(i+5); - g_vertex[i]->Draw("p same"); - can->cd(i+9); - g_vertex[i]->Draw("p same"); - - double rad_cm = 12.0; - TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); - ell_p->SetLineColor(kRed); - ell_p->SetFillStyle(0); - ell_p->Draw("same"); - - } - - - - - - - //*****************************DBSCAN*********************************** - //CHECK -// int min_pts = m_SEAviewDbscanMinPts; -// double eps = m_SEAviewDbscanEps; -// std::vector num_clusters(3,0); -// -// std::vector> g_clusters(3); -// std::vector> cluster_labels(3); -// -// -// std::vector vec_clusters; -// -// for(int i=0; i<3; i++){ -// -// std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; -// std::vector> hitz; -// for(size_t p=0; p< pts_to_recluster[i].size(); p++){ -// if(cluster_labels[i][p] == 0) continue;//noise -// if(cluster_labels[i][p] == c){ -// -// pts.push_back(pts_to_recluster[i][p]); -// hitz.push_back(mapPointIndexToHit[i].at(p)); -// } -// -// } -// if(hitz.size()!=0){ -// vec_clusters.emplace_back(c,i,pts,hitz); -// std::cout<<"SinglePhoton::SSS\t||\t Cluster "< h = mapPointIndexToHit[i].at(p);// Get the hit -// size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise -// -// //std::cout<> t_hs= {h}; -// v_newClusterToHitsMap[i][cluster_label] = t_hs; -// }else{ -// v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list -// } -// } -// } -// -// -// //for(size_t i=0; i<3; i++){ -// // for(int c=0; c cluster_colors(max_n_clusters,0); -// std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; -// -// for(int j=0; j< max_n_clusters; j++){ -// int b = (int)rangen->Uniform(0,11); -// int mod = (int)rangen->Uniform(-10,+3); -// -// cluster_colors[j] = base_col[b]+mod; -// } -// int c_offset = 0; -// -// //Step next, loop over and make plots again -// for(int i=0; i<3; i++){ -// std::vector> vec_time(num_clusters[i]+1); -// std::vector> vec_wire(num_clusters[i]+1); -// std::vector tmp_g_clusters(num_clusters[i]+1); -// -// if(cluster_labels[i].size() != pts_to_recluster[i].size()){ -// std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; -// tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); -// can->cd(i+5); -// if( -// tmp_g_clusters[c]->GetN()>0){ -// tmp_g_clusters[c]->Draw("p same"); -// tmp_g_clusters[c]->SetMarkerColor(tcol); -// tmp_g_clusters[c]->SetFillColor(tcol); -// tmp_g_clusters[c]->SetMarkerStyle(20); -// tmp_g_clusters[c]->SetMarkerSize(plot_point_size); -// } -// } -// g_clusters[i] = tmp_g_clusters; -// c_offset += num_clusters[i]; -// } - - //******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - //Clusters - - /* if(m_is_data==false){ - for(auto &c: vec_clusters){ - //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); - //c.setSSScore(ssscor); - - int thisid = m_sim_shower_trackID[0]; - - for(auto &h: c.getHits()){ - - - } - } - } - */ - -//CHECK -// can->cd(8); -// for(int i=0; i<3; i++){ -// TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); -// -// TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); -// -// for(int c=0; c< num_clusters[i]+1; c++){ -// if(c==0)continue; -// -// int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); -// auto hitz = v_newClusterToHitsMap[i][c]; -// auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); -// int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); -// -// double mean_summed_ADC = 0.0; -// for(auto &h:hitz){ -// mean_summed_ADC +=h->SummedADC(); -// } -// mean_summed_ADC = mean_summed_ADC/(double)num_hits_in_cluster; -// -// -// -// // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); -// -// std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; -// l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); -// -// //Here we will only plot those that pass in bottom: -// //We are also going to put a hard threshold of 70cm? -// // -// if(ssscorz.pass && is_in_shower ==-1 ){ -// can->cd(i+9); -// if(g_clusters[i][c]->GetN()>0){ -// TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); -// -// int Npts =m_SEAviewMaxPtsLinFit; -// TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); -// -// core->Draw("p same"); -// tmp->Draw("p same"); -// -// double fmax = -999; -// double fmin = 99999; -// for(int b=0; bGetN(); b++){ -// double ttx=0; -// double tty=0; -// core->GetPoint(b,ttx,tty); -// fmax = std::max(fmax, ttx); -// fmin = std::min(fmin,ttx); -// } -// -//// std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); -// core->GetFunction("pol1")->SetLineWidth(1); -// core->GetFunction("pol1")->SetLineStyle(3); -// core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); -// con = core->GetFunction("pol1")->GetParameter(0); -// slope = core->GetFunction("pol1")->GetParameter(1); -// } -// //lets map (wire,tick) to a rudamentary (cm,cm); -// //double slope2 = slope*25*0.3; -// //double con2 = con*25; -// -// double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); -// -// //rudimentary! -// for(double k=chan_min[i]; k< chan_max[i];k++){ -// double y = slope*k+con; -// double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); -// impact_parameter = std::min(impact_parameter,dist); -// } -// -// //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower -// //vertex_wire[i] vertex_tick[i] (already calcuated) -// //cluster closest point )ssscorz.close_wire and close_tick -// //recob::Shower start point, convered to wire tick. -// -// double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); -// double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); -// -// std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; -// std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; -// double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); -// double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); -// double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); -// //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); -// m_sss_candidate_angle_to_shower.push_back(kinda_angle); -// -// -// if(m_is_data){ -// m_sss_candidate_matched.push_back(-1); -// m_sss_candidate_pdg.push_back(-1); -// m_sss_candidate_parent_pdg.push_back(-1); -// m_sss_candidate_trackid.push_back(-1); -// m_sss_candidate_overlay_fraction.push_back(-1); -// m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); -// }else{ -// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); -// m_sss_candidate_matched.push_back(ssmatched[0]); -// m_sss_candidate_pdg.push_back(ssmatched[1]); -// m_sss_candidate_parent_pdg.push_back(ssmatched[2]); -// m_sss_candidate_trackid.push_back(ssmatched[3]); -// m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); -// m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[5]); -// } -// -// -// std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; -// l_bot2->AddEntry(tmp,sname2.c_str(),"f"); -// } -// } -// -// } -// -// //Some time matching -// -// -// //Closest neightor -// for(int l=0; l< m_sss_num_candidates; l++){ -// int this_p = m_sss_candidate_plane[l]; -// double close = 1e10; -// for(int m=0; m< m_sss_num_candidates;m++){ -// if(this_p == m_sss_candidate_plane[m]) continue; -// double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); -// close = std::min(dup,close); -// } -// m_sss_candidate_closest_neighbour.push_back(close); -// } -// -// for(int l=0; l< m_sss_num_candidates; l++){ -// -// std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; -// -// -// //double score = sssVetov1->GetMvaValue(thisvars); -// double score = -1; -// m_sss_candidate_veto_score.push_back(score); -// -// } -// -// -// can->cd(8); -// l_bot->SetLineWidth(0); -// l_bot->SetLineColor(kWhite); -// l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); -// l_bot->Draw("same"); -// -// can->cd(12); -// l_bot2->SetLineWidth(0); -// l_bot2->SetLineColor(kWhite); -// l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); -// l_bot2->Draw("same"); -// -// -// -// -// -// -// -// -// } - //********** Some Error Checking ********************// - - /*for(int i=0; i<3; i++){ - - std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); - //can->Write(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); - //f->Close(); - std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ @@ -1610,7 +787,8 @@ namespace single_photon void SinglePhoton::SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ - std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" + std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" +//Keng std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" double max_conv_dist = 80.0; art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); diff --git a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt index d98565714..7f1848ba4 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt @@ -1,71 +1,70 @@ link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) find_package(larpandora) -art_make( BASENAME_ONLY +art_make( + LIBRARY_NAME sbncode_SinglePhotonAnalysis_SEAview LIB_LIBRARIES - larcorealg_Geometry - larcore_Geometry_Geometry_service - lardata_Utilities - larevt_Filters - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larsim_MCCheater_ParticleInventoryService_service - larpandora_LArPandoraInterface - LArPandoraContent - nusimdata_SimulationBase - ${UB_DATA_TYPES} - ${Boost_SERIALIZATION_LIBRARY} - nurandom::RandomUtils_NuRandomService_service - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larpandora_LArPandoraInterface + LArPandoraContent + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + nurandom::RandomUtils_NuRandomService_service + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} - MODULE_LIBRARIES - larcorealg_Geometry - larcore_Geometry_Geometry_service - lardata_Utilities - larevt_Filters - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larpandora_LArPandoraInterface - SignalShapingServiceMicroBooNE_service - nusimdata_SimulationBase - ${UB_DATA_TYPES} - ${Boost_SERIALIZATION_LIBRARY} - nurandom::RandomUtils_NuRandomService_service - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} ) + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} + MODULE_LIBRARIES + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larpandora_LArPandoraInterface + SignalShapingServiceMicroBooNE_service + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + nurandom::RandomUtils_NuRandomService_service + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} ) install_headers() install_fhicl() diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 017fc949f..6ea90a1e7 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -77,30 +77,33 @@ namespace single_photon //Input ArtRoot data products m_pandoraLabel = pset.get("PandoraLabel"); m_trackLabel = pset.get("TrackLabel"); - m_sliceLabel = pset.get("SliceLabel","pandora"); +//KENG m_sliceLabel = pset.get("SliceLabel","pandora"); m_showerLabel = pset.get("ShowerLabel"); - m_caloLabel = pset.get("CaloLabel"); - m_flashLabel = pset.get("FlashLabel"); - m_potLabel = pset.get("POTLabel"); - m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); - m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); - m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); - m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); - m_generatorLabel = pset.get("GeneratorLabel","generator"); - m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); - m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); - m_geantModuleLabel = pset.get("GeantModule","largeant"); - m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); - m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); - m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); + m_caloLabel = pset.get("CaloLabel"); + m_flashLabel = pset.get("FlashLabel"); + m_potLabel = pset.get ("POTLabel"); + m_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); +//CHECK no such labels in sbnd? +//CHECK m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); + m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); + m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + m_generatorLabel = pset.get ("GeneratorLabel","generator"); +//KENG m_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); +//KENG m_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); + m_geantModuleLabel = pset.get ("GeantModule","largeant"); +//KENG m_backtrackerLabel = pset.get ("BackTrackerModule","gaushitTruthMatch"); + m_hitMCParticleAssnsLabel = pset.get ("HitMCParticleAssnLabel","gaushitTruthMatch"); + m_shower3dLabel = pset.get ("Shower3DLabel","shrreco3d"); + + //Flash related variables. m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); - m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); +// m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); //CRT related variables, should run only for RUN3+ enabled m_runCRT = pset.get("runCRT",false); @@ -109,7 +112,7 @@ namespace single_photon m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); +// m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); //Some track calorimetry parameters m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); @@ -259,11 +262,12 @@ namespace single_photon art::fill_ptr_vector(trackVector,trackHandle); //BadChannels// Fill later - art::Handle > badChannelHandle; - std::vector badChannelVector; - if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ - badChannelVector = *(badChannelHandle); - } + //CHECK +// art::Handle > badChannelHandle; +// std::vector badChannelVector; +// if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ +// badChannelVector = *(badChannelHandle); +// } //Collect the PFParticles from the event. This is the core! art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); @@ -305,11 +309,14 @@ namespace single_photon } //Slice to Hits - std::map< art::Ptr, std::vector> > sliceToHitsMap; +//Keng std::map< art::Ptr, std::vector> > sliceToHitsMap; std::map> > sliceIDToHitsMap; for(size_t i=0; i< sliceVector.size(); ++i){ + + //std::cout<<"CHECK "<<__LINE__<ID()<<" to hits!"<ID()] = hits_per_slice.at(slice.key()); } @@ -368,7 +375,10 @@ namespace single_photon // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis std::vector< art::Ptr > crParticles; std::vector< art::Ptr > nuParticles; + std::cout<<"CHECK "<<__LINE__<<" sort out neutrinos among PFParticles"<GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + //CHECK potential upgrade: + // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? //if not running over neutrino slice only, use all pfp's in event @@ -471,6 +481,7 @@ namespace single_photon auto pfp = crParticles[i]; cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); } + //CHECK why two for loops for the same vector? for(size_t i=0; i< crParticles.size(); ++i){ auto pfp = crParticles[i]; @@ -497,7 +508,7 @@ namespace single_photon //std::cout<<"saving a total of "<Self()< nu_scores; bool isSelectedSlice = false; int primaries = 0; @@ -535,13 +546,6 @@ namespace single_photon primaries++; primary_pdg = (pfp->PdgCode()); } - /*if (!pfp->IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - if(isNeutrino){ - isSelectedSlice = true; - }*/ } if(nu_scores.size()>0){ @@ -550,8 +554,8 @@ namespace single_photon std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."< , art::Ptr> trackToNuPFParticleMap; std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + //CHECK so far so good, but here? if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<,bool> PFPToNuSliceMap; std::map,double> PFPToTrackScoreMap; std::map sliceIdToNumPFPsMap; - std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); + if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<, std::vector< art::Ptr>> crtvetoToFlashMap; if(m_runCRT){ @@ -724,31 +731,33 @@ namespace single_photon } } - art::Handle> crthit_h; //only filled when there are hits, otherwise empty - //CHECK - //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; + art::Handle> crthit_h; //only filled when there are hits, otherwise empty + //CHECK + //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; double evt_timeGPS_nsec = -999 ; - if(m_runCRT){ -//CHECK evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + if(m_runCRT){ + //evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); -//CHECK -// raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); + + // raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); //Keng, time() is set to the trigger time. - art::Timestamp evtTimeGPS = evt.time();//CHECK = my_DAQHeader.gps_time(); - evt_timeGPS_nsec = evtTimeGPS.timeLow(); + art::Timestamp evtTimeGPS = evt.time();//CHECK = my_DAQHeader.gps_time(); + evt_timeGPS_nsec = evtTimeGPS.timeLow(); - evt.getByLabel(m_CRTHitProducer, crthit_h); - std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); - //******************************* Common Optical Filter **************************************************************/ - //******************************* Common Optical Filter **************************************************************/ - //Raw Optical fltr -//CHECK now Optical Filter + //******************************* Common Optical Filter **************************************************************/ + //******************************* Common Optical Filter **************************************************************/ + //Raw Optical fltr + // art::Handle uBooNE_common_optFltr; // if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ // m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); @@ -772,6 +781,7 @@ namespace single_photon //found in analyze_Tracks.h this->AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); + //Run over PID? if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); @@ -782,9 +792,10 @@ namespace single_photon std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); //CHECK, add theDetector - - this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); + this->AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap, trigger_offset(detClocks), theDetector); + +//CHECK, not KalmanShowers in SBND? +// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); //Some misc things thrown in here rather than in a proper helper function. TODO. fix @@ -1007,7 +1018,9 @@ namespace single_photon //******************************* Isolation (SSV precursor) **************************************************************/ //******************************* Isolation (SSV precursor) **************************************************************/ - if(!m_run_all_pfps && ! m_run_pi0_filter) this-> IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + if(!m_run_all_pfps && ! m_run_pi0_filter) this->IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + + std::cout<<"CHECK "<<__LINE__<<" for a finished isolation study"<> -// sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view -// sevd.addHitsToConsider(p_slice_hits); -// -// sevd.addAllHits(hitVector); // std::vector> -// sevd.setHitThreshold(m_SEAviewStubHitThreshold); -// -// -// //Add all the "nice " PFParticle Hits, as well as what to label -// //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string -// sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string -// -// //and add the SingleShower we like -// sevd.addShower(p_shr); // art::Ptr -// -// //Add all track PFP -// int i_trk = 0; -// for(auto &trk: tracks){ -// art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; -// std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; -// //sevd.addPFParticleHits(p_hits_trk,"track"); -// sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); -// sevd.addTrack(trk); -// ++i_trk; -// } +//Solution: add MODULE_LIBRARIES in cmake; + seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector); + //Pass in any bad channels you like + sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); + + //Add the hits from just this slice, as well as hits within 150cm of the vertex + sevd.addHitsToConsider(hitVector); // std::vector> + sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view + sevd.addHitsToConsider(p_slice_hits); + + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(m_SEAviewStubHitThreshold); + + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } - //Add all cosmic-relatd PFP -// for(auto &cr: crParticles){ -// std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; -// sevd.addPFParticleHits(p_hits_cr,"cosmic"); -// } -// -// -// //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. -// auto vnh= sevd.calcUnassociatedHits(); -// m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; -// m_trackstub_unassociated_hits_below_threshold = vnh[2]; -// m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; -// -// //Recluster, group unassociated hits into different clusters -// sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); -// -// //And some plotting -// // If we want to plot pdfs again later, then we can't plot here -// //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); -// -// //Analyze formed clusters and save info -// std::vector vec_SEAclusters ; -// sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + //Add all cosmic-relatd PFP + for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } - //And save to file. -// std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); -// int remerge = clu.getShowerRemerge(); -// seaview::cluster_score * ssscorz = clu.getScore(); -// -// std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ -// //decide not to add energy of the cluster to reco shower if it's matched -// // -// //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; -// //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; -// //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; -// -// continue;// Dont include this as a viable cluster! -// } -// -// ++m_trackstub_num_candidates; -// //determine if this cluster is in neutrino slice -// m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); -// -// //Fill All the bits -// m_trackstub_candidate_num_hits.push_back((int)hitz.size()); -// m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); -// m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); -// m_trackstub_candidate_plane.push_back(pl); -// m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); -// m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); -// m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); -// m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); -// m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); -// m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); -// m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); -// m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); -// m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); -// m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); -// m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); -// m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); -// m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); -// m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); -// m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); -// m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); -// m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); -// m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); -// m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); -// m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); -// m_trackstub_candidate_energy.push_back(Ep); -// m_trackstub_candidate_remerge.push_back(remerge); -// -// -// //MCTruth matching for pi0's -// if(m_is_data){ -// m_trackstub_candidate_matched.push_back(-1); -// m_trackstub_candidate_pdg.push_back(-1); -// m_trackstub_candidate_parent_pdg.push_back(-1); -// m_trackstub_candidate_trackid.push_back(-1); -// m_trackstub_candidate_true_energy.push_back(-1); -// m_trackstub_candidate_overlay_fraction.push_back(-1); -// m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); -// }else{ -// -// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); -// m_trackstub_candidate_matched.push_back(ssmatched[0]); -// m_trackstub_candidate_pdg.push_back(ssmatched[1]); -// m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); -// m_trackstub_candidate_trackid.push_back(ssmatched[3]); -// m_trackstub_candidate_true_energy.push_back(ssmatched[4]); -// m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); -// m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); -// -// //Guanqun: print out (best-matched) truth information of the cluster -// std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; -// std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; -// std::cout << "===============================================================" << std::endl; -// } -//CHECK sevd? -// sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); -// -// -// } //end of cluster loop -// -// // Plot the event -// if(m_SEAviewStubMakePDF){ -// sevd.Print(m_SEAviewStubPlotDistance); -// } + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; + m_trackstub_unassociated_hits_below_threshold = vnh[2]; + m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); + + //And some plotting + // If we want to plot pdfs again later, then we can't plot here + //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); + + //Analyze formed clusters and save info + std::vector vec_SEAclusters ; + sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + + + //And save to file. + std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); + int remerge = clu.getShowerRemerge(); + seaview::cluster_score * ssscorz = clu.getScore(); + + std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ + //decide not to add energy of the cluster to reco shower if it's matched + // + //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! + } + + ++m_trackstub_num_candidates; + //determine if this cluster is in neutrino slice + m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + m_trackstub_candidate_num_hits.push_back((int)hitz.size()); + m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); + m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + m_trackstub_candidate_plane.push_back(pl); + m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); + m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); + m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); + m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); + m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); + m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); + m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); + m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); + m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); + m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); + m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); + m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); + m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); + m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); + m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); + m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); + m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); + m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); + m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); + m_trackstub_candidate_energy.push_back(Ep); + m_trackstub_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(m_is_data){ + m_trackstub_candidate_matched.push_back(-1); + m_trackstub_candidate_pdg.push_back(-1); + m_trackstub_candidate_parent_pdg.push_back(-1); + m_trackstub_candidate_trackid.push_back(-1); + m_trackstub_candidate_true_energy.push_back(-1); + m_trackstub_candidate_overlay_fraction.push_back(-1); + m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + m_trackstub_candidate_matched.push_back(ssmatched[0]); + m_trackstub_candidate_pdg.push_back(ssmatched[1]); + m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); + m_trackstub_candidate_trackid.push_back(ssmatched[3]); + m_trackstub_candidate_true_energy.push_back(ssmatched[4]); + m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); + m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; + std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; + } + sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); + + + } //end of cluster loop + + // Plot the event + if(m_SEAviewStubMakePDF){ + sevd.Print(m_SEAviewStubPlotDistance); + } //group clusters HERE std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); @@ -1192,269 +1205,270 @@ namespace single_photon m_grouped_trackstub_candidate_indices = group_result.second.first; m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; } -//CHECK -// -// // --------------- shower clustering -------------------------- -// std::cout << "------------- Shower clustering --------------------" << std::endl; -// std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; -// -// if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ -// -// art::Ptr p_shr = showers.front(); -// art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; -// std::vector> p_hits = pfParticleToHitsMap[p_pfp]; -// -// -// int p_sliceid = PFPToSliceIdMap[p_pfp]; -// auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; -// -// std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); -// -// //Setup seaviewr object -// seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); -// //Pass in any bad channels you like -// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); -// //Give it a vertex to center around -// sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); -// -// //Add hits to consider for clustering -// //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV -// //sevd.filterConsideredHits(150); -// sevd.addHitsToConsider(p_slice_hits); -// -// //Add all hits in the events -// sevd.addAllHits(hitVector); // std::vector> -// sevd.setHitThreshold(m_SEAviewHitThreshold); -// -// //Add all the "nice " PFParticle Hits, as well as what to label -// //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string -// sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string -// -// //and add the SingleShower we like -// sevd.addShower(p_shr); // art::Ptr -// -// //Add all track PFP -// int i_trk = 0; -// for(auto &trk: tracks){ -// art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; -// std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; -// //sevd.addPFParticleHits(p_hits_trk,"track"); -// sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); -// sevd.addTrack(trk); -// ++i_trk; -// } -// -// //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 -// /*for(auto &cr: crParticles){ -// std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; -// sevd.addPFParticleHits(p_hits_cr,"cosmic"); -// } -// */ -// -// //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. -// auto vnh= sevd.calcUnassociatedHits(); -// m_sss_num_unassociated_hits =vnh[1]+vnh[2]; -// m_sss_num_unassociated_hits_below_threshold = vnh[2]; -// m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; -// -// //Recluster, group unassociated hits into different clusters -// sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); -// -// -// //This is the place I will put the new Second Shower Search -// std::vector vec_SEAclusters ; -// sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); -// -// //And save to file. -// std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); -// int remerge = clu.getShowerRemerge(); -// seaview::cluster_score * ssscorz = clu.getScore(); -// -// std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ -// if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; -// if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; -// if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; -// -// continue;// Dont include this as a viable cluster! -// } -// -// ++m_sss_num_candidates; -// -// //determine if this cluster is in neutrino slice -// m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); -// -// //Fill All the bits -// m_sss_candidate_num_hits.push_back((int)hitz.size()); -// m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); -// m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); -// m_sss_candidate_plane.push_back(pl); -// m_sss_candidate_PCA.push_back(ssscorz->pca_0); -// m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); -// m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); -// m_sss_candidate_fit_constant.push_back(clu.getFitCons()); -// m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); -// m_sss_candidate_max_tick.push_back(ssscorz->max_tick); -// m_sss_candidate_min_tick.push_back(ssscorz->min_tick); -// m_sss_candidate_min_wire.push_back(ssscorz->min_wire); -// m_sss_candidate_max_wire.push_back(ssscorz->max_wire); -// m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); -// m_sss_candidate_min_dist.push_back(ssscorz->min_dist); -// m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); -// m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); -// m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); -// m_sss_candidate_energy.push_back(Ep); -// m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); -// m_sss_candidate_remerge.push_back(remerge); -// -// -// //MCTruth matching for pi0's -// if(m_is_data){ -// m_sss_candidate_matched.push_back(-1); -// m_sss_candidate_pdg.push_back(-1); -// m_sss_candidate_parent_pdg.push_back(-1); -// m_sss_candidate_trackid.push_back(-1); -// m_sss_candidate_true_energy.push_back(-1); -// m_sss_candidate_overlay_fraction.push_back(-1); -// m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); -// }else{ -// -// auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); -// m_sss_candidate_matched.push_back(ssmatched[0]); -// m_sss_candidate_pdg.push_back(ssmatched[1]); -// m_sss_candidate_parent_pdg.push_back(ssmatched[2]); -// m_sss_candidate_trackid.push_back(ssmatched[3]); -// m_sss_candidate_true_energy.push_back(ssmatched[4]); -// m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); -// m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); -// -// //Guanqun: print out (best-matched) truth information of the cluster -// std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; -// std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; -// std::cout << "===============================================================" << std::endl; -// } -// -// -// sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); -// -// } //end of cluster loop -// -// // Plot the event -// if(m_SEAviewMakePDF){ -// sevd.Print(m_SEAviewPlotDistance); -// } -// -// } -// -// for(int i =0; i<(int)showers.size(); i++){ -// m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); -// } -// -// // ################################################### END SEAview END SEAview ######################################################### -// // ##################################################################################################################################### -// -// -// -// // PandoraAllOutComes -// // I.e This runs over all 3D reco showers in the whole event and find second shower candidates -// if(!m_run_pi0_filter){ -// std::cout<<"------------ Shower3D --------------"<Self()<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); -// -// -// //And cluster the 2d and 3d second showers. Very simple TODO -// this->SimpleSecondShowerCluster(); -// -// } -// -// -// // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### -// -// size_t n_neutrino_slice=0; -// size_t n_neutrino_candidate_pfp_id=0; -// -// for(size_t s=0; s< sliceVector.size(); s++){ -// auto slice = sliceVector[s]; -// std::vector> pfps = sliceToPFParticlesMap[slice]; -// -// int primaries=0; -// int n_dau=0; -// int found = 0; -// //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; -// // Check if this particle is identified as the neutrino -// const int pdg(pfp->PdgCode()); -// const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); -// primaries++; -// // If it is, lets get the vertex position -// if(isNeutrino){ -// found++; -// //Ok this is neutrino candidate. -// -// std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); -// for (const size_t daughterId : pfp->Daughters()){ -// n_dau++; -// auto dau = pfParticleMap[daughterId]; -// std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ -// while(tmp->NumDaughters()>0 && n_gen < 4){ -// for(int k=0; k< n_gen; k++){ -// std::cout<<"---> "; -// } -// auto grandau = pfParticleMap[granDaughterId]; -// std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; -// } -// -// } -// std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ -// std::cout<<"We're Missing Something!."<1){ -// throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "< p_shr = showers.front(); + art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + + int p_sliceid = PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + + //Setup seaviewr object + seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); + //Pass in any bad channels you like + sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); + + //Add hits to consider for clustering + //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV + //sevd.filterConsideredHits(150); + sevd.addHitsToConsider(p_slice_hits); + + //Add all hits in the events + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(m_SEAviewHitThreshold); + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } + + //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 + /*for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } + */ + + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + m_sss_num_unassociated_hits =vnh[1]+vnh[2]; + m_sss_num_unassociated_hits_below_threshold = vnh[2]; + m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); + + + //This is the place I will put the new Second Shower Search + std::vector vec_SEAclusters ; + sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + + //And save to file. + std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); + int remerge = clu.getShowerRemerge(); + seaview::cluster_score * ssscorz = clu.getScore(); + + std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ + if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! + } + + ++m_sss_num_candidates; + + //determine if this cluster is in neutrino slice + m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + m_sss_candidate_num_hits.push_back((int)hitz.size()); + m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); + m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + m_sss_candidate_plane.push_back(pl); + m_sss_candidate_PCA.push_back(ssscorz->pca_0); + m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); + m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); + m_sss_candidate_fit_constant.push_back(clu.getFitCons()); + m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); + m_sss_candidate_max_tick.push_back(ssscorz->max_tick); + m_sss_candidate_min_tick.push_back(ssscorz->min_tick); + m_sss_candidate_min_wire.push_back(ssscorz->min_wire); + m_sss_candidate_max_wire.push_back(ssscorz->max_wire); + m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); + m_sss_candidate_min_dist.push_back(ssscorz->min_dist); + m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); + m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); + m_sss_candidate_energy.push_back(Ep); + m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); + m_sss_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(m_is_data){ + m_sss_candidate_matched.push_back(-1); + m_sss_candidate_pdg.push_back(-1); + m_sss_candidate_parent_pdg.push_back(-1); + m_sss_candidate_trackid.push_back(-1); + m_sss_candidate_true_energy.push_back(-1); + m_sss_candidate_overlay_fraction.push_back(-1); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + m_sss_candidate_matched.push_back(ssmatched[0]); + m_sss_candidate_pdg.push_back(ssmatched[1]); + m_sss_candidate_parent_pdg.push_back(ssmatched[2]); + m_sss_candidate_trackid.push_back(ssmatched[3]); + m_sss_candidate_true_energy.push_back(ssmatched[4]); + m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; + std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; + } + + + sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); + + } //end of cluster loop + + // Plot the event + if(m_SEAviewMakePDF){ + sevd.Print(m_SEAviewPlotDistance); + } + + } + + for(int i =0; i<(int)showers.size(); i++){ + m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); + } + + // ################################################### END SEAview END SEAview ######################################################### + // ##################################################################################################################################### + + + + // PandoraAllOutComes + // I.e This runs over all 3D reco showers in the whole event and find second shower candidates + if(!m_run_pi0_filter){ + std::cout<<"------------ Shower3D --------------"<Self()<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); + + + //And cluster the 2d and 3d second showers. Very simple TODO + this->SimpleSecondShowerCluster(); + + } + + + // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### + + size_t n_neutrino_slice=0; + size_t n_neutrino_candidate_pfp_id=0; + + for(size_t s=0; s< sliceVector.size(); s++){ + auto slice = sliceVector[s]; + std::vector> pfps = sliceToPFParticlesMap[slice]; + + int primaries=0; + int n_dau=0; + int found = 0; + //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + //CHECK the correct pandora library, see https://internal.dunescience.org/doxygen/dir_7b958f4de002ca6b0ce84ad1a283e2af.html + //const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + const bool isNeutrino(std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + //Ok this is neutrino candidate. + + std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); + for (const size_t daughterId : pfp->Daughters()){ + n_dau++; + auto dau = pfParticleMap[daughterId]; + std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ + while(tmp->NumDaughters()>0 && n_gen < 4){ + for(int k=0; k< n_gen; k++){ + std::cout<<"---> "; + } + auto grandau = pfParticleMap[granDaughterId]; + std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; + } + + } + std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ + std::cout<<"We're Missing Something!."<1){ + throw cet::exception("DetachedVertexFinder") << " This event contains "<< found <<" reconstructed neutrinos! "<Fill(); - std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__< & particle ){ - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; + if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"()\t||\t Starting to analyze recob::Vertex\n"; int n_vert =0; //std::cout<<"There are "< tmp = {xyz[0],xyz[1],xyz[2]}; m_reco_vertex_in_SCB = 0;//CHECK this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); m_reco_vertex_dist_to_active_TPC = 0;//CHECK this->distToTPCActive(tmp); @@ -1819,9 +1833,9 @@ namespace single_photon // } }else{ - std::cout << " Error: vertexVector associated with this particle is empty " << "\n"; - std::cerr << " Error: vertexVector associated with this particle is empty " << "\n"; - //exit(0); + throw art::Exception(art::errors::StdException) + << " Pandor did not have an associated vertex for a particle. "; +// << " Error: vertexVector associated with this particle is empty " << "\n"; } } @@ -1858,18 +1872,25 @@ namespace single_photon full++; // Only look for primary particles if (!pParticle->IsPrimary()) continue; + primaries++; + // Check if this particle is identified as the neutrino -//CHECK const int pdg(pParticle->PdgCode()); - const bool isNeutrino = true;//CHECK (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + const int pdg(pParticle->PdgCode()); +// const bool isNeutrino = (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + const bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); + //const bool isNeutrino = (std::abs(pdg) == 14 ); - primaries++; // If it is, lets get the vertex position if(isNeutrino){ + if(found>0){ + std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not good but ok."<GetVertex(pfParticlesToVerticesMap, pParticle ); - } // All non-neutrino primary particles are reconstructed under the cosmic hypothesis @@ -1881,10 +1902,10 @@ namespace single_photon // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. // If this is not the case please handle accordingly - if (!nuParticles.empty()) - { - throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; - } +//CHECK if (!nuParticles.empty()) +// { +// throw cet::exception("SinglePhoton") << " This event contains "<Daughters()) @@ -1895,12 +1916,9 @@ namespace single_photon nuParticles.push_back(pfParticleMap.at(daughterId)); } } - std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< #include "HelperFunctions/helper_functions.h" +//#include "Libraries/Atlas.h" PENDING IN USE CHECK -#include "Libraries/bad_channel_matching.h" +//#include "Libraries/bad_channel_matching.h" #include "Libraries/DBSCAN.h" #include "SEAview/SEAviewer.h" @@ -270,7 +271,10 @@ namespace single_photon * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis * @param nuParticles a vector to hold the final-states of the reconstruced neutrino */ - void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); + void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, + const lar_pandora::PFParticlesToVertices &particlesToVertices, + PFParticleVector &crParticles, + PFParticleVector &nuParticles); /** * @brief Collect associated tracks and showers to particles in an input particle vector @@ -356,7 +360,9 @@ namespace single_photon std::vector CalcdQdxShower( const art::Ptr& shower, const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane); + std::map, std::vector> > & clusterToHitMap ,int plane, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector); /** *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) *@param shower_dir - the 3D shower direction @@ -450,18 +456,6 @@ namespace single_photon void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); - /* this function is now redundant, not in use anymore */ - void SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - detinfo::DetectorPropertiesData const & theDetector); - /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits * and return a vector of 7 elements: @@ -552,7 +546,9 @@ namespace single_photon std::map,bool> &PFPToNuSliceMap, std::map,double> &PFPToTrackScoreMap, PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap); + std::map, art::Ptr> &PFPtoShowerReco3DMap, + double samplerate, + detinfo::DetectorPropertiesData const & theDetector); void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ @@ -836,20 +832,20 @@ namespace single_photon std::string m_showerKalmanCaloLabel; std::string m_pandoraLabel; ///< The label for the pandora producer std::string m_trackLabel; ///< The label for the track producer from PFParticles - std::string m_sliceLabel; +// std::string m_sliceLabel; std::string m_showerLabel; ///< The label for the shower producer from PFParticles std::string m_caloLabel; ///< The label for calorimetry associations producer std::string m_flashLabel; std::string m_geantModuleLabel; - std::string m_backtrackerLabel; +// std::string m_backtrackerLabel; std::string m_hitfinderLabel; std::string m_hitMCParticleAssnsLabel; std::string m_potLabel; std::string m_generatorLabel; - std::string m_badChannelLabel; - std::string m_badChannelProducer; - std::string m_mcTrackLabel; - std::string m_mcShowerLabel; +// std::string m_badChannelLabel; +// std::string m_badChannelProducer; +// std::string m_mcTrackLabel; +// std::string m_mcShowerLabel; std::string m_pidLabel; ///< For PID stuff std::string m_CRTVetoLabel; std::string m_CRTTzeroLabel; diff --git a/sbncode/SinglePhotonAnalysis/job/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/job/CMakeLists.txt deleted file mode 100644 index 85bfe3559..000000000 --- a/sbncode/SinglePhotonAnalysis/job/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -install_fhicl() -FILE(GLOB fcl_files *.fcl) -install_source( EXTRAS ${fcl_files} ) diff --git a/sbncode/SinglePhotonAnalysis/job/README.md b/sbncode/SinglePhotonAnalysis/job/README.md deleted file mode 100644 index 3e9d04367..000000000 --- a/sbncode/SinglePhotonAnalysis/job/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Use `microboone_singlephoton.fcl` to configure detector independent features of the module; - -Use `run_SinglePhoton_sbnd.fcl` to configure the dector settings; diff --git a/sbncode/SinglePhotonAnalysis/job/microboone_singlephoton.fcl b/sbncode/SinglePhotonAnalysis/job/microboone_singlephoton.fcl deleted file mode 100644 index 7afed5812..000000000 --- a/sbncode/SinglePhotonAnalysis/job/microboone_singlephoton.fcl +++ /dev/null @@ -1,78 +0,0 @@ -BEGIN_PROLOG - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - ParticleIDLabel:"pandoracalipidSCE" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - Verbose: false - - runSEAviewShower: true - SEAviewShowerHitThreshold: 25 - SEAviewShowerDBSCANMinPts: 8 - SEAviewShowerDBSCANEps: 4 - SEAviewShowerPlotDistance: 80 - SEAviewShowerMaxHitsLinFit: 20.0 - SEAviewShowerMakePDF: false - SEAviewShowerNumRecoShower: 1 - SEAviewShowerNumRecoTrack: -1 - - runSEAviewStub: true - SEAviewStubHitThreshold: 25 - SEAviewStubDBSCANMinPts: 1 - SEAviewStubDBSCANEps: 1 - SEAviewStubPlotDistance: 80 - SEAviewStubMakePDF: false - SEAviewStubNumRecoShower: 1 - SEAviewStubNumRecoTrack: 0 - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - SelectEvent: false - SelectEventList:"" - - usePID: true - work_function: 23.6 - recombination_factor: 0.62 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -singlephoton_filter: @local::singlephoton_analyzer -singlephoton_filter.FillTrees: false -singlephoton_filter.RunPi0Filter: true -singlephoton_filter.FilterMode2g1p: true -singlephoton_filter.FilterMode2g0p: false -singlephoton_filter.isData: true -singlephoton_filter.usePID: false -singlephoton_filter.work_function: 23 - -singlephoton_filter_2g0p: @local::singlephoton_filter -singlephoton_filter_2g0p.FilterMode2g1p: false -singlephoton_filter_2g0p.FilterMode2g0p: true - -END_PROLOG diff --git a/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl deleted file mode 100644 index 44724c3cc..000000000 --- a/sbncode/SinglePhotonAnalysis/job/run_SinglePhoton_sbnd.fcl +++ /dev/null @@ -1,75 +0,0 @@ -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "larproperties.fcl" -#include "microboone_singlephoton.fcl" -#include "spacecharge.fcl" - -#For SBND: -#include "services_sbnd.fcl" -#include "geometry_sbnd.fcl" -#include "spacecharge_sbnd.fcl" - -process_name : SinglePhoton #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::sbnd_geometry_helper - Geometry: @local::sbnd_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::sbnd_detectorclocks - DetectorPropertiesService: @local::sbnd_detproperties - - TimeTracker: { printSummary: true } - SpaceCharge: @local::sbnd_spacecharge -} - -outputs: { - # optionalout: { module_type: RootOutput - # fileName: "output_file.root" - # fastCloning: false } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - #pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - analyzers: {} - filters : { - #singlephotonfil: @local::singlephoton_filter #run in filtering mode - singlephotonana: @local::singlephoton_analyzer #run in ana mode - } - pathana : [ singlephotonana] #path for analysis - trigger_paths : [pathana] - end_paths: [ ] - -} -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -#physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" - -##services.SpaceCharge.EnableCorrSCE: true -##services.SpaceCharge.EnableSimEfieldSCE: true -##services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - From 4e426ca8743735d5d5f98ce434e4fe082fab2a9c Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 9 Mar 2022 21:10:20 -0600 Subject: [PATCH 08/54] sync up the latest sbncode --- sbncode/CMakeLists.txt | 36 +++++++++---------- .../Libraries/analyze_MCTruth.h | 1 + .../SinglePhoton_module.cc | 1 - 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 1f09ba47e..905287bfc 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -7,21 +7,21 @@ find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) add_subdirectory(SBNEventWeight) -#add_subdirectory(NuMuSelection) -#add_subdirectory(OpDet) -#add_subdirectory(OpT0Finder) -# -#add_subdirectory(CAFMaker) -#add_subdirectory(Metadata) -# -#add_subdirectory(Calibration) -#add_subdirectory(FlashMatch) -#add_subdirectory(LArRecoProducer) -#add_subdirectory(TPCReco) -# -# -#add_subdirectory(BeamSpillInfoRetriever) -#add_subdirectory(FluxReader) -#add_subdirectory(EventGenerator) -#add_subdirectory(PID) -#add_subdirectory(GeometryTools) +add_subdirectory(NuMuSelection) +add_subdirectory(OpDet) +add_subdirectory(OpT0Finder) + +add_subdirectory(CAFMaker) +add_subdirectory(Metadata) + +add_subdirectory(Calibration) +add_subdirectory(FlashMatch) +add_subdirectory(LArRecoProducer) +add_subdirectory(TPCReco) + + +add_subdirectory(BeamSpillInfoRetriever) +add_subdirectory(FluxReader) +add_subdirectory(EventGenerator) +add_subdirectory(PID) +add_subdirectory(GeometryTools) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 93b746efb..a97c88a5f 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -253,6 +253,7 @@ namespace single_photon //one mctruth per event. contains list of all particles for(int i=0; i truth = mcTruthVector[i]; + std::cout<<"\nCHECK THIS MCTruth!! "<<*truth<Origin(); diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 6ea90a1e7..dfe055ed8 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -721,7 +721,6 @@ namespace single_photon //******************************* CRT CRT***************************************************************/ //******************************* CRT CRT***************************************************************/ -//CHECK, use sbn::SimpleFlashMatch object via a label instead std::map, std::vector< art::Ptr>> crtvetoToFlashMap; if(m_runCRT){ From 8f0269b5e8b275a4d4071ef45d0e04d7d73b30cf Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 9 Mar 2022 21:17:12 -0600 Subject: [PATCH 09/54] update the code to the latest version --- .../SinglePhotonAnalysis/Atlas_edi/Atlas.h | 393 + .../Atlas_edi/BobbyVertexBuilder.h | 959 + .../Atlas_edi/CMakeLists.txt | 92 + .../SinglePhotonAnalysis/Atlas_edi/DBSCAN.h | 142 + .../Atlas_edi/SinglePhoton_module.cc | 1656 + .../Atlas_edi/SinglePhoton_module.h | 1428 + .../Atlas_edi/TruncMean.h | 259 + .../Atlas_edi/VertexBuilder/DetectorObjects.h | 340 + .../VertexBuilder/ParticleAssociations.h | 698 + .../Atlas_edi/VertexBuilder/VertexBuilder.h | 1210 + .../Atlas_edi/analyze_EventWeight.h | 357 + .../Atlas_edi/analyze_MCTruth.h | 463 + .../Atlas_edi/analyze_OpFlashes.h | 177 + .../Atlas_edi/analyze_Showers.h | 1568 + .../Atlas_edi/analyze_Slice.h | 1005 + .../Atlas_edi/analyze_Template.h | 26 + .../Atlas_edi/analyze_Tracks.h | 1235 + .../Atlas_edi/bad_channel_matching.h | 124 + .../Atlas_edi/isolation.h | 658 + .../Atlas_edi/job/CMakeLists.txt | 5 + ...uboone_NCDeltaRadFiltered_volActiveTpc.fcl | 94 + .../Atlas_edi/job/run_SinglePhoton.fcl | 106 + .../Atlas_edi/job/run_SinglePhoton_BNBext.fcl | 7 + .../Atlas_edi/job/run_SinglePhoton_Data.fcl | 7 + .../job/run_SinglePhoton_Data_calo.fcl | 10 + .../Atlas_edi/job/run_SinglePhoton_Dirt.fcl | 10 + .../Atlas_edi/job/run_SinglePhoton_MC.fcl | 4 + .../job/run_SinglePhoton_Overlay.fcl | 10 + .../job/run_SinglePhoton_Overlay_calo.fcl | 11 + .../SinglePhotonAnalysis/Atlas_edi/leap.sh | 1 + .../SinglePhotonAnalysis/Atlas_edi/make.sh | 5 + .../Atlas_edi/reco_truth_matching.h | 709 + .../Atlas_edi/second_shower_search.h | 1379 + .../Atlas_edi/sssVeto_BDT.class.h | 85986 ++++++++++++++++ .../SinglePhotonAnalysis/Libraries/Atlas.h | 425 + .../SinglePhotonAnalysis/jobs/CMakeLists.txt | 3 + sbncode/SinglePhotonAnalysis/jobs/README.md | 25 + .../jobs/run_singlephoton_sbnd.fcl | 75 + .../jobs/singlephoton_sbnd.fcl | 84 + .../SinglePhotonAnalysis/ref/CMakeLists.txt | 85 + sbncode/SinglePhotonAnalysis/ref/DBSCAN.h | 149 + .../ref/NCRadiativeResonant_module.cc | 207 + .../ref/SEAview/CMakeLists.txt | 74 + .../ref/SEAview/SEAviewer.cc | 1299 + .../ref/SEAview/SEAviewer.h | 453 + .../ref/SEAview/seaDBSCAN.h | 159 + .../ref/SinglePhoton_module.cc | 2248 + .../ref/SinglePhoton_module.h | 1998 + sbncode/SinglePhotonAnalysis/ref/TruncMean.h | 260 + .../ref/analyze_EventWeight.h | 392 + .../SinglePhotonAnalysis/ref/analyze_Geant4.h | 94 + .../ref/analyze_MCTruth.h | 685 + .../ref/analyze_OpFlashes.h | 212 + .../ref/analyze_Showers.h | 1658 + .../SinglePhotonAnalysis/ref/analyze_Slice.h | 1010 + .../ref/analyze_Template.h | 26 + .../SinglePhotonAnalysis/ref/analyze_Tracks.h | 1275 + .../ref/bad_channel_matching.h | 129 + .../ref/fiducial_volume.h | 299 + sbncode/SinglePhotonAnalysis/ref/isolation.h | 662 + .../ref/job/CMakeLists.txt | 3 + .../job/eventweight_microboone_gLEE_2022.fcl | 88 + ..._microboone_genie_gLEE_2022_incl_knobs.fcl | 649 + ...SinglePhoton_1g1p_far_sideband_Data_v1.fcl | 125 + ...SinglePhoton_1g1p_far_sideband_Data_v2.fcl | 133 + ...Photon_NCpi0Filter_2g0p_BNBext_hist_v2.fcl | 147 + ...lePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl | 147 + .../ref/job/microboone_singlephoton.fcl | 78 + ...genie_common_uboone_NCDeltaRadFiltered.fcl | 93 + ...boone_NCRadiativeResonant_volActiveTPC.fcl | 94 + .../ref/job/run_SinglePhoton.fcl | 77 + .../ref/job/run_SinglePhoton_BNBext.fcl | 7 + .../ref/job/run_SinglePhoton_BNBext_CRT.fcl | 8 + .../ref/job/run_SinglePhoton_Data.fcl | 7 + .../ref/job/run_SinglePhoton_Data_CRT.fcl | 8 + .../ref/job/run_SinglePhoton_Data_calo.fcl | 10 + .../ref/job/run_SinglePhoton_Dirt.fcl | 10 + .../ref/job/run_SinglePhoton_Dirt_CRT.fcl | 12 + .../ref/job/run_SinglePhoton_FakeData.fcl | 13 + .../ref/job/run_SinglePhoton_MC.fcl | 4 + .../ref/job/run_SinglePhoton_NCpi0Filter.fcl | 95 + .../job/run_SinglePhoton_NCpi0Filter_2g0p.fcl | 95 + ...n_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl | 7 + ...run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl | 7 + ..._SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl | 10 + .../run_SinglePhoton_NCpi0Filter_BNBext.fcl | 7 + .../job/run_SinglePhoton_NCpi0Filter_Data.fcl | 7 + .../run_SinglePhoton_NCpi0Filter_Overlay.fcl | 10 + .../ref/job/run_SinglePhoton_Overlay.fcl | 10 + .../ref/job/run_SinglePhoton_Overlay_CRT.fcl | 13 + .../job/run_SinglePhoton_Overlay_FullSys.fcl | 15 + .../run_SinglePhoton_Overlay_FullSys_CRT.fcl | 3 + .../ref/job/run_SinglePhoton_Overlay_calo.fcl | 11 + .../ref/job/run_SinglePhoton_PhotoNu.fcl | 12 + .../ref/job/run_SinglePhoton_PhotoNu_CRT.fcl | 13 + .../ref/job/run_SinglePhoton_TextGen.fcl | 6 + .../ref/job/run_SinglePhoton_TextGen_CRT.fcl | 3 + .../run_eventweight_microboone_gLEE_2022.fcl | 45 + ...microboone_singlephoton_Splines_and_CV.fcl | 65 + .../ref/reco_truth_matching.h | 868 + .../ref/second_shower_search.h | 2168 + 101 files changed, 120303 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/BobbyVertexBuilder.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/DBSCAN.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/DetectorObjects.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_EventWeight.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_MCTruth.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_OpFlashes.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Slice.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Template.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/bad_channel_matching.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/isolation.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/prodgenie_common_uboone_NCDeltaRadFiltered_volActiveTpc.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_BNBext.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Data.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Data_calo.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Dirt.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_MC.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Overlay.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Overlay_calo.fcl create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/leap.sh create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/make.sh create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/reco_truth_matching.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/second_shower_search.h create mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/Atlas.h create mode 100644 sbncode/SinglePhotonAnalysis/jobs/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/jobs/README.md create mode 100644 sbncode/SinglePhotonAnalysis/jobs/run_singlephoton_sbnd.fcl create mode 100644 sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/ref/DBSCAN.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc create mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.cc create mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc create mode 100644 sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/TruncMean.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_EventWeight.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Geant4.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_OpFlashes.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Slice.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Template.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/bad_channel_matching.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/fiducial_volume.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/isolation.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/CMakeLists.txt create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_gLEE_2022.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl create mode 100644 sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h create mode 100644 sbncode/SinglePhotonAnalysis/ref/second_shower_search.h diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h new file mode 100644 index 000000000..16ad3476f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h @@ -0,0 +1,393 @@ +#ifndef __ATLAS_H__ +#define __ATLAS_H__ + +#include "larsim/MCCheater/BackTrackerService.h" +#include "larsim/MCCheater/ParticleInventoryService.h" +#include "SinglePhoton_module.h" + +/* + * Purpose of this header file, get the skeleton of all the maps and + * leave the contents to be filled inside the actual functions in + * other header files. + * + */ + +namespace single_photon +{ /*************** + * A class that designed for storing addresses for all associated (to an event) tracks, showers, + * and their cooresponding PFParticles. + * evt (input) - the event that we currently look at. + * *************/ + +// typedef std::vector< art::Ptr > PFParticleVector; +// typedef std::vector< art::Ptr > TrackVector; +// typedef std::vector< art::Ptr > ShowerVector; +// typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + class Atlas{//Initialize this with event address; + friend class SinglePhoton;//private as default + + public: + //Constructor + Atlas();//this might be useless; + //Overflow constructor 1; + Atlas( const art::Event &evt, + std::vector< std::string > labels, + bool is_data);//this initialize vectors and maps below + +// ~Atlas(){ +// MCParticleToTrackIdMap.clear(); +// }; +// //main stuffs that we feed into the vertex builder. + +/* + * The constructor takes care of the following basic recob objects. + * + */ + //the following recob objects are created through the overflow constructor 1 (see above); + std::vector< art::Ptr > particles;//this is loaded depends on the option m_run_all_pfps, configurable in the .fcl file. + std::vector< art::Ptr > all_pfparticles; + std::vector< art::Ptr > all_tracks; + std::vector< art::Ptr > all_showers; + std::vector< art::Ptr > all_hits; + std::vector< art::Ptr > all_opflashes; + //get the cluster handle for the dQ/dx calc + std::vector< art::Ptr > all_clusters; + std::vector> kalmanTrackVector; + std::vector> sliceVector; + + //MCTruth (only initialized when the sample is not data) + std::vector> mcTruthVector; + std::vector> matchedMCParticleVector; + +/* + * The overload constructor 1 takes care of the following maps. + * + */ + std::map< size_t, art::Ptr> IDToPFParticleMap; +// std::map< art::Ptr> PFParticleToIDMap;//This makse more consistant, but it needs works! + std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; + std::map< art::Ptr , std::vector> > PFParticleToMetadataMap;//old name pfParticleToMetadataMap; + std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; + std::map< art::Ptr , std::vector> > PFParticleToClustersMap; + std::map< art::Ptr , std::vector> > ClusterToHitsMap; + std::map, art::Ptr> PFParticlesToShowerReco3DMap; + std::map, art::Ptr> PFParticlesToShowerKalmanMap; + std::map,std::vector>> kalmanTrackToCaloMap; + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map< art::Ptr, std::vector> > sliceToHitsMap; + std::map> > sliceIDToPFParticlesMap; + std::map> > sliceIDToHitsMap; +/* + * Initially empty variables to be filled from other parts of the code. + * + */ +//The followings are taken care by the CollectTracksAndShowers_v2() in BobbyVertexBuilder.h + std::vector< art::Ptr > selected_tracks; + std::vector< art::Ptr > selected_showers; + std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. + std::vector< art::Ptr > more_showers; + //Maps for more pandora objects. + std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; + std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + + std::map< art::Ptr , double > trackToDistMap; + std::map< art::Ptr , double > showerToDistMap; + +//The followings are taken care by the AnalyzeSlices() in analyze_Slice.h + std::map sliceIdToNuScoreMap; + //Pairs that connect PFParticle to sliceID. + std::vector,int>> primaryPFPSliceIdVec; + std::map< art::Ptr, int> PFPToSliceIdMap; + std::map< art::Ptr, bool> PFPToClearCosmicMap; + std::map< art::Ptr, bool> PFPToNuSliceMap; + std::map< art::Ptr, double> PFPToTrackScoreMap; + +//Maps for simb objects; for MC sample, not applied to data + + + //Filled in the CollectMCParticles_v2() in Singlephoton_module.cc + std::map> MCParticleToTrackIdMap; + std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; + std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + std::map< art::Ptr, int> MCParticleToAncestorPdgMap; + + //Filled in the showerRecoMCmatching() in reco_truth_matching.h +// std::vector> matchedMCParticleVector; + std::map< art::Ptr, art::Ptr > showerToMCParticleMap; + + //Filled in the RecoMCTracks() in analyze_Tracks.h + std::map< art::Ptr, art::Ptr > trackToMCParticleMap; + + + //FindManyP's! + //specially for the number of coorresponding recob (pandora_objects) to a PFParticle; + // example: PFParticleIsATrack[particles.key()] gives the vector that containts all + // cooresponding tracks; + art::FindManyP< recob::Track >* PFParticleAsATrack; + art::FindManyP< recob::Shower >* PFParticleAsAShower; + +// art::FindManyP< recob::Track > PFParticleAsATrack(PFParticleHandle, evt, m_trackLabel); +// art::FindManyP< recob::Shower > PFParticleAsAShower(PFParticleHandle, evt, m_showerLabel); + + private: + /*********************** + * + * Wigets for constructing the different types of varaibels.in this class + * 1. HandleToVector; + * + * **********************/ + //1. Scratch from Handle, and return a equivalently useful vector. + //sample usage: + // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; + // recob::Hit dummy_hit;//This is to specify the template; + // std::vector> hitVector = HandleToVector(dummy_hit, evt, m_hitfinderLabel); + template //A helper template that allows you to make compliated types. + struct temporary_types{ + using type1 = std::vector>; + using type2 = art::ValidHandle>; + using type3 = std::vector; + }; + template //ref_type is only used to identify the temporary_types late. + typename temporary_types::type1 HandleToVector(recob_object ref_type, const art::Event &evt, std::string &label){ + + typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); + typename temporary_types::type1 Vector; + art::fill_ptr_vector(Vector,Handle); + return Vector; + } + + //2. Wiget 2 comes here.. + + }; + + +//sth similar to class DetectorObjects + +//create struct for Track and Shower to add more detail to them, i.e. the geoalgo class; + +//struct Track +//struct Shower + + + + + + + + +//THE HEADER FILE IS THE ABOVE + + + + //Constructor + Atlas::Atlas (){} + //Overloaded Constructor 1, initialize the essential variables + Atlas::Atlas ( const art::Event &evt, + std::vector labels, + bool is_data){ + + //PREPARE some recob objects; + //vector labels = {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel,m_generatorLabel, m_geantModuleLabel} + recob::PFParticle dummy_PFParticle; + all_pfparticles = HandleToVector(dummy_PFParticle, evt, labels[4]); + recob::Track dummy_track;//This is to specify the template; + all_tracks = HandleToVector(dummy_track, evt, labels[0]);//m_trackLabel + kalmanTrackVector = HandleToVector(dummy_track,evt,labels[6]);//m_showerKalmanLabel + + recob::Shower dummy_shower;//This is to specify the template; + all_showers = HandleToVector(dummy_shower, evt, labels[1]);//m_showerLabel + recob::Hit dummy_hit; + all_hits = HandleToVector(dummy_hit, evt, labels[2]);//m_hitfinderLabel + + recob::OpFlash dummy_opflash; + all_opflashes = HandleToVector(dummy_opflash, evt, labels[3]);//m_flashLabel + + recob::Cluster dummy_cluster; + all_clusters = HandleToVector(dummy_cluster, evt, labels[4]);//m_pandoraLabel + + recob::Slice dummy_slice; + sliceVector = HandleToVector(dummy_slice, evt, labels[4]); + + if(!is_data){ + //MCTruth Handle + simb::MCTruth dummy_geant; //for Geant info. + mcTruthVector = HandleToVector(dummy_geant, evt, labels[8]); + + simb::MCParticle dummy_genie; //for Genie info. + matchedMCParticleVector = HandleToVector(dummy_genie, evt, labels[9]); + } + //CREATE maps! + //Ingredient 1: Handles; I temporary define it here for mapping purpose; + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(labels[4]);//This is useful for FindManyP< reco::Track/Shower> + art::ValidHandle> const & clusterHandle = evt.getValidHandle>(labels[4]); + art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(labels[6]); + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(labels[4]); + //a cross check + if (!pfParticleHandle.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; + return; + } + + + //Ingredient 2: FindManyPs; these will be gone when construction finished + art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, labels[4]); + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP spacePoints_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP hits_per_cluster(clusterHandle, evt, labels[4]); + art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, labels[5]); + art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, labels[6]); + art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, labels[7]); + art::FindManyP pfparticles_per_slice(sliceHandle, evt, labels[4]); + art::FindManyP hits_per_slice(sliceHandle, evt, labels[4]); + + //make maps here; + for(size_t i=0; i< all_pfparticles.size(); ++i){ + const art::Ptr pfp = all_pfparticles[i]; + PFParticlesToVerticesMap[pfp] = vertices_per_pfparticle.at(pfp.key());//old name: pfParticlesToVerticesMap; + + PFParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + IDToPFParticleMap[pfp->Self()] = pfp; + PFParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); + PFParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + + //3D Showers + if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ + PFParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); + } + //---------Kalman Track Showers + if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ + PFParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); + } + } + //other maps not on pfParticles; + for(size_t i=0; i< all_clusters.size(); ++i){ + auto cluster = all_clusters[i]; + ClusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); + } + + //----- kalmon Cali + for(size_t i=0; i< kalmanTrackVector.size(); ++i){ + auto trk = kalmanTrackVector[i]; + if(cali_per_kalmantrack.at(trk.key()).size()!=0){ + kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); + } + } + + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToPFParticlesMap[slice] = pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); + sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); + } + +//------- trackToMCParticleMap -------- +// if(!is_data){ +// //Fill in trackToMCParticleMap; +// //https://indico.fnal.gov/event/20453/session/6/contribution/4/material/slides/0.pdf +// //BackTrackerService and ParticleInventoryService +// art::ServiceHandle bt_serv; +// art::ServiceHandle pi_serv; +// //Get tracks +// art::Handle< std::vector > trackListHandle; +// std::vector > tracklist; +// if (evt.getByLabel(labels[0],trackListHandle)) art::fill_ptr_vector(tracklist, trackListHandle); +// //Get hit-track association +// art::FindManyP fmth(trackListHandle, evt, labels[0]); +// //Loop over all tracks +// for(size_t i=0; i > allHits = fmth.at(i); +// std::map trkide; +// cout<<"Size of hits "< hit = allHits[h]; +// //TrackIDE saves the energy deposition for each Geant particle ID +// std::vector TrackIDs = bt_serv->HitToEveTrackIDEs(hit); +// cout<<"Size of TrackIDs "<::iterator ii = trkide.begin(); ii!=trkide.end(); ++ii){ +// cout<<"Possible IDs "<first<second; +// if ((ii->second)>maxe){ +// TrackID = ii->first; //TrackID maxe = ii->second; //Energy +// } } +// // Now have trackID, so get PdG code. +// +// // const simb::MCParticle *particle = pi_serv->TrackIdToParticle_P(TrackID); +// +// cout<<"Ptr::MCP CHECK "< mcp : matchedMCParticleVector){ +// //cout<<"Match ID "<TrackId()<TrackId() == TrackID){ cout<<"Yes"< //Use LINES and COLS to get the dimensions of the screen + +using namespace std; + +namespace single_photon +{ + //Printout Gadgets + void verbose_check( bool fverbose, bool debug_message ){ + + std::cout<<" Verbose output is "; + if(fverbose){ + std::cout<<"on;"; + }else{ + std::cout<<"off;"; + } + std::cout<<" Debug message is "; + if(debug_message){ + std::cout<<"on."; + }else{ + std::cout<<"off."; + } + std::cout< > candidate_particles(package.particles);//CHECK, always vertex the most nu-like slice. + + //we dont need the run_all_particle boolean, because it is considered under package.particles; + if(candidate_particles.size() == 0){ + mf::LogDebug("SinglePhoton") << " No PFParticles can be considered for vertexing.\n"; + } + + for(const art::Ptr &pParticle : candidate_particles){ //candidate_particles are determined in above if-else statement. + const std::vector< art::Ptr > ToBeAddedTracks((package.PFParticleAsATrack)->at(pParticle.key())); + const std::vector< art::Ptr > ToBeAddedShowers((package.PFParticleAsAShower)->at(pParticle.key())); + + const unsigned int nTracks(ToBeAddedTracks.size()); + const unsigned int nShowers(ToBeAddedShowers.size()); + + if( nTracks + nShowers == 0 ){//Um... the PFParticle is not identified as track or shower; + mf::LogDebug("SinglePhoton") << " No tracks or showers were associated to PFParticle " << pParticle->Self() << "\n"; + }else if( nTracks + nShowers > 1 ){ + //Check, do I need throw?? + throw cet::exception("SinglePhoton") << " There were " << nTracks << " tracks and " << nShowers << " showers associated with PFParticle " << pParticle->Self(); + //Ok, if going through the below if-elses, it means we have a shower/ a track! + + }else if( nTracks == 1 ){ //Add a Track + if(package.PFPToNuSliceMap[pParticle]){//add the package.selected nu_slice particle; + (package.selected_tracks).push_back(ToBeAddedTracks.front()); + (package.trackToNuPFParticleMap)[(package.selected_tracks).back()]= pParticle; + + }else{//add other nu-like PFParticle; + (package.more_tracks).push_back(ToBeAddedTracks.front()); + (package.trackToNuPFParticleMap)[(package.more_tracks).back()]= pParticle; + } + + if(fverbose){ + std::cout<<"SinglePhoton::CollectTracksAndShowers_v2() \t||\t"; + std::cout<<"adding to trackToNuPFParticleMap this track with id "<< ToBeAddedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<& map, vector target_pdg, int loops){ + int current_pdg = (particle).PdgCode(); + int mother_id = (particle).Mother(); + simb::MCParticle mother_particle = map[mother_id]; + bool match_targetpdg = false; + + for(int& i :target_pdg){ + if(current_pdg == i){ + match_targetpdg = true; + break; + } + } + loops--; + if(loops < 0 || (current_pdg != mother_particle.PdgCode() && match_targetpdg) || mother_id < 0){//stop searching mother; + return particle; + } + + return TraceMothers(mother_particle, map, target_pdg,loops); + } + + art::Ptr< simb::MCParticle > TraceMothers( art::Ptr< simb::MCParticle > particle, std::map >& map, vector target_pdg, int loops){ + int current_pdg = particle->PdgCode(); + int mother_id = particle->Mother(); + art::Ptr< simb::MCParticle > mother_particle = map[mother_id]; + bool match_targetpdg = false; + + for(int& i :target_pdg){ + if(current_pdg == i){ + match_targetpdg = true; + break; + } + } + loops--; + if(loops < 0 || (current_pdg != mother_particle->PdgCode() && match_targetpdg) || mother_id < 0){//stop searching mother; + return particle; + } + + return TraceMothers(mother_particle, map, target_pdg,loops); + } + + + void SinglePhoton::CollectMCParticles_v2( + const art::Event &evt, + class Atlas & package){ + + int screen_width = 86; + bool debug_message = true; + bool fverbose = m_is_verbose; + + std::cout<<"SinglePhoton::CollectMCParticles_v2() \t||\t"; + verbose_check( fverbose, debug_message); + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(m_geantModuleLabel, theParticles); + + if (!theParticles.isValid()){ + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } else { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, m_geantModuleLabel); + package.MCParticleToTrackIdMap.clear(); + + // Strategy: ----------------------- + // 1. Prepare store_MCTruths, which contain MCParticles from MCTruths + // that could be possibly mapped to the MCParticles from Geant; + // 2. Examine all MCParticles at Geant level, and find their ancestor Pdg, + // i.e. Pdg obtained from MCParticles from Genie; + // fill in MCParticleToAncestorPdgMap; + + //doing 1. Prepare store_MCTruths. + std::map < int, simb::MCParticle > MCT_trackIdToDaughterMap;//MCTruth that can be mapped by Geant MCP; + std::map < int, simb::MCParticle > MCT_trackIdToMCParticleMap; //MCTruth that can provide ancestor Pdg to MCPmother; + vector looking_for_mothers = {111, 1114, 2114, 2214, 2224, -111, -1114, -2114, -2214, -2224}; + + for(size_t i = 0; iNParticles(); j++){ + //collect MCTruth candidate; + simb::MCParticle check_mct = package.mcTruthVector[i]->GetParticle(j); + MCT_trackIdToMCParticleMap[ check_mct.TrackId()] = check_mct; + + if(debug_message){ + std::cout<<" \n MCTruth Track Id:"< store_InvisibleMCTruths;//MCTruth that can be mapped to MCPmother; +// std::vector< simb::MCParticle> store_VisibleMCTruths;//MCTruth that can be mapped to MCPmother; + + std::map < int, int > MCP_trackIdToPi0PdgMap; //Record trackId of ancestor Pi0 from MCPrticle; + + if(false){ + cout<<"This is a preview"<size(); i < iEnd; ++i){//theParticles are pointers to all MCParticles. + const art::Ptr particle(theParticles, i); + if(debug_message){ + std::cout<<"\n MCParticle Track Id:"<TrackId(); //gives the id of the MCParticle + std::cout<<" Mother ID:"<Mother(); + std::cout<<" Pdg Code:"<PdgCode(); + std::cout<<" Status Code:"<StatusCode(); + cout<<"; energy: "<E(); + } + } + cout<<"End of Previse"<size(); i < iEnd; ++i){//theParticles are pointers to all MCParticles. + //theTruthAssns are MCTruth with geantModuleLabel + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + + package.MCTruthToMCParticlesMap[truth].push_back(particle); + package.MCParticleToMCTruthMap[particle] = truth;//truth ->GetParticles() will give a bunch of particles that has not been linked. + package.MCParticleToTrackIdMap[particle->TrackId()] = particle; + + //---------- Find out MCParticles that would be mapped to MCTruth Pdg, i.e. particles produced by Genie + int mother_track = particle->Mother(); + int ancestor_pdg = particle->PdgCode();//itself pdg by default + //pdg==22 is for pi0 search; Mother() is for both pi0 and Delta; +// cout<<"\n # of daughter is left: "<first<<", "; +// } + if(false){ + std::cout<<"\n MCParticle Track Id:"<TrackId(); //gives the id of the MCParticle + std::cout<<" Mother ID:"<Mother(); + std::cout<<" Pdg Code:"<PdgCode(); + std::cout<<" Status Code:"<StatusCode(); + cout<<"; energy: "<E(); + } + + //true, fill the MCParticleToAncestorPdgMap with ancestor pdg; + //false, fill with self pdg; + + if(particle->Mother() == 0){//the goal is to change ancestor_pdg, and erase an element in MCT_trackIdToDaughterMap. + for(auto const & [a,b] : MCT_trackIdToDaughterMap){//map the ancestor pdg to each MCParticle + bool match_pdg = ( b.PdgCode() == ancestor_pdg ); + bool match_energy = ( b.E() - particle->E() < 0.0005); + if(match_pdg && match_energy){//woo, match to the MCTruth! now look for ancestor! + +// cout<<"\n Trace (candidate MCTruth daughter) TrackId "<TrackId()<PdgCode()); + cout<<"this pgd is "<TrackId(), particle->PdgCode()); + if(debug_message) cout<<" Mark down pi0 Track Id "<TrackId()<TrackId()<< " Pdg: "<PdgCode(); + // art::Ptr< simb::MCParticle > mother_mcp = TraceMothers(particle, package.MCParticleToTrackIdMap, {111, -111} , 1); + // cout<<" Found mother, TrackId "<TrackId()<<" with Pdg "<PdgCode()<<" energy: "<E(); + // int mother_pdg = mother_mcp->PdgCode(); + // for(auto iterator = MCT_trackIdToPi0AncestorMap.begin(); iterator != MCT_trackIdToPi0AncestorMap.end(); ++iterator){ + // bool match_pdg = ( (iterator->second).PdgCode() == mother_pdg ); + // bool match_energy = ( (iterator->second).E() - mother_mcp->E() < 0.0005); + // if(match_pdg && match_energy){//woo, match to the MCTruth! this photon is from MCTruth pi0! + // ancestor_pdg = mother_pdg; + // break; + // } + // } + } + + package.MCParticleToAncestorPdgMap.emplace(particle, ancestor_pdg); + }//End of looping all MCparticles; store_MCPcandidates are prepared. + + //--- + //Below is to check the result; + //--- + + if(fverbose){ + std::cout<<"\nSinglePhoton::CollectMCParticles_v2() \t||\t "; + std::cout<<"the number of all MCParticles (not necessarily in use) in the event is "<size()<TrackId(); + cout<<" "<PdgCode(); + cout<<" "<Mother()<<" | "; + cout< temp_max_value) temp_max_value = it.second; + // } + // for (auto it:package.showerToDistMap){ + // if(it.second > temp_max_value) temp_max_value = it.second; + // }//ok, now find the furthest distance; + + + //Declear two classes to kick off vertexing + VertexBuilder vbuilder;//it was named vb + ParticleAssociations_all candidates;// it was named pas + + //Initialize creteria for reconstruction. + vbuilder.SetParameters({start_prox, shower_prox, cpoa_vert_prox, cpoa_trackend_prox}); + + // if(fvbuildert.ftree) vbuilder.SetVBT(&fvbuildert); + //prepare parameters for pre-check # of tracks and showers; + std::vector< art::Ptr > use_tracks(package.selected_tracks);//CHECK all tracks + std::vector< art::Ptr > use_showers(package.selected_showers); + + + auto trackmap = package.trackToDistMap; + auto showermap = package.showerToDistMap; + //-- Get a preview of # of tracks and showers first + std::vector tem_bobbyshowersv; + std::vector tem_bobbytracksv; +// double temp_max_value = 200;//objects that is too far away from the Pandora Reco... + bool successful_vertex = false;//true, do them all together; false, do them by step; + bool one_for_all = false;//true, means load more_tracks/showers all at once; sucessful_vertex has to be true to make it work; + // std::vector< int > target_topo = {1,1};//{1,2}<->1s2t signal; + bool reset_bobbyvertex = true; + // int loop_tracker = 1; + // int max_loops = 4;//consider all objects within temp_max_value distance after the 4th loop. + + //update objects? + if(more_objects && one_for_all) { + for (auto object : package.more_tracks){ + use_tracks.push_back(object); + } + for (auto object : package.more_showers){ + use_showers.push_back(object); + } + } + //sort out values of both maps first + vector all_dist; + for (auto it:trackmap){ + if(it.second > nearby_vertex_dist){ + trackmap.erase(it.first); + } else{ + all_dist.push_back(it.second); + } + } + for (auto it:showermap){ + if(it.second > nearby_vertex_dist){ + showermap.erase(it.first); + } else{ + all_dist.push_back(it.second); + } + }//ok, now find the furthest distance; + std::sort(all_dist.begin(), all_dist.end());// distance from low to high; + + if(debug_message){ + cout<<"\nPreview Bobby Reco. Preformance"<0){ + ParticleAssociations_all candidates_copy(candidates); + candidates_copy.SetVerbose(false); + vbuilder.SetVerbose(false); + //CHECK control what tracks and showers to look at + if(more_objects){ + //nearby_vertex_dist = all_dist[(all_dist.size()-1)*loop_tracker/max_loops] + 0.01; +// nearby_vertex_dist = 80;//all_dist[(all_dist.size()-1)*loop_tracker/max_loops] + 0.01; + cout<<"within the distance: "<= target_topo[0] && temp_num_tracks >= target_topo[1])||all_dist.size()<1) successful_vertex = true; + + if(fverbose){//Over view of the inputs + cout< max_loops){ + break; + } + */ + }//end loop of testing diff. inputs for vertexing. + + candidates.SetVerbose(debug_message); + vbuilder.SetVerbose(debug_message); + //Looks good, then proceed to really fill in trees; + + // cout< tem_bobbyvertex_pos_xv; + std::vector tem_bobbyvertex_pos_yv; + std::vector tem_bobbyvertex_pos_zv; + std::vector tem_bobbyphotonshowerv; + std::vector tem_bobbypi0daughterv; + std::vector tem_bobbydeltaradppdaughterv; + std::vector tem_bobbydeltaradmdaughterv; + std::vector tem_bobbydeltaradpdaughterv; + std::vector tem_bobbydeltarad0daughterv; + std::vector tem_bobbyotherdaughterv; + std::vector tem_bobbyoverlayv; + std::vector tem_bobbyprotontrackv; + std::vector tem_same_slicev; + + std::vector> tem_track_daughter_pdgv; + std::vector> tem_shower_daughter_pdgv; + double min_bobbyvertexradius = 999; + size_t min_index = 0; + size_t temp_counter = 0; + + if(debug_message){ + cout<<"-- Check the reco-MC track Map (x-position - TrackId):"<Start().X()<<" "<TrackId()<ShowerStart().X()<<" "<TrackId()< get_a_track_daughter_pdg; + std::vector get_a_shower_daughter_pdg; + bool find_MC = true; + + for(size_t const n : particle_associated.GetObjectIndices()) { + int index; + art::Ptr temp_mcp; + + m_bobbyvertexradius = particle_associated.GetGoodness(); + //mark down the smallest radius; + if(m_bobbyvertexradius < min_bobbyvertexradius && m_bobbyvertexradius > 0){ + min_bobbyvertexradius = m_bobbyvertexradius; + min_index = temp_counter; + } + + if(detos.GetRecoType(n) == detos.ftrack_reco_type) {//it is a track + ++temp_num_tracks; + index = detos.GetTrackIndexFromObjectIndex(n); + if(debug_message)cout<<"A track "<< n <<" feed-in order "< tempp = package.trackToNuPFParticleMap.find(use_tracks[index])->second; + for(auto const &[a,b]:package.sliceIDToPFParticlesMap){ + if(std::find(b.begin(),b.end(),tempp)!=b.end() ) { + if(debug_message) cout<<"SLICE ID "<second;//CHECK THIS + get_a_track_daughter_pdg.push_back(temp_mcp->PdgCode()); + } + } + + if(detos.GetRecoType(n) == detos.fshower_reco_type) {//it is a shower + + ++temp_num_showers; + index = detos.GetShowerIndexFromObjectIndex(n); + if(debug_message) cout<<"A shower index "<< n <<" feed-in order "< tempp = package.showerToNuPFParticleMap.find(use_showers[index])->second; + for(auto const &[a,b]:package.sliceIDToPFParticlesMap){ + if(std::find(b.begin(),b.end(),tempp)!=b.end() ) { + // cout<<"SLICE ID "<second; + get_a_shower_daughter_pdg.push_back(temp_mcp->PdgCode()); + } + } + //identify shower/track MCTruth info. + if(debug_message) cout<<" TrackId "<TrackId()<<" PdgCode "<PdgCode(); + switch (temp_mcp->PdgCode()){ + case 2212: + get_a_proton++; + break; + case 22: + get_a_photon++; + break; + default: + break; + } + //identify the ancestor! +// art::Ptr temp_mcpmother= package.MCParticleToAncestorMap.find(temp_mcp)->second; + +// if(debug_message) cout<<" Ancestor PdgCode "<second; + switch( package.MCParticleToAncestorPdgMap.find(temp_mcp)->second){ +// switch(111){ + //second+ generation MCParticles lose connection to the ancestor, because I didnt trace all the way up in the AncestorToPdgMap; + case 2224://delta++ + if(debug_message) cout<<" from delta++"< + // tem_track_daughter_pdgv.push_back(get_a_track_daughter_pdg); + tem_shower_daughter_pdgv.push_back(get_a_shower_daughter_pdg); + + m_bobbyvertexradiusv.push_back(m_bobbyvertexradius); + } + + + //Finalize Bobby info. and pick a vertex set. + m_bobbysameslicev = tem_same_slicev; + m_bobbyvertex_pos_xv = tem_bobbyvertex_pos_xv; + m_bobbyvertex_pos_yv = tem_bobbyvertex_pos_yv; + m_bobbyvertex_pos_zv = tem_bobbyvertex_pos_zv; + m_bobbyprotontrackv = tem_bobbyprotontrackv; + m_bobbyphotonshowerv = tem_bobbyphotonshowerv; + m_bobbypi0daughterv = tem_bobbypi0daughterv; + m_bobbydeltaradppdaughterv = tem_bobbydeltaradppdaughterv; + m_bobbydeltaradmdaughterv = tem_bobbydeltaradmdaughterv; + m_bobbydeltaradpdaughterv = tem_bobbydeltaradpdaughterv; + m_bobbydeltarad0daughterv = tem_bobbydeltarad0daughterv; + m_bobbyotherdaughterv = tem_bobbyotherdaughterv; + m_bobbyoverlayv = tem_bobbyoverlayv; + m_bobbytracksv = tem_bobbytracksv; + m_bobbyshowersv= tem_bobbyshowersv; + + // for( size_t index = 0; index< m_bobbyvertex_pos_xv.size() ; index++){//loop over bobbyvertex + //metric for vertex: + //Topology: + //VertexSize/doogness: + + // if(temp_dist < best_vertex_dist){}//update when find a closer vertex to the pandora vertex. + if(true){//maybe pick the smallest vertex radius (for now), + // best_vertex_dist = temp_dist; + m_bobbyvertex_pos_x = m_bobbyvertex_pos_xv[min_index]; + m_bobbyvertex_pos_y = m_bobbyvertex_pos_yv[min_index]; + m_bobbyvertex_pos_z = m_bobbyvertex_pos_zv[min_index]; + m_bobbytracks = m_bobbytracksv[min_index]; + m_bobbyshowers = m_bobbyshowersv[min_index]; + m_bobbyphotonshower = m_bobbyphotonshowerv[min_index]; + m_bobbypi0daughter = m_bobbypi0daughterv[min_index]; + m_bobbydeltaradppdaughter = m_bobbydeltaradppdaughterv[min_index]; + m_bobbydeltaradmdaughter = m_bobbydeltaradmdaughterv[min_index]; + m_bobbydeltaradpdaughter = m_bobbydeltaradpdaughterv[min_index]; + m_bobbydeltarad0daughter = m_bobbydeltarad0daughterv[min_index]; + m_bobbyotherdaughter = m_bobbyotherdaughterv[min_index]; + m_bobbyoverlay = m_bobbyoverlayv[min_index]; + m_bobbyprotontrack = m_bobbyprotontrackv[min_index]; + // m_bobbytrackdaughter_pdg = tem_track_daughter_pdgv[min_index]; + // m_bobbyshowerdaughter_pdg = tem_shower_daughter_pdgv[min_index]; + //CHECK add shower/track daughter here; + } + // } + + //if( m_run_all_pfps && m_bobbyvertexing_more &&m_bobbytracks + m_bobbyshowers < 2&& run_count < 2 ){//repeat with 0,1 + // run_count++; + // cout<<"Need more objects. Now run the "< +#include +#include +#include +#include +#include + + +class DBSCAN{ + + public: + double m_eps; + int m_minpts; + + /// Default constructor + DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + ~DBSCAN(){} + + std::vector Scan2D(std::vector> &pts); + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + int UnionSets(std::vector> &seed, std::vector> &pts); +}; + +std::vector DBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + +} + + + +std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; +} + +int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; +} + + +#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc new file mode 100644 index 000000000..e77935b29 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc @@ -0,0 +1,1656 @@ +#include "SinglePhoton_module.h" +#include "analyze_OpFlashes.h" +#include "analyze_Tracks.h" +#include "analyze_Showers.h" +#include "analyze_Template.h" +#include "analyze_MCTruth.h" +#include "analyze_EventWeight.h" +#include "analyze_Slice.h" +#include "second_shower_search.h" +#include "isolation.h" +#include "BobbyVertexBuilder.h" +#include "Atlas.h" + +using namespace std; + +namespace single_photon +{ + //constructor + SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDAnalyzer(pset) + { + this->reconfigure(pset); + theDetector = lar::providerFrom(); + detClocks = lar::providerFrom(); + SCE = lar::providerFrom(); + geom = lar::providerFrom(); + + } + + void SinglePhoton::reconfigure(fhicl::ParameterSet const &pset) + { + // cout<<"\n\n\n\n\n\n Reconfigure!"<("PrintOut", true); + m_is_verbose = pset.get("Verbose",false); + m_use_PID_algorithms = pset.get("usePID",false); + m_use_delaunay = pset.get("useDelaunay",false); + m_is_data = pset.get("isData",false); + m_is_overlayed = pset.get("isOverlayed",false); + + m_pandoraLabel = pset.get("PandoraLabel"); + m_trackLabel = pset.get("TrackLabel"); + m_sliceLabel = pset.get("SliceLabel","pandora"); + m_showerLabel = pset.get("ShowerLabel"); + m_caloLabel = pset.get("CaloLabel"); + m_flashLabel = pset.get("FlashLabel"); + m_potLabel = pset.get("POTLabel"); + m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change + m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); + m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); + m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); + // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); + m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); + m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); + m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + + m_generatorLabel = pset.get("GeneratorLabel","generator"); + m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); + m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); + m_geantModuleLabel = pset.get("GeantModule","largeant"); + m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); + m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); + + + m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + m_runCRT = pset.get("runCRT",false); + m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + + m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); + + //Some track calorimetry parameters + m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); + m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); + m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? + m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); + + //Some shower calorimetry parameters + m_work_function = pset.get("work_function"); + m_recombination_factor =pset.get("recombination_factor"); + //m_gain =pset.get("gain"); + m_gain_mc =pset.get>("gain_mc"); + m_gain_data =pset.get>("gain_data"); + m_wire_spacing = pset.get("wire_spacing"); + m_width_dqdx_box = pset.get("width_box"); + m_length_dqdx_box = pset.get("length_box"); + m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); + m_pidLabel = pset.get("ParticleIDLabel","particleid"); + m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); + + m_run_all_pfps = pset.get("runAllPFPs",false); //See .fcl file! + m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); + m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); + + //------------ BobbyVertexBuilder --------------- + m_bobbyvertexing_more = pset.get("BobbyVertex_more_object", false); + //------------ BobbyVertexBuilder --------------- + + rangen = new TRandom3(22); + bool_make_sss_plots = true; + + std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; + std::vector delta_pdg_list = {2224,2214,1114,2114}; + for(size_t i=0; i< delta_pdg_list.size(); ++i){ + is_delta_map[delta_pdg_list[i]] = delta_names[i]; + is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; + } + + //output text file of events can be set to true + //initialize outfile + //io stream to write to .txt file for EVD + // std::ofstream out_stream; + + if (m_print_out_event && false){ + + out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); + if (!out_stream.is_open()){ + std::cout<<"ERROR output file not open"< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; + sssVetov1 = new ReadBDT(inputVars); + + + } + + //------------------------------------------------------------------------------------------------------------------------------------------ + + void SinglePhoton::analyze(const art::Event &evt) + {//analyzing one event per run! + + m_is_verbose = true; + std::cout<<"---------------------------------------------------------------------------------"<SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc + + this->ClearVertex(); + + //******************************Setup*******************************************************/ + //******************************************************************************************/ + // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. + // Make sure under the hood you understand this! + // ------------------------ + // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g + // tracks->pfparticles->hits + // tracks->pfparticles->spacepoints ..etc.. + // + // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. + + + //BadChannels + art::Handle > badChannelHandle; + evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle); + std::vector badChannelVector = *(badChannelHandle); + + + + //And some verticies. + art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> vertexVector; + art::fill_ptr_vector(vertexVector,vertexHandle); + + + //HERE COMES THE Atlas!!! + Atlas object_container(evt, {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel, m_generatorLabel, m_geantModuleLabel}, m_is_data); + + //still need these handls for now; + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel);//This is useful for FindManyP< reco::Track/Shower> + art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; + art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); + std::vector> flashVector = object_container.all_opflashes; + + //add new FindManyP + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); + + //Get back to original structure; + //typedef std::map< size_t, art::Ptr> PFParticleIdMap; + std::vector> pfParticleVector = object_container.all_pfparticles; + std::vector> hitVector = object_container.all_hits; + std::vector< art::Ptr > clusterVector = object_container.all_clusters; + std::vector> sliceVector = object_container.sliceVector; + + + PFParticleIdMap pfParticleMap = object_container.IDToPFParticleMap; + std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap = object_container.PFParticlesToVerticesMap; + std::map, std::vector> > pfParticleToMetadataMap = object_container.PFParticleToMetadataMap; +// std::map, art::Ptr> pfParticlesToShowerReco3DMap = object_container.PFParticlesToShowerReco3DMap; + std::map, art::Ptr> pfParticlesToShowerKalmanMap = object_container.PFParticlesToShowerKalmanMap; + std::map,std::vector>> kalmanTrackToCaloMap = object_container.kalmanTrackToCaloMap; + std::map, std::vector> > pfParticleToSpacePointsMap = object_container.PFParticleToSpacePointsMap; + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap = object_container.sliceToPFParticlesMap; + std::map< art::Ptr, std::vector> > sliceToHitsMap = object_container.sliceToHitsMap; + std::map> > sliceIDToPFParticlesMap = object_container.sliceIDToPFParticlesMap; + std::map> > sliceIDToHitsMap = object_container.sliceIDToHitsMap; + std::map, std::vector> > pfParticleToClustersMap = object_container.PFParticleToClustersMap; +// std::map, std::vector> > clusterToHitsMap = object_container.ClusterToHitsMap; + + + //Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: + //-------------------------------- + // Produce two PFParticle vectors containing final-state particles: + // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis + // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis + std::vector< art::Ptr > crParticles; + std::vector< art::Ptr > nuParticles; + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + + //if not running over neutrino slice only, use all pfp's in event + if (m_run_all_pfps){ + nuParticles = pfParticleVector; + } + + + //taking out the Larpandora helper functions here because they don't match to non-neutrino slice hits for some reason + + //OK Here we build two IMPORTANT maps for the analysis, (a) given a PFParticle get a vector of hits.. + //and (b) given a single hit, get the PFParticle it is in (MARK: is it only one? always? RE-MARK: Yes) + std::map, std::vector> > pfParticleToHitsMap; + // std::map, art::Ptr> hitToPFParticleMap; + //Using a pandora helper here, but to be honest we should probably just build using normal associations so keep independant if pssoble + // lar_pandora::LArPandoraHelper::BuildPFParticleHitMaps(evt, m_pandoraLabel, pfParticleToHitsMap, hitToPFParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters); + + //use pfp->cluster and cluster->hit to build pfp->hit map + //for each PFP + for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; + + //make empty vector to store hits + std::vector> hits_for_pfp = {}; + + //for each cluster, get the associated hits + for (art::Ptr cluster: clusters_vec){ + std::vector> hits_vec = object_container.ClusterToHitsMap[cluster]; + + //insert hits into vector + hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); + } + + //fill the map + pfParticleToHitsMap[pfp] = hits_for_pfp; + + }//for each pfp + + // Test ground for some slice stuff + std::cout<<"SliceTest: there are "< nu_scores; + bool isSelectedSlice = false; + int primaries = 0; + int primary_pdg = 0; + + for(auto &pfp: pfps){ + std::vector> metadatas = pfParticleToMetadataMap[pfp]; + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + //for each of the things in the list + if(propertiesmap.count("NuScore")==1){ + nu_scores.push_back(propertiesmap["NuScore"]); + } + if(propertiesmap.count("IsNeutrino")==1){ + isSelectedSlice = true; + } + } + + if (pfp->IsPrimary()) { + primaries++; + primary_pdg = (pfp->PdgCode()); + } + /*if (!pfp->IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + if(isNeutrino){ + isSelectedSlice = true; + }*/ + } + + if(nu_scores.size()>0){ + double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); + if(mean!=nu_scores.front()){ + std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. + //tracks is a vector of recob::Tracks and same for showers. + //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind +// std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score +// std::map, bool> object_container.PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise +// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's +// std::map,bool> PFPToNuSliceMap; +// std::map,double> PFPToTrackScoreMap; +// std::map sliceIdToNumPFPsMap; + //above are all filled in analyze slice + + //Need the following to identify a PFParticle is a track or a shower; + //Keng is going to pack these FindManyP up to a function using the pfParticleHandle; + + +// cout<<"CHECK! create object\n\n\n\n"< pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + object_container.PFParticleAsATrack = &pfPartToTrackAssoc; + object_container.PFParticleAsAShower = &pfPartToShowerAssoc; + //Oooohu, here we go! + +// int run_count = 0; +//redo_event: + this->AnalyzeSlices( + object_container.PFParticleToMetadataMap, + object_container.IDToPFParticleMap, + object_container.primaryPFPSliceIdVec, + object_container.sliceIdToNuScoreMap, + object_container.PFPToClearCosmicMap, + object_container.PFPToSliceIdMap, + object_container.PFPToNuSliceMap, + object_container.PFPToTrackScoreMap); + + this->CollectTracksAndShowers_v2(evt, object_container); //This tells what showers and tracks to use. + std::vector< art::Ptr > tracks; + tracks.reserve( object_container.selected_tracks.size() + object_container.more_tracks.size() ); + tracks.insert( tracks.end(), object_container.selected_tracks.begin(), object_container.selected_tracks.end() ); + tracks.insert( tracks.end(), object_container.more_tracks.begin(), object_container.more_tracks.end() ); + + std::vector< art::Ptr > showers; + showers.reserve( object_container.selected_showers.size() + object_container.more_showers.size() ); + showers.insert( showers.end(), object_container.selected_showers.begin(), object_container.selected_showers.end() ); + showers.insert( showers.end(), object_container.more_showers.begin(), object_container.more_showers.end() ); + + + + // std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap = object_container.trackToNuPFParticleMap; //give access to the PFParticle via track/shower + // std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap = object_container.showerToNuPFParticleMap; + + // std::map> MCParticleToTrackIdMap = object_container.MCParticleToTrackIdMap; + + //m_vertex_pos_x / y/ z are ready to be used now; + + + geoalgo::Point_t pvertex(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z); + //use object_container.trackToDistMap/showerToDistMap; + m_is_verbose = false; + this->AnalyzeTracks( + object_container, + pvertex, + tracks, + object_container.trackToNuPFParticleMap, + pfParticleToSpacePointsMap, + object_container.MCParticleToTrackIdMap,//disabled + object_container.sliceIdToNuScoreMap, + object_container.PFPToClearCosmicMap, + object_container.PFPToSliceIdMap, + object_container.PFPToTrackScoreMap, + object_container.PFPToNuSliceMap, + pfParticleMap); + + this->AnalyzeShowers( + object_container, + pvertex, + showers, + object_container.showerToNuPFParticleMap, + pfParticleToHitsMap, + pfParticleToClustersMap, + object_container.ClusterToHitsMap, + object_container.sliceIdToNuScoreMap, + object_container.PFPToClearCosmicMap, + object_container.PFPToSliceIdMap, + object_container.PFPToNuSliceMap, + object_container.PFPToTrackScoreMap, + pfParticleMap, + object_container.PFParticlesToShowerReco3DMap); + m_is_verbose = true; + + if(!m_is_data){ + //Borrow the following from MCTruth + art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); + + + //mcc9 march miniretreat fix + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + m_test_matched_hits = 0; + + for(size_t j=0; j hit = hitVector[j]; + + particle_vec.clear(); match_vec.clear(); //only store per hit + + mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); + + if(particle_vec.size() > 0){ + m_test_matched_hits++; + } + + } + this->CollectMCParticles_v2(evt, object_container); +// this->CollectMCParticles( +// evt, +// m_geantModuleLabel, +// object_container.MCTruthToMCParticlesMap, +// object_container.MCParticleToMCTruthMap, +// object_container.MCParticleToTrackIdMap);//created here; + + this->ResizeShowers(showers.size()); + this->ResizeTracks(tracks.size()); + + this->showerRecoMCmatching(//Shower MCTruth here? + showers, + object_container.showerToMCParticleMap, //created here + object_container.showerToNuPFParticleMap, + pfParticleToHitsMap, + mcparticles_per_hit, //see above + object_container.matchedMCParticleVector, //created here + pfParticleMap, + object_container.MCParticleToTrackIdMap, //input + object_container.sliceIdToNuScoreMap, + object_container.PFPToClearCosmicMap, + object_container.PFPToSliceIdMap, + object_container.PFPToNuSliceMap); + + std::vector trk_overlay_vec = recoMCmatching>( + tracks, + object_container.trackToMCParticleMap, //created here + object_container.trackToNuPFParticleMap, + pfParticleToHitsMap, + mcparticles_per_hit, + object_container.matchedMCParticleVector); + + this->RecoMCTracks(//Find Track MCTruth here? + tracks, + object_container, + object_container.trackToNuPFParticleMap, + object_container.trackToMCParticleMap, + object_container.MCParticleToMCTruthMap, + object_container.matchedMCParticleVector, + //mcParticleVector, + object_container.MCParticleToTrackIdMap, + object_container.sliceIdToNuScoreMap, + object_container.PFPToClearCosmicMap, + object_container.PFPToSliceIdMap, + trk_overlay_vec); + } + //------------------------------- + + + //---------- VertexBuilder-------------- + //use the new the new class for variables and vertexing. + // ParticleAssociations_all const & bobby_particle_associations = BobbyVertexBuilder_ext(object_container, m_bobbyvertexing_more ); + BobbyVertexBuilder(object_container, m_bobbyvertexing_more ); + //introduce a for loop for all particle associations identified by Bobby's VertexBuilder + +/*CHECK + +std::cout<<"Filling in Bobby's Vertex info. with "< temp_MCtrack = object_container.trackToMCParticleMap.find(tracks[trackindex])->second; + if(temp_MCtrack->PdgCode()==2212){ + get_a_proton++; + } + } + if(detos.GetRecoType(n) == detos.fshower_reco_type) { + + ++temp_num_showers; + int showerindex = detos.GetShowerIndexFromObjectIndex(n);//CHECK + art::Ptr temp_MCshower = object_container.showerToMCParticleMap.find(showers[showerindex])->second; + if(temp_MCshower->PdgCode()==22){ + get_a_photon++; + } + art::Ptr amother = object_container.MCParticleToTrackIdMap[temp_MCshower->Mother()]; + if(amother){//sometime Mother is unknown.. + if(amother->PdgCode() == 111){ + get_a_pi0daughter++; + } + } + } + } + cout<<"# of showers: "< 0 && m_bobbytracksv[index] > 0)|| index == 0){ + // best_vertex_dist = temp_dist; + + m_bobbyvertex_pos_x = m_bobbyvertex_pos_xv[index]; + m_bobbyvertex_pos_y = m_bobbyvertex_pos_yv[index]; + m_bobbyvertex_pos_z = m_bobbyvertex_pos_zv[index]; + m_bobbytracks = m_bobbytracksv[index]; + m_bobbyshowers = m_bobbyshowersv[index]; + break; + } + } + +// if( m_run_all_pfps && m_bobbyvertexing_more &&m_bobbytracks + m_bobbyshowers < 2&& run_count < 2 ){//repeat with 0,1 +// run_count++; +// cout<<"Need more objects. Now run the "< calo_per_track(trackHandle, evt, m_caloLabel); + std::map, std::vector> > trackToCalorimetryMap; + //So a cross check + if (!calo_per_track.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; + return; + } + for(size_t i=0; i< tracks.size(); ++i){ + if(calo_per_track.at(tracks[i].key()).size() ==0){ + std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."<PlaneID()< pid_per_track(trackHandle, evt, m_pidLabel); + std::map, art::Ptr > trackToPIDMap; + + if(m_use_PID_algorithms){ + // Build a map to get PID from PFParticles, then call PID collection function + for(size_t i=0; i< tracks.size(); ++i){ + art::Ptr track = tracks[i]; + trackToPIDMap[track] = pid_per_track.at(track.key()); + } + } + + //------------------------------------- + + //CRT + /* + if(m_has_CRT){ + art::ValidHandle> const & crtHandle = evt.getValidHandle>(m_CRTTzeroLabel); + std::vector> crtVector; + art::fill_ptr_vector(crtVector,crtHandle); + } + */ + + + //**********************************************************************************************/ + //**********************************************************************************************/ + //---------------------------------- MC TRUTH Data Only--------------------------- + //**********************************************************************************************/ + //**********************************************************************************************/ + + //Get the MCtruth handles and vectors + std::vector> mcTruthVector; +// std::vector> mcParticleVector; + + //Then build a map from MCparticles to Hits and vice versa + std::map< art::Ptr, std::vector > > mcParticleToHitsMap; + std::map< art::Ptr, art::Ptr > hitToMCParticleMap; + + //Apparrently a MCParticle doesn't know its origin (thanks Andy!) + //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa + //Note which map is which! //First is one-to-many. //Second is one-to-one +// std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; +// std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + + +// std::vector> matchedMCParticleVector; +// std::map, art::Ptr > trackToMCParticleMap; +// std::map, art::Ptr > showerToMCParticleMap; + + //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower + std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; + std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; + + + //**********************************************************************************************/ + //**********************************************************************************************/ + //Some event based properties + + m_number_of_events++; + + m_run_number = evt.run(); + m_subrun_number = evt.subRun(); + m_event_number = evt.id().event(); + + if(vertexVector.size()>0){ + m_number_of_vertices++; + } + + + //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). + + badChannelMatching>(badChannelVector, tracks, object_container.trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + + if(m_is_verbose){ + std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; + } + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap, object_container.PFPToTrackScoreMap); + //std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<Self()<> pfp_vec = pair.second; + int slice_id = pair.first; + //if (slice_vec[0]->Slice() != object_container.PFPToSliceIdMap[pfp] ) + for(auto pfp: pfp_vec){ + if (slice_id != object_container.PFPToSliceIdMap[pfp] && object_container.PFPToSliceIdMap[pfp]>=0){ + std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but object_container.PFPToSliceIdMap[pfp] = "<< object_container.PFPToSliceIdMap[pfp]<> crthit_h; //only filled when there are hits, otherwise empty + art::Handle rawHandle_DAQHeader; + double evt_timeGPS_nsec = -999 ; + if(m_runCRT){ + evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + + evt.getByLabel(m_CRTHitProducer, crthit_h); + raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); + art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); + evt_timeGPS_nsec = evtTimeGPS.timeLow(); + + std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec); + // this->AnalyzeFlashes(flashVector, crthit_h); + +// std::cout<<"start track"<AnalyzeTracks(tracks, object_container.trackToNuPFParticleMap, pfParticleToSpacePointsMap, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToTrackScoreMap, object_container.PFPToNuSliceMap,pfParticleMap); +// this->AnalyzeShowers(showers,object_container.showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap, object_container.PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); + this->AnalyzeKalmanShowers(showers,object_container.showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); + + + this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); + + if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); + // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. + // MCShower and MCTrack come from energy depositions in GEANT4 + if(!m_is_data){ + + art::ValidHandle> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); + art::fill_ptr_vector(mcTruthVector,mcTruthHandle); + + art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); +// art::fill_ptr_vector(mcParticleVector,mcParticleHandle); + art::fill_ptr_vector(object_container.matchedMCParticleVector,mcParticleHandle); + + + + //Get the MCParticles (move to do this ourselves later) +// this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, object_container.MCParticleToTrackIdMap); + + //OK lets get all set up with sim::MCTrack and sim::MCShower . + + // art::ValidHandle> const & mcTrackHandle = evt.getValidHandle>(m_mcTrackLabel); + // art::ValidHandle> const & mcShowerHandle = evt.getValidHandle>(m_mcShowerLabel); + // art::fill_ptr_vector(mcTrackVector,mcTrackHandle); + // art::fill_ptr_vector(mcShowerVector,mcShowerHandle); + +/*CHECK: move this to abvoe + art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); + + + //mcc9 march miniretreat fix + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + m_test_matched_hits = 0; + + for(size_t j=0; j hit = hitVector[j]; + + particle_vec.clear(); match_vec.clear(); //only store per hit + + mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); + + if(particle_vec.size() > 0){ + m_test_matched_hits++; + } + + } +*/ + + this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, object_container.MCParticleToTrackIdMap); + + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, object_container.trackToMCParticleMap, object_container.trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, object_container.matchedMCParticleVector); + + + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap); + + + //showerRecoMCmatching( showers, showerToMCParticleMap, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); + + //looking at metadata + //std::map, double > pfParticleToNuScoreMap;//is filled during analyze slices + /*std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::cout<<"SinglePhoton\t||\t Analyze Metadata"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec); + std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ + std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], object_container.showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap); + + for(auto & track: tracks){ + std::cout<<"CHECKTRACK 0: "<>(matchedMCParticleVector, mcTrackVector, MCParticleToMCTrackMap); + // perfectRecoMatching>(matchedMCParticleVector, mcShowerVector, MCParticleToMCShowerMap); + //OK a really wierd bug in which by accessing the map here in line 355, everything breaks.. but commenting it out is OK + + + //for(auto & shower: showers){ + // auto mp = showerToMCParticleMap[shower]; + // std::cout<<"CHECKSHOWER: count trackmap: "<RecoMCTracks(tracks, object_container.trackToNuPFParticleMap, trackToMCParticleMap, object_container.MCParticleToMCTruthMap,mcParticleVector, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap,trk_overlay_vec); + + + + //Obsolete function + //this->RecoMCShowers(showers, object_container.showerToNuPFParticleMap, showerToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector); +// this->AnalyzeMCTruths(mcTruthVector, mcParticleVector); + this->AnalyzeMCTruths(mcTruthVector, object_container.matchedMCParticleVector); + this->AnalyzeEventWeight(evt); + + //added since last time? + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + //this one was for testing, leaving out for now + // this->FindSignalSlice( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap, object_container.showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, object_container.trackToNuPFParticleMap, trackToMCParticleMap); + if(m_is_verbose)std::cout<<"Starting SecondShowerSearch"<SecondShowerSearch(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, object_container.matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); + + std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap, object_container.showerToNuPFParticleMap , allPFPSliceIdVec, object_container.showerToMCParticleMap, object_container.trackToNuPFParticleMap, object_container.trackToMCParticleMap, object_container.PFPToSliceIdMap); + + if (m_print_out_event){ + if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ + out_stream <<"run subrunevent "<> ev_evw ; + if( evt.getByLabel("eventweightSplines",ev_evw)){ + + std::map> const & weight_map = ev_evw->front().fWeight; + if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; + //m_genie_spline_weight=weight_map; + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.second.size()==1){ + m_genie_spline_weight = x.second.front(); + } + } + + }else{ + std::cout<<"No data producet called eventweightSplines"< * tmp_mcparticles_per_hit = NULL; + std::vector> tmp_matchedMCParticleVector; + +// this->SecondShowerSearch(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap,*tmp_mcparticles_per_hit, tmp_matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); + + + } + + //Second Shower Search-Pandora style + if(!m_run_all_pfps){ + //Isolation + this-> IsolationStudy(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap); + } + + + //This is a quick check + + size_t n_neutrino_slice=0; + size_t n_neutrino_candidate_pfp_id=0; + + for(size_t s=0; s< sliceVector.size(); s++){ + auto slice = sliceVector[s]; + std::vector> pfps = sliceToPFParticlesMap[slice]; + + int primaries=0; + int n_dau=0; + int found = 0; + //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + //Ok this is neutrino candidate. + + std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); + for (const size_t daughterId : pfp->Daughters()){ + n_dau++; + auto dau = pfParticleMap[daughterId]; + std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ + while(tmp->NumDaughters()>0 && n_gen < 4){ + for(int k=0; k< n_gen; k++){ + std::cout<<"---> "; + } + auto grandau = pfParticleMap[granDaughterId]; + std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; + } + + } + std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ + std::cout<<"We're Missing Something!."<1){ + throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "<Fill(); + ncdelta_slice_tree->Fill(); + + std::cout<<"---------------------------------------------------------------------------------"<Fill(); + } + + //------------------------------------------------------------------------------------------- + + + void SinglePhoton::beginJob() + { + mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; + + art::ServiceHandle tfs; + + vertex_tree = tfs->make("vertex_tree", "vertex_tree"); + pot_tree = tfs->make("pot_tree", "pot_tree"); + eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); + ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); + + + // --------------------- POT Releated variables ----------------- + m_number_of_events = 0; + m_number_of_vertices = 0; + m_pot_count=0; + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + //---------------------- BobbyVertexBuilder ----------------- + vertex_tree->Branch("reco_bobbyvertex_x", &m_bobbyvertex_pos_x); + vertex_tree->Branch("reco_bobbyvertex_y", &m_bobbyvertex_pos_y); + vertex_tree->Branch("reco_bobbyvertex_z", &m_bobbyvertex_pos_z); + vertex_tree->Branch("reco_bobbyshowers", &m_bobbyshowers); + vertex_tree->Branch("reco_bobbytracks", &m_bobbytracks); + //vector + + vertex_tree->Branch("reco_bobbyvertex_xv", &m_bobbyvertex_pos_xv); + vertex_tree->Branch("reco_bobbyvertex_yv", &m_bobbyvertex_pos_yv); + vertex_tree->Branch("reco_bobbyvertex_zv", &m_bobbyvertex_pos_zv); + vertex_tree->Branch("reco_bobbytracksv", &m_bobbytracksv); + vertex_tree->Branch("reco_bobbyshowersv", &m_bobbyshowersv); + vertex_tree->Branch("reco_bobbyvertexradiusv", &m_bobbyvertexradiusv); + vertex_tree->Branch("reco_bobbyvertexradius", &m_bobbyvertexradius); + //MCTruth Matrching; + vertex_tree->Branch("mctruth_bobbysameslicev", &m_bobbysameslicev); + vertex_tree->Branch("mctruth_bobbyprotontrackv", &m_bobbyprotontrackv); + vertex_tree->Branch("mctruth_bobbyphotonshowerv", &m_bobbyphotonshowerv); + vertex_tree->Branch("mctruth_bobbypi0daughterv", &m_bobbypi0daughterv); + vertex_tree->Branch("mctruth_bobbydeltaradppdaughterv", &m_bobbydeltaradppdaughterv); + vertex_tree->Branch("mctruth_bobbydeltaradmdaughterv", &m_bobbydeltaradmdaughterv); + vertex_tree->Branch("mctruth_bobbydeltaradpdaughterv", &m_bobbydeltaradpdaughterv); + vertex_tree->Branch("mctruth_bobbydeltarad0daughterv", &m_bobbydeltarad0daughterv); + vertex_tree->Branch("mctruth_bobbyotherdaughterv", &m_bobbyotherdaughterv); + vertex_tree->Branch("mctruth_bobbyoverlayv", &m_bobbyoverlayv); +// vertex_tree->Branch("mctruth_bobbytrackdaughter_pdg", & m_bobbytrackdaughter_pdg); +// vertex_tree->Branch("mctruth_bobbyshowerdaughter_pdg", & m_bobbyshowerdaughter_pdg); + + vertex_tree->Branch("mctruth_bobbyprotontrack", &m_bobbyprotontrack); + vertex_tree->Branch("mctruth_bobbyphotonshower", &m_bobbyphotonshower); + vertex_tree->Branch("mctruth_bobbypi0daughter", &m_bobbypi0daughter); + vertex_tree->Branch("mctruth_bobbyotherdaughter", &m_bobbyotherdaughter); + vertex_tree->Branch("mctruth_bobbyoverlay", &m_bobbyoverlay); + vertex_tree->Branch("mctruth_bobbydeltaradppdaughter", &m_bobbydeltaradppdaughter); + vertex_tree->Branch("mctruth_bobbydeltaradpdaughter", &m_bobbydeltaradpdaughter); + vertex_tree->Branch("mctruth_bobbydeltaradmdaughter", &m_bobbydeltaradmdaughter); + vertex_tree->Branch("mctruth_bobbydeltarad0daughter", &m_bobbydeltarad0daughter); + + vertex_tree->Branch("parameter_dist_tt",&m_dist_tt); + vertex_tree->Branch("parameter_dist_sx",&m_dist_sx); + vertex_tree->Branch("parameter_dist_st",&m_dist_st); + vertex_tree->Branch("parameter_dist_sst",&m_dist_sst); + //----------------------------------------------------------- + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + this->CreateIsolationBranches(); + + this->CreateSecondShowerBranches(); + // --------------------- Flash Related Variables ---------------------- + this->CreateFlashBranches(); + + // --------------------- Track Related variables ------------ + this->CreateTrackBranches(); + + std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; + + + //Get the info for length->energy conversion from PSTAR database. + TFile *fileconv; + struct stat buffer; + + if(stat("proton_conversion.root", &buffer) == 0){ + fileconv = new TFile("proton_conversion.root", "read"); + }else{ + fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); + } + + proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); + proton_length2energy_tgraph.GetMean(); + fileconv->Close(); + + // --------------------- Shower Related variables ------------ + this->CreateShowerBranches(); + + + //Metadata Branches + this->CreateSliceBranches(); + //this->CreateMatchedSliceBranches(); + + + // ---------------------- MCTruth Related Variables ---------- + this->CreateMCTruthBranches(); + + // ---------------------- Eventweight CTruth Related Variables --------- + this->CreateEventWeightBranches(); + + + //std::string bad_channel_file = "/pnfs/uboone/resilient/users/markross/tars/MCC9_channel_list.txt"; + + std::string bad_channel_file = "MCC9_channel_list.txt"; + + if(stat(bad_channel_file.c_str(), &buffer) != 0){ + bad_channel_file = gpvm_location+bad_channel_file; + } + + std::ifstream bc_file(bad_channel_file); + + if (bc_file.is_open()) + { + std::string line; + while ( getline (bc_file,line) ) + { + std::vector res; + std::istringstream iss(line); + for(std::string s; iss >> s; ) + res.push_back( std::stof(s)); + + std::pair t(res[0],res[1]); + bad_channel_list_fixed_mcc9.push_back(t); + } + bc_file.close(); + } + + + std::cout<<"SinglePhoton \t||\t beginJob() is complete"<ClearIsolation(); + + this->ClearSecondShowers(); + //------------- Flash related Variables ------------------ + this->ClearFlashes(); + + //------------- Track Related Variables ----------------- + this->ClearTracks(); + + //------------- Track Related Variables ----------------- + this->ClearShowers(); + this->ClearMCTruths(); + + //------------- EventWeight Related Variables ----------------- + this->ClearEventWeightBranches(); + + + + //MetaData Related Varibles + this->ClearSlices(); + + + } + + + void SinglePhoton::beginSubRun(art::SubRun const & sr) { + + if(m_potLabel != ""){ + if(m_potLabel == "generator"){ + double this_pot = sr.getValidHandle(m_potLabel)->totgoodpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; + if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ + m_pot_count += potSummaryHandlebnbETOR875->totpot; + } + } + } + + } + + + + + + + + + + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + + void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; + int n_vert =0; + + //std::cout<<"There are "<second; + if (!vertexVector.empty()) + { + if (vertexVector.size() !=1) + std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; + + const art::Ptr vertex = *(vertexVector.begin()); + double xyz[3] = {0.0, 0.0, 0.0} ; + vertex->XYZ(xyz); + + n_vert++; + //std::cout<<"Vertex!"<<"\t "<size()<size(); ++i) + { + const art::Ptr pParticle(pfParticleHandle, i); + // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) + { + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + } + + + /*********************** + * + * GetFinalStatePFParticleVectors() - fill in crParticles and nuParticles. + * m_reco_vertex_size (filled) - the size of neutrino vertex is determined here. + * *********************/ + void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) + { + + int found = 0; + int primaries = 0; + int full = 0; + //everything from the pfParticleMap, and look inside the element one by one. + for (PFParticleIdMap::const_iterator it = pfParticleMap.begin(); it != pfParticleMap.end(); ++it) + { + const art::Ptr pParticle(it->second); + + full++; + // Only look for primary particles + if (!pParticle->IsPrimary()) continue; + + // Check if this particle is identified as the neutrino + const int pdg(pParticle->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + + + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + this->GetVertex(pfParticlesToVerticesMap, pParticle ); + + } else{ // All non-neutrino primary particles are reconstructed under the cosmic hypothesis + crParticles.push_back(pParticle); + continue; + } + + // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. + // If this is not the case please handle accordingly + if (!nuParticles.empty()) + { + throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; + } + + // Add the daughters of the neutrino PFParticle to the nuPFParticles vector + for (const size_t daughterId : pParticle->Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + nuParticles.push_back(pfParticleMap.at(daughterId)); + } + } + std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< z(n,0.0); + + TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); + TGraphDelaunay delan(g); + delan.SetMarginBinsContent(0); + delan.ComputeZ(0,0); + delan.FindAllTriangles(); + (*num_triangles)=delan.GetNdt(); + + //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays + Int_t *MT = delan.GetMTried(); + Int_t *NT = delan.GetNTried(); + Int_t *PT = delan.GetPTried(); + + (*area)=0.0; + for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ + + int n = hits.size(); + std::vector C0,T0; + std::vector C1,T1; + std::vector C2,T2; + size_t n_0=0; + size_t n_1=0; + size_t n_2=0; + + for(int i=0;i hit = hits[i]; + switch(hit->View()){ + case 0: + C0.push_back((double)hit->Channel()); + T0.push_back(hit->PeakTime()); + n_0++; + break; + case 1: + C1.push_back((double)hit->Channel()); + T1.push_back(hit->PeakTime()); + n_1++; + break; + case 2: + C2.push_back((double)hit->Channel()); + T2.push_back(hit->PeakTime()); + n_2++; + break; + default: + break; + } + } + if(m_use_delaunay){ + if(n_0>0) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); + if(n_1>0) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); + if(n_2>0) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); + } + num_hits[0] = n_0; + num_hits[1] = n_1; + num_hits[2] = n_2; + + //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ + corrected.resize(3); + + double kx = input[0]; + double ky = input[1]; + double kz = input[2]; + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + +// double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & mcparticle, std::vector & corrected){ + corrected.resize(3); + + double kx = mcparticle->Vx(); + double ky = mcparticle->Vy(); + double kz = mcparticle->Vz(); + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + //double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & corrected){ + corrected.resize(3); + //Space Charge Effect! functionize this soon. + double kx = mcparticle.Vx(); + double ky = mcparticle.Vy(); + double kz = mcparticle.Vz(); + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky + scecorr.Y(); + corrected[2]=kz + scecorr.Z(); + return 0; + } + + void SinglePhoton::CollectMCParticles( + const art::Event &evt, + const std::string &label, //m_geantModuleLabel + std::map< art::Ptr, std::vector>> &truthToParticles, + std::map< art::Ptr, art::Ptr> &particlesToTruth, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(label, theParticles); + + if (!theParticles.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, label); + + for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) + {//theParticles are pointers to all MCParticles. + //theTruthAssns are MCTruth with geantModuleLabel + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + + truthToParticles[truth].push_back(particle); + particlesToTruth[particle] = truth; + MCParticleToTrackIdMap[particle->TrackId()] = particle; + } + + std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) + { + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + + art::Handle< std::vector > theSimChannels; + evt.getByLabel(label, theSimChannels); + + if (!theSimChannels.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; + } + + for (unsigned int i = 0; i < theSimChannels->size(); ++i) + { + const art::Ptr channel(theSimChannels, i); + simChannelVector.push_back(channel); + } + } + + + void SinglePhoton::BuildMCParticleHitMaps( + const art::Event &evt, + const std::string &label, + const std::vector> &hitVector, + std::map< art::Ptr, std::vector > > &particlesToHits, + std::map< art::Ptr, art::Ptr > &hitsToParticles, + const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, + std::map< int, art::Ptr > & MCParticleToTrackIdMap) + { + std::vector< art::Ptr > simChannelVector; + std::map< art::Ptr, std::vector> > truthToParticles; + std::map< art::Ptr, art::Ptr > particlesToTruth; + std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; + + this->CollectSimChannels(evt, label, simChannelVector); + this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + + + } + + +} //namespace diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h new file mode 100644 index 000000000..b52ff16e4 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h @@ -0,0 +1,1428 @@ +#ifndef SINGLE_PHOTON_ANALYSIS +#define SINGLE_PHOTON_ANALYSIS + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Optional/TFileService.h" +#include "art/Framework/Services/Optional/TFileDirectory.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +#include "ubobj/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +// Helper function for PID stuff +#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" + +#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "bad_channel_matching.h" +#include "sssVeto_BDT.class.h" +#include "DBSCAN.h" +#include "VertexBuilder/ParticleAssociations.h" + +//------------------------------------------------------------------------------------------------------------------------------------------ + +namespace single_photon +{ + + template + std::vector sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ + double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; + int n_ticks; + + bool pass; + + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; + + class cluster { + public: + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts,&wires[0],&ticks[0]); + f_graph = af_graph; + + }; + + int getID() {return f_ID;} + int getN() {return f_npts;} + int getPlane(){ return f_plane;} + TGraph * getGraph(){ return &f_graph;} + std::vector> getHits(){return f_hits;} + int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} + sss_score * getSSScore(){return f_SSScore;} + private: + + int f_ID; + int f_npts; + int f_plane; + std::vector> f_pts; + std::vector> f_hits; + TGraph f_graph; + sss_score *f_SSScore; + }; + + + + + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDAnalyzer + { + //----- VertexBuilder------- + //set limit here, refered to the internal note; + friend class Atlas; + //--------------------------- + + public: + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + void analyze(const art::Event &evt); + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob(); + + /** + * @brief End the job, setting down ! + * + */ + void endJob(); + + + void beginSubRun(art::SubRun const & sr); + + protected: //allow inheritance class to use following variables. + void ClearVertex(); + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleHandle the handle for the PFParticle collection + * @param pfParticleMap the mapping from ID to PFParticle + */ + void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); + + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ + void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; + + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleMap the mapping from ID to PFParticle + * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis + * @param nuParticles a vector to hold the final-states of the reconstruced neutrino + */ + void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); + + /** + * @brief Collect associated tracks and showers to particles in an input particle vector + * + * @param particles a vector holding PFParticles from which to find the associated tracks and showers + * @param pfParticleHandle the handle for the PFParticle collection + * @param evt the art event to analyze + * @param tracks a vector to hold the associated tracks + * @param showers a vector to hold the associated showers + */ + + + //---------------- BobbyVertexBuilder ------------------------ + + /************************* + * CollectTrackAndShowrs_v2 - go through pandora_object inside + * an event, and filter out proper tracks/showers for + * vertexing. + * + *Atlas (input/modified) contains maps and + * collections of pandora_objejcts that need to be modified. + * ***********************/ + + void CollectTracksAndShowers_v2(const art::Event &evt, class Atlas &package); + void CollectMCParticles_v2(const art::Event &evt, class Atlas & package); + //-------------------------------------------------- + + + void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); + + void CollectCalo(const art::Event &evt,const art::Ptr &shower); + + + /* + *@brief Calculated the shower energy by looping over all the hits and summing the charge + *@param hits - an art pointer of all the hits in a shower + * + * + * */ + double CalcEShower(const std::vector> &hits); + + double CalcEShowerPlane(const std::vector>& hits, int plane); + + int getNHitsPlane(std::vector> hits, int this_plane); + + + /** + *@brief Takes a hit and multiplies the charge by the gain + *@param thishitptr art pointer to a hit + *@param plane the plane the hit is on + **/ + double GetQHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV for a given hit + * @param thishit - an individual hit + * + * + * */ + double QtoEConversionHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV from a given Q value + * @param q - the charge value + * + * */ + double QtoEConversion(double q); + + + /** + *@brief Takes a vector of dQ/dx values and converts to dE/dx + *@param dqdx - vector of dqdx points + * + * */ + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + /** + * + *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane + *@param shower - a Pandora shower + *@param clusters - all of the clusters in the shower + *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster + *@param plane - a single plane + * * */ + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane); + /** + *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) + *@param shower_dir - the 3D shower direction + *@param plane - a single plane + * */ + double getPitch(TVector3 shower_dir, int plane); + TVector3 getWireVec(int plane); + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); + double getAnglewrtWires(TVector3 shower_dir, int plane); + + double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); + int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); + double degToRad(double deg); + double radToDeg(double rad); + /** + *@brief Calculates the four corners of a box of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); + + /** + *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle + *@param thishit_pos - 2d location of a hit in cm + *@param rectangle - vector of the positions of the four corners of the rectangle + * + * */ + bool insideBox(std::vector thishit_pos, std::vector> rectangle); + + /** + * + *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary + *uses triangle area check + * + * */ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + + double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); + + /*** + *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 + *@param thisvector - vector of doubles + * + * */ + double getMedian(std::vector thisvector); + + + //---------------- Templatees ---------------------------- + void AnalyzeTemplates(); + void ClearTemplates(); + void ResizeTemplates(size_t); + void CreateTemplateBranches(); + + + //---------------- SecondShower---- + void ClearSecondShowers(); + void ResizeSecondShowers(size_t size); + + void CreateSecondShowerBranches(); + + void SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + std::vectorSecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + + sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); + TGraph* GetNearestNpts(int,int,std::vector>&,double,double,int); + int CompareToShowers(int,int,std::vector>&,double,double, + const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); + //---------------- Isolation ----------------- + + void ClearIsolation(); + void CreateIsolationBranches(); + void IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); + + + + //---------------- Flashes ---------------------------- + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec); + + // void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h); + void ClearFlashes(); + void ResizeFlashes(size_t); + void CreateFlashBranches(); + + //---------------- Tracks ---------------------------- + void AnalyzeTracks( + Atlas& package, + geoalgo::Point_t pvertex, + const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap + ); + + void ClearTracks(); + void ResizeTracks(size_t); + void CreateTrackBranches(); + void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); + void RecoMCTracks( + const std::vector>& tracks, + Atlas &package, + std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector& vec); + + void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); + TGraph proton_length2energy_tgraph; + + //---------------- Showers ---------------------------- + + void AnalyzeShowers( + Atlas &package, + geoalgo::Point_t pvertex, + const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr> &PFPtoShowerReco3DMap + ); + void ClearShowers(); + void ResizeShowers(size_t); + void CreateShowerBranches(); + void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, + std::map,art::Ptr> & pfptotrkmap, + std::map,std::vector>> & trktocalomap, + std::map, std::vector>> & pfParticleToHitMap + ); + + void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector); + + std::vector showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap); + + + + + //---------------- MCTruths ---------------------------- + + void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); + void ClearMCTruths(); + void ResizeMCTruths(size_t); + void CreateMCTruthBranches(); + + std::map is_delta_map; + + //---------------- EventWeight ---------------------------- + + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); + void CreateEventWeightBranches(); + + //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. + + + + + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + + //-------------- Slices/Pandora Metadata ---------------// + void ClearSlices(); + void ResizeSlices(size_t size); + //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); + void CreateSliceBranches(); + //void CreateMatchedSliceBranches(); + void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> & primaryPFPSliceIdVec, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap); + + // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumPFPsMap ); + std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); + //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); + + int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + + int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + //can also look at things like shower energy, conversion length, etc. + + std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap ); + // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + // std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumShowersMap ); + + + std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap); + + void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap, + std::map, int>& PFPToSliceIdMap); + + + void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); + + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; + std::vector m_matched_signal_shower_nuscore; + std::vector m_matched_signal_shower_sliceId; + std::vector m_matched_signal_shower_is_clearcosmic; + int m_matched_signal_shower_num = 0; + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; + std::vector m_matched_signal_shower_showers_in_slice; + + + std::vector m_matched_signal_track_true_E; + std::vector m_matched_signal_track_nuscore; + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; + + //int m_matched_signal_total_num_slices; + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; + bool m_multiple_matched_tracks; + + + + //------------------ Delaunay triangle tools -----------// + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); + + + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); + + //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 + std::vector> bad_channel_list_fixed_mcc9; + std::map bad_channel_map_fixed_mcc9; + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + std::string m_badChannelLabel; + std::string m_badChannelProducer; + std::string m_mcTrackLabel; + std::string m_mcShowerLabel; + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + bool m_use_PID_algorithms; + bool m_use_delaunay; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; + bool m_is_overlayed; + bool m_run_all_pfps; + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer; + + std::ofstream out_stream; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); + detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; + double m_recombination_factor; + //double m_gain; + std::vector m_gain_mc; + std::vector m_gain_data; + double m_wire_spacing; + + int m_Cryostat; + int m_TPC; + + double m_width_dqdx_box; + double m_length_dqdx_box; + + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + //------------ POT related variables -------------- + int m_number_of_events; + double m_pot_count; + int m_number_of_vertices; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + + int m_test_matched_hits; + int m_reco_slice_objects; + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; + int m_sss_num_associated_hits; + + int m_sss_num_candidates; + + ReadBDT * sssVetov1; + + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_matched; + std::vector m_sss_candidate_pdg; + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; + std::vector m_sss_candidate_overlay_fraction; + + bool bool_make_sss_plots; + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + + int m_reco_asso_showers; + double m_reco_vertex_to_nearest_dead_wire_plane0; + double m_reco_vertex_to_nearest_dead_wire_plane1; + double m_reco_vertex_to_nearest_dead_wire_plane2; + + //------------ VertexBuilder ------------- + double m_bobbyvertex_pos_x; + double m_bobbyvertex_pos_y; + double m_bobbyvertex_pos_z; + std::vector m_bobbyvertex_pos_xv; + std::vector m_bobbyvertex_pos_yv; + std::vector m_bobbyvertex_pos_zv; + int m_bobbyshowers; + int m_bobbytracks; + std::vector m_bobbyshowersv; + std::vector m_bobbytracksv; + std::vector m_bobbyvertexradiusv; + double m_bobbyvertexradius; + + int m_bobbyphotonshower; + int m_bobbypi0daughter; + int m_bobbydeltaradppdaughter; + int m_bobbydeltaradmdaughter; + int m_bobbydeltaradpdaughter; + int m_bobbydeltarad0daughter; + int m_bobbyotherdaughter; + int m_bobbyoverlay; + int m_bobbyprotontrack; + std::vector m_bobbysameslicev; + std::vector m_bobbyphotonshowerv; + std::vector m_bobbypi0daughterv; + std::vector m_bobbydeltaradppdaughterv; + std::vector m_bobbydeltaradpdaughterv; + std::vector m_bobbydeltaradmdaughterv; + std::vector m_bobbydeltarad0daughterv; + std::vector m_bobbyotherdaughterv; + std::vector m_bobbyoverlayv; + std::vector m_bobbyprotontrackv; + std::vector m_bobbytrackdaughter_pdg; + std::vector m_bobbyshowerdaughter_pdg; + + bool m_bobbyvertexing_more; + + + vector m_dist_tt;//track&track, start_prox + vector m_dist_sx;//shower&anything, shower_prox + vector m_dist_st;//shower&track, cpoa_vert_prox + vector m_dist_sst;//shower&shower&track, cpoa_trackend_prox + + void BobbyVertexBuilder(class Atlas &package, bool more_objects); + //--------------------------------------------------- + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + int m_reco_num_templates; + std::vector m_reco_template; + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + //----------- CRT related variables ----------------- + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + + double m_CRT_dt; //time between flash and nearest CRT hit + + //------------ Track related Variables ------------- + int m_reco_asso_tracks; + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; + std::vector m_reco_track_length; + std::vector m_reco_track_dirx; + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_theta_yz; + std::vector m_reco_track_phi_yx; + + + std::vector m_reco_track_num_trajpoints; + std::vector m_reco_track_num_spacepoints; + std::vector m_reco_track_proton_kinetic_energy; + std::vector m_reco_track_ordered_energy_index; + std::vector m_reco_track_ordered_displacement_index; + std::vector m_reco_track_spacepoint_principal0; + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; + std::vector m_reco_track_spacepoint_max_dist; + + std::vector m_reco_track_best_calo_plane; + + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + + + std::vector m_reco_track_mean_dEdx_p0; + std::vector m_reco_track_mean_dEdx_start_half_p0; + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; + std::vector> m_reco_track_resrange_p0; + std::vector> m_reco_track_dEdx_p0; + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + + std::vector m_reco_track_num_calo_hits_p0; + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + + std::vector m_reco_track_end_to_nearest_dead_wire_plane0; + std::vector m_reco_track_end_to_nearest_dead_wire_plane1; + std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; + std::vector m_reco_track_is_nuslice; + + + std::vector m_sim_track_matched; + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + std::vector m_sim_track_origin; + std::vector m_sim_track_process; + std::vector m_sim_track_startx; + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_trackID; + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + std::vector m_isolation_min_dist_trk_shr; + std::vector m_isolation_min_dist_trk_unassoc; + + std::vector m_isolation_num_shr_hits_win_1cm_trk; + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + std::vector m_isolation_nearest_shr_hit_to_trk_wire; + std::vector m_isolation_nearest_shr_hit_to_trk_time; + + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire; + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; + + /*-------------------------------------------------------------------------------------*/ + + //------------ Shower related Variables ------------- + + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; + std::vector m_reco_shower3d_implied_dirx; + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_dirx; + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; + + std::vector m_reco_shower_impact_parameter; + std::vector m_reco_shower_implied_dirx; + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + std::vector m_reco_shower_start_to_nearest_dead_wire_plane0; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + //end flash matching + std::vector m_reco_shower_num_hits_plane0; + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + + + std::vector m_reco_shower_delaunay_area_plane0; + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + + std::vector m_reco_shower_kalman_exists; + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + std::vector m_sim_shower_start_x; + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + + + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; + + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + + double m_mctruth_leading_exiting_proton_energy; + + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + + int m_mctruth_num_reconstructable_protons; + + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + double m_mctruth_pi0_subleading_photon_energy; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums + std::vector m_reco_shower_energy_plane0; + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + + std::vector m_reco_shower_plane0_nhits; + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + + + std::vector m_reco_shower_ordered_energy_index; + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + + std::vector m_reco_shower_dEdx_plane0_mean; + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median; + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + + std::vector m_reco_shower_angle_wrt_wires_plane0; + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + + std::vector m_reco_shower_dQdx_plane0_median; + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + + std::vector m_reco_shower_dEdx_plane0_nhits; + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + double _time2cm;//value modeled from David's shower code + + // PID-related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + double m_genie_spline_weight; + + }; + + DEFINE_ART_MODULE(SinglePhoton) +} // namespace lar_pandora +#endif +//------------------------------------------------------------------------------------------------------------------------------------------ +// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h new file mode 100644 index 000000000..4640e836a --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h @@ -0,0 +1,259 @@ +/** + * \file TruncMean.h + * + * \ingroup 3DMichel + * + * \brief Class def header for a class TruncMean + * + * @author david caratelli [davidc@fnal.gov] + * Written 08/02/2018. + */ + +#ifndef TRUNCMEAN_H +#define TRUNCMEAN_H + +#include +#include +#include +#include +#include +#include + +/** + \class TruncMean + The truncated mean class allows to compute the following quantities + 1) the truncated mean profile of an ordered vector of values, such as + the charge profile along a particle's track. + To create such a profile use the function CalcTruncMeanProfile() + 2) Get the truncated mean value of a distribution. This function + iteratively hones in on the truncated mean of a distribution by + updating the mean and cutting the tails after each iteration. + For this functionality use CalcIterativeTruncMean() + doxygen documentation! +*/ + +static const double kINVALID_FLOAT = std::numeric_limits::max(); + +class TruncMean{ + + public: + + /// Default constructor + TruncMean(){} + + /// Default destructor + ~TruncMean(){} + + /** + @brief Given residual range and dq vectors return truncated local dq. + Input vectors are assumed to be match pair-wise (nth entry in rr_v + corresponds to nth entry in dq_v vector). + Input rr_v values are also assumed to be ordered: monotonically increasing + or decreasing. + For every dq value a truncated linear dq value is calculated as follows: + 0) all dq values within a rr range set by the class variable _rad are selected. + 1) the median and rms of these values is calculated. + 2) the subset of local dq values within the range [median-rms, median+rms] is selected. + 3) the resulting local truncated dq is the average of this truncated subset. + @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) + @input std::vector dq_v -> vector of measured values for which truncated profile is requested + (i.e. charge profile of a track) + @input std::vector dq_trunc_v -> passed by reference -> output stored here + @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation + */ + void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma = 1); + + /** + @brief Iteratively calculate the truncated mean of a distribution + @input std::vector v -> vector of values for which truncated mean is asked + @input size_t nmin -> minimum number of iterations to converge on truncated mean + @input size_t nmax -> maximum number of iterations to converge on truncated mean + @input size_t lmin -> minimum number of entries in vector before exiting and returning current value + @input size_t currentiteration -> current iteration + @input double convergencelimit -> fractional difference between successive iterations + under which the iteration is completed, provided nmin iterations have occurred. + @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. + */ + double CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed = kINVALID_FLOAT); + + /** + @brief Set the smearing radius over which to take hits for truncated mean computaton. + */ + void setRadius(const double& rad) { _rad = rad; } + + private: + + double Mean (const std::vector& v); + double Median(const std::vector& v); + double RMS (const std::vector& v); + + /** + Smearing radius over which charge from neighboring hits is scanned to calculate local + truncated mean + */ + double _rad; + +}; + +double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed) +{ + + auto const& mean = Mean(v); + auto const& med = Median(v); + auto const& rms = RMS(v); + + // if the vector length is below the lower limit -> return + if (v.size() < lmin) + return mean; + + // if we have passed the maximum number of iterations -> return + if (currentiteration >= nmax) + return mean; + + // if we passed the minimum number of iterations and the mean is close enough to the old value + double fracdiff = fabs(med-oldmed) / oldmed; + if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) + return mean; + + // if reached here it means we have to go on for another iteration + + // cutoff tails of distribution surrounding the mean + // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom + // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions + v.erase( std::remove_if( v.begin(), v.end(), + [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed + v.end()); + + return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); +} + +void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma) +{ + + // how many points to sample + int Nneighbor = (int)(_rad * 3 * 2); + + dq_trunc_v.clear(); + dq_trunc_v.reserve( rr_v.size() ); + + int Nmax = dq_v.size()-1; + + for (size_t n=0; n < dq_v.size(); n++) { + + // current residual range + double rr = rr_v.at(n); + + int nmin = n - Nneighbor; + int nmax = n + Nneighbor; + + if (nmin < 0) nmin = 0; + if (nmax > Nmax) nmax = Nmax; + + // vector for local dq values + std::vector dq_local_v; + + for (int i=nmin; i < nmax; i++) { + + double dr = rr - rr_v[i]; + if (dr < 0) dr *= -1; + + if (dr > _rad) continue; + + dq_local_v.push_back( dq_v[i] ); + + }// for all ticks we want to scan + + if (dq_local_v.size() == 0 ) { + dq_trunc_v.push_back( dq_v.at(n) ); + continue; + } + + // calculate median and rms + double median = Median(dq_local_v); + double rms = RMS(dq_local_v); + + double truncated_dq = 0.; + int npts = 0; + for (auto const& dq : dq_local_v) { + if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ + truncated_dq += dq; + npts += 1; + } + } + + dq_trunc_v.push_back( truncated_dq / npts ); + + if(dq_trunc_v.back() != dq_trunc_v.back()){ + std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) +{ + + double mean = 0.; + for (auto const& n : v) mean += n; + mean /= v.size(); + + return mean; +} + +double TruncMean::Median(const std::vector& v) +{ + + if (v.size() == 1) return v[0]; + + std::vector vcpy = v; + + std::sort(vcpy.begin(), vcpy.end()); + + double median = vcpy[ vcpy.size() / 2 ]; + + return median; +} + +double TruncMean::RMS(const std::vector& v) +{ + + if(v.size()==1) return v.front(); + + double avg = 0.; + for (auto const& val : v) avg += val; + avg /= v.size(); + double rms = 0.; + for (auto const& val : v) rms += (val-avg)*(val-avg); + rms = sqrt( rms / ( v.size() - 1 ) ); + + + if(rms!=rms){ + std::cout<<"ERROR || TruncMean::RMS || is returning nan."< + +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Track.h" + +#include "art/Framework/Principal/Handle.h" + +#include "ubcore/LLBasicTool/GeoAlgo/GeoVector.h" +#include "ubcore/LLBasicTool/GeoAlgo/GeoSphere.h" +#include "ubcore/LLBasicTool/GeoAlgo/GeoTrajectory.h" +#include "ubcore/LLBasicTool/GeoAlgo/GeoCone.h" +#include "ubcore/LLBasicTool/GeoAlgo/GeoAlgo.h" +#include "ubcore/LLBasicTool/GeoAlgo/GeoAABox.h" + +#include "../SinglePhoton_module.h" + +namespace single_photon{ +//DetectorObject is a container for labeling tracks and showers with IDs, and for each track/shower, the corresponding details are also stored. +struct DetectorObject { + + size_t const fid;//track/shower IDs + size_t const foriginal_index;//PFParticle IDs, IDToPFParticleMap[fid].first?; + int const freco_type; + bool fis_associated;//true when an object is associated. + + DetectorObject(size_t const id, size_t const original_index, int const reco_type) : + fid(id), + foriginal_index(original_index), + freco_type(reco_type), + fis_associated(false) {} + + virtual ~DetectorObject(){} + +}; + + +struct Track : public DetectorObject { + + geoalgo::Trajectory ftrajectory; + + Track(size_t const id, size_t const original_index, int const reco_type, recob::Track const & t) : + DetectorObject(id, original_index, reco_type) { + for(size_t i = 0; i < t.NumberTrajectoryPoints(); ++i) + ftrajectory.push_back(t.LocationAtPoint(i)); + } + +}; + + +struct Shower : public DetectorObject { + + geoalgo::Cone fcone; + + Shower(size_t const id, size_t const original_index, int const reco_type, recob::Shower const & s) : + DetectorObject(id, original_index, reco_type) { + fcone = geoalgo::Cone(s.ShowerStart(), + s.Direction(), + s.Length(), + 0); + } + +}; + +//collectinos of the DetectorObject?? +class DetectorObjects_all { + + friend class SinglePhoton; + std::map fobject_m;//index , DetectorObject + std::vector ftrack_index_v; + std::vector fshower_index_v; + size_t fobject_id;//global index of input objects, combined with tracks and showers, i.e. {tracks,showers} + + std::map foriginal_track_index_m;//first is index for {tracks}, second is for the mix from {tracks,showers} + std::map foriginal_shower_index_m; + +public: + + int const ftrack_reco_type;//default value as 1 + int const fshower_reco_type;//default value as 2 + + DetectorObjects_all(); + + ~DetectorObjects_all() { + for(std::pair const & p : fobject_m) delete p.second; + } + +// void AddTracks(art::ValidHandle> const & ev_t, bool const track_original_indices = false); +// void AddShowers(art::ValidHandle> const & ev_s, bool const track_original_indices = false); + void AddTracks(std::vector> const & ev_t, bool const track_original_indices = true); + void AddShowers(std::vector> const & ev_s, bool const track_original_indices = true); + + void SetAssociated(size_t const i); + + /******* + * + * Return the freco_type of an fobject_m whose index is i. + * + * fobject_m is a map + * freco_type - 2 for track, and 1 for shower; + * + * + * ******/ + int GetRecoType(size_t const i) const; + std::vector const & GetTrackIndices() const {return ftrack_index_v;} + std::vector const & GetShowerIndices() const {return fshower_index_v;} + + DetectorObject const & GetDetectorObject(size_t const i) const; + + Track & GetTrack(size_t const i); + Track const & GetTrack(size_t const i) const; + + Shower & GetShower(size_t const i); + Shower const & GetShower(size_t const i) const; + + size_t GetTrackIndexFromObjectIndex(size_t const i) const; + size_t GetShowerIndexFromObjectIndex(size_t const i) const; +}; + + + + + + + + + + + +//THE HEADER FILE IS THE ABOVE + + + + + + + + +DetectorObjects_all::DetectorObjects_all() : + fobject_id(0), + ftrack_reco_type(2), + fshower_reco_type(1){} + + +//void DetectorObjects_all::AddTracks(art::ValidHandle> const & ev_t, +//DetectorObjects_all::AddTracks(std::vector> const & ev_t, +// bool const track_original_indices) { +void DetectorObjects_all::AddTracks( + std::vector> const & ev_t, + bool const track_original_indices){ + for(size_t i = 0; i < ev_t.size(); ++i) { + recob::Track const & t = *(ev_t.at(i)); + fobject_m.emplace(fobject_id, new Track(fobject_id, i, ftrack_reco_type, t)); + ftrack_index_v.push_back(fobject_id); + if(track_original_indices) foriginal_track_index_m.emplace(i, fobject_id); + ++fobject_id; + } +} + +//void DetectorObjects_all::AddShowers(art::ValidHandle> const & ev_s, +void DetectorObjects_all::AddShowers(std::vector> const & ev_s, bool const track_original_indices) { + for(size_t i = 0; i < ev_s.size(); ++i) { + recob::Shower const & s = *(ev_s.at(i)); + fobject_m.emplace(fobject_id, new Shower(fobject_id, i, fshower_reco_type, s)); + fshower_index_v.push_back(fobject_id); + if(track_original_indices) foriginal_shower_index_m.emplace(i, fobject_id); + ++fobject_id; + } +} + + +void DetectorObjects_all::SetAssociated(size_t const i) { + + auto om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + om_it->second->fis_associated = true; + +} + + +int DetectorObjects_all::GetRecoType(size_t const i) const { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + return om_it->second->freco_type; + +} + + +DetectorObject const & DetectorObjects_all::GetDetectorObject(size_t const i) const { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + return *om_it->second; + +} + + +Track & DetectorObjects_all::GetTrack(size_t const i) { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + Track * t = dynamic_cast(fobject_m.find(i)->second); + + if(!t) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not convert: " << i << std::endl; + exit(1); + } + + return *t; + +} + + +Track const & DetectorObjects_all::GetTrack(size_t const i) const { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + Track * t = dynamic_cast(fobject_m.find(i)->second); + + if(!t) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not convert: " << i << std::endl; + exit(1); + } + + return *t; + +} + + +Shower & DetectorObjects_all::GetShower(size_t const i) { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + Shower * s = dynamic_cast(fobject_m.find(i)->second); + + if(!s) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find convert: " << i << std::endl; + exit(1); + } + + return *s; + +} + + +Shower const & DetectorObjects_all::GetShower(size_t const i) const { + + auto const om_it = fobject_m.find(i); + + if(om_it == fobject_m.end()) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; + exit(1); + } + + Shower * s = dynamic_cast(fobject_m.find(i)->second); + + if(!s) { + std::cout << __PRETTY_FUNCTION__ << "\nCould not find convert: " << i << std::endl; + exit(1); + } + + return *s; + +} + + +size_t DetectorObjects_all::GetTrackIndexFromObjectIndex(size_t const i) const { + +// auto om_it = foriginal_track_index_m.find(i); +// +// if(om_it == foriginal_track_index_m.end()) { +// std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; +// exit(1); +// } +// +// return om_it->second; + for(auto it = foriginal_track_index_m.begin(); it != foriginal_track_index_m.end(); ++ it){ + if(it->second == i) return it->first; + } + return foriginal_track_index_m.begin()->first; + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; + exit(1); + +} + + +size_t DetectorObjects_all::GetShowerIndexFromObjectIndex(size_t const i) const { + +// auto om_it = foriginal_shower_index_m.find(i); + +// if(om_it == foriginal_shower_index_m.end()) { +// std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; +// exit(1); +// } +// +// return om_it->second; + for(auto it = foriginal_shower_index_m.begin(); it != foriginal_shower_index_m.end(); ++ it){ + if(it->second == i) return it->first; + } + return foriginal_shower_index_m.begin()->first; + std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; + exit(1); + + +} +} +#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h new file mode 100644 index 000000000..0a3e928dd --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h @@ -0,0 +1,698 @@ + + +#ifndef PARTICLEASSOCIATIONS_H +#define PARTICLEASSOCIATIONS_H + +#include "../SinglePhoton_module.h" +#include "DetectorObjects.h" +#include //read and write txt file. + +using namespace std; + +//what does f in fxxxx mean ???? + +namespace single_photon{ +class ParticleAssociations_all; + +//This is for a single candidate vertex. +class ParticleAssociation{//Yes, it is with and without s! + //private + friend ParticleAssociations_all; + + // this is a collection of indices and vertices, + // appended in the AddShower1() function in this class. + // Their elements come from AddShower() function in the class ParticleAssociations_all + std::vector findices; + std::vector fvertices; + + + geoalgo::Point_t fvertex; + double fgoodness; + + std::multimap fconnected_associations; + +public: +//Constructor, for internal used only, I guess. +// indices (input) - to label + ParticleAssociation(std::vector const & indices, + std::vector const & vertices, + geoalgo::Point_t const & vertex, + double const goodness); + + void AddConnection(size_t const i, size_t const n) { + fconnected_associations.emplace(i, n); + } + //Note: this is not for adding pandora_object.. + //this adds the vertex candidates; + // 2-argument function; + void AddShower1(size_t const n, geoalgo::Point_t const & vert) { + findices.push_back(n); + fvertices.push_back(vert); + } + + std::vector const & GetObjectIndices() const { + return findices; + } + + std::vector const & GetVertices() const { + return fvertices; + } + + geoalgo::Point_t const & GetVertexFromNode(size_t const n) const { + + auto const nv_itb = findices.begin(); + auto const nv_ite = findices.end(); + + return fvertices.at(std::find(nv_itb, nv_ite, n) - nv_itb); + + } + + geoalgo::Point_t const & GetRecoVertex() const { + return fvertex; + } + + double GetGoodness() const { + return fgoodness; + } + + std::multimap const & GetConnections() const { + return fconnected_associations; + } + + /************ + * + * Print out association indices, vertex, and goodness, and connections? + * + * *********/ + void PrintAssociation() const; + +}; + + +//This is the final collection that we want. +class ParticleAssociations_all{ + + friend class SinglePhoton;//OK~ now SinglePhoton can use things in this class! + DetectorObjects_all fdetos;//here introduces the DetectorObjects.h + + std::vector fassociations; + std::vector fobject_index_v;//indices for pandora_objects? + std::vector fassociation_index_vec;//0,1,2,3... to indicates candidate vertices; + std::vector fignore_association_vec; + std::vector fselected_associations;//Indices of selected associations (candidate vertice). Done under GetShowerAssociations() + + bool fverbose; + +public: + + ParticleAssociations_all(); + + DetectorObjects_all & GetDetectorObjects() {return fdetos;}//gives out the DetectorObjects_all. + DetectorObjects_all const & GetDetectorObjects() const {return fdetos;} + + void Reset(); + + /************* + * + * AddAssociation() - evaluate all end points of tracks and identify + * those are close to each others; form a bounding sphere that + * includes those end points. The last two arguments are to save the + * info. of that bounding sphere. + * + * nodes - Track IDs. + * vertices - end points of tracks. + * vertex - center of the bounding sphere that includes all + * track end points as indicated in the vertices. + * goodness - the radius of the bounding sphere. (0 for this function?) + * + * ************/ + + void AddAssociation( + std::vector const & nodes, + std::vector const & vertices, + geoalgo::Point_t const & vertex, + double const goodness = 0); + + + /************************* + * + * AddShower() - + * index - this is only for the fassociation_index_vec; + * I guess, this is to append the nth association. + * n - this coud be the index (ID) for a pandora_object. + * vert - a pandora vertex. + * + * ***********************/ + void AddShower(size_t const index, + size_t const n, + geoalgo::Point_t const & vert);//used + + std::vector const & GetAssociations() const { + return fassociations; + } + + std::vector const & GetObjectIndices() const { + return fobject_index_v; + } + + std::vector const & GetAssociationIndices() const { + return fassociation_index_vec; + } + +/* + * + * GetAssociationIndicesFromObject() - gives all iterators, who can locate + * the element in fobject_index_v that gives the value n. This gives + * the collection of iterators that can be used to locate object with + * ID, n, among the particle associations. + * + */ + std::vector GetAssociationIndicesFromObject(size_t const n); + + void IgnoreAssociation(size_t const n) {//CHECK, when do we use IgnoreAssociation?? + cout<<"\n\n\n\n CHECK Here is where I use the IgnoreAssociation"< const & previously_considered); + void IgnoreThis(size_t const to_ignore, size_t const connected_index, std::vector & previously_considered); + + + /********************* + * + * ******************************/ + void IgnoreAssociationsConnectedTo(size_t const i); + + void ClearIgnored() { + fignore_association_vec.clear(); + } + + + + //Some utility functions are listed below. They are not the cores of the code. + + + /****************** + * + * Print out each associations, further detail is taken care in PrintAssociation(); + * + * ****************/ + void PrintAssociations_all() const; + + /****************** + * + * Print out particular (the nth) associations, further detail is taken care in PrintAssociation(); + * + * ****************/ + void PrintAssociations(std::vector const & associations_to_print) const; + + void PrintNodes() const; + + void Test() const; + + void NodeCheck(); + + /*************** + * + * GetShowerAssociations() - the main contribution + * is to determine the vector fselected_associations. + * + * ************/ + void GetShowerAssociations(); + + std::vector & GetSelectedAssociations() {return fselected_associations;} + std::vector const & GetSelectedAssociations() const {return fselected_associations;} + + //void DeleteAssociation(size_t const s); + + void SetVerbose(bool const verbose = true) {fverbose = verbose;} + +}; + + + + + + +//THE HEADER FILE IS THE ABOVE + + + + + + + + + + +ParticleAssociation::ParticleAssociation(std::vector const & indices, + std::vector const & vertices, + geoalgo::Point_t const & vertex, + Double_t const goodness) : + findices(indices), + fvertices(vertices), + fvertex(vertex), + fgoodness(goodness){} + + +void ParticleAssociation::PrintAssociation() const { + + for(size_t i = 0; i < findices.size(); ++i){ + std::cout << "Object index: " << findices.at(i) << std::endl; + } + + std::cout << "\nVertex: " << fvertex << ", goodness: "; + std::cout << fgoodness << std::endl; + + std::cout << "\nConnections:\n"; + for(std::pair const & pair : fconnected_associations){ + std::cout << "Association index: " << pair.first << " object index: " << pair.second << std::endl; + } +} + + + + +ParticleAssociations_all::ParticleAssociations_all() : + fverbose(false){}//DAMN, : fverbose(false) was misunderstood as the constructor in SinglePhoton.. + + +void ParticleAssociations_all::Reset() { + + fassociations.clear(); + fobject_index_v.clear(); + fassociation_index_vec.clear(); + +} + + +void ParticleAssociations_all::AddAssociation( + std::vector const & nodes, + std::vector const & vertices, + geoalgo::Point_t const & vertex, + Double_t const goodness) { + + fassociations.push_back(ParticleAssociation(nodes, vertices, vertex, goodness)); + + size_t const pos = fassociations.size() - 1; + + for(size_t const n : nodes) { + + auto const nv_itb = fobject_index_v.begin(); + auto const nv_ite = fobject_index_v.end(); + + for(auto nv_it = nv_itb; nv_it != nv_ite; ++nv_it) { + + nv_it = std::find(nv_it, nv_ite, n); + + if(nv_it != nv_ite) { + + size_t const index = fassociation_index_vec.at(nv_it - nv_itb); + + fassociations.at(index).AddConnection(pos, n); + fassociations.at(pos).AddConnection(index, n); + + } else{ + break; + } + + } + + fobject_index_v.push_back(n); + fassociation_index_vec.push_back(pos); + + } + + for(size_t const i : nodes) { + fdetos.SetAssociated(i); + } + + +} + + +void ParticleAssociations_all::AddShower(size_t const index, + size_t const n, + geoalgo::Point_t const & vert) { + + if(index > fassociations.size() - 1) { + std::cout << "No association with index: " << index << std::endl; + return; + } + + //Dont know why consruct a ParticleAssociation here.. + ParticleAssociation & association = fassociations.at(index); + std::vector const & group = association.GetObjectIndices(); + + if(std::find(group.begin(), group.end(), n) != group.end()) { +// std::cout << "Object ID: " << n << " already added\n"; + return; + } + + fassociation_index_vec.push_back(index); + + fobject_index_v.push_back(n); + + association.AddShower1(n, vert);//this is for single association; Only Here, the 2nd and 3rd argument from the AddShower(); + + fdetos.SetAssociated(n); + +} + + +std::vector ParticleAssociations_all::GetAssociationIndicesFromObject(size_t const n) { + + auto const nv_itb = fobject_index_v.begin(); + auto const nv_ite = fobject_index_v.end(); + auto nv_it = nv_itb; + + std::vector indices; + + while(nv_it != nv_ite) { + + nv_it = std::find(nv_it, nv_ite, n); + + if(nv_it != nv_ite) { + indices.push_back(nv_it - nv_itb); + ++nv_it; + } + + } + + return indices; + +} + +/*CHECK +bool ParticleAssociations_all::Ignore(size_t const i) const { + auto const sk_it = + std::find(fignore_association_vec.begin(), fignore_association_vec.end(), i);//return the iterator who points to the number i. + if(sk_it == fignore_association_vec.end()) { + cout<<" Ok.. Ignore() is going to return false CHECK)"< const & previously_considered) { + + if(fverbose) std::cout << "Handle loop\n"; + + size_t delete_association = SIZE_MAX; + double largest_sphere = -1; + for(size_t const s : previously_considered) { + ParticleAssociation const & pa = fassociations.at(s); + if(pa.GetObjectIndices().size() == 2 && pa.GetConnections().size() == 2 && pa.GetGoodness() > largest_sphere) { + delete_association = s; + largest_sphere = pa.GetGoodness(); + } + } + + if(delete_association == SIZE_MAX) return false; + DeleteAssociation(delete_association); + return true; + +} +*/ + + +void ParticleAssociations_all::IgnoreThis(size_t const to_ignore, size_t const connected_index, std::vector & previously_considered) { + + if(std::find(previously_considered.begin(), previously_considered.end(), to_ignore) != previously_considered.end()) return; + + previously_considered.push_back(to_ignore); + ParticleAssociation const & pa = fassociations.at(to_ignore); + fignore_association_vec.push_back(to_ignore); + + for(std::pair const & p : pa.GetConnections()) { + if(p.first == connected_index) continue; + IgnoreThis(p.first, to_ignore, previously_considered); + } + +} + + + +void ParticleAssociations_all::IgnoreAssociationsConnectedTo(size_t const i) { + + ParticleAssociation const & pa = fassociations.at(i); + + for(std::pair const & p : pa.GetConnections()) { + std::vector previously_considered; + IgnoreThis(p.first, i, previously_considered); + } + +} + + +void ParticleAssociations_all::PrintAssociations_all() const { + + std::cout << "\n\n--------------Report all the Particle Association Result--------------------------\n\n"; + + for(size_t i = 0; i < fassociations.size(); ++i) { + + std::cout << "Association: " << i << std::endl; + + fassociations.at(i).PrintAssociation(); + + std::cout << std::endl; + + } + + std::cout << std::endl; + +} + + +void ParticleAssociations_all::PrintAssociations(std::vector const & associations_to_print) const { + + std::cout << "----------------------------------------\n\n"; + + for(size_t i = 0; i < fassociations.size(); ++i) { + + if(std::find(associations_to_print.begin(), associations_to_print.end(), i) == associations_to_print.end()) continue; + + std::cout << "Association: " << i << std::endl; + + fassociations.at(i).PrintAssociation(); + + std::cout << std::endl; + + } + + std::cout << std::endl; + +} + + +void ParticleAssociations_all::PrintNodes() const { + + std::cout << "Nodes:\n"; + + for(size_t i = 0; i < fobject_index_v.size(); ++i) + std::cout << "Nodes: " << fobject_index_v.at(i) << " Index: " + << fassociation_index_vec.at(i) << std::endl; + +} + + +void ParticleAssociations_all::Test() const { + + for(ParticleAssociation const & pae : fassociations) { + + for(std::pair const & pair : pae.GetConnections()) { + + size_t const i = pair.first; + + std::vector const & c = fassociations.at(i).GetObjectIndices(); + auto c_itb = c.begin(); + auto c_ite = c.end(); + + auto c_it = c_ite; + + for(size_t const n : pae.GetObjectIndices()) { + + c_it = std::find(c_itb, c_ite, n); + + if(c_it != c_ite) break; + + } + + if(c_it == c_ite) std::cout << "Complain\n"; + + } + + } + +} + + +void ParticleAssociations_all::NodeCheck() { + + std::vector nodes; + + for(size_t const n : fobject_index_v) { + if(nodes.size() < n+1) nodes.resize(n+1, 0); + ++nodes.at(n); + } + + for(size_t i = 0; i < nodes.size(); ++i) { + + size_t const s = nodes.at(i); + if(s == 0) continue; + + DetectorObject const & deto = fdetos.GetDetectorObject(i);//Singuar used once; + if(fverbose){ + if(deto.freco_type == fdetos.ftrack_reco_type && s > 2) + std::cout << "track > 2 entries: " << s << std::endl; + if(deto.freco_type == fdetos.fshower_reco_type && s > 1) + std::cout << "shower > 1 entries: " << s << std::endl; + } + + } + +} + + +void ParticleAssociations_all::GetShowerAssociations() { +// if(fverbose) std::cout << "GetShowerAssociations\n"; + + int screen_width = 86; + std::multimap pa_map;//Partical Association Map; it maps vertex index to the vertex's z-coordinate respectiely. + + + if(fverbose&&fassociations.size()>0) { + std::cout << "Number of particle associations (candidate vertices): " << fassociations.size() << "\n\n"; + + //Print the title + cout<0){//Shower ID + string temp_showeroutput = showerids+"(take this)"; + cout< const & p : pa_map) { + //p is a pair + +// if(fverbose) std::cout << "\tAssociation: " << p.second << " " << "z-position (of a shower): " << p.first << "\n"; + +// auto const sk_it = std::find(fignore_association_vec.begin(), fignore_association_vec.end(), p.second);//return the iterator who points to the number i. +// if( sk_it != fignore_association_vec.end() ){ //Ignore(the association index), initially empty, which NULL can pass through; +// cout<<"Ignore(p.second) is true"< considered_connected_associations; + for(std::pair const & p : fassociations.at(s).GetConnections()) { + if(std::find(considered_connected_associations.begin(), considered_connected_associations.end(), p.first) != considered_connected_associations.end()) continue; + std::multimap & connections = fassociations.at(p.first).fconnected_associations; + auto c_it = connections.find(s); + if(c_it == connections.end()) { + std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nNo connections found\n"; + exit(1); + } + while(c_it != connections.end()) { + connections.erase(c_it); + c_it = connections.find(s); + } + considered_connected_associations.push_back(p.first); + } + + if(fverbose) std::cout << "Delete association in ParticleAssociations_all vector\n"; + + fassociations.erase(fassociations.begin()+s); + + if(fverbose) std::cout << "Delete ParticleAssociations_all bookeeping of association and object indices\n"; + + auto av_it = std::find(fassociation_index_vec.begin(), fassociation_index_vec.end(), s); + while(av_it != fassociation_index_vec.end()) { + fobject_index_v.erase(fobject_index_v.begin()+size_t(av_it-fassociation_index_vec.begin())); + fassociation_index_vec.erase(av_it); + } + + if(fverbose) { + std::cout << "End delete association\n"; + } + +} +*/ +} + + +#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h new file mode 100644 index 000000000..aaf18e4a8 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h @@ -0,0 +1,1210 @@ +#ifndef VERTEXBUILDER_H +#define VERTEXBUILDER_H + +#include "ParticleAssociations.h" + +#include "art/Framework/Services/Optional/TFileService.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Optional/TFileDirectory.h" + +#include "TTree.h" +#include //read and write txt file. + +/********************** + *stuct VertexBuilderTree: it store values of variables extracted + from the artObjects? (values from the raw root file) + * + *class VertexBuilder: it contains functions for determining the vertex of objects + assigned by the class ParticleAssociations_all. + * + *********************/ + +using namespace std; + +namespace single_photon{ + struct VertexBuilderTree { + + TTree * ftree; + int frun_number; + int fsubrun_number; + int fevent_number; + int ftrack_number; + int fshower_number; + // int fassociation_track_number; //CHECK,number of track associations; + // int fassociation_shower_number; //CHECK,number of shower associations; + int fassociation_final_number; //number of total associations; + + VertexBuilderTree() : + ftree(nullptr){} + /********************************************************************* + * Setup() - Obtain the addresses of event variables + * (indices for particular events, showers, and tracks). + *********************************************************************/ + void Setup() { + art::ServiceHandle< art::TFileService > tfs; + ftree = tfs->make("VertexBuilder", ""); + ftree->Branch("run_number", &frun_number, "run_number/I"); + ftree->Branch("subrun_number", &fsubrun_number, "subrun_number/I"); + ftree->Branch("event_number", &fevent_number, "event_number/I"); + ftree->Branch("track_number", &ftrack_number, "track_number/I"); + ftree->Branch("shower_number", &fshower_number, "shower_number/I"); + // ftree->Branch("association_track_number", &fassociation_track_number, "association_track_number/I"); + // ftree->Branch("association_shower_number", &fassociation_shower_number, "association_shower_number/I"); + ftree->Branch("association_final_number", &fassociation_final_number, "association_final_number/I"); + } + + }; + + + class VertexBuilder { + + geoalgo::GeoAlgo const falgo; + + size_t fobject_id; + + double fstart_prox;//the maximum track proximity threshold (in cm) + double fshower_prox;//the maximum shower proximity threshold (in cm) + double fcpoa_vert_prox;//the maximum distance btw shower start to a track end point(in cm); + double fcpoa_trackend_prox;//the maximum distance btw mid point of impact parameter of shower to the vertex (in cm); + + DetectorObjects_all const * fdetos; + + VertexBuilderTree * fvbt; + + bool fverbose; + + void CheckSetVariables();// exit if the criteria are not set. + + void Erase(std::multimap & pn, + std::multimap::iterator const best_it, + geoalgo::Point_t const & sv); + + /***************************** + * + * AssociateTracks() - this associates tracks to either end points of other tracks + * whose are nearby. + * + * ***************************/ + void AssociateTracks(ParticleAssociations_all & pas); + + /* + * FindClosestApproach() - find the center points of two points along + * the backward projection that give minimum impact parameter; this + * also returns the distance of two of such points. + *shr1, shr2 - two showers with start points and direction + *vtx - a vertex to be updated. + */ + double FindClosestApproach(const geoalgo::HalfLine_t & shr1, + const geoalgo::HalfLine_t & shr2, + geoalgo::Point_t & vtx) const; + + /***************************** + * + * AssociateShowers() - Run after AssociateTracks(); + * this associates showers to either end points of a track + * that is considered to be from the same vertex. + * + * ***************************/ + void AssociateShowers(ParticleAssociations_all & pas); + + + void AddLoneTracks(ParticleAssociations_all & pas); + void AddLoneShowers(ParticleAssociations_all & pas); + + + /***************************** + * + * AssociateShowers() - Run after AssociateTracks(); + * this associates showers to either end points of a track + * that is considered to be from the same vertex. + * + * ***************************/ + void FillVBT(ParticleAssociations_all & pas); + + void dist_marker ( vector & dist_field, double input) { + if(dist_field[0] == 999) { + dist_field[0] = input; + }else { + dist_field.push_back(input); + } + cout<<"Mark a distance."< f_dist_tt;//track&track, start_prox + vector f_dist_sx;//shower&anything, shower_prox + vector f_dist_st;//shower&track, cpoa_vert_prox + vector f_dist_sst;//shower&shower&track, cpoa_trackend_prox + + + VertexBuilder(); + + void SetVerbose(bool const verbose = true) {//allow output info. to the terminal + fverbose = verbose; + } + + void SetParameters (std::vector< double > p){ + + fstart_prox = p[0]; + fshower_prox = p[1]; + fcpoa_vert_prox = p[2]; + fcpoa_trackend_prox = p[3]; + + f_dist_tt.push_back(999);//track&track, start_prox + f_dist_sx.push_back(999);//shower&anything, shower_prox + f_dist_st.push_back(999);//shower&track, cpoa_vert_prox + f_dist_sst.push_back(999);//shower&shower&track, cpoa_trackend_prox + + if(fverbose){ + cout<> const & ev_t); + // void AddShowers(art::ValidHandle> const & ev_s); + // void AddTracks(std::vector> const & ev_t); + // void AddShowers(std::vector> const & ev_t); + + // The main code is here; it calls up all the necessary process. + void Run(ParticleAssociations_all & pas); + + }; + + + + + + + + + + + + + + + + //HEADER FILE ARE ABOVE + + + + + + + + + + + + + + + VertexBuilder::VertexBuilder() : + fobject_id(0), + fstart_prox(-1), + fshower_prox(-1), + fcpoa_vert_prox(-1), + fcpoa_trackend_prox(-1), + fdetos(nullptr), + fvbt(nullptr), + fverbose(true) {} + + + void VertexBuilder::CheckSetVariables() { //this was initialized + + if(fstart_prox == -1) {//It start_prox was not previously defined, exit. + std::cout << "fstart_prox, the maximum track proximity threshold, is not set\n"; + exit(1); + } + + if(fshower_prox == -1) { + std::cout << "fshower_prox, the maximum shower proximity threshold, is not set\n"; + exit(1); + } + + if(fcpoa_vert_prox == -1) { + std::cout << "fcpoa_vert_prox, the maximum distance btw shower start to the cloest approach, is not set\n"; + exit(1); + } + + if(fcpoa_trackend_prox == -1) { + std::cout << "fcpoa_trackend_prox, the maximum distance btw mid point of impact parameter of shower to the vertex, is not set\n"; + exit(1); + } + + } + + + void VertexBuilder::Erase(std::multimap & pn, + std::multimap::iterator const best_it, + geoalgo::Point_t const & sv) {//Remove candidates that have been analyzed. + + size_t const index = best_it->first; + pn.erase(best_it); + + if(fdetos->GetRecoType(index) == fdetos->ftrack_reco_type) { + auto const pn_it = pn.find(index); + if(fdetos->GetTrack(index).ftrajectory.Length() < fstart_prox || + (pn_it != pn.end() && pn_it->second->Dist(sv) < fstart_prox)) { + pn.erase(pn_it); + } + } + + } + + + void VertexBuilder::AssociateTracks(ParticleAssociations_all & pas) {//Group tracks + + //Ingredients: Key for tracks, Point coordinates along the track (recob:: Trajectory) + int screen_width = 86; + + std::multimap pn;//This maps an # to a pointer to the track start/end points + /* Structure of pn: + * Iterator Key Value + * 0 Key[0] point1 + * 1 Key[0] point2 + * 2 Key[1] pointa + * 3 Key[1] pointb + * . + * example of calling first row: + * pn.begin(), pn[0].first, pn[0].second + */ + + //#1 load up tracks to pn: 1 id for 2 end points; + for(size_t const i : fdetos->GetTrackIndices()) { + + Track const & t = fdetos->GetTrack(i); + geoalgo::Vector ref_point(1,1,1);//use this to pick valid end points; i.e. kill (-999,-999,-999) + + if(t.ftrajectory.front().Dot(ref_point) > -2996){ + pn.emplace(t.fid, &t.ftrajectory.front());//track ID and point; + } + if(t.ftrajectory.back().Dot(ref_point) > -2996){ + pn.emplace(t.fid, &t.ftrajectory.back()); + } + /* appended map of one of this loop: + * < track_id, {track beginning point, track ending point}> + */ + } + + if(fverbose) { + std::cout << "STEP I: Load " << pn.size() << " track end points to be evaluated.\n\n"; + + if(pn.size()) {//Print the title + std::stringstream output_buf; + output_buf<GetTrack(p.first).ftrajectory.Length();//Track Length + //ftrajectory is the obejct in art library + cout<<"| "<<*p.second< 1) {//while there are tracks to be evaluated, loop them and try to make candidate vertex. + + auto best_match = pn.end(); //best match (iterator) is assumed to be the iterator of the last track; + auto best_candidate = best_match; //best candidate; + + double best_dist = fstart_prox;//Max. track proximity threshold (t_max) + if(fverbose) + std::cout << "\tRemain "<< pn.size() <<" track end points for evaluation," << std::endl; + + for(auto match_this = pn.begin(); match_this != pn.end(); ++match_this) {//iterator to indicate the point we are evaluating + + if(std::next(match_this) == pn.end()) break;//stop when there is only one track end point left; + if(fverbose) + std::cout << "\t\tEnd point from the track (ID: " << match_this->first <<"):"<< std::endl; + + double temp_save_this_dist = 999; + for(auto compare_this = std::next(match_this); compare_this != pn.end(); ++compare_this) { + if(fverbose) + std::cout << "\t\t\tCompare to a end point from a track (ID: " << compare_this->first<<"); "; + if(match_this->first == compare_this->first){//if two end points from the same track, skip this round. + if(fverbose) std::cout<<"\t\t\t\tSame track, skip!"<second->Dist(*match_this->second);//distance between match_this point to compare_this point; + + + if(fverbose) std::cout << "distance btw them: " << dist << ", the shortest: "<< best_dist << std::endl; + // if(dist==0) std::cout<<" Reject this point."<>Take this track end point as a better candidate vertex!\n\n"; + best_match = match_this; + best_candidate = compare_this; + best_dist = dist; + } + if(temp_save_this_dist>dist) temp_save_this_dist = dist; + } + dist_marker(f_dist_tt, temp_save_this_dist); + } + + if(best_match == pn.end() || pn.size()<2) { + if(fverbose) + std::cout << "\tNah, tracks are all single. No vertex candidate for tracks.\n"; + return; + } + //at this moment, we have: + // best_match - the iterator of an end-point of one track + // best_candidate - the iterator of an end-point of another track + // best_dist - the cloest distance between these two points + + std::vector track_IDs; + track_IDs.push_back(best_match->first); + track_IDs.push_back(best_candidate->first); + + std::vector points; + points.push_back(*best_match->second); + points.push_back(*best_candidate->second); + + geoalgo::Sphere sphere(falgo.boundingSphere(points));//falgo is an GeoAlgo object, this sets the mid point of two track endpoints as new candidate verex. + + Erase(pn, best_match, sphere.Center());//remove the points that has been added as candidate vertex. + Erase(pn, best_candidate, sphere.Center()); + + //#3 add more tracks around the vertex candidate + if(fverbose){ + std::cout << "\n\nSTEP III: Add tracks around the vertex candidate. "; + std::cout << "ID: "<< best_match->first<<" at ("; + cout<second->Dist(sphere_center); + if(fverbose){ + std::cout << "\t\tTrack (ID: " << this_iterator->first<< ") end point "; + std::cout << "is at distant: " << dist << " maximum allowed distance: " << sbest_dist << std::endl; + } + + if(std::find(track_IDs.begin(), track_IDs.end(), this_iterator->first) != track_IDs.end()) { + if(fverbose) + std::cout << " This is not the last track?(CHECK) Skip\n"; + continue; + } + + if(dist < sbest_dist) {//when find a close track end point, attch it to the candidate vertex. + if(fverbose) + std::cout << "\t\t\tTake this track. Update the shortest distance!\n"; + best_o = this_iterator; + sbest_dist = dist; + } + } + + if(best_o == pn.end()) {//exit the loop only when + if(fverbose) + std::cout << "\tNo more tracks can be added.\n"; + break; + } + + track_IDs.push_back(best_o->first); + points.push_back(*best_o->second); + + Erase(pn, best_o, *best_o->second); + + //s = algo.boundingSphere(points); + + } while(true);//if false, then it only loops once; + //points - point objects that contains positions; + //boundingSphere(points) is a minimum sphere that contains points. + pas.AddAssociation(track_IDs, points, sphere.Center(), falgo.boundingSphere(points).Radius()); + + if(fverbose){//no worry, the code would not run this part is there were no candidate vertex. + cout<<"\nSummary: add "< next shower_i + // + int screen_width = 86; + + std::map shower_map; + + //#1 load showers + for(size_t const i : fdetos->GetShowerIndices()) { + shower_map.emplace(i, &pas.GetDetectorObjects().GetShower(i)); + } + + std::vector const & associations = pas.GetAssociations();//Load vertex candidates, that contains vertices, radius of the vertex (bounding phere) + + while(shower_map.size()>0) { + if(fverbose) { + std::cout << "STEP I: Load " << shower_map.size() << " showers for evaluation.\n\n"; + + if(shower_map.size()) { + //Print the title + std::stringstream output_buf; + output_buf<fcone.Start();//Shower Coordinates + cout<<" | "<fcone.Dir()<first <<")"<< std::endl; + std::cout << "\t\t\t Compare to other showers:"<second->fcone.Start(); + geoalgo::Vector_t const & c_dir = this_iterator->second->fcone.Dir(); + + for(auto that_iterator = std::next(this_iterator); that_iterator != shower_map.end(); ++ that_iterator) {//look at each shower candidate, + + if(fverbose) std::cout << "\t\t\t Shower (ID: " << that_iterator->first <<") "; + + if( that_iterator->first == this_iterator->first) { + if(fverbose) std::cout << "is the same shower, skip (CHECK)\n"; + continue; + } + geoalgo::Point_t temp_vert; + + double dist = FindClosestApproach( that_iterator->second->fcone, this_iterator->second->fcone, temp_vert);//minimum impact parameter + //this is the shortest distance between two backward projection in 3D. + //update temp_vert as the mid point of these two points that gives the shortest distance. + + if(fverbose) + std::cout << "has bkw-projection distant to the current shower's bkw-projection, " << dist << ", and the shortest-dist so far is " + << best_dist << ".\n"; + + double temp_dist = best_dist;//fshower_prox now is temp_dist + + if(dist < temp_dist) {//min. impact parameter < max shower proximity threshold + + if(fverbose) std::cout << "\t\t\t\t>>Take their mid point as the candidate vertex and update the shortest-dist!\n"; + + best_shower_id = this_iterator->first; + best_other_id = that_iterator->first; + best_vert = temp_vert; + best_dist = dist; + index = SIZE_MAX; + AddShowerToVertex = false; + } + } + + // if(fverbose) std::cout << "\t\t >>Finish comparing showers to the shower with ID: "<first<GetTrackIndices()) {//compare tracks + + if(fverbose) + std::cout << "\t\t\t Track (ID: " << i <<") "; + Track const & t = fdetos->GetTrack(i); + + geoalgo::Point_t dont_care; + geoalgo::Point_t temp_vert; + + Double_t dist = + sqrt(falgo.SqDist(t.ftrajectory, + geoalgo::HalfLine(c_start, + c_dir*-1), + temp_vert,//this point will be changed along the track; id does not matter what value it is; + dont_care));//this is along the backward projection + //CHECK, temp_vert will becomes the first point of the ftrajectory, if parallel? this happens ! + + if(fverbose) + std::cout << "is distant to the bkw point, " + << dist << ", and the shortest_dist so far is " << best_dist << ".\n"; + + if(dist < best_dist) { + + if(fverbose) std::cout << "\t\t\t\t>>Take the bkw point ("<first; + best_other_id = i; + best_vert = temp_vert; + best_dist = dist; + index = SIZE_MAX; + AddShowerToVertex = false; + } + } + + + //if(fverbose) std::cout << "\t\t >>Finish comparing tracks to the shower with ID: "<first<>Take this candidate vertex as the precandidate vertex and update the shortest-dist!\n"; + + best_shower_id = this_iterator->first; + best_other_id = SIZE_MAX;//shower matches no shower nor track. + best_vert = falgo.ClosestPt(pa.GetRecoVertex(), this_iterator->second->fcone);//c.second->fcone is a Trajectory_t + best_dist = dist; + index = i;//the ith association + AddShowerToVertex = true; + } + } + + + if(fverbose) std::cout << "\t\t\t Finish comparison between shower and candidate vertex; \n"<>Finish looking at all showers with other showers, tracks, and vertex candidates. + //it normally ends up with a shower with a small distance to another shower/track/vertex candidate + + + dist_marker(f_dist_sx, best_dist); + //#3 precandidate vertex promotion + if(fverbose){ + cout << "STEP III: Try to promote the above precandidate vertex."<= fshower_prox) {//ds>=s_{max} + if(fverbose) std::cout << "\t larger than "<GetRecoType(best_other_id) ){ + case 1://#3.2.1 shower that gives the precandidate vertex; if no candidate vertex is found nearby, create one + { + size_t association_index = SIZE_MAX;//a large number; + double best_association_dist = fcpoa_vert_prox;//dist between precandidate vertex and candidate vertex + bool found_candidate_vertex = false; + + if(fverbose) { + std::cout << "A shower bkw point;"<>Find a nearby candidate vertex, update the shortest_dist.\n"; + + association_index = i;//get the index of association that gives the best association distance. + best_association_dist = dist; + found_candidate_vertex = true; + } + } + + + if(fverbose) std::cout << "\t\t\t Finish candidate vertex search.\n"<= fcpoa_vert_prox){} //this is a yes when the precandidate vertex is close to a candidate vertex + if(found_candidate_vertex){//candidate vertex is nearby + + if(fverbose) { + std::cout << "\t\t\t\t>>Find a candidate vertex (ID: "<< association_index; + std::cout<<") near the bkw point, so add both showers (ID: "; + std::cout<GetTrackIndices()) {//look at all tracks; + + geoalgo::Trajectory const & t = fdetos->GetTrack(i).ftrajectory; + //look at two end points of a track, and see if one of them is close to the precandidate vertex + double const trackend_dist = t.back().Dist(best_vert); + if(fverbose){ + std::cout << "\t\t\tStart point from the track (ID: " << i <<"): "; + std::cout << "distance btw them: " << trackend_dist << ", the shortest: "<< best_showerp_dist << std::endl; + } + if(trackend_dist < best_showerp_dist) { + best_track = i; + best_tp = &t.back(); + best_other_tp = &t.front(); + best_showerp_dist = trackend_dist; + promote_the_precandidate = true; + if(fverbose) std::cout << "\t\t\t\t>>Take this track end point as the closest!\n\n"; + } + + double const trackstart_dist = t.front().Dist(best_vert); + + if(fverbose){ + std::cout << "\t\t\tEnd point from the track (ID: " << i <<"): "; + std::cout << "distance btw them: " << trackstart_dist << ", the shortest: "<< best_showerp_dist << std::endl; + } + if(trackstart_dist < best_showerp_dist) { + best_track = i; + best_tp = &t.front(); + best_other_tp = &t.back(); + best_showerp_dist = trackstart_dist; + promote_the_precandidate = true; + if(fverbose) std::cout << "\t\t\t\t>>Take this track end point as the closest!\n\n"; + } + } + + dist_marker(f_dist_st, best_dist);//distance between shower&shower to a track end point, if updated. + if(fverbose){ + if(promote_the_precandidate){ + std::cout << "\t\t\t A nearby track end point is used as a candidate vertex."< const & index_positions = + pas.GetAssociationIndicesFromObject(best_track);//iterator that gives the best_track inside pas; + switch(index_positions.size()){ + case 0://no track end point is found from the candidate vertices; + { + if(fverbose) { + std::cout << "\t\t\t\t>>This is a new track! Create a candidate vertex from "; + std::cout<<" the mid point btw the bkw point and track end point.\n"; + if(best_tp == nullptr) std::cout << "The track-end point does not exist!\n";//tp = track point + } + + std::vector objects; + objects.push_back(best_shower_id);//a shower + objects.push_back(best_other_id);//other shower + objects.push_back(best_track);//the new track + std::vector verts(2, best_vert);//best_vert is the bkw point (of 2 showers); + + verts.push_back(*best_tp); + pas.AddAssociation(objects, + verts, + geoalgo::Sphere(*best_tp, best_dist).Center(),//bounding sphere + best_dist);//"goodness" + } + break; + case 1://1 end point is found from the candidate vertices; + { + size_t const index = + pas.GetAssociationIndices().at(index_positions.front()); + + geoalgo::Point_t const & added_point = + associations.at(index).GetVertexFromNode(best_track);//add the vertex candidate (obtained from two track end points) from pas; + + double const point_dist = added_point.Dist(*best_tp);//bounding sphere radius, distance btw track end point and vertex candidate; + double const otherpoint_dist = added_point.Dist(*best_other_tp);//same as above, but with the other track end point; + + if(otherpoint_dist < point_dist) {//another end point is cloeser than the chosen one; + + if(associations.at(index).GetRecoVertex(). + Dist(*best_tp) < fstart_prox) {//mid point of both showers, track end point, and candidate are nearby. + //if the vertex candidate is close enough to the track end point, + // then we add both showers (the track was already associated) to this candidate vertex; + pas.AddShower(index, best_shower_id, best_vert); + pas.AddShower(index, best_other_id, best_vert); + + } else {//the candidate vertex is far away from the track end point, + // then make a new candidate vertex for these 2 showers and the track; + if(fverbose) { + std::cout << "\t\t\t\t>>This is a new track! Create a candidate vertex from "; + std::cout<<" the mid point btw the bkw point and track end point.\n"; + if(best_tp == nullptr) std::cout << "The track-end point does not exist!\n";//tp = track point + } + + std::vector showers; + showers.push_back(best_shower_id); + showers.push_back(best_other_id); + showers.push_back(best_track); + std::vector verts(2, best_vert); + verts.push_back(*best_tp); + pas.AddAssociation(showers, + verts, + geoalgo::Sphere(*best_tp, best_dist).Center(), + best_dist); + } + } else {//this is cloesd enought; associate both showers to the candidate vertex + pas.AddShower(index, best_shower_id, best_vert); + pas.AddShower(index, best_other_id, best_vert); + } + } + break; + case 2://2 end points are found from the candidate vertices; + {//for the track end point that is closer to the candidate vertex, + // add associate both showers respecting to that end point to the candidate vertex. + size_t const indexa = + pas.GetAssociationIndices().at(index_positions.front()); + double dista = + associations.at(indexa).GetRecoVertex().Dist(best_vert); + + size_t const indexb = + pas.GetAssociationIndices().at(index_positions.back()); + double distb = + associations.at(indexb).GetRecoVertex().Dist(best_vert); + + if(dista < distb) { + pas.AddShower(indexa, best_shower_id, best_vert); + pas.AddShower(indexa, best_other_id, best_vert); + } else { + pas.AddShower(indexb, best_shower_id, best_vert); + pas.AddShower(indexb, best_other_id, best_vert); + } + } + break; + default: { + cout<<"WARNING, if you see this line, it means you find more than two end points on a track."<>promote the precandidate connecting two showers as a vertex candidate: "; + + std::vector showers; + showers.push_back(best_shower_id); + showers.push_back(best_other_id); + std::vector verts(2, best_vert); + geoalgo::Point_t temp_vert2 = geoalgo::Sphere(best_vert, best_dist).Center(); + pas.AddAssociation(showers, + verts, + //geoalgo::Sphere(best_vert, best_dist).Center(), + temp_vert2, + best_dist); + + if(fverbose) { + std::cout << "\t\t\t\t>>No candidate vertex or track end points near the bkw point,"<>Finish comparing to the shower with ID: " << best_other_id << std::endl; + shower_map.erase(best_other_id);//When a shower is analyzed, eliminate it; + } + break; + + case 2: + {//#3.2.2 track that gives the precandidate vertex; if the track end point is not a candidate vertex, create one; + //best_vert is the shower start. + if(fverbose) std::cout << "A track end point with ID "<GetTrack(best_other_id).ftrajectory; + + double best_trackend_dist = t.front().Dist(best_vert);//dist btw track end point and precandidate vertex; + geoalgo::Point_t const * point = &t.front();//precandidate vertex, i.e. track end point; + geoalgo::Point_t const * otherpoint = &t.back();//another end of the track; + + double const trackend_dist = t.back().Dist(best_vert); + + if(trackend_dist != 0 && trackend_dist < best_trackend_dist) {//compare edges of q track to best_vert point non-zero distance + if(fverbose) std::cout<<"\t\t\tanother end of the track is closer to the bkw point, so take this."< const index_positions = + pas.GetAssociationIndicesFromObject(best_other_id); + //this helps to find the object with best_other_id as value + // in the pas. + + if(fverbose) + std::cout << "\t\t\tAdding shower to the existing candidate vertex, " + << "# of track end points as the candidate vertex: " + << index_positions.size() << std::endl; + + std::vector objects; + std::vector verts; + + switch(index_positions.size()){ + case 0://the track has no end points as cnadidate vertex; + { + if(fverbose) + std::cout << "\t\t\t\tPromote the bkw point as the candidate vertex\n"; + + objects.push_back(best_shower_id); + objects.push_back(best_other_id); + verts.push_back(best_vert); + verts.push_back(*point); + pas.AddAssociation(objects, + verts, + geoalgo::Sphere(*point, best_dist).Center(), + best_dist); + } + break; + case 1://the track has 1 end point as candidate vertex + { + if(fverbose) + std::cout << "\t\t\t\tAdd shower to the candidate vertex or create a new candidate vertex with the track end point\n"; + + size_t const index = + pas.GetAssociationIndices().at(index_positions.front());//get the end point as candidate vertex + + geoalgo::Point_t const & added_point = + associations.at(index).GetVertexFromNode(best_other_id); + + double const point_dist = added_point.Dist(*point);//point is the close track end point + double const otherpoint_dist = added_point.Dist(*otherpoint);//other point is the far track end point, introduced because of the candidate vertex; + + if(fverbose) + std::cout << "\t\t\t\tdist of the candidate to related track end point: "<< otherpoint_dist + <<" or the other end of that track: "<< point_dist << "\n"; + + if(otherpoint_dist < point_dist) { + + if(fverbose) + std::cout << "\t\t\t\t\tanother end is closer\n" + << "\t\t\t\t\tdistance between candidate vertex and the track end point (as used to find the candidate vetex): " + << associations.at(index).GetRecoVertex().Dist(*point) + << " < track-track distance: " << fstart_prox << " ?\n"; + + if(associations.at(index).GetRecoVertex(). + Dist(*point) < fstart_prox) { + if(fverbose) std::cout << "\t\t\t\t\t\tYes, add the shower to the candidate vertex\n"; + pas.AddShower(index, best_shower_id, best_vert);//Add Shower to the candidate vertex + } else { + + if(fverbose) std::cout << "\t\t\t\t\t\tNo, add the shower and the other track end point as candidate vertex."< verts; + verts.push_back(best_vert); + verts.push_back(*point); + pas.AddAssociation(objects, + verts, + geoalgo::Sphere(*point, best_dist).Center(), + best_dist);//make a bounding sphere by merging different vertices + } + } else{ + + if(fverbose) + std::cout << "\t\t\t\t\tthe candidate vertex is indeed closer\n" + << "\t\t\t\t\tAdd the shower with ID: " << best_shower_id<GetTrackIndices()) { + //goes over recob::track index, gn + + //Track is a struct defined in DetectorObjects.h + Track const & t = fdetos->GetTrack(gn);//t is track + + if(t.fis_associated) continue;//this will jump to the end of the loop and goes with next gn; triger this when the track is associated. + + geoalgo::Point_t const * track_end = nullptr; + double zmin = 2000;//the unit .. 2000 cm??? it doesnt matter though; it changes after first if-else + + geoalgo::Point_t const & front = t.ftrajectory.front();//first point along the trajectory. + if(front.at(2) < zmin) {//first point's z coordinate compared to zmin + track_end = &front; + zmin = front.at(2); + } + + geoalgo::Point_t const & back = t.ftrajectory.back(); + if(back.at(2) < zmin) { + track_end = &back; + zmin = back.at(2); + } + + if(track_end) { + + pas.AddAssociation(std::vector(1, gn), + std::vector(1, *track_end), + geoalgo::Sphere(*track_end, 0).Center(), + 0); + + } else{ + std::cout << "Warning: No track end pointer\n"; + } + } + + } + + + void VertexBuilder::AddLoneShowers(ParticleAssociations_all & pas) { + + for(size_t const gn : fdetos->GetShowerIndices()) { + + Shower const & s = fdetos->GetShower(gn); + + if(s.fis_associated) continue; + + geoalgo::Point_t const p = s.fcone.Start(); + + pas.AddAssociation(std::vector(1, gn), + std::vector(1, p), + geoalgo::Sphere(p, 0).Center(), + 0); + + } + + } + + // Fill the TTree with vertex info. + void VertexBuilder::FillVBT(ParticleAssociations_all & pas) { + + fvbt->ftrack_number = fdetos->GetTrackIndices().size(); + fvbt->fshower_number = fdetos->GetShowerIndices().size(); + fvbt->ftree->Fill(); + + } + + + void VertexBuilder::Run(ParticleAssociations_all & pas) {//Analysis the tracks & showers objects. +// int screen_width = 86; + + CheckSetVariables();//Variables are set in SinglePhoton_module.cc. + + fdetos = &pas.GetDetectorObjects();//initialize an empty object; + + //Make two associations, for tracks and showers. + if(fverbose) print_gadget(">>>>> Associate tracks","="); + + AssociateTracks(pas);//Gives candidate vertex from tracks. + + //fvbt is the object, it means.. if the object is not empty, do something. + // if(fvbt) fvbt->fassociation_track_number = pas.GetAssociations().size(); + + + if(fverbose) print_gadget(">>>> Associate showers","="); + + AssociateShowers(pas);//select associated candidates for showers + + //if(fvbt) fvbt->fassociation_shower_number = pas.GetAssociations().size(); + + //CHECK, repeat for long objects? Add them into consideration even if they are not associated to a vertex? + if(fverbose) print_gadget(">>>> Add lone tracks","="); + AddLoneTracks(pas); + + if(fverbose) print_gadget(">>>> Add lone showers","="); + AddLoneShowers(pas); + + if(fverbose) print_gadget(">>>> Get shower associations","="); + pas.GetShowerAssociations();//CHECK + + if(fvbt) fvbt->fassociation_final_number = pas.GetSelectedAssociations().size(); + if(fverbose)cout<<"\n\n # of Vertex found: "<Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"< > mcFluxHandle; + e.getByLabel("generator", mcFluxHandle); + if (!mcFluxHandle.isValid()) return; + std::vector< art::Ptr > mcFluxVec; + art::fill_ptr_vector(mcFluxVec, mcFluxHandle); + if (mcFluxVec.size() == 0){ + std::cout << ">> No MCFlux information" << std::endl; + return; + } + + art::Handle< std::vector > mcTruthHandle; + e.getByLabel("generator", mcTruthHandle); + if (!mcTruthHandle.isValid()) return; + std::vector< art::Ptr > mcTruthVec; + art::fill_ptr_vector(mcTruthVec, mcTruthHandle); + if (mcTruthVec.size() == 0){ + std::cout << ">> No MCTruth information" << std::endl; + return; + } + + art::Handle< std::vector< simb::GTruth > > gTruthHandle; + e.getByLabel("generator", gTruthHandle); + if (!gTruthHandle.isValid()) return; + std::vector< art::Ptr > gTruthVec; + art::fill_ptr_vector(gTruthVec, gTruthHandle); + if (gTruthVec.size() == 0){ + std::cout << ">> No GTruth information" << std::endl; + return; + } + + const art::Ptr mcFlux = mcFluxVec.at(0); + const art::Ptr mcTruth = mcTruthVec.at(0); + const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); + const art::Ptr gTruth = gTruthVec.at(0); + + m_run_number_eventweight = e.run(); + m_subrun_number_eventweight = e.subRun(); + m_event_number_eventweight = e.event(); + + // possibly the wrong variables, but let's see for now... + //m_mcflux_evtno = mcFlux->fevtno; + m_mcflux_nu_pos_x = nu.Vx(); + m_mcflux_nu_pos_y = nu.Vy(); + m_mcflux_nu_pos_z = nu.Vz(); + m_mcflux_nu_mom_x = nu.Px(); + m_mcflux_nu_mom_y = nu.Py(); + m_mcflux_nu_mom_z = nu.Pz(); + m_mcflux_nu_mom_E = nu.E(); + m_mcflux_ntype = mcFlux->fntype; + m_mcflux_ptype = mcFlux->fptype; + m_mcflux_nimpwt = mcFlux->fnimpwt; + m_mcflux_dk2gen = mcFlux->fdk2gen; + m_mcflux_nenergyn = mcFlux->fnenergyn; + m_mcflux_tpx = mcFlux->ftpx; + m_mcflux_tpy = mcFlux->ftpy; + m_mcflux_tpz = mcFlux->ftpz; + m_mcflux_tptype = mcFlux->ftptype; + m_mcflux_vx = mcFlux->fvx; + m_mcflux_vy = mcFlux->fvy; + m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for m_mctruth object + + m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < m_mctruth_nparticles; i++){ + + const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); + + m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + m_mctruth_particles_mother[i] = mcParticle.Mother(); + m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + + for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + + const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); + m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + + } + + m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + m_mctruth_particles_px0[i] = mcParticle.Px(0); + m_mctruth_particles_py0[i] = mcParticle.Py(0); + m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + m_mctruth_particles_e0[i] = mcParticle.E(0); + m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + } + + const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); + + m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + m_mctruth_neutrino_mode = mcNeutrino.Mode(); + m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + m_mctruth_neutrino_target = mcNeutrino.Target(); + m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + m_mctruth_neutrino_w = mcNeutrino.W(); + m_mctruth_neutrino_x = mcNeutrino.X(); + m_mctruth_neutrino_y = mcNeutrino.Y(); + m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + m_gtruth_tgt_pdg = gTruth->ftgtPDG; + m_gtruth_weight = gTruth->fweight; + m_gtruth_probability = gTruth->fprobability; + m_gtruth_xsec = gTruth->fXsec; + m_gtruth_diff_xsec = gTruth->fDiffXsec; + m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + m_gtruth_vertex_x = gTruth->fVertex.X(); + m_gtruth_vertex_y = gTruth->fVertex.Y(); + m_gtruth_vertex_z = gTruth->fVertex.Z(); + m_gtruth_vertex_T = gTruth->fVertex.T(); + m_gtruth_gscatter = gTruth->fGscatter; + m_gtruth_gint = gTruth->fGint; + m_gtruth_res_num = gTruth->fResNum; + m_gtruth_num_piplus = gTruth->fNumPiPlus; + m_gtruth_num_pi0 = gTruth->fNumPi0; + m_gtruth_num_piminus = gTruth->fNumPiMinus; + m_gtruth_num_proton = gTruth->fNumProton; + m_gtruth_num_neutron = gTruth->fNumNeutron; + m_gtruth_is_charm = gTruth->fIsCharm; + m_gtruth_gx = gTruth->fgX; + m_gtruth_gy = gTruth->fgY; + m_gtruth_gt = gTruth->fgT; + m_gtruth_gw = gTruth->fgW; + m_gtruth_gQ2 = gTruth->fgQ2; + m_gtruth_gq2 = gTruth->fgq2; + m_gtruth_probe_pdg = gTruth->fProbePDG; + m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + + eventweight_tree->Fill(); + std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ + m_mctruth_num = mcTruthVector.size(); + this->ResizeMCTruths(m_mctruth_num); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< truth = mcTruthVector[i]; + + m_mctruth_origin = truth->Origin(); + m_mctruth_ccnc = truth->GetNeutrino().CCNC(); + m_mctruth_mode = truth->GetNeutrino().Mode(); + m_mctruth_interaction_type = truth->GetNeutrino().InteractionType(); + m_mctruth_qsqr = truth->GetNeutrino().QSqr(); + m_mctruth_nu_pdg = truth->GetNeutrino().Nu().PdgCode(); + m_mctruth_nu_E = truth->GetNeutrino().Nu().E(); + m_mctruth_lepton_pdg = truth->GetNeutrino().Lepton().PdgCode(); + m_mctruth_lepton_E = truth->GetNeutrino().Lepton().E(); + + std::vector corrected(3); + this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); + + m_mctruth_nu_vertex_x = corrected[0]; + m_mctruth_nu_vertex_y = corrected[1]; + m_mctruth_nu_vertex_z = corrected[2]; + + + m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles + this->ResizeMCTruths(m_mctruth_num_daughter_particles); + + + //some temp variables to see if its 1g1p or 1g1n + int tmp_n_photons_from_delta = 0; + int tmp_n_protons_from_delta = 0; + int tmp_n_neutrons_from_delta = 0; + + + m_mctruth_leading_exiting_proton_energy = -9999; + + for(int j=0; j< m_mctruth_num_daughter_particles; j++){ + + const simb::MCParticle par = truth->GetParticle(j); + m_mctruth_daughters_pdg[j] = par.PdgCode(); + m_mctruth_daughters_E[j] = par.E(); + + + + switch(m_mctruth_daughters_pdg[j]){ + case(22): + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_photons++; + m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); + m_mctruth_exiting_photon_energy.push_back(par.E()); + + } + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); + if((par.StatusCode()==1 || par.StatusCode()==14 ) && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_photon_energy = par.E(); + tmp_n_photons_from_delta ++; + m_mctruth_is_delta_radiative++; + } + } + break; + case(111): + { + // Make sure the pi0 actually exits the nucleus + if (par.StatusCode() == 1) { + m_mctruth_exiting_pi0_E.push_back(par.E()); + m_mctruth_exiting_pi0_px.push_back(par.Px()); + m_mctruth_exiting_pi0_py.push_back(par.Py()); + m_mctruth_exiting_pi0_pz.push_back(par.Pz()); + m_mctruth_num_exiting_pi0++; + } + break; + } + case(211): + case(-211): + if (par.StatusCode() == 1) { + m_mctruth_num_exiting_pipm++; + } + break; + case(2212): + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_protons++; + m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); + m_mctruth_exiting_proton_energy.push_back(par.E()); + } + + + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); + if(par.StatusCode()==14 && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_proton_energy = par.E(); + tmp_n_protons_from_delta ++; + } + + + break; + } + case(2112): + { + + m_mctruth_num_exiting_neutrons++; + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); + if(par.StatusCode()==14 && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_neutron_energy = par.E(); + tmp_n_neutrons_from_delta ++; + } + } + + break; + case(-2224): + case(2224): + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } + break; + case(-2214): + case(2214): + case(-1114): + case(1114): + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } + break; + case(-2114): + case(2114): + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_delta0++; + m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ + m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + } + } + + + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t This event is "; + if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ + m_mctruth_delta_radiative_1g1p_or_1g1n = 1; + std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ + m_mctruth_num_reconstructable_protons++; + + }//if g above threshold + } + + //if it's a true delta radiative event, check the energies + + + + if (m_mctruth_is_delta_radiative==true){ + for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ + m_mctruth_is_reconstructable_1g0p = true; + + }//if g above threshold + }//for all exiting g + for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ + if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ + //if it's already 1g1p then we've found a 1g2p which we aren't counting + if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ + m_mctruth_is_reconstructable_1g1p = false; + } + //if there's a photon then it's actually a 1g1p + if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ + m_mctruth_is_reconstructable_1g1p = true; + m_mctruth_is_reconstructable_1g0p = false; + } + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); + + if(m_is_verbose){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + mymap[mcp->TrackId()] = k; + } + + + //Just some VERY hacky pi^0 photon stuff + int npi0check = 0; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + + if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; + + + if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ + npi0check++; + const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; + const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; + + if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); + double e2 = dau2->E(); + if(e21) std::cout<<"WARNING WARNING!!!! there are "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + + } + + + void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec){ + + // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ + + size_t flash_size = flashes.size(); + m_reco_num_flashes = flash_size; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; + + this->ResizeFlashes(flash_size); + + for(size_t i = 0; i < flash_size; ++i) { + + + art::Ptr const & flash = flashes[i]; + + m_reco_flash_total_pe[i]=(flash->TotalPE()); + m_reco_flash_time[i]=(flash->Time()); + m_reco_flash_time_width[i]=flash->TimeWidth(); + m_reco_flash_abs_time[i]=flash->AbsTime(); + m_reco_flash_frame[i]=flash->Frame(); + m_reco_flash_ycenter[i]=flash->YCenter(); + m_reco_flash_ywidth[i]=flash->YWidth(); + m_reco_flash_zcenter[i]=flash->ZCenter(); + m_reco_flash_zwidth[i]=flash->ZWidth(); + + if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ + m_reco_num_flashes_in_beamgate++; + m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); + m_reco_flash_time_in_beamgate[i]=(flash->Time()); + m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); + m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); + } + + + + } + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); + + double _dt_abs = 100000.0; + // double _within_resolution = 0; + double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; + + // Loop over the CRT hits. + for (int j = 0; j < _nCRThits_in_event; j++) + { + /* + if (verbose) + std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; + */ + double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); + + // Fill the vector variables. + m_CRT_hits_time.push_back(_crt_time_temp); + m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); + m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); + m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); + m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); + + if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) + { + _dt_abs = fabs(_beam_flash_time - _crt_time_temp); + m_CRT_dt = _beam_flash_time - _crt_time_temp; + m_CRT_min_hit_time = _crt_time_temp; + // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. + if (_dt_abs < m_Resolution) + { + //_within_resolution = 1; + // Set the position information and the intensity of the CRT hit. + m_CRT_min_hit_PE = crthit_h->at(j).peshit; + m_CRT_min_hit_x = crthit_h->at(j).x_pos; + m_CRT_min_hit_y = crthit_h->at(j).y_pos; + m_CRT_min_hit_z = crthit_h->at(j).z_pos; + + + // if (verbose) + // { + std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; + std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; + std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; + std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; + // } + break; + } + } // End of conditional for closest CRT hit time. + } // End of loop over CRT hits. + } //if there are hits + }//if there is 1 flash in beamgate + + + }//analyze flashes + + + } diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h new file mode 100644 index 000000000..c8efe171d --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h @@ -0,0 +1,1568 @@ +#include "SinglePhoton_module.h" +#include "reco_truth_matching.h" + +//BUG: m_reco_asso_showers limit the size of vectors under analyzeTracks(); +//Solution: m_reco_asso_showers -> showers.size() + +namespace single_photon +{ + void SinglePhoton::ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_startz.clear(); + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + + m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + + } + + void SinglePhoton::ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + + m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + + + + + + } + + void SinglePhoton::CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void SinglePhoton::AnalyzeShowers( + Atlas& package, + geoalgo::Point_t pvertex, + const std::vector>& showers, + std::map,art::Ptr> & showerToPFParticleMap, + std::map, std::vector>> & pfParticleToHitMap, + std::map, std::vector> > & pfParticleToClusterMap, + std::map, std::vector> > & clusterToHitMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr>& PFPtoShowerReco3DMap + ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); + this->ResizeShowers(showers.size()); + + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + art::Ptr shower3d; + if(PFPtoShowerReco3DMap.count(pfp) == 0){ + if(false){//Keng, CHECK, has turn this off. + std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; + const std::vector> clusters = pfParticleToClusterMap[pfp]; + + + //int m_shrid = shower->ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); + + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); + + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + // + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + + double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); + m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + + + + m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); + m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + + m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); + m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + + + m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + + + std::vector t_num(3,0); + std::vector t_numhits(3,0); + std::vector t_area(3,0.0); + + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); + + auto finish = std::chrono::high_resolution_clock::now(); + auto microseconds = std::chrono::duration_cast(finish-start); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + const int shr3d_bestplane = shower3d->best_plane(); + + std::cout<<"SHOWER3D_ENERGY: best plane: "< zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); + if(m_reco_shower_num_daughters[i_shr]>0){ + //currently just look at 1 daughter + m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + //------------and finally some slice info----------------- + + m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; + //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; + + //BobbyVertexBuilder + int shower_to_nuslice_dist = 9999; + if(!m_reco_shower_is_nuslice[i_shr]){ + geoalgo::Point_t sh(m_reco_shower_startx[i_shr], + m_reco_shower_starty[i_shr], + m_reco_shower_startz[i_shr]);//start point of shower + shower_to_nuslice_dist = pvertex.Dist(sh); + } + package.showerToDistMap.emplace(shower,shower_to_nuslice_dist); + + //--------- End of BB + + + + //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ + + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; + for(int plane =0; plane < 3; plane++){ + if (m_is_data == false && m_is_overlayed == false){ + gains[plane] = m_gain_mc[plane] ; + } if (m_is_data == true || m_is_overlayed == true){ + gains[plane] = m_gain_data[plane] ; + } + } + + + int i_shr=0; + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + std::vector> hitz = pfParticleToHitMap[pfp]; + + if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ + if(m_is_verbose){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; + + if(kalmanTrackToCaloMap.count(kalman)==0){ + if(m_is_verbose){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; + + if(calo.size()!=3){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; + if(plane<0 || plane > 3) continue; + + std::vector t_dEdx; //in XX cm only (4 for now) + std::vector t_res; + + + for(size_t ix=0; ixResidualRange().size(); ++ix){ + + double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; + if(rr <= res_range_lim){ + t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); + //t_dQdx.push_back(*calo[p]->dQdx()[x]); + t_res.push_back(rr); + } + } + /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); + if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); + + switch(plane){ + case 0: + m_reco_shower_kalman_mean_dEdx_plane0[i_shr] = tmean ; + m_reco_shower_kalman_median_dEdx_plane0[i_shr] = tmedian ; + break; + case 1: + m_reco_shower_kalman_mean_dEdx_plane1[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane1[i_shr] = tmedian; + break; + case 2: + m_reco_shower_kalman_mean_dEdx_plane2[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane2[i_shr] = tmedian; + break; + default: + break; + } + + + const std::vector< anab::Point_t > kal_pts = calo[p]->XYZ(); + double circle = 1.0;//in cm + std::vector pts_within; + std::vector pts_x; + + for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); + + double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); + double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); + + //loop over all hits + for(auto &hit: hitz){ + if(plane != hit->View())continue; + double this_w = (double)hit->WireID().Wire; + double this_t = (double)hit->PeakTime(); + double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); + if(dist<=circle) pts_within.back()++; + } + //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ + TCanvas *c = new TCanvas(); + c->cd(); + + TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); + g->SetLineColor(kRed); + g->SetLineWidth(2); + g->Draw("alp"); + g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); + c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); + } + } + + + // some kalman averaging + double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; + double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; + double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; + double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); + double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); + double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); + + double thresh = 0.01; + + if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ + tmp_kal_2 = 0; + wei_2 = 0.0; + } + if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ + tmp_kal_1 = 0; + wei_1 = 0.0; + } + if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ + tmp_kal_0 = 0; + wei_0 = 0.0; + } + double kal_norm = wei_0+wei_1+wei_2; + + if(kal_norm!=0.0){ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); + }else{ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; + } + + + i_shr++; + } + return; + } + + + //----------------------------------------------------------------------------------------------------------------------------------------- + void SinglePhoton::RecoMCShowers(const std::vector>& showers, + std::map, art::Ptr> & showerToPFParticleMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector + ){ + //OBSOLETE OBSOLETE + + + if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; + m_sim_shower_matched[i_shr] = 0; + if(showerToMCParticleMap.count(shower) > 0){ + + + const art::Ptr mcparticle = showerToMCParticleMap[shower]; + const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; + + std::vector corrected(3); + this->spacecharge_correction(mcparticle, corrected); + m_sim_shower_matched[i_shr] = 1; + m_sim_shower_energy[i_shr] = mcparticle->E(); + m_sim_shower_mass[i_shr] = mcparticle->Mass(); + m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); + m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); + m_sim_shower_process[i_shr] = mcparticle->Process(); + m_sim_shower_start_x[i_shr] = corrected[0]; + m_sim_shower_start_y[i_shr] = corrected[1]; + m_sim_shower_start_z[i_shr] =corrected[2]; + + m_sim_shower_origin[i_shr] = mctruth->Origin(); + //so this might be broken still due to mcparticle. must chcek + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_shower_parent_pdg[i_shr] = -999; + }else{ + m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + //OK is this photon matched to a delta? + + /* + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ + + nth_mother = crap_map[nth_mother->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]< &shower) + { + + } + + double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ + double energy = 0.; + + //for each hit in the shower + for (auto &thishitptr : hits){ + //check the plane + int plane= thishitptr->View(); + + //skip invalid planes + if (plane != this_plane ) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy += E; + }//for each hit + + return energy; + + } + + double SinglePhoton::CalcEShower(const std::vector> &hits){ + double energy[3] = {0., 0., 0.}; + + //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); + + //skip invalid planes + if (plane > 2 || plane < 0) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy[plane] += E; + }//for each hiti + + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; + } + } + // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ + double gain; + //choose gain based on whether data/mc and by plane + if (m_is_data == false && m_is_overlayed == false){ + gain = m_gain_mc[plane] ; + //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; + return Q; + } + + double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ + return QtoEConversion(GetQHit(thishitptr, plane)); + + } + + double SinglePhoton::QtoEConversion(double Q){ + //return the energy value converted to MeV (the factor of 1e-6) + double E = Q* m_work_function *1e-6 /m_recombination_factor; + return E; + + } + + + std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ + int n = dqdx.size(); + std::vector dedx(n,0.0); + for (int i = 0; i < n; i++){ + //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane){ + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; + + //get the 3D shower direction + //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented + TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); + + //calculate the pitch for this plane + double pitch = getPitch(shower_dir, plane); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ + //keep only clusters on the plane + if(thiscluster->View() != plane) continue; + + //calculate the cluster direction + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + + //get the cluster start and and in CM + //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; + + //check that the cluster has non-zero length + double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + //resizes the branches that are filled for every slice int the event + void SinglePhoton::ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size); + m_reco_slice_num_pfps.resize(size); + m_reco_slice_num_showers.resize(size); + m_reco_slice_num_tracks.resize(size); + + } + + /* + //resize the branches that are filled for matched track and shower objects + void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ + m_reco_slice_shower_matched_sliceId.resize(size_shower); + m_reco_slice_track_matched_sliceId.resize( size_track); + m_reco_slice_shower_matched_energy.resize(size_shower); + m_reco_slice_track_matched_energy.resize( size_track); + m_reco_slice_shower_matched_conversion.resize(size_shower); + m_reco_slice_shower_matched_overlay_frac.resize(size_shower); + + } + */ + + + void SinglePhoton::CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + + } + + /* + void SinglePhoton::CreateMatchedSliceBranches(){ + vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); + vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); + vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); + vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); + vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); + vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); + } + */ + + //called once per event to get all the slice info + //fills a map between the neutrino score for the slice and the primary reco PFP + //loops over all PFP's to find the primary and then associate to a slice + void SinglePhoton::AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> &primaryPFPSliceIdVec, + std::map &sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap){ + + + //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index + // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score + std::vector> clearCosmicPFP; + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + + std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event + std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event + //std::vector> primary_pfps; //store the primary PFP for each slice + // sliceIdToPFPMap.clear(); //clear between events + + /* + * Grabbed this info from Giuseppe: + * Here's the structure of these Metadata + * Primary PfParticles are either + * 1) IsClearCosmic = 1 (for unambiguous cosmics) + * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) + * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) + * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: + * 4) TrackScore = 0.671488 + * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata + */ + + + //for all PFP metadata in the event + for (auto pair: pfParticleToMetadataMap){ + std::vector> metadatalist= pair.second; //get the metadata + art::Ptr pfp = pair.first; //get the corresponding PFP + + //will be empty in circumstances outlined above, not every PFP has stored metadata + if (!metadatalist.empty()){ + + //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ + + //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); + + //get the metadata properties + std::map propertiesmap = data->GetPropertiesMap(); + //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; + PFPToTrackScoreMap[pfp] = it.second; + } + + }//for each item in properties map + + //if there is a neutrino score it's the primary PFP, so save the score+slice info + if(temp_score != -1.0){ + primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); + //primaryToSliceIdMap[pfp] = temp_ind; + sliceIdToNuScoreMap[temp_ind] = temp_score; + if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()< 0){ + //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + //for all pfp's in the event + //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; + + //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ + for(auto item: pfParticleMap){ + art::Ptr start_pfp = item.second; + //no longer skipping pfp's that are clear cosmics + //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); + //if(iter != clearCosmicPFP.end()) continue; + + // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; + art::Ptr parent_pfp ; + + //if this is a primary particle, skip next part + if(!this_pfp->IsPrimary()){ + parent_pfp = pfParticleMap[this_pfp->Parent()]; + //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ + // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; + this_pfp = parent_pfp; + }//while not primary, iterate up chain + } else{ + parent_pfp = start_pfp; + } + + //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); + m_reco_slice_nuscore = nuscore_slices; + /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); + // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); + m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice + m_reco_slice_num_showers; //the subset of PFP's that are showers + m_reco_slice_num_tracks; + */ + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; + //for(auto item: allPFPSliceIdVec){ + //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); + // } + } + + // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ + std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); + //return sliceIdToNumPFPsvec; + + //std::cout<<"starting to look at the PFP's per slice"<Self()<<" in slice "< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); + + /* + int max_pfp = -1; + for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { + int this_pfp = it->first->Self(); + if (this_pfp> max_pfp) { + max_pfp = this_pfp; + } + + } + std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; + + //check if this is a valid PFP + //if (pfp->self() > PFPToSliceIdMap.size()){ + // std::cout<<"ERROR, this pfp is out of bounds " + + // } + + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< pfp = pair.second; + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ + std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap){ + + std::vector matched_reco_slice_shower_overlay_fraction; + std::vector> matched_reco_slice_shower_MCP; + //std::vector matched_reco_slice_track_matched; + std::vector> matched_reco_slice_track_MCP; + + + //first check if in the event there's a match to a given signal + if(signal_def == "ncdelta"){ + //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; + // std::cout<<"found sim photon shower with track ID "< 0){ + //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); + matched_reco_slice_shower_MCP.push_back(mcp); + + //save the overlay fraction and whether it's matched + matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); + //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; + + if (m_sim_track_matched[k] > 0){ + if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ + + matched_reco_slice_track_MCP.push_back(mcp); + + // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ + //get the recob shower + art::Ptr this_shr; + for(auto pair: showerToMCParticleMap){ + if (pair.second == mcp){ + this_shr = pair.first; + } + } + art::Ptr this_pfp; + if(!this_shr.isNull()){ + this_pfp = showerToPFParticleMap[this_shr]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ + //get the recob track + art::Ptr this_trk; + for(auto pair: trackToMCParticleMap){ + if (pair.second == mcp){ + this_trk = pair.first; + } + } + art::Ptr this_pfp; + if(!this_trk.isNull()){ + this_pfp = trackToNuPFParticleMap[this_trk]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<Branch("reco_template",&m_reco_template); + } + + void SinglePhoton::AnalyzeTemplates(){ + m_reco_num_templates = 1; + this->ResizeTemplates(m_reco_num_templates); + + m_reco_template[0]=99; + + } +} diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h new file mode 100644 index 000000000..879d90b27 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h @@ -0,0 +1,1235 @@ +#include "SinglePhoton_module.h" +#include "TPrincipal.h" +#include "TVectorD.h" +#include "TruncMean.h" +#include "Atlas.h" +//BUG: m_reco_asso_tracks limit the size of vectors under analyzeTracks(); +//Solution: m_reco_asso_tracks -> tracks.size() + + +namespace single_photon +{ + void SinglePhoton::ClearTracks(){ + m_reco_asso_tracks=0; + m_reco_track_num_daughters.clear(); + m_reco_track_daughter_trackscore.clear(); + m_reco_track_dirx.clear(); + m_reco_track_diry.clear(); + m_reco_track_dirz.clear(); + m_reco_track_startx.clear(); + m_reco_track_starty.clear(); + m_reco_track_startz.clear(); + m_reco_track_endx.clear(); + m_reco_track_endy.clear(); + m_reco_track_endz.clear(); + + m_reco_track_theta_yz.clear(); + m_reco_track_phi_yx.clear(); + + m_reco_track_num_trajpoints.clear(); + m_reco_track_num_spacepoints.clear(); + m_reco_track_proton_kinetic_energy.clear(); + m_reco_track_ordered_energy_index.clear(); + m_reco_track_ordered_displacement_index.clear(); + + m_reco_track_spacepoint_principal0.clear(); + m_reco_track_spacepoint_principal1.clear(); + m_reco_track_spacepoint_principal2.clear(); + + m_reco_track_spacepoint_chi.clear(); + m_reco_track_spacepoint_max_dist.clear(); + + m_reco_track_best_calo_plane.clear(); + + m_reco_track_mean_dEdx_best_plane.clear(); + m_reco_track_mean_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_dEdx_end_half_best_plane.clear(); + m_reco_track_good_calo_best_plane.clear(); + m_reco_track_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + m_reco_track_trunc_PIDA_best_plane.clear(); + m_reco_track_resrange_best_plane.clear(); + m_reco_track_dEdx_best_plane.clear(); + + + m_reco_track_mean_dEdx_p0.clear(); + m_reco_track_mean_dEdx_start_half_p0.clear(); + m_reco_track_mean_dEdx_end_half_p0.clear(); + m_reco_track_good_calo_p0.clear(); + m_reco_track_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + m_reco_track_trunc_PIDA_p0.clear(); + m_reco_track_resrange_p0.clear(); + m_reco_track_dEdx_p0.clear(); + + m_reco_track_mean_dEdx_p1.clear(); + m_reco_track_mean_dEdx_start_half_p1.clear(); + m_reco_track_mean_dEdx_end_half_p1.clear(); + m_reco_track_good_calo_p1.clear(); + m_reco_track_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + m_reco_track_trunc_PIDA_p1.clear(); + m_reco_track_resrange_p1.clear(); + m_reco_track_dEdx_p1.clear(); + + m_reco_track_mean_dEdx_p2.clear(); + m_reco_track_mean_dEdx_start_half_p2.clear(); + m_reco_track_mean_dEdx_end_half_p2.clear(); + m_reco_track_good_calo_p2.clear(); + m_reco_track_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + m_reco_track_trunc_PIDA_p2.clear(); + m_reco_track_resrange_p2.clear(); + m_reco_track_dEdx_p2.clear(); + + m_reco_track_num_calo_hits_p1.clear(); + m_reco_track_num_calo_hits_p0.clear(); + m_reco_track_num_calo_hits_p2.clear(); + + + m_sim_track_matched.clear(); + m_sim_track_overlay_fraction.clear(); + m_sim_track_energy.clear(); + m_sim_track_kinetic_energy.clear(); + m_sim_track_mass.clear(); + m_sim_track_pdg.clear(); + m_sim_track_origin.clear(); + m_sim_track_parent_pdg.clear(); + m_sim_track_process.clear(); + m_sim_track_startx.clear(); + m_sim_track_starty.clear(); + m_sim_track_startz.clear(); + m_sim_track_trackID.clear(); + + // PID + m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + m_reco_track_pid_chi2_mu_plane0.clear(); + m_reco_track_pid_chi2_mu_plane1.clear(); + m_reco_track_pid_chi2_mu_plane2.clear(); + m_reco_track_pid_chi2_p_plane0.clear(); + m_reco_track_pid_chi2_p_plane1.clear(); + m_reco_track_pid_chi2_p_plane2.clear(); + m_reco_track_pid_pida_plane0.clear(); + m_reco_track_pid_pida_plane1.clear(); + m_reco_track_pid_pida_plane2.clear(); + m_reco_track_pid_three_plane_proton_pid.clear(); + + m_reco_track_end_to_nearest_dead_wire_plane0.clear(); + m_reco_track_end_to_nearest_dead_wire_plane1.clear(); + m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + m_reco_track_sliceId.clear(); + m_reco_track_nuscore.clear(); + m_reco_track_isclearcosmic.clear(); + m_reco_track_trackscore.clear(); + m_reco_track_is_nuslice.clear(); + + + + m_sim_track_sliceId.clear(); + m_sim_track_nuscore.clear(); + m_sim_track_isclearcosmic.clear(); + } + + void SinglePhoton::ResizeTracks(size_t size){ + m_reco_track_length.resize(size); + m_reco_track_dirx.resize(size); + m_reco_track_num_daughters.resize(size); + m_reco_track_daughter_trackscore.resize(size); + + m_reco_track_diry.resize(size); + m_reco_track_dirz.resize(size); + m_reco_track_endx.resize(size); + m_reco_track_endy.resize(size); + m_reco_track_endz.resize(size); + + m_reco_track_startx.resize(size); + m_reco_track_starty.resize(size); + m_reco_track_startz.resize(size); + m_reco_track_num_trajpoints.resize(size); + m_reco_track_num_spacepoints.resize(size); + m_reco_track_proton_kinetic_energy.resize(size); + m_reco_track_ordered_energy_index.resize(size); + m_reco_track_ordered_displacement_index.resize(size); + + + m_reco_track_spacepoint_principal0.resize(size); + m_reco_track_spacepoint_principal1.resize(size); + m_reco_track_spacepoint_principal2.resize(size); + + m_reco_track_spacepoint_chi.resize(size); + m_reco_track_spacepoint_max_dist.resize(size); + + m_reco_track_theta_yz.resize(size); + m_reco_track_phi_yx.resize(size); + + m_reco_track_best_calo_plane.resize(size); + + m_reco_track_mean_dEdx_best_plane.resize(size); + m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + m_reco_track_good_calo_best_plane.resize(size); + m_reco_track_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + m_reco_track_trunc_PIDA_best_plane.resize(size); + m_reco_track_resrange_best_plane.resize(size); + m_reco_track_dEdx_best_plane.resize(size); + + + m_reco_track_mean_dEdx_p0.resize(size); + m_reco_track_mean_dEdx_start_half_p0.resize(size); + m_reco_track_mean_dEdx_end_half_p0.resize(size); + m_reco_track_good_calo_p0.resize(size); + m_reco_track_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + m_reco_track_trunc_PIDA_p0.resize(size); + m_reco_track_resrange_p0.resize(size); + m_reco_track_dEdx_p0.resize(size); + + m_reco_track_mean_dEdx_p1.resize(size); + m_reco_track_mean_dEdx_start_half_p1.resize(size); + m_reco_track_mean_dEdx_end_half_p1.resize(size); + m_reco_track_good_calo_p1.resize(size); + m_reco_track_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + m_reco_track_trunc_PIDA_p1.resize(size); + m_reco_track_resrange_p1.resize(size); + m_reco_track_dEdx_p1.resize(size); + + m_reco_track_mean_dEdx_p2.resize(size); + m_reco_track_mean_dEdx_start_half_p2.resize(size); + m_reco_track_mean_dEdx_end_half_p2.resize(size); + m_reco_track_good_calo_p2.resize(size); + m_reco_track_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + m_reco_track_trunc_PIDA_p2.resize(size); + m_reco_track_resrange_p2.resize(size); + m_reco_track_dEdx_p2.resize(size); + + m_reco_track_num_calo_hits_p1.resize(size); + m_reco_track_num_calo_hits_p0.resize(size); + m_reco_track_num_calo_hits_p2.resize(size); + + + + m_sim_track_matched.resize(size); + m_sim_track_energy.resize(size); + m_sim_track_mass.resize(size); + m_sim_track_kinetic_energy.resize(size); + m_sim_track_pdg.resize(size); + m_sim_track_parent_pdg.resize(size); + m_sim_track_origin.resize(size); + m_sim_track_process.resize(size); + m_sim_track_startx.resize(size); + m_sim_track_starty.resize(size); + m_sim_track_startz.resize(size); + m_sim_track_trackID.resize(size); + m_sim_track_overlay_fraction.resize(size); + + m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + m_reco_track_pid_chi2_mu_plane0.resize(size); + m_reco_track_pid_chi2_mu_plane1.resize(size); + m_reco_track_pid_chi2_mu_plane2.resize(size); + m_reco_track_pid_chi2_p_plane0.resize(size); + m_reco_track_pid_chi2_p_plane1.resize(size); + m_reco_track_pid_chi2_p_plane2.resize(size); + m_reco_track_pid_pida_plane0.resize(size); + m_reco_track_pid_pida_plane1.resize(size); + m_reco_track_pid_pida_plane2.resize(size); + m_reco_track_pid_three_plane_proton_pid.resize(size); + + m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + m_reco_track_sliceId.resize(size); + m_reco_track_nuscore.resize(size); + m_reco_track_isclearcosmic.resize(size); + m_reco_track_trackscore.resize(size); + m_reco_track_is_nuslice.resize(size); + + m_sim_track_sliceId.resize(size); + m_sim_track_nuscore.resize(size); + m_sim_track_isclearcosmic.resize(size); + } + + void SinglePhoton::CreateTrackBranches(){ + vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + + + } + + + + + + + void SinglePhoton::AnalyzeTracks( + Atlas& package, + geoalgo::Point_t pvertex, + const std::vector>& tracks, + std::map, art::Ptr> & trackToNuPFParticleMap, + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int> &PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap){ + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); +//KENG, Yes! DONT USE m_reco_asso_track, because we are going to fill in more than that! + this->ResizeTracks(tracks.size()); + + //const double adc2eU(5.1e-3); + //const double adc2eV(5.2e-3); + // const double adc2eW(5.4e-3); + + // const double tau(theDetector->ElectronLifetime()); + + + for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) + { + + const art::Ptr track = *iter; + const art::Ptr pfp = trackToNuPFParticleMap[track]; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; + + + int m_trkid = track->ID(); + double m_length = track->Length(); + auto m_trk_dir = track->Direction(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<Start().X(); + m_reco_track_starty[i_trk]= track->Start().Y(); + m_reco_track_startz[i_trk]= track->Start().Z(); + + m_reco_track_length[i_trk] =m_length; + m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); + m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); + m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + + m_reco_track_endx[i_trk] = track->End().X(); + m_reco_track_endy[i_trk]= track->End().Y(); + m_reco_track_endz[i_trk]= track->End().Z(); + + m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); + m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + + std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + double max_dist_from_line = -9999999; + + m_reco_track_spacepoint_chi[i_trk] = 0.0; + //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; + principal->AddRow(&tmp_spacepoints[0]); + + double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); + if(dist> max_dist_from_line) max_dist_from_line = dist; + m_reco_track_spacepoint_chi[i_trk] += dist*dist; + } + m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + + principal->MakePrincipals(); + TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); + + m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + + delete principal; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<Self()<<" is: "<NumDaughters(); + if(m_reco_track_num_daughters[i_trk]>0){ + //currently just look at 1 daughter + m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + } else{ + m_reco_track_trackscore[i_trk] = -999; + } + + //A loop over the trajectory points + size_t const traj_size = track->CountValidPoints(); + m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + + for(unsigned int p = 0; p < traj_size; ++p) { + //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); + //recob::Track::Point_t const & pos = trajp.position; + //recob::Track::Vector_t const & mom = trajp.momentum; + + } + + + i_trk++; + + } + + //Lets sort and order the showers + m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); + m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, + Atlas &package,//fill in the MCParticleToAncestorMap Here; + std::map, art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector & vfrac + ){ + + if(m_is_verbose){ std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite"<second->PdgCode(); +// if(package.matchedMCParticleVector[i]->Mother()==0){ +// std::cout<<" TrackId: "<TrackId(); +// std::cout<<" Pdg: "<PdgCode(); +// std::cout<<" Mother: "<Mother(); +// std::cout<<" Energy: "<E(); +// std::cout<<" Status: "<StatusCode()<NParticles(); j++){ +// std::cout<<"MCTruth->GetParticle's PdgCode: "<GetParticle(j).PdgCode(); +// std::cout<<" Energy: "<GetParticle(j).E()< track = *iter; + const art::Ptr track = tracks[k]; + m_sim_track_matched[i_trk] = 0; + + if(trackToMCParticleMap.count(track)>0){ + const art::Ptr mcparticle = trackToMCParticleMap[track]; +// std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; + const art::Ptr pfp = trackToPFParticleMap[track]; + + std::vector corrected(3); + this->spacecharge_correction(mcparticle, corrected); + + m_sim_track_matched[i_trk] = 1; + m_sim_track_energy[i_trk] = mcparticle->E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = corrected[0]; + m_sim_track_starty[i_trk] = corrected[1]; + m_sim_track_startz[i_trk] = corrected[2]; + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + + m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; + + // if(mcparticle->TrackId() != 0){ + // } + //std::cout<<"looking for mother with track id "<Mother()<Mother()>=(int)mcParticleVector.size()){ + //if (MCParticleToTrackIdMap[mcparticle->Mother()].isNull()){} + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + // m_sim_track_parent_pdg[i_trk] = MCParticleToTrackIdMap[mcparticle->Mother()]->PdgCode(); + } + +// //---- Request by BobbyVertexBuilder ----- +// +// art::Ptr temp_mc = mcparticle; +// while(false){//search for ancestor; initial state - 0; other state - 1; https://internal.dunescience.org/doxygen/namespacegenie.html#a05cd2ccc34b3e3a9e88bdd335f990118 +// std::cout<<"Mother ID:"<Mother()<TrackId()<StatusCode()<Mother()]; +//// temp_mc = package.MCParticleToTrackIdMap.find(temp_mc->Mother())->second; +// } +////CHECK std::cout<<"Ancestor PdgCode: "<PdgCode()<NParticles()<GetParticle[0] == temp_mc){ +//// std::cout<<"Match the ancestor to MCTruth!"<GetParticle[0]->PdgCode()<Mother() <> &tracks, std::map,std::vector> > &trackToCaloMap) + { + + if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; + + if(trackToCaloMap[track].size()!=3){ + std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; + const art::Ptr calo_p1 = trackToCaloMap[track][1]; + const art::Ptr calo_p2 = trackToCaloMap[track][2]; + + + size_t calo_length_p0 = calo_p0->dEdx().size(); + size_t calo_length_p1 = calo_p1->dEdx().size(); + size_t calo_length_p2 = calo_p2->dEdx().size(); + + TruncMean tm_p0; + TruncMean tm_p1; + TruncMean tm_p2; + + std::vector trunc_dEdx_p0; + std::vector res_range_good_p0; + std::vector dEdx_good_p0; + + std::vector trunc_dEdx_p1; + std::vector res_range_good_p1; + std::vector dEdx_good_p1; + + std::vector trunc_dEdx_p2; + std::vector res_range_good_p2; + std::vector dEdx_good_p2; + + m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + + m_reco_track_best_calo_plane[i_trk]=-1; + + m_reco_track_good_calo_p0[i_trk] = 0; + m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + m_reco_track_good_calo_p1[i_trk] = 0; + m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + m_reco_track_good_calo_p2[i_trk] = 0; + m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + + + + //First off look over ALL points + //--------------------------------- plane 0 ----------- Induction + for (size_t k = 0; k < calo_length_p0; ++k) { + double res_range = calo_p0->ResidualRange()[k]; + double dEdx = calo_p0->dEdx()[k]; + + m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + if(k <= calo_length_p0/2){ + m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ + res_range_good_p0.push_back(res_range); + dEdx_good_p0.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p0.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p0.setRadius(rad); + tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ + double dEdx = trunc_dEdx_p0[k]; + m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + if(k <= trunc_dEdx_p0.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p1->dEdx()[k]; + + m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + if(k <= calo_length_p1/2){ + m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ + res_range_good_p1.push_back(res_range); + dEdx_good_p1.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p1.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p1.setRadius(rad); + tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ + double dEdx = trunc_dEdx_p1[k]; + m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + if(k <= trunc_dEdx_p1.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p2->dEdx()[k]; + + m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + if(k <= calo_length_p2/2){ + m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ + res_range_good_p2.push_back(res_range); + dEdx_good_p2.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p2.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p2.setRadius(rad); + tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ + double dEdx = trunc_dEdx_p2[k]; + m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + if(k <= trunc_dEdx_p2.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ + m_reco_track_best_calo_plane[i_trk] = 0; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; + + + }else if(m_reco_track_good_calo_p1[i_trk]!=0){ + m_reco_track_best_calo_plane[i_trk] = 1; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + + + + }else{ + m_reco_track_best_calo_plane[i_trk] = -1; + } + + + } + } + + + + void SinglePhoton::CollectPID( std::vector> & tracks, + std::map< art::Ptr, art::Ptr> & trackToPIDMap){ + + for(size_t i_trk=0; i_trk track = tracks[i_trk]; + art::Ptr pid = trackToPIDMap[track]; + if (!pid) { + std::cout << "[analyze_Tracks] bad PID object" << std::endl; + continue; + } + + // For each PID object, create vector of PID scores for each algorithm + // Loop over this and get scores for algorithm of choice + // But first, prepare garbage values, just in case + std::vector AlgScoresVec = pid->ParticleIDAlgScores(); + double pidScore_BL_mu_plane0 = -999; + double pidScore_BL_mu_plane1 = -999; + double pidScore_BL_mu_plane2 = -999; + double pidScore_BL_p_plane0 = -999; + double pidScore_BL_p_plane1 = -999; + double pidScore_BL_p_plane2 = -999; + double pidScore_BL_mip_plane0 = -999; + double pidScore_BL_mip_plane1 = -999; + double pidScore_BL_mip_plane2 = -999; + double pidScore_PIDA_plane0 = -999; + double pidScore_PIDA_plane1 = -999; + double pidScore_PIDA_plane2 = -999; + double pidScore_chi2_mu_plane0 = -999; + double pidScore_chi2_mu_plane1 = -999; + double pidScore_chi2_mu_plane2 = -999; + double pidScore_chi2_p_plane0 = -999; + double pidScore_chi2_p_plane1 = -999; + double pidScore_chi2_p_plane2 = -999; + double pidScore_three_plane_proton = -999; + + //int planeid = 2; + for (size_t i_algscore=0; i_algscore&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + + return sqrt(d2); + + } + + double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9 ){ + + double min_dist = 999999; + + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int channel = bad_channel_list_fixed_mcc9[i].first; + int is_ok = bad_channel_list_fixed_mcc9[i].second; + if(is_ok>1)continue; + + auto wireids = geom->ChannelToWire(channel); + auto result = geom->WireEndPoints(wireids[0]); + + //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + std::vector end = {0.0,result.end().Y(),result.end().Z()}; + std::vector point = {0.0,Ypoint,Zpoint}; + double dist = dist_line_point(start,end,point); + min_dist = std::min(dist,min_dist); + } + + return min_dist; + + } + + + //Typenamed for recob::Track and recob::Shower + template + int badChannelMatching(std::vector& badchannels, + std::vector& objects, + std::map< T, art::Ptr > & objectToPFParticleMap, + std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9){ + + + + + for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; + const std::vector> hits = pfParticleToHitsMap[pfp]; + + int min_dist_from_bad_channel = 99999; + + for(size_t h=0; h hit = hits[h]; + + + //int nch = (int)badchannels.size()/3; + //for(int i=0; i1)continue; + int dist =hit->Channel()-bc; + auto hs = geom->ChannelToWire(bc); + //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); + std::vector end(3); + auto result = geom->WireEndPoints(hs[0]); + + // std::cout<<"KNK: "<,double> p1, const std::pair, double> p2){ + return (p1.second < p2.second); +} + +// override function of sorts for min_element function comparison +bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second > p2.second); +} + +namespace single_photon{ + +void SinglePhoton::ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); +} + +void SinglePhoton::CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + +} + + +/* Arguments to Function IsolationStudy (all are const): + * 1. vector named tracks of art ptr to recob track + * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle + * 3. vector named showers of art ptr to recob showers + * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle + * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit + * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int + * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit +*/ +void SinglePhoton::IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) +{ + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector< art::Ptr > associated_hits; + std::vector< art::Ptr > unassociated_hits; + std::vector< art::Ptr > unassociated_hits_plane0; + std::vector< art::Ptr > unassociated_hits_plane1; + std::vector< art::Ptr > unassociated_hits_plane2; + + std::vector< std::map >> > v_newClusterToHitsMap(3); + +// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + std::vector> slicehits = sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = pfParticleToHitsMap.at(pfp); + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id != -999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id!=-999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ + std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); + + TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); + TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); + TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); + std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; + + +std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; +// saving wire and time coordinates + std::vector> pts_trk( tracks.size(), std::vector(3) ); + + art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); + std::vector> t_vec_c(3); + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + +std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; +std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; +std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + +std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance on each plane + std::vector< std::pair, double > > max_min_hit(3); + + art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + auto showerhits = pfParticleToHitsMap.at(pfp_s); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + + +//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower +std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; + + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); + + for(int plane = 0; plane < 3; plane++){ + minDist_tot[plane] = 999; + std::vector vec_t; + std::vector vec_c; + + for(auto &uh: unassociated_hits_all[plane]){ + + if (t_vec_c[plane].size() == 0) break; + + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); + + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); + + if (minDist < minDist_tot[plane]) { + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } + + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; + + } // end looping unassociated_hits_all + + g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + } // end looping planes + + // place data into appropriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + } + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + } + + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + +/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ +/* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); +*/ + + delete histcan; + + +//PLOTTING NOW +//SET-UP + double plot_point_size = 0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + } + +// ******************************** DeadWireRegions ******************************************** + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + // std::cout<<"WIRE "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + l->SetLineColor(kGray+1); + l->Draw("same"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } + + + + +//******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + +// PLOTTING SHOWER? + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + +// PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"< +//#include + +namespace single_photon +{ + + //recoMCmatching but specifically for recob::showers + std::vector SinglePhoton::showerRecoMCmatching( + std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap){ + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); + if (parentIterator == pfParticleIdMap.end()){ + std::cout<<"error: no parent but not primary"<second->PdgCode(); + std::cout<<"the parent pdg code is "<Daughters(); + //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; + // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); + //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + /** + * + * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower + * + **/ + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + + bool found_a_match = false; + + //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<View(); + + particle_vec.clear(); match_vec.clear(); //only store per hit + + //for the hit, fill the backtracker info + mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); + // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + + } + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + if(match->PdgCode()==22){ + std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; + this->spacecharge_correction(match, corrected_start, tmp ); + m_sim_shower_is_true_shower[i] = 1; + }else if(abs(match->PdgCode())==11){ + this->spacecharge_correction(match, corrected_start); + m_sim_shower_is_true_shower[i] = 1; + }else{ + corrected_start = {-999,-999,-999}; + m_sim_shower_is_true_shower[i] = 0; + } + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + + if (match_mother.isNull()){ + m_sim_shower_parent_pdg[i] = -1; + m_sim_shower_parent_trackID[i] = -1; + + }else{ + m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + } + + + m_sim_shower_matched[i] = 1; + m_sim_shower_energy[i] = match->E(); + m_sim_shower_mass[i] = match->Mass(); + m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + m_sim_shower_pdg[i] = match->PdgCode(); + m_sim_shower_trackID[i] = match->TrackId(); + m_sim_shower_process[i] = match->Process(); + m_sim_shower_end_process[i] = match->EndProcess(); + m_sim_shower_vertex_x[i] = corrected_vertex[0]; + m_sim_shower_vertex_y[i] = corrected_vertex[1]; + m_sim_shower_vertex_z[i] =corrected_vertex[2]; + + m_sim_shower_start_x[i] = corrected_start[0]; + m_sim_shower_start_y[i] = corrected_start[1]; + m_sim_shower_start_z[i] =corrected_start[2]; + + m_sim_shower_px[i] = match->Px(); + m_sim_shower_py[i] = match->Py(); + m_sim_shower_pz[i] = match->Pz(); + + m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; + + m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + + mcParticleVector.push_back(match); + cout<<"Mapped shower to MC "<ID()<<" to "<TrackId()<Self()<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< + std::vector recoMCmatching(std::vector& objectVector, + std::map>& objectToMCParticleMap, + std::map>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector){ + + std::vector trk_overlay_vec; + std::vector vec_fraction_matched; + bool reco_verbose = false; + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + bool found_a_match = false; + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; + found_a_match = true; + } + }//end loop over particles per hit + } + + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + trk_overlay_vec.push_back(fraction_num_hits_overlay); + if(n_associated_mcparticle_hits == 0){ + //This will only occur if the whole recob::PFParticle is associated with an overlay object + //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" + << " pdg=" << best_matched_mcparticle->PdgCode() + << " trkid=" << best_matched_mcparticle->TrackId() + << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; + } + + }//end vector loop. + //return vec_fraction_matched; + return trk_overlay_vec; + } + + + //Typenamed for simb::MCTrack and sim::MCShower + template + void perfectRecoMatching( + std::vector>& mcParticleVector, + std::vector& mcObjectVector, + std::map,T>& mcParticleToMCObjectMap + ){ + + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); + std::cout<<"KRANK: "< particle = mcParticleVector[ip]; + int particle_trackID = particle->TrackId(); + + std::vector id_matches; + std::vector mother_id_matches; + std::vector ancestor_id_matches; + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + + if(object_trackID == particle_trackID ) id_matches.push_back(io); + if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); + if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); + } + + int num_id_matches=id_matches.size(); + int num_mother_id_matches=mother_id_matches.size(); + int num_ancestor_id_matches=ancestor_id_matches.size(); + + //So im not sure how this works but something like this + if(num_id_matches > 1){ + std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; + }else if(num_ancestor_id_matches == 1){ + //We have a mother match? I guess this is like Neutron->photon->e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; + }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ + std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector, const art::Event &evt){ + + std::map > crap_map; + for(size_t j=0;j< mcParticleVector.size();j++){ + const art::Ptr mcp = mcParticleVector[j]; +//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; +} +art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); +art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); + +std::vector> GenieMCTruth; +std::vector geninfo; + + + +for(size_t i=0; i< mcParticleVector.size();i++){ + + +art::Ptr nth_mother = mcParticleVector[i]; + +//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; + +std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother() != 0){ + +nth_mother = crap_map[nth_mother->Mother()]; +std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ +std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); +std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + + + } + + void SinglePhoton::SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + + + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector> associated_hits; + std::vector> unassociated_hits; + std::vector> unassociated_hits_plane0; + std::vector> unassociated_hits_plane1; + std::vector> unassociated_hits_plane2; + + std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane + + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + int sliceid = pfParticleToSliceIDMap.at(pfp); + std::cout<<"CHECK1! in second_shower_search.h"< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + int sliceid = pfParticleToSliceIDMap.at(pfp); + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + + + std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ + std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ + + //TFile *f = new TFile("t.root","recreate"); + //f->cd(); + + std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); + can->Divide(4,3,0,0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr pfp = showerToPFParticleMap.at(showers[s]); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: showerhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + //vec_c[(int)h->View()].push_back((double)h->Channel()); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_shr[s] = t_pts; + } + + + std::vector> pts_trk( tracks.size(), std::vector(3) ); + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); + auto trackhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: trackhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_trk[t] = t_pts; + } + //Now the "Unassociated Hits" + + std::vector g_unass(3); + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + for(int i=0; i<3; i++){ + + std::vector vec_t; + std::vector vec_c; + + for(auto &h: unassociated_hits_all[i]){ + + double wire = (double)h->WireID().Wire; + vec_c.push_back(wire); + vec_t.push_back((double)h->PeakTime()); + + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //for reclustering + std::vector pt = {wire,vec_t.back()}; + pts_to_recluster[(int)h->View()].push_back(pt); + mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; + } + + g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + + + } + //Plotting now + double plot_point_size=0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + can->cd(i+5); + g_vertex[i]->Draw("ap"); + + can->cd(i+9); + g_vertex[i]->Draw("ap"); + + + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + //std::cout<<"KNK: "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); + l->SetLineColor(kGray+1); + l->Draw("same"); + can->cd(thisp+5); + l->Draw("same"); + can->cd(thisp+9); + l->Draw("same"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + for(int i=0; i<3; i++){ + can->cd(i+1); + + if(g_unass[i]->GetN()>0){ + g_unass[i]->Draw("p same"); + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + can->cd(i+5); + g_vertex[i]->Draw("p same"); + can->cd(i+9); + g_vertex[i]->Draw("p same"); + + double rad_cm = 12.0; + TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); + ell_p->SetLineColor(kRed); + ell_p->SetFillStyle(0); + ell_p->Draw("same"); + + } + + + + + + + //*****************************DBSCAN*********************************** + int min_pts = 10; + double eps = 5.0; + std::vector num_clusters(3,0); + + std::vector> g_clusters(3); + std::vector> cluster_labels(3); + + + std::vector vec_clusters; + + for(int i=0; i<3; i++){ + + std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; + std::vector> hitz; + for(size_t p=0; p< pts_to_recluster[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ + + pts.push_back(pts_to_recluster[i][p]); + hitz.push_back(mapPointIndexToHit[i].at(p)); + } + + } + vec_clusters.emplace_back(c,i,pts,hitz); + } + } + + + + //Create final maps; + for(size_t i=0; i<3; i++){ + for(size_t p=0; p h = mapPointIndexToHit[i].at(p);// Get the hit + size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise + + //std::cout<> t_hs= {h}; + v_newClusterToHitsMap[i][cluster_label] = t_hs; + }else{ + v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list + } + } + } + + + //for(size_t i=0; i<3; i++){ + // for(int c=0; c cluster_colors(max_n_clusters,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(int j=0; j< max_n_clusters; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + //Step next, loop over and make plots again + for(int i=0; i<3; i++){ + std::vector> vec_time(num_clusters[i]+1); + std::vector> vec_wire(num_clusters[i]+1); + std::vector tmp_g_clusters(num_clusters[i]+1); + + if(cluster_labels[i].size() != pts_to_recluster[i].size()){ + std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; + tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); + can->cd(i+5); + if( + tmp_g_clusters[c]->GetN()>0){ + tmp_g_clusters[c]->Draw("p same"); + tmp_g_clusters[c]->SetMarkerColor(tcol); + tmp_g_clusters[c]->SetFillColor(tcol); + tmp_g_clusters[c]->SetMarkerStyle(20); + tmp_g_clusters[c]->SetMarkerSize(plot_point_size); + } + } + g_clusters[i] = tmp_g_clusters; + c_offset += num_clusters[i]; + } + + //******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + //Clusters + + /* if(m_is_data==false){ + for(auto &c: vec_clusters){ + //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); + //c.setSSScore(ssscor); + + int thisid = m_sim_shower_trackID[0]; + + for(auto &h: c.getHits()){ + + + } + } + } + */ + + + can->cd(8); + for(int i=0; i<3; i++){ + TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); + + TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); + + for(int c=0; c< num_clusters[i]+1; c++){ + if(c==0)continue; + + int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); + auto hitz = v_newClusterToHitsMap[i][c]; + auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); + int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); + + std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; + l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); + + //Here we will only plot those that pass in bottom: + //We are also going to put a hard threshold of 70cm? + // + if(ssscorz.pass && is_in_shower ==-1 ){ + can->cd(i+9); + if(g_clusters[i][c]->GetN()>0){ + TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); + + int Npts = 20; + TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + + std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); + core->GetFunction("pol1")->SetLineWidth(1); + core->GetFunction("pol1")->SetLineStyle(3); + core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + + } + //lets map (wire,tick) to a rudamentary (cm,cm); + //double slope2 = slope*25*0.3; + //double con2 = con*25; + + double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); + + //rudimentary! + for(double k=chan_min[i]; k< chan_max[i];k++){ + double y = slope*k+con; + double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); + impact_parameter = std::min(impact_parameter,dist); + } + + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + + double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); + double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); + + std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; + double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); + double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); + double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); + //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); + m_sss_candidate_angle_to_shower.push_back(kinda_angle); + + + if(m_is_data){ + m_sss_candidate_matched.push_back(-1); + m_sss_candidate_pdg.push_back(-1); + m_sss_candidate_parent_pdg.push_back(-1); + m_sss_candidate_trackid.push_back(-1); + m_sss_candidate_overlay_fraction.push_back(-1); + + }else{ + auto ssmatched = this->SecondShowerMatching( hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); + m_sss_candidate_matched.push_back(ssmatched[0]); + m_sss_candidate_pdg.push_back(ssmatched[1]); + m_sss_candidate_parent_pdg.push_back(ssmatched[2]); + m_sss_candidate_trackid.push_back(ssmatched[3]); + m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); + + + } + + + std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; + l_bot2->AddEntry(tmp,sname2.c_str(),"f"); + } + } + + } + + //Some time matching + + //Closest neightor + + for(int l=0; l< m_sss_num_candidates; l++){ + int this_p = m_sss_candidate_plane[l]; + double close = 1e10; + for(int m=0; m< m_sss_num_candidates;m++){ + if(this_p == m_sss_candidate_plane[m]) continue; + + double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); + + close = std::min(dup,close); + + } + + m_sss_candidate_closest_neighbour.push_back(close); + + } + + + + for(int l=0; l< m_sss_num_candidates; l++){ + + std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; + + + double score = sssVetov1->GetMvaValue(thisvars); + m_sss_candidate_veto_score.push_back(score); + + } + + + can->cd(8); + l_bot->SetLineWidth(0); + l_bot->SetLineColor(kWhite); + l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); + l_bot->Draw("same"); + + can->cd(12); + l_bot2->SetLineWidth(0); + l_bot2->SetLineColor(kWhite); + l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); + l_bot2->Draw("same"); + + + + + + + + + } + //********** Some Error Checking ********************// + + /*for(int i=0; i<3; i++){ + + std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); + //can->Write(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + //f->Close(); + std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; + std::vectorall_tick; + std::vectorall_dist; + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + std::vector sorted_in = sort_indexes(all_dist); + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + sss_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + + double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + std::vectorSinglePhoton::SecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + + + std::vector ans; //matched,pdg,parentpdg,trkid + + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + bool found_a_match = false; + + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < hitz.size(); ++i_h){ + int which_plane = (int)hitz[i_h]->View(); + particle_vec.clear(); match_vec.clear(); //only store per hit + //for the hit, fill the backtracker info + mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); + + //if there is an MCParticle associated to this hit + if(particle_vec.size()>0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + + } + if(found_a_match){ + std::cout<<"!"<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP + + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; + } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; + } + + + num_bt_mothers++; + } else{ + if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + int par_pdg = -1; + if (match_mother.isNull()){ + par_pdg = -1; + + }else{ + par_pdg = match_mother->PdgCode(); + } + + ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(),fraction_num_hits_overlay}; + + return ans; + }//end sss matching; + +} diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h new file mode 100644 index 000000000..eb86cd866 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h @@ -0,0 +1,85986 @@ +// Class: ReadBDT +// Automatically generated by MethodBase::MakeClass +// + +/* configuration options ===================================================== + +#GEN -*-*-*-*-*-*-*-*-*-*-*- general info -*-*-*-*-*-*-*-*-*-*-*- + +Method : BDT::BDT +TMVA Release : 4.2.1 [262657] +ROOT Release : 6.10/02 [395778] +Creator : mark +Date : Thu Sep 12 13:57:16 2019 +Host : Linux SFT-ubuntu-2 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux +Dir : /home/mark/work/uBooNE/HIVE2.0/hellstroms_hive/hive/build/bin/SSSveto_V3 +Training events: 41200 +Analysis type : [Classification] + + +#OPT -*-*-*-*-*-*-*-*-*-*-*-*- options -*-*-*-*-*-*-*-*-*-*-*-*- + +# Set by User: +V: "False" [Verbose output (short form of "VerbosityLevel" below - overrides the latter one)] +H: "False" [Print method-specific help message] +NTrees: "1250" [Number of trees in the forest] +MaxDepth: "5" [Max depth of the decision tree allowed] +MinNodeSize: "2.5%" [Minimum percentage of training events required in a leaf node (default: Classification: 5%, Regression: 0.2%)] +nCuts: "-1" [Number of grid points in variable range used in finding optimal cut in node splitting] +BoostType: "AdaBoost" [Boosting type for the trees in the forest (note: AdaCost is still experimental)] +UseBaggedBoost: "True" [Use only a random subsample of all events for growing the trees in each boost iteration.] +AdaBoostBeta: "1.000000e-01" [Learning rate for AdaBoost algorithm] +BaggedSampleFraction: "5.000000e-01" [Relative size of bagged event sample to original size of the data sample (used whenever bagging is used (i.e. UseBaggedBoost, Bagging,)] +SeparationType: "giniindex" [Separation criterion for node splitting] +# Default: +VerbosityLevel: "Default" [Verbosity level] +VarTransform: "None" [List of variable transformations performed before training, e.g., "D_Background,P_Signal,G,N_AllClasses" for: "Decorrelation, PCA-transformation, Gaussianisation, Normalisation, each for the given class of events ('AllClasses' denotes all events of all classes, if no class indication is given, 'All' is assumed)"] +CreateMVAPdfs: "False" [Create PDFs for classifier outputs (signal and background)] +IgnoreNegWeightsInTraining: "False" [Events with negative weights are ignored in the training (but are included for testing and performance evaluation)] +AdaBoostR2Loss: "quadratic" [Type of Loss function in AdaBoostR2] +Shrinkage: "1.000000e+00" [Learning rate for GradBoost algorithm] +UseRandomisedTrees: "False" [Determine at each node splitting the cut variable only as the best out of a random subset of variables (like in RandomForests)] +UseNvars: "4" [Size of the subset of variables used with RandomisedTree option] +UsePoissonNvars: "True" [Interpret "UseNvars" not as fixed number but as mean of a Poisson distribution in each split with RandomisedTree option] +UseYesNoLeaf: "False" [Use Sig or Bkg categories, or the purity=S/(S+B) as classification of the leaf node -> Real-AdaBoost] +NegWeightTreatment: "inverseboostnegweights" [How to treat events with negative weights in the BDT training (particular the boosting) : IgnoreInTraining; Boost With inverse boostweight; Pair events with negative and positive weights in training sample and *annihilate* them (experimental!)] +Css: "1.000000e+00" [AdaCost: cost of true signal selected signal] +Cts_sb: "1.000000e+00" [AdaCost: cost of true signal selected bkg] +Ctb_ss: "1.000000e+00" [AdaCost: cost of true bkg selected signal] +Cbb: "1.000000e+00" [AdaCost: cost of true bkg selected bkg ] +NodePurityLimit: "5.000000e-01" [In boosting/pruning, nodes with purity > NodePurityLimit are signal; background otherwise.] +RegressionLossFunctionBDTG: "huber" [Loss function for BDTG regression.] +HuberQuantile: "7.000000e-01" [In the Huber loss function this is the quantile that separates the core from the tails in the residuals distribution.] +DoBoostMonitor: "False" [Create control plot with ROC integral vs tree number] +UseFisherCuts: "False" [Use multivariate splits using the Fisher criterion] +MinLinCorrForFisher: "8.000000e-01" [The minimum linear correlation between two variables demanded for use in Fisher criterion in node splitting] +UseExclusiveVars: "False" [Variables already used in fisher criterion are not anymore analysed individually for node splitting] +DoPreselection: "False" [and and apply automatic pre-selection for 100% efficient signal (bkg) cuts prior to training] +SigToBkgFraction: "1.000000e+00" [Sig to Bkg ratio used in Training (similar to NodePurityLimit, which cannot be used in real adaboost] +PruneMethod: "nopruning" [Note: for BDTs use small trees (e.g.MaxDepth=3) and NoPruning: Pruning: Method used for pruning (removal) of statistically insignificant branches ] +PruneStrength: "0.000000e+00" [Pruning strength] +PruningValFraction: "5.000000e-01" [Fraction of events to use for optimizing automatic pruning.] +SkipNormalization: "False" [Skip normalization at initialization, to keep expectation value of BDT output according to the fraction of events] +nEventsMin: "0" [deprecated: Use MinNodeSize (in % of training events) instead] +UseBaggedGrad: "False" [deprecated: Use *UseBaggedBoost* instead: Use only a random subsample of all events for growing the trees in each iteration.] +GradBaggingFraction: "5.000000e-01" [deprecated: Use *BaggedSampleFraction* instead: Defines the fraction of events to be used in each iteration, e.g. when UseBaggedGrad=kTRUE. ] +UseNTrainEvents: "0" [deprecated: Use *BaggedSampleFraction* instead: Number of randomly picked training events used in randomised (and bagged) trees] +new BDTNodeodesMax: "0" [deprecated: Use MaxDepth instead to limit the tree size] +## + + +#VAR -*-*-*-*-*-*-*-*-*-*-*-* variables *-*-*-*-*-*-*-*-*-*-*-*- + +NVar 17 +sss_candidate_num_hits sss_candidate_num_hits sss_candidate_num_hits sss_candidate_num_hits 'F' [6,2308] +sss_candidate_num_wires sss_candidate_num_wires sss_candidate_num_wires sss_candidate_num_wires 'F' [3,892] +sss_candidate_num_ticks sss_candidate_num_ticks sss_candidate_num_ticks sss_candidate_num_ticks 'F' [4,912] +sss_candidate_PCA sss_candidate_PCA sss_candidate_PCA sss_candidate_PCA 'F' [0.503382563591,0.999899983406] +log10(sss_candidate_impact_parameter) log10_sss_candidate_impact_parameter_ log10(sss_candidate_impact_parameter) log10(sss_candidate_impact_parameter) 'F' [-4.8894276619,2.93567156792] +log10(sss_candidate_min_dist) log10_sss_candidate_min_dist_ log10(sss_candidate_min_dist) log10(sss_candidate_min_dist) 'F' [-2.06597232819,3.01287841797] +sss_candidate_impact_parameter/sss_candidate_min_dist sss_candidate_impact_parameter_D_sss_candidate_min_dist sss_candidate_impact_parameter/sss_candidate_min_dist sss_candidate_impact_parameter/sss_candidate_min_dist 'F' [4.03130507038e-05,73.829750061] +sss_candidate_energy*0.001 sss_candidate_energy_T_0.001 sss_candidate_energy*0.001 sss_candidate_energy*0.001 'F' [0.0018127351068,8.83777236938] +cos(sss_candidate_angle_to_shower) cos_sss_candidate_angle_to_shower_ cos(sss_candidate_angle_to_shower) cos(sss_candidate_angle_to_shower) 'F' [-1,1] +sss_candidate_fit_slope sss_candidate_fit_slope sss_candidate_fit_slope sss_candidate_fit_slope 'F' [-191.521224976,274.796813965] +sss_candidate_fit_constant sss_candidate_fit_constant sss_candidate_fit_constant sss_candidate_fit_constant 'F' [-354820.3125,249320.1875] +sss_candidate_plane sss_candidate_plane sss_candidate_plane sss_candidate_plane 'F' [0,2] +sss_reco_shower_energy*0.001 sss_reco_shower_energy_T_0.001 sss_reco_shower_energy*0.001 sss_reco_shower_energy*0.001 'F' [0.00124094926286,3.19415283203] +2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 2_T_0.001_T_0.001_T_sss_reco_shower_energy_T_sss_candidate_energy_T__1_M_cos_sss_candidate_angle_to_shower__ 2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 'F' [1.30417530074e-12,7.39190769196] +log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) log10_2_T_0.001_T_0.001_T_sss_reco_shower_energy_T_sss_candidate_energy_T__1_M_cos_sss_candidate_angle_to_shower___ log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) 'F' [-11.8846635818,0.868756532669] +sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) sss_candidate_energy_T_0.001_D__sss_reco_shower_energy_T_0.001_ sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) 'F' [0.00421480834484,273.713531494] +sss_candidate_closest_neighbour sss_candidate_closest_neighbour sss_candidate_closest_neighbour sss_candidate_closest_neighbour 'F' [0.00144542346243,10000000000] +NSpec 0 + + +============================================================================ */ + +#include +#include +#include +#include + +//#define new BDTNode new BDTNode + +#ifndef BDTNode__def +#define BDTNode__def + +class BDTNode { + +public: + + // constructor of an essentially "empty" node floating in space + BDTNode ( BDTNode* left,BDTNode* right, + int selector, double cutValue, bool cutType, + int nodeType, double purity, double response ) : + fLeft ( left ), + fRight ( right ), + fSelector ( selector ), + fCutValue ( cutValue ), + fCutType ( cutType ), + fNodeType ( nodeType ), + fPurity ( purity ), + fResponse ( response ){ + } + + virtual ~BDTNode(); + + // test event if it descends the tree at this node to the right + virtual bool GoesRight( const std::vector& inputValues ) const; + BDTNode* GetRight( void ) {return fRight; }; + + // test event if it descends the tree at this node to the left + virtual bool GoesLeft ( const std::vector& inputValues ) const; + BDTNode* GetLeft( void ) { return fLeft; }; + + // return S/(S+B) (purity) at this node (from training) + + double GetPurity( void ) const { return fPurity; } + // return the node type + int GetNodeType( void ) const { return fNodeType; } + double GetResponse(void) const {return fResponse;} + +private: + + BDTNode* fLeft; // pointer to the left daughter node + BDTNode* fRight; // pointer to the right daughter node + int fSelector; // index of variable used in node selection (decision tree) + double fCutValue; // cut value applied on this node to discriminate bkg against sig + bool fCutType; // true: if event variable > cutValue ==> signal , false otherwise + int fNodeType; // Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal + double fPurity; // Purity of node from training + double fResponse; // Regression response value of node +}; + +//_______________________________________________________________________ + BDTNode::~BDTNode() +{ + if (fLeft != NULL) delete fLeft; + if (fRight != NULL) delete fRight; +} + +//_______________________________________________________________________ +bool BDTNode::GoesRight( const std::vector& inputValues ) const +{ + // test event if it descends the tree at this node to the right + bool result; + result = (inputValues[fSelector] > fCutValue ); + if (fCutType == true) return result; //the cuts are selecting Signal ; + else return !result; +} + +//_______________________________________________________________________ +bool BDTNode::GoesLeft( const std::vector& inputValues ) const +{ + // test event if it descends the tree at this node to the left + if (!this->GoesRight(inputValues)) return true; + else return false; +} + +#endif + +#ifndef IClassifierReader__def +#define IClassifierReader__def + +class IClassifierReader { + + public: + + // constructor + IClassifierReader() : fStatusIsClean( true ) {} + virtual ~IClassifierReader() {} + + // return classifier response + virtual double GetMvaValue( const std::vector& inputValues ) const = 0; + + // returns classifier status + bool IsStatusClean() const { return fStatusIsClean; } + + protected: + + bool fStatusIsClean; +}; + +#endif + +class ReadBDT : public IClassifierReader { + + public: + + // constructor + ReadBDT( std::vector& theInputVars ) + : IClassifierReader(), + fClassName( "ReadBDT" ), + fNvars( 17 ), + fIsNormalised( false ) + { + // the training input variables + const char* inputVars[] = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; + + // sanity checks + if (theInputVars.size() <= 0) { + std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; + fStatusIsClean = false; + } + + if (theInputVars.size() != fNvars) { + std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " + << theInputVars.size() << " != " << fNvars << std::endl; + fStatusIsClean = false; + } + + // validate input variables + for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { + if (theInputVars[ivar] != inputVars[ivar]) { + std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl + << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; + fStatusIsClean = false; + } + } + + // initialize min and max vectors (for normalisation) + fVmin[0] = 0; + fVmax[0] = 0; + fVmin[1] = 0; + fVmax[1] = 0; + fVmin[2] = 0; + fVmax[2] = 0; + fVmin[3] = 0; + fVmax[3] = 0; + fVmin[4] = 0; + fVmax[4] = 0; + fVmin[5] = 0; + fVmax[5] = 0; + fVmin[6] = 0; + fVmax[6] = 0; + fVmin[7] = 0; + fVmax[7] = 0; + fVmin[8] = 0; + fVmax[8] = 0; + fVmin[9] = 0; + fVmax[9] = 0; + fVmin[10] = 0; + fVmax[10] = 0; + fVmin[11] = 0; + fVmax[11] = 0; + fVmin[12] = 0; + fVmax[12] = 0; + fVmin[13] = 0; + fVmax[13] = 0; + fVmin[14] = 0; + fVmax[14] = 0; + fVmin[15] = 0; + fVmax[15] = 0; + fVmin[16] = 0; + fVmax[16] = 0; + + // initialize input variable types + fType[0] = 'F'; + fType[1] = 'F'; + fType[2] = 'F'; + fType[3] = 'F'; + fType[4] = 'F'; + fType[5] = 'F'; + fType[6] = 'F'; + fType[7] = 'F'; + fType[8] = 'F'; + fType[9] = 'F'; + fType[10] = 'F'; + fType[11] = 'F'; + fType[12] = 'F'; + fType[13] = 'F'; + fType[14] = 'F'; + fType[15] = 'F'; + fType[16] = 'F'; + + // initialize constants + Initialize(); + + } + + // destructor + virtual ~ReadBDT() { + Clear(); // method-specific + } + + // the classifier response + // "inputValues" is a vector of input values in the same order as the + // variables given to the constructor + double GetMvaValue( const std::vector& inputValues ) const; + + private: + + // method-specific destructor + void Clear(); + + // common member variables + const char* fClassName; + + const size_t fNvars; + size_t GetNvar() const { return fNvars; } + char GetType( int ivar ) const { return fType[ivar]; } + + // normalisation of input variables + const bool fIsNormalised; + bool IsNormalised() const { return fIsNormalised; } + double fVmin[17]; + double fVmax[17]; + double NormVariable( double x, double xmin, double xmax ) const { + // normalise to output range: [-1, 1] + return 2*(x - xmin)/(xmax - xmin) - 1.0; + } + + // type of input variable: 'F' or 'I' + char fType[17]; + + // initialize internal variables + void Initialize(); + double GetMvaValue__( const std::vector& inputValues ) const; + + // private members (method specific) + std::vector fForest; // i.e. root nodes of decision trees + std::vector fBoostWeights; // the weights applied in the individual boosts +}; + +double ReadBDT::GetMvaValue__( const std::vector& inputValues ) const +{ + double myMVA = 0; + double norm = 0; + for (unsigned int itree=0; itreeGetNodeType() == 0) { //intermediate node + if (current->GoesRight(inputValues)) current=(BDTNode*)current->GetRight(); + else current=(BDTNode*)current->GetLeft(); + } + myMVA += fBoostWeights[itree] * current->GetPurity(); + norm += fBoostWeights[itree]; + } + return myMVA /= norm; +} + +void ReadBDT::Initialize() +{ + // itree = 0 + fBoostWeights.push_back(0.0745915405423782); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.837229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571407,-99) , +13, 0.0282819, 1, 0, 0.811165,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502298,-99) , +15, 0.0578796, 0, 0, 0.662456,-99) , +2, 13.5, 0, 0, 0.766499,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299986,-99) , +14, -4.60358, 0, 0, 0.397266,-99) , +14, -3.80449, 0, 0, 0.726273,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441219,-99) , +12, 0.1387, 1, 0, 0.624975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401465,-99) , +8, 0.890219, 1, 0, 0.55675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268104,-99) , +13, 0.00824681, 1, 0, 0.484653,-99) , +4, 1.29379, 1, 0, 0.665711,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585241,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174435,-99) , +4, 1.82271, 1, 0, 0.33328,-99) , +11, 1.5, 0, 0, 0.416579,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18022,-99) , +1, 14.5, 0, 0, 0.263886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0181621,-99) , +8, 0.948152, 0, 0, 0.155793,-99) , +5, 2.0905, 1, 0, 0.286943,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241036,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.061845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00376438,-99) , +12, 0.378727, 0, 0, 0.0114352,-99) , +5, 1.90765, 1, 0, 0.0271837,-99) , +4, 1.27318, 1, 0, 0.0585892,-99) , +13, 0.00242414, 1, 0, 0.184513,-99) , +5, 1.82475, 1, 0, 0.501173,-99) ); + // itree = 1 + fBoostWeights.push_back(0.0713472); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.851856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687096,-99) , +2, 13.5, 0, 0, 0.797321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596442,-99) , +13, 0.0201532, 1, 0, 0.773438,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280718,-99) , +14, -4.94994, 0, 0, 0.436523,-99) , +14, -3.5853, 0, 0, 0.728737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478465,-99) , +13, 0.000481802, 0, 0, 0.611506,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298394,-99) , +4, 1.53591, 1, 0, 0.409185,-99) , +12, 0.115253, 1, 0, 0.507757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116557,-99) , +7, 0.0823002, 1, 0, 0.466916,-99) , +4, 1.29893, 1, 0, 0.667002,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321125,-99) , +5, 2.05835, 1, 0, 0.511876,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201881,-99) , +5, 2.03693, 1, 0, 0.339743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.106433,-99) , +13, 0.00231824, 1, 0, 0.250461,-99) , +11, 1.5, 0, 0, 0.33921,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157193,-99) , +5, 2.12039, 1, 0, 0.243289,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0790497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00473175,-99) , +14, -2.81152, 1, 0, 0.0180981,-99) , +5, 1.98494, 1, 0, 0.0402129,-99) , +13, 0.000553379, 1, 0, 0.102724,-99) , +4, 1.71348, 1, 0, 0.205392,-99) , +5, 1.82092, 1, 0, 0.507087,-99) ); + // itree = 2 + fBoostWeights.push_back(0.067578); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.824922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693121,-99) , +2, 15.5, 0, 0, 0.768018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483362,-99) , +13, 0.0299384, 1, 0, 0.749555,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463583,-99) , +15, 0.10666, 0, 0, 0.573696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224143,-99) , +7, 0.0384498, 1, 0, 0.48444,-99) , +4, 1.38442, 1, 0, 0.708277,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361939,-99) , +16, 400.196, 1, 0, 0.415123,-99) , +14, -3.70907, 0, 0, 0.67116,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320774,-99) , +13, 0.00331019, 1, 0, 0.476906,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220387,-99) , +16, 551.656, 1, 0, 0.341649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0990692,-99) , +8, 0.658517, 0, 0, 0.239985,-99) , +5, 1.93022, 1, 0, 0.347878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158797,-99) , +9, -2.40205, 1, 0, 0.235914,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.139761,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0860764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0103796,-99) , +13, 0.00122891, 1, 0, 0.02054,-99) , +5, 1.9432, 1, 0, 0.0467044,-99) , +13, 0.000550244, 1, 0, 0.104982,-99) , +4, 1.69358, 1, 0, 0.210152,-99) , +5, 1.76647, 1, 0, 0.49681,-99) ); + // itree = 3 + fBoostWeights.push_back(0.0674446); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.828288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66095,-99) , +2, 12.5, 0, 0, 0.776465,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450492,-99) , +5, 1.18758, 1, 0, 0.580105,-99) , +13, 0.0180652, 1, 0, 0.75044,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3585,-99) , +14, -4.45948, 0, 0, 0.456466,-99) , +14, -3.53395, 0, 0, 0.707984,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359497,-99) , +12, 0.123655, 1, 0, 0.480836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131854,-99) , +13, 0.0095218, 1, 0, 0.405438,-99) , +4, 1.46491, 1, 0, 0.671503,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328817,-99) , +5, 2.05178, 1, 0, 0.479459,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180339,-99) , +13, 0.00225473, 1, 0, 0.324556,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277746,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0963173,-99) , +8, 0.962653, 0, 0, 0.145575,-99) , +5, 1.9401, 1, 0, 0.22329,-99) , +11, 1.5, 0, 0, 0.307574,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25113,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0883093,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0337582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00270881,-99) , +6, 0.99905, 0, 0, 0.00752363,-99) , +14, -2.84499, 1, 0, 0.0241964,-99) , +13, 0.000316055, 1, 0, 0.0805211,-99) , +4, 1.8492, 1, 0, 0.212074,-99) , +5, 1.7859, 1, 0, 0.50878,-99) ); + // itree = 4 + fBoostWeights.push_back(0.0636568); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.852124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651265,-99) , +14, -1.74306, 1, 0, 0.815329,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.779711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615999,-99) , +16, 398.028, 1, 0, 0.676192,-99) , +2, 14.5, 0, 0, 0.769031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419445,-99) , +14, -3.71069, 0, 0, 0.728749,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.729654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501966,-99) , +4, 1.49487, 1, 0, 0.665886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380839,-99) , +13, 0.000155363, 0, 0, 0.612737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370971,-99) , +3, 0.981811, 0, 0, 0.472376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242888,-99) , +7, 0.0314999, 1, 0, 0.4137,-99) , +12, 0.125645, 1, 0, 0.515502,-99) , +4, 1.1334, 1, 0, 0.652245,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38374,-99) , +16, 1102.23, 1, 0, 0.47084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264148,-99) , +1, 9.5, 0, 0, 0.420295,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0234134,-99) , +8, 0.959782, 0, 0, 0.200887,-99) , +5, 2.1528, 1, 0, 0.337063,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363013,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16961,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0187052,-99) , +12, 0.383918, 0, 0, 0.0320706,-99) , +5, 1.90289, 1, 0, 0.0518664,-99) , +4, 1.26191, 1, 0, 0.100175,-99) , +14, -2.81407, 1, 0, 0.218577,-99) , +5, 1.8186, 1, 0, 0.50541,-99) ); + // itree = 5 + fBoostWeights.push_back(0.0621644); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.778573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571498,-99) , +15, 0.0581551, 0, 0, 0.75677,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574686,-99) , +13, 0.0232915, 1, 0, 0.737961,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412408,-99) , +12, 0.128901, 1, 0, 0.537537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255065,-99) , +13, 0.00955582, 1, 0, 0.458592,-99) , +4, 1.38781, 1, 0, 0.696037,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553407,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361084,-99) , +16, 986.032, 1, 0, 0.457315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235102,-99) , +14, -5.16738, 0, 0, 0.404703,-99) , +13, 0.000192309, 0, 0, 0.659668,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558592,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200432,-99) , +4, 1.43467, 1, 0, 0.354368,-99) , +12, 0.113902, 1, 0, 0.446302,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0721936,-99) , +8, 0.745382, 0, 0, 0.224211,-99) , +5, 2.00618, 1, 0, 0.353468,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151678,-99) , +5, 2.0314, 1, 0, 0.23991,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0744784,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0644854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00287411,-99) , +14, -2.68917, 1, 0, 0.0129103,-99) , +5, 1.98335, 1, 0, 0.0296566,-99) , +13, 0.000995655, 1, 0, 0.108384,-99) , +4, 1.73888, 1, 0, 0.229423,-99) , +5, 1.76048, 1, 0, 0.499793,-99) ); + // itree = 6 + fBoostWeights.push_back(0.0604747); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.84046,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703776,-99) , +2, 16.5, 0, 0, 0.778568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59865,-99) , +13, 0.0191261, 1, 0, 0.753168,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.694663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451199,-99) , +15, 0.0925199, 0, 0, 0.633182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35333,-99) , +13, 0.0103947, 1, 0, 0.564905,-99) , +4, 1.19158, 1, 0, 0.701264,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334506,-99) , +3, 0.988495, 1, 0, 0.412785,-99) , +13, 0.000288414, 0, 0, 0.662161,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607463,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348775,-99) , +6, 0.472545, 1, 0, 0.426806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131929,-99) , +13, 0.00314569, 1, 0, 0.309282,-99) , +11, 1.5, 0, 0, 0.404533,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432173,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131003,-99) , +8, 0.994663, 0, 0, 0.187449,-99) , +16, 418.361, 1, 0, 0.289547,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181015,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0133387,-99) , +12, 0.0685713, 1, 0, 0.0316011,-99) , +4, 1.543, 1, 0, 0.0649864,-99) , +14, -3.05058, 1, 0, 0.162276,-99) , +5, 1.93572, 1, 0, 0.246632,-99) , +5, 1.73723, 1, 0, 0.501725,-99) ); + // itree = 7 + fBoostWeights.push_back(0.0547821); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.793674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658519,-99) , +2, 16.5, 0, 0, 0.726672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502065,-99) , +13, 0.0236086, 1, 0, 0.704462,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476607,-99) , +7, 0.0164727, 0, 0, 0.561278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173045,-99) , +13, 0.00853202, 1, 0, 0.451968,-99) , +4, 1.46048, 1, 0, 0.665094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522888,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352031,-99) , +6, 0.601232, 1, 0, 0.457499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288275,-99) , +14, -4.61612, 0, 0, 0.391534,-99) , +14, -3.64191, 0, 0, 0.626992,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587168,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234513,-99) , +12, 0.121676, 1, 0, 0.338832,-99) , +16, 237.638, 1, 0, 0.42616,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414394,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0513555,-99) , +11, 1.5, 0, 0, 0.113808,-99) , +14, -4.18717, 1, 0, 0.225951,-99) , +5, 2.05278, 1, 0, 0.316745,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313153,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0972913,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0164453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +6, 0.529822, 1, 0, 0.00272663,-99) , +4, 1.822, 1, 0, 0.0255536,-99) , +4, 1.5669, 1, 0, 0.105923,-99) , +13, 0.00244616, 1, 0, 0.227635,-99) , +5, 1.82985, 1, 0, 0.496005,-99) ); + // itree = 8 + fBoostWeights.push_back(0.0562181); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.778165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607209,-99) , +15, 0.0584507, 0, 0, 0.762267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567886,-99) , +8, -0.944135, 0, 0, 0.742087,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31076,-99) , +15, 0.293412, 1, 0, 0.405064,-99) , +14, -3.71083, 0, 0, 0.70336,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671562,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325655,-99) , +4, 1.65522, 1, 0, 0.484541,-99) , +11, 1.5, 0, 0, 0.543223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232486,-99) , +13, 0.0169047, 1, 0, 0.505512,-99) , +4, 1.18572, 1, 0, 0.636691,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565107,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250914,-99) , +12, 0.117967, 1, 0, 0.329933,-99) , +11, 1.5, 0, 0, 0.410174,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0385829,-99) , +14, -3.8121, 1, 0, 0.178995,-99) , +5, 2.1176, 1, 0, 0.301759,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258114,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135112,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0700079,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00330301,-99) , +12, 0.095052, 1, 0, 0.013454,-99) , +6, 0.172507, 1, 0, 0.0356399,-99) , +5, 1.94277, 1, 0, 0.0744067,-99) , +14, -2.60356, 1, 0, 0.206534,-99) , +5, 1.86022, 1, 0, 0.507786,-99) ); + // itree = 9 + fBoostWeights.push_back(0.0542605); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.779102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614233,-99) , +2, 12.5, 0, 0, 0.722991,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414777,-99) , +5, 1.24996, 1, 0, 0.527603,-99) , +13, 0.019193, 1, 0, 0.697948,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376442,-99) , +16, 1508.51, 1, 0, 0.517422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0920599,-99) , +7, 0.0561678, 1, 0, 0.437998,-99) , +4, 1.46046, 1, 0, 0.65974,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403187,-99) , +15, 0.494658, 1, 0, 0.486479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309182,-99) , +1, 13.5, 0, 0, 0.402644,-99) , +14, -3.60321, 0, 0, 0.62199,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366221,-99) , +3, 0.985945, 1, 0, 0.485754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207133,-99) , +5, 2.06642, 1, 0, 0.38439,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248754,-99) , +12, 0.143087, 1, 0, 0.321527,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175257,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0739211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0135194,-99) , +13, 0.00122442, 1, 0, 0.0271739,-99) , +5, 1.96447, 1, 0, 0.0609055,-99) , +8, 0.94643, 0, 0, 0.139977,-99) , +4, 1.56742, 1, 0, 0.223583,-99) , +5, 1.82091, 1, 0, 0.493012,-99) ); + // itree = 10 + fBoostWeights.push_back(0.0525683); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.792819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635658,-99) , +2, 14.5, 0, 0, 0.728898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426242,-99) , +13, 0.0235413, 1, 0, 0.699852,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258228,-99) , +12, 0.0799388, 0, 0, 0.394791,-99) , +14, -4.12026, 0, 0, 0.449544,-99) , +13, 0.000293654, 0, 0, 0.659725,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627147,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342539,-99) , +12, 0.11317, 1, 0, 0.417776,-99) , +16, 237.803, 1, 0, 0.483031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12123,-99) , +7, 0.0856495, 1, 0, 0.444065,-99) , +4, 1.40072, 1, 0, 0.61657,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224654,-99) , +4, 1.47048, 1, 0, 0.298736,-99) , +11, 1.5, 0, 0, 0.388443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151815,-99) , +5, 2.24529, 1, 0, 0.320341,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238071,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124648,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0198965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +16, 91.4346, 1, 0, 0.00336316,-99) , +10, 261.135, 1, 0, 0.0390878,-99) , +4, 1.57971, 1, 0, 0.0964805,-99) , +14, -2.81166, 1, 0, 0.212077,-99) , +5, 1.86241, 1, 0, 0.498266,-99) ); + // itree = 11 + fBoostWeights.push_back(0.0517742); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.789717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644527,-99) , +2, 14.5, 0, 0, 0.730376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554645,-99) , +13, 0.0202634, 1, 0, 0.708369,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480265,-99) , +12, 0.129271, 1, 0, 0.563728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231251,-99) , +13, 0.00957266, 1, 0, 0.484722,-99) , +4, 1.38474, 1, 0, 0.672139,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317061,-99) , +14, -4.3455, 0, 0, 0.390797,-99) , +14, -3.71348, 0, 0, 0.637455,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364601,-99) , +14, -4.13486, 0, 0, 0.510785,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227173,-99) , +14, -4.0632, 1, 0, 0.319456,-99) , +5, 1.99708, 1, 0, 0.438406,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354411,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0763085,-99) , +5, 1.90155, 1, 0, 0.206248,-99) , +13, 0.00316451, 1, 0, 0.362943,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168655,-99) , +9, -2.95016, 1, 0, 0.252709,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0830362,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0237083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +10, 9749.94, 0, 0, 0.00417004,-99) , +11, 1.5, 0, 0, 0.0238709,-99) , +13, 0.0010789, 1, 0, 0.115925,-99) , +4, 1.81507, 1, 0, 0.262061,-99) , +5, 1.75514, 1, 0, 0.497293,-99) ); + // itree = 12 + fBoostWeights.push_back(0.0533803); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.792717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60064,-99) , +14, -1.74306, 1, 0, 0.758582,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52413,-99) , +12, 0.217876, 1, 0, 0.617448,-99) , +0, 15.5, 0, 0, 0.718087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388691,-99) , +14, -3.97529, 0, 0, 0.688032,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656888,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366351,-99) , +14, -3.65628, 0, 0, 0.494535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214732,-99) , +13, 0.00824527, 1, 0, 0.424733,-99) , +11, 1.5, 0, 0, 0.494044,-99) , +4, 1.18791, 1, 0, 0.625237,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368715,-99) , +10, 3810.77, 1, 0, 0.509764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271986,-99) , +6, 0.766152, 1, 0, 0.453339,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140734,-99) , +15, 0.0922561, 0, 0, 0.331847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0713617,-99) , +14, -3.61673, 1, 0, 0.213087,-99) , +5, 2.06697, 1, 0, 0.334732,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317195,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136661,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0367275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +12, 0.149446, 1, 0, 0.0113314,-99) , +5, 1.92598, 1, 0, 0.0351565,-99) , +4, 1.37221, 1, 0, 0.0941445,-99) , +14, -2.6219, 1, 0, 0.235998,-99) , +5, 1.81839, 1, 0, 0.499111,-99) ); + // itree = 13 + fBoostWeights.push_back(0.0489255); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.784991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678869,-99) , +2, 13.5, 0, 0, 0.750531,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514836,-99) , +3, 0.989787, 1, 0, 0.619382,-99) , +8, -0.847365, 0, 0, 0.724828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400053,-99) , +16, 3957.88, 1, 0, 0.4837,-99) , +13, 0.000352388, 0, 0, 0.688583,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490526,-99) , +8, 0.828717, 1, 0, 0.582259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375081,-99) , +12, 0.187617, 1, 0, 0.530011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218041,-99) , +13, 0.0162256, 1, 0, 0.487459,-99) , +4, 1.29854, 1, 0, 0.647471,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441124,-99) , +16, 425.961, 1, 0, 0.565735,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281315,-99) , +13, 0.00491856, 1, 0, 0.383795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177998,-99) , +5, 2.03865, 1, 0, 0.316259,-99) , +11, 1.5, 0, 0, 0.404406,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1616,-99) , +5, 2.0881, 1, 0, 0.278845,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133176,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0276214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.95909, 1, 0, 0.00505912,-99) , +4, 1.90405, 1, 0, 0.0563784,-99) , +14, -2.81167, 1, 0, 0.159769,-99) , +4, 1.69966, 1, 0, 0.278039,-99) , +5, 1.73796, 1, 0, 0.50794,-99) ); + // itree = 14 + fBoostWeights.push_back(0.0474942); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.735806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510946,-99) , +15, 0.0581938, 0, 0, 0.71117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502836,-99) , +13, 0.0246864, 1, 0, 0.690279,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585249,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439586,-99) , +3, 0.985254, 1, 0, 0.515351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284893,-99) , +12, 0.0400446, 0, 0, 0.466084,-99) , +14, -3.41578, 0, 0, 0.651824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383949,-99) , +7, 0.0164757, 0, 0, 0.488303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16991,-99) , +13, 0.00953595, 1, 0, 0.422222,-99) , +4, 1.46596, 1, 0, 0.619783,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333137,-99) , +5, 2.15003, 1, 0, 0.501821,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227978,-99) , +5, 2.06302, 1, 0, 0.304703,-99) , +11, 1.5, 0, 0, 0.376262,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196975,-99) , +13, 0.00887811, 1, 0, 0.38374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107607,-99) , +5, 2.05672, 1, 0, 0.282747,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0987776,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0606437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00400397,-99) , +13, 0.00196834, 1, 0, 0.0128386,-99) , +4, 1.85357, 1, 0, 0.0278238,-99) , +4, 1.76866, 1, 0, 0.1448,-99) , +13, 0.000847488, 1, 0, 0.251443,-99) , +5, 1.80994, 1, 0, 0.49834,-99) ); + // itree = 15 + fBoostWeights.push_back(0.0447176); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.775441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586435,-99) , +7, 0.0125044, 0, 0, 0.749719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568308,-99) , +13, 0.0194254, 1, 0, 0.724704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453506,-99) , +14, -3.87289, 0, 0, 0.694577,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435113,-99) , +8, 0.93526, 1, 0, 0.576017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221658,-99) , +13, 0.00397381, 1, 0, 0.407903,-99) , +4, 1.54905, 1, 0, 0.534817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233663,-99) , +13, 0.0213252, 1, 0, 0.506922,-99) , +4, 0.97329, 1, 0, 0.601998,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.190344,-99) , +7, 0.0150363, 0, 0, 0.28123,-99) , +11, 1.5, 0, 0, 0.357302,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103204,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0424398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +11, 0.5, 1, 0, 0.0121628,-99) , +4, 1.69628, 1, 0, 0.0386916,-99) , +5, 1.97621, 1, 0, 0.0976189,-99) , +13, 0.00099258, 1, 0, 0.222061,-99) , +5, 1.88954, 1, 0, 0.500622,-99) ); + // itree = 16 + fBoostWeights.push_back(0.0448515); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.74819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555324,-99) , +4, 1.44092, 1, 0, 0.728771,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437639,-99) , +7, 0.0109833, 0, 0, 0.547618,-99) , +15, 0.0886172, 0, 0, 0.688357,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283344,-99) , +5, 1.38983, 1, 0, 0.478729,-99) , +13, 0.0202622, 1, 0, 0.659975,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542041,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365572,-99) , +4, 1.01135, 1, 0, 0.410185,-99) , +16, 1091.24, 1, 0, 0.473401,-99) , +14, -3.43842, 0, 0, 0.628279,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598251,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287653,-99) , +8, 0.600997, 0, 0, 0.380741,-99) , +11, 1.5, 0, 0, 0.456603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225545,-99) , +5, 2.09725, 1, 0, 0.400641,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496164,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282624,-99) , +4, 1.93151, 1, 0, 0.384563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156202,-99) , +7, 0.0134616, 0, 0, 0.310668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136376,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0384105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00524027,-99) , +4, 1.92636, 1, 0, 0.013881,-99) , +4, 1.81704, 1, 0, 0.0434521,-99) , +14, -3.05756, 1, 0, 0.154387,-99) , +4, 1.69959, 1, 0, 0.27888,-99) , +5, 1.74172, 1, 0, 0.497239,-99) ); + // itree = 17 + fBoostWeights.push_back(0.0450658); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.757032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521123,-99) , +12, 0.0286175, 0, 0, 0.730205,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51374,-99) , +4, 0.98817, 1, 0, 0.600788,-99) , +12, 0.128737, 1, 0, 0.67103,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166714,-99) , +14, -2.02273, 1, 0, 0.405836,-99) , +4, 1.51717, 1, 0, 0.642198,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234922,-99) , +12, 0.0695726, 0, 0, 0.349714,-99) , +14, -4.12141, 0, 0, 0.617261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521365,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226152,-99) , +12, 0.0471144, 0, 0, 0.374657,-99) , +11, 1.5, 0, 0, 0.425725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184051,-99) , +5, 2.3089, 1, 0, 0.381821,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12113,-99) , +6, 0.493915, 1, 0, 0.309856,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0965546,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.023948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +6, 0.537346, 1, 0, 0.00445717,-99) , +4, 1.89695, 1, 0, 0.0453451,-99) , +5, 1.99846, 1, 0, 0.14185,-99) , +14, -2.95494, 1, 0, 0.260373,-99) , +5, 1.82475, 1, 0, 0.505164,-99) ); + // itree = 18 + fBoostWeights.push_back(0.0419738); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.768601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678756,-99) , +14, -2.77773, 0, 0, 0.745672,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516236,-99) , +2, 12.5, 0, 0, 0.618127,-99) , +11, 1.5, 0, 0, 0.662576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38934,-99) , +14, -4.12975, 0, 0, 0.638451,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349883,-99) , +14, -3.89675, 0, 0, 0.533707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310237,-99) , +4, 1.72247, 1, 0, 0.507768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155508,-99) , +13, 0.0162298, 1, 0, 0.466169,-99) , +4, 1.31691, 1, 0, 0.591902,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220829,-99) , +12, 0.130725, 1, 0, 0.333105,-99) , +11, 1.5, 0, 0, 0.406052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158473,-99) , +5, 2.21941, 1, 0, 0.332853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305995,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127755,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0500035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00492463,-99) , +4, 1.75336, 1, 0, 0.017189,-99) , +11, 1.5, 0, 0, 0.0452522,-99) , +4, 1.22889, 1, 0, 0.0837135,-99) , +14, -2.76283, 1, 0, 0.224039,-99) , +5, 1.86715, 1, 0, 0.490484,-99) ); + // itree = 19 + fBoostWeights.push_back(0.0432111); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.763188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616825,-99) , +2, 12.5, 0, 0, 0.717423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51342,-99) , +13, 0.0219516, 1, 0, 0.692764,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381873,-99) , +3, 0.990015, 1, 0, 0.514311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298975,-99) , +14, -4.81378, 0, 0, 0.463408,-99) , +13, 0.000531406, 0, 0, 0.647878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479457,-99) , +2, 13.5, 0, 0, 0.563287,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334591,-99) , +4, 1.51238, 1, 0, 0.415777,-99) , +12, 0.126915, 1, 0, 0.490674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142039,-99) , +7, 0.10555, 1, 0, 0.466763,-99) , +4, 1.22794, 1, 0, 0.589152,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208615,-99) , +7, 0.0114633, 0, 0, 0.34684,-99) , +11, 1.5, 0, 0, 0.433536,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0358686,-99) , +8, 0.950335, 0, 0, 0.182831,-99) , +5, 2.15804, 1, 0, 0.335808,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111177,-99) , +5, 2.03841, 1, 0, 0.226988,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0663975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +9, 3.01294, 0, 0, 0.0197937,-99) , +4, 1.81131, 1, 0, 0.111971,-99) , +14, -2.68414, 1, 0, 0.241248,-99) , +5, 1.87236, 1, 0, 0.492338,-99) ); + // itree = 20 + fBoostWeights.push_back(0.0393636); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.760021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573461,-99) , +15, 0.0798847, 0, 0, 0.730647,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504178,-99) , +12, 0.127005, 1, 0, 0.585052,-99) , +6, 0.449621, 1, 0, 0.65078,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320529,-99) , +6, 0.499478, 0, 0, 0.425783,-99) , +14, -3.94225, 0, 0, 0.628445,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334959,-99) , +14, -4.67948, 0, 0, 0.527331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292129,-99) , +5, 2.13322, 1, 0, 0.494728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.085274,-99) , +5, 2.03897, 1, 0, 0.281987,-99) , +13, 0.00474838, 1, 0, 0.441393,-99) , +5, 1.65206, 1, 0, 0.56961,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263588,-99) , +5, 2.25793, 1, 0, 0.416628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124704,-99) , +7, 0.0113563, 0, 0, 0.349832,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0419695,-99) , +13, 0.0061342, 1, 0, 0.151095,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0281265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00772316,-99) , +4, 1.92597, 1, 0, 0.0122328,-99) , +5, 2.08107, 1, 0, 0.0802484,-99) , +13, 0.000777656, 1, 0, 0.187237,-99) , +4, 1.69669, 1, 0, 0.496151,-99) ); + // itree = 21 + fBoostWeights.push_back(0.0437412); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.791601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648974,-99) , +6, 0.298691, 1, 0, 0.698897,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261817,-99) , +5, 1.30366, 1, 0, 0.474116,-99) , +13, 0.0202542, 1, 0, 0.670271,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367237,-99) , +16, 421.661, 1, 0, 0.452827,-99) , +14, -3.41603, 0, 0, 0.636733,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60965,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349125,-99) , +12, 0.125936, 1, 0, 0.439597,-99) , +11, 1.5, 0, 0, 0.497054,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151198,-99) , +13, 0.00016586, 1, 0, 0.294779,-99) , +5, 2.01118, 1, 0, 0.443601,-99) , +5, 1.6519, 1, 0, 0.577886,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407995,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140447,-99) , +11, 1.5, 0, 0, 0.212917,-99) , +5, 2.00916, 1, 0, 0.279155,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249536,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110362,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0686143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00463791,-99) , +10, -4047.69, 1, 0, 0.0152002,-99) , +12, 0.0738714, 1, 0, 0.0284617,-99) , +5, 1.85212, 1, 0, 0.0743943,-99) , +13, 0.00102355, 1, 0, 0.162423,-99) , +4, 1.67649, 1, 0, 0.497939,-99) ); + // itree = 22 + fBoostWeights.push_back(0.0385536); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.790402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697866,-99) , +6, 0.286854, 1, 0, 0.736892,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406972,-99) , +7, 0.00999516, 0, 0, 0.608519,-99) , +11, 1.5, 0, 0, 0.651481,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489566,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329313,-99) , +7, 0.0171949, 0, 0, 0.423797,-99) , +14, -3.8252, 0, 0, 0.622016,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580377,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263904,-99) , +0, 19.5, 1, 0, 0.398759,-99) , +12, 0.0701168, 1, 0, 0.459651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0789529,-99) , +13, 0.0162196, 1, 0, 0.405572,-99) , +4, 1.52563, 1, 0, 0.584329,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219691,-99) , +2, 11.5, 0, 0, 0.433779,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0797755,-99) , +5, 2.15673, 1, 0, 0.247468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16387,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0790889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +12, 0.0964313, 1, 0, 0.0162354,-99) , +14, -3.21818, 1, 0, 0.0415593,-99) , +4, 1.81154, 1, 0, 0.130156,-99) , +14, -3.79648, 1, 0, 0.22083,-99) , +5, 1.98268, 1, 0, 0.510836,-99) ); + // itree = 23 + fBoostWeights.push_back(0.0374297); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.781359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600851,-99) , +0, 14.5, 0, 0, 0.73831,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55411,-99) , +12, 0.101324, 1, 0, 0.615472,-99) , +6, 0.403412, 1, 0, 0.66341,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334794,-99) , +12, 0.0767493, 0, 0, 0.431797,-99) , +14, -3.59155, 0, 0, 0.634639,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624407,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475188,-99) , +16, 688.775, 1, 0, 0.57264,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385672,-99) , +12, 0.0749224, 1, 0, 0.441263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232982,-99) , +5, 2.04348, 1, 0, 0.403134,-99) , +11, 1.5, 0, 0, 0.459477,-99) , +5, 1.58153, 1, 0, 0.572179,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409877,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144174,-99) , +8, 0.994236, 0, 0, 0.226874,-99) , +5, 2.00078, 1, 0, 0.300039,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284919,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0878584,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0829818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +8, 0.484325, 0, 0, 0.0183447,-99) , +16, 102.736, 1, 0, 0.0320354,-99) , +5, 1.8518, 1, 0, 0.0970012,-99) , +14, -2.67242, 1, 0, 0.2063,-99) , +4, 1.63735, 1, 0, 0.490848,-99) ); + // itree = 24 + fBoostWeights.push_back(0.0386488); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406166,-99) , +7, 0.00922191, 0, 0, 0.677814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412481,-99) , +13, 0.0344147, 1, 0, 0.660937,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460331,-99) , +8, 0.977424, 1, 0, 0.511622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289242,-99) , +7, 0.0135833, 0, 0, 0.466862,-99) , +8, 0.918761, 1, 0, 0.626318,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1962,-99) , +13, 0.00491602, 1, 0, 0.391316,-99) , +4, 1.52803, 1, 0, 0.600235,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550845,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252146,-99) , +5, 2.18928, 1, 0, 0.366033,-99) , +11, 1.5, 0, 0, 0.43551,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232431,-99) , +4, 1.94722, 1, 0, 0.385195,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218863,-99) , +16, 1084.58, 1, 0, 0.339425,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152285,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.050104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00854418,-99) , +4, 1.98886, 1, 0, 0.0253511,-99) , +5, 2.01182, 1, 0, 0.06548,-99) , +4, 1.56132, 1, 0, 0.15575,-99) , +14, -3.03701, 1, 0, 0.265974,-99) , +5, 1.83191, 1, 0, 0.500292,-99) ); + // itree = 25 + fBoostWeights.push_back(0.0375519); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.730422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53301,-99) , +13, 0.0257545, 1, 0, 0.705956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558051,-99) , +2, 10.5, 0, 0, 0.680487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397585,-99) , +0, 19.5, 0, 0, 0.495545,-99) , +8, 0.935231, 1, 0, 0.65179,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47626,-99) , +12, 0.13013, 1, 0, 0.559056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325559,-99) , +14, -4.10292, 0, 0, 0.536282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176719,-99) , +7, 0.094932, 1, 0, 0.511898,-99) , +4, 1.12659, 1, 0, 0.600885,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618445,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272132,-99) , +5, 2.06361, 1, 0, 0.419371,-99) , +2, 17.5, 0, 0, 0.487675,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326545,-99) , +8, 0.92893, 1, 0, 0.390638,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112642,-99) , +8, 0.993819, 0, 0, 0.192471,-99) , +5, 1.98988, 1, 0, 0.274041,-99) , +16, 487.18, 1, 0, 0.361272,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398413,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241566,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00607733,-99) , +16, 28.2935, 1, 0, 0.025305,-99) , +5, 1.95691, 1, 0, 0.0919654,-99) , +4, 1.22958, 1, 0, 0.149843,-99) , +13, 0.0034274, 1, 0, 0.289016,-99) , +5, 1.79038, 1, 0, 0.498775,-99) ); + // itree = 26 + fBoostWeights.push_back(0.0353799); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482088,-99) , +12, 0.0286101, 0, 0, 0.67636,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417137,-99) , +5, 1.50919, 1, 0, 0.480367,-99) , +15, 0.061829, 0, 0, 0.650602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328242,-99) , +5, 1.33, 1, 0, 0.478532,-99) , +13, 0.0160726, 1, 0, 0.622392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33633,-99) , +10, 2930.5, 1, 0, 0.42166,-99) , +14, -3.93593, 0, 0, 0.600561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610063,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326935,-99) , +10, 998.344, 1, 0, 0.388394,-99) , +11, 1.5, 0, 0, 0.46828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0957016,-99) , +13, 0.000194075, 1, 0, 0.234812,-99) , +5, 2.12469, 1, 0, 0.390323,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326427,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133789,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0127384,-99) , +4, 1.7386, 1, 0, 0.0635217,-99) , +11, 1.5, 0, 0, 0.138788,-99) , +13, 0.00316845, 1, 0, 0.30802,-99) , +5, 1.75962, 1, 0, 0.497501,-99) ); + // itree = 27 + fBoostWeights.push_back(0.0376825); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566923,-99) , +13, 0.0216571, 1, 0, 0.699949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495708,-99) , +2, 9.5, 0, 0, 0.678087,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513799,-99) , +12, 0.172903, 1, 0, 0.579432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321232,-99) , +7, 0.0395643, 1, 0, 0.520369,-99) , +4, 1.29796, 1, 0, 0.648649,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574331,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319841,-99) , +3, 0.988278, 1, 0, 0.412742,-99) , +16, 1153.74, 1, 0, 0.496377,-99) , +14, -3.30127, 0, 0, 0.619067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400399,-99) , +12, 0.135895, 1, 0, 0.521897,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342174,-99) , +12, 0.278828, 0, 0, 0.379535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126099,-99) , +14, -2.27221, 1, 0, 0.315453,-99) , +16, 486.388, 1, 0, 0.397045,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32694,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110178,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0259334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0085437,-99) , +4, 1.92635, 1, 0, 0.0129815,-99) , +14, -2.81171, 1, 0, 0.0352528,-99) , +14, -3.32455, 1, 0, 0.140943,-99) , +4, 1.82205, 1, 0, 0.313978,-99) , +5, 1.6928, 1, 0, 0.496441,-99) ); + // itree = 28 + fBoostWeights.push_back(0.0361976); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.694619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49533,-99) , +7, 0.105708, 1, 0, 0.677552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431791,-99) , +7, 0.00984178, 0, 0, 0.661861,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349629,-99) , +14, -4.87864, 0, 0, 0.442223,-99) , +14, -3.76504, 0, 0, 0.637087,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587797,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327446,-99) , +12, 0.135443, 1, 0, 0.431159,-99) , +11, 1.5, 0, 0, 0.484525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195037,-99) , +5, 2.24212, 1, 0, 0.460601,-99) , +5, 1.67719, 1, 0, 0.59514,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526634,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250302,-99) , +5, 1.83306, 1, 0, 0.345921,-99) , +16, 1089.99, 1, 0, 0.431332,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0349515,-99) , +8, 0.945826, 0, 0, 0.207787,-99) , +5, 2.09048, 1, 0, 0.347661,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101942,-99) , +8, -0.385725, 0, 0, 0.225263,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0979539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 1.97476, 1, 0, 0.0210789,-99) , +4, 1.81716, 1, 0, 0.122775,-99) , +13, 0.0033732, 1, 0, 0.264585,-99) , +4, 1.52401, 1, 0, 0.506055,-99) ); + // itree = 29 + fBoostWeights.push_back(0.0372032); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.821784,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68285,-99) , +6, 0.209186, 1, 0, 0.722358,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430775,-99) , +15, 0.0468327, 0, 0, 0.578405,-99) , +2, 13.5, 0, 0, 0.666399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231911,-99) , +4, 1.08822, 1, 0, 0.477838,-99) , +13, 0.0180583, 1, 0, 0.639142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381335,-99) , +9, 0.335425, 0, 0, 0.448156,-99) , +14, -3.9141, 0, 0, 0.618247,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534638,-99) , +16, 379.15, 1, 0, 0.596759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370531,-99) , +5, 2.04575, 1, 0, 0.542726,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319895,-99) , +12, 0.113868, 1, 0, 0.392671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151619,-99) , +13, 0.00569886, 1, 0, 0.333615,-99) , +11, 1.5, 0, 0, 0.402428,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222943,-99) , +5, 2.085, 1, 0, 0.315705,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.080749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +11, 1.5, 0, 0, 0.0199379,-99) , +13, 0.00128532, 1, 0, 0.167135,-99) , +4, 1.82984, 1, 0, 0.33001,-99) , +5, 1.67685, 1, 0, 0.499255,-99) ); + // itree = 30 + fBoostWeights.push_back(0.034702); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.726625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554276,-99) , +5, 1.60302, 1, 0, 0.697528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348591,-99) , +7, 0.00866978, 0, 0, 0.561585,-99) , +2, 16.5, 0, 0, 0.625451,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195668,-99) , +5, 1.42151, 1, 0, 0.39452,-99) , +13, 0.025244, 1, 0, 0.60576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343864,-99) , +14, -4.33732, 0, 0, 0.586791,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530934,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258367,-99) , +0, 17.5, 1, 0, 0.370392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17587,-99) , +8, 0.40999, 0, 0, 0.302881,-99) , +11, 1.5, 0, 0, 0.384845,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159605,-99) , +5, 2.16193, 1, 0, 0.277406,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256798,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0147483,-99) , +5, 1.92336, 1, 0, 0.0359668,-99) , +12, 0.0792227, 1, 0, 0.0703616,-99) , +13, 0.00143261, 1, 0, 0.176264,-99) , +4, 1.69066, 1, 0, 0.274917,-99) , +5, 1.80936, 1, 0, 0.489028,-99) ); + // itree = 31 + fBoostWeights.push_back(0.0347783); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.776022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638568,-99) , +6, 0.297455, 1, 0, 0.720737,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535671,-99) , +8, -0.477019, 0, 0, 0.609199,-99) , +1, 14.5, 0, 0, 0.674592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478141,-99) , +14, -3.9723, 0, 0, 0.65274,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32901,-99) , +15, 0.0473968, 0, 0, 0.580512,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306334,-99) , +8, 0.990511, 1, 0, 0.394689,-99) , +8, 0.930135, 1, 0, 0.539166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288309,-99) , +14, -1.79844, 1, 0, 0.510283,-99) , +4, 0.986027, 1, 0, 0.581433,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399482,-99) , +12, 0.0573251, 0, 0, 0.50598,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198381,-99) , +5, 2.09949, 1, 0, 0.293827,-99) , +15, 0.158963, 0, 0, 0.40914,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102727,-99) , +5, 2.12462, 1, 0, 0.272545,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108291,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0469572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +10, 10337.8, 0, 0, 0.00770754,-99) , +11, 1.5, 0, 0, 0.0342467,-99) , +4, 1.76839, 1, 0, 0.138535,-99) , +13, 0.000595985, 1, 0, 0.260783,-99) , +5, 1.90444, 1, 0, 0.503686,-99) ); + // itree = 32 + fBoostWeights.push_back(0.0332765); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.770082,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677347,-99) , +8, -0.708534, 0, 0, 0.74216,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535023,-99) , +12, 0.146918, 1, 0, 0.6158,-99) , +11, 1.5, 0, 0, 0.658557,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379731,-99) , +3, 0.996711, 1, 0, 0.525743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314948,-99) , +12, 0.0312161, 0, 0, 0.49178,-99) , +13, 0.0008071, 0, 0, 0.617537,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482573,-99) , +12, 0.0778186, 1, 0, 0.535625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349804,-99) , +7, 0.0112081, 0, 0, 0.497714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205417,-99) , +13, 0.00846683, 1, 0, 0.438816,-99) , +4, 1.38131, 1, 0, 0.575695,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391472,-99) , +16, 541.141, 1, 0, 0.48032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179283,-99) , +1, 9.5, 0, 0, 0.419631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207846,-99) , +5, 2.23566, 1, 0, 0.348316,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149505,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00657071,-99) , +11, 1.5, 0, 0, 0.0473447,-99) , +4, 1.68392, 1, 0, 0.138531,-99) , +8, 0.746796, 0, 0, 0.249435,-99) , +5, 1.93002, 1, 0, 0.505592,-99) ); + // itree = 33 + fBoostWeights.push_back(0.0331268); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453746,-99) , +13, 0.0235143, 1, 0, 0.670428,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367911,-99) , +15, 0.774741, 1, 0, 0.498803,-99) , +13, 0.000769694, 0, 0, 0.636072,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567498,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356904,-99) , +12, 0.132285, 1, 0, 0.423415,-99) , +16, 530.952, 1, 0, 0.475121,-99) , +2, 10.5, 0, 0, 0.605203,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430344,-99) , +15, 0.429841, 1, 0, 0.541237,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492873,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13275,-99) , +3, 0.996141, 1, 0, 0.312391,-99) , +11, 1.5, 0, 0, 0.368556,-99) , +12, 0.113902, 1, 0, 0.441597,-99) , +5, 1.66901, 1, 0, 0.557176,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19568,-99) , +5, 2.09046, 1, 0, 0.296149,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183577,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0871656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +9, 1.1859, 0, 0, 0.0342509,-99) , +5, 1.84495, 1, 0, 0.0620903,-99) , +13, 0.00212254, 1, 0, 0.191544,-99) , +4, 1.69232, 1, 0, 0.491896,-99) ); + // itree = 34 + fBoostWeights.push_back(0.0333393); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.748168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61524,-99) , +2, 16.5, 0, 0, 0.67938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507678,-99) , +7, 0.0856984, 1, 0, 0.658913,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362393,-99) , +15, 0.262794, 1, 0, 0.422031,-99) , +14, -3.71113, 0, 0, 0.629133,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4906,-99) , +13, 0.00846155, 1, 0, 0.622885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466508,-99) , +8, 0.925366, 1, 0, 0.586571,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268204,-99) , +3, 0.908605, 0, 0, 0.45065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222541,-99) , +13, 0.0175883, 1, 0, 0.423196,-99) , +16, 761.478, 1, 0, 0.49124,-99) , +4, 1.1048, 1, 0, 0.570873,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568199,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205822,-99) , +12, 0.125395, 1, 0, 0.308848,-99) , +11, 1.5, 0, 0, 0.415269,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272603,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0145623,-99) , +12, 0.0740041, 1, 0, 0.0419747,-99) , +16, 19.1475, 1, 0, 0.077932,-99) , +4, 1.41606, 1, 0, 0.139432,-99) , +8, 0.909286, 0, 0, 0.260007,-99) , +5, 1.90507, 1, 0, 0.496922,-99) ); + // itree = 35 + fBoostWeights.push_back(0.0348521); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.754377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641901,-99) , +2, 11.5, 0, 0, 0.726133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596658,-99) , +8, -0.774041, 0, 0, 0.701584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440659,-99) , +14, -3.89773, 0, 0, 0.670303,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463436,-99) , +14, -3.28199, 0, 0, 0.606951,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422025,-99) , +12, 0.339764, 0, 0, 0.487583,-99) , +12, 0.192675, 1, 0, 0.571915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348752,-99) , +12, 0.112045, 1, 0, 0.435563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141578,-99) , +13, 0.00653399, 1, 0, 0.367738,-99) , +5, 1.67422, 1, 0, 0.532376,-99) , +11, 1.5, 0, 0, 0.578189,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439145,-99) , +16, 365.061, 1, 0, 0.549379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256128,-99) , +5, 2.12675, 1, 0, 0.431948,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171203,-99) , +5, 2.09492, 1, 0, 0.296293,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305953,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0110524,-99) , +5, 1.9346, 1, 0, 0.035261,-99) , +4, 1.41127, 1, 0, 0.103065,-99) , +14, -3.05045, 1, 0, 0.189232,-99) , +11, 1.5, 0, 0, 0.271818,-99) , +5, 1.85768, 1, 0, 0.495608,-99) ); + // itree = 36 + fBoostWeights.push_back(0.0356456); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.795351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645461,-99) , +1, 14.5, 0, 0, 0.733399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.689155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541447,-99) , +11, 1.5, 0, 0, 0.586776,-99) , +6, 0.400676, 1, 0, 0.64874,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42991,-99) , +1, 14.5, 0, 0, 0.524447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37177,-99) , +12, 0.0742905, 0, 0, 0.475845,-99) , +8, 0.902937, 1, 0, 0.618324,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444243,-99) , +16, 351.217, 1, 0, 0.578044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349242,-99) , +10, 959.304, 1, 0, 0.414678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0769336,-99) , +5, 2.16126, 1, 0, 0.376788,-99) , +11, 1.5, 0, 0, 0.449292,-99) , +5, 1.67752, 1, 0, 0.577497,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442345,-99) , +9, -1.71523, 1, 0, 0.502666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298352,-99) , +3, 0.954032, 0, 0, 0.456292,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42514,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0565164,-99) , +12, 0.0980976, 1, 0, 0.138932,-99) , +14, -4.17383, 1, 0, 0.229512,-99) , +4, 1.82193, 1, 0, 0.34365,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225931,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0131737,-99) , +5, 1.98049, 1, 0, 0.0593977,-99) , +12, 0.0777467, 1, 0, 0.102746,-99) , +8, 0.245217, 0, 0, 0.263915,-99) , +4, 1.57568, 1, 0, 0.501621,-99) ); + // itree = 37 + fBoostWeights.push_back(0.0315965); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490684,-99) , +7, 0.0993547, 1, 0, 0.675321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475461,-99) , +8, -0.935557, 0, 0, 0.648096,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482555,-99) , +16, 977.988, 1, 0, 0.537044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374443,-99) , +15, 0.824077, 1, 0, 0.506226,-99) , +14, -2.93117, 0, 0, 0.607939,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576807,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383478,-99) , +16, 1561.72, 1, 0, 0.447794,-99) , +12, 0.0951437, 1, 0, 0.499399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147878,-99) , +7, 0.0628699, 1, 0, 0.456967,-99) , +4, 1.36034, 1, 0, 0.572963,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593127,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257582,-99) , +14, -4.2251, 1, 0, 0.403793,-99) , +11, 1.5, 0, 0, 0.481311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233996,-99) , +1, 9.5, 0, 0, 0.425326,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358133,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0223261,-99) , +4, 1.92627, 1, 0, 0.0597485,-99) , +5, 1.96885, 1, 0, 0.102774,-99) , +4, 1.42072, 1, 0, 0.171139,-99) , +13, 0.00055962, 1, 0, 0.28662,-99) , +5, 1.85719, 1, 0, 0.49515,-99) ); + // itree = 38 + fBoostWeights.push_back(0.0302645); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.70999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557382,-99) , +8, -0.91214, 0, 0, 0.684537,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521985,-99) , +11, 1.5, 0, 0, 0.56749,-99) , +6, 0.617881, 1, 0, 0.62971,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407221,-99) , +0, 15.5, 0, 0, 0.507299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30505,-99) , +14, -4.96212, 0, 0, 0.461711,-99) , +14, -3.41548, 0, 0, 0.60249,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459021,-99) , +11, 1.5, 0, 0, 0.504726,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316353,-99) , +14, -2.22444, 1, 0, 0.466529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0889202,-99) , +5, 2.32359, 1, 0, 0.44728,-99) , +5, 1.65199, 1, 0, 0.553768,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348635,-99) , +16, 961.506, 1, 0, 0.465159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158959,-99) , +7, 0.0140971, 0, 0, 0.365535,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0937735,-99) , +10, 259.413, 1, 0, 0.174326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00955339,-99) , +4, 1.96546, 1, 0, 0.10574,-99) , +14, -3.04495, 1, 0, 0.223457,-99) , +4, 1.69356, 1, 0, 0.495015,-99) ); + // itree = 39 + fBoostWeights.push_back(0.0323286); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579921,-99) , +0, 15.5, 0, 0, 0.677894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49227,-99) , +5, 0.443518, 0, 0, 0.658358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389879,-99) , +14, -4.01294, 0, 0, 0.635736,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469508,-99) , +12, 0.129512, 1, 0, 0.543127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265872,-99) , +14, -4.64881, 0, 0, 0.524538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277327,-99) , +7, 0.0633162, 1, 0, 0.496365,-99) , +4, 1.01642, 1, 0, 0.571069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424254,-99) , +1, 11.5, 0, 0, 0.538069,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480103,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.074311,-99) , +3, 0.968647, 0, 0, 0.238666,-99) , +5, 1.99184, 1, 0, 0.330013,-99) , +11, 1.5, 0, 0, 0.412183,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338005,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0188512,-99) , +5, 2.08107, 1, 0, 0.0618442,-99) , +4, 1.52155, 1, 0, 0.147318,-99) , +13, 0.000989644, 1, 0, 0.287008,-99) , +5, 1.84421, 1, 0, 0.493798,-99) ); + // itree = 40 + fBoostWeights.push_back(0.0287217); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.739387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62291,-99) , +2, 16.5, 0, 0, 0.685904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526101,-99) , +3, 0.998177, 1, 0, 0.659299,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384483,-99) , +1, 13.5, 0, 0, 0.469078,-99) , +13, 0.000274863, 0, 0, 0.632041,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515807,-99) , +14, -3.23615, 0, 0, 0.61295,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414226,-99) , +12, 0.115322, 1, 0, 0.47688,-99) , +11, 1.5, 0, 0, 0.519239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23564,-99) , +13, 0.0166835, 1, 0, 0.489084,-99) , +4, 1.04774, 1, 0, 0.565566,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546532,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311854,-99) , +11, 1.5, 0, 0, 0.381502,-99) , +9, -2.64803, 1, 0, 0.426781,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167454,-99) , +11, 1.5, 0, 0, 0.246283,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0142657,-99) , +5, 2.081, 1, 0, 0.0405279,-99) , +4, 1.92627, 1, 0, 0.158537,-99) , +14, -3.34942, 1, 0, 0.273909,-99) , +5, 1.92999, 1, 0, 0.501819,-99) ); + // itree = 41 + fBoostWeights.push_back(0.0315979); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.71962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543795,-99) , +7, 0.0147098, 0, 0, 0.681901,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346569,-99) , +3, 0.996483, 1, 0, 0.515554,-99) , +13, 0.0144008, 1, 0, 0.639929,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57841,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29761,-99) , +13, 0.000174539, 0, 0, 0.413339,-99) , +16, 1091.51, 1, 0, 0.498455,-99) , +13, 0.00130485, 0, 0, 0.60264,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267554,-99) , +5, 2.24292, 1, 0, 0.524962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157479,-99) , +7, 0.00792742, 0, 0, 0.503779,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146707,-99) , +15, 0.118879, 1, 0, 0.260957,-99) , +13, 0.00857754, 1, 0, 0.465255,-99) , +5, 1.55971, 1, 0, 0.54528,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192932,-99) , +1, 11.5, 0, 0, 0.338036,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267187,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.96557, 1, 0, 0.0585659,-99) , +5, 1.88145, 1, 0, 0.10283,-99) , +13, 0.000621572, 1, 0, 0.198709,-99) , +4, 1.71697, 1, 0, 0.488818,-99) ); + // itree = 42 + fBoostWeights.push_back(0.0292152); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462341,-99) , +12, 0.0311747, 0, 0, 0.661749,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269134,-99) , +7, 0.00922191, 0, 0, 0.539507,-99) , +12, 0.113389, 1, 0, 0.597198,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279012,-99) , +15, 0.292839, 1, 0, 0.37481,-99) , +14, -4.36895, 0, 0, 0.580716,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329537,-99) , +5, 2.10215, 1, 0, 0.416217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164887,-99) , +13, 0.00247729, 1, 0, 0.33969,-99) , +5, 1.9381, 1, 0, 0.556951,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231018,-99) , +5, 2.22792, 1, 0, 0.452635,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360502,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169793,-99) , +9, -1.12401, 1, 0, 0.250014,-99) , +12, 0.118289, 1, 0, 0.362211,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0213189,-99) , +4, 1.89705, 1, 0, 0.0974134,-99) , +13, 0.00205364, 1, 0, 0.250426,-99) , +4, 1.64684, 1, 0, 0.496755,-99) ); + // itree = 43 + fBoostWeights.push_back(0.031313); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484511,-99) , +12, 0.0335924, 0, 0, 0.669792,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50233,-99) , +11, 1.5, 0, 0, 0.551556,-99) , +12, 0.124949, 1, 0, 0.609532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162463,-99) , +5, 2.11246, 1, 0, 0.597585,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472039,-99) , +10, 1660.87, 1, 0, 0.525733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364174,-99) , +7, 0.0133367, 0, 0, 0.47719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258105,-99) , +12, 0.0288384, 0, 0, 0.44604,-99) , +14, -3.45215, 0, 0, 0.565835,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400852,-99) , +12, 0.0703609, 1, 0, 0.462322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151421,-99) , +4, 2.07396, 1, 0, 0.410515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177072,-99) , +7, 0.0112538, 0, 0, 0.359914,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268715,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00899061,-99) , +16, 102.736, 1, 0, 0.0320742,-99) , +5, 1.84558, 1, 0, 0.116451,-99) , +14, -2.58709, 1, 0, 0.26299,-99) , +4, 1.55375, 1, 0, 0.491906,-99) ); + // itree = 44 + fBoostWeights.push_back(0.0272856); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468154,-99) , +13, 0.0187889, 1, 0, 0.615318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410962,-99) , +7, 0.0095269, 0, 0, 0.599623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137999,-99) , +5, 2.16126, 1, 0, 0.589791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519966,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289765,-99) , +7, 0.0235593, 0, 0, 0.34648,-99) , +12, 0.206869, 0, 0, 0.399555,-99) , +8, 0.977907, 1, 0, 0.566079,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433963,-99) , +16, 602.01, 1, 0, 0.491815,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152215,-99) , +5, 2.18044, 1, 0, 0.269706,-99) , +4, 1.81424, 1, 0, 0.389042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0174465,-99) , +4, 1.80593, 1, 0, 0.0498869,-99) , +5, 1.88145, 1, 0, 0.147038,-99) , +13, 0.00167957, 1, 0, 0.282807,-99) , +4, 1.55367, 1, 0, 0.495663,-99) ); + // itree = 45 + fBoostWeights.push_back(0.031413); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.769106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668753,-99) , +6, 0.457396, 1, 0, 0.71849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483846,-99) , +5, 1.49714, 1, 0, 0.582405,-99) , +11, 1.5, 0, 0, 0.626464,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214055,-99) , +5, 1.46976, 1, 0, 0.404681,-99) , +13, 0.0191099, 1, 0, 0.595355,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490083,-99) , +2, 16.5, 1, 0, 0.534316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389291,-99) , +2, 11.5, 0, 0, 0.482831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252893,-99) , +12, 0.0305692, 0, 0, 0.446708,-99) , +14, -3.36034, 0, 0, 0.565126,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592988,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384376,-99) , +11, 0.5, 1, 0, 0.442426,-99) , +16, 381.569, 1, 0, 0.50014,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175809,-99) , +8, 0.995386, 0, 0, 0.331599,-99) , +5, 2.1156, 1, 0, 0.428643,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0963405,-99) , +5, 2.15733, 1, 0, 0.35666,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16717,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0398563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +16, 117.887, 1, 0, 0.00588903,-99) , +11, 1.5, 0, 0, 0.0510159,-99) , +4, 1.59254, 1, 0, 0.172852,-99) , +13, 0.00102316, 1, 0, 0.309784,-99) , +5, 1.8461, 1, 0, 0.494956,-99) ); + // itree = 46 + fBoostWeights.push_back(0.0271348); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.755298,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676052,-99) , +4, 0.677318, 1, 0, 0.715739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553414,-99) , +12, 0.113283, 1, 0, 0.606036,-99) , +16, 382.407, 1, 0, 0.647597,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376006,-99) , +5, 1.57279, 1, 0, 0.562026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337216,-99) , +3, 0.998601, 1, 0, 0.530027,-99) , +6, 0.81305, 1, 0, 0.608067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34447,-99) , +4, 0.92551, 1, 0, 0.446824,-99) , +8, 0.940847, 1, 0, 0.583724,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387693,-99) , +7, 0.0133333, 0, 0, 0.483703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213223,-99) , +5, 2.23814, 1, 0, 0.456571,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114332,-99) , +14, -3.83272, 1, 0, 0.262582,-99) , +4, 1.82183, 1, 0, 0.396139,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0418005,-99) , +4, 1.43283, 1, 0, 0.102644,-99) , +11, 1.5, 0, 0, 0.17395,-99) , +13, 0.00573721, 1, 0, 0.341917,-99) , +5, 1.7382, 1, 0, 0.497378,-99) ); + // itree = 47 + fBoostWeights.push_back(0.0284051); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512529,-99) , +15, 0.0582831, 0, 0, 0.65864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501206,-99) , +8, -0.931784, 0, 0, 0.637399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356186,-99) , +16, 2977.95, 1, 0, 0.452563,-99) , +8, 0.926902, 1, 0, 0.606984,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422462,-99) , +13, 0.000170576, 0, 0, 0.568774,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528185,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359043,-99) , +16, 446.635, 1, 0, 0.411995,-99) , +12, 0.124247, 1, 0, 0.491894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0783419,-99) , +7, 0.108093, 1, 0, 0.466787,-99) , +4, 1.27081, 1, 0, 0.564484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410637,-99) , +5, 2.2885, 1, 0, 0.543125,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499497,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0908135,-99) , +5, 2.21122, 1, 0, 0.27946,-99) , +8, 0.995493, 0, 0, 0.332855,-99) , +11, 1.5, 0, 0, 0.412848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24284,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0124153,-99) , +4, 1.39297, 1, 0, 0.0411994,-99) , +11, 1.5, 0, 0, 0.0975158,-99) , +13, 0.00266559, 1, 0, 0.312054,-99) , +5, 1.89494, 1, 0, 0.503651,-99) ); + // itree = 48 + fBoostWeights.push_back(0.0305425); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.758156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643097,-99) , +6, 0.490274, 1, 0, 0.698257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495205,-99) , +8, 0.914008, 1, 0, 0.66227,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489704,-99) , +6, 0.86429, 1, 0, 0.611397,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377982,-99) , +2, 11.5, 0, 0, 0.476232,-99) , +16, 2627.03, 1, 0, 0.542766,-99) , +12, 0.124493, 1, 0, 0.603307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35699,-99) , +12, 0.025797, 0, 0, 0.589044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586647,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361023,-99) , +16, 647.888, 1, 0, 0.421118,-99) , +10, 1274.7, 1, 0, 0.476973,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168775,-99) , +7, 0.0122109, 0, 0, 0.420622,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0757543,-99) , +4, 1.81269, 1, 0, 0.174809,-99) , +14, -3.31419, 1, 0, 0.318499,-99) , +4, 1.69358, 1, 0, 0.411802,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202014,-99) , +16, 1030.27, 1, 0, 0.312062,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00921431,-99) , +12, 0.371731, 0, 0, 0.0537555,-99) , +5, 1.95211, 1, 0, 0.186198,-99) , +13, 0.00472431, 1, 0, 0.350456,-99) , +5, 1.67981, 1, 0, 0.491446,-99) ); + // itree = 49 + fBoostWeights.push_back(0.0270556); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567786,-99) , +4, 1.09141, 1, 0, 0.658323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497027,-99) , +7, 0.108387, 1, 0, 0.638353,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515746,-99) , +16, 4037.48, 1, 0, 0.573554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419891,-99) , +8, 0.895592, 1, 0, 0.545806,-99) , +1, 14.5, 0, 0, 0.593592,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612692,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528267,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114316,-99) , +8, -0.309737, 0, 0, 0.293048,-99) , +10, 1447.91, 1, 0, 0.375441,-99) , +11, 1.5, 0, 0, 0.465373,-99) , +5, 1.7364, 1, 0, 0.567828,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558645,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269706,-99) , +12, 0.143961, 1, 0, 0.353132,-99) , +1, 14.5, 0, 0, 0.428305,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521945,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0410112,-99) , +13, 0.0151329, 1, 0, 0.225813,-99) , +11, 1.5, 0, 0, 0.312877,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0852445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0187472,-99) , +4, 1.95607, 1, 0, 0.0323243,-99) , +4, 1.8995, 1, 0, 0.218747,-99) , +13, 0.000391896, 1, 0, 0.29614,-99) , +4, 1.54491, 1, 0, 0.498926,-99) ); + // itree = 50 + fBoostWeights.push_back(0.0256655); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.722223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56986,-99) , +7, 0.0879615, 1, 0, 0.688747,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506495,-99) , +12, 0.190387, 1, 0, 0.583472,-99) , +2, 16.5, 0, 0, 0.643511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415442,-99) , +14, -4.13351, 0, 0, 0.621658,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436543,-99) , +13, 0.000256698, 0, 0, 0.597764,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313088,-99) , +4, 1.65724, 1, 0, 0.470864,-99) , +11, 1.5, 0, 0, 0.510876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118674,-99) , +7, 0.136909, 1, 0, 0.493592,-99) , +4, 0.918498, 1, 0, 0.549002,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406743,-99) , +16, 524.08, 1, 0, 0.485854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265471,-99) , +5, 2.2122, 1, 0, 0.395854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221867,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0781936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0133065,-99) , +4, 1.80593, 1, 0, 0.0396066,-99) , +5, 2.06778, 1, 0, 0.0862201,-99) , +8, 0.746693, 0, 0, 0.270249,-99) , +5, 1.99005, 1, 0, 0.498849,-99) ); + // itree = 51 + fBoostWeights.push_back(0.0233812); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555599,-99) , +2, 16.5, 0, 0, 0.599517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359748,-99) , +7, 0.108413, 1, 0, 0.584186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236445,-99) , +4, 1.2208, 0, 0, 0.354124,-99) , +5, 1.39473, 1, 0, 0.418143,-99) , +14, -4.13982, 0, 0, 0.565881,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168727,-99) , +8, 0.965158, 0, 0, 0.321564,-99) , +5, 2.05176, 1, 0, 0.549839,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284388,-99) , +12, 0.121249, 1, 0, 0.430114,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258244,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170566,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0111468,-99) , +16, 224.953, 1, 0, 0.0532525,-99) , +4, 1.89719, 1, 0, 0.139468,-99) , +8, 0.953192, 0, 0, 0.243112,-99) , +4, 1.74732, 1, 0, 0.505171,-99) ); + // itree = 52 + fBoostWeights.push_back(0.026627); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483911,-99) , +8, -0.926324, 0, 0, 0.627933,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348278,-99) , +12, 0.0598963, 0, 0, 0.431685,-99) , +14, -3.87185, 0, 0, 0.604667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364796,-99) , +7, 0.00922146, 0, 0, 0.587013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354076,-99) , +7, 0.108683, 1, 0, 0.571328,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539771,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373174,-99) , +4, 1.45915, 1, 0, 0.420388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21648,-99) , +4, 1.9862, 1, 0, 0.3787,-99) , +2, 23.5, 0, 0, 0.410298,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37665,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0151338,-99) , +16, 19.824, 1, 0, 0.0318152,-99) , +4, 1.75653, 1, 0, 0.064841,-99) , +4, 1.41633, 1, 0, 0.153958,-99) , +14, -3.06807, 1, 0, 0.290781,-99) , +5, 1.85715, 1, 0, 0.500115,-99) ); + // itree = 53 + fBoostWeights.push_back(0.0275234); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.673748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515885,-99) , +15, 0.0841748, 0, 0, 0.640582,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330811,-99) , +3, 0.996808, 1, 0, 0.491078,-99) , +13, 0.0152116, 1, 0, 0.613231,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377739,-99) , +12, 0.0673967, 0, 0, 0.458184,-99) , +14, -3.55118, 0, 0, 0.589365,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565733,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295921,-99) , +5, 2.07612, 1, 0, 0.420679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183309,-99) , +13, 0.00442013, 1, 0, 0.363712,-99) , +11, 1.5, 0, 0, 0.439956,-99) , +5, 1.77876, 1, 0, 0.564116,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564786,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328076,-99) , +14, -3.86391, 0, 0, 0.482879,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112627,-99) , +14, -3.6174, 1, 0, 0.300705,-99) , +5, 2.07823, 1, 0, 0.408673,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353357,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0130403,-99) , +5, 1.98723, 1, 0, 0.0469538,-99) , +5, 1.8297, 1, 0, 0.154197,-99) , +14, -2.83676, 1, 0, 0.294962,-99) , +4, 1.56679, 1, 0, 0.500055,-99) ); + // itree = 54 + fBoostWeights.push_back(0.0251527); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.732046,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619816,-99) , +5, 1.50465, 1, 0, 0.68762,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504515,-99) , +12, 0.115667, 1, 0, 0.58028,-99) , +6, 0.662753, 1, 0, 0.648644,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410129,-99) , +7, 0.00998347, 0, 0, 0.566525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331715,-99) , +7, 0.105872, 1, 0, 0.551701,-99) , +16, 505.846, 1, 0, 0.589319,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318806,-99) , +14, -4.32033, 0, 0, 0.50408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21116,-99) , +5, 2.23845, 1, 0, 0.469559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246002,-99) , +13, 0.00447651, 1, 0, 0.419272,-99) , +5, 1.79643, 1, 0, 0.559592,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194516,-99) , +7, 0.0126489, 0, 0, 0.395816,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285459,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0103513,-99) , +12, 0.0962657, 1, 0, 0.0306071,-99) , +5, 1.98513, 1, 0, 0.139467,-99) , +14, -3.31511, 1, 0, 0.24163,-99) , +4, 1.69653, 1, 0, 0.508873,-99) ); + // itree = 55 + fBoostWeights.push_back(0.0236414); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681185,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51005,-99) , +12, 0.0310829, 0, 0, 0.652268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497457,-99) , +11, 1.5, 0, 0, 0.541238,-99) , +12, 0.113452, 1, 0, 0.590286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15673,-99) , +5, 2.15677, 1, 0, 0.581172,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601237,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313182,-99) , +14, -4.94606, 0, 0, 0.427349,-99) , +0, 26.5, 0, 0, 0.478605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327357,-99) , +12, 0.0323259, 0, 0, 0.453738,-99) , +14, -3.52396, 0, 0, 0.556304,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388463,-99) , +12, 0.12516, 1, 0, 0.501642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294817,-99) , +1, 9.5, 0, 0, 0.449453,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21776,-99) , +0, 13.5, 1, 0, 0.294022,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234517,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0997169,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0141162,-99) , +15, 0.0591771, 1, 0, 0.0393685,-99) , +12, 0.0782687, 1, 0, 0.0705559,-99) , +5, 1.95682, 1, 0, 0.18175,-99) , +13, 0.000902971, 1, 0, 0.314151,-99) , +4, 1.56681, 1, 0, 0.498782,-99) ); + // itree = 56 + fBoostWeights.push_back(0.0242952); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.718702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571787,-99) , +13, 0.0193176, 1, 0, 0.688584,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52399,-99) , +16, 298.972, 1, 0, 0.570248,-99) , +2, 16.5, 0, 0, 0.634024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402111,-99) , +12, 0.0311515, 0, 0, 0.61413,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417555,-99) , +12, 0.0257976, 0, 0, 0.579659,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164359,-99) , +4, 1.82178, 1, 0, 0.443282,-99) , +12, 0.108733, 1, 0, 0.506148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194566,-99) , +7, 0.115978, 1, 0, 0.489384,-99) , +4, 0.976502, 1, 0, 0.545756,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291807,-99) , +7, 0.0149193, 0, 0, 0.426662,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300805,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.69233, 1, 0, 0.0454731,-99) , +5, 2.11403, 1, 0, 0.119793,-99) , +8, 0.94826, 0, 0, 0.247831,-99) , +5, 2.02886, 1, 0, 0.502288,-99) ); + // itree = 57 + fBoostWeights.push_back(0.0248277); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534617,-99) , +2, 13.5, 0, 0, 0.608625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374276,-99) , +7, 0.103115, 1, 0, 0.593171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185295,-99) , +5, 2.12368, 1, 0, 0.583236,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550244,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358951,-99) , +6, 0.162141, 0, 0, 0.438392,-99) , +11, 1.5, 0, 0, 0.480024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325536,-99) , +3, 0.996635, 1, 0, 0.451358,-99) , +8, 0.91562, 1, 0, 0.554602,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584643,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312082,-99) , +2, 11.5, 0, 0, 0.396297,-99) , +16, 423.549, 1, 0, 0.465462,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112108,-99) , +4, 1.76106, 1, 0, 0.227842,-99) , +13, 0.00306646, 1, 0, 0.374023,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373472,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0275369,-99) , +4, 1.76368, 1, 0, 0.0440129,-99) , +8, 0.973451, 0, 0, 0.150403,-99) , +5, 2.06698, 1, 0, 0.285885,-99) , +4, 1.5737, 1, 0, 0.494694,-99) ); + // itree = 58 + fBoostWeights.push_back(0.0266032); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.76339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615729,-99) , +6, 0.30753, 1, 0, 0.661753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434965,-99) , +8, -0.925402, 0, 0, 0.629388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39082,-99) , +16, 574.985, 1, 0, 0.4681,-99) , +14, -3.1252, 0, 0, 0.59854,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298986,-99) , +14, -4.72778, 0, 0, 0.513435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181518,-99) , +5, 2.23816, 1, 0, 0.499404,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252104,-99) , +16, 429.112, 1, 0, 0.308398,-99) , +13, 0.00860505, 1, 0, 0.466363,-99) , +5, 1.47131, 1, 0, 0.534268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322704,-99) , +12, 0.115057, 1, 0, 0.446237,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351222,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.139014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0202097,-99) , +5, 2.06081, 1, 0, 0.0659942,-99) , +5, 1.85212, 1, 0, 0.128843,-99) , +8, 0.951119, 0, 0, 0.24641,-99) , +4, 1.70936, 1, 0, 0.48858,-99) ); + // itree = 59 + fBoostWeights.push_back(0.0255394); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.73186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616208,-99) , +16, 959.183, 1, 0, 0.671835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497848,-99) , +8, -0.869447, 0, 0, 0.636548,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326869,-99) , +6, 0.111566, 0, 0, 0.447564,-99) , +11, 1.5, 0, 0, 0.495704,-99) , +13, 0.000748338, 0, 0, 0.602564,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536515,-99) , +16, 610.85, 1, 0, 0.588745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389455,-99) , +14, -4.38385, 0, 0, 0.561107,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577447,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214329,-99) , +5, 1.91937, 1, 0, 0.401013,-99) , +12, 0.386901, 0, 0, 0.432663,-99) , +12, 0.129512, 1, 0, 0.497663,-99) , +4, 1.01463, 1, 0, 0.555162,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588937,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343651,-99) , +9, 2.88313, 0, 0, 0.414687,-99) , +9, -2.46122, 1, 0, 0.47487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.11744,-99) , +9, -2.41613, 1, 0, 0.23636,-99) , +5, 2.09039, 1, 0, 0.383671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.013315,-99) , +4, 1.81725, 1, 0, 0.120936,-99) , +13, 0.00324737, 1, 0, 0.295184,-99) , +4, 1.58763, 1, 0, 0.497927,-99) ); + // itree = 60 + fBoostWeights.push_back(0.0215798); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411085,-99) , +14, -4.34418, 0, 0, 0.63224,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538368,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261568,-99) , +7, 0.0290013, 1, 0, 0.519226,-99) , +2, 15.5, 0, 0, 0.571569,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165037,-99) , +1, 37.5, 0, 0, 0.356785,-99) , +7, 0.10458, 1, 0, 0.557218,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212403,-99) , +8, 0.945943, 0, 0, 0.343922,-99) , +5, 2.03862, 1, 0, 0.542429,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316361,-99) , +9, -2.40241, 1, 0, 0.431424,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +11, 1.5, 0, 0, 0.0778473,-99) , +5, 1.88178, 1, 0, 0.13856,-99) , +13, 0.0010789, 1, 0, 0.291787,-99) , +4, 1.73888, 1, 0, 0.505447,-99) ); + // itree = 61 + fBoostWeights.push_back(0.0233748); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681888,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540303,-99) , +8, -0.777294, 0, 0, 0.650257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471196,-99) , +5, 0.538452, 0, 0, 0.631171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408258,-99) , +14, -4.12065, 0, 0, 0.610954,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451457,-99) , +13, 0.000157358, 0, 0, 0.593501,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377083,-99) , +15, 0.144384, 0, 0, 0.456697,-99) , +16, 499.989, 1, 0, 0.50782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225299,-99) , +13, 0.0222109, 1, 0, 0.48615,-99) , +4, 0.999425, 1, 0, 0.546086,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496258,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441306,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204968,-99) , +8, 0.993551, 0, 0, 0.286583,-99) , +16, 528.194, 1, 0, 0.380397,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246684,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0359809,-99) , +6, 0.249935, 1, 0, 0.111849,-99) , +8, 0.658546, 0, 0, 0.280143,-99) , +5, 1.983, 1, 0, 0.499465,-99) ); + // itree = 62 + fBoostWeights.push_back(0.024833); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.753924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670538,-99) , +2, 15.5, 0, 0, 0.719845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621827,-99) , +8, -0.481229, 0, 0, 0.68625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501456,-99) , +14, -3.23253, 0, 0, 0.641146,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603418,-99) , +1, 15.5, 0, 0, 0.668018,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348116,-99) , +8, 0.88953, 1, 0, 0.526737,-99) , +6, 0.298768, 1, 0, 0.571928,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395713,-99) , +15, 0.0797293, 0, 0, 0.502998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126527,-99) , +4, 1.50182, 1, 0, 0.301064,-99) , +14, -2.33533, 1, 0, 0.442447,-99) , +5, 1.49636, 1, 0, 0.517893,-99) , +11, 1.5, 0, 0, 0.557304,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536625,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307305,-99) , +5, 2.10167, 1, 0, 0.395829,-99) , +15, 0.238221, 0, 0, 0.454473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261609,-99) , +4, 2.0025, 1, 0, 0.412647,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328353,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0286746,-99) , +4, 1.3918, 1, 0, 0.078309,-99) , +11, 1.5, 0, 0, 0.156881,-99) , +14, -2.81152, 1, 0, 0.315307,-99) , +5, 1.88533, 1, 0, 0.500234,-99) ); + // itree = 63 + fBoostWeights.push_back(0.0215087); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516969,-99) , +5, 0.64806, 0, 0, 0.652854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481103,-99) , +8, -0.896129, 0, 0, 0.625748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402657,-99) , +14, -3.95112, 0, 0, 0.601422,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456799,-99) , +14, -4.08772, 0, 0, 0.584289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370861,-99) , +12, 0.0296092, 0, 0, 0.545393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24734,-99) , +7, 0.0839584, 1, 0, 0.44398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182522,-99) , +5, 2.21234, 1, 0, 0.431461,-99) , +12, 0.105418, 1, 0, 0.480697,-99) , +4, 0.915785, 1, 0, 0.533577,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377166,-99) , +12, 0.14326, 1, 0, 0.458317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22653,-99) , +4, 2.10569, 1, 0, 0.4087,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0440483,-99) , +4, 1.89321, 1, 0, 0.157423,-99) , +8, 0.891008, 0, 0, 0.268509,-99) , +4, 1.69046, 1, 0, 0.488655,-99) ); + // itree = 64 + fBoostWeights.push_back(0.0233025); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601817,-99) , +8, -0.64033, 0, 0, 0.678491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476118,-99) , +13, 0.000294678, 0, 0, 0.650394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457367,-99) , +7, 0.108623, 1, 0, 0.627572,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534845,-99) , +2, 10.5, 0, 0, 0.571461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422603,-99) , +8, -0.855214, 0, 0, 0.534728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336933,-99) , +6, 0.543599, 1, 0, 0.383709,-99) , +8, 0.737879, 1, 0, 0.493573,-99) , +2, 13.5, 0, 0, 0.579212,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496771,-99) , +13, 0.000179404, 0, 0, 0.596255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424618,-99) , +8, 0.525838, 0, 0, 0.543033,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169919,-99) , +7, 0.00793017, 0, 0, 0.405799,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19551,-99) , +13, 0.008338, 1, 0, 0.369031,-99) , +16, 183.223, 1, 0, 0.423425,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0523762,-99) , +8, 0.946132, 0, 0, 0.190592,-99) , +4, 1.92378, 1, 0, 0.379341,-99) , +5, 1.67567, 1, 0, 0.498017,-99) ); + // itree = 65 + fBoostWeights.push_back(0.0226709); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496319,-99) , +13, 0.000185139, 0, 0, 0.632761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438276,-99) , +12, 0.0305839, 0, 0, 0.611024,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419511,-99) , +15, 0.192827, 1, 0, 0.543237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373591,-99) , +7, 0.0131059, 0, 0, 0.50971,-99) , +12, 0.189273, 1, 0, 0.582796,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275559,-99) , +14, -4.70256, 0, 0, 0.495042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243317,-99) , +5, 2.2429, 1, 0, 0.4762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157583,-99) , +7, 0.0802735, 1, 0, 0.460312,-99) , +5, 1.65, 1, 0, 0.541528,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266779,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0485167,-99) , +4, 2.06274, 1, 0, 0.20244,-99) , +1, 14.5, 0, 0, 0.292588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0350555,-99) , +4, 1.81881, 1, 0, 0.0750295,-99) , +14, -2.6219, 1, 0, 0.20806,-99) , +4, 1.74926, 1, 0, 0.497374,-99) ); + // itree = 66 + fBoostWeights.push_back(0.0219912); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563332,-99) , +12, 0.132618, 1, 0, 0.624579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429809,-99) , +8, -0.975754, 0, 0, 0.609261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420803,-99) , +7, 0.0168353, 0, 0, 0.488199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301638,-99) , +12, 0.0469587, 0, 0, 0.438857,-99) , +13, 0.000284187, 0, 0, 0.582252,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450533,-99) , +3, 0.960995, 0, 0, 0.556343,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535498,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361451,-99) , +16, 1043.75, 1, 0, 0.427973,-99) , +12, 0.131246, 1, 0, 0.495085,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251943,-99) , +7, 0.0652854, 1, 0, 0.467657,-99) , +4, 1.29252, 1, 0, 0.544806,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336322,-99) , +12, 0.113398, 1, 0, 0.437459,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409452,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296013,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00733889,-99) , +12, 0.0963073, 1, 0, 0.0583465,-99) , +4, 1.34095, 1, 0, 0.103818,-99) , +16, 10.9866, 1, 0, 0.148578,-99) , +8, 0.945183, 0, 0, 0.276015,-99) , +5, 2.01196, 1, 0, 0.504487,-99) ); + // itree = 67 + fBoostWeights.push_back(0.0203564); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450694,-99) , +8, 0.967657, 1, 0, 0.618629,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282857,-99) , +7, 0.00922087, 0, 0, 0.511198,-99) , +12, 0.129352, 1, 0, 0.567508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318976,-99) , +12, 0.0227027, 0, 0, 0.556832,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291894,-99) , +7, 0.0253064, 1, 0, 0.438991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126632,-99) , +1, 9.5, 0, 0, 0.385089,-99) , +5, 1.93931, 1, 0, 0.540767,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552856,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158625,-99) , +5, 2.2735, 1, 0, 0.409322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244887,-99) , +10, 2935.42, 1, 0, 0.3528,-99) , +9, -4.37187, 1, 0, 0.399444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0539428,-99) , +5, 1.95211, 1, 0, 0.142817,-99) , +13, 0.00211814, 1, 0, 0.301481,-99) , +4, 1.63365, 1, 0, 0.494107,-99) ); + // itree = 68 + fBoostWeights.push_back(0.0219207); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.767392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65748,-99) , +6, 0.168248, 1, 0, 0.694654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583044,-99) , +0, 13.5, 0, 0, 0.662877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461851,-99) , +8, 0.978106, 1, 0, 0.633512,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396122,-99) , +14, -3.96818, 0, 0, 0.569839,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322146,-99) , +8, -0.708609, 0, 0, 0.452094,-99) , +12, 0.136482, 1, 0, 0.517971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25042,-99) , +5, 2.03271, 1, 0, 0.503984,-99) , +11, 1.5, 0, 0, 0.547672,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558973,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277892,-99) , +13, 0.000628409, 1, 0, 0.399975,-99) , +16, 242.516, 1, 0, 0.450718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132313,-99) , +5, 2.40754, 1, 0, 0.4185,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0559361,-99) , +5, 1.90281, 1, 0, 0.146699,-99) , +13, 0.00268027, 1, 0, 0.321393,-99) , +4, 1.57703, 1, 0, 0.496683,-99) ); + // itree = 69 + fBoostWeights.push_back(0.0239258); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.750659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630168,-99) , +2, 16.5, 0, 0, 0.692871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427122,-99) , +14, -3.59677, 0, 0, 0.647047,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4591,-99) , +7, 0.0124242, 0, 0, 0.559596,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253082,-99) , +13, 0.00552516, 1, 0, 0.409958,-99) , +4, 1.48236, 1, 0, 0.536706,-99) , +11, 1.5, 0, 0, 0.572491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305283,-99) , +13, 0.0377774, 1, 0, 0.559663,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422288,-99) , +6, 0.520464, 1, 0, 0.544708,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367456,-99) , +3, 0.97612, 1, 0, 0.445113,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0964509,-99) , +4, 1.8059, 1, 0, 0.221437,-99) , +13, 0.000773854, 1, 0, 0.330554,-99) , +11, 1.5, 0, 0, 0.403244,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0370777,-99) , +12, 0.363228, 0, 0, 0.0727432,-99) , +14, -4.04397, 1, 0, 0.19082,-99) , +5, 2.15512, 1, 0, 0.331775,-99) , +5, 1.85513, 1, 0, 0.502899,-99) ); + // itree = 70 + fBoostWeights.push_back(0.0212522); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.714299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555999,-99) , +1, 42.5, 1, 0, 0.680715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471991,-99) , +8, 0.963349, 1, 0, 0.651198,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626678,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400541,-99) , +13, 0.000602628, 0, 0, 0.4807,-99) , +11, 1.5, 0, 0, 0.524612,-99) , +1, 14.5, 0, 0, 0.597665,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545085,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432686,-99) , +7, 0.0147765, 0, 0, 0.507089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209998,-99) , +5, 2.2428, 1, 0, 0.497303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168898,-99) , +7, 0.119328, 1, 0, 0.484147,-99) , +4, 0.925977, 1, 0, 0.535537,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531002,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22678,-99) , +16, 1969.99, 1, 0, 0.326604,-99) , +12, 0.0680178, 1, 0, 0.402003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169009,-99) , +4, 1.99381, 1, 0, 0.327722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0466136,-99) , +13, 0.00670639, 1, 0, 0.264301,-99) , +4, 1.69475, 1, 0, 0.49179,-99) ); + // itree = 71 + fBoostWeights.push_back(0.0227664); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488902,-99) , +4, 1.48914, 1, 0, 0.64361,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36752,-99) , +7, 0.026908, 1, 0, 0.548775,-99) , +2, 16.5, 0, 0, 0.589118,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0273495,-99) , +4, 1.51555, 1, 0, 0.369845,-99) , +13, 0.0245695, 1, 0, 0.569947,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232254,-99) , +15, 0.312959, 1, 0, 0.354775,-99) , +14, -4.371, 0, 0, 0.553755,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55496,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321901,-99) , +8, 0.994736, 0, 0, 0.400696,-99) , +11, 1.5, 0, 0, 0.465689,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438965,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344754,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.062222,-99) , +8, 0.755518, 0, 0, 0.109277,-99) , +16, 9.28393, 1, 0, 0.137505,-99) , +4, 1.16197, 1, 0, 0.186426,-99) , +8, 0.950394, 0, 0, 0.305742,-99) , +5, 1.9302, 1, 0, 0.503419,-99) ); + // itree = 72 + fBoostWeights.push_back(0.0225889); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443289,-99) , +14, -4.12187, 0, 0, 0.627997,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454317,-99) , +4, 1.09025, 1, 0, 0.524294,-99) , +12, 0.123327, 1, 0, 0.575378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30264,-99) , +12, 0.0227284, 0, 0, 0.564393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347436,-99) , +16, 338.057, 1, 0, 0.44897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188487,-99) , +3, 0.991764, 1, 0, 0.38838,-99) , +5, 1.90862, 1, 0, 0.5463,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414379,-99) , +6, 0.611781, 0, 0, 0.490114,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0294056,-99) , +7, 0.0121323, 0, 0, 0.264036,-99) , +4, 1.81424, 1, 0, 0.369082,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.011524,-99) , +5, 2.01328, 1, 0, 0.110548,-99) , +14, -2.61219, 1, 0, 0.274796,-99) , +4, 1.64388, 1, 0, 0.497004,-99) ); + // itree = 73 + fBoostWeights.push_back(0.0218413); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.707436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53608,-99) , +13, 0.0164113, 1, 0, 0.66146,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442951,-99) , +16, 1908.54, 1, 0, 0.522958,-99) , +13, 0.00145922, 0, 0, 0.621873,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393392,-99) , +9, -0.545333, 1, 0, 0.466139,-99) , +7, 0.0139931, 0, 0, 0.5925,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522678,-99) , +2, 12.5, 0, 0, 0.60578,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464443,-99) , +14, -3.69354, 0, 0, 0.569544,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42667,-99) , +15, 0.239397, 0, 0, 0.470816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267298,-99) , +13, 0.0138997, 1, 0, 0.443761,-99) , +11, 1.5, 0, 0, 0.483768,-99) , +4, 0.987282, 1, 0, 0.537921,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407859,-99) , +12, 0.0976878, 1, 0, 0.487392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222327,-99) , +4, 2.06942, 1, 0, 0.429092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151424,-99) , +7, 0.0105196, 0, 0, 0.382843,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249751,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0403413,-99) , +5, 1.86991, 1, 0, 0.0966568,-99) , +13, 0.00212902, 1, 0, 0.2776,-99) , +4, 1.69109, 1, 0, 0.496915,-99) ); + // itree = 74 + fBoostWeights.push_back(0.0215971); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.763239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65115,-99) , +6, 0.159641, 1, 0, 0.68367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569913,-99) , +2, 10.5, 0, 0, 0.660968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497056,-99) , +13, 0.000254168, 0, 0, 0.627105,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346116,-99) , +12, 0.0263839, 0, 0, 0.56505,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353014,-99) , +7, 0.012644, 0, 0, 0.431769,-99) , +15, 0.0936994, 0, 0, 0.526599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28367,-99) , +7, 0.119704, 1, 0, 0.513017,-99) , +11, 1.5, 0, 0, 0.55175,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398306,-99) , +3, 0.973254, 0, 0, 0.530633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345072,-99) , +6, 0.961713, 1, 0, 0.492615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271474,-99) , +5, 2.24514, 1, 0, 0.443819,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0875744,-99) , +13, 0.0124065, 1, 0, 0.289048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.89715, 1, 0, 0.190217,-99) , +14, -2.90597, 1, 0, 0.330325,-99) , +4, 1.58764, 1, 0, 0.503483,-99) ); + // itree = 75 + fBoostWeights.push_back(0.0224234); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563943,-99) , +13, 0.00192076, 0, 0, 0.659428,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351231,-99) , +13, 0.013987, 1, 0, 0.547285,-99) , +5, 1.37388, 1, 0, 0.604812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420467,-99) , +7, 0.104661, 1, 0, 0.586078,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572947,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3854,-99) , +4, 0.973116, 1, 0, 0.44121,-99) , +16, 250.639, 1, 0, 0.482644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21025,-99) , +5, 2.08632, 1, 0, 0.467326,-99) , +2, 11.5, 0, 0, 0.550936,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550357,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246196,-99) , +5, 1.97365, 1, 0, 0.368605,-99) , +11, 1.5, 0, 0, 0.437288,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282966,-99) , +4, 1.74621, 0, 0, 0.366323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0347522,-99) , +13, 0.0173783, 1, 0, 0.312129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0237512,-99) , +4, 1.83992, 1, 0, 0.196199,-99) , +14, -3.0013, 1, 0, 0.32242,-99) , +4, 1.56984, 1, 0, 0.499448,-99) ); + // itree = 76 + fBoostWeights.push_back(0.0185131); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524328,-99) , +15, 0.100836, 0, 0, 0.614334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460501,-99) , +8, 0.98314, 1, 0, 0.594767,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420258,-99) , +4, 1.33604, 1, 0, 0.542746,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23062,-99) , +5, 2.02901, 1, 0, 0.420097,-99) , +2, 13.5, 0, 0, 0.485639,-99) , +16, 1262.16, 1, 0, 0.537396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249542,-99) , +7, 0.145312, 1, 0, 0.527005,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343945,-99) , +8, 0.98629, 0, 0, 0.43653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238159,-99) , +15, 0.0905475, 0, 0, 0.382671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0157315,-99) , +5, 2.01344, 1, 0, 0.130483,-99) , +13, 0.00159686, 1, 0, 0.277867,-99) , +4, 1.69353, 1, 0, 0.487723,-99) ); + // itree = 77 + fBoostWeights.push_back(0.0215507); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555981,-99) , +16, 967.007, 1, 0, 0.613884,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342418,-99) , +8, -0.908916, 0, 0, 0.495307,-99) , +2, 12.5, 0, 0, 0.569175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220405,-99) , +7, 0.173236, 1, 0, 0.559285,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260747,-99) , +12, 0.0182039, 0, 0, 0.352168,-99) , +12, 0.028597, 0, 0, 0.544105,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47019,-99) , +5, 2.11092, 0, 0, 0.520019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34818,-99) , +5, 2.30349, 1, 0, 0.474273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198669,-99) , +8, 0.948328, 0, 0, 0.432404,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268011,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.54237, 1, 0, 0.0517729,-99) , +5, 2.0682, 1, 0, 0.123112,-99) , +13, 0.000484406, 1, 0, 0.280723,-99) , +5, 1.96498, 1, 0, 0.499686,-99) ); + // itree = 78 + fBoostWeights.push_back(0.0218992); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.719875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625568,-99) , +7, 0.0436696, 1, 0, 0.685199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553665,-99) , +0, 13.5, 0, 0, 0.651528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463642,-99) , +14, -3.59586, 0, 0, 0.616179,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603249,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451501,-99) , +13, 0.00121684, 0, 0, 0.564033,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241231,-99) , +13, 0.00764016, 1, 0, 0.442203,-99) , +5, 1.54378, 1, 0, 0.513222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259737,-99) , +7, 0.109404, 1, 0, 0.49698,-99) , +11, 1.5, 0, 0, 0.535302,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379608,-99) , +16, 203.95, 1, 0, 0.448281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314956,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0180061,-99) , +4, 1.76213, 1, 0, 0.0740663,-99) , +5, 2.0769, 1, 0, 0.152346,-99) , +8, 0.954656, 0, 0, 0.279152,-99) , +5, 1.98511, 1, 0, 0.492711,-99) ); + // itree = 79 + fBoostWeights.push_back(0.0198513); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560244,-99) , +2, 13.5, 0, 0, 0.623305,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310904,-99) , +13, 0.00505628, 1, 0, 0.464843,-99) , +4, 1.46152, 1, 0, 0.604367,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254748,-99) , +15, 0.502709, 1, 0, 0.417759,-99) , +13, 0.025245, 1, 0, 0.584049,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485694,-99) , +14, -4.38597, 0, 0, 0.544775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35649,-99) , +7, 0.012495, 0, 0, 0.49934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323767,-99) , +12, 0.0409619, 0, 0, 0.459193,-99) , +14, -3.3469, 0, 0, 0.559204,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435007,-99) , +0, 13.5, 0, 0, 0.542322,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332491,-99) , +11, 0.5, 1, 0, 0.417349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123089,-99) , +5, 2.34541, 1, 0, 0.387483,-99) , +11, 1.5, 0, 0, 0.446648,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0868001,-99) , +5, 2.01328, 1, 0, 0.222591,-99) , +14, -2.60364, 1, 0, 0.376009,-99) , +5, 1.79696, 1, 0, 0.504514,-99) ); + // itree = 80 + fBoostWeights.push_back(0.0215163); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.749352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660099,-99) , +10, 3018.48, 1, 0, 0.705945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587517,-99) , +0, 14.5, 0, 0, 0.671188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508925,-99) , +14, -3.43915, 0, 0, 0.637564,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536908,-99) , +6, 0.592671, 1, 0, 0.619057,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445235,-99) , +1, 14.5, 0, 0, 0.49875,-99) , +16, 512.434, 1, 0, 0.532651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216884,-99) , +13, 0.0465902, 1, 0, 0.520474,-99) , +11, 1.5, 0, 0, 0.55775,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402049,-99) , +0, 14.5, 0, 0, 0.545833,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273783,-99) , +4, 2.01802, 1, 0, 0.421859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242504,-99) , +7, 0.0119823, 0, 0, 0.367709,-99) , +11, 1.5, 0, 0, 0.435968,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41592,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291434,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0218743,-99) , +4, 1.74775, 1, 0, 0.066201,-99) , +16, 23.3207, 1, 0, 0.102398,-99) , +6, 0.177204, 1, 0, 0.192153,-99) , +14, -2.6877, 1, 0, 0.353719,-99) , +5, 1.82087, 1, 0, 0.502848,-99) ); + // itree = 81 + fBoostWeights.push_back(0.0197411); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720387,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553496,-99) , +15, 0.508718, 1, 0, 0.623229,-99) , +6, 0.154819, 1, 0, 0.644322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397958,-99) , +14, -4.38991, 0, 0, 0.618645,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408611,-99) , +13, 0.0234095, 1, 0, 0.54483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371262,-99) , +7, 0.00922436, 0, 0, 0.529907,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35753,-99) , +5, 1.85229, 1, 0, 0.459378,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1382,-99) , +1, 18.5, 0, 0, 0.222259,-99) , +13, 0.00395529, 1, 0, 0.381719,-99) , +4, 1.4166, 1, 0, 0.489939,-99) , +11, 1.5, 0, 0, 0.532488,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443398,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0566638,-99) , +5, 2.21221, 1, 0, 0.154204,-99) , +14, -3.89334, 1, 0, 0.255388,-99) , +5, 2.06808, 1, 0, 0.499361,-99) ); + // itree = 82 + fBoostWeights.push_back(0.0220562); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497794,-99) , +14, -3.53248, 0, 0, 0.610134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452942,-99) , +8, -0.895615, 0, 0, 0.589856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307937,-99) , +12, 0.0248079, 0, 0, 0.574698,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611076,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475536,-99) , +13, 0.000249867, 0, 0, 0.572565,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268466,-99) , +7, 0.0113505, 0, 0, 0.41937,-99) , +16, 1097.91, 1, 0, 0.489781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212565,-99) , +13, 0.0114318, 1, 0, 0.451094,-99) , +4, 1.30681, 1, 0, 0.535835,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310893,-99) , +15, 0.100274, 0, 0, 0.497029,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48461,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0531792,-99) , +5, 2.13247, 1, 0, 0.127314,-99) , +12, 0.402474, 0, 0, 0.176677,-99) , +14, -3.79799, 1, 0, 0.299424,-99) , +5, 1.99674, 1, 0, 0.498026,-99) ); + // itree = 83 + fBoostWeights.push_back(0.021869); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581589,-99) , +2, 17.5, 0, 0, 0.637765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413725,-99) , +5, 0.565929, 0, 0, 0.613838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332839,-99) , +14, -4.36668, 0, 0, 0.593642,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464181,-99) , +15, 0.828835, 1, 0, 0.589334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365603,-99) , +8, 0.980027, 1, 0, 0.562237,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533091,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180214,-99) , +13, 0.0255579, 1, 0, 0.358534,-99) , +11, 1.5, 0, 0, 0.40823,-99) , +12, 0.124534, 1, 0, 0.484905,-99) , +4, 1.01361, 1, 0, 0.539589,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243082,-99) , +16, 622.819, 1, 0, 0.493019,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137091,-99) , +6, 0.795857, 1, 0, 0.333293,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0808185,-99) , +8, 0.803102, 0, 0, 0.223681,-99) , +11, 1.5, 0, 0, 0.327849,-99) , +5, 1.98518, 1, 0, 0.503747,-99) ); + // itree = 84 + fBoostWeights.push_back(0.0184658); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.698545,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590763,-99) , +10, -246.877, 1, 0, 0.620925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463617,-99) , +14, -3.82112, 0, 0, 0.594183,-99) , +3, 0.953186, 1, 0, 0.62146,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46263,-99) , +3, 0.996537, 1, 0, 0.576639,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385911,-99) , +6, 0.13098, 0, 0, 0.453187,-99) , +7, 0.0151495, 0, 0, 0.547119,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419478,-99) , +15, 0.681633, 1, 0, 0.525484,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239803,-99) , +15, 0.219535, 1, 0, 0.401835,-99) , +12, 0.113168, 1, 0, 0.45552,-99) , +4, 0.968162, 1, 0, 0.502045,-99) , +11, 1.5, 0, 0, 0.542002,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579679,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259299,-99) , +12, 0.131688, 1, 0, 0.382337,-99) , +9, -2.4095, 1, 0, 0.45769,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36583,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0355838,-99) , +11, 1.5, 0, 0, 0.0752519,-99) , +12, 0.0740975, 1, 0, 0.109506,-99) , +5, 1.87302, 1, 0, 0.222385,-99) , +13, 0.000926403, 1, 0, 0.344905,-99) , +4, 1.56479, 1, 0, 0.497185,-99) ); + // itree = 85 + fBoostWeights.push_back(0.0195176); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437941,-99) , +14, -3.80135, 0, 0, 0.626969,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300471,-99) , +7, 0.0287391, 1, 0, 0.511421,-99) , +2, 16.5, 0, 0, 0.560762,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194941,-99) , +3, 0.995683, 1, 0, 0.371722,-99) , +7, 0.105856, 1, 0, 0.548636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275883,-99) , +5, 2.13255, 1, 0, 0.538192,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41108,-99) , +9, -0.85321, 1, 0, 0.511479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259897,-99) , +6, 0.914763, 1, 0, 0.45382,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0381116,-99) , +5, 1.99574, 1, 0, 0.168935,-99) , +14, -3.25671, 1, 0, 0.303023,-99) , +4, 1.69361, 1, 0, 0.501687,-99) ); + // itree = 86 + fBoostWeights.push_back(0.0195095); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.735314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597083,-99) , +2, 25.5, 0, 0, 0.639434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457296,-99) , +5, 0.550482, 0, 0, 0.616908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38139,-99) , +14, -4.03503, 0, 0, 0.593345,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608046,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460287,-99) , +13, 0.00026218, 0, 0, 0.572321,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397757,-99) , +12, 0.124339, 1, 0, 0.459799,-99) , +11, 1.5, 0, 0, 0.495304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126388,-99) , +7, 0.135456, 1, 0, 0.482534,-99) , +4, 0.915104, 1, 0, 0.530653,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372009,-99) , +16, 352.102, 1, 0, 0.446795,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0342077,-99) , +4, 1.9275, 1, 0, 0.149937,-99) , +8, 0.946439, 0, 0, 0.290781,-99) , +5, 2.00674, 1, 0, 0.493516,-99) ); + // itree = 87 + fBoostWeights.push_back(0.0199932); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511172,-99) , +8, -0.877079, 0, 0, 0.629489,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44781,-99) , +1, 15.5, 0, 0, 0.512542,-99) , +8, 0.943904, 1, 0, 0.608415,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337937,-99) , +1, 12.5, 0, 0, 0.462326,-99) , +5, 1.90255, 1, 0, 0.591813,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427719,-99) , +13, 0.0140578, 1, 0, 0.568078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397014,-99) , +14, -3.39694, 0, 0, 0.541941,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296217,-99) , +7, 0.00953774, 0, 0, 0.449009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244741,-99) , +7, 0.0343321, 1, 0, 0.416293,-99) , +5, 1.52856, 1, 0, 0.491007,-99) , +16, 3087.95, 1, 0, 0.545226,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633216,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488462,-99) , +16, 1928.82, 1, 0, 0.571353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216599,-99) , +7, 0.0112556, 0, 0, 0.498673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273155,-99) , +5, 2.09923, 1, 0, 0.410328,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.045488,-99) , +5, 1.94292, 1, 0, 0.137345,-99) , +13, 0.00239201, 1, 0, 0.315272,-99) , +4, 1.63934, 1, 0, 0.503842,-99) ); + // itree = 88 + fBoostWeights.push_back(0.0181326); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606881,-99) , +13, 0.00202912, 0, 0, 0.6507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506211,-99) , +8, -0.875543, 0, 0, 0.631128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401042,-99) , +8, 0.98728, 1, 0, 0.602268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428609,-99) , +13, 0.000704504, 0, 0, 0.583458,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117724,-99) , +7, 0.0289324, 1, 0, 0.470875,-99) , +2, 16.5, 0, 0, 0.515172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267747,-99) , +7, 0.105856, 1, 0, 0.499112,-99) , +11, 1.5, 0, 0, 0.533049,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2363,-99) , +15, 0.122563, 0, 0, 0.407454,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0212207,-99) , +4, 1.9888, 1, 0, 0.190347,-99) , +13, 0.000847252, 1, 0, 0.299347,-99) , +4, 1.74795, 1, 0, 0.501908,-99) ); + // itree = 89 + fBoostWeights.push_back(0.0217758); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613348,-99) , +13, 0.0023881, 0, 0, 0.649832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477026,-99) , +8, -0.879733, 0, 0, 0.627932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445831,-99) , +14, -4.47461, 0, 0, 0.609878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541282,-99) , +6, 0.418006, 1, 0, 0.586639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362363,-99) , +13, 0.000419416, 0, 0, 0.555986,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265795,-99) , +7, 0.00860076, 0, 0, 0.484757,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0501687,-99) , +4, 1.58661, 1, 0, 0.244468,-99) , +13, 0.00509737, 1, 0, 0.425054,-99) , +5, 1.54659, 1, 0, 0.500464,-99) , +11, 1.5, 0, 0, 0.536283,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282139,-99) , +5, 2.087, 1, 0, 0.385313,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.00710106,-99) , +11, 1.5, 0, 0, 0.106093,-99) , +13, 0.000845293, 1, 0, 0.253606,-99) , +4, 1.76778, 1, 0, 0.502807,-99) ); + // itree = 90 + fBoostWeights.push_back(0.0189157); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52887,-99) , +5, 1.54305, 1, 0, 0.621527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376133,-99) , +7, 0.133535, 1, 0, 0.603773,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489595,-99) , +16, 285.864, 1, 0, 0.527024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306467,-99) , +7, 0.0262918, 1, 0, 0.506499,-99) , +2, 14.5, 0, 0, 0.558809,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31376,-99) , +5, 1.44608, 0, 0, 0.367496,-99) , +12, 0.0305869, 0, 0, 0.542943,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463365,-99) , +3, 0.989666, 0, 0, 0.554536,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310623,-99) , +14, -3.13362, 1, 0, 0.38611,-99) , +11, 1.5, 0, 0, 0.440371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0851119,-99) , +13, 8.33823e-05, 1, 0, 0.221029,-99) , +5, 2.15959, 1, 0, 0.38728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0791392,-99) , +13, 0.0162192, 1, 0, 0.354963,-99) , +4, 1.5161, 1, 0, 0.495291,-99) ); + // itree = 91 + fBoostWeights.push_back(0.0198124); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356263,-99) , +3, 0.999372, 1, 0, 0.583594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179231,-99) , +5, 2.16118, 1, 0, 0.576352,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300844,-99) , +12, 0.0758187, 0, 0, 0.391553,-99) , +14, -4.1307, 0, 0, 0.557203,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259258,-99) , +15, 0.0470278, 0, 0, 0.350276,-99) , +7, 0.00921753, 0, 0, 0.543307,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476593,-99) , +16, 529.748, 1, 0, 0.544914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244957,-99) , +7, 0.0102629, 0, 0, 0.49737,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501174,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1444,-99) , +14, -4.18852, 1, 0, 0.296073,-99) , +5, 2.08167, 1, 0, 0.429539,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0684445,-99) , +11, 1.5, 0, 0, 0.16502,-99) , +13, 0.00447542, 1, 0, 0.359975,-99) , +4, 1.5491, 1, 0, 0.500643,-99) ); + // itree = 92 + fBoostWeights.push_back(0.0217123); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.746102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619563,-99) , +16, 1563.47, 1, 0, 0.689308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488639,-99) , +8, 0.914247, 1, 0, 0.648303,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437194,-99) , +8, -0.822758, 0, 0, 0.569386,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296399,-99) , +6, 0.15232, 0, 0, 0.419406,-99) , +7, 0.0129444, 0, 0, 0.539206,-99) , +12, 0.108266, 1, 0, 0.583507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386041,-99) , +12, 0.0312035, 0, 0, 0.567581,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511005,-99) , +16, 372.662, 1, 0, 0.557852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348474,-99) , +0, 44.5, 1, 0, 0.531875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311269,-99) , +5, 2.0752, 1, 0, 0.490461,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339294,-99) , +2, 14.5, 0, 0, 0.449785,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412579,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270498,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0670345,-99) , +5, 1.83611, 1, 0, 0.181081,-99) , +8, 0.965985, 0, 0, 0.239314,-99) , +11, 1.5, 0, 0, 0.303645,-99) , +12, 0.125377, 1, 0, 0.393837,-99) , +4, 1.2844, 1, 0, 0.497382,-99) ); + // itree = 93 + fBoostWeights.push_back(0.0171173); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510379,-99) , +14, -3.88689, 0, 0, 0.620568,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470638,-99) , +4, 0.838426, 1, 0, 0.519939,-99) , +12, 0.104401, 1, 0, 0.561227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325194,-99) , +12, 0.0220001, 0, 0, 0.551619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334797,-99) , +8, -0.979986, 0, 0, 0.540476,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52018,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0914222,-99) , +4, 2.06944, 1, 0, 0.296996,-99) , +9, -2.38794, 1, 0, 0.384462,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0198921,-99) , +4, 1.90411, 1, 0, 0.128439,-99) , +14, -2.81166, 1, 0, 0.282166,-99) , +4, 1.69232, 1, 0, 0.502351,-99) ); + // itree = 94 + fBoostWeights.push_back(0.0162405); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645518,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52533,-99) , +2, 11.5, 0, 0, 0.607583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3929,-99) , +14, -4.74664, 0, 0, 0.592424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413644,-99) , +7, 0.0891079, 1, 0, 0.576592,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495184,-99) , +2, 15.5, 0, 0, 0.576034,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432381,-99) , +4, 0.787688, 1, 0, 0.468376,-99) , +9, 3.6084, 0, 0, 0.490284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184335,-99) , +5, 2.13255, 1, 0, 0.480696,-99) , +16, 1980.28, 1, 0, 0.529748,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414981,-99) , +9, -0.797148, 1, 0, 0.492767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211702,-99) , +7, 0.0113747, 0, 0, 0.439833,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0629665,-99) , +5, 2.01186, 1, 0, 0.139284,-99) , +14, -3.01927, 1, 0, 0.304391,-99) , +4, 1.6916, 1, 0, 0.495957,-99) ); + // itree = 95 + fBoostWeights.push_back(0.0173433); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.721454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603806,-99) , +6, 0.458611, 1, 0, 0.676877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5421,-99) , +8, -0.760795, 0, 0, 0.646811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526129,-99) , +13, 0.000251551, 0, 0, 0.622859,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422125,-99) , +12, 0.0314081, 0, 0, 0.589662,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415836,-99) , +2, 11.5, 0, 0, 0.493436,-99) , +12, 0.111582, 1, 0, 0.537133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247406,-99) , +5, 2.11342, 1, 0, 0.529212,-99) , +11, 1.5, 0, 0, 0.560756,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401436,-99) , +3, 0.955413, 0, 0, 0.552706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34222,-99) , +4, 1.99623, 1, 0, 0.526213,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576988,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24916,-99) , +5, 1.96314, 1, 0, 0.338803,-99) , +12, 0.363931, 0, 0, 0.382304,-99) , +12, 0.114438, 1, 0, 0.456541,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0890325,-99) , +5, 1.7904, 1, 0, 0.213708,-99) , +13, 0.0060939, 1, 0, 0.402039,-99) , +4, 1.38451, 1, 0, 0.506723,-99) ); + // itree = 96 + fBoostWeights.push_back(0.0160424); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528062,-99) , +14, -3.92827, 0, 0, 0.63509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493656,-99) , +1, 9.5, 0, 0, 0.609637,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411212,-99) , +7, 0.0888007, 1, 0, 0.589267,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467379,-99) , +14, -2.67991, 0, 0, 0.566951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387252,-99) , +13, 0.0216506, 1, 0, 0.545866,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425664,-99) , +2, 15.5, 0, 0, 0.463024,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0766566,-99) , +15, 0.289983, 1, 0, 0.301962,-99) , +14, -2.08403, 1, 0, 0.432964,-99) , +5, 1.46768, 1, 0, 0.486918,-99) , +16, 471.403, 1, 0, 0.526502,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458703,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0890269,-99) , +12, 0.0962158, 1, 0, 0.144083,-99) , +13, 0.000329268, 1, 0, 0.276415,-99) , +4, 1.82197, 1, 0, 0.501752,-99) ); + // itree = 97 + fBoostWeights.push_back(0.019755); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644618,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531286,-99) , +5, 1.65148, 1, 0, 0.610881,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233949,-99) , +5, 1.46692, 1, 0, 0.43724,-99) , +13, 0.0183607, 1, 0, 0.584509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320165,-99) , +12, 0.0227143, 0, 0, 0.571883,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412931,-99) , +8, 0.932608, 1, 0, 0.540293,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28121,-99) , +7, 0.00930478, 0, 0, 0.410289,-99) , +15, 0.0832199, 0, 0, 0.478983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.190441,-99) , +7, 0.02356, 1, 0, 0.455446,-99) , +2, 11.5, 0, 0, 0.535561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527364,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303058,-99) , +9, -2.44251, 1, 0, 0.392284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0814674,-99) , +14, -2.81152, 1, 0, 0.275354,-99) , +4, 1.77237, 1, 0, 0.505214,-99) ); + // itree = 98 + fBoostWeights.push_back(0.0198324); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.711808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569767,-99) , +6, 0.669809, 1, 0, 0.654908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452613,-99) , +8, -0.900614, 0, 0, 0.623429,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377429,-99) , +14, -4.46857, 0, 0, 0.476886,-99) , +8, 0.900938, 1, 0, 0.589431,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458797,-99) , +14, -2.69185, 0, 0, 0.570563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356879,-99) , +13, 0.0191652, 1, 0, 0.542613,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342591,-99) , +4, 1.69358, 1, 0, 0.45004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259645,-99) , +13, 0.00804718, 1, 0, 0.413867,-99) , +5, 1.55239, 1, 0, 0.486499,-99) , +16, 471.539, 1, 0, 0.52559,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535082,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498516,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0450939,-99) , +5, 2.24249, 1, 0, 0.1381,-99) , +12, 0.39079, 0, 0, 0.193007,-99) , +14, -4.15247, 1, 0, 0.30408,-99) , +5, 2.06085, 1, 0, 0.497093,-99) ); + // itree = 99 + fBoostWeights.push_back(0.0191279); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520459,-99) , +13, 0.0202425, 1, 0, 0.630106,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42619,-99) , +6, 0.445486, 1, 0, 0.47874,-99) , +2, 11.5, 0, 0, 0.593788,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459958,-99) , +12, 0.11373, 1, 0, 0.52676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289776,-99) , +14, -1.97542, 1, 0, 0.491538,-99) , +5, 1.44028, 1, 0, 0.54727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298455,-99) , +12, 0.0227284, 0, 0, 0.536976,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376003,-99) , +16, 790.948, 1, 0, 0.556978,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364194,-99) , +9, -0.936751, 1, 0, 0.428258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200589,-99) , +5, 2.23605, 1, 0, 0.374721,-99) , +11, 1.5, 0, 0, 0.44559,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0429874,-99) , +4, 1.73263, 1, 0, 0.154488,-99) , +13, 0.00304861, 1, 0, 0.367804,-99) , +5, 1.8689, 1, 0, 0.496297,-99) ); + // itree = 100 + fBoostWeights.push_back(0.0181301); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.760842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642259,-99) , +6, 0.370789, 1, 0, 0.698429,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504858,-99) , +13, 0.00117437, 0, 0, 0.653199,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469121,-99) , +8, -0.844299, 0, 0, 0.579339,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364368,-99) , +15, 0.0582672, 0, 0, 0.482981,-99) , +16, 452.392, 1, 0, 0.519068,-99) , +2, 26.5, 0, 0, 0.545575,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220202,-99) , +5, 1.31259, 1, 0, 0.381051,-99) , +7, 0.0997213, 1, 0, 0.533458,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376426,-99) , +7, 0.0150006, 0, 0, 0.557568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306365,-99) , +5, 2.16551, 1, 0, 0.480452,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280348,-99) , +3, 0.973423, 0, 0, 0.423117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0973455,-99) , +0, 57.5, 1, 0, 0.382697,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.190442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0804575,-99) , +4, 1.8969, 1, 0, 0.119781,-99) , +5, 1.96488, 1, 0, 0.268752,-99) , +14, -3.47533, 1, 0, 0.350469,-99) , +4, 1.57362, 1, 0, 0.493827,-99) ); + // itree = 101 + fBoostWeights.push_back(0.0191759); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468547,-99) , +8, -0.925494, 0, 0, 0.595616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375673,-99) , +14, -4.61716, 0, 0, 0.580497,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232181,-99) , +3, 0.996398, 1, 0, 0.394669,-99) , +7, 0.0996536, 1, 0, 0.564542,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48043,-99) , +10, 2514.31, 1, 0, 0.543067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249584,-99) , +5, 1.85189, 1, 0, 0.437997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259821,-99) , +6, 0.532423, 1, 0, 0.379212,-99) , +12, 0.118693, 1, 0, 0.456888,-99) , +7, 0.0131437, 0, 0, 0.54213,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561594,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477289,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117216,-99) , +5, 2.16631, 1, 0, 0.254237,-99) , +16, 352.171, 1, 0, 0.336813,-99) , +9, -3.18989, 1, 0, 0.407552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0796022,-99) , +14, -2.40037, 1, 0, 0.323834,-99) , +4, 1.63664, 1, 0, 0.503143,-99) ); + // itree = 102 + fBoostWeights.push_back(0.0177732); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.705068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562521,-99) , +13, 0.00117823, 0, 0, 0.672572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520661,-99) , +0, 14.5, 0, 0, 0.632394,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529591,-99) , +8, 0.932324, 1, 0, 0.603778,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344419,-99) , +13, 0.00628121, 1, 0, 0.469057,-99) , +11, 1.5, 0, 0, 0.516334,-99) , +5, 1.44014, 1, 0, 0.568364,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438469,-99) , +2, 13.5, 0, 0, 0.501719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351963,-99) , +8, -0.769856, 0, 0, 0.478374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154197,-99) , +7, 0.156808, 1, 0, 0.460954,-99) , +6, 0.711306, 1, 0, 0.528891,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401046,-99) , +16, 390.18, 1, 0, 0.498293,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.079665,-99) , +13, 0.00397035, 1, 0, 0.176124,-99) , +8, 0.946499, 0, 0, 0.3334,-99) , +5, 1.98508, 1, 0, 0.496615,-99) ); + // itree = 103 + fBoostWeights.push_back(0.0151375); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477256,-99) , +14, -3.6516, 0, 0, 0.574503,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292273,-99) , +15, 0.099248, 0, 0, 0.441979,-99) , +8, -0.902173, 0, 0, 0.559079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158855,-99) , +5, 1.41138, 1, 0, 0.381442,-99) , +7, 0.0996953, 1, 0, 0.54732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250451,-99) , +5, 2.22389, 1, 0, 0.540402,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526826,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381695,-99) , +12, 0.14297, 1, 0, 0.458033,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205828,-99) , +11, 1.5, 0, 0, 0.315629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0253792,-99) , +4, 1.98886, 1, 0, 0.233064,-99) , +8, 0.898296, 0, 0, 0.339312,-99) , +4, 1.69349, 1, 0, 0.509614,-99) ); + // itree = 104 + fBoostWeights.push_back(0.018548); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440166,-99) , +14, -4.37487, 0, 0, 0.627361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469746,-99) , +8, -0.801852, 0, 0, 0.60465,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421771,-99) , +14, -4.01512, 0, 0, 0.571728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210647,-99) , +4, 1.66864, 1, 0, 0.447341,-99) , +12, 0.113974, 1, 0, 0.50126,-99) , +11, 1.5, 0, 0, 0.534223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28815,-99) , +12, 0.0236222, 0, 0, 0.521942,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568158,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0330045,-99) , +5, 2.26441, 1, 0, 0.101114,-99) , +14, -3.91485, 1, 0, 0.298633,-99) , +5, 2.08853, 1, 0, 0.496843,-99) ); + // itree = 105 + fBoostWeights.push_back(0.0164415); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43174,-99) , +14, -4.36894, 0, 0, 0.615379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39345,-99) , +7, 0.133596, 1, 0, 0.600483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412142,-99) , +12, 0.0313859, 0, 0, 0.583012,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456126,-99) , +6, 0.477871, 1, 0, 0.52274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366795,-99) , +5, 1.90366, 1, 0, 0.503113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303964,-99) , +7, 0.0234991, 1, 0, 0.483371,-99) , +2, 12.5, 0, 0, 0.547407,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403354,-99) , +16, 134.248, 1, 0, 0.503869,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24068,-99) , +4, 1.776, 1, 0, 0.357527,-99) , +11, 1.5, 0, 0, 0.403855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0888063,-99) , +7, 0.105502, 1, 0, 0.383619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134656,-99) , +4, 2.07381, 1, 0, 0.349213,-99) , +4, 1.53231, 1, 0, 0.50098,-99) ); + // itree = 106 + fBoostWeights.push_back(0.0173628); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444318,-99) , +8, -0.915358, 0, 0, 0.619802,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412296,-99) , +12, 0.0897527, 0, 0, 0.488964,-99) , +8, 0.93901, 1, 0, 0.59435,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393147,-99) , +2, 9.5, 0, 0, 0.532798,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260328,-99) , +13, 0.0060508, 1, 0, 0.414049,-99) , +4, 1.31227, 1, 0, 0.497793,-99) , +16, 1042.88, 1, 0, 0.541777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234544,-99) , +13, 0.0591673, 1, 0, 0.533359,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612033,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450122,-99) , +12, 0.0939697, 1, 0, 0.531951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319804,-99) , +2, 11.5, 0, 0, 0.450036,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0286337,-99) , +4, 1.92618, 1, 0, 0.173508,-99) , +13, 0.000830698, 1, 0, 0.334803,-99) , +5, 1.92921, 1, 0, 0.496111,-99) ); + // itree = 107 + fBoostWeights.push_back(0.0153943); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.730616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628183,-99) , +3, 0.983521, 1, 0, 0.676266,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491593,-99) , +13, 0.00927753, 1, 0, 0.577106,-99) , +0, 29.5, 0, 0, 0.611943,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50216,-99) , +2, 18.5, 0, 0, 0.539488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388554,-99) , +14, -4.17783, 0, 0, 0.524321,-99) , +16, 2443.56, 1, 0, 0.570209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353136,-99) , +12, 0.0227741, 0, 0, 0.560118,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523606,-99) , +13, 0.00107439, 1, 0, 0.578148,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397287,-99) , +10, -1141.62, 1, 0, 0.4364,-99) , +16, 69.7789, 1, 0, 0.469841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218122,-99) , +13, 0.0173618, 1, 0, 0.446254,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107636,-99) , +13, 0.000472355, 1, 0, 0.257482,-99) , +4, 1.83319, 1, 0, 0.401272,-99) , +4, 1.29379, 1, 0, 0.499008,-99) ); + // itree = 108 + fBoostWeights.push_back(0.0172027); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573547,-99) , +6, 0.149822, 1, 0, 0.599276,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297671,-99) , +7, 0.0263038, 1, 0, 0.500592,-99) , +2, 13.5, 0, 0, 0.55544,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317684,-99) , +10, 2494.45, 1, 0, 0.390599,-99) , +14, -4.22198, 0, 0, 0.539355,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0114776,-99) , +1, 24.5, 0, 0, 0.36371,-99) , +7, 0.107797, 1, 0, 0.527843,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367154,-99) , +11, 1.5, 0, 0, 0.465817,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374527,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0227128,-99) , +4, 1.96531, 1, 0, 0.0747481,-99) , +4, 1.49896, 1, 0, 0.173892,-99) , +8, 0.909885, 0, 0, 0.329946,-99) , +5, 1.98133, 1, 0, 0.496059,-99) ); + // itree = 109 + fBoostWeights.push_back(0.0174708); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.705973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576747,-99) , +1, 15.5, 0, 0, 0.648226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440835,-99) , +14, -4.03771, 0, 0, 0.626571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433207,-99) , +5, 0.459309, 0, 0, 0.59903,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489416,-99) , +13, 0.0167301, 1, 0, 0.597731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271917,-99) , +7, 0.0337499, 1, 0, 0.489893,-99) , +2, 20.5, 0, 0, 0.517958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237449,-99) , +7, 0.119436, 1, 0, 0.505953,-99) , +4, 0.769586, 1, 0, 0.53823,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409249,-99) , +16, 527.004, 1, 0, 0.482602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.010112,-99) , +6, 0.480851, 1, 0, 0.156555,-99) , +8, 0.946439, 0, 0, 0.317641,-99) , +5, 1.98498, 1, 0, 0.503382,-99) ); + // itree = 110 + fBoostWeights.push_back(0.0153964); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353267,-99) , +14, -4.97388, 0, 0, 0.56653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235476,-99) , +7, 0.0890556, 1, 0, 0.370777,-99) , +13, 0.0252094, 1, 0, 0.552224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295822,-99) , +12, 0.0222372, 0, 0, 0.541111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323087,-99) , +5, 2.05525, 1, 0, 0.529784,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577472,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364007,-99) , +1, 14.5, 0, 0, 0.435658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180309,-99) , +7, 0.0124203, 0, 0, 0.364283,-99) , +9, -3.23215, 1, 0, 0.434464,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0953487,-99) , +15, 0.0591385, 1, 0, 0.164852,-99) , +13, 0.0021407, 1, 0, 0.340871,-99) , +4, 1.6645, 1, 0, 0.498092,-99) ); + // itree = 111 + fBoostWeights.push_back(0.013655); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391826,-99) , +14, -4.99106, 0, 0, 0.567201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275116,-99) , +5, 2.23562, 1, 0, 0.561731,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365998,-99) , +3, 0.999378, 1, 0, 0.550572,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294447,-99) , +9, 0.655043, 0, 0, 0.381073,-99) , +7, 0.00941114, 0, 0, 0.536841,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533033,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283036,-99) , +7, 0.0151611, 0, 0, 0.443117,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258073,-99) , +0, 11.5, 1, 0, 0.320777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0581204,-99) , +7, 0.0888295, 1, 0, 0.280577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0367632,-99) , +5, 2.22326, 1, 0, 0.231698,-99) , +14, -3.25692, 1, 0, 0.331608,-99) , +4, 1.66909, 1, 0, 0.503224,-99) ); + // itree = 112 + fBoostWeights.push_back(0.0185634); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600336,-99) , +2, 26.5, 0, 0, 0.628152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482028,-99) , +8, 0.983158, 1, 0, 0.609987,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369937,-99) , +3, 0.989785, 1, 0, 0.434839,-99) , +12, 0.0312411, 0, 0, 0.578632,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485443,-99) , +16, 2723.31, 1, 0, 0.542373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324244,-99) , +7, 0.0910291, 1, 0, 0.522903,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265677,-99) , +6, 0.271209, 0, 0, 0.37492,-99) , +2, 9.5, 0, 0, 0.497607,-99) , +12, 0.128764, 1, 0, 0.54035,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291852,-99) , +7, 0.0135637, 0, 0, 0.521769,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310215,-99) , +11, 1.5, 0, 0, 0.40967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.016953,-99) , +4, 1.96796, 1, 0, 0.336134,-99) , +8, 0.946397, 0, 0, 0.407558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0600783,-99) , +7, 0.0661625, 1, 0, 0.368487,-99) , +4, 1.57866, 1, 0, 0.504046,-99) ); + // itree = 113 + fBoostWeights.push_back(0.0190903); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647801,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50021,-99) , +5, 0.641559, 0, 0, 0.626501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421359,-99) , +8, 0.981987, 1, 0, 0.604414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451363,-99) , +8, -0.896424, 0, 0, 0.582889,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481788,-99) , +2, 11.5, 0, 0, 0.558942,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324443,-99) , +12, 0.27408, 0, 0, 0.404474,-99) , +15, 0.0875556, 0, 0, 0.518034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324766,-99) , +13, 0.0162256, 1, 0, 0.496988,-99) , +4, 1.0143, 1, 0, 0.543343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452895,-99) , +9, -1.87333, 1, 0, 0.511775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335675,-99) , +2, 11.5, 0, 0, 0.44448,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250588,-99) , +1, 12.5, 0, 0, 0.436093,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482603,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0326517,-99) , +1, 16.5, 0, 0, 0.10472,-99) , +16, 10.6621, 1, 0, 0.163607,-99) , +4, 1.55309, 1, 0, 0.285009,-99) , +14, -3.25001, 1, 0, 0.362374,-99) , +5, 1.82087, 1, 0, 0.49521,-99) ); + // itree = 114 + fBoostWeights.push_back(0.015976); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5689,-99) , +16, 5e+09, 1, 0, 0.633611,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381489,-99) , +2, 9.5, 0, 0, 0.514894,-99) , +6, 0.398492, 1, 0, 0.562322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365717,-99) , +14, -4.11747, 0, 0, 0.546601,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329339,-99) , +12, 0.0287451, 0, 0, 0.483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269976,-99) , +7, 0.00763958, 0, 0, 0.470296,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130156,-99) , +15, 0.218817, 1, 0, 0.304887,-99) , +14, -2.06928, 1, 0, 0.443916,-99) , +5, 1.65143, 1, 0, 0.510495,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453155,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0159765,-99) , +12, 0.149436, 1, 0, 0.12495,-99) , +14, -4.23912, 1, 0, 0.208338,-99) , +4, 1.84914, 1, 0, 0.486455,-99) ); + // itree = 115 + fBoostWeights.push_back(0.0153155); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494684,-99) , +8, 0.947027, 1, 0, 0.587425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416095,-99) , +12, 0.0312085, 0, 0, 0.569194,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502956,-99) , +11, 1.5, 0, 0, 0.553818,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212984,-99) , +5, 2.12682, 1, 0, 0.433477,-99) , +16, 206.275, 1, 0, 0.468681,-99) , +2, 13.5, 0, 0, 0.523859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303237,-99) , +13, 0.0335201, 1, 0, 0.512574,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1795,-99) , +7, 0.0135769, 0, 0, 0.398287,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0672758,-99) , +16, 60.6075, 1, 0, 0.124102,-99) , +14, -3.32465, 1, 0, 0.252068,-99) , +4, 1.77352, 1, 0, 0.484119,-99) ); + // itree = 116 + fBoostWeights.push_back(0.015469); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613969,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386598,-99) , +14, -4.70047, 0, 0, 0.594319,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44189,-99) , +4, 0.996379, 1, 0, 0.503083,-99) , +12, 0.126969, 1, 0, 0.551206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284334,-99) , +12, 0.0197206, 0, 0, 0.541516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298434,-99) , +13, 0.0405199, 1, 0, 0.531318,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451073,-99) , +4, 1.79711, 1, 0, 0.532371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372717,-99) , +5, 2.35607, 1, 0, 0.498313,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201677,-99) , +12, 0.0963566, 1, 0, 0.307378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0333309,-99) , +5, 2.2278, 1, 0, 0.216307,-99) , +8, 0.946429, 0, 0, 0.348404,-99) , +5, 1.99354, 1, 0, 0.502784,-99) ); + // itree = 117 + fBoostWeights.push_back(0.0139219); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583361,-99) , +0, 16.5, 0, 0, 0.663567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512617,-99) , +11, 1.5, 0, 0, 0.564574,-99) , +4, 0.963236, 1, 0, 0.615764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4512,-99) , +8, 0.982659, 1, 0, 0.596192,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494443,-99) , +2, 27.5, 0, 0, 0.517281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292328,-99) , +7, 0.0989954, 1, 0, 0.504903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16921,-99) , +5, 2.18196, 1, 0, 0.496815,-99) , +16, 489.002, 1, 0, 0.534865,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397206,-99) , +8, 0.982771, 0, 0, 0.450615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164256,-99) , +3, 0.892951, 0, 0, 0.42451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0662242,-99) , +3, 0.999232, 1, 0, 0.403596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0977059,-99) , +13, 0.00975845, 1, 0, 0.357482,-99) , +4, 1.64383, 1, 0, 0.503982,-99) ); + // itree = 118 + fBoostWeights.push_back(0.0164642); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446563,-99) , +12, 0.0310822, 0, 0, 0.640664,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455792,-99) , +11, 1.5, 0, 0, 0.503351,-99) , +12, 0.123408, 1, 0, 0.565583,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411153,-99) , +7, 0.0171295, 0, 0, 0.466646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3219,-99) , +15, 1.05816, 1, 0, 0.448931,-99) , +14, -3.54045, 0, 0, 0.537453,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501777,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218442,-99) , +13, 0.0138407, 1, 0, 0.329796,-99) , +16, 309.2, 1, 0, 0.392368,-99) , +8, -0.894523, 0, 0, 0.520051,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488137,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0391746,-99) , +14, -2.6219, 1, 0, 0.113736,-99) , +13, 0.000280906, 1, 0, 0.28322,-99) , +4, 1.82193, 1, 0, 0.498087,-99) ); + // itree = 119 + fBoostWeights.push_back(0.0175939); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552895,-99) , +2, 16.5, 0, 0, 0.603689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392508,-99) , +5, 0.505772, 0, 0, 0.584766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37123,-99) , +14, -4.23652, 0, 0, 0.567788,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491849,-99) , +2, 19.5, 0, 0, 0.51595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319285,-99) , +3, 0.886912, 0, 0, 0.49794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263445,-99) , +7, 0.0769993, 1, 0, 0.47717,-99) , +4, 1.13353, 1, 0, 0.530834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578913,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302169,-99) , +5, 2.10321, 1, 0, 0.395456,-99) , +9, -3.05457, 1, 0, 0.445439,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335083,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274215,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0436747,-99) , +4, 1.265, 1, 0, 0.0963384,-99) , +11, 1.5, 0, 0, 0.1771,-99) , +14, -3.29056, 1, 0, 0.317519,-99) , +5, 1.93008, 1, 0, 0.491847,-99) ); + // itree = 120 + fBoostWeights.push_back(0.0125149); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436411,-99) , +14, -4.36716, 0, 0, 0.557738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303986,-99) , +5, 2.23291, 1, 0, 0.550817,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540503,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395834,-99) , +2, 26.5, 0, 0, 0.4751,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161318,-99) , +4, 1.28014, 1, 0, 0.397111,-99) , +13, 0.0188521, 1, 0, 0.533715,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264549,-99) , +16, 1066.19, 1, 0, 0.337943,-99) , +7, 0.00910354, 0, 0, 0.519902,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101684,-99) , +14, -3.32041, 1, 0, 0.252803,-99) , +4, 1.90974, 1, 0, 0.502262,-99) ); + // itree = 121 + fBoostWeights.push_back(0.0157846); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541418,-99) , +2, 11.5, 0, 0, 0.617654,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437872,-99) , +3, 0.981142, 1, 0, 0.501919,-99) , +14, -3.79983, 0, 0, 0.596482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431468,-99) , +8, -0.924901, 0, 0, 0.580584,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439197,-99) , +15, 0.822559, 1, 0, 0.535978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423003,-99) , +7, 0.0106964, 0, 0, 0.519322,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279228,-99) , +3, 0.992378, 1, 0, 0.398946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203462,-99) , +5, 2.18774, 1, 0, 0.373245,-99) , +5, 1.76074, 1, 0, 0.493107,-99) , +16, 1292.3, 1, 0, 0.534724,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102549,-99) , +13, 0.00833957, 1, 0, 0.344878,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0932334,-99) , +12, 0.0740975, 1, 0, 0.135824,-99) , +4, 1.83113, 1, 0, 0.240522,-99) , +14, -4.20791, 1, 0, 0.343241,-99) , +4, 1.63857, 1, 0, 0.501627,-99) ); + // itree = 122 + fBoostWeights.push_back(0.0140503); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704298,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555065,-99) , +13, 0.00111487, 0, 0, 0.651639,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46531,-99) , +4, 0.39941, 0, 0, 0.537879,-99) , +1, 14.5, 0, 0, 0.601902,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472792,-99) , +13, 0.0123293, 1, 0, 0.575236,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453618,-99) , +14, -3.83844, 0, 0, 0.560397,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47721,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333608,-99) , +8, -0.827154, 0, 0, 0.458706,-99) , +16, 232.817, 1, 0, 0.490141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220991,-99) , +7, 0.117609, 1, 0, 0.477845,-99) , +4, 0.879825, 1, 0, 0.515776,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374489,-99) , +8, 0.995326, 0, 0, 0.486166,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0509425,-99) , +5, 2.20653, 1, 0, 0.154033,-99) , +8, 0.950408, 0, 0, 0.316991,-99) , +5, 2.06808, 1, 0, 0.492964,-99) ); + // itree = 123 + fBoostWeights.push_back(0.0135396); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545935,-99) , +3, 0.996609, 1, 0, 0.653678,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523894,-99) , +7, 0.0208045, 0, 0, 0.559247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439374,-99) , +7, 0.0341851, 1, 0, 0.542519,-99) , +2, 25.5, 0, 0, 0.577913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359284,-99) , +12, 0.0311044, 0, 0, 0.560092,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546093,-99) , +0, 17.5, 0, 0, 0.595181,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236847,-99) , +5, 2.00492, 1, 0, 0.47594,-99) , +16, 950.849, 1, 0, 0.560105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289378,-99) , +5, 2.47021, 1, 0, 0.546069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361923,-99) , +3, 0.971401, 0, 0, 0.444071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.091386,-99) , +13, 0.0394779, 1, 0, 0.430396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208622,-99) , +4, 1.87398, 1, 0, 0.400432,-99) , +11, 1.5, 0, 0, 0.448806,-99) , +4, 1.0454, 1, 0, 0.499568,-99) ); + // itree = 124 + fBoostWeights.push_back(0.0151088); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513656,-99) , +13, 0.000774387, 0, 0, 0.638882,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405548,-99) , +8, 0.864954, 0, 0, 0.502648,-99) , +5, 1.63665, 1, 0, 0.603776,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452529,-99) , +7, 0.013592, 0, 0, 0.506692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226771,-99) , +7, 0.0331112, 1, 0, 0.49005,-99) , +2, 17.5, 0, 0, 0.534084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297349,-99) , +7, 0.138535, 1, 0, 0.525061,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0957862,-99) , +13, 0.000477953, 1, 0, 0.27825,-99) , +4, 1.82018, 1, 0, 0.502827,-99) ); + // itree = 125 + fBoostWeights.push_back(0.014507); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444597,-99) , +13, 0.0188935, 1, 0, 0.562307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40229,-99) , +12, 0.028597, 0, 0, 0.550118,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273763,-99) , +15, 0.0467625, 0, 0, 0.380309,-99) , +7, 0.0094035, 0, 0, 0.537048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25696,-99) , +7, 0.172661, 1, 0, 0.529824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605409,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454751,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2648,-99) , +5, 2.40674, 1, 0, 0.431258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.119783,-99) , +7, 0.0395947, 1, 0, 0.403736,-99) , +1, 23.5, 0, 0, 0.450438,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0430486,-99) , +4, 1.87159, 1, 0, 0.171342,-99) , +8, 0.736085, 0, 0, 0.349819,-99) , +5, 1.89419, 1, 0, 0.492133,-99) ); + // itree = 126 + fBoostWeights.push_back(0.0139887); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667378,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551449,-99) , +11, 1.5, 0, 0, 0.591421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482249,-99) , +6, 0.152798, 0, 0, 0.576847,-99) , +4, 0.421574, 1, 0, 0.596358,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326126,-99) , +12, 0.0298482, 0, 0, 0.523876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283695,-99) , +0, 92.5, 1, 0, 0.512883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327817,-99) , +7, 0.00930642, 0, 0, 0.496568,-99) , +16, 474.304, 1, 0, 0.534908,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160952,-99) , +4, 1.89949, 1, 0, 0.296603,-99) , +16, 286.211, 1, 0, 0.382007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128602,-99) , +13, 0.00342871, 1, 0, 0.309532,-99) , +4, 1.66881, 1, 0, 0.500865,-99) ); + // itree = 127 + fBoostWeights.push_back(0.0157063); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512842,-99) , +8, 0.897127, 1, 0, 0.602803,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397898,-99) , +3, 0.993406, 1, 0, 0.475513,-99) , +13, 0.0137931, 1, 0, 0.579062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391964,-99) , +12, 0.0258567, 0, 0, 0.567667,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471361,-99) , +16, 1084.38, 1, 0, 0.514333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354619,-99) , +3, 0.909103, 0, 0, 0.494348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102938,-99) , +7, 0.114794, 1, 0, 0.477951,-99) , +4, 1.24526, 1, 0, 0.53803,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652169,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264425,-99) , +7, 0.011647, 0, 0, 0.443411,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18385,-99) , +5, 2.33287, 1, 0, 0.401373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128163,-99) , +14, -2.51393, 1, 0, 0.332131,-99) , +12, 0.437594, 0, 0, 0.36646,-99) , +5, 1.9082, 1, 0, 0.503512,-99) ); + // itree = 128 + fBoostWeights.push_back(0.0131241); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522421,-99) , +16, 471.542, 1, 0, 0.552748,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33253,-99) , +12, 0.129568, 1, 0, 0.432392,-99) , +8, -0.895154, 0, 0, 0.537871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2851,-99) , +14, -5.52083, 0, 0, 0.531098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179299,-99) , +5, 2.23285, 1, 0, 0.524513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210217,-99) , +9, -0.0814008, 0, 0, 0.387866,-99) , +9, -3.15285, 1, 0, 0.448111,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209765,-99) , +10, 891.521, 1, 0, 0.288896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0509321,-99) , +4, 1.94694, 1, 0, 0.210777,-99) , +13, 0.000689269, 1, 0, 0.332537,-99) , +4, 1.66454, 1, 0, 0.493566,-99) ); + // itree = 129 + fBoostWeights.push_back(0.0146623); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464881,-99) , +8, -0.932694, 0, 0, 0.571079,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343849,-99) , +7, 0.135187, 1, 0, 0.560828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370168,-99) , +12, 0.0286182, 0, 0, 0.547259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327928,-99) , +7, 0.00888538, 0, 0, 0.536433,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450612,-99) , +8, 0.979024, 1, 0, 0.570907,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361004,-99) , +10, 390.169, 1, 0, 0.425485,-99) , +16, 1133.11, 1, 0, 0.497492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338657,-99) , +5, 2.2428, 1, 0, 0.467927,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192201,-99) , +4, 1.56693, 1, 0, 0.325243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0328437,-99) , +5, 2.05554, 1, 0, 0.230593,-99) , +13, 0.00338348, 1, 0, 0.405584,-99) , +5, 1.7564, 1, 0, 0.494708,-99) ); + // itree = 130 + fBoostWeights.push_back(0.0169777); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565848,-99) , +2, 17.5, 0, 0, 0.622146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497715,-99) , +3, 0.998125, 1, 0, 0.60027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372472,-99) , +12, 0.0312534, 0, 0, 0.582509,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536856,-99) , +11, 1.5, 0, 0, 0.583503,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308813,-99) , +3, 0.89242, 0, 0, 0.473355,-99) , +16, 150.786, 1, 0, 0.503228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273681,-99) , +7, 0.0799865, 1, 0, 0.483745,-99) , +4, 0.997943, 1, 0, 0.533509,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597111,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335038,-99) , +16, 722.062, 1, 0, 0.45575,-99) , +11, 0.5, 1, 0, 0.504809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322888,-99) , +12, 0.036912, 0, 0, 0.476258,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229456,-99) , +12, 0.0874864, 1, 0, 0.350329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0636605,-99) , +5, 2.13002, 1, 0, 0.237015,-99) , +14, -3.29032, 1, 0, 0.363934,-99) , +5, 1.90787, 1, 0, 0.499529,-99) ); + // itree = 131 + fBoostWeights.push_back(0.0189489); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514826,-99) , +8, -0.880572, 0, 0, 0.621163,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355354,-99) , +15, 0.517758, 1, 0, 0.485324,-99) , +14, -2.91933, 0, 0, 0.581166,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337753,-99) , +13, 6.47795e-05, 0, 0, 0.549142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378821,-99) , +11, 1.5, 0, 0, 0.420887,-99) , +12, 0.125377, 1, 0, 0.488196,-99) , +4, 1.07235, 1, 0, 0.538391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227278,-99) , +3, 0.999634, 1, 0, 0.529813,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634125,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200682,-99) , +15, 0.630496, 1, 0, 0.438823,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.019119,-99) , +8, 0.659095, 0, 0, 0.149784,-99) , +12, 0.111363, 1, 0, 0.279624,-99) , +12, 0.418008, 0, 0, 0.324603,-99) , +5, 1.98511, 1, 0, 0.498918,-99) ); + // itree = 132 + fBoostWeights.push_back(0.0133253); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546133,-99) , +6, 0.70272, 1, 0, 0.611538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4965,-99) , +8, 0.988099, 1, 0, 0.599527,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457527,-99) , +13, 0.00188452, 0, 0, 0.540747,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322485,-99) , +13, 0.00445736, 1, 0, 0.44245,-99) , +5, 1.57279, 1, 0, 0.499684,-99) , +16, 237.681, 1, 0, 0.531797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173747,-99) , +7, 0.230256, 1, 0, 0.525382,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321303,-99) , +11, 1.5, 0, 0, 0.414845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0826445,-99) , +8, 0.76785, 0, 0, 0.301924,-99) , +5, 2.09046, 1, 0, 0.502502,-99) ); + // itree = 133 + fBoostWeights.push_back(0.0168646); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583774,-99) , +2, 11.5, 0, 0, 0.653316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512949,-99) , +8, -0.875849, 0, 0, 0.629245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477846,-99) , +14, -3.59777, 0, 0, 0.59709,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422373,-99) , +15, 1.67878, 1, 0, 0.562667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305214,-99) , +14, -4.60313, 0, 0, 0.540646,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317887,-99) , +7, 0.0133061, 0, 0, 0.449571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189834,-99) , +7, 0.0842329, 1, 0, 0.429047,-99) , +12, 0.136085, 1, 0, 0.489652,-99) , +11, 1.5, 0, 0, 0.525521,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429822,-99) , +12, 0.113207, 1, 0, 0.521573,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156526,-99) , +9, 3.41704, 1, 0, 0.357377,-99) , +2, 15.5, 0, 0, 0.422384,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.077113,-99) , +7, 0.107159, 1, 0, 0.398741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102846,-99) , +8, -0.142523, 0, 0, 0.34119,-99) , +4, 1.63907, 1, 0, 0.493658,-99) ); + // itree = 134 + fBoostWeights.push_back(0.0159086); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592166,-99) , +8, -0.299824, 0, 0, 0.645285,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.67208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517108,-99) , +9, 4.24451, 0, 0, 0.544891,-99) , +16, 491.766, 1, 0, 0.585134,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263837,-99) , +12, 0.0983299, 0, 0, 0.384911,-99) , +8, 0.983338, 1, 0, 0.561509,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530607,-99) , +6, 0.981178, 1, 0, 0.574454,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266603,-99) , +3, 0.907147, 0, 0, 0.438836,-99) , +2, 23.5, 0, 0, 0.478271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250399,-99) , +7, 0.144208, 1, 0, 0.465147,-99) , +6, 0.619087, 1, 0, 0.521135,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636335,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541297,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358098,-99) , +12, 0.143905, 1, 0, 0.4544,-99) , +9, 2.82211, 0, 0, 0.506874,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0991603,-99) , +5, 2.06805, 1, 0, 0.174324,-99) , +8, 0.917924, 0, 0, 0.357383,-99) , +5, 1.9814, 1, 0, 0.49513,-99) ); + // itree = 135 + fBoostWeights.push_back(0.0167302); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.714536,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544297,-99) , +13, 0.00846343, 1, 0, 0.615174,-99) , +9, 3.60814, 0, 0, 0.638364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410416,-99) , +9, 0.260803, 0, 0, 0.49504,-99) , +8, 0.937853, 1, 0, 0.606438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41221,-99) , +8, 0.902717, 1, 0, 0.538882,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328282,-99) , +13, 0.00489623, 1, 0, 0.441818,-99) , +5, 1.65086, 1, 0, 0.502892,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0344325,-99) , +1, 20.5, 0, 0, 0.304314,-99) , +7, 0.0845891, 1, 0, 0.485714,-99) , +11, 1.5, 0, 0, 0.525972,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.091047,-99) , +14, -3.92259, 1, 0, 0.238109,-99) , +5, 2.13169, 1, 0, 0.502946,-99) ); + // itree = 136 + fBoostWeights.push_back(0.0149265); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573609,-99) , +4, 0.361946, 1, 0, 0.609647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424374,-99) , +13, 7.50012e-05, 0, 0, 0.591111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407611,-99) , +5, 0.461375, 0, 0, 0.57384,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525647,-99) , +7, 0.0252062, 1, 0, 0.588111,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321122,-99) , +12, 0.0339459, 0, 0, 0.462571,-99) , +16, 76.5589, 1, 0, 0.491701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154796,-99) , +7, 0.133596, 1, 0, 0.479563,-99) , +4, 1.01358, 1, 0, 0.526215,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559435,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268824,-99) , +16, 2324.84, 1, 0, 0.401787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130249,-99) , +13, 0.00394515, 1, 0, 0.321471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.058068,-99) , +5, 2.30864, 1, 0, 0.254801,-99) , +14, -4.18864, 1, 0, 0.355032,-99) , +5, 2.0134, 1, 0, 0.501471,-99) ); + // itree = 137 + fBoostWeights.push_back(0.0149004); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56552,-99) , +7, 0.0588452, 1, 0, 0.634359,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503392,-99) , +6, 0.544683, 1, 0, 0.543807,-99) , +0, 14.5, 0, 0, 0.605405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42918,-99) , +14, -4.37953, 0, 0, 0.587378,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31908,-99) , +14, -4.67678, 0, 0, 0.523557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353298,-99) , +13, 0.0235301, 1, 0, 0.50879,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0432421,-99) , +13, 0.00823035, 1, 0, 0.290132,-99) , +4, 1.69328, 1, 0, 0.490329,-99) , +11, 1.5, 0, 0, 0.521866,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0331988,-99) , +5, 2.38848, 1, 0, 0.328387,-99) , +8, 0.996005, 0, 0, 0.410483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0790012,-99) , +8, 0.688155, 0, 0, 0.308291,-99) , +5, 2.06804, 1, 0, 0.497442,-99) ); + // itree = 138 + fBoostWeights.push_back(0.0135497); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514882,-99) , +13, 0.000812304, 0, 0, 0.652303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516121,-99) , +5, 0.57074, 0, 0, 0.625858,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436341,-99) , +8, -0.478777, 0, 0, 0.538756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406606,-99) , +8, 0.863942, 1, 0, 0.508013,-99) , +1, 13.5, 0, 0, 0.586344,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408531,-99) , +14, -3.98888, 0, 0, 0.515444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274164,-99) , +6, 0.107617, 0, 0, 0.50788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309329,-99) , +7, 0.0890621, 1, 0, 0.495827,-99) , +4, 0.842281, 1, 0, 0.532301,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471074,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0940535,-99) , +13, 0.00122437, 1, 0, 0.224088,-99) , +11, 1.5, 0, 0, 0.312932,-99) , +4, 1.69961, 1, 0, 0.503303,-99) ); + // itree = 139 + fBoostWeights.push_back(0.0127109); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505196,-99) , +7, 0.0911859, 1, 0, 0.622834,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45616,-99) , +8, 0.462397, 1, 0, 0.511677,-99) , +2, 11.5, 0, 0, 0.595761,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502879,-99) , +2, 26.5, 0, 0, 0.518632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330519,-99) , +7, 0.0795652, 1, 0, 0.504815,-99) , +4, 0.91767, 1, 0, 0.542041,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194936,-99) , +4, 1.33106, 1, 0, 0.35427,-99) , +8, -0.949338, 0, 0, 0.52716,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186057,-99) , +5, 2.33343, 1, 0, 0.448099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114929,-99) , +8, 0.891008, 0, 0, 0.298521,-99) , +4, 1.82183, 1, 0, 0.506222,-99) ); + // itree = 140 + fBoostWeights.push_back(0.0166432); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588993,-99) , +7, 0.0412543, 1, 0, 0.650769,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472406,-99) , +16, 462.852, 1, 0, 0.530982,-99) , +0, 14.5, 0, 0, 0.610986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364135,-99) , +14, -4.4426, 0, 0, 0.58993,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393381,-99) , +14, -3.87262, 0, 0, 0.520523,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211192,-99) , +15, 0.0468697, 0, 0, 0.355375,-99) , +7, 0.00922634, 0, 0, 0.503123,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0393457,-99) , +4, 1.34122, 1, 0, 0.337303,-99) , +13, 0.0166741, 1, 0, 0.48152,-99) , +11, 1.5, 0, 0, 0.516636,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371176,-99) , +4, 2.06315, 1, 0, 0.510991,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0617869,-99) , +5, 2.19664, 1, 0, 0.130854,-99) , +8, 0.95111, 0, 0, 0.329834,-99) , +5, 2.06782, 1, 0, 0.495477,-99) ); + // itree = 141 + fBoostWeights.push_back(0.0143548); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556932,-99) , +1, 15.5, 0, 0, 0.59243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359642,-99) , +8, 0.991936, 1, 0, 0.573531,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277988,-99) , +7, 0.00887948, 0, 0, 0.484336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231371,-99) , +0, 91.5, 1, 0, 0.471914,-99) , +12, 0.125982, 1, 0, 0.522698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300579,-99) , +12, 0.0227069, 0, 0, 0.512919,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603117,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26102,-99) , +5, 2.23309, 1, 0, 0.392026,-99) , +9, -3.35111, 1, 0, 0.451875,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0566826,-99) , +4, 1.54332, 1, 0, 0.189752,-99) , +8, 0.820166, 0, 0, 0.349477,-99) , +5, 1.97653, 1, 0, 0.487226,-99) ); + // itree = 142 + fBoostWeights.push_back(0.0154962); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632789,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505901,-99) , +13, 0.00901021, 1, 0, 0.616268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428818,-99) , +8, 0.988572, 1, 0, 0.599354,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402088,-99) , +8, -0.78296, 0, 0, 0.539634,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20581,-99) , +7, 0.0768742, 1, 0, 0.44756,-99) , +5, 1.46899, 1, 0, 0.495567,-99) , +12, 0.113503, 1, 0, 0.543343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343536,-99) , +12, 0.0227243, 0, 0, 0.534566,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438191,-99) , +16, 625.252, 1, 0, 0.539792,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335369,-99) , +8, 0.994446, 0, 0, 0.394689,-99) , +11, 1.5, 0, 0, 0.45092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114687,-99) , +6, 0.954649, 1, 0, 0.430555,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0540955,-99) , +11, 1.5, 0, 0, 0.15407,-99) , +13, 0.00306936, 1, 0, 0.361797,-99) , +5, 1.89495, 1, 0, 0.498495,-99) ); + // itree = 143 + fBoostWeights.push_back(0.0197341); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612444,-99) , +6, 0.169962, 1, 0, 0.636508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419868,-99) , +14, -4.36238, 0, 0, 0.612681,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258696,-99) , +13, 0.00037852, 0, 0, 0.398275,-99) , +12, 0.0312599, 0, 0, 0.57289,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473352,-99) , +7, 0.0600443, 1, 0, 0.58933,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421589,-99) , +11, 1.5, 0, 0, 0.466008,-99) , +2, 15.5, 0, 0, 0.527992,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584122,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0556539,-99) , +13, 0.0186096, 1, 0, 0.355624,-99) , +12, 0.386671, 0, 0, 0.395222,-99) , +4, 1.26806, 1, 0, 0.484638,-99) , +12, 0.113932, 1, 0, 0.525548,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269245,-99) , +15, 0.0893292, 0, 0, 0.488768,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174947,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0487017,-99) , +4, 1.87131, 1, 0, 0.0926467,-99) , +13, 0.000483759, 1, 0, 0.304889,-99) , +4, 1.76363, 1, 0, 0.501316,-99) ); + // itree = 144 + fBoostWeights.push_back(0.0132276); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444387,-99) , +13, 0.0164039, 1, 0, 0.555448,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328971,-99) , +12, 0.0216527, 0, 0, 0.546488,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303818,-99) , +6, 0.466324, 1, 0, 0.410917,-99) , +7, 0.0100097, 0, 0, 0.533708,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360663,-99) , +4, 1.45074, 0, 0, 0.44405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16389,-99) , +8, 0.424263, 0, 0, 0.373281,-99) , +5, 1.9829, 1, 0, 0.520432,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468203,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416463,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0740102,-99) , +12, 0.0674815, 1, 0, 0.124549,-99) , +16, 138.749, 1, 0, 0.205007,-99) , +14, -3.69527, 1, 0, 0.302031,-99) , +4, 1.74785, 1, 0, 0.496104,-99) ); + // itree = 145 + fBoostWeights.push_back(0.0165001); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475279,-99) , +13, 0.0177522, 1, 0, 0.606793,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298558,-99) , +8, -0.727581, 0, 0, 0.4924,-99) , +15, 0.0939955, 0, 0, 0.577029,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535753,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303648,-99) , +14, -4.81793, 0, 0, 0.418142,-99) , +3, 0.970041, 1, 0, 0.46001,-99) , +13, 0.000511448, 0, 0, 0.550891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366989,-99) , +7, 0.109439, 1, 0, 0.539975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595572,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340278,-99) , +4, 1.81563, 1, 0, 0.449653,-99) , +12, 0.111202, 1, 0, 0.509645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276034,-99) , +12, 0.0320097, 0, 0, 0.477837,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.037771,-99) , +16, 103.687, 1, 0, 0.143535,-99) , +4, 1.54371, 1, 0, 0.253814,-99) , +13, 0.000829106, 1, 0, 0.386412,-99) , +5, 1.83703, 1, 0, 0.50119,-99) ); + // itree = 146 + fBoostWeights.push_back(0.0159576); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.698323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60456,-99) , +13, 0.0111677, 1, 0, 0.672533,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483866,-99) , +16, 504.821, 1, 0, 0.539737,-99) , +0, 15.5, 0, 0, 0.625558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397622,-99) , +13, 6.03918e-05, 0, 0, 0.60363,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393015,-99) , +7, 0.00922837, 0, 0, 0.533853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210895,-99) , +13, 0.00244501, 1, 0, 0.389211,-99) , +4, 1.54895, 1, 0, 0.513927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250631,-99) , +7, 0.135521, 1, 0, 0.503113,-99) , +11, 1.5, 0, 0, 0.535133,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317981,-99) , +2, 11.5, 0, 0, 0.469528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392194,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0690278,-99) , +4, 1.3187, 1, 0, 0.132101,-99) , +12, 0.0757197, 1, 0, 0.212378,-99) , +8, 0.946505, 0, 0, 0.334963,-99) , +5, 1.97952, 1, 0, 0.505084,-99) ); + // itree = 147 + fBoostWeights.push_back(0.0135061); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554877,-99) , +7, 0.0358182, 1, 0, 0.6303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54295,-99) , +6, 0.916086, 1, 0, 0.612557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314333,-99) , +14, -4.52697, 0, 0, 0.589506,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34543,-99) , +12, 0.0298482, 0, 0, 0.507927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264223,-99) , +13, 0.0564834, 1, 0, 0.49972,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323547,-99) , +12, 0.117424, 1, 0, 0.400624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169456,-99) , +8, -0.119453, 0, 0, 0.345787,-99) , +5, 1.86431, 1, 0, 0.481289,-99) , +11, 1.5, 0, 0, 0.517206,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332207,-99) , +2, 11.5, 0, 0, 0.465283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137409,-99) , +8, 0.909094, 0, 0, 0.325998,-99) , +5, 2.06081, 1, 0, 0.495635,-99) ); + // itree = 148 + fBoostWeights.push_back(0.0124783); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52646,-99) , +14, -2.91951, 0, 0, 0.595924,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284672,-99) , +7, 0.118801, 1, 0, 0.496435,-99) , +11, 1.5, 0, 0, 0.529108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280504,-99) , +3, 0.999547, 1, 0, 0.519538,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235966,-99) , +4, 1.04299, 1, 0, 0.348696,-99) , +8, -0.946931, 0, 0, 0.505148,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25967,-99) , +3, 0.993835, 1, 0, 0.449348,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118811,-99) , +12, 0.343219, 0, 0, 0.182728,-99) , +8, 0.946607, 0, 0, 0.317523,-99) , +5, 2.08854, 1, 0, 0.485468,-99) ); + // itree = 149 + fBoostWeights.push_back(0.0107588); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521838,-99) , +4, 0.86071, 1, 0, 0.552143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377429,-99) , +14, -4.98623, 0, 0, 0.54141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300047,-99) , +7, 0.00750416, 0, 0, 0.534217,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331108,-99) , +9, -3.34844, 1, 0, 0.473758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15551,-99) , +13, 0.00122627, 1, 0, 0.37544,-99) , +4, 1.82192, 1, 0, 0.518826,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327381,-99) , +1, 13.5, 0, 0, 0.400141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 1.97501, 1, 0, 0.363621,-99) , +8, -0.901933, 0, 0, 0.502571,-99) ); + // itree = 150 + fBoostWeights.push_back(0.0156264); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538993,-99) , +8, -0.682435, 0, 0, 0.642338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508225,-99) , +6, 0.733193, 1, 0, 0.616555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472886,-99) , +14, -3.55464, 0, 0, 0.595569,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622742,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404814,-99) , +13, 0.000303743, 0, 0, 0.496087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304244,-99) , +7, 0.0983796, 1, 0, 0.483936,-99) , +9, -5.55281, 1, 0, 0.503308,-99) , +4, 0.85995, 1, 0, 0.544424,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533891,-99) , +15, 0.216617, 0, 0, 0.583924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418829,-99) , +0, 12.5, 0, 0, 0.537165,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386128,-99) , +11, 0.5, 1, 0, 0.475043,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0340406,-99) , +5, 2.16105, 1, 0, 0.308061,-99) , +8, 0.964415, 0, 0, 0.389081,-99) , +11, 1.5, 0, 0, 0.441854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12091,-99) , +5, 1.94292, 1, 0, 0.22213,-99) , +14, -2.48781, 1, 0, 0.383217,-99) , +5, 1.76128, 1, 0, 0.496331,-99) ); + // itree = 151 + fBoostWeights.push_back(0.0144692); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.67925,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558372,-99) , +9, -0.459985, 1, 0, 0.59567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483931,-99) , +16, 1504.55, 1, 0, 0.570174,-99) , +6, 0.174499, 1, 0, 0.596459,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516108,-99) , +13, 0.0019004, 0, 0, 0.591615,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390362,-99) , +3, 0.964689, 0, 0, 0.477931,-99) , +4, 0.719541, 1, 0, 0.514871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290533,-99) , +7, 0.105766, 1, 0, 0.500317,-99) , +11, 1.5, 0, 0, 0.531465,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60558,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273288,-99) , +12, 0.0586573, 0, 0, 0.43328,-99) , +11, 1.5, 0, 0, 0.499966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235366,-99) , +5, 2.44853, 1, 0, 0.472825,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0849047,-99) , +4, 1.76855, 1, 0, 0.305907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0350304,-99) , +5, 2.22325, 1, 0, 0.231917,-99) , +13, 0.000989693, 1, 0, 0.379654,-99) , +5, 1.93025, 1, 0, 0.50368,-99) ); + // itree = 152 + fBoostWeights.push_back(0.0150389); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499504,-99) , +8, -0.892795, 0, 0, 0.605609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461544,-99) , +12, 0.0311647, 0, 0, 0.582239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379459,-99) , +3, 0.98632, 1, 0, 0.429986,-99) , +8, 0.970442, 1, 0, 0.560449,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44698,-99) , +7, 0.0224802, 0, 0, 0.573592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395947,-99) , +1, 43.5, 1, 0, 0.538306,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231572,-99) , +5, 2.0453, 1, 0, 0.45311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271829,-99) , +7, 0.032287, 1, 0, 0.433142,-99) , +1, 15.5, 0, 0, 0.476235,-99) , +12, 0.130705, 1, 0, 0.52084,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448835,-99) , +8, 0.969487, 1, 0, 0.518842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314151,-99) , +7, 0.0118659, 0, 0, 0.470539,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238003,-99) , +0, 15.5, 1, 0, 0.384375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0577837,-99) , +5, 1.98723, 1, 0, 0.274407,-99) , +14, -3.12161, 1, 0, 0.373783,-99) , +4, 1.57543, 1, 0, 0.490749,-99) ); + // itree = 153 + fBoostWeights.push_back(0.0158773); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.702068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541262,-99) , +13, 0.0180335, 1, 0, 0.667074,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442606,-99) , +1, 21.5, 0, 0, 0.519036,-99) , +13, 0.00192464, 0, 0, 0.617498,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385554,-99) , +7, 0.0091066, 0, 0, 0.53432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284989,-99) , +7, 0.0308982, 1, 0, 0.514264,-99) , +2, 17.5, 0, 0, 0.556207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380457,-99) , +7, 0.103163, 1, 0, 0.544007,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554955,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384634,-99) , +8, 0.979182, 1, 0, 0.4948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347063,-99) , +9, -0.489209, 1, 0, 0.440525,-99) , +10, 485.844, 1, 0, 0.474584,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493131,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126902,-99) , +5, 2.00669, 1, 0, 0.285456,-99) , +16, 372.442, 1, 0, 0.364177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0339363,-99) , +4, 1.92646, 1, 0, 0.306799,-99) , +13, 0.000994166, 1, 0, 0.404211,-99) , +5, 1.78587, 1, 0, 0.504412,-99) ); + // itree = 154 + fBoostWeights.push_back(0.0133608); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541334,-99) , +10, 870.344, 1, 0, 0.584288,-99) , +6, 0.159635, 1, 0, 0.613524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475473,-99) , +8, 0.988083, 1, 0, 0.596809,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470446,-99) , +13, 0.00100687, 0, 0, 0.581731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292913,-99) , +7, 0.0285372, 1, 0, 0.483743,-99) , +2, 19.5, 0, 0, 0.516987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316304,-99) , +13, 0.0405675, 1, 0, 0.508285,-99) , +11, 1.5, 0, 0, 0.537214,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486818,-99) , +2, 19.5, 0, 0, 0.538767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363972,-99) , +14, -3.12195, 1, 0, 0.49142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284276,-99) , +7, 0.0115706, 0, 0, 0.442683,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0538108,-99) , +4, 1.84899, 1, 0, 0.212856,-99) , +13, 0.00342599, 1, 0, 0.377199,-99) , +4, 1.54538, 1, 0, 0.50241,-99) ); + // itree = 155 + fBoostWeights.push_back(0.0143328); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51545,-99) , +8, 0.914147, 1, 0, 0.607253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415166,-99) , +12, 0.030531, 0, 0, 0.586852,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370436,-99) , +13, 0.000657769, 0, 0, 0.534078,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362557,-99) , +12, 0.114682, 1, 0, 0.430524,-99) , +5, 1.60457, 1, 0, 0.489846,-99) , +16, 453.036, 1, 0, 0.525954,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189731,-99) , +4, 1.12452, 1, 0, 0.366271,-99) , +13, 0.0202507, 1, 0, 0.510282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140659,-99) , +8, 0.992212, 0, 0, 0.246984,-99) , +5, 2.1806, 1, 0, 0.493123,-99) ); + // itree = 156 + fBoostWeights.push_back(0.0110587); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501485,-99) , +14, -3.29575, 0, 0, 0.602585,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418879,-99) , +1, 9.5, 0, 0, 0.502796,-99) , +11, 1.5, 0, 0, 0.534989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334771,-99) , +14, -4.81428, 0, 0, 0.524247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223606,-99) , +7, 0.172228, 1, 0, 0.516907,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450114,-99) , +16, 528.194, 1, 0, 0.515361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320987,-99) , +1, 9.5, 0, 0, 0.474148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148131,-99) , +8, 0.641288, 0, 0, 0.381505,-99) , +5, 1.9972, 1, 0, 0.496265,-99) ); + // itree = 157 + fBoostWeights.push_back(0.0155902); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708437,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551524,-99) , +6, 0.463152, 1, 0, 0.604855,-99) , +0, 30.5, 0, 0, 0.638393,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428654,-99) , +6, 0.431469, 1, 0, 0.499115,-99) , +13, 0.000804829, 0, 0, 0.598319,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496368,-99) , +6, 0.915266, 1, 0, 0.600098,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240583,-99) , +7, 0.0358221, 1, 0, 0.481203,-99) , +2, 22.5, 0, 0, 0.512864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301744,-99) , +7, 0.103031, 1, 0, 0.497901,-99) , +11, 1.5, 0, 0, 0.530123,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445599,-99) , +11, 1.5, 0, 0, 0.51138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279368,-99) , +5, 2.4213, 1, 0, 0.484531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18633,-99) , +3, 0.998803, 1, 0, 0.458786,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0673998,-99) , +5, 2.08097, 1, 0, 0.187006,-99) , +8, 0.695056, 0, 0, 0.369978,-99) , +5, 1.90866, 1, 0, 0.499383,-99) ); + // itree = 158 + fBoostWeights.push_back(0.0124832); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365458,-99) , +12, 0.0229527, 0, 0, 0.554435,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403801,-99) , +9, 1.25899, 0, 0, 0.447389,-99) , +2, 9.5, 0, 0, 0.536137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303571,-99) , +3, 0.999594, 1, 0, 0.528137,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113931,-99) , +5, 1.5943, 1, 0, 0.285597,-99) , +12, 0.095188, 1, 0, 0.378966,-99) , +8, -0.88572, 0, 0, 0.509957,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348369,-99) , +9, -3.14409, 1, 0, 0.452634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.06107,-99) , +13, 0.0012283, 1, 0, 0.321823,-99) , +4, 1.82018, 1, 0, 0.492559,-99) ); + // itree = 159 + fBoostWeights.push_back(0.010688); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570663,-99) , +2, 26.5, 0, 0, 0.597057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371466,-99) , +8, 0.991929, 1, 0, 0.577122,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451899,-99) , +5, 1.39642, 1, 0, 0.496853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223536,-99) , +7, 0.119483, 1, 0, 0.485281,-99) , +12, 0.113669, 1, 0, 0.526207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331192,-99) , +12, 0.0227741, 0, 0, 0.517966,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214723,-99) , +3, 0.97397, 0, 0, 0.420577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160401,-99) , +13, 0.00142855, 1, 0, 0.332389,-99) , +4, 1.8177, 1, 0, 0.500681,-99) ); + // itree = 160 + fBoostWeights.push_back(0.0108291); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500998,-99) , +8, 0.982626, 1, 0, 0.612599,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459182,-99) , +16, 211.962, 0, 0, 0.524521,-99) , +6, 0.688578, 1, 0, 0.582546,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679366,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4046,-99) , +4, 1.28623, 1, 0, 0.481046,-99) , +12, 0.476058, 0, 0, 0.496225,-99) , +12, 0.113663, 1, 0, 0.534761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274757,-99) , +12, 0.018167, 0, 0, 0.527613,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149276,-99) , +13, 0.000393066, 1, 0, 0.334218,-99) , +4, 1.81784, 1, 0, 0.509856,-99) ); + // itree = 161 + fBoostWeights.push_back(0.0123818); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520252,-99) , +12, 0.119798, 1, 0, 0.556404,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305215,-99) , +5, 1.73171, 1, 0, 0.446531,-99) , +8, -0.859043, 0, 0, 0.541201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318558,-99) , +3, 0.99959, 1, 0, 0.533625,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258279,-99) , +8, 0.474426, 1, 0, 0.362825,-99) , +12, 0.0286175, 0, 0, 0.522098,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280487,-99) , +7, 0.0150676, 0, 0, 0.490902,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.072076,-99) , +4, 1.82189, 1, 0, 0.187624,-99) , +14, -3.42733, 1, 0, 0.331295,-99) , +4, 1.71403, 1, 0, 0.49788,-99) ); + // itree = 162 + fBoostWeights.push_back(0.0127834); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513046,-99) , +16, 977.789, 1, 0, 0.554991,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318805,-99) , +12, 0.144181, 1, 0, 0.414897,-99) , +8, -0.906508, 0, 0, 0.538417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289601,-99) , +7, 0.14676, 1, 0, 0.529194,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251991,-99) , +14, -5.52187, 0, 0, 0.521654,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384485,-99) , +11, 1.5, 0, 0, 0.465048,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0114921,-99) , +8, 0.284682, 0, 0, 0.142226,-99) , +8, 0.946291, 0, 0, 0.31275,-99) , +5, 2.05529, 1, 0, 0.498366,-99) ); + // itree = 163 + fBoostWeights.push_back(0.0138462); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572595,-99) , +12, 0.125491, 1, 0, 0.620348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488604,-99) , +8, -0.864728, 0, 0, 0.599414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487985,-99) , +14, -3.8218, 0, 0, 0.57814,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472441,-99) , +5, 1.51677, 1, 0, 0.572914,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219813,-99) , +7, 0.0313003, 1, 0, 0.462502,-99) , +2, 18.5, 0, 0, 0.501075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238926,-99) , +7, 0.119698, 1, 0, 0.489433,-99) , +11, 1.5, 0, 0, 0.518999,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332275,-99) , +6, 0.635384, 0, 0, 0.506513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111673,-99) , +8, 0.897552, 0, 0, 0.336954,-99) , +4, 1.761, 1, 0, 0.498761,-99) ); + // itree = 164 + fBoostWeights.push_back(0.0152963); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564794,-99) , +6, 0.510151, 1, 0, 0.613243,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437923,-99) , +12, 0.0742125, 0, 0, 0.482642,-99) , +8, 0.927167, 1, 0, 0.587178,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293988,-99) , +7, 0.109401, 1, 0, 0.504474,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2991,-99) , +2, 8.5, 0, 0, 0.486771,-99) , +12, 0.132151, 1, 0, 0.538467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369713,-99) , +12, 0.0289857, 0, 0, 0.526645,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46777,-99) , +14, -3.99175, 1, 0, 0.56705,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359263,-99) , +12, 0.280477, 0, 0, 0.412973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155951,-99) , +7, 0.0298256, 1, 0, 0.382098,-99) , +1, 14.5, 0, 0, 0.464974,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392109,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0972539,-99) , +4, 1.24154, 1, 0, 0.173039,-99) , +8, 0.623981, 0, 0, 0.378329,-99) , +5, 1.87871, 1, 0, 0.494524,-99) ); + // itree = 165 + fBoostWeights.push_back(0.0149507); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509035,-99) , +8, -0.891036, 0, 0, 0.625714,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460883,-99) , +4, 1.03481, 0, 0, 0.522935,-99) , +8, 0.912129, 1, 0, 0.602239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342458,-99) , +8, 0.457887, 1, 0, 0.407515,-99) , +12, 0.0312261, 0, 0, 0.571312,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607961,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507893,-99) , +0, 15.5, 0, 0, 0.566165,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378449,-99) , +7, 0.0134093, 0, 0, 0.477452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225811,-99) , +7, 0.0825238, 1, 0, 0.456625,-99) , +11, 1.5, 0, 0, 0.490846,-99) , +12, 0.129425, 1, 0, 0.533819,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369971,-99) , +7, 0.012004, 0, 0, 0.513253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248266,-99) , +12, 0.0314081, 0, 0, 0.480806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183756,-99) , +2, 8.5, 0, 0, 0.449419,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323017,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0656021,-99) , +4, 1.81958, 1, 0, 0.233261,-99) , +13, 0.00243647, 1, 0, 0.379644,-99) , +4, 1.55252, 1, 0, 0.501049,-99) ); + // itree = 166 + fBoostWeights.push_back(0.0134408); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411534,-99) , +8, 0.990337, 1, 0, 0.602852,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549109,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401702,-99) , +7, 0.0139207, 0, 0, 0.509895,-99) , +12, 0.101389, 1, 0, 0.547813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321577,-99) , +12, 0.0227284, 0, 0, 0.538366,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316291,-99) , +7, 0.145249, 1, 0, 0.530358,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637201,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287293,-99) , +2, 11.5, 0, 0, 0.41131,-99) , +9, -2.00582, 1, 0, 0.495893,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116715,-99) , +4, 1.5431, 1, 0, 0.225763,-99) , +14, -3.33098, 1, 0, 0.376575,-99) , +5, 1.96925, 1, 0, 0.505462,-99) ); + // itree = 167 + fBoostWeights.push_back(0.0115481); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466462,-99) , +12, 0.0335996, 0, 0, 0.60184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346587,-99) , +1, 11.5, 0, 0, 0.583751,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379735,-99) , +7, 0.00911161, 0, 0, 0.490937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13769,-99) , +7, 0.0445431, 1, 0, 0.479168,-99) , +2, 21.5, 0, 0, 0.512291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195873,-99) , +7, 0.194842, 1, 0, 0.505552,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.080736,-99) , +8, 0.954653, 0, 0, 0.245451,-99) , +5, 2.23656, 1, 0, 0.492052,-99) ); + // itree = 168 + fBoostWeights.push_back(0.0121293); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503311,-99) , +2, 16.5, 0, 0, 0.559389,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0755838,-99) , +13, 0.0245912, 1, 0, 0.467835,-99) , +5, 1.46914, 1, 0, 0.515309,-99) , +12, 0.459551, 0, 0, 0.524822,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221274,-99) , +12, 0.164807, 1, 0, 0.369567,-99) , +7, 0.00920802, 0, 0, 0.513136,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579785,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0979502,-99) , +3, 0.971154, 0, 0, 0.349298,-99) , +1, 18.5, 0, 0, 0.408002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1216,-99) , +13, 0.00342827, 1, 0, 0.335622,-99) , +4, 1.76854, 1, 0, 0.493925,-99) ); + // itree = 169 + fBoostWeights.push_back(0.0111712); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287686,-99) , +5, 2.1455, 1, 0, 0.580355,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39005,-99) , +4, 1.23663, 0, 0, 0.443077,-99) , +8, 0.977333, 1, 0, 0.559814,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411344,-99) , +7, 0.0131206, 0, 0, 0.527525,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462637,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260277,-99) , +8, 0.158149, 0, 0, 0.408072,-99) , +5, 1.57351, 1, 0, 0.472511,-99) , +12, 0.125579, 1, 0, 0.515564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215373,-99) , +12, 0.0165396, 0, 0, 0.508766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208912,-99) , +4, 1.97334, 1, 0, 0.495239,-99) ); + // itree = 170 + fBoostWeights.push_back(0.0108877); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57725,-99) , +12, 0.0551099, 1, 0, 0.595772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405913,-99) , +12, 0.0313859, 0, 0, 0.576031,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380627,-99) , +3, 0.999003, 1, 0, 0.50902,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265138,-99) , +3, 0.943024, 0, 0, 0.416417,-99) , +7, 0.0132502, 0, 0, 0.485073,-99) , +16, 507.261, 1, 0, 0.519537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249381,-99) , +7, 0.164989, 1, 0, 0.511625,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134845,-99) , +8, 0.953135, 0, 0, 0.303322,-99) , +5, 2.12061, 1, 0, 0.493895,-99) ); + // itree = 171 + fBoostWeights.push_back(0.0112532); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562604,-99) , +6, 0.350059, 1, 0, 0.60755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456597,-99) , +13, 0.0176598, 1, 0, 0.592369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414049,-99) , +14, -4.83167, 0, 0, 0.577726,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527366,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326538,-99) , +0, 96.5, 1, 0, 0.51561,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248758,-99) , +7, 0.0240993, 1, 0, 0.410221,-99) , +1, 9.5, 0, 0, 0.493061,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156382,-99) , +13, 0.00158128, 1, 0, 0.308571,-99) , +4, 1.71054, 1, 0, 0.473047,-99) , +11, 1.5, 0, 0, 0.506288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169792,-99) , +5, 2.31033, 1, 0, 0.495202,-99) ); + // itree = 172 + fBoostWeights.push_back(0.0112882); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530225,-99) , +15, 0.728536, 1, 0, 0.625823,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443133,-99) , +7, 0.018196, 0, 0, 0.498531,-99) , +14, -3.3541, 0, 0, 0.587197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384391,-99) , +8, -0.924842, 0, 0, 0.569436,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492249,-99) , +2, 16.5, 0, 0, 0.558576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381515,-99) , +14, -3.29553, 0, 0, 0.531683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353468,-99) , +8, -0.265928, 0, 0, 0.446165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173118,-99) , +7, 0.0795153, 1, 0, 0.429074,-99) , +5, 1.47382, 1, 0, 0.474583,-99) , +16, 241.362, 1, 0, 0.504427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165578,-99) , +4, 2.06952, 1, 0, 0.494748,-99) ); + // itree = 173 + fBoostWeights.push_back(0.0131952); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608852,-99) , +4, 0.820404, 1, 0, 0.639938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507229,-99) , +8, -0.821012, 0, 0, 0.614071,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430497,-99) , +9, -0.124306, 0, 0, 0.503521,-99) , +8, 0.911037, 1, 0, 0.585582,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501661,-99) , +5, 1.47113, 1, 0, 0.547079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34093,-99) , +0, 51.5, 1, 0, 0.471167,-99) , +6, 0.505443, 1, 0, 0.513414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33585,-99) , +5, 1.93684, 1, 0, 0.500085,-99) , +11, 1.5, 0, 0, 0.528649,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617087,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325705,-99) , +9, -0.781137, 1, 0, 0.450637,-99) , +9, 2.93328, 0, 0, 0.506893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275211,-99) , +7, 0.0117715, 0, 0, 0.457849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459939,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0409391,-99) , +5, 1.83561, 1, 0, 0.181466,-99) , +11, 1.5, 0, 0, 0.26746,-99) , +14, -2.98952, 1, 0, 0.373268,-99) , +4, 1.57379, 1, 0, 0.497729,-99) ); + // itree = 174 + fBoostWeights.push_back(0.0120504); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527229,-99) , +6, 0.614028, 1, 0, 0.596371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385207,-99) , +3, 0.983454, 1, 0, 0.454932,-99) , +8, -0.843787, 0, 0, 0.571436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374582,-99) , +14, -4.57788, 0, 0, 0.558926,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463339,-99) , +13, 0.00498856, 1, 0, 0.569019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411924,-99) , +12, 0.029614, 0, 0, 0.541367,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334108,-99) , +4, 1.58803, 1, 0, 0.419985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122093,-99) , +3, 0.999335, 1, 0, 0.402841,-99) , +12, 0.114452, 1, 0, 0.467633,-99) , +4, 1.17296, 1, 0, 0.519608,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206827,-99) , +8, 0.993714, 0, 0, 0.3095,-99) , +5, 2.17257, 1, 0, 0.504693,-99) ); + // itree = 175 + fBoostWeights.push_back(0.0122089); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273023,-99) , +5, 2.1966, 1, 0, 0.569825,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241366,-99) , +12, 0.152683, 1, 0, 0.433146,-99) , +7, 0.0798015, 1, 0, 0.554169,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297439,-99) , +15, 0.0464605, 0, 0, 0.389363,-99) , +7, 0.00953217, 0, 0, 0.54151,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300664,-99) , +15, 0.3711, 1, 0, 0.372938,-99) , +14, -4.57821, 0, 0, 0.528563,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620427,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531766,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237857,-99) , +14, -3.70577, 1, 0, 0.346516,-99) , +9, -3.15769, 1, 0, 0.397459,-99) , +2, 19.5, 0, 0, 0.469082,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189394,-99) , +13, 0.00240977, 1, 0, 0.386005,-99) , +4, 1.63892, 1, 0, 0.505175,-99) ); + // itree = 176 + fBoostWeights.push_back(0.0136589); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630079,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552781,-99) , +16, 1289.82, 1, 0, 0.592361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410721,-99) , +14, -4.37989, 0, 0, 0.572121,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626351,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426383,-99) , +5, 1.34288, 1, 0, 0.474338,-99) , +12, 0.414383, 0, 0, 0.493186,-99) , +12, 0.130668, 1, 0, 0.533288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349267,-99) , +12, 0.0236086, 0, 0, 0.524752,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503175,-99) , +12, 0.117083, 1, 0, 0.590111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409556,-99) , +12, 0.0416047, 0, 0, 0.55482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2498,-99) , +7, 0.011266, 0, 0, 0.496872,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314698,-99) , +6, 0.972387, 0, 0, 0.40355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0944661,-99) , +13, 0.0217237, 1, 0, 0.360274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0830371,-99) , +5, 1.98719, 1, 0, 0.267055,-99) , +14, -3.00121, 1, 0, 0.397848,-99) , +4, 1.56692, 1, 0, 0.498268,-99) ); + // itree = 177 + fBoostWeights.push_back(0.0104956); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514078,-99) , +11, 1.5, 0, 0, 0.543355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339678,-99) , +12, 0.0216896, 0, 0, 0.535107,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267402,-99) , +12, 0.157199, 1, 0, 0.387235,-99) , +8, -0.926298, 0, 0, 0.520451,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.143638,-99) , +4, 1.80998, 1, 0, 0.275511,-99) , +8, 0.95168, 0, 0, 0.38152,-99) , +4, 1.69348, 1, 0, 0.505268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228327,-99) , +5, 2.2429, 1, 0, 0.492014,-99) ); + // itree = 178 + fBoostWeights.push_back(0.0118505); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.694855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555756,-99) , +3, 0.996106, 1, 0, 0.649389,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428664,-99) , +6, 0.603132, 1, 0, 0.510592,-99) , +9, -1.06372, 1, 0, 0.562488,-99) , +2, 18.5, 0, 0, 0.604026,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661978,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482628,-99) , +10, 6090.87, 0, 0, 0.51428,-99) , +9, 4.18462, 0, 0, 0.544013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398188,-99) , +13, 0.000464882, 0, 0, 0.519178,-99) , +16, 1573.45, 1, 0, 0.56109,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354261,-99) , +7, 0.00820626, 0, 0, 0.514019,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303908,-99) , +11, 1.5, 0, 0, 0.3889,-99) , +13, 0.00373898, 1, 0, 0.481606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15875,-99) , +3, 0.999375, 1, 0, 0.469317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258517,-99) , +4, 1.97616, 1, 0, 0.447231,-99) , +5, 1.63895, 1, 0, 0.513355,-99) ); + // itree = 179 + fBoostWeights.push_back(0.0149947); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547224,-99) , +8, -0.665765, 0, 0, 0.647485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542912,-99) , +13, 0.00118259, 0, 0, 0.620346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402672,-99) , +7, 0.13551, 1, 0, 0.592709,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37196,-99) , +8, -0.973597, 0, 0, 0.517346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356487,-99) , +5, 1.97848, 1, 0, 0.505247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213947,-99) , +7, 0.0442919, 1, 0, 0.49187,-99) , +2, 23.5, 0, 0, 0.521299,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466799,-99) , +15, 0.262498, 0, 0, 0.560065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27088,-99) , +12, 0.0296092, 0, 0, 0.505338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280386,-99) , +15, 0.120438, 0, 0, 0.430538,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0620549,-99) , +4, 1.77232, 1, 0, 0.195197,-99) , +14, -2.61687, 1, 0, 0.35617,-99) , +4, 1.57456, 1, 0, 0.488364,-99) ); + // itree = 180 + fBoostWeights.push_back(0.012136); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709562,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477667,-99) , +12, 0.203423, 1, 0, 0.567006,-99) , +2, 21.5, 0, 0, 0.626081,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389088,-99) , +3, 0.979998, 1, 0, 0.479603,-99) , +14, -3.17219, 0, 0, 0.589929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397775,-99) , +5, 0.447829, 0, 0, 0.567761,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464323,-99) , +7, 0.0201454, 1, 0, 0.563571,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23024,-99) , +3, 0.820472, 0, 0, 0.459603,-99) , +16, 92.861, 1, 0, 0.485367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277157,-99) , +13, 0.0222444, 1, 0, 0.470955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244983,-99) , +5, 2.23313, 1, 0, 0.454527,-99) , +4, 0.861093, 1, 0, 0.494831,-99) ); + // itree = 181 + fBoostWeights.push_back(0.00982272); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57599,-99) , +6, 0.0979778, 1, 0, 0.591769,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460513,-99) , +11, 1.5, 0, 0, 0.497624,-99) , +12, 0.113663, 1, 0, 0.539397,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356113,-99) , +12, 0.0227642, 0, 0, 0.531435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321426,-99) , +3, 0.999598, 1, 0, 0.52449,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41066,-99) , +9, -2.64803, 1, 0, 0.465792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141665,-99) , +13, 0.000859735, 1, 0, 0.339881,-99) , +4, 1.76956, 1, 0, 0.505628,-99) ); + // itree = 182 + fBoostWeights.push_back(0.0108269); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547734,-99) , +2, 19.5, 0, 0, 0.582435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404779,-99) , +12, 0.0263673, 0, 0, 0.570268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344542,-99) , +7, 0.16572, 1, 0, 0.561992,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552495,-99) , +2, 28.5, 0, 0, 0.576262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3549,-99) , +12, 0.0310954, 0, 0, 0.536769,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446143,-99) , +7, 0.0352151, 1, 0, 0.519043,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133353,-99) , +13, 0.024051, 1, 0, 0.362127,-99) , +5, 1.38433, 1, 0, 0.423927,-99) , +12, 0.104223, 1, 0, 0.469398,-99) , +16, 1007.58, 1, 0, 0.511286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272212,-99) , +5, 2.2453, 1, 0, 0.499878,-99) ); + // itree = 183 + fBoostWeights.push_back(0.00936981); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532394,-99) , +2, 12.5, 0, 0, 0.599004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464253,-99) , +15, 1.17547, 1, 0, 0.582836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434175,-99) , +8, -0.916369, 0, 0, 0.567603,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467858,-99) , +2, 33.5, 0, 0, 0.484503,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25452,-99) , +7, 0.0992904, 1, 0, 0.471627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220428,-99) , +5, 2.17988, 1, 0, 0.461212,-99) , +16, 514.545, 1, 0, 0.502441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185011,-99) , +4, 2.07717, 1, 0, 0.493992,-99) ); + // itree = 184 + fBoostWeights.push_back(0.00979886); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684354,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47814,-99) , +8, 0.704915, 1, 0, 0.52706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269372,-99) , +15, 0.0701514, 0, 0, 0.371092,-99) , +7, 0.00923195, 0, 0, 0.514837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285352,-99) , +13, 0.0377886, 1, 0, 0.507268,-99) , +12, 0.450031, 0, 0, 0.517281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124019,-99) , +13, 0.000391896, 1, 0, 0.310067,-99) , +4, 1.83287, 1, 0, 0.500527,-99) ); + // itree = 185 + fBoostWeights.push_back(0.0134819); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566884,-99) , +8, -0.349614, 0, 0, 0.636709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497436,-99) , +8, 0.912921, 1, 0, 0.609539,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500163,-99) , +12, 0.351744, 0, 0, 0.523861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332395,-99) , +7, 0.0100047, 0, 0, 0.5082,-99) , +12, 0.101709, 1, 0, 0.548221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393096,-99) , +12, 0.0286387, 0, 0, 0.536452,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675015,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562995,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338502,-99) , +5, 1.94386, 1, 0, 0.437308,-99) , +12, 0.100567, 1, 0, 0.497734,-99) , +12, 0.321241, 0, 0, 0.532033,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298325,-99) , +6, 0.850289, 1, 0, 0.482945,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150612,-99) , +5, 2.11852, 1, 0, 0.328438,-99) , +11, 0.5, 1, 0, 0.406287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168093,-99) , +14, -2.08403, 1, 0, 0.369487,-99) , +11, 1.5, 0, 0, 0.42887,-99) , +5, 1.67897, 1, 0, 0.495399,-99) ); + // itree = 186 + fBoostWeights.push_back(0.0110628); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695194,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404913,-99) , +12, 0.0286387, 0, 0, 0.553409,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426352,-99) , +5, 1.44839, 1, 0, 0.47687,-99) , +12, 0.11833, 1, 0, 0.5157,-99) , +12, 0.466219, 0, 0, 0.52393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323632,-99) , +7, 0.132187, 1, 0, 0.515134,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398665,-99) , +12, 0.304205, 0, 0, 0.464081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0760592,-99) , +3, 0.997415, 1, 0, 0.411443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0419585,-99) , +8, 0.284682, 0, 0, 0.334907,-99) , +5, 2.08852, 1, 0, 0.497634,-99) ); + // itree = 187 + fBoostWeights.push_back(0.0114906); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501629,-99) , +5, 1.43678, 1, 0, 0.545701,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360224,-99) , +6, 0.413406, 1, 0, 0.41411,-99) , +12, 0.0312064, 0, 0, 0.533849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204786,-99) , +5, 2.23641, 1, 0, 0.529117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358971,-99) , +8, -0.9709, 0, 0, 0.517939,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621437,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31891,-99) , +15, 0.448464, 1, 0, 0.46159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0937737,-99) , +5, 2.39889, 1, 0, 0.430225,-99) , +1, 19.5, 0, 0, 0.474374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0905462,-99) , +5, 1.86688, 1, 0, 0.230051,-99) , +13, 0.00166483, 1, 0, 0.385079,-99) , +4, 1.56754, 1, 0, 0.49087,-99) ); + // itree = 188 + fBoostWeights.push_back(0.012475); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.707769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599977,-99) , +4, 0.49547, 1, 0, 0.622802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440222,-99) , +8, -0.897773, 0, 0, 0.600794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0543762,-99) , +5, 2.3841, 1, 0, 0.588238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405842,-99) , +8, 0.989144, 1, 0, 0.567054,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154825,-99) , +5, 2.22178, 1, 0, 0.493038,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245718,-99) , +15, 0.0479877, 0, 0, 0.330189,-99) , +7, 0.00902533, 0, 0, 0.478183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233387,-99) , +13, 0.0404155, 1, 0, 0.468818,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0675675,-99) , +13, 0.00088722, 1, 0, 0.25253,-99) , +4, 1.82191, 1, 0, 0.450924,-99) , +11, 1.5, 0, 0, 0.490069,-99) ); + // itree = 189 + fBoostWeights.push_back(0.0139086); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546271,-99) , +2, 24.5, 0, 0, 0.607358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418661,-99) , +12, 0.0311958, 0, 0, 0.58465,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349432,-99) , +8, -0.917575, 0, 0, 0.497892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232822,-99) , +7, 0.0444423, 1, 0, 0.486958,-99) , +1, 15.5, 0, 0, 0.526993,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529614,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131535,-99) , +5, 1.4338, 1, 0, 0.298923,-99) , +15, 0.145929, 1, 0, 0.379472,-99) , +13, 0.0195069, 1, 0, 0.512322,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50092,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113998,-99) , +12, 0.367527, 0, 0, 0.175597,-99) , +14, -4.04441, 1, 0, 0.303909,-99) , +5, 2.08846, 1, 0, 0.492855,-99) ); + // itree = 190 + fBoostWeights.push_back(0.0146103); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497892,-99) , +12, 0.0312313, 0, 0, 0.608252,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411224,-99) , +7, 0.0134259, 0, 0, 0.469141,-99) , +15, 0.102291, 0, 0, 0.572627,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424333,-99) , +3, 0.99336, 1, 0, 0.52569,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347509,-99) , +3, 0.993818, 0, 0, 0.41072,-99) , +6, 0.620055, 1, 0, 0.4811,-99) , +8, 0.70045, 1, 0, 0.53908,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315794,-99) , +7, 0.0986927, 1, 0, 0.413981,-99) , +13, 0.0188551, 1, 0, 0.524492,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646225,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272347,-99) , +3, 0.891724, 0, 0, 0.437997,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0498811,-99) , +8, 0.919468, 0, 0, 0.302942,-99) , +5, 2.12368, 1, 0, 0.402037,-99) , +12, 0.449192, 0, 0, 0.423086,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136928,-99) , +7, 0.0675423, 1, 0, 0.399367,-99) , +5, 1.76188, 1, 0, 0.486735,-99) ); + // itree = 191 + fBoostWeights.push_back(0.0123538); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539708,-99) , +1, 14.5, 0, 0, 0.591959,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353812,-99) , +13, 0.00813286, 1, 0, 0.478687,-99) , +3, 0.997839, 1, 0, 0.571307,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480985,-99) , +2, 30.5, 0, 0, 0.501168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329652,-99) , +7, 0.105872, 1, 0, 0.491126,-99) , +16, 3855.58, 1, 0, 0.53334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315624,-99) , +12, 0.0229545, 0, 0, 0.524314,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461363,-99) , +12, 0.0639516, 1, 0, 0.563744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397498,-99) , +12, 0.037161, 0, 0, 0.507251,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546824,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.25709, 1, 0, 0.315483,-99) , +8, 0.996052, 0, 0, 0.383372,-99) , +12, 0.113369, 1, 0, 0.443707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19254,-99) , +14, -2.40133, 1, 0, 0.391224,-99) , +5, 1.87351, 1, 0, 0.495965,-99) ); + // itree = 192 + fBoostWeights.push_back(0.0109714); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561082,-99) , +4, 0.371588, 1, 0, 0.586392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323967,-99) , +15, 1.65882, 1, 0, 0.496862,-99) , +6, 0.669981, 1, 0, 0.549146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365142,-99) , +14, -4.69824, 0, 0, 0.53762,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285468,-99) , +12, 0.129582, 1, 0, 0.405538,-99) , +8, -0.924607, 0, 0, 0.523804,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478714,-99) , +2, 22.5, 0, 0, 0.521243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264368,-99) , +4, 2.1745, 1, 0, 0.497865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273384,-99) , +7, 0.012179, 0, 0, 0.444745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193387,-99) , +13, 0.00286656, 1, 0, 0.385539,-99) , +5, 1.92377, 1, 0, 0.49877,-99) ); + // itree = 193 + fBoostWeights.push_back(0.0132437); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531198,-99) , +8, 0.921462, 1, 0, 0.638661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437762,-99) , +3, 0.998017, 1, 0, 0.599242,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46845,-99) , +7, 0.0139102, 0, 0, 0.526454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313234,-99) , +7, 0.027171, 1, 0, 0.503831,-99) , +2, 16.5, 0, 0, 0.549181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383418,-99) , +12, 0.0327201, 0, 0, 0.533919,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435521,-99) , +7, 0.0349496, 1, 0, 0.568881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453263,-99) , +3, 0.97455, 0, 0, 0.53402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310918,-99) , +4, 2.01639, 1, 0, 0.516266,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600735,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336693,-99) , +8, 0.995697, 0, 0, 0.362824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122401,-99) , +13, 0.0203951, 1, 0, 0.339368,-99) , +12, 0.418008, 0, 0, 0.372861,-99) , +12, 0.100704, 1, 0, 0.431655,-99) , +4, 1.29096, 1, 0, 0.493681,-99) ); + // itree = 194 + fBoostWeights.push_back(0.0148644); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.70729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609883,-99) , +6, 0.168682, 1, 0, 0.648085,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481957,-99) , +2, 18.5, 0, 0, 0.535667,-99) , +16, 3736.39, 1, 0, 0.597556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378694,-99) , +14, -4.38705, 0, 0, 0.580898,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442095,-99) , +1, 14.5, 0, 0, 0.545076,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419713,-99) , +10, -57.7756, 1, 0, 0.459574,-99) , +2, 16.5, 0, 0, 0.505791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371665,-99) , +3, 0.930751, 0, 0, 0.488638,-99) , +6, 0.572855, 1, 0, 0.536363,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631395,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484961,-99) , +8, 0.982656, 1, 0, 0.587079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390004,-99) , +15, 0.0327296, 1, 0, 0.438763,-99) , +12, 0.115337, 1, 0, 0.510805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276192,-99) , +12, 0.0232558, 0, 0, 0.494495,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490662,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0452268,-99) , +8, -0.897366, 0, 0, 0.263533,-99) , +11, 1.5, 0, 0, 0.34066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.053831,-99) , +4, 1.92631, 1, 0, 0.30341,-99) , +13, 0.00242163, 1, 0, 0.434657,-99) , +5, 1.67752, 1, 0, 0.497824,-99) ); + // itree = 195 + fBoostWeights.push_back(0.0116313); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44234,-99) , +14, -4.32614, 0, 0, 0.60091,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434949,-99) , +8, -0.637283, 0, 0, 0.512564,-99) , +11, 1.5, 0, 0, 0.54262,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267245,-99) , +5, 1.85536, 1, 0, 0.472116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0995655,-99) , +7, 0.0309219, 1, 0, 0.43734,-99) , +1, 9.5, 0, 0, 0.52193,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25563,-99) , +3, 0.999633, 1, 0, 0.514561,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0925939,-99) , +13, 0.00081729, 1, 0, 0.30862,-99) , +4, 1.85368, 1, 0, 0.499364,-99) ); + // itree = 196 + fBoostWeights.push_back(0.0104037); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429948,-99) , +8, -0.883648, 0, 0, 0.533773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128003,-99) , +5, 2.31011, 1, 0, 0.528673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359102,-99) , +14, -4.87886, 0, 0, 0.518654,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252723,-99) , +7, 0.032716, 1, 0, 0.359235,-99) , +3, 0.999134, 1, 0, 0.506788,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368383,-99) , +16, 527.447, 1, 0, 0.478227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112642,-99) , +2, 9.5, 0, 0, 0.422317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0646027,-99) , +13, 0.00238597, 1, 0, 0.327738,-99) , +4, 1.82197, 1, 0, 0.491675,-99) ); + // itree = 197 + fBoostWeights.push_back(0.0135077); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476969,-99) , +12, 0.0315268, 0, 0, 0.605535,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443286,-99) , +4, 0.864777, 1, 0, 0.50331,-99) , +12, 0.113362, 1, 0, 0.549374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553594,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180492,-99) , +13, 0.0346559, 1, 0, 0.410421,-99) , +11, 1.5, 0, 0, 0.449609,-99) , +6, 0.851645, 1, 0, 0.521777,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207675,-99) , +6, 0.333112, 0, 0, 0.34831,-99) , +14, -4.64989, 0, 0, 0.510353,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425918,-99) , +12, 0.143307, 1, 0, 0.506703,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0652955,-99) , +4, 1.69225, 1, 0, 0.168553,-99) , +8, 0.946379, 0, 0, 0.351684,-99) , +5, 2.03504, 1, 0, 0.491172,-99) ); + // itree = 198 + fBoostWeights.push_back(0.0113121); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57751,-99) , +6, 0.23571, 1, 0, 0.620868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507419,-99) , +3, 0.996174, 1, 0, 0.596759,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487157,-99) , +16, 43.1734, 0, 0, 0.547743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354753,-99) , +13, 0.00654394, 1, 0, 0.513077,-99) , +1, 12.5, 0, 0, 0.564284,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509608,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399277,-99) , +13, 0.000137708, 0, 0, 0.490913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286178,-99) , +15, 1.84508, 1, 0, 0.481069,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218125,-99) , +12, 0.138108, 1, 0, 0.358175,-99) , +8, -0.894008, 0, 0, 0.467078,-99) , +16, 450.772, 1, 0, 0.503504,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125022,-99) , +14, -3.71353, 1, 0, 0.286343,-99) , +4, 1.83989, 1, 0, 0.48746,-99) ); + // itree = 199 + fBoostWeights.push_back(0.0147689); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579481,-99) , +7, 0.0385096, 1, 0, 0.643866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500546,-99) , +8, -0.760943, 0, 0, 0.617341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398989,-99) , +8, 0.983999, 1, 0, 0.593186,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527372,-99) , +14, -2.39847, 0, 0, 0.583766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47469,-99) , +5, 1.41703, 1, 0, 0.555046,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365027,-99) , +3, 0.945586, 0, 0, 0.491952,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188084,-99) , +15, 0.187782, 1, 0, 0.334694,-99) , +13, 0.0103136, 1, 0, 0.463759,-99) , +4, 0.969945, 1, 0, 0.508924,-99) , +11, 1.5, 0, 0, 0.535258,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468978,-99) , +16, 402.091, 1, 0, 0.548759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353849,-99) , +8, 0.910293, 0, 0, 0.506122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211352,-99) , +5, 2.46049, 1, 0, 0.482842,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0399567,-99) , +4, 1.8657, 1, 0, 0.197938,-99) , +14, -2.81171, 1, 0, 0.39786,-99) , +5, 1.89106, 1, 0, 0.507498,-99) ); + // itree = 200 + fBoostWeights.push_back(0.0141002); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666442,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511842,-99) , +16, 365.554, 1, 0, 0.566262,-99) , +4, 0.493659, 1, 0, 0.589815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36572,-99) , +14, -4.55848, 0, 0, 0.56896,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393559,-99) , +8, -0.946158, 0, 0, 0.535129,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29627,-99) , +6, 0.888561, 1, 0, 0.425942,-99) , +1, 9.5, 0, 0, 0.512304,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336056,-99) , +8, 0.428901, 0, 0, 0.432507,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193724,-99) , +16, 182.184, 1, 0, 0.295632,-99) , +11, 0.5, 1, 0, 0.362538,-99) , +5, 1.73591, 1, 0, 0.473912,-99) , +11, 1.5, 0, 0, 0.504939,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0735797,-99) , +8, 0.980791, 0, 0, 0.228169,-99) , +4, 1.91933, 1, 0, 0.490087,-99) ); + // itree = 201 + fBoostWeights.push_back(0.00901541); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58028,-99) , +4, 0.846637, 1, 0, 0.610291,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457879,-99) , +16, 176.013, 1, 0, 0.506163,-99) , +14, -3.64097, 0, 0, 0.583063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437904,-99) , +8, -0.880203, 0, 0, 0.56545,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569407,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4712,-99) , +13, 0.00200888, 0, 0, 0.533485,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361996,-99) , +13, 0.0073312, 1, 0, 0.44807,-99) , +4, 0.84819, 1, 0, 0.47896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.106838,-99) , +7, 0.251859, 1, 0, 0.473122,-99) , +11, 1.5, 0, 0, 0.503852,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183322,-99) , +13, 0.000120849, 1, 0, 0.317339,-99) , +5, 2.15512, 1, 0, 0.490396,-99) ); + // itree = 202 + fBoostWeights.push_back(0.0124908); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541292,-99) , +2, 19.5, 0, 0, 0.593833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415774,-99) , +5, 0.538452, 0, 0, 0.57219,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335847,-99) , +14, -4.56343, 0, 0, 0.502195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22031,-99) , +13, 0.0363416, 1, 0, 0.492237,-99) , +4, 0.91767, 1, 0, 0.526675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306057,-99) , +3, 0.99965, 1, 0, 0.519747,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581961,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357964,-99) , +15, 0.173664, 0, 0, 0.478012,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566098,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.22793, 1, 0, 0.16529,-99) , +12, 0.375458, 0, 0, 0.229831,-99) , +8, 0.917782, 0, 0, 0.366175,-99) , +5, 1.98072, 1, 0, 0.497525,-99) ); + // itree = 203 + fBoostWeights.push_back(0.0108256); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502433,-99) , +6, 0.851059, 1, 0, 0.579361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151707,-99) , +5, 2.30917, 1, 0, 0.571921,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339934,-99) , +9, 0.156051, 0, 0, 0.434538,-99) , +14, -4.37941, 0, 0, 0.551844,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469548,-99) , +12, 0.466533, 0, 0, 0.485134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256843,-99) , +7, 0.0990909, 1, 0, 0.472506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246501,-99) , +4, 1.81763, 1, 0, 0.452806,-99) , +12, 0.113398, 1, 0, 0.496461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166428,-99) , +12, 0.01821, 0, 0, 0.488174,-99) ); + // itree = 204 + fBoostWeights.push_back(0.0117557); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669278,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493925,-99) , +2, 16.5, 0, 0, 0.556987,-99) , +6, 0.4858, 1, 0, 0.606103,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440954,-99) , +3, 0.997089, 1, 0, 0.549493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500164,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380953,-99) , +9, -0.254691, 1, 0, 0.43874,-99) , +2, 11.5, 0, 0, 0.51818,-99) , +12, 0.101709, 1, 0, 0.552981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37252,-99) , +12, 0.0310262, 0, 0, 0.538933,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664233,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295563,-99) , +15, 0.0524539, 0, 0, 0.460943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23171,-99) , +13, 0.0110708, 1, 0, 0.440671,-99) , +12, 0.446102, 0, 0, 0.45745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.139145,-99) , +7, 0.0948526, 1, 0, 0.441194,-99) , +5, 1.54796, 1, 0, 0.491401,-99) ); + // itree = 205 + fBoostWeights.push_back(0.00904645); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500674,-99) , +8, 0.91263, 1, 0, 0.582265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416505,-99) , +12, 0.0324206, 0, 0, 0.567639,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253845,-99) , +7, 0.00744544, 0, 0, 0.503182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341944,-99) , +7, 0.0669166, 1, 0, 0.48949,-99) , +4, 0.918392, 1, 0, 0.521897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30025,-99) , +3, 0.999637, 1, 0, 0.515393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312694,-99) , +5, 2.08696, 1, 0, 0.39078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0424442,-99) , +14, -2.6219, 1, 0, 0.303007,-99) , +4, 1.87224, 1, 0, 0.500538,-99) ); + // itree = 206 + fBoostWeights.push_back(0.0129615); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522271,-99) , +13, 0.0186785, 1, 0, 0.637042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399483,-99) , +7, 0.0326128, 1, 0, 0.550104,-99) , +2, 24.5, 0, 0, 0.581206,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451111,-99) , +14, -2.23457, 1, 0, 0.576601,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147599,-99) , +5, 2.18787, 1, 0, 0.4506,-99) , +16, 416.816, 1, 0, 0.499077,-99) , +5, 1.44143, 1, 0, 0.540477,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298867,-99) , +9, 0.131644, 0, 0, 0.370292,-99) , +12, 0.029614, 0, 0, 0.527839,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573002,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296706,-99) , +9, -2.41119, 1, 0, 0.373383,-99) , +2, 17.5, 0, 0, 0.442142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0841377,-99) , +4, 1.81706, 1, 0, 0.21958,-99) , +14, -2.61847, 1, 0, 0.373708,-99) , +4, 1.63744, 1, 0, 0.502687,-99) ); + // itree = 207 + fBoostWeights.push_back(0.0113749); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453901,-99) , +8, -0.949125, 0, 0, 0.578526,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325813,-99) , +4, 1.15124, 0, 0, 0.411863,-99) , +14, -4.29333, 0, 0, 0.556678,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527352,-99) , +8, 0.262342, 0, 0, 0.618044,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380317,-99) , +5, 1.37778, 1, 0, 0.441715,-99) , +12, 0.387543, 0, 0, 0.473086,-99) , +12, 0.138609, 1, 0, 0.518489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237678,-99) , +12, 0.0168462, 0, 0, 0.512144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179884,-99) , +4, 1.99486, 1, 0, 0.500274,-99) ); + // itree = 208 + fBoostWeights.push_back(0.0111007); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438546,-99) , +7, 0.0303074, 1, 0, 0.567447,-99) , +0, 32.5, 0, 0, 0.593979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451313,-99) , +14, -4.06764, 0, 0, 0.570954,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534093,-99) , +2, 21.5, 0, 0, 0.580546,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418849,-99) , +7, 0.052965, 1, 0, 0.49108,-99) , +6, 0.578432, 1, 0, 0.532363,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373693,-99) , +5, 1.97956, 1, 0, 0.470979,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10202,-99) , +5, 1.76441, 1, 0, 0.269118,-99) , +13, 0.00764111, 1, 0, 0.433157,-99) , +5, 1.37722, 1, 0, 0.471718,-99) , +11, 1.5, 0, 0, 0.504208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221887,-99) , +4, 1.98902, 1, 0, 0.493206,-99) ); + // itree = 209 + fBoostWeights.push_back(0.00973806); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.690066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589054,-99) , +6, 0.140023, 1, 0, 0.61053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469489,-99) , +8, -0.888098, 0, 0, 0.593108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44358,-99) , +8, 0.991182, 1, 0, 0.576269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381273,-99) , +5, 2.24541, 1, 0, 0.564731,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406475,-99) , +8, 0.990323, 1, 0, 0.549858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320458,-99) , +12, 0.0216784, 0, 0, 0.529683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237524,-99) , +7, 0.0877419, 1, 0, 0.442332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189078,-99) , +4, 1.82602, 1, 0, 0.426472,-99) , +12, 0.113663, 1, 0, 0.473094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162874,-99) , +5, 2.31708, 1, 0, 0.464919,-99) , +11, 1.5, 0, 0, 0.497725,-99) ); + // itree = 210 + fBoostWeights.push_back(0.014271); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500824,-99) , +13, 0.0104457, 1, 0, 0.620119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329466,-99) , +4, 1.97678, 1, 0, 0.61141,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584781,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328755,-99) , +4, 1.44247, 1, 0, 0.443899,-99) , +16, 373.655, 1, 0, 0.495158,-99) , +15, 0.216824, 0, 0, 0.58095,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311574,-99) , +8, 0.719682, 1, 0, 0.44839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164459,-99) , +4, 1.71388, 1, 0, 0.412444,-99) , +12, 0.0312599, 0, 0, 0.549789,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501856,-99) , +6, 0.755882, 1, 0, 0.570599,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461888,-99) , +2, 22.5, 0, 0, 0.528978,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336863,-99) , +11, 0.5, 1, 0, 0.416709,-99) , +1, 14.5, 0, 0, 0.466892,-99) , +16, 968, 1, 0, 0.509007,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628404,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149265,-99) , +7, 0.0596755, 1, 0, 0.380254,-99) , +12, 0.418065, 0, 0, 0.418612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148703,-99) , +8, -0.416956, 0, 0, 0.374217,-99) , +5, 1.68543, 1, 0, 0.457055,-99) , +12, 0.113986, 1, 0, 0.500412,-99) ); + // itree = 211 + fBoostWeights.push_back(0.01246); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.741084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633128,-99) , +6, 0.504459, 1, 0, 0.685542,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432081,-99) , +7, 0.0964787, 1, 0, 0.538559,-99) , +13, 0.00766149, 1, 0, 0.607383,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449261,-99) , +9, -0.674609, 1, 0, 0.491651,-99) , +2, 13.5, 0, 0, 0.570618,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473033,-99) , +16, 5e+09, 1, 0, 0.534138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408444,-99) , +5, 1.25546, 0, 0, 0.482347,-99) , +13, 0.00123938, 0, 0, 0.546373,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511775,-99) , +13, 0.00459302, 1, 0, 0.620372,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301536,-99) , +7, 0.0179131, 1, 0, 0.47502,-99) , +0, 16.5, 0, 0, 0.547242,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390716,-99) , +12, 0.118246, 1, 0, 0.444536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167514,-99) , +5, 2.25696, 1, 0, 0.422937,-99) , +11, 1.5, 0, 0, 0.466822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171041,-99) , +7, 0.0935386, 1, 0, 0.451592,-99) , +5, 1.56185, 1, 0, 0.501405,-99) ); + // itree = 212 + fBoostWeights.push_back(0.0129098); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.73795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589033,-99) , +16, 1918.55, 1, 0, 0.666824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495464,-99) , +8, 0.909504, 1, 0, 0.624557,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466997,-99) , +13, 0.0177141, 1, 0, 0.571328,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4323,-99) , +16, 377.958, 1, 0, 0.47218,-99) , +8, 0.510771, 1, 0, 0.529652,-99) , +6, 0.290994, 1, 0, 0.558497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40891,-99) , +8, -0.92549, 0, 0, 0.541644,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461836,-99) , +15, 0.227791, 0, 0, 0.501192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317493,-99) , +7, 0.00794889, 0, 0, 0.4878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236866,-99) , +4, 2.09865, 1, 0, 0.473467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507102,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.047723,-99) , +4, 1.57456, 1, 0, 0.17011,-99) , +10, -652.417, 1, 0, 0.274189,-99) , +13, 0.00503479, 1, 0, 0.432104,-99) , +5, 1.66215, 1, 0, 0.499816,-99) ); + // itree = 213 + fBoostWeights.push_back(0.0106066); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526286,-99) , +6, 0.134436, 1, 0, 0.549832,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295162,-99) , +0, 12.5, 1, 0, 0.435721,-99) , +2, 9.5, 0, 0, 0.530877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278125,-99) , +14, -5.64102, 0, 0, 0.523668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206904,-99) , +4, 1.10648, 1, 0, 0.380051,-99) , +13, 0.02186, 1, 0, 0.5111,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0818274,-99) , +8, 0.91942, 0, 0, 0.298619,-99) , +5, 2.15915, 1, 0, 0.49604,-99) ); + // itree = 214 + fBoostWeights.push_back(0.0127332); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697822,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537912,-99) , +5, 1.16797, 0, 0, 0.57164,-99) , +6, 0.250395, 1, 0, 0.608644,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419653,-99) , +7, 0.0469098, 1, 0, 0.478941,-99) , +3, 0.997018, 1, 0, 0.576052,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376766,-99) , +13, 0.00157278, 0, 0, 0.458977,-99) , +2, 11.5, 0, 0, 0.548839,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503458,-99) , +11, 1.5, 0, 0, 0.540883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369722,-99) , +12, 0.0319445, 0, 0, 0.523044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383176,-99) , +16, 500.346, 1, 0, 0.44123,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221563,-99) , +4, 1.73717, 1, 0, 0.402891,-99) , +7, 0.0133776, 0, 0, 0.484954,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147294,-99) , +12, 0.408132, 0, 0, 0.240614,-99) , +13, 0.0121275, 1, 0, 0.458711,-99) , +5, 1.4428, 1, 0, 0.497314,-99) ); + // itree = 215 + fBoostWeights.push_back(0.0115741); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657022,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443174,-99) , +9, 1.62945, 1, 0, 0.55925,-99) , +9, 3.84001, 0, 0, 0.580939,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483245,-99) , +16, 528.634, 1, 0, 0.517118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248188,-99) , +7, 0.0311303, 1, 0, 0.497115,-99) , +2, 18.5, 0, 0, 0.526809,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0713355,-99) , +1, 22.5, 0, 0, 0.346011,-99) , +7, 0.109217, 1, 0, 0.516632,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173049,-99) , +14, -3.70949, 1, 0, 0.343464,-99) , +5, 2.08836, 1, 0, 0.500093,-99) ); + // itree = 216 + fBoostWeights.push_back(0.00962481); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676008,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435053,-99) , +5, 1.99312, 1, 0, 0.559556,-99) , +3, 0.913914, 1, 0, 0.579303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400808,-99) , +14, -4.56123, 0, 0, 0.56261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455478,-99) , +6, 0.915652, 1, 0, 0.528468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468888,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296179,-99) , +14, -2.12584, 1, 0, 0.436582,-99) , +5, 1.42584, 1, 0, 0.476749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0565536,-99) , +7, 0.23763, 1, 0, 0.470159,-99) , +11, 1.5, 0, 0, 0.50023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226393,-99) , +4, 1.97331, 1, 0, 0.48887,-99) ); + // itree = 217 + fBoostWeights.push_back(0.0131171); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557139,-99) , +16, 841.132, 1, 0, 0.58867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451134,-99) , +15, 0.141207, 0, 0, 0.57189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360601,-99) , +12, 0.0228655, 0, 0, 0.553202,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431659,-99) , +15, 0.273909, 1, 0, 0.547252,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384263,-99) , +6, 0.40116, 1, 0, 0.451331,-99) , +2, 12.5, 0, 0, 0.510862,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345675,-99) , +9, 2.28796, 0, 0, 0.411436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129517,-99) , +7, 0.06533, 1, 0, 0.383469,-99) , +4, 1.29042, 1, 0, 0.467899,-99) , +12, 0.130716, 1, 0, 0.513992,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384202,-99) , +11, 1.5, 0, 0, 0.470638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0898482,-99) , +8, 0.897676, 0, 0, 0.331639,-99) , +5, 2.08702, 1, 0, 0.497071,-99) ); + // itree = 218 + fBoostWeights.push_back(0.00995832); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516757,-99) , +2, 14.5, 0, 0, 0.559484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414991,-99) , +12, 0.0314467, 0, 0, 0.54706,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420748,-99) , +3, 0.932287, 0, 0, 0.51531,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297446,-99) , +11, 1.5, 0, 0, 0.374203,-99) , +14, -2.39687, 1, 0, 0.475958,-99) , +4, 1.23692, 1, 0, 0.520152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262316,-99) , +7, 0.146564, 1, 0, 0.511167,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148717,-99) , +8, 0.946292, 0, 0, 0.310762,-99) , +5, 2.13012, 1, 0, 0.495944,-99) ); + // itree = 219 + fBoostWeights.push_back(0.0140001); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.729136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647213,-99) , +7, 0.0430468, 1, 0, 0.693301,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41007,-99) , +5, 1.38179, 1, 0, 0.53479,-99) , +12, 0.127032, 1, 0, 0.603358,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423718,-99) , +5, 1.25949, 0, 0, 0.468326,-99) , +8, -0.854462, 0, 0, 0.570103,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403735,-99) , +2, 11.5, 1, 0, 0.433773,-99) , +16, 1561.23, 1, 0, 0.483326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364686,-99) , +12, 0.0313859, 0, 0, 0.463117,-99) , +14, -2.67841, 0, 0, 0.53162,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518013,-99) , +12, 0.109235, 1, 0, 0.5824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399431,-99) , +8, 0.984921, 1, 0, 0.546749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320003,-99) , +5, 2.43947, 1, 0, 0.53372,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457461,-99) , +3, 0.995954, 1, 0, 0.55903,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235318,-99) , +3, 0.994844, 1, 0, 0.406602,-99) , +9, 3.08374, 0, 0, 0.442668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135919,-99) , +4, 1.64466, 1, 0, 0.23456,-99) , +13, 0.00444813, 1, 0, 0.391873,-99) , +11, 1.5, 0, 0, 0.442431,-99) , +5, 1.59966, 1, 0, 0.491837,-99) ); + // itree = 220 + fBoostWeights.push_back(0.01022); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380474,-99) , +14, -4.87945, 0, 0, 0.547605,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34776,-99) , +2, 17.5, 1, 0, 0.4035,-99) , +12, 0.0312788, 0, 0, 0.534322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303408,-99) , +3, 0.999595, 1, 0, 0.526351,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267595,-99) , +15, 0.0503587, 0, 0, 0.360174,-99) , +7, 0.00889001, 0, 0, 0.516036,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410953,-99) , +16, 643.203, 1, 0, 0.491087,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0511015,-99) , +4, 1.96531, 1, 0, 0.209756,-99) , +8, 0.950196, 0, 0, 0.356876,-99) , +5, 1.98298, 1, 0, 0.493753,-99) ); + // itree = 221 + fBoostWeights.push_back(0.01271); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.712817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58642,-99) , +6, 0.85867, 1, 0, 0.663177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55266,-99) , +13, 0.00235548, 0, 0, 0.630881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461454,-99) , +3, 0.998406, 1, 0, 0.601686,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56166,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476172,-99) , +2, 11.5, 1, 0, 0.507538,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345612,-99) , +2, 11.5, 0, 0, 0.424396,-99) , +6, 0.617164, 1, 0, 0.468376,-99) , +16, 268.792, 1, 0, 0.49674,-99) , +2, 19.5, 0, 0, 0.54526,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339932,-99) , +12, 0.0236211, 0, 0, 0.522409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115255,-99) , +13, 0.0217071, 1, 0, 0.514027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.44869, 1, 0, 0.502848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638141,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323999,-99) , +16, 456.134, 1, 0, 0.385739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220053,-99) , +4, 1.6675, 1, 0, 0.33958,-99) , +12, 0.500162, 0, 0, 0.37652,-99) , +12, 0.17812, 1, 0, 0.457243,-99) , +5, 1.4974, 1, 0, 0.498297,-99) ); + // itree = 222 + fBoostWeights.push_back(0.00964955); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674632,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54933,-99) , +6, 0.131699, 1, 0, 0.575072,-99) , +9, 4.4213, 0, 0, 0.591806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422944,-99) , +14, -4.56003, 0, 0, 0.576337,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46501,-99) , +12, 0.113663, 1, 0, 0.505287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264454,-99) , +3, 0.999558, 1, 0, 0.496706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103979,-99) , +5, 2.24307, 1, 0, 0.490174,-99) , +11, 1.5, 0, 0, 0.518975,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102083,-99) , +13, 0.00102316, 1, 0, 0.279111,-99) , +4, 1.83989, 1, 0, 0.502162,-99) ); + // itree = 223 + fBoostWeights.push_back(0.0116713); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.694473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577361,-99) , +4, 0.448763, 1, 0, 0.627834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50281,-99) , +8, -0.736699, 0, 0, 0.596896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445964,-99) , +14, -4.03499, 0, 0, 0.577669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382933,-99) , +5, 0.427916, 0, 0, 0.557514,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475626,-99) , +10, 3206.23, 1, 0, 0.542062,-99) , +10, 10989.1, 0, 0, 0.562908,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281813,-99) , +6, 0.795745, 1, 0, 0.364683,-99) , +12, 0.0328176, 0, 0, 0.523079,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576102,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282437,-99) , +5, 1.94205, 1, 0, 0.416173,-99) , +8, 0.992328, 0, 0, 0.437644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115315,-99) , +7, 0.103296, 1, 0, 0.420826,-99) , +12, 0.113389, 1, 0, 0.467788,-99) , +4, 0.917339, 1, 0, 0.502453,-99) ); + // itree = 224 + fBoostWeights.push_back(0.0113999); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654997,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449665,-99) , +8, -0.843582, 0, 0, 0.569885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462048,-99) , +8, 0.914359, 1, 0, 0.547195,-99) , +3, 0.945379, 1, 0, 0.574468,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471018,-99) , +13, 0.000680991, 0, 0, 0.527318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40095,-99) , +3, 0.998809, 1, 0, 0.512199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356439,-99) , +2, 8.5, 0, 0, 0.499252,-99) , +16, 969.995, 1, 0, 0.533345,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356874,-99) , +14, -4.01871, 0, 0, 0.490882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293682,-99) , +13, 0.0350375, 1, 0, 0.480255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270923,-99) , +3, 0.910229, 0, 0, 0.455887,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33785,-99) , +9, -3.05112, 1, 0, 0.41563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0806247,-99) , +8, 0.777482, 0, 0, 0.310443,-99) , +5, 1.97586, 1, 0, 0.404525,-99) , +4, 1.42187, 1, 0, 0.496763,-99) ); + // itree = 225 + fBoostWeights.push_back(0.00952468); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411342,-99) , +5, 0.571796, 0, 0, 0.554486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345738,-99) , +14, -4.72524, 0, 0, 0.542846,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453719,-99) , +9, 6.346, 0, 0, 0.475577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0854927,-99) , +13, 0.0402082, 1, 0, 0.464705,-99) , +4, 1.23694, 1, 0, 0.512928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255525,-99) , +3, 0.999635, 1, 0, 0.505329,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167083,-99) , +8, 0.946431, 0, 0, 0.334885,-99) , +5, 2.12194, 1, 0, 0.491367,-99) ); + // itree = 226 + fBoostWeights.push_back(0.0114052); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489331,-99) , +3, 0.998466, 1, 0, 0.591712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485137,-99) , +2, 10.5, 0, 0, 0.568785,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37565,-99) , +7, 0.094732, 1, 0, 0.53937,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142442,-99) , +7, 0.0331112, 1, 0, 0.451321,-99) , +2, 17.5, 0, 0, 0.486935,-99) , +11, 1.5, 0, 0, 0.514121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0882533,-99) , +7, 0.252395, 1, 0, 0.509042,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338921,-99) , +14, -3.98494, 1, 0, 0.45171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0745011,-99) , +8, 0.74611, 0, 0, 0.34438,-99) , +5, 2.08835, 1, 0, 0.493259,-99) ); + // itree = 227 + fBoostWeights.push_back(0.00961008); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649236,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521669,-99) , +9, -2.94188, 1, 0, 0.565946,-99) , +10, 1576.94, 1, 0, 0.597533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492804,-99) , +3, 0.998197, 1, 0, 0.582633,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493357,-99) , +12, 0.110485, 1, 0, 0.529739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343908,-99) , +14, -4.5876, 0, 0, 0.517932,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236988,-99) , +3, 0.871151, 0, 0, 0.43224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123109,-99) , +13, 0.0168468, 1, 0, 0.406446,-99) , +4, 1.2925, 1, 0, 0.478228,-99) , +16, 73.1364, 1, 0, 0.502908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269307,-99) , +5, 2.23833, 1, 0, 0.491609,-99) ); + // itree = 228 + fBoostWeights.push_back(0.0115076); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589378,-99) , +6, 0.151125, 1, 0, 0.60685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488661,-99) , +0, 11.5, 0, 0, 0.58913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413158,-99) , +14, -4.35757, 0, 0, 0.569407,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49688,-99) , +2, 33.5, 0, 0, 0.512262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336713,-99) , +0, 75.5, 1, 0, 0.499754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267596,-99) , +3, 0.770545, 0, 0, 0.490341,-99) , +11, 1.5, 0, 0, 0.516357,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492809,-99) , +8, 0.978772, 1, 0, 0.566753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244466,-99) , +4, 2.09885, 1, 0, 0.511814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230199,-99) , +7, 0.0119887, 0, 0, 0.455921,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100019,-99) , +11, 1.5, 0, 0, 0.203487,-99) , +14, -3.04484, 1, 0, 0.355284,-99) , +4, 1.69232, 1, 0, 0.495217,-99) ); + // itree = 229 + fBoostWeights.push_back(0.00834938); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421372,-99) , +14, -4.07274, 0, 0, 0.551202,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416422,-99) , +4, 1.18733, 1, 0, 0.477692,-99) , +12, 0.125377, 1, 0, 0.514008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282109,-99) , +12, 0.0176003, 0, 0, 0.508069,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200584,-99) , +14, -3.98494, 1, 0, 0.353585,-99) , +5, 2.15977, 1, 0, 0.497022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112745,-99) , +7, 0.253137, 1, 0, 0.492453,-99) ); + // itree = 230 + fBoostWeights.push_back(0.0111693); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4969,-99) , +5, 1.6586, 1, 0, 0.602319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442015,-99) , +14, -3.62497, 0, 0, 0.578029,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362409,-99) , +7, 0.0285335, 1, 0, 0.504739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237115,-99) , +0, 24.5, 1, 0, 0.49328,-99) , +2, 18.5, 0, 0, 0.521889,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0165803,-99) , +1, 17.5, 0, 0, 0.352359,-99) , +7, 0.102151, 1, 0, 0.510911,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.153323,-99) , +3, 0.997454, 1, 0, 0.421162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +8, 0.285182, 0, 0, 0.33878,-99) , +5, 2.15693, 1, 0, 0.498901,-99) ); + // itree = 231 + fBoostWeights.push_back(0.00712819); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444291,-99) , +5, 0.555502, 0, 0, 0.57529,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307268,-99) , +8, -0.946901, 0, 0, 0.498429,-99) , +4, 0.916442, 1, 0, 0.527478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245128,-99) , +7, 0.00711607, 0, 0, 0.5218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0603727,-99) , +7, 0.291498, 1, 0, 0.51772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306258,-99) , +12, 0.0235392, 0, 0, 0.507722,-99) ); + // itree = 232 + fBoostWeights.push_back(0.0124768); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.742621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627786,-99) , +5, 1.77262, 0, 0, 0.664591,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47692,-99) , +14, -3.09339, 0, 0, 0.582705,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151867,-99) , +8, -0.599021, 0, 0, 0.42965,-99) , +4, 1.32426, 1, 0, 0.542444,-99) , +9, 2.86394, 0, 0, 0.571898,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276864,-99) , +13, 0.0074137, 1, 0, 0.398956,-99) , +1, 52.5, 1, 0, 0.550965,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459048,-99) , +8, 0.747396, 1, 0, 0.512528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332744,-99) , +8, -0.9199, 0, 0, 0.494443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29328,-99) , +5, 2.12019, 1, 0, 0.477516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140335,-99) , +7, 0.051013, 1, 0, 0.459382,-99) , +1, 14.5, 0, 0, 0.501225,-99) ); + // itree = 233 + fBoostWeights.push_back(0.0102142); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678177,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525445,-99) , +12, 0.10127, 1, 0, 0.56901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273501,-99) , +5, 2.4212, 1, 0, 0.559449,-99) , +0, 32.5, 0, 0, 0.588377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402377,-99) , +12, 0.0300278, 0, 0, 0.572818,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431617,-99) , +8, 0.914548, 1, 0, 0.53276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404278,-99) , +13, 0.0231073, 1, 0, 0.519623,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416563,-99) , +10, 7010.56, 0, 0, 0.453631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257641,-99) , +0, 35.5, 1, 0, 0.429112,-99) , +5, 1.58812, 1, 0, 0.485234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236585,-99) , +4, 1.82192, 1, 0, 0.466887,-99) , +11, 1.5, 0, 0, 0.50145,-99) ); + // itree = 234 + fBoostWeights.push_back(0.0145813); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602145,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513864,-99) , +7, 0.0154727, 0, 0, 0.571984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435966,-99) , +12, 0.0311549, 0, 0, 0.557961,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431897,-99) , +8, -0.741471, 0, 0, 0.512757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312869,-99) , +5, 1.34317, 1, 0, 0.458386,-99) , +13, 0.0109823, 1, 0, 0.535967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330318,-99) , +14, -4.95437, 0, 0, 0.526506,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503095,-99) , +5, 1.92143, 0, 0, 0.606459,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.057972,-99) , +4, 1.87256, 1, 0, 0.47169,-99) , +8, 0.901155, 0, 0, 0.529024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236577,-99) , +3, 0.99906, 1, 0, 0.506981,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625126,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328217,-99) , +16, 462.444, 1, 0, 0.383452,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0219451,-99) , +3, 0.980215, 0, 0, 0.184496,-99) , +4, 1.66875, 1, 0, 0.312336,-99) , +12, 0.479045, 0, 0, 0.352556,-99) , +12, 0.145146, 1, 0, 0.438452,-99) , +4, 1.28688, 1, 0, 0.492788,-99) ); + // itree = 235 + fBoostWeights.push_back(0.0093554); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675018,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43595,-99) , +14, -3.9419, 0, 0, 0.515498,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320939,-99) , +7, 0.146019, 1, 0, 0.509358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131654,-99) , +5, 2.28888, 1, 0, 0.505047,-99) , +12, 0.449338, 0, 0, 0.51404,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42268,-99) , +16, 1309.1, 1, 0, 0.535771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212392,-99) , +1, 9.5, 0, 0, 0.460825,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176667,-99) , +14, -2.91141, 1, 0, 0.360096,-99) , +4, 1.69475, 1, 0, 0.494122,-99) ); + // itree = 236 + fBoostWeights.push_back(0.0100918); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52374,-99) , +13, 0.0142938, 1, 0, 0.61532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492955,-99) , +12, 0.0457552, 0, 0, 0.59427,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534395,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400864,-99) , +7, 0.0133751, 1, 0, 0.46987,-99) , +0, 13.5, 0, 0, 0.561091,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44253,-99) , +5, 1.49886, 1, 0, 0.484987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236147,-99) , +3, 0.745136, 0, 0, 0.47657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141801,-99) , +7, 0.209058, 1, 0, 0.470055,-99) , +11, 1.5, 0, 0, 0.499834,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.086906,-99) , +8, 0.953172, 0, 0, 0.2767,-99) , +5, 2.15694, 1, 0, 0.485261,-99) ); + // itree = 237 + fBoostWeights.push_back(0.00675708); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693098,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528893,-99) , +12, 0.101432, 1, 0, 0.568807,-99) , +12, 0.340934, 0, 0, 0.583208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450026,-99) , +12, 0.0307841, 0, 0, 0.567881,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458636,-99) , +12, 0.125713, 1, 0, 0.498253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288984,-99) , +8, -0.982452, 0, 0, 0.489431,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201046,-99) , +5, 2.24285, 1, 0, 0.482793,-99) , +16, 471.711, 1, 0, 0.515075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292992,-99) , +4, 1.97103, 1, 0, 0.505715,-99) ); + // itree = 238 + fBoostWeights.push_back(0.0101417); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528637,-99) , +2, 14.5, 0, 0, 0.590335,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467104,-99) , +4, 1.01616, 1, 0, 0.509395,-99) , +11, 1.5, 0, 0, 0.536157,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335711,-99) , +8, -0.80841, 0, 0, 0.442472,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0575696,-99) , +4, 1.56357, 1, 0, 0.400245,-99) , +13, 0.0175754, 1, 0, 0.519829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248003,-99) , +8, 0.411506, 1, 0, 0.342594,-99) , +12, 0.0258567, 0, 0, 0.509553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194391,-99) , +5, 2.27977, 1, 0, 0.498851,-99) ); + // itree = 239 + fBoostWeights.push_back(0.00918664); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563545,-99) , +2, 15.5, 0, 0, 0.623718,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468572,-99) , +12, 0.101036, 1, 0, 0.508866,-99) , +8, -0.499012, 0, 0, 0.582121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425623,-99) , +5, 0.592296, 0, 0, 0.561002,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314261,-99) , +12, 0.0908772, 0, 0, 0.438691,-99) , +14, -3.5849, 0, 0, 0.541504,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610394,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642688,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452725,-99) , +15, 0.026953, 1, 0, 0.463856,-99) , +16, 5.60887, 1, 0, 0.477697,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124332,-99) , +4, 1.56649, 1, 0, 0.335364,-99) , +8, -0.836451, 0, 0, 0.461705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142168,-99) , +7, 0.162612, 1, 0, 0.453121,-99) , +4, 0.925897, 1, 0, 0.488069,-99) ); + // itree = 240 + fBoostWeights.push_back(0.00892826); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.734184,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300302,-99) , +3, 0.999643, 1, 0, 0.510945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270861,-99) , +2, 6.5, 0, 0, 0.505465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183644,-99) , +13, 0.0583189, 1, 0, 0.499263,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.105438,-99) , +13, 9.40422e-05, 1, 0, 0.289443,-99) , +5, 2.16636, 1, 0, 0.486324,-99) , +12, 0.53413, 0, 0, 0.495307,-99) ); + // itree = 241 + fBoostWeights.push_back(0.0135388); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.710445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602649,-99) , +15, 0.186208, 0, 0, 0.664136,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495313,-99) , +6, 0.54329, 0, 0, 0.554033,-99) , +13, 0.00756965, 1, 0, 0.609497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194172,-99) , +4, 1.94677, 1, 0, 0.599709,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50386,-99) , +7, 0.0170554, 1, 0, 0.557422,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325146,-99) , +0, 13.5, 0, 0, 0.464327,-99) , +16, 173.209, 1, 0, 0.511883,-99) , +13, 0.00206774, 0, 0, 0.55652,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491516,-99) , +6, 0.598411, 1, 0, 0.56287,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415044,-99) , +9, -1.29804, 1, 0, 0.459005,-99) , +8, -0.530108, 0, 0, 0.524963,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357927,-99) , +12, 0.129036, 0, 0, 0.42313,-99) , +14, -3.32002, 0, 0, 0.503482,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390129,-99) , +1, 9.5, 0, 0, 0.480295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248607,-99) , +7, 0.00821357, 0, 0, 0.460488,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241705,-99) , +6, 0.914905, 1, 0, 0.358401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0734829,-99) , +5, 1.81312, 1, 0, 0.264911,-99) , +14, -2.67246, 1, 0, 0.387782,-99) , +4, 1.29076, 1, 0, 0.459306,-99) , +11, 1.5, 0, 0, 0.491751,-99) ); + // itree = 242 + fBoostWeights.push_back(0.0113042); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458938,-99) , +13, 0.0109816, 1, 0, 0.565346,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398391,-99) , +8, 0.932393, 1, 0, 0.473964,-99) , +2, 11.5, 0, 0, 0.536694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293326,-99) , +12, 0.0227642, 0, 0, 0.526756,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465627,-99) , +4, 0.993087, 1, 0, 0.502276,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269385,-99) , +4, 1.10643, 1, 0, 0.352328,-99) , +12, 0.131258, 1, 0, 0.438315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101133,-99) , +5, 1.93372, 1, 0, 0.419995,-99) , +8, -0.774574, 0, 0, 0.508487,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232605,-99) , +3, 0.969191, 0, 0, 0.443157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.105749,-99) , +13, 0.00102362, 1, 0, 0.325003,-99) , +4, 1.77596, 1, 0, 0.491502,-99) ); + // itree = 243 + fBoostWeights.push_back(0.0122886); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401793,-99) , +13, 0.000159397, 0, 0, 0.591927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423098,-99) , +5, 0.56512, 0, 0, 0.561317,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518978,-99) , +1, 11.5, 0, 0, 0.567672,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425136,-99) , +9, -0.779522, 1, 0, 0.469543,-99) , +10, -1171.04, 1, 0, 0.490227,-99) , +4, 0.72387, 1, 0, 0.513279,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203157,-99) , +15, 0.115314, 0, 0, 0.372041,-99) , +8, -0.946133, 0, 0, 0.500622,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5233,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322221,-99) , +2, 11.5, 0, 0, 0.459451,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50496,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0256105,-99) , +5, 2.14288, 1, 0, 0.168279,-99) , +16, 10.539, 1, 0, 0.21563,-99) , +8, 0.95315, 0, 0, 0.318769,-99) , +4, 1.69361, 1, 0, 0.477556,-99) ); + // itree = 244 + fBoostWeights.push_back(0.0109273); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674467,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475458,-99) , +8, 0.930725, 1, 0, 0.557512,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327067,-99) , +9, 0.157573, 0, 0, 0.417653,-99) , +12, 0.0312849, 0, 0, 0.535163,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535618,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340793,-99) , +7, 0.0672187, 1, 0, 0.498129,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212221,-99) , +13, 0.0113426, 1, 0, 0.374025,-99) , +2, 12.5, 0, 0, 0.447537,-99) , +12, 0.141693, 1, 0, 0.499386,-99) , +12, 0.498177, 0, 0, 0.506655,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293077,-99) , +4, 1.96402, 0, 0, 0.462055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0951964,-99) , +14, -3.05049, 1, 0, 0.338373,-99) , +4, 1.83993, 1, 0, 0.49398,-99) ); + // itree = 245 + fBoostWeights.push_back(0.00999161); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443182,-99) , +8, -0.886183, 0, 0, 0.536541,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25161,-99) , +6, 0.773063, 1, 0, 0.403456,-99) , +7, 0.00940296, 0, 0, 0.525324,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292173,-99) , +12, 0.100363, 0, 0, 0.390414,-99) , +14, -4.66406, 0, 0, 0.514996,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0362199,-99) , +1, 25.5, 0, 0, 0.33821,-99) , +7, 0.105856, 1, 0, 0.504247,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111464,-99) , +8, 0.934593, 0, 0, 0.334206,-99) , +5, 2.11562, 1, 0, 0.490585,-99) ); + // itree = 246 + fBoostWeights.push_back(0.00990921); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623467,-99) , +1, 22.5, 0, 0, 0.658589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572573,-99) , +16, 612.528, 1, 0, 0.631074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524682,-99) , +3, 0.99798, 1, 0, 0.613728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598141,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368856,-99) , +16, 81.3616, 1, 0, 0.428733,-99) , +6, 0.312619, 1, 0, 0.494631,-99) , +0, 15.5, 0, 0, 0.567999,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401949,-99) , +3, 0.902802, 0, 0, 0.541983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33421,-99) , +14, -4.7865, 0, 0, 0.527134,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336764,-99) , +3, 0.997006, 1, 0, 0.450226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23325,-99) , +7, 0.00870674, 0, 0, 0.431062,-99) , +12, 0.17782, 1, 0, 0.49404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253924,-99) , +4, 1.83285, 1, 0, 0.47748,-99) , +11, 1.5, 0, 0, 0.507346,-99) ); + // itree = 247 + fBoostWeights.push_back(0.0104567); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539742,-99) , +4, 0.536154, 1, 0, 0.568637,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307649,-99) , +3, 0.934278, 0, 0, 0.47147,-99) , +6, 0.806557, 1, 0, 0.538152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29168,-99) , +15, 0.132915, 0, 0, 0.399581,-99) , +8, -0.945809, 0, 0, 0.523809,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298591,-99) , +4, 1.26447, 0, 0, 0.363764,-99) , +14, -4.5053, 0, 0, 0.511261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59112,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287694,-99) , +4, 1.88228, 1, 0, 0.398646,-99) , +7, 0.0244209, 0, 0, 0.47044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175026,-99) , +13, 0.000889361, 1, 0, 0.368463,-99) , +5, 2.01328, 1, 0, 0.492941,-99) ); + // itree = 248 + fBoostWeights.push_back(0.00866343); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488988,-99) , +5, 1.46909, 1, 0, 0.523884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372789,-99) , +5, 0.437096, 0, 0, 0.516846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281782,-99) , +12, 0.01821, 0, 0, 0.51063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170513,-99) , +7, 0.22995, 1, 0, 0.505689,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0809588,-99) , +8, 0.948486, 0, 0, 0.284745,-99) , +5, 2.12194, 1, 0, 0.488782,-99) ); + // itree = 249 + fBoostWeights.push_back(0.0118493); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526464,-99) , +2, 20.5, 0, 0, 0.556731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272391,-99) , +3, 0.996573, 1, 0, 0.433469,-99) , +13, 0.0187466, 1, 0, 0.538616,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446093,-99) , +7, 0.0346963, 0, 0, 0.505598,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318501,-99) , +7, 0.014349, 1, 0, 0.397242,-99) , +1, 14.5, 0, 0, 0.449431,-99) , +8, 0.932994, 1, 0, 0.521752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330005,-99) , +12, 0.0227284, 0, 0, 0.51341,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404443,-99) , +14, -4.70385, 0, 0, 0.502668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493275,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433384,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10145,-99) , +12, 0.401427, 0, 0, 0.160054,-99) , +12, 0.0712054, 1, 0, 0.224462,-99) , +16, 18.0679, 1, 0, 0.280091,-99) , +14, -3.8424, 1, 0, 0.37304,-99) , +5, 1.96497, 1, 0, 0.492076,-99) ); + // itree = 250 + fBoostWeights.push_back(0.00781202); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657677,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506847,-99) , +13, 0.000833813, 0, 0, 0.6143,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35547,-99) , +7, 0.032771, 1, 0, 0.529632,-99) , +1, 15.5, 0, 0, 0.567677,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452006,-99) , +12, 0.130585, 1, 0, 0.496593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178212,-99) , +5, 2.25704, 1, 0, 0.489713,-99) , +16, 487.659, 1, 0, 0.519264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258609,-99) , +3, 0.999689, 1, 0, 0.513245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231878,-99) , +4, 2.01487, 1, 0, 0.504348,-99) ); + // itree = 251 + fBoostWeights.push_back(0.00936352); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484836,-99) , +8, 0.885788, 1, 0, 0.54606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39754,-99) , +5, 0.482353, 0, 0, 0.5369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344923,-99) , +7, 0.00848361, 0, 0, 0.528135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309784,-99) , +12, 0.0216784, 0, 0, 0.520449,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435346,-99) , +8, 0.888058, 0, 0, 0.512196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243089,-99) , +5, 2.41145, 1, 0, 0.493945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313689,-99) , +1, 8.5, 0, 0, 0.460951,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156199,-99) , +12, 0.0999914, 1, 0, 0.231258,-99) , +13, 0.00397553, 1, 0, 0.406089,-99) , +4, 1.52695, 1, 0, 0.49521,-99) ); + // itree = 252 + fBoostWeights.push_back(0.0126066); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589965,-99) , +13, 0.00630675, 1, 0, 0.651879,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462821,-99) , +13, 8.02228e-05, 0, 0, 0.564816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333901,-99) , +5, 2.33339, 1, 0, 0.554342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387148,-99) , +7, 0.0338165, 1, 0, 0.533379,-99) , +0, 31.5, 0, 0, 0.563941,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490574,-99) , +13, 0.00183828, 0, 0, 0.539916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33815,-99) , +7, 0.0933173, 1, 0, 0.520859,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320834,-99) , +15, 0.0464417, 0, 0, 0.452636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272241,-99) , +8, 0.870616, 1, 0, 0.408716,-99) , +7, 0.0134327, 0, 0, 0.49376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353099,-99) , +9, -1.74313, 1, 0, 0.425357,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0353751,-99) , +5, 1.90281, 1, 0, 0.227061,-99) , +13, 0.00129914, 1, 0, 0.340459,-99) , +4, 1.52376, 1, 0, 0.460255,-99) , +11, 1.5, 0, 0, 0.495855,-99) ); + // itree = 253 + fBoostWeights.push_back(0.010597); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558971,-99) , +12, 0.113075, 1, 0, 0.606413,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365346,-99) , +12, 0.15267, 1, 0, 0.454905,-99) , +8, -0.862055, 0, 0, 0.573849,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473799,-99) , +2, 12.5, 0, 0, 0.525498,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309112,-99) , +5, 1.32936, 0, 0, 0.40663,-99) , +15, 0.280743, 1, 0, 0.478273,-99) , +14, -2.91967, 0, 0, 0.541644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385263,-99) , +5, 0.517628, 0, 0, 0.530047,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509803,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312739,-99) , +4, 2.07374, 1, 0, 0.49855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265684,-99) , +3, 0.835467, 0, 0, 0.485081,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262416,-99) , +12, 0.327118, 0, 0, 0.344118,-99) , +13, 0.0081865, 1, 0, 0.464008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.197497,-99) , +7, 0.086597, 1, 0, 0.446443,-99) , +4, 1.26258, 1, 0, 0.496338,-99) ); + // itree = 254 + fBoostWeights.push_back(0.0118203); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524768,-99) , +13, 0.0155784, 1, 0, 0.620126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467631,-99) , +5, 1.53764, 1, 0, 0.514397,-99) , +8, 0.913953, 1, 0, 0.590255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408159,-99) , +8, -0.921509, 0, 0, 0.572236,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467311,-99) , +13, 0.00124387, 0, 0, 0.54984,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366061,-99) , +5, 1.89456, 1, 0, 0.458862,-99) , +4, 0.800333, 1, 0, 0.492946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279774,-99) , +2, 7.5, 0, 0, 0.483204,-99) , +16, 659.113, 1, 0, 0.520502,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333885,-99) , +2, 11.5, 0, 0, 0.514868,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0557945,-99) , +4, 1.87131, 1, 0, 0.239483,-99) , +14, -3.59794, 1, 0, 0.362014,-99) , +4, 1.69708, 1, 0, 0.500381,-99) ); + // itree = 255 + fBoostWeights.push_back(0.00923595); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549788,-99) , +11, 1.5, 0, 0, 0.594054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477538,-99) , +12, 0.0366717, 0, 0, 0.57686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284012,-99) , +4, 2.07574, 1, 0, 0.569637,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397319,-99) , +13, 0.0191837, 1, 0, 0.528832,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279123,-99) , +13, 0.00397606, 1, 0, 0.420227,-99) , +4, 1.39201, 1, 0, 0.496711,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162763,-99) , +5, 2.02629, 1, 0, 0.298813,-99) , +7, 0.00914698, 0, 0, 0.479741,-99) , +16, 457.286, 1, 0, 0.513421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196159,-99) , +3, 0.999696, 1, 0, 0.506759,-99) ); + // itree = 256 + fBoostWeights.push_back(0.00972178); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527396,-99) , +2, 24.5, 0, 0, 0.550823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402239,-99) , +12, 0.028597, 0, 0, 0.539487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576833,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227877,-99) , +3, 0.893446, 0, 0, 0.39343,-99) , +12, 0.0612761, 1, 0, 0.438637,-99) , +7, 0.0121144, 0, 0, 0.521479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308754,-99) , +3, 0.999612, 1, 0, 0.515148,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599587,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0860779,-99) , +5, 2.08116, 1, 0, 0.243003,-99) , +8, 0.98732, 0, 0, 0.361274,-99) , +4, 1.75898, 1, 0, 0.499489,-99) ); + // itree = 257 + fBoostWeights.push_back(0.00832256); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525598,-99) , +16, 264.126, 1, 0, 0.551429,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358979,-99) , +8, 0.457887, 1, 0, 0.41413,-99) , +12, 0.0295905, 0, 0, 0.541448,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107138,-99) , +1, 22.5, 0, 0, 0.384499,-99) , +7, 0.103168, 1, 0, 0.531343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265371,-99) , +2, 6.5, 0, 0, 0.525941,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146202,-99) , +13, 0.000847541, 1, 0, 0.334085,-99) , +4, 1.82611, 1, 0, 0.511618,-99) ); + // itree = 258 + fBoostWeights.push_back(0.0110386); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578699,-99) , +15, 0.522143, 1, 0, 0.642624,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562169,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428741,-99) , +7, 0.0987509, 1, 0, 0.542496,-99) , +4, 0.755054, 1, 0, 0.586561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376491,-99) , +3, 0.999335, 1, 0, 0.56854,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649803,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37424,-99) , +15, 0.0479771, 0, 0, 0.495592,-99) , +12, 0.40651, 0, 0, 0.50748,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18197,-99) , +5, 1.51175, 1, 0, 0.307551,-99) , +7, 0.0282163, 1, 0, 0.485487,-99) , +2, 18.5, 0, 0, 0.51842,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192966,-99) , +7, 0.0128637, 0, 0, 0.470914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208515,-99) , +13, 0.000886846, 1, 0, 0.374179,-99) , +4, 1.77228, 1, 0, 0.504219,-99) ); + // itree = 259 + fBoostWeights.push_back(0.00890066); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499379,-99) , +14, -3.15093, 0, 0, 0.566032,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42199,-99) , +12, 0.189188, 1, 0, 0.496154,-99) , +16, 900.89, 1, 0, 0.527198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282257,-99) , +3, 0.999661, 1, 0, 0.520265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24912,-99) , +14, -5.66159, 0, 0, 0.514183,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454693,-99) , +1, 11.5, 0, 0, 0.555427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385969,-99) , +14, -3.82666, 1, 0, 0.498522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160922,-99) , +8, 0.823585, 0, 0, 0.388465,-99) , +5, 2.02881, 1, 0, 0.499237,-99) ); + // itree = 260 + fBoostWeights.push_back(0.00797074); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.738168,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306868,-99) , +12, 0.0181796, 0, 0, 0.52333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350356,-99) , +7, 0.0121368, 0, 0, 0.407648,-99) , +15, 0.0568173, 0, 0, 0.508464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264338,-99) , +13, 0.0375542, 1, 0, 0.499761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228287,-99) , +5, 2.25776, 1, 0, 0.489331,-99) , +12, 0.534864, 0, 0, 0.498417,-99) ); + // itree = 261 + fBoostWeights.push_back(0.00902826); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43173,-99) , +14, -4.67212, 0, 0, 0.567867,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315422,-99) , +8, 0.164423, 1, 0, 0.408447,-99) , +12, 0.0296092, 0, 0, 0.53985,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492858,-99) , +6, 0.438389, 1, 0, 0.534367,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439368,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191109,-99) , +13, 0.0189814, 1, 0, 0.417586,-99) , +5, 1.51563, 1, 0, 0.473144,-99) , +12, 0.110599, 1, 0, 0.503783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113929,-99) , +7, 0.329084, 1, 0, 0.500824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0452605,-99) , +5, 2.48979, 1, 0, 0.49626,-99) ); + // itree = 262 + fBoostWeights.push_back(0.00784507); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519328,-99) , +6, 0.218934, 1, 0, 0.546074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245493,-99) , +5, 2.15674, 1, 0, 0.540121,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323087,-99) , +3, 0.998035, 1, 0, 0.447788,-99) , +4, 1.66004, 0, 0, 0.466859,-99) , +8, 0.835869, 1, 0, 0.51803,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287921,-99) , +12, 0.0182006, 0, 0, 0.511973,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293405,-99) , +6, 0.718457, 0, 0, 0.440154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140193,-99) , +13, 0.00143029, 1, 0, 0.349326,-99) , +4, 1.81964, 1, 0, 0.498819,-99) ); + // itree = 263 + fBoostWeights.push_back(0.0102613); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577367,-99) , +4, 1.18857, 1, 0, 0.638682,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451282,-99) , +7, 0.0154727, 0, 0, 0.522564,-99) , +12, 0.339381, 0, 0, 0.536016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263925,-99) , +3, 0.999617, 1, 0, 0.528629,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400244,-99) , +8, 0.763294, 1, 0, 0.51143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235132,-99) , +5, 1.85648, 1, 0, 0.462426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0812296,-99) , +7, 0.0312761, 1, 0, 0.424009,-99) , +1, 9.5, 0, 0, 0.507637,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262157,-99) , +4, 2.00249, 1, 0, 0.4991,-99) ); + // itree = 264 + fBoostWeights.push_back(0.0103239); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577934,-99) , +7, 0.0261162, 1, 0, 0.610323,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430724,-99) , +4, 1.31656, 1, 0, 0.490682,-99) , +0, 13.5, 0, 0, 0.578263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442517,-99) , +13, 0.000111047, 0, 0, 0.557406,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528514,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392881,-99) , +12, 0.0344222, 0, 0, 0.515846,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177871,-99) , +13, 0.0119986, 1, 0, 0.424689,-99) , +5, 1.65006, 1, 0, 0.484774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228368,-99) , +3, 0.999568, 1, 0, 0.476012,-99) , +11, 1.5, 0, 0, 0.503001,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0703273,-99) , +8, 0.955238, 0, 0, 0.309759,-99) , +5, 2.15914, 1, 0, 0.490346,-99) ); + // itree = 265 + fBoostWeights.push_back(0.0092249); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481,-99) , +14, -4.11808, 0, 0, 0.59916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459461,-99) , +3, 0.998089, 1, 0, 0.572942,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294836,-99) , +7, 0.00711225, 0, 0, 0.509411,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351279,-99) , +7, 0.0330482, 1, 0, 0.497216,-99) , +2, 19.5, 0, 0, 0.522165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299088,-99) , +7, 0.145948, 1, 0, 0.51528,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181026,-99) , +2, 12.5, 0, 0, 0.40322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.074099,-99) , +14, -2.6219, 1, 0, 0.324485,-99) , +4, 1.822, 1, 0, 0.500572,-99) ); + // itree = 266 + fBoostWeights.push_back(0.0120911); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.705302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57738,-99) , +3, 0.952398, 1, 0, 0.606114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340667,-99) , +5, 2.22773, 1, 0, 0.596794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46209,-99) , +14, -4.20393, 0, 0, 0.578413,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286081,-99) , +16, 1098.64, 1, 0, 0.472761,-99) , +2, 10.5, 0, 0, 0.555798,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431664,-99) , +14, -3.37979, 0, 0, 0.529473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330177,-99) , +2, 8.5, 0, 0, 0.513481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318551,-99) , +15, 1.84275, 1, 0, 0.499812,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447918,-99) , +8, 0.986405, 0, 0, 0.509885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380404,-99) , +7, 0.0181641, 1, 0, 0.464936,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275547,-99) , +0, 13.5, 1, 0, 0.342449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0341683,-99) , +4, 1.81964, 1, 0, 0.290655,-99) , +13, 0.000959314, 1, 0, 0.384734,-99) , +5, 1.6796, 1, 0, 0.459008,-99) , +11, 1.5, 0, 0, 0.49169,-99) ); + // itree = 267 + fBoostWeights.push_back(0.00847068); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.690277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582697,-99) , +10, 2721.52, 1, 0, 0.634485,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349338,-99) , +4, 1.87189, 1, 0, 0.537205,-99) , +0, 25.5, 0, 0, 0.569207,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335777,-99) , +7, 0.0081862, 0, 0, 0.511517,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305756,-99) , +12, 0.110613, 1, 0, 0.399242,-99) , +4, 1.52392, 1, 0, 0.486606,-99) , +11, 1.5, 0, 0, 0.513261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270851,-99) , +12, 0.01821, 0, 0, 0.506498,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222851,-99) , +3, 0.99965, 1, 0, 0.498578,-99) ); + // itree = 268 + fBoostWeights.push_back(0.0104039); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526965,-99) , +6, 0.839719, 1, 0, 0.593331,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276,-99) , +7, 0.0454055, 1, 0, 0.492142,-99) , +2, 25.5, 0, 0, 0.512559,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0225538,-99) , +1, 22.5, 0, 0, 0.356559,-99) , +7, 0.10772, 1, 0, 0.503003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21369,-99) , +2, 6.5, 0, 0, 0.497513,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142854,-99) , +14, -4.23178, 1, 0, 0.322638,-99) , +5, 2.16532, 1, 0, 0.486129,-99) ); + // itree = 269 + fBoostWeights.push_back(0.00890232); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41893,-99) , +12, 0.029786, 0, 0, 0.5377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341602,-99) , +3, 0.999616, 1, 0, 0.531052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360046,-99) , +2, 7.5, 0, 0, 0.523238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333068,-99) , +14, -4.77513, 0, 0, 0.512929,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604799,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431133,-99) , +2, 17.5, 0, 0, 0.503564,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108172,-99) , +5, 2.07331, 1, 0, 0.185122,-99) , +8, 0.909314, 0, 0, 0.381097,-99) , +5, 1.98988, 1, 0, 0.494654,-99) ); + // itree = 270 + fBoostWeights.push_back(0.0127451); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723454,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482902,-99) , +3, 0.996103, 1, 0, 0.585433,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292254,-99) , +1, 42.5, 1, 0, 0.469521,-99) , +4, 0.964201, 1, 0, 0.534044,-99) , +9, 4.81129, 0, 0, 0.556583,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513044,-99) , +4, 1.43681, 0, 0, 0.5573,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329952,-99) , +7, 0.00793804, 0, 0, 0.474718,-99) , +16, 276.17, 1, 0, 0.49935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0911316,-99) , +7, 0.0571202, 1, 0, 0.482159,-99) , +1, 14.5, 0, 0, 0.516516,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37958,-99) , +3, 0.980604, 1, 0, 0.497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155121,-99) , +8, 0.951015, 0, 0, 0.348582,-99) , +5, 2.08843, 1, 0, 0.50139,-99) ); + // itree = 271 + fBoostWeights.push_back(0.0106005); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474826,-99) , +7, 0.013911, 0, 0, 0.579096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442544,-99) , +8, -0.896129, 0, 0, 0.558887,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509193,-99) , +3, 0.996866, 0, 0, 0.546466,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400295,-99) , +12, 0.113302, 1, 0, 0.450613,-99) , +11, 1.5, 0, 0, 0.480356,-99) , +4, 0.911776, 1, 0, 0.512396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268243,-99) , +12, 0.0190151, 0, 0, 0.50544,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537424,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126555,-99) , +12, 0.377599, 0, 0, 0.206827,-99) , +8, 0.994041, 0, 0, 0.306527,-99) , +5, 2.11562, 1, 0, 0.490438,-99) ); + // itree = 272 + fBoostWeights.push_back(0.0105912); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600514,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528433,-99) , +4, 0.810925, 1, 0, 0.55614,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399668,-99) , +10, 1537.06, 1, 0, 0.448007,-99) , +2, 9.5, 0, 0, 0.537065,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364802,-99) , +5, 1.5382, 0, 0, 0.421763,-99) , +12, 0.0313393, 0, 0, 0.525393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360147,-99) , +5, 1.39262, 1, 0, 0.468676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209425,-99) , +3, 0.996781, 1, 0, 0.402869,-99) , +13, 0.0191706, 1, 0, 0.513031,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429636,-99) , +8, 0.995318, 0, 0, 0.495929,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.038571,-99) , +5, 1.97482, 1, 0, 0.201293,-99) , +13, 0.000623751, 1, 0, 0.367881,-99) , +4, 1.69358, 1, 0, 0.494757,-99) ); + // itree = 273 + fBoostWeights.push_back(0.00943143); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550132,-99) , +8, 0.492333, 1, 0, 0.639075,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435318,-99) , +3, 0.998919, 1, 0, 0.539477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429684,-99) , +2, 8.5, 0, 0, 0.529885,-99) , +12, 0.0582512, 1, 0, 0.547279,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364954,-99) , +12, 0.0311044, 0, 0, 0.533707,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428834,-99) , +1, 10.5, 0, 0, 0.550279,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271833,-99) , +4, 1.89811, 1, 0, 0.444794,-99) , +2, 11.5, 0, 0, 0.50874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213776,-99) , +3, 0.832642, 0, 0, 0.491904,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25346,-99) , +8, -0.319923, 0, 0, 0.347195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0816975,-99) , +4, 1.92627, 1, 0, 0.315317,-99) , +13, 0.00395766, 1, 0, 0.444097,-99) , +4, 1.38454, 1, 0, 0.505148,-99) ); + // itree = 274 + fBoostWeights.push_back(0.0104933); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445104,-99) , +13, 0.00119943, 0, 0, 0.578065,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220658,-99) , +13, 0.0263262, 1, 0, 0.489183,-99) , +5, 1.46888, 1, 0, 0.538215,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535194,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438164,-99) , +15, 0.110906, 0, 0, 0.481295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174447,-99) , +7, 0.0263231, 1, 0, 0.461981,-99) , +2, 12.5, 0, 0, 0.50913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281794,-99) , +3, 0.99963, 1, 0, 0.502377,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122077,-99) , +13, 0.000621529, 1, 0, 0.329278,-99) , +4, 1.83995, 1, 0, 0.489889,-99) ); + // itree = 275 + fBoostWeights.push_back(0.0102489); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566813,-99) , +2, 14.5, 0, 0, 0.608061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521672,-99) , +7, 0.0408911, 1, 0, 0.584757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478817,-99) , +14, -4.24117, 0, 0, 0.571289,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320442,-99) , +1, 55.5, 1, 0, 0.504669,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310644,-99) , +0, 11.5, 1, 0, 0.39781,-99) , +1, 8.5, 0, 0, 0.489635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193987,-99) , +13, 0.0656268, 1, 0, 0.482895,-99) , +11, 1.5, 0, 0, 0.512064,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288252,-99) , +6, 0.627633, 0, 0, 0.484668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0840382,-99) , +13, 0.00084359, 1, 0, 0.346602,-99) , +4, 1.7759, 1, 0, 0.496609,-99) ); + // itree = 276 + fBoostWeights.push_back(0.0112032); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.736827,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441201,-99) , +8, -0.900949, 0, 0, 0.540389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213054,-99) , +5, 2.12431, 1, 0, 0.535067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415762,-99) , +10, 3201.47, 1, 0, 0.492195,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239924,-99) , +1, 11.5, 0, 0, 0.340224,-99) , +3, 0.992359, 1, 0, 0.442941,-99) , +8, 0.900368, 1, 0, 0.513278,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342224,-99) , +6, 0.914724, 1, 0, 0.442951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180465,-99) , +5, 2.41088, 1, 0, 0.423393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149648,-99) , +13, 0.00447545, 1, 0, 0.367627,-99) , +4, 1.59019, 1, 0, 0.487608,-99) , +12, 0.509824, 0, 0, 0.498046,-99) ); + // itree = 277 + fBoostWeights.push_back(0.00694777); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558501,-99) , +10, 467.326, 1, 0, 0.584303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432928,-99) , +3, 0.998848, 1, 0, 0.570738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355103,-99) , +5, 2.3102, 1, 0, 0.562619,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458068,-99) , +2, 13.5, 0, 0, 0.502088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32558,-99) , +13, 0.0252534, 1, 0, 0.488257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305314,-99) , +5, 2.13161, 1, 0, 0.475381,-99) , +16, 259.356, 1, 0, 0.503525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24158,-99) , +12, 0.01821, 0, 0, 0.496897,-99) ); + // itree = 278 + fBoostWeights.push_back(0.0101283); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485371,-99) , +13, 0.00936582, 1, 0, 0.5425,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348182,-99) , +6, 0.533574, 0, 0, 0.429187,-99) , +14, -4.1175, 0, 0, 0.531213,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307505,-99) , +12, 0.162462, 1, 0, 0.388317,-99) , +2, 8.5, 0, 0, 0.519783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250124,-99) , +7, 0.179264, 1, 0, 0.513687,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595462,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294077,-99) , +2, 10.5, 0, 0, 0.463431,-99) , +16, 161.686, 1, 0, 0.509134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316384,-99) , +1, 9.5, 0, 0, 0.470998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0775358,-99) , +5, 2.01339, 1, 0, 0.259291,-99) , +8, 0.688203, 0, 0, 0.402734,-99) , +5, 1.87049, 1, 0, 0.490853,-99) ); + // itree = 279 + fBoostWeights.push_back(0.00953216); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392976,-99) , +14, -4.30339, 0, 0, 0.577353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415326,-99) , +5, 0.536936, 0, 0, 0.559765,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463762,-99) , +2, 17.5, 0, 0, 0.494161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32206,-99) , +7, 0.0788238, 1, 0, 0.482493,-99) , +4, 0.969945, 1, 0, 0.517997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294739,-99) , +3, 0.999616, 1, 0, 0.511683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264479,-99) , +7, 0.0119887, 0, 0, 0.491021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180943,-99) , +13, 0.00047423, 1, 0, 0.351589,-99) , +4, 1.75879, 1, 0, 0.495847,-99) ); + // itree = 280 + fBoostWeights.push_back(0.0104588); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642316,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.711798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487016,-99) , +15, 0.166193, 0, 0, 0.620266,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384499,-99) , +8, 0.950059, 1, 0, 0.517019,-99) , +5, 1.94131, 0, 0, 0.538069,-99) , +4, 0.496114, 1, 0, 0.562654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2994,-99) , +4, 1.9963, 1, 0, 0.553985,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424509,-99) , +5, 1.65047, 1, 0, 0.561088,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314161,-99) , +7, 0.0287055, 1, 0, 0.476115,-99) , +2, 18.5, 0, 0, 0.504872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332536,-99) , +7, 0.0978938, 1, 0, 0.494549,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356459,-99) , +6, 0.687064, 0, 0, 0.438201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167991,-99) , +14, -2.81329, 1, 0, 0.351768,-99) , +5, 1.89711, 1, 0, 0.468558,-99) , +16, 488.874, 1, 0, 0.501794,-99) ); + // itree = 281 + fBoostWeights.push_back(0.0062166); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515416,-99) , +2, 14.5, 0, 0, 0.553007,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436608,-99) , +5, 1.49507, 1, 0, 0.479517,-99) , +16, 535.375, 1, 0, 0.508462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271807,-99) , +3, 0.99965, 1, 0, 0.502262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122279,-99) , +7, 0.253137, 1, 0, 0.497922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124067,-99) , +5, 2.45783, 1, 0, 0.49293,-99) ); + // itree = 282 + fBoostWeights.push_back(0.0100772); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535241,-99) , +13, 0.0016685, 0, 0, 0.583194,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358004,-99) , +4, 1.2241, 0, 0, 0.441541,-99) , +12, 0.0305522, 0, 0, 0.556802,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612501,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395176,-99) , +4, 1.29133, 1, 0, 0.468297,-99) , +12, 0.414272, 0, 0, 0.483657,-99) , +12, 0.113336, 1, 0, 0.518543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178562,-99) , +7, 0.240247, 1, 0, 0.514314,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374342,-99) , +9, -0.795038, 1, 0, 0.470142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +3, 0.997585, 1, 0, 0.415759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0365464,-99) , +8, 0.283543, 0, 0, 0.346226,-99) , +5, 2.15507, 1, 0, 0.502663,-99) ); + // itree = 283 + fBoostWeights.push_back(0.00684019); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510999,-99) , +2, 18.5, 0, 0, 0.539521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376601,-99) , +14, -5.19174, 0, 0, 0.53192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340663,-99) , +3, 0.999367, 1, 0, 0.522872,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366835,-99) , +8, 0.926929, 1, 0, 0.475788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189689,-99) , +5, 2.10056, 1, 0, 0.462549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130559,-99) , +7, 0.038503, 1, 0, 0.439163,-99) , +1, 9.5, 0, 0, 0.505632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282387,-99) , +4, 1.9534, 1, 0, 0.496036,-99) ); + // itree = 284 + fBoostWeights.push_back(0.00748934); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.673946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568787,-99) , +1, 12.5, 0, 0, 0.626683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505201,-99) , +6, 0.31105, 1, 0, 0.546452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420514,-99) , +3, 0.997728, 1, 0, 0.529657,-99) , +10, 105.942, 1, 0, 0.556733,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343674,-99) , +14, -4.84729, 0, 0, 0.488507,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421279,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222968,-99) , +13, 0.0020523, 1, 0, 0.362689,-99) , +7, 0.00936597, 0, 0, 0.476101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306221,-99) , +7, 0.0991061, 1, 0, 0.465732,-99) , +16, 258.507, 1, 0, 0.496187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230289,-99) , +4, 1.97329, 1, 0, 0.486426,-99) ); + // itree = 285 + fBoostWeights.push_back(0.0075645); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66299,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535529,-99) , +10, 9690.98, 0, 0, 0.557785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413693,-99) , +7, 0.0362416, 1, 0, 0.540979,-99) , +2, 29.5, 0, 0, 0.568104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489875,-99) , +2, 24.5, 0, 0, 0.510556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326547,-99) , +2, 7.5, 0, 0, 0.500481,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213006,-99) , +4, 0.996044, 1, 0, 0.335268,-99) , +13, 0.0190761, 1, 0, 0.483745,-99) , +11, 1.5, 0, 0, 0.512103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293499,-99) , +12, 0.0227741, 0, 0, 0.503225,-99) ); + // itree = 286 + fBoostWeights.push_back(0.0101089); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.702576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584296,-99) , +7, 0.080108, 1, 0, 0.648962,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632643,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437798,-99) , +8, 0.970748, 1, 0, 0.52041,-99) , +15, 0.0636413, 1, 0, 0.541629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335554,-99) , +5, 2.11426, 1, 0, 0.521982,-99) , +2, 27.5, 0, 0, 0.553336,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314433,-99) , +1, 53.5, 1, 0, 0.509245,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277319,-99) , +5, 1.61798, 1, 0, 0.389193,-99) , +1, 8.5, 0, 0, 0.491964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272224,-99) , +3, 0.773319, 0, 0, 0.482987,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357047,-99) , +8, 0.984241, 0, 0, 0.454066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117601,-99) , +13, 0.00153785, 1, 0, 0.339019,-99) , +4, 1.70237, 1, 0, 0.465155,-99) , +11, 1.5, 0, 0, 0.494928,-99) ); + // itree = 287 + fBoostWeights.push_back(0.0099704); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592137,-99) , +13, 0.00953101, 1, 0, 0.645196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522307,-99) , +15, 1.34338, 1, 0, 0.616318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442035,-99) , +3, 0.998018, 1, 0, 0.581141,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625311,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450198,-99) , +2, 10.5, 0, 0, 0.512129,-99) , +16, 95.3163, 1, 0, 0.541727,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529893,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331833,-99) , +5, 1.60984, 1, 0, 0.422912,-99) , +4, 0.541281, 1, 0, 0.455394,-99) , +10, 2644.58, 1, 0, 0.496465,-99) , +2, 21.5, 0, 0, 0.526313,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480545,-99) , +2, 24.5, 0, 0, 0.507463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188968,-99) , +3, 0.999275, 1, 0, 0.492232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302551,-99) , +3, 0.902953, 0, 0, 0.470848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193831,-99) , +7, 0.0800174, 1, 0, 0.450386,-99) , +4, 1.2938, 1, 0, 0.498026,-99) ); + // itree = 288 + fBoostWeights.push_back(0.00735033); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678948,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41767,-99) , +8, 0.984932, 1, 0, 0.523505,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403328,-99) , +9, 4.41444, 0, 0, 0.435638,-99) , +15, 0.0879128, 0, 0, 0.502239,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122605,-99) , +5, 1.54657, 1, 0, 0.350048,-99) , +13, 0.0234581, 1, 0, 0.491656,-99) , +12, 0.507915, 0, 0, 0.498511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209732,-99) , +4, 2.07376, 1, 0, 0.491772,-99) ); + // itree = 289 + fBoostWeights.push_back(0.00817694); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668699,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475096,-99) , +5, 1.52006, 1, 0, 0.52444,-99) , +9, 5.63832, 0, 0, 0.543735,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305087,-99) , +7, 0.00738126, 0, 0, 0.486443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177113,-99) , +7, 0.0280932, 1, 0, 0.467462,-99) , +2, 13.5, 0, 0, 0.50881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215215,-99) , +4, 2.10615, 1, 0, 0.503502,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259114,-99) , +7, 0.143618, 1, 0, 0.494931,-99) ); + // itree = 290 + fBoostWeights.push_back(0.00945323); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.721244,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608921,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511355,-99) , +9, 4.44201, 0, 0, 0.528062,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347569,-99) , +6, 0.362579, 0, 0, 0.417212,-99) , +14, -4.14349, 0, 0, 0.514502,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0783805,-99) , +5, 1.43667, 1, 0, 0.363671,-99) , +13, 0.0251451, 1, 0, 0.504561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445965,-99) , +10, 4748.73, 0, 0, 0.534465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325428,-99) , +7, 0.012124, 0, 0, 0.487636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202623,-99) , +13, 0.000621572, 1, 0, 0.3821,-99) , +5, 2.02593, 1, 0, 0.490202,-99) , +12, 0.526826, 0, 0, 0.498339,-99) ); + // itree = 291 + fBoostWeights.push_back(0.0102388); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445259,-99) , +3, 0.998905, 1, 0, 0.571584,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441213,-99) , +5, 1.42045, 1, 0, 0.495193,-99) , +16, 1923.13, 1, 0, 0.534548,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370536,-99) , +13, 0.0098479, 1, 0, 0.426095,-99) , +8, -0.894173, 0, 0, 0.521367,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542123,-99) , +4, 1.92593, 0, 0, 0.592764,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225734,-99) , +7, 0.0115499, 0, 0, 0.427185,-99) , +9, -1.62512, 1, 0, 0.497145,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132452,-99) , +4, 1.68391, 1, 0, 0.258934,-99) , +14, -2.67019, 1, 0, 0.424007,-99) , +4, 1.54538, 1, 0, 0.502089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0763588,-99) , +5, 2.48296, 1, 0, 0.497287,-99) ); + // itree = 292 + fBoostWeights.push_back(0.00714364); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392261,-99) , +5, 1.92881, 1, 0, 0.53295,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406207,-99) , +5, 2.00966, 0, 0, 0.431962,-99) , +14, -3.72889, 0, 0, 0.514399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254662,-99) , +2, 6.5, 0, 0, 0.508579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263185,-99) , +3, 0.999646, 1, 0, 0.502171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254423,-99) , +4, 1.91927, 1, 0, 0.490195,-99) ); + // itree = 293 + fBoostWeights.push_back(0.00946927); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.718305,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49484,-99) , +14, -3.11047, 0, 0, 0.552445,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172331,-99) , +7, 0.026758, 1, 0, 0.471833,-99) , +2, 13.5, 0, 0, 0.515082,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365057,-99) , +6, 0.765854, 0, 0, 0.427391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14212,-99) , +5, 1.58261, 1, 0, 0.364034,-99) , +13, 0.0178794, 1, 0, 0.500214,-99) , +12, 0.50597, 0, 0, 0.508817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246086,-99) , +5, 2.25085, 1, 0, 0.498671,-99) ); + // itree = 294 + fBoostWeights.push_back(0.00795267); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515249,-99) , +10, 15.2853, 1, 0, 0.53752,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135782,-99) , +7, 0.0306926, 1, 0, 0.442894,-99) , +1, 9.5, 0, 0, 0.516779,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238232,-99) , +2, 6.5, 0, 0, 0.510826,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268885,-99) , +7, 0.137261, 1, 0, 0.502343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315347,-99) , +9, 0.288488, 0, 0, 0.393466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266566,-99) , +3, 0.994822, 1, 0, 0.352819,-99) , +12, 0.0312838, 0, 0, 0.489577,-99) ); + // itree = 295 + fBoostWeights.push_back(0.0100087); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50518,-99) , +13, 0.0101609, 1, 0, 0.589042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42067,-99) , +16, 179.997, 1, 0, 0.480221,-99) , +2, 11.5, 0, 0, 0.55665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164972,-99) , +5, 2.43961, 1, 0, 0.548435,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41789,-99) , +8, -0.904218, 0, 0, 0.538915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370143,-99) , +14, -3.51668, 0, 0, 0.520204,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450435,-99) , +8, 0.0535785, 1, 0, 0.469327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.76107, 1, 0, 0.329649,-99) , +14, -2.4829, 1, 0, 0.424676,-99) , +5, 1.47614, 1, 0, 0.468562,-99) , +11, 1.5, 0, 0, 0.494614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254242,-99) , +12, 0.01821, 0, 0, 0.48811,-99) ); + // itree = 296 + fBoostWeights.push_back(0.00651093); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233294,-99) , +5, 2.54964, 1, 0, 0.532819,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329588,-99) , +1, 12.5, 0, 0, 0.410747,-99) , +8, -0.935908, 0, 0, 0.521456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311396,-99) , +14, -5.73771, 0, 0, 0.515735,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338248,-99) , +5, 1.49994, 1, 0, 0.47143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0286752,-99) , +1, 19.5, 0, 0, 0.379241,-99) , +7, 0.0992014, 1, 0, 0.506296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251112,-99) , +2, 6.5, 0, 0, 0.501274,-99) ); + // itree = 297 + fBoostWeights.push_back(0.00785674); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483017,-99) , +8, -0.893179, 0, 0, 0.583731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42289,-99) , +2, 16.5, 0, 0, 0.497136,-99) , +6, 0.820669, 1, 0, 0.558185,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316058,-99) , +7, 0.00888959, 0, 0, 0.487528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251423,-99) , +4, 1.83116, 1, 0, 0.474288,-99) , +12, 0.111253, 1, 0, 0.512736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28707,-99) , +12, 0.01821, 0, 0, 0.506765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159714,-99) , +5, 2.35099, 1, 0, 0.49908,-99) ); + // itree = 298 + fBoostWeights.push_back(0.00792567); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572134,-99) , +2, 24.5, 0, 0, 0.59714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478232,-99) , +12, 0.0347354, 0, 0, 0.581051,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344595,-99) , +1, 47.5, 1, 0, 0.534916,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141907,-99) , +7, 0.0283975, 1, 0, 0.449235,-99) , +2, 13.5, 0, 0, 0.495688,-99) , +16, 220.959, 1, 0, 0.522531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233842,-99) , +5, 2.44702, 1, 0, 0.517747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241864,-99) , +7, 0.16191, 1, 0, 0.510328,-99) ); + // itree = 299 + fBoostWeights.push_back(0.00860653); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723622,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472823,-99) , +12, 0.186916, 1, 0, 0.533029,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309764,-99) , +6, 0.50932, 0, 0, 0.406057,-99) , +14, -4.58836, 0, 0, 0.523576,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206128,-99) , +5, 2.48281, 1, 0, 0.47143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0991068,-99) , +13, 0.00267865, 1, 0, 0.399412,-99) , +5, 2.01196, 1, 0, 0.508046,-99) , +12, 0.53396, 0, 0, 0.515815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270097,-99) , +3, 0.999638, 1, 0, 0.508865,-99) ); + // itree = 300 + fBoostWeights.push_back(0.00844245); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433102,-99) , +7, 0.0126556, 0, 0, 0.551182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366705,-99) , +12, 0.0216798, 0, 0, 0.542642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340507,-99) , +3, 0.999435, 1, 0, 0.534003,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403129,-99) , +7, 0.00902712, 0, 0, 0.495231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278064,-99) , +5, 2.03675, 1, 0, 0.472611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.059363,-99) , +7, 0.0461125, 1, 0, 0.455304,-99) , +1, 11.5, 0, 0, 0.504104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212986,-99) , +13, 0.0588589, 1, 0, 0.497792,-99) ); + // itree = 301 + fBoostWeights.push_back(0.00805224); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542316,-99) , +4, 0.911761, 1, 0, 0.581372,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377068,-99) , +3, 0.999081, 1, 0, 0.50358,-99) , +16, 1913.41, 1, 0, 0.543003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323528,-99) , +12, 0.0224522, 0, 0, 0.535544,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427641,-99) , +4, 0.936866, 1, 0, 0.479968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357596,-99) , +1, 12.5, 0, 0, 0.429174,-99) , +8, -0.895033, 0, 0, 0.521842,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39171,-99) , +1, 14.5, 0, 0, 0.491382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22596,-99) , +8, 0.777559, 0, 0, 0.391429,-99) , +4, 1.69664, 1, 0, 0.505816,-99) ); + // itree = 302 + fBoostWeights.push_back(0.0103835); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642255,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245635,-99) , +7, 0.148212, 1, 0, 0.521176,-99) , +4, 0.228013, 1, 0, 0.53568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342715,-99) , +5, 0.565929, 0, 0, 0.525104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356864,-99) , +14, -4.63991, 0, 0, 0.514817,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410588,-99) , +4, 1.65979, 0, 0, 0.56714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429475,-99) , +14, -3.97971, 1, 0, 0.508698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245244,-99) , +3, 0.998839, 1, 0, 0.485851,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128492,-99) , +11, 1.5, 0, 0, 0.246877,-99) , +8, 0.7469, 0, 0, 0.408223,-99) , +5, 1.9082, 1, 0, 0.495135,-99) ); + // itree = 303 + fBoostWeights.push_back(0.0093419); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646912,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431329,-99) , +7, 0.0327157, 1, 0, 0.556738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274033,-99) , +5, 2.30831, 1, 0, 0.545398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374682,-99) , +14, -4.52096, 0, 0, 0.526813,-99) , +0, 36.5, 0, 0, 0.55333,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340203,-99) , +7, 0.00867705, 0, 0, 0.503731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254987,-99) , +8, 0.424081, 0, 0, 0.408374,-99) , +5, 1.74326, 1, 0, 0.476647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100674,-99) , +7, 0.250772, 1, 0, 0.471377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0990592,-99) , +5, 2.34539, 1, 0, 0.464071,-99) , +11, 1.5, 0, 0, 0.494716,-99) ); + // itree = 304 + fBoostWeights.push_back(0.00864541); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519192,-99) , +6, 0.839155, 1, 0, 0.573838,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354282,-99) , +4, 1.12614, 0, 0, 0.42599,-99) , +8, 0.982758, 1, 0, 0.555478,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441256,-99) , +4, 1.19068, 1, 0, 0.500744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321074,-99) , +8, -0.882606, 0, 0, 0.48225,-99) , +12, 0.125943, 1, 0, 0.51786,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328105,-99) , +12, 0.0227069, 0, 0, 0.510402,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384619,-99) , +8, 0.994561, 0, 0, 0.485332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181358,-99) , +14, -3.26425, 1, 0, 0.360378,-99) , +4, 1.78478, 1, 0, 0.497194,-99) ); + // itree = 305 + fBoostWeights.push_back(0.00808215); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59085,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397281,-99) , +5, 2.08868, 1, 0, 0.581429,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356983,-99) , +7, 0.0211354, 0, 0, 0.452788,-99) , +8, 0.987387, 1, 0, 0.565795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344446,-99) , +12, 0.0216868, 0, 0, 0.548643,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501397,-99) , +9, 3.29452, 0, 0, 0.532087,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386024,-99) , +9, -1.13349, 1, 0, 0.436176,-99) , +16, 1260.69, 1, 0, 0.478958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181241,-99) , +4, 2.1314, 1, 0, 0.473723,-99) , +12, 0.125925, 1, 0, 0.512173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26753,-99) , +3, 0.999694, 1, 0, 0.506108,-99) ); + // itree = 306 + fBoostWeights.push_back(0.00696937); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53659,-99) , +4, 1.56562, 1, 0, 0.657716,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41243,-99) , +12, 0.0286175, 0, 0, 0.545061,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396441,-99) , +4, 1.29757, 1, 0, 0.467853,-99) , +12, 0.113729, 1, 0, 0.506793,-99) , +12, 0.414466, 0, 0, 0.51695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267389,-99) , +7, 0.177994, 1, 0, 0.510998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202312,-99) , +5, 2.44862, 1, 0, 0.506267,-99) ); + // itree = 307 + fBoostWeights.push_back(0.0055902); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516528,-99) , +5, 1.28713, 1, 0, 0.536766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357212,-99) , +12, 0.0216528, 0, 0, 0.530145,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397768,-99) , +9, -0.198957, 0, 0, 0.45925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179011,-99) , +5, 1.73862, 1, 0, 0.414239,-99) , +8, -0.914904, 0, 0, 0.518296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179972,-99) , +7, 0.253137, 1, 0, 0.514579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262852,-99) , +4, 2.07713, 1, 0, 0.508708,-99) ); + // itree = 308 + fBoostWeights.push_back(0.00850126); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545432,-99) , +8, -0.67209, 0, 0, 0.623764,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451415,-99) , +7, 0.0163129, 1, 0, 0.530233,-99) , +2, 13.5, 0, 0, 0.589182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415479,-99) , +13, 0.000105832, 0, 0, 0.568195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410267,-99) , +5, 0.447458, 0, 0, 0.551051,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470067,-99) , +16, 471.582, 1, 0, 0.499227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364217,-99) , +8, -0.894827, 0, 0, 0.485653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496096,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258445,-99) , +12, 0.114386, 1, 0, 0.31388,-99) , +16, 90.0649, 1, 0, 0.360204,-99) , +3, 0.922895, 0, 0, 0.465639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20166,-99) , +7, 0.133116, 1, 0, 0.456611,-99) , +4, 0.91767, 1, 0, 0.494029,-99) ); + // itree = 309 + fBoostWeights.push_back(0.00813293); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401908,-99) , +8, 0.996268, 1, 0, 0.554882,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467479,-99) , +12, 0.474146, 0, 0, 0.483092,-99) , +12, 0.124192, 1, 0, 0.518376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336898,-99) , +12, 0.0216969, 0, 0, 0.511142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148522,-99) , +7, 0.252977, 1, 0, 0.507131,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0672517,-99) , +8, 0.950252, 0, 0, 0.319028,-99) , +5, 2.16629, 1, 0, 0.495201,-99) ); + // itree = 310 + fBoostWeights.push_back(0.0107175); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.710691,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448309,-99) , +13, 0.0082111, 1, 0, 0.560854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425985,-99) , +14, -4.88047, 0, 0, 0.548584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340722,-99) , +12, 0.0233643, 0, 0, 0.527627,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507112,-99) , +15, 0.247576, 1, 0, 0.583607,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428701,-99) , +16, 3819.99, 1, 0, 0.474032,-99) , +2, 17.5, 0, 0, 0.525364,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229025,-99) , +7, 0.00915005, 0, 0, 0.420429,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0841861,-99) , +15, 0.205747, 1, 0, 0.259849,-99) , +13, 0.0106272, 1, 0, 0.388513,-99) , +5, 1.44017, 1, 0, 0.445387,-99) , +12, 0.113578, 1, 0, 0.484976,-99) , +12, 0.521669, 0, 0, 0.49346,-99) ); + // itree = 311 + fBoostWeights.push_back(0.00984891); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553347,-99) , +2, 24.5, 0, 0, 0.576469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476613,-99) , +15, 1.6135, 1, 0, 0.564434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426011,-99) , +8, -0.921702, 0, 0, 0.550066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390139,-99) , +12, 0.0216896, 0, 0, 0.534435,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.689932,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365982,-99) , +8, -0.932414, 0, 0, 0.491205,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286251,-99) , +10, 3124.97, 1, 0, 0.376844,-99) , +8, 0.928972, 1, 0, 0.468324,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0631581,-99) , +3, 0.925281, 0, 0, 0.361836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.088761,-99) , +13, 0.00946541, 1, 0, 0.312358,-99) , +4, 1.59619, 1, 0, 0.440664,-99) , +12, 0.522829, 0, 0, 0.456296,-99) , +12, 0.111498, 1, 0, 0.492991,-99) ); + // itree = 312 + fBoostWeights.push_back(0.00872939); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448677,-99) , +7, 0.010373, 0, 0, 0.596066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426132,-99) , +8, 0.989923, 1, 0, 0.577527,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374622,-99) , +7, 0.0213137, 1, 0, 0.431529,-99) , +12, 0.0313038, 0, 0, 0.558139,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620211,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170418,-99) , +7, 0.0510563, 1, 0, 0.462697,-99) , +2, 33.5, 0, 0, 0.479681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263478,-99) , +7, 0.101834, 1, 0, 0.467703,-99) , +12, 0.101422, 1, 0, 0.504271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278425,-99) , +12, 0.0198681, 0, 0, 0.497249,-99) ); + // itree = 313 + fBoostWeights.push_back(0.00997412); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684838,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53064,-99) , +6, 0.268839, 1, 0, 0.565603,-99) , +5, 1.77898, 0, 0, 0.588504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420794,-99) , +14, -3.86327, 0, 0, 0.562064,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525377,-99) , +16, 2349.06, 1, 0, 0.574393,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457994,-99) , +10, -1104.62, 1, 0, 0.478729,-99) , +5, 1.36723, 1, 0, 0.515328,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340241,-99) , +7, 0.0118804, 0, 0, 0.439946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24723,-99) , +13, 0.0375649, 1, 0, 0.427769,-99) , +6, 0.664749, 1, 0, 0.479926,-99) , +11, 1.5, 0, 0, 0.506364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537783,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181594,-99) , +11, 1.5, 0, 0, 0.278604,-99) , +14, -4.08325, 1, 0, 0.375643,-99) , +5, 1.99792, 1, 0, 0.489616,-99) ); + // itree = 314 + fBoostWeights.push_back(0.00553907); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534381,-99) , +2, 36.5, 0, 0, 0.55201,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457009,-99) , +4, 0.832538, 1, 0, 0.482922,-99) , +16, 512.434, 1, 0, 0.509317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198857,-99) , +7, 0.251646, 1, 0, 0.505473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175676,-99) , +4, 2.13145, 1, 0, 0.500278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144777,-99) , +7, 0.00660336, 0, 0, 0.495517,-99) ); + // itree = 315 + fBoostWeights.push_back(0.0123102); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.706805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555778,-99) , +6, 0.714363, 1, 0, 0.639542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491761,-99) , +13, 0.019532, 1, 0, 0.603739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385464,-99) , +8, -0.478495, 0, 0, 0.448004,-99) , +6, 0.47223, 1, 0, 0.494502,-99) , +2, 15.5, 0, 0, 0.560235,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387298,-99) , +15, 0.290156, 1, 0, 0.460387,-99) , +13, 0.00119603, 0, 0, 0.534019,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567983,-99) , +7, 0.042885, 1, 0, 0.614548,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591216,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3894,-99) , +8, 0.850401, 1, 0, 0.518621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346204,-99) , +5, 2.0551, 1, 0, 0.480318,-99) , +0, 20.5, 0, 0, 0.531736,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341719,-99) , +6, 0.132252, 0, 0, 0.462301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0732019,-99) , +4, 2.15954, 1, 0, 0.453003,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20958,-99) , +15, 0.123876, 1, 0, 0.299118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0599609,-99) , +4, 1.81763, 1, 0, 0.268657,-99) , +13, 0.00466297, 1, 0, 0.408295,-99) , +11, 1.5, 0, 0, 0.450963,-99) , +5, 1.53034, 1, 0, 0.492868,-99) ); + // itree = 316 + fBoostWeights.push_back(0.00978985); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521596,-99) , +6, 0.916307, 1, 0, 0.59186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300908,-99) , +7, 0.061936, 1, 0, 0.481788,-99) , +5, 1.46847, 1, 0, 0.548833,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475677,-99) , +16, 10.9612, 1, 0, 0.490189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255283,-99) , +7, 0.0332306, 1, 0, 0.478654,-99) , +2, 16.5, 0, 0, 0.50935,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171813,-99) , +14, -3.71174, 1, 0, 0.357593,-99) , +5, 2.13012, 1, 0, 0.497931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228459,-99) , +3, 0.99965, 1, 0, 0.490533,-99) ); + // itree = 317 + fBoostWeights.push_back(0.010988); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.706113,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545127,-99) , +6, 0.254164, 1, 0, 0.576497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407809,-99) , +8, -0.947199, 0, 0, 0.554059,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421185,-99) , +16, 2760.51, 1, 0, 0.480468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302157,-99) , +12, 0.0728796, 0, 0, 0.37604,-99) , +6, 0.620742, 1, 0, 0.435972,-99) , +14, -2.77726, 0, 0, 0.517052,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328865,-99) , +3, 0.99894, 1, 0, 0.481325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220604,-99) , +7, 0.00716579, 0, 0, 0.471901,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233912,-99) , +7, 0.0353941, 1, 0, 0.362713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0475249,-99) , +5, 2.00668, 1, 0, 0.301983,-99) , +13, 0.00511667, 1, 0, 0.437273,-99) , +5, 1.57335, 1, 0, 0.480518,-99) , +12, 0.528197, 0, 0, 0.488161,-99) ); + // itree = 318 + fBoostWeights.push_back(0.00859045); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.716583,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272264,-99) , +12, 0.018167, 0, 0, 0.531394,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202435,-99) , +5, 1.38754, 1, 0, 0.372932,-99) , +13, 0.0201938, 1, 0, 0.516727,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397113,-99) , +16, 69.7444, 1, 0, 0.426787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178045,-99) , +15, 0.0308553, 0, 0, 0.403329,-99) , +2, 9.5, 0, 0, 0.498722,-99) , +12, 0.526678, 0, 0, 0.506436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202566,-99) , +3, 0.999683, 1, 0, 0.499905,-99) ); + // itree = 319 + fBoostWeights.push_back(0.00936589); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503859,-99) , +14, -2.9126, 0, 0, 0.573814,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458899,-99) , +4, 0.653476, 1, 0, 0.494182,-99) , +12, 0.129353, 1, 0, 0.534701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359269,-99) , +12, 0.0226393, 0, 0, 0.526844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36362,-99) , +5, 0.401992, 0, 0, 0.518167,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599964,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175671,-99) , +4, 2.06964, 1, 0, 0.446901,-99) , +9, -4.33738, 1, 0, 0.487317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178899,-99) , +3, 0.889798, 0, 0, 0.460995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239626,-99) , +14, -2.4018, 1, 0, 0.409453,-99) , +4, 1.56679, 1, 0, 0.497779,-99) ); + // itree = 320 + fBoostWeights.push_back(0.00734744); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584427,-99) , +12, 0.318744, 0, 0, 0.598127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438207,-99) , +14, -4.82892, 0, 0, 0.583376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453088,-99) , +8, -0.897634, 0, 0, 0.56969,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433175,-99) , +5, 1.79087, 1, 0, 0.508281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222181,-99) , +3, 0.730154, 0, 0, 0.500115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302547,-99) , +7, 0.0949946, 1, 0, 0.487099,-99) , +11, 1.5, 0, 0, 0.514009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205233,-99) , +3, 0.999646, 1, 0, 0.506984,-99) ); + // itree = 321 + fBoostWeights.push_back(0.00782074); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273838,-99) , +4, 1.96766, 1, 0, 0.581899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419924,-99) , +14, -4.67536, 0, 0, 0.563849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684997,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425849,-99) , +4, 0.849013, 1, 0, 0.462852,-99) , +12, 0.511969, 0, 0, 0.477575,-99) , +12, 0.111457, 1, 0, 0.515491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314113,-99) , +12, 0.0217817, 0, 0, 0.507166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115688,-99) , +7, 0.240142, 1, 0, 0.502739,-99) ); + // itree = 322 + fBoostWeights.push_back(0.0111555); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576367,-99) , +3, 0.98929, 1, 0, 0.63094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538359,-99) , +7, 0.0212173, 0, 0, 0.592465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458446,-99) , +9, -0.646645, 1, 0, 0.550358,-99) , +10, 1414.35, 1, 0, 0.581352,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400484,-99) , +4, 1.3118, 1, 0, 0.497599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236397,-99) , +4, 1.84909, 1, 0, 0.480545,-99) , +16, 950.953, 1, 0, 0.552722,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502985,-99) , +8, 0.726429, 1, 0, 0.575063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412374,-99) , +12, 0.03128, 0, 0, 0.545697,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431613,-99) , +5, 1.31836, 1, 0, 0.483036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267623,-99) , +7, 0.0893844, 1, 0, 0.467056,-99) , +12, 0.108655, 1, 0, 0.503582,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357491,-99) , +14, -3.41482, 1, 0, 0.458991,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216214,-99) , +8, 0.623781, 0, 0, 0.339945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124741,-99) , +5, 2.12905, 1, 0, 0.290173,-99) , +11, 0.5, 1, 0, 0.374153,-99) , +5, 1.76626, 1, 0, 0.468566,-99) , +11, 1.5, 0, 0, 0.496164,-99) ); + // itree = 323 + fBoostWeights.push_back(0.0102313); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66413,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510704,-99) , +2, 15.5, 0, 0, 0.579814,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42708,-99) , +5, 1.59201, 0, 0, 0.478052,-99) , +14, -2.91365, 0, 0, 0.534816,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316368,-99) , +3, 0.999003, 1, 0, 0.492091,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174218,-99) , +5, 1.54232, 1, 0, 0.350991,-99) , +8, -0.774762, 0, 0, 0.46919,-99) , +12, 0.12333, 1, 0, 0.504148,-99) , +12, 0.469657, 0, 0, 0.511289,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370818,-99) , +12, 0.113166, 1, 0, 0.463654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16045,-99) , +8, 0.920383, 0, 0, 0.343941,-99) , +5, 2.03873, 1, 0, 0.493909,-99) ); + // itree = 324 + fBoostWeights.push_back(0.00579837); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695816,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262119,-99) , +7, 0.179104, 1, 0, 0.514698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286925,-99) , +12, 0.0186433, 0, 0, 0.507866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32043,-99) , +15, 0.0377339, 0, 0, 0.499086,-99) , +12, 0.512772, 0, 0, 0.507007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211273,-99) , +4, 2.07717, 1, 0, 0.501054,-99) ); + // itree = 325 + fBoostWeights.push_back(0.00967037); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404494,-99) , +7, 0.0163466, 0, 0, 0.568998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183164,-99) , +1, 17.5, 0, 0, 0.460157,-99) , +7, 0.0561471, 1, 0, 0.538044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282212,-99) , +3, 0.791412, 0, 0, 0.469866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175772,-99) , +7, 0.0308553, 1, 0, 0.455656,-99) , +2, 13.5, 0, 0, 0.500895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269532,-99) , +3, 0.99965, 1, 0, 0.494266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252923,-99) , +4, 1.99493, 1, 0, 0.48605,-99) ); + // itree = 326 + fBoostWeights.push_back(0.00853193); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655629,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465276,-99) , +8, 0.971292, 1, 0, 0.545778,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404511,-99) , +9, 1.51336, 0, 0, 0.447,-99) , +15, 0.0835304, 0, 0, 0.526853,-99) , +12, 0.387227, 0, 0, 0.536779,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365015,-99) , +8, 0.726402, 1, 0, 0.475371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296769,-99) , +15, 0.728912, 1, 0, 0.437801,-99) , +3, 0.998037, 1, 0, 0.520243,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194062,-99) , +3, 0.999344, 1, 0, 0.485074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291206,-99) , +7, 0.0100725, 0, 0, 0.459958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0385012,-99) , +13, 0.0350465, 1, 0, 0.446297,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108849,-99) , +3, 0.835754, 0, 0, 0.42794,-99) , +4, 1.52401, 1, 0, 0.499555,-99) ); + // itree = 327 + fBoostWeights.push_back(0.00847907); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535815,-99) , +8, -0.638013, 0, 0, 0.618043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354892,-99) , +5, 2.1467, 1, 0, 0.608567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470963,-99) , +5, 1.87777, 0, 0, 0.517874,-99) , +13, 0.000962469, 0, 0, 0.576987,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454616,-99) , +8, 0.4106, 1, 0, 0.514075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37218,-99) , +6, 0.596339, 1, 0, 0.462984,-99) , +2, 11.5, 0, 0, 0.542683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457538,-99) , +12, 0.110533, 1, 0, 0.489644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0937981,-99) , +7, 0.251046, 1, 0, 0.484188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24133,-99) , +3, 0.771555, 0, 0, 0.474704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241701,-99) , +5, 2.10428, 1, 0, 0.458355,-99) , +11, 1.5, 0, 0, 0.48658,-99) ); + // itree = 328 + fBoostWeights.push_back(0.00818971); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416193,-99) , +13, 0.0455279, 1, 0, 0.588462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247904,-99) , +1, 11.5, 0, 0, 0.569596,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202661,-99) , +0, 36.5, 1, 0, 0.493441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0425598,-99) , +7, 0.070528, 1, 0, 0.486356,-99) , +2, 25.5, 0, 0, 0.507313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218879,-99) , +7, 0.00714217, 0, 0, 0.501408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257676,-99) , +3, 0.999614, 1, 0, 0.494004,-99) ); + // itree = 329 + fBoostWeights.push_back(0.00884666); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577701,-99) , +12, 0.127393, 1, 0, 0.614236,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465644,-99) , +0, 37.5, 0, 0, 0.526191,-99) , +15, 0.491176, 1, 0, 0.582615,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482685,-99) , +16, 240.465, 1, 0, 0.546381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381435,-99) , +10, 5633.33, 1, 0, 0.502037,-99) , +0, 13.5, 0, 0, 0.558034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327921,-99) , +2, 7.5, 0, 0, 0.510116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337276,-99) , +7, 0.098297, 1, 0, 0.49851,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567636,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0646171,-99) , +5, 2.31026, 1, 0, 0.296729,-99) , +8, 0.994699, 0, 0, 0.365279,-99) , +5, 1.92358, 1, 0, 0.478459,-99) , +11, 1.5, 0, 0, 0.504685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0461507,-99) , +4, 2.17926, 1, 0, 0.500069,-99) ); + // itree = 330 + fBoostWeights.push_back(0.00695015); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486377,-99) , +12, 0.038431, 0, 0, 0.56089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420586,-99) , +8, 0.99144, 1, 0, 0.545956,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445731,-99) , +1, 11.5, 0, 0, 0.548588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131629,-99) , +7, 0.143679, 1, 0, 0.437912,-99) , +4, 0.783835, 1, 0, 0.474015,-99) , +12, 0.101127, 1, 0, 0.503202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277161,-99) , +12, 0.01821, 0, 0, 0.497144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279705,-99) , +5, 2.31033, 1, 0, 0.490268,-99) ); + // itree = 331 + fBoostWeights.push_back(0.0101114); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.696105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622684,-99) , +4, 0.315592, 1, 0, 0.656956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543469,-99) , +2, 12.5, 0, 0, 0.62223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470998,-99) , +14, -3.7921, 0, 0, 0.601961,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585531,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460768,-99) , +6, 1.01149, 0, 0, 0.500873,-99) , +9, -1.35221, 1, 0, 0.5317,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388092,-99) , +10, 2926.43, 1, 0, 0.439455,-99) , +13, 0.00208297, 0, 0, 0.502117,-99) , +6, 0.425633, 1, 0, 0.543371,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505028,-99) , +9, -4.5124, 1, 0, 0.52555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308936,-99) , +3, 0.999114, 1, 0, 0.513278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253967,-99) , +7, 0.00750582, 0, 0, 0.501925,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602331,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517185,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309567,-99) , +16, 64.4827, 1, 0, 0.361523,-99) , +10, -1991.97, 1, 0, 0.406805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0686183,-99) , +4, 1.95603, 1, 0, 0.384887,-99) , +13, 0.00244804, 1, 0, 0.463932,-99) , +5, 1.56945, 1, 0, 0.506641,-99) ); + // itree = 332 + fBoostWeights.push_back(0.00575145); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430982,-99) , +2, 8.5, 0, 0, 0.531966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309127,-99) , +3, 0.999662, 1, 0, 0.526034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33646,-99) , +3, 0.990456, 1, 0, 0.403658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0869947,-99) , +4, 1.63748, 1, 0, 0.385742,-99) , +8, -0.94609, 0, 0, 0.514414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249658,-99) , +7, 0.00714366, 0, 0, 0.508899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170036,-99) , +4, 2.13145, 1, 0, 0.503891,-99) ); + // itree = 333 + fBoostWeights.push_back(0.010546); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709228,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540185,-99) , +2, 24.5, 0, 0, 0.562217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183215,-99) , +5, 2.47716, 1, 0, 0.556576,-99) , +12, 0.386756, 0, 0, 0.568147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312367,-99) , +13, 0.0520423, 1, 0, 0.561623,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377133,-99) , +13, 0.0191261, 1, 0, 0.521162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336625,-99) , +14, -4.38846, 0, 0, 0.506679,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291827,-99) , +7, 0.021688, 0, 0, 0.405414,-99) , +6, 0.916373, 1, 0, 0.482527,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325435,-99) , +9, 0.543671, 0, 0, 0.403769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0687352,-99) , +4, 2.10625, 1, 0, 0.381906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18891,-99) , +13, 0.00395077, 1, 0, 0.338964,-99) , +5, 1.81711, 1, 0, 0.448612,-99) , +16, 1042.97, 1, 0, 0.502186,-99) ); + // itree = 334 + fBoostWeights.push_back(0.00743099); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.712134,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421234,-99) , +8, 0.990321, 1, 0, 0.538297,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366492,-99) , +4, 1.35847, 1, 0, 0.455448,-99) , +12, 0.125389, 1, 0, 0.497667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223107,-99) , +12, 0.0174509, 0, 0, 0.491044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100462,-99) , +5, 2.48281, 1, 0, 0.486926,-99) , +12, 0.52475, 0, 0, 0.495613,-99) ); + // itree = 335 + fBoostWeights.push_back(0.00873588); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585164,-99) , +12, 0.111668, 1, 0, 0.627499,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413726,-99) , +15, 0.262851, 1, 0, 0.484334,-99) , +14, -2.58637, 0, 0, 0.57061,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374808,-99) , +13, 0.0139745, 1, 0, 0.49998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202537,-99) , +7, 0.00711772, 0, 0, 0.492785,-99) , +5, 1.31382, 1, 0, 0.516738,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0612807,-99) , +1, 22.5, 0, 0, 0.376753,-99) , +7, 0.0992917, 1, 0, 0.50698,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302172,-99) , +16, 1504.19, 0, 0, 0.384455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146435,-99) , +4, 1.5876, 1, 0, 0.362369,-99) , +8, -0.935465, 0, 0, 0.494581,-99) ); + // itree = 336 + fBoostWeights.push_back(0.00907096); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723403,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485251,-99) , +13, 0.00182866, 0, 0, 0.559487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181135,-99) , +7, 0.0406064, 1, 0, 0.486086,-99) , +2, 21.5, 0, 0, 0.508522,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346259,-99) , +7, 0.0169253, 0, 0, 0.490081,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112623,-99) , +4, 1.92627, 1, 0, 0.282849,-99) , +14, -3.26403, 1, 0, 0.396068,-99) , +4, 1.69959, 1, 0, 0.494937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200351,-99) , +13, 0.0567924, 1, 0, 0.489562,-99) , +12, 0.521216, 0, 0, 0.497701,-99) ); + // itree = 337 + fBoostWeights.push_back(0.00616872); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668267,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448429,-99) , +4, 1.60196, 1, 0, 0.550651,-99) , +15, 0.056194, 1, 0, 0.567406,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471057,-99) , +12, 0.0804196, 1, 0, 0.494993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273552,-99) , +4, 1.98895, 1, 0, 0.487949,-99) , +16, 254.766, 1, 0, 0.51312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260761,-99) , +12, 0.0191568, 0, 0, 0.505399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23244,-99) , +7, 0.170523, 1, 0, 0.498761,-99) ); + // itree = 338 + fBoostWeights.push_back(0.00977914); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539831,-99) , +6, 0.16039, 1, 0, 0.558152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454356,-99) , +12, 0.283794, 0, 0, 0.482377,-99) , +8, 0.912505, 1, 0, 0.538499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333745,-99) , +3, 0.999645, 1, 0, 0.532371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300971,-99) , +12, 0.13892, 1, 0, 0.397938,-99) , +8, -0.934024, 0, 0, 0.520168,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59086,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170145,-99) , +16, 515.717, 1, 0, 0.309305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0342474,-99) , +5, 2.31708, 1, 0, 0.245366,-99) , +14, -4.15247, 1, 0, 0.381651,-99) , +5, 2.03621, 1, 0, 0.50501,-99) ); + // itree = 339 + fBoostWeights.push_back(0.00774266); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535369,-99) , +4, 0.555794, 1, 0, 0.562126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416233,-99) , +5, 0.508055, 0, 0, 0.548488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400509,-99) , +12, 0.0326848, 0, 0, 0.535106,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449278,-99) , +3, 0.975895, 0, 0, 0.522719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337281,-99) , +7, 0.0134377, 0, 0, 0.426796,-99) , +12, 0.112224, 1, 0, 0.469656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132752,-99) , +7, 0.121133, 1, 0, 0.458513,-99) , +5, 1.544, 1, 0, 0.498805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222007,-99) , +2, 6.5, 0, 0, 0.493351,-99) ); + // itree = 340 + fBoostWeights.push_back(0.00983225); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701454,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456795,-99) , +8, -0.853518, 0, 0, 0.561624,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303234,-99) , +3, 0.996533, 1, 0, 0.433453,-99) , +14, -2.91366, 0, 0, 0.526039,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391846,-99) , +15, 0.562938, 1, 0, 0.504669,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287992,-99) , +13, 0.00297705, 1, 0, 0.377327,-99) , +12, 0.135779, 1, 0, 0.44882,-99) , +5, 1.57771, 1, 0, 0.490936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192949,-99) , +13, 0.0488656, 1, 0, 0.483997,-99) , +12, 0.526395, 0, 0, 0.492095,-99) ); + // itree = 341 + fBoostWeights.push_back(0.0103017); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476532,-99) , +3, 0.998037, 1, 0, 0.583156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458685,-99) , +15, 0.200855, 0, 0, 0.564035,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493238,-99) , +12, 0.384218, 0, 0, 0.517763,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150662,-99) , +13, 0.00102513, 1, 0, 0.341012,-99) , +4, 1.54474, 1, 0, 0.485929,-99) , +12, 0.125292, 1, 0, 0.526073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34084,-99) , +12, 0.0216986, 0, 0, 0.518189,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422308,-99) , +14, -3.42772, 0, 0, 0.484441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352211,-99) , +8, -0.868152, 0, 0, 0.468781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118188,-99) , +4, 2.12995, 1, 0, 0.462839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129048,-99) , +7, 0.0372856, 1, 0, 0.436796,-99) , +1, 10.5, 0, 0, 0.493427,-99) ); + // itree = 342 + fBoostWeights.push_back(0.0107442); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526928,-99) , +4, 0.763022, 1, 0, 0.563502,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432537,-99) , +12, 0.283794, 0, 0, 0.459249,-99) , +8, 0.914152, 1, 0, 0.534154,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390841,-99) , +1, 11.5, 0, 0, 0.459077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17219,-99) , +5, 1.81655, 1, 0, 0.433056,-99) , +8, -0.852039, 0, 0, 0.519193,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347953,-99) , +5, 0.462568, 0, 0, 0.511126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669724,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307678,-99) , +1, 10.5, 0, 0, 0.477283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184905,-99) , +15, 0.107045, 0, 0, 0.404014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170107,-99) , +14, -2.6219, 1, 0, 0.339589,-99) , +12, 0.421363, 0, 0, 0.376318,-99) , +4, 1.69228, 1, 0, 0.494351,-99) ); + // itree = 343 + fBoostWeights.push_back(0.00816283); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464357,-99) , +8, -0.897557, 0, 0, 0.578471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430293,-99) , +8, 0.989501, 1, 0, 0.563391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381603,-99) , +15, 1.77727, 1, 0, 0.548935,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500767,-99) , +2, 29.5, 0, 0, 0.541067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0629184,-99) , +7, 0.0592578, 1, 0, 0.445119,-99) , +1, 14.5, 0, 0, 0.483904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224822,-99) , +1, 63.5, 1, 0, 0.476663,-99) , +16, 470.952, 1, 0, 0.504294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256159,-99) , +5, 2.31649, 1, 0, 0.497659,-99) ); + // itree = 344 + fBoostWeights.push_back(0.0101676); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583087,-99) , +10, 5357.92, 1, 0, 0.618019,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453624,-99) , +10, 1432.12, 1, 0, 0.538922,-99) , +9, -0.471382, 1, 0, 0.575388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614334,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322635,-99) , +7, 0.00940841, 0, 0, 0.484167,-99) , +9, 4.79081, 0, 0, 0.49914,-99) , +16, 507.199, 1, 0, 0.529035,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425127,-99) , +5, 1.83018, 1, 0, 0.570776,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283813,-99) , +5, 1.92902, 1, 0, 0.406955,-99) , +3, 0.997313, 0, 0, 0.462655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127409,-99) , +7, 0.0312477, 1, 0, 0.433195,-99) , +1, 9.5, 0, 0, 0.508468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0349903,-99) , +1, 25.5, 0, 0, 0.331632,-99) , +7, 0.105915, 1, 0, 0.498183,-99) ); + // itree = 345 + fBoostWeights.push_back(0.0118114); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546117,-99) , +5, 1.37983, 1, 0, 0.622881,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321705,-99) , +7, 0.0335586, 1, 0, 0.521371,-99) , +2, 21.5, 0, 0, 0.553026,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447158,-99) , +11, 1.5, 0, 0, 0.482694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.190981,-99) , +7, 0.143729, 1, 0, 0.465815,-99) , +6, 0.840211, 1, 0, 0.525336,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516949,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487645,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26111,-99) , +4, 0.912143, 1, 0, 0.326253,-99) , +4, 1.40805, 0, 0, 0.384475,-99) , +3, 0.946944, 1, 0, 0.42093,-99) , +14, -3.59018, 0, 0, 0.507438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573379,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274155,-99) , +11, 0.5, 1, 0, 0.389876,-99) , +11, 1.5, 0, 0, 0.469559,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196064,-99) , +12, 0.401427, 0, 0, 0.248229,-99) , +13, 0.000927095, 1, 0, 0.390347,-99) , +5, 1.93579, 1, 0, 0.488914,-99) ); + // itree = 346 + fBoostWeights.push_back(0.00954714); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571639,-99) , +6, 0.150282, 1, 0, 0.595041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490318,-99) , +13, 0.0116732, 1, 0, 0.576622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146942,-99) , +5, 2.41215, 1, 0, 0.569004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432221,-99) , +8, 0.984734, 1, 0, 0.549306,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418342,-99) , +5, 1.49778, 1, 0, 0.553712,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31864,-99) , +7, 0.0352945, 1, 0, 0.475007,-99) , +2, 26.5, 0, 0, 0.492811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302749,-99) , +13, 0.0566751, 1, 0, 0.486897,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561059,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15744,-99) , +0, 23.5, 1, 0, 0.318415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0390306,-99) , +5, 2.25676, 1, 0, 0.27187,-99) , +14, -4.14002, 1, 0, 0.373758,-99) , +5, 1.90809, 1, 0, 0.467251,-99) , +11, 1.5, 0, 0, 0.493989,-99) ); + // itree = 347 + fBoostWeights.push_back(0.00548899); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.712471,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314344,-99) , +3, 0.999649, 1, 0, 0.508721,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264056,-99) , +7, 0.00704536, 0, 0, 0.503386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28135,-99) , +12, 0.0175239, 0, 0, 0.497511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279106,-99) , +14, -1.52731, 1, 0, 0.488079,-99) , +12, 0.526395, 0, 0, 0.49605,-99) ); + // itree = 348 + fBoostWeights.push_back(0.00812735); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600713,-99) , +8, 0.469598, 1, 0, 0.629715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534958,-99) , +13, 0.0114919, 1, 0, 0.608913,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499191,-99) , +7, 0.0138045, 1, 0, 0.568027,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278731,-99) , +16, 258.731, 1, 0, 0.402279,-99) , +6, 0.410952, 1, 0, 0.488995,-99) , +0, 16.5, 0, 0, 0.557824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228336,-99) , +13, 0.0720324, 1, 0, 0.497997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22313,-99) , +3, 0.730515, 0, 0, 0.490432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195894,-99) , +5, 2.30878, 1, 0, 0.483562,-99) , +11, 1.5, 0, 0, 0.507747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269779,-99) , +3, 0.999624, 1, 0, 0.500297,-99) ); + // itree = 349 + fBoostWeights.push_back(0.00974434); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670225,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49663,-99) , +0, 13.5, 0, 0, 0.567343,-99) , +15, 0.0507766, 1, 0, 0.579489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307927,-99) , +4, 2.07527, 1, 0, 0.574082,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386154,-99) , +14, -4.51631, 0, 0, 0.554473,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392447,-99) , +1, 15.5, 0, 0, 0.555504,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49566,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286679,-99) , +7, 0.0324381, 1, 0, 0.479387,-99) , +2, 21.5, 0, 0, 0.502974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310988,-99) , +13, 0.0375953, 1, 0, 0.494908,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452519,-99) , +14, -4.08377, 1, 0, 0.539443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123315,-99) , +0, 35.5, 1, 0, 0.4864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138572,-99) , +8, 0.803303, 0, 0, 0.376857,-99) , +5, 1.96499, 1, 0, 0.478583,-99) , +11, 1.5, 0, 0, 0.503175,-99) ); + // itree = 350 + fBoostWeights.push_back(0.00799095); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665077,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435643,-99) , +6, 0.788244, 1, 0, 0.55515,-99) , +1, 13.5, 0, 0, 0.597832,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568005,-99) , +3, 0.95763, 1, 0, 0.615874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461207,-99) , +0, 15.5, 0, 0, 0.568548,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483826,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134631,-99) , +7, 0.150431, 1, 0, 0.478962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31447,-99) , +1, 49.5, 1, 0, 0.470002,-99) , +6, 0.135152, 1, 0, 0.489018,-99) , +9, 5.76266, 0, 0, 0.502057,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +8, 0.747084, 0, 0, 0.361202,-99) , +5, 2.1726, 1, 0, 0.493515,-99) ); + // itree = 351 + fBoostWeights.push_back(0.00675455); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572109,-99) , +2, 26.5, 0, 0, 0.594363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419561,-99) , +14, -4.72785, 0, 0, 0.578788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423156,-99) , +8, -0.881418, 0, 0, 0.561964,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449797,-99) , +5, 1.54379, 1, 0, 0.49282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282435,-99) , +3, 0.748231, 0, 0, 0.485655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111828,-99) , +7, 0.229019, 1, 0, 0.480609,-99) , +11, 1.5, 0, 0, 0.507743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260532,-99) , +4, 1.9732, 1, 0, 0.498851,-99) ); + // itree = 352 + fBoostWeights.push_back(0.00883988); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511077,-99) , +6, 0.313052, 1, 0, 0.535458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398613,-99) , +8, -0.974112, 0, 0, 0.527045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344967,-99) , +2, 7.5, 0, 0, 0.519173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324283,-99) , +14, -4.78972, 0, 0, 0.508905,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556568,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236435,-99) , +11, 0.5, 1, 0, 0.374599,-99) , +11, 1.5, 0, 0, 0.452737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0946274,-99) , +8, 0.641201, 0, 0, 0.366122,-99) , +5, 2.0105, 1, 0, 0.492182,-99) ); + // itree = 353 + fBoostWeights.push_back(0.00941956); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478122,-99) , +14, -4.67914, 0, 0, 0.57705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441289,-99) , +8, -0.955058, 0, 0, 0.566729,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389235,-99) , +6, 0.732951, 1, 0, 0.477803,-99) , +12, 0.0336111, 0, 0, 0.55208,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410994,-99) , +8, -0.91618, 0, 0, 0.537303,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338218,-99) , +13, 0.00214644, 1, 0, 0.398999,-99) , +7, 0.0140063, 0, 0, 0.503711,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354107,-99) , +8, 0.963698, 0, 0, 0.399029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.121126, 1, 0, 0.383216,-99) , +4, 1.29137, 1, 0, 0.458018,-99) , +12, 0.113767, 1, 0, 0.502168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216377,-99) , +12, 0.01821, 0, 0, 0.494734,-99) ); + // itree = 354 + fBoostWeights.push_back(0.00831724); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50107,-99) , +8, 0.822834, 1, 0, 0.556074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393999,-99) , +7, 0.00863321, 0, 0, 0.547678,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316526,-99) , +3, 0.992102, 1, 0, 0.428487,-99) , +8, -0.900949, 0, 0, 0.533739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314365,-99) , +8, 0.31277, 1, 0, 0.409556,-99) , +12, 0.0313859, 0, 0, 0.523533,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607345,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379759,-99) , +3, 0.973906, 0, 0, 0.551348,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179818,-99) , +13, 0.0242211, 1, 0, 0.446182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276343,-99) , +1, 9.5, 0, 0, 0.399014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142372,-99) , +3, 0.89292, 0, 0, 0.373647,-99) , +16, 87.5678, 1, 0, 0.41976,-99) , +4, 1.54939, 1, 0, 0.502414,-99) ); + // itree = 355 + fBoostWeights.push_back(0.00512597); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442036,-99) , +7, 0.0654816, 1, 0, 0.520917,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311363,-99) , +0, 14.5, 0, 0, 0.419464,-99) , +8, -0.89567, 0, 0, 0.508654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287769,-99) , +14, -5.65188, 0, 0, 0.503456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348005,-99) , +5, 2.24273, 1, 0, 0.49652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215974,-99) , +3, 0.999659, 1, 0, 0.489729,-99) ); + // itree = 356 + fBoostWeights.push_back(0.00617634); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470746,-99) , +12, 0.125377, 1, 0, 0.512698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265833,-99) , +12, 0.0165253, 0, 0, 0.506942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233745,-99) , +2, 6.5, 0, 0, 0.50159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154254,-99) , +7, 0.248758, 1, 0, 0.497779,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24497,-99) , +5, 2.27982, 1, 0, 0.489223,-99) ); + // itree = 357 + fBoostWeights.push_back(0.00805642); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666953,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637733,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387091,-99) , +12, 0.0312472, 0, 0, 0.502522,-99) , +9, -7.78178, 1, 0, 0.511509,-99) , +12, 0.436798, 0, 0, 0.520719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481485,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295433,-99) , +1, 12.5, 0, 0, 0.358708,-99) , +16, 396.825, 1, 0, 0.405352,-99) , +8, -0.934967, 0, 0, 0.509186,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335728,-99) , +1, 11.5, 0, 0, 0.475347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0549583,-99) , +13, 0.00238926, 1, 0, 0.382852,-99) , +4, 1.74052, 1, 0, 0.496188,-99) ); + // itree = 358 + fBoostWeights.push_back(0.00703398); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.72072,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175551,-99) , +7, 0.2509, 1, 0, 0.506809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260384,-99) , +14, -5.50747, 0, 0, 0.499734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185682,-99) , +2, 6.5, 0, 0, 0.493708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255848,-99) , +5, 2.23572, 1, 0, 0.483927,-99) , +12, 0.527172, 0, 0, 0.493357,-99) ); + // itree = 359 + fBoostWeights.push_back(0.00706152); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516569,-99) , +13, 0.01114, 1, 0, 0.598499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473941,-99) , +14, -4.36273, 0, 0, 0.58402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401445,-99) , +6, 0.325858, 0, 0, 0.476861,-99) , +0, 12.5, 0, 0, 0.559471,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547803,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414888,-99) , +14, -3.21315, 0, 0, 0.523467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351438,-99) , +13, 0.00529254, 1, 0, 0.43763,-99) , +5, 1.49904, 1, 0, 0.479699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206538,-99) , +7, 0.173317, 1, 0, 0.473153,-99) , +11, 1.5, 0, 0, 0.501977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231503,-99) , +4, 2.06754, 1, 0, 0.496038,-99) ); + // itree = 360 + fBoostWeights.push_back(0.00717538); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680983,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402651,-99) , +14, -4.69621, 0, 0, 0.51707,-99) , +12, 0.475957, 0, 0, 0.524432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306162,-99) , +3, 0.999634, 1, 0, 0.517828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216846,-99) , +14, -4.18897, 1, 0, 0.369356,-99) , +5, 2.11756, 1, 0, 0.506447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187844,-99) , +7, 0.00714512, 0, 0, 0.500205,-99) ); + // itree = 361 + fBoostWeights.push_back(0.00779643); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457346,-99) , +8, 0.99143, 1, 0, 0.58833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430042,-99) , +12, 0.0320097, 0, 0, 0.572099,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246903,-99) , +4, 1.95985, 1, 0, 0.538112,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371129,-99) , +4, 1.53844, 1, 0, 0.456883,-99) , +2, 13.5, 0, 0, 0.49982,-99) , +16, 290.203, 1, 0, 0.524119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287382,-99) , +5, 2.31658, 1, 0, 0.517074,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371548,-99) , +15, 0.169207, 1, 0, 0.438808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0727937,-99) , +3, 0.998241, 1, 0, 0.365476,-99) , +13, 0.0221938, 1, 0, 0.505314,-99) ); + // itree = 362 + fBoostWeights.push_back(0.0101484); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666734,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621958,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564123,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431948,-99) , +16, 659.003, 1, 0, 0.519546,-99) , +6, 0.898569, 0, 0, 0.553272,-99) , +6, 0.153379, 1, 0, 0.58386,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5879,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405901,-99) , +16, 353.248, 1, 0, 0.471208,-99) , +3, 0.995069, 0, 0, 0.514234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225709,-99) , +5, 2.24503, 1, 0, 0.498816,-99) , +0, 14.5, 0, 0, 0.553522,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467146,-99) , +12, 0.177815, 1, 0, 0.545651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407665,-99) , +13, 0.000695105, 0, 0, 0.520182,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430436,-99) , +12, 0.061204, 1, 0, 0.466052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214985,-99) , +7, 0.0465963, 1, 0, 0.436105,-99) , +5, 1.49557, 1, 0, 0.477456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0972812,-99) , +5, 2.31642, 1, 0, 0.469459,-99) , +11, 1.5, 0, 0, 0.497673,-99) ); + // itree = 363 + fBoostWeights.push_back(0.00832815); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668522,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540811,-99) , +16, 38.9497, 1, 0, 0.585029,-99) , +1, 13.5, 1, 0, 0.607763,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438116,-99) , +3, 0.980677, 1, 0, 0.531955,-99) , +2, 11.5, 0, 0, 0.584588,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438309,-99) , +12, 0.171618, 1, 0, 0.519875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116657,-99) , +4, 1.69343, 1, 0, 0.483653,-99) , +16, 965.643, 1, 0, 0.556527,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530034,-99) , +4, 1.30929, 0, 0, 0.580844,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448271,-99) , +2, 26.5, 0, 0, 0.474245,-99) , +9, 3.87065, 0, 0, 0.494062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27505,-99) , +3, 0.999564, 1, 0, 0.486078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281131,-99) , +4, 1.84792, 1, 0, 0.473312,-99) , +11, 1.5, 0, 0, 0.501092,-99) ); + // itree = 364 + fBoostWeights.push_back(0.00665086); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52578,-99) , +4, 0.376106, 1, 0, 0.548203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404131,-99) , +13, 0.0221179, 1, 0, 0.537481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376817,-99) , +14, -4.9526, 0, 0, 0.527457,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331302,-99) , +3, 0.892138, 0, 0, 0.480103,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0914092,-99) , +4, 1.65249, 1, 0, 0.342021,-99) , +8, -0.727181, 0, 0, 0.458668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.097643,-99) , +7, 0.250645, 1, 0, 0.451193,-99) , +6, 0.701503, 1, 0, 0.499974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302576,-99) , +5, 2.24526, 1, 0, 0.492285,-99) ); + // itree = 365 + fBoostWeights.push_back(0.00994068); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605269,-99) , +16, 1200.95, 1, 0, 0.649131,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555939,-99) , +15, 0.21889, 1, 0, 0.603221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457438,-99) , +8, -0.637948, 0, 0, 0.555735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434329,-99) , +13, 0.0011943, 0, 0, 0.524948,-99) , +3, 0.959339, 1, 0, 0.563011,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523097,-99) , +6, 0.839036, 1, 0, 0.596843,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183164,-99) , +4, 2.06728, 1, 0, 0.473787,-99) , +12, 0.125597, 1, 0, 0.535778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376558,-99) , +12, 0.0273396, 0, 0, 0.521536,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394389,-99) , +3, 0.998018, 1, 0, 0.480614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330189,-99) , +3, 0.889724, 0, 0, 0.466165,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333996,-99) , +7, 0.0127825, 0, 0, 0.455264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207391,-99) , +14, -3.4148, 1, 0, 0.335917,-99) , +5, 1.88571, 1, 0, 0.435712,-99) , +16, 489.245, 1, 0, 0.468591,-99) , +4, 0.783491, 1, 0, 0.499241,-99) ); + // itree = 366 + fBoostWeights.push_back(0.00963004); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524346,-99) , +1, 39.5, 1, 0, 0.617219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448565,-99) , +1, 17.5, 0, 0, 0.592273,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48973,-99) , +16, 299.735, 1, 0, 0.512866,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209663,-99) , +2, 17.5, 0, 0, 0.321971,-99) , +7, 0.0359043, 1, 0, 0.498605,-99) , +2, 24.5, 0, 0, 0.516476,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250422,-99) , +5, 2.31694, 1, 0, 0.509302,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238912,-99) , +1, 87.5, 1, 0, 0.41579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.061298,-99) , +1, 21.5, 0, 0, 0.334662,-99) , +7, 0.0865985, 1, 0, 0.494581,-99) ); + // itree = 367 + fBoostWeights.push_back(0.00765132); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704505,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465726,-99) , +6, 0.838472, 1, 0, 0.548616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430459,-99) , +8, 0.983261, 1, 0, 0.533468,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435858,-99) , +7, 0.0143946, 0, 0, 0.512377,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154272,-99) , +13, 0.0167714, 1, 0, 0.412384,-99) , +5, 1.46782, 1, 0, 0.462318,-99) , +16, 515.859, 1, 0, 0.490159,-99) , +12, 0.517414, 0, 0, 0.499006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269276,-99) , +4, 1.93427, 1, 0, 0.489264,-99) ); + // itree = 368 + fBoostWeights.push_back(0.0055332); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548881,-99) , +10, -4298.58, 1, 0, 0.561515,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451577,-99) , +11, 1.5, 0, 0, 0.48124,-99) , +12, 0.111593, 1, 0, 0.513947,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3687,-99) , +6, 0.513199, 1, 0, 0.433791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307399,-99) , +15, 1.8358, 1, 0, 0.388843,-99) , +12, 0.0313038, 0, 0, 0.503043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247125,-99) , +2, 6.5, 0, 0, 0.498083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160909,-99) , +7, 0.253137, 1, 0, 0.494484,-99) ); + // itree = 369 + fBoostWeights.push_back(0.0108819); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523192,-99) , +4, 0.652706, 1, 0, 0.549655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416699,-99) , +5, 0.624868, 0, 0, 0.538652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368383,-99) , +7, 0.00921876, 0, 0, 0.528595,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443458,-99) , +6, 0.253909, 1, 0, 0.517567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296988,-99) , +3, 0.985223, 1, 0, 0.357861,-99) , +10, 1557.73, 1, 0, 0.40661,-99) , +11, 1.5, 0, 0, 0.447436,-99) , +14, -3.25965, 0, 0, 0.507865,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528355,-99) , +10, 4140.94, 1, 0, 0.616903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419534,-99) , +1, 10.5, 0, 0, 0.554323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247218,-99) , +8, -0.62381, 0, 0, 0.52147,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582932,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223858,-99) , +5, 1.92361, 1, 0, 0.325231,-99) , +12, 0.336198, 0, 0, 0.392919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158351,-99) , +8, 0.285041, 0, 0, 0.328771,-99) , +12, 0.100778, 1, 0, 0.413694,-99) , +4, 1.53259, 1, 0, 0.487899,-99) ); + // itree = 370 + fBoostWeights.push_back(0.00593857); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546311,-99) , +2, 19.5, 0, 0, 0.578929,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401217,-99) , +4, 1.60663, 1, 0, 0.508352,-99) , +12, 0.113401, 1, 0, 0.538149,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467608,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309814,-99) , +3, 0.99344, 1, 0, 0.417907,-99) , +12, 0.0313038, 0, 0, 0.527698,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161628,-99) , +5, 1.79109, 1, 0, 0.37965,-99) , +3, 0.999379, 1, 0, 0.51936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318627,-99) , +5, 2.23646, 1, 0, 0.510769,-99) ); + // itree = 371 + fBoostWeights.push_back(0.0107798); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720448,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438892,-99) , +5, 1.99658, 1, 0, 0.625615,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390827,-99) , +16, 834.546, 1, 0, 0.506396,-99) , +8, 0.455242, 1, 0, 0.554055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413522,-99) , +8, -0.880835, 0, 0, 0.539815,-99) , +12, 0.357835, 0, 0, 0.559309,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204905,-99) , +4, 1.79026, 1, 0, 0.504141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313207,-99) , +12, 0.0246211, 0, 0, 0.495114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274228,-99) , +7, 0.134958, 1, 0, 0.486201,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.163962,-99) , +0, 34.5, 1, 0, 0.395369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111298,-99) , +8, 0.803102, 0, 0, 0.298452,-99) , +5, 1.95922, 1, 0, 0.462294,-99) , +11, 1.5, 0, 0, 0.494578,-99) ); + // itree = 372 + fBoostWeights.push_back(0.00574842); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.727043,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484842,-99) , +16, 889.601, 1, 0, 0.515104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200942,-99) , +5, 2.31715, 1, 0, 0.511238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291659,-99) , +13, 0.0337026, 1, 0, 0.503158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303068,-99) , +4, 1.92765, 1, 0, 0.494471,-99) , +12, 0.526395, 0, 0, 0.503151,-99) ); + // itree = 373 + fBoostWeights.push_back(0.00755734); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497444,-99) , +12, 0.110588, 1, 0, 0.531907,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297304,-99) , +9, 0.268651, 0, 0, 0.394988,-99) , +12, 0.0287873, 0, 0, 0.522057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280556,-99) , +3, 0.999668, 1, 0, 0.516595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292116,-99) , +7, 0.145791, 1, 0, 0.508734,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350502,-99) , +8, -0.984542, 0, 0, 0.439101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246097,-99) , +2, 10.5, 0, 0, 0.390437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.65569, 1, 0, 0.369333,-99) , +8, -0.895746, 0, 0, 0.493344,-99) ); + // itree = 374 + fBoostWeights.push_back(0.00458763); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405178,-99) , +8, -0.966885, 0, 0, 0.523227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327576,-99) , +14, -5.57808, 0, 0, 0.517795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310797,-99) , +3, 0.999643, 1, 0, 0.511797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288662,-99) , +12, 0.0175985, 0, 0, 0.506363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316991,-99) , +4, 1.92378, 1, 0, 0.497321,-99) ); + // itree = 375 + fBoostWeights.push_back(0.00452669); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638739,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380836,-99) , +15, 0.0468486, 0, 0, 0.508067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309126,-99) , +13, 0.034847, 1, 0, 0.501124,-99) , +12, 0.414174, 0, 0, 0.510183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309053,-99) , +3, 0.999638, 1, 0, 0.504418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329029,-99) , +5, 2.24516, 1, 0, 0.497002,-99) ); + // itree = 376 + fBoostWeights.push_back(0.00626248); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557853,-99) , +10, -3505.46, 1, 0, 0.573763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447718,-99) , +8, -0.896408, 0, 0, 0.561665,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466924,-99) , +12, 0.113398, 1, 0, 0.506619,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.030284,-99) , +7, 0.047583, 1, 0, 0.4168,-99) , +1, 9.5, 0, 0, 0.486885,-99) , +16, 261.376, 1, 0, 0.511406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283529,-99) , +12, 0.0174853, 0, 0, 0.505447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259546,-99) , +3, 0.999642, 1, 0, 0.498627,-99) ); + // itree = 377 + fBoostWeights.push_back(0.0109844); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.715874,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505884,-99) , +7, 0.06493, 1, 0, 0.590613,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329045,-99) , +7, 0.027372, 1, 0, 0.525326,-99) , +2, 17.5, 0, 0, 0.554438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317523,-99) , +6, 0.796419, 1, 0, 0.419264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161813,-99) , +5, 2.07538, 1, 0, 0.396199,-99) , +12, 0.0312849, 0, 0, 0.527766,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515719,-99) , +1, 18.5, 0, 0, 0.559827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389888,-99) , +8, -0.766073, 0, 0, 0.52617,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128067,-99) , +4, 2.0177, 1, 0, 0.523073,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290827,-99) , +8, 0.607844, 0, 0, 0.36461,-99) , +9, 3.22925, 0, 0, 0.404162,-99) , +4, 0.921158, 1, 0, 0.450798,-99) , +12, 0.127196, 1, 0, 0.491876,-99) , +12, 0.513942, 0, 0, 0.500833,-99) ); + // itree = 378 + fBoostWeights.push_back(0.00861114); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425547,-99) , +5, 2.2106, 1, 0, 0.58282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319313,-99) , +4, 1.7359, 1, 0, 0.471574,-99) , +6, 0.916389, 1, 0, 0.558232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368864,-99) , +14, -5.334, 0, 0, 0.5476,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6827,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339081,-99) , +7, 0.0118921, 0, 0, 0.464266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107449,-99) , +7, 0.162654, 1, 0, 0.45539,-99) , +12, 0.512772, 0, 0, 0.469245,-99) , +12, 0.101366, 1, 0, 0.500559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232305,-99) , +12, 0.0182039, 0, 0, 0.493464,-99) ); + // itree = 379 + fBoostWeights.push_back(0.0107726); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.721168,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433868,-99) , +15, 0.0552864, 0, 0, 0.545099,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249496,-99) , +13, 0.0136862, 1, 0, 0.448331,-99) , +3, 0.998029, 1, 0, 0.528327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254105,-99) , +6, 0.357159, 0, 0, 0.378323,-99) , +14, -4.32592, 0, 0, 0.516939,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363721,-99) , +12, 0.0335924, 0, 0, 0.5247,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343519,-99) , +16, 109.506, 1, 0, 0.396182,-99) , +12, 0.118503, 1, 0, 0.465721,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0469373,-99) , +5, 2.1237, 1, 0, 0.255887,-99) , +14, -2.54026, 1, 0, 0.415574,-99) , +5, 1.77473, 1, 0, 0.48942,-99) , +12, 0.527172, 0, 0, 0.497932,-99) ); + // itree = 380 + fBoostWeights.push_back(0.0094174); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503956,-99) , +6, 0.794152, 1, 0, 0.567891,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422711,-99) , +7, 0.0144275, 0, 0, 0.495398,-99) , +16, 497.042, 1, 0, 0.523315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289566,-99) , +13, 0.0568849, 1, 0, 0.517216,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488222,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272806,-99) , +7, 0.0143187, 1, 0, 0.360985,-99) , +7, 0.0300532, 0, 0, 0.399357,-99) , +14, -4.11385, 0, 0, 0.504042,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609154,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.076503,-99) , +4, 2.10593, 1, 0, 0.41497,-99) , +11, 1.5, 0, 0, 0.49742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.143223,-99) , +8, 0.777545, 0, 0, 0.396412,-99) , +5, 1.99836, 1, 0, 0.490559,-99) ); + // itree = 381 + fBoostWeights.push_back(0.00668731); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.707871,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54474,-99) , +5, 1.22598, 1, 0, 0.566472,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449491,-99) , +8, -0.896165, 0, 0, 0.554008,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436851,-99) , +12, 0.191163, 1, 0, 0.492918,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0939861,-99) , +14, -2.51278, 1, 0, 0.360158,-99) , +5, 1.99059, 1, 0, 0.475933,-99) , +16, 140.368, 1, 0, 0.49815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273565,-99) , +13, 0.0378099, 1, 0, 0.490798,-99) , +12, 0.525198, 0, 0, 0.499256,-99) ); + // itree = 382 + fBoostWeights.push_back(0.00514425); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478444,-99) , +2, 24.5, 0, 0, 0.500312,-99) , +12, 0.414045, 0, 0, 0.508405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336572,-99) , +3, 0.99963, 1, 0, 0.503128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36851,-99) , +2, 7.5, 0, 0, 0.496738,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23418,-99) , +14, -3.92404, 1, 0, 0.330513,-99) , +4, 1.82202, 1, 0, 0.485077,-99) ); + // itree = 383 + fBoostWeights.push_back(0.00857212); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465647,-99) , +5, 1.48656, 1, 0, 0.623672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490245,-99) , +8, 0.809754, 1, 0, 0.573699,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498783,-99) , +16, 9.61178, 1, 0, 0.509706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213999,-99) , +7, 0.0529649, 1, 0, 0.500768,-99) , +2, 29.5, 0, 0, 0.514121,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211063,-99) , +3, 0.992445, 1, 0, 0.371931,-99) , +13, 0.0295666, 1, 0, 0.506386,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273979,-99) , +3, 0.996918, 1, 0, 0.4761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0304252,-99) , +8, 0.74619, 0, 0, 0.375292,-99) , +5, 2.12025, 1, 0, 0.496443,-99) ); + // itree = 384 + fBoostWeights.push_back(0.00893319); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544987,-99) , +1, 15.5, 0, 0, 0.59577,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41834,-99) , +5, 1.30677, 0, 0, 0.518263,-99) , +13, 0.00150225, 0, 0, 0.560232,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462009,-99) , +16, 2391.12, 1, 0, 0.505771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305318,-99) , +7, 0.0904071, 1, 0, 0.491903,-99) , +12, 0.101569, 1, 0, 0.520527,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254027,-99) , +12, 0.0742125, 0, 0, 0.381345,-99) , +14, -4.60204, 0, 0, 0.511326,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611088,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330003,-99) , +5, 2.1021, 1, 0, 0.417759,-99) , +8, 0.996893, 0, 0, 0.484911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20519,-99) , +8, 0.74611, 0, 0, 0.406435,-99) , +5, 1.97497, 1, 0, 0.49681,-99) ); + // itree = 385 + fBoostWeights.push_back(0.00839819); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492176,-99) , +5, 1.10903, 0, 0, 0.579582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219076,-99) , +5, 2.24473, 1, 0, 0.573158,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361198,-99) , +15, 0.359824, 0, 0, 0.456637,-99) , +14, -4.11859, 0, 0, 0.552601,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62446,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44281,-99) , +16, 457.224, 1, 0, 0.472883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222163,-99) , +5, 2.12189, 1, 0, 0.454985,-99) , +12, 0.446102, 0, 0, 0.471187,-99) , +12, 0.100542, 1, 0, 0.503715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230163,-99) , +12, 0.0181734, 0, 0, 0.496886,-99) ); + // itree = 386 + fBoostWeights.push_back(0.00657478); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621702,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51863,-99) , +9, -3.29502, 1, 0, 0.542009,-99) , +6, 0.170762, 1, 0, 0.559808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337064,-99) , +5, 2.24548, 1, 0, 0.549973,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379112,-99) , +1, 18.5, 0, 0, 0.605479,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314601,-99) , +5, 2.12685, 1, 0, 0.47193,-99) , +2, 30.5, 0, 0, 0.492698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272981,-99) , +0, 98.5, 1, 0, 0.485739,-99) , +16, 438.034, 1, 0, 0.509663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250127,-99) , +3, 0.999646, 1, 0, 0.502935,-99) ); + // itree = 387 + fBoostWeights.push_back(0.00680824); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540963,-99) , +2, 24.5, 0, 0, 0.565612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438396,-99) , +12, 0.0336111, 0, 0, 0.551805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350709,-99) , +7, 0.145303, 1, 0, 0.543524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401273,-99) , +8, -0.921412, 0, 0, 0.530005,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60775,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366217,-99) , +4, 1.6364, 1, 0, 0.473859,-99) , +6, 0.478355, 1, 0, 0.537859,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33519,-99) , +13, 0.0201012, 1, 0, 0.476798,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340487,-99) , +12, 0.289739, 0, 0, 0.380565,-99) , +7, 0.0144709, 0, 0, 0.446167,-99) , +10, -648.898, 1, 0, 0.467732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27345,-99) , +5, 2.21116, 1, 0, 0.459682,-99) , +16, 2412.1, 1, 0, 0.496677,-99) ); + // itree = 388 + fBoostWeights.push_back(0.00709248); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709156,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445766,-99) , +1, 11.5, 0, 0, 0.586337,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390693,-99) , +5, 1.99604, 1, 0, 0.497189,-99) , +6, 0.161929, 1, 0, 0.517022,-99) , +15, 0.0455975, 1, 0, 0.526622,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416106,-99) , +8, 0.901572, 1, 0, 0.50078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281872,-99) , +0, 15.5, 1, 0, 0.479968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292079,-99) , +8, -0.552335, 0, 0, 0.443869,-99) , +7, 0.0135756, 0, 0, 0.50629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267855,-99) , +3, 0.999674, 1, 0, 0.50105,-99) ); + // itree = 389 + fBoostWeights.push_back(0.00991124); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.715576,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469952,-99) , +9, 1.16888, 1, 0, 0.585448,-99) , +10, -1550.59, 1, 0, 0.614638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233181,-99) , +1, 13.5, 0, 0, 0.592489,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402522,-99) , +7, 0.035781, 1, 0, 0.500117,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118121,-99) , +8, 0.919372, 0, 0, 0.311719,-99) , +5, 2.11381, 1, 0, 0.485829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102521,-99) , +7, 0.0646808, 1, 0, 0.477927,-99) , +2, 28.5, 0, 0, 0.50155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240955,-99) , +7, 0.190686, 1, 0, 0.496207,-99) ); + // itree = 390 + fBoostWeights.push_back(0.00841024); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693815,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447407,-99) , +2, 11.5, 0, 0, 0.56289,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537476,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386848,-99) , +15, 0.286258, 1, 0, 0.465249,-99) , +13, 0.00206398, 0, 0, 0.530285,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40159,-99) , +1, 9.5, 0, 0, 0.483694,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114476,-99) , +7, 0.0663312, 1, 0, 0.283344,-99) , +13, 0.00946691, 1, 0, 0.458162,-99) , +5, 1.44948, 1, 0, 0.489672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261974,-99) , +3, 0.999691, 1, 0, 0.483625,-99) , +12, 0.525387, 0, 0, 0.490833,-99) ); + // itree = 391 + fBoostWeights.push_back(0.00777768); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660279,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448185,-99) , +8, 0.982186, 1, 0, 0.536456,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403259,-99) , +5, 1.5655, 1, 0, 0.470117,-99) , +16, 1339.6, 1, 0, 0.502048,-99) , +12, 0.462593, 0, 0, 0.50878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211269,-99) , +13, 0.0813737, 1, 0, 0.503933,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.11409,-99) , +13, 0.000194075, 1, 0, 0.324445,-99) , +5, 2.12681, 1, 0, 0.491642,-99) ); + // itree = 392 + fBoostWeights.push_back(0.00688898); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.698778,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462245,-99) , +12, 0.0368807, 0, 0, 0.547968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378675,-99) , +8, 0.992269, 1, 0, 0.532864,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409441,-99) , +5, 1.64996, 1, 0, 0.471668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278784,-99) , +7, 0.00867618, 0, 0, 0.459446,-99) , +12, 0.112229, 1, 0, 0.494165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245029,-99) , +5, 2.35078, 1, 0, 0.488362,-99) , +12, 0.513211, 0, 0, 0.497088,-99) ); + // itree = 393 + fBoostWeights.push_back(0.00852614); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.766592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556448,-99) , +4, 1.80362, 0, 0, 0.579288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184572,-99) , +1, 10.5, 0, 0, 0.562922,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129193,-99) , +5, 2.42123, 1, 0, 0.492362,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188427,-99) , +7, 0.0447794, 1, 0, 0.478533,-99) , +2, 24.5, 0, 0, 0.500525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220846,-99) , +7, 0.209536, 1, 0, 0.496228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250431,-99) , +2, 6.5, 0, 0, 0.491199,-99) ); + // itree = 394 + fBoostWeights.push_back(0.00997464); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667191,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503168,-99) , +4, 0.456738, 1, 0, 0.58471,-99) , +10, 1891.28, 1, 0, 0.615191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483597,-99) , +7, 0.0134176, 0, 0, 0.585347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462348,-99) , +3, 0.997152, 1, 0, 0.562055,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.722471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542424,-99) , +11, 1.5, 0, 0, 0.613951,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440459,-99) , +8, 0.692747, 1, 0, 0.515704,-99) , +4, 1.50129, 0, 0, 0.547599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278667,-99) , +12, 0.0191634, 0, 0, 0.528361,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326797,-99) , +15, 0.153592, 1, 0, 0.521768,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412182,-99) , +9, 4.8073, 0, 0, 0.437052,-99) , +12, 0.239549, 0, 0, 0.470196,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166328,-99) , +8, 0.890796, 0, 0, 0.308197,-99) , +5, 1.92664, 1, 0, 0.445293,-99) , +12, 0.100927, 1, 0, 0.481415,-99) , +6, 0.171873, 1, 0, 0.500434,-99) ); + // itree = 395 + fBoostWeights.push_back(0.0100444); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.731094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238067,-99) , +1, 11.5, 0, 0, 0.600808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336394,-99) , +12, 0.033604, 0, 0, 0.567753,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380401,-99) , +5, 1.97708, 1, 0, 0.482403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109057,-99) , +7, 0.0510567, 1, 0, 0.471447,-99) , +2, 24.5, 0, 0, 0.495638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103564,-99) , +7, 0.252459, 1, 0, 0.491539,-99) , +12, 0.526395, 0, 0, 0.500087,-99) ); + // itree = 396 + fBoostWeights.push_back(0.00719499); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54434,-99) , +2, 18.5, 0, 0, 0.579512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468099,-99) , +12, 0.0312135, 0, 0, 0.566911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35679,-99) , +3, 0.99887, 1, 0, 0.549413,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492649,-99) , +6, 0.342378, 1, 0, 0.564564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434043,-99) , +8, 0.855291, 1, 0, 0.531338,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413342,-99) , +9, -1.21997, 1, 0, 0.446318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293699,-99) , +8, -0.946263, 0, 0, 0.435743,-99) , +4, 0.844913, 1, 0, 0.468758,-99) , +16, 238.74, 1, 0, 0.494996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23771,-99) , +13, 0.049743, 1, 0, 0.488464,-99) ); + // itree = 397 + fBoostWeights.push_back(0.00775431); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559762,-99) , +2, 12.5, 0, 0, 0.619231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516591,-99) , +13, 0.0101037, 1, 0, 0.593224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429391,-99) , +8, 0.966879, 1, 0, 0.570938,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609116,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457023,-99) , +12, 0.101397, 1, 0, 0.490449,-99) , +6, 1.03548, 0, 0, 0.511424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410012,-99) , +4, 0.460716, 0, 0, 0.500858,-99) , +6, 0.298514, 1, 0, 0.523858,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461213,-99) , +2, 18.5, 0, 0, 0.495876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219153,-99) , +3, 0.999201, 1, 0, 0.484313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253277,-99) , +1, 7.5, 0, 0, 0.46612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247594,-99) , +13, 0.0119869, 1, 0, 0.445217,-99) , +5, 1.67567, 1, 0, 0.495187,-99) ); + // itree = 398 + fBoostWeights.push_back(0.00756827); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666403,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384454,-99) , +1, 64.5, 1, 0, 0.530534,-99) , +10, -2016.71, 1, 0, 0.552719,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465584,-99) , +12, 0.104274, 1, 0, 0.502548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131202,-99) , +7, 0.0485289, 1, 0, 0.485494,-99) , +1, 14.5, 0, 0, 0.516635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349439,-99) , +5, 2.20942, 1, 0, 0.508462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277272,-99) , +3, 0.999637, 1, 0, 0.501797,-99) ); + // itree = 399 + fBoostWeights.push_back(0.0101619); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629011,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480818,-99) , +5, 0.797129, 0, 0, 0.570367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471913,-99) , +2, 10.5, 0, 0, 0.548848,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429578,-99) , +6, 0.616226, 1, 0, 0.51608,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319158,-99) , +7, 0.018518, 0, 0, 0.423971,-99) , +16, 1044.56, 1, 0, 0.46857,-99) , +8, 0.44746, 1, 0, 0.517435,-99) , +6, 0.0997689, 1, 0, 0.531642,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490372,-99) , +4, 1.36214, 0, 0, 0.573957,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307187,-99) , +4, 1.82873, 1, 0, 0.460299,-99) , +16, 527.384, 1, 0, 0.508628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259461,-99) , +15, 1.32839, 1, 0, 0.495771,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335098,-99) , +7, 0.0157179, 0, 0, 0.450115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22601,-99) , +7, 0.0566486, 1, 0, 0.408346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138235,-99) , +5, 1.96509, 1, 0, 0.34734,-99) , +13, 0.00399197, 1, 0, 0.460279,-99) , +5, 1.60429, 1, 0, 0.500718,-99) ); + // itree = 400 + fBoostWeights.push_back(0.00777214); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553241,-99) , +9, -2.32378, 1, 0, 0.573964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453613,-99) , +8, 0.979895, 1, 0, 0.554376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415929,-99) , +8, -0.924572, 0, 0, 0.540627,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444129,-99) , +12, 0.182337, 1, 0, 0.517392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396539,-99) , +8, 0.914198, 1, 0, 0.499018,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383005,-99) , +7, 0.011267, 0, 0, 0.481555,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0884142,-99) , +5, 2.12991, 1, 0, 0.329394,-99) , +13, 0.000876582, 1, 0, 0.410221,-99) , +5, 1.60383, 1, 0, 0.463484,-99) , +16, 471.406, 1, 0, 0.493221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214912,-99) , +4, 2.06707, 1, 0, 0.487462,-99) ); + // itree = 401 + fBoostWeights.push_back(0.00618979); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585896,-99) , +15, 0.179822, 0, 0, 0.645053,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456238,-99) , +15, 0.453247, 1, 0, 0.54799,-99) , +3, 0.982567, 1, 0, 0.593018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448099,-99) , +16, 1.56359, 0, 0, 0.573804,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681422,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455722,-99) , +2, 17.5, 0, 0, 0.48932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247194,-99) , +13, 0.037838, 1, 0, 0.481969,-99) , +12, 0.513942, 0, 0, 0.489901,-99) , +16, 67.046, 1, 0, 0.509271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299305,-99) , +3, 0.999638, 1, 0, 0.50295,-99) ); + // itree = 402 + fBoostWeights.push_back(0.00475719); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500924,-99) , +12, 0.123431, 1, 0, 0.529773,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.64681, 1, 0, 0.427304,-99) , +8, -0.916087, 0, 0, 0.519957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29884,-99) , +7, 0.00739766, 0, 0, 0.514104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284575,-99) , +12, 0.0159776, 0, 0, 0.509335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27588,-99) , +13, 0.0566644, 1, 0, 0.504105,-99) ); + // itree = 403 + fBoostWeights.push_back(0.00587719); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685754,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35136,-99) , +12, 0.0191568, 0, 0, 0.527315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304563,-99) , +13, 0.0256094, 1, 0, 0.520915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408927,-99) , +5, 1.44998, 1, 0, 0.454827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267995,-99) , +8, -0.906334, 0, 0, 0.438299,-99) , +12, 0.196919, 1, 0, 0.498614,-99) , +12, 0.508865, 0, 0, 0.505467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268175,-99) , +4, 2.02296, 1, 0, 0.498685,-99) ); + // itree = 404 + fBoostWeights.push_back(0.00906912); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68556,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49248,-99) , +7, 0.0570926, 1, 0, 0.580493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381888,-99) , +1, 11.5, 0, 0, 0.48432,-99) , +13, 0.000841798, 0, 0, 0.548039,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418496,-99) , +13, 0.0114162, 1, 0, 0.507706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232334,-99) , +13, 0.00508767, 1, 0, 0.40484,-99) , +5, 1.64477, 1, 0, 0.475547,-99) , +11, 1.5, 0, 0, 0.499424,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195368,-99) , +14, -4.06208, 1, 0, 0.351279,-99) , +5, 2.09733, 1, 0, 0.48755,-99) , +12, 0.526742, 0, 0, 0.494868,-99) ); + // itree = 405 + fBoostWeights.push_back(0.00780031); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513612,-99) , +6, 0.521864, 1, 0, 0.562521,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407553,-99) , +13, 0.00267602, 1, 0, 0.489592,-99) , +5, 1.48905, 1, 0, 0.522149,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298433,-99) , +1, 11.5, 0, 0, 0.420256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0751807,-99) , +5, 2.03775, 1, 0, 0.402231,-99) , +8, -0.911487, 0, 0, 0.51088,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456684,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112059,-99) , +5, 1.59947, 1, 0, 0.354831,-99) , +3, 0.99938, 1, 0, 0.50202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247131,-99) , +12, 0.0165266, 0, 0, 0.496594,-99) ); + // itree = 406 + fBoostWeights.push_back(0.0117174); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577507,-99) , +16, 162.219, 0, 0, 0.633993,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280482,-99) , +5, 2.22959, 1, 0, 0.574747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36765,-99) , +8, -0.921328, 0, 0, 0.548067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367192,-99) , +5, 1.97056, 0, 0, 0.43065,-99) , +8, 0.920467, 1, 0, 0.515215,-99) , +0, 31.5, 0, 0, 0.546117,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511544,-99) , +8, 0.72058, 1, 0, 0.580526,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320485,-99) , +2, 8.5, 0, 0, 0.45878,-99) , +12, 0.103437, 1, 0, 0.504576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358041,-99) , +12, 0.0335996, 0, 0, 0.491417,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634908,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260745,-99) , +13, 0.00397871, 1, 0, 0.403625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155264,-99) , +5, 1.98501, 1, 0, 0.336934,-99) , +8, 0.995278, 0, 0, 0.3884,-99) , +4, 1.46052, 1, 0, 0.465935,-99) , +11, 1.5, 0, 0, 0.492292,-99) ); + // itree = 407 + fBoostWeights.push_back(0.00828444); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687994,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555012,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312665,-99) , +1, 69.5, 1, 0, 0.539438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200256,-99) , +1, 8.5, 0, 0, 0.528075,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239675,-99) , +7, 0.0360529, 1, 0, 0.468371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165567,-99) , +5, 2.24285, 1, 0, 0.456181,-99) , +2, 17.5, 0, 0, 0.485878,-99) , +12, 0.521876, 0, 0, 0.492979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0816428,-99) , +7, 0.253231, 1, 0, 0.489149,-99) ); + // itree = 408 + fBoostWeights.push_back(0.00718088); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483867,-99) , +14, -4.11378, 0, 0, 0.568793,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429246,-99) , +7, 0.0132689, 0, 0, 0.503978,-99) , +12, 0.105166, 1, 0, 0.530428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401492,-99) , +12, 0.0259878, 0, 0, 0.522677,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549723,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301522,-99) , +0, 13.5, 1, 0, 0.404064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0523276,-99) , +3, 0.911102, 0, 0, 0.367058,-99) , +12, 0.0712054, 1, 0, 0.429255,-99) , +4, 1.69459, 1, 0, 0.511113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204476,-99) , +3, 0.999633, 1, 0, 0.503463,-99) ); + // itree = 409 + fBoostWeights.push_back(0.00550514); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506247,-99) , +2, 30.5, 0, 0, 0.522577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301976,-99) , +3, 0.999638, 1, 0, 0.516354,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376318,-99) , +10, 3247.72, 1, 0, 0.435735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269401,-99) , +8, 0.879139, 1, 0, 0.390904,-99) , +12, 0.0313553, 0, 0, 0.505622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252853,-99) , +7, 0.00714633, 0, 0, 0.500386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288151,-99) , +7, 0.143679, 1, 0, 0.493513,-99) ); + // itree = 410 + fBoostWeights.push_back(0.0108494); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573092,-99) , +7, 0.0197626, 1, 0, 0.61747,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510368,-99) , +4, 1.48656, 0, 0, 0.54415,-99) , +10, 2328.89, 1, 0, 0.57735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 2.06329, 1, 0, 0.570069,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423106,-99) , +5, 2.0218, 0, 0, 0.479364,-99) , +14, -3.62578, 0, 0, 0.548012,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608833,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421287,-99) , +3, 0.964496, 0, 0, 0.509686,-99) , +6, 0.24871, 1, 0, 0.538484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437818,-99) , +12, 0.330186, 0, 0, 0.461738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252899,-99) , +7, 0.0786057, 1, 0, 0.443936,-99) , +12, 0.0996278, 1, 0, 0.484001,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448948,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0716834,-99) , +4, 1.80601, 1, 0, 0.244997,-99) , +14, -3.79757, 1, 0, 0.325631,-99) , +5, 1.88647, 1, 0, 0.456928,-99) , +11, 1.5, 0, 0, 0.488157,-99) ); + // itree = 411 + fBoostWeights.push_back(0.00638667); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695178,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310398,-99) , +4, 2.01621, 1, 0, 0.554904,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274085,-99) , +5, 2.13018, 1, 0, 0.469612,-99) , +12, 0.101394, 1, 0, 0.501923,-99) , +12, 0.526826, 0, 0, 0.509374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0696953,-99) , +7, 0.253231, 1, 0, 0.505659,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305669,-99) , +9, 0.412336, 0, 0, 0.367921,-99) , +12, 0.0305522, 0, 0, 0.49436,-99) ); + // itree = 412 + fBoostWeights.push_back(0.00781553); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489031,-99) , +12, 0.0312133, 0, 0, 0.578871,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391132,-99) , +7, 0.0561909, 1, 0, 0.505954,-99) , +12, 0.114785, 1, 0, 0.540241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319429,-99) , +14, -5.30089, 0, 0, 0.5313,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270004,-99) , +7, 0.135224, 1, 0, 0.494502,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323988,-99) , +12, 0.0329367, 0, 0, 0.478662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271079,-99) , +3, 0.885649, 0, 0, 0.463803,-99) , +6, 0.767118, 1, 0, 0.50983,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17401,-99) , +8, 0.946429, 0, 0, 0.37474,-99) , +5, 2.09734, 1, 0, 0.498808,-99) ); + // itree = 413 + fBoostWeights.push_back(0.00581651); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442063,-99) , +14, -4.10221, 0, 0, 0.562614,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459246,-99) , +12, 0.118339, 1, 0, 0.495115,-99) , +11, 1.5, 0, 0, 0.5168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291275,-99) , +2, 6.5, 0, 0, 0.511938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296232,-99) , +4, 1.99485, 1, 0, 0.505191,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148956,-99) , +1, 21.5, 0, 0, 0.345697,-99) , +15, 1.711, 1, 0, 0.495302,-99) ); + // itree = 414 + fBoostWeights.push_back(0.00471795); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654726,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526908,-99) , +9, 5.73081, 0, 0, 0.542702,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446411,-99) , +5, 1.97502, 0, 0, 0.469808,-99) , +14, -3.37695, 0, 0, 0.524115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293368,-99) , +2, 6.5, 0, 0, 0.519445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339403,-99) , +7, 0.143906, 1, 0, 0.513394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331943,-99) , +5, 2.23542, 1, 0, 0.505972,-99) ); + // itree = 415 + fBoostWeights.push_back(0.006173); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493005,-99) , +15, 0.660247, 1, 0, 0.575029,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337746,-99) , +5, 2.02718, 1, 0, 0.493255,-99) , +15, 0.101426, 0, 0, 0.555731,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407888,-99) , +3, 0.999161, 1, 0, 0.54632,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467248,-99) , +5, 1.56396, 1, 0, 0.540422,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472503,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201573,-99) , +0, 23.5, 1, 0, 0.458659,-99) , +2, 18.5, 0, 0, 0.485218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320918,-99) , +7, 0.105549, 1, 0, 0.47638,-99) , +16, 462.883, 1, 0, 0.502732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329163,-99) , +8, -0.984375, 0, 0, 0.49572,-99) ); + // itree = 416 + fBoostWeights.push_back(0.00615044); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517467,-99) , +12, 0.450253, 0, 0, 0.524805,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191956,-99) , +13, 0.000887603, 1, 0, 0.417305,-99) , +4, 1.76956, 1, 0, 0.515133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255784,-99) , +3, 0.999733, 1, 0, 0.510144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271185,-99) , +7, 0.00728829, 0, 0, 0.504869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268854,-99) , +12, 0.018167, 0, 0, 0.499005,-99) ); + // itree = 417 + fBoostWeights.push_back(0.0110358); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519459,-99) , +13, 0.00393147, 0, 0, 0.584257,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44531,-99) , +2, 12.5, 0, 0, 0.49367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329768,-99) , +3, 0.99802, 1, 0, 0.477446,-99) , +10, 11651.3, 0, 0, 0.491137,-99) , +10, -3549.6, 1, 0, 0.50499,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32393,-99) , +5, 2.30856, 1, 0, 0.582348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393896,-99) , +8, 0.987968, 1, 0, 0.53504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299609,-99) , +8, -0.653876, 0, 0, 0.511373,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34523,-99) , +12, 0.0406227, 0, 0, 0.465747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302217,-99) , +13, 0.0015407, 1, 0, 0.426084,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519716,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0172331,-99) , +1, 8.5, 0, 0, 0.242053,-99) , +12, 0.414272, 0, 0, 0.286366,-99) , +12, 0.114439, 1, 0, 0.345046,-99) , +11, 1.5, 0, 0, 0.408571,-99) , +5, 1.73916, 1, 0, 0.476491,-99) ); + // itree = 418 + fBoostWeights.push_back(0.0125282); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720373,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495729,-99) , +13, 0.00218502, 0, 0, 0.583243,-99) , +4, 1.7314, 0, 0, 0.597687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459114,-99) , +3, 0.99785, 1, 0, 0.571833,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491022,-99) , +6, 0.162395, 1, 0, 0.527985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.2109, 1, 0, 0.51299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140523,-99) , +1, 31.5, 1, 0, 0.484616,-99) , +2, 24.5, 0, 0, 0.532939,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416643,-99) , +8, -0.925994, 0, 0, 0.517837,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33111,-99) , +9, -0.355504, 1, 0, 0.393639,-99) , +8, 0.935163, 1, 0, 0.497467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607287,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263911,-99) , +5, 2.08847, 1, 0, 0.367113,-99) , +12, 0.392319, 0, 0, 0.400538,-99) , +5, 1.80889, 1, 0, 0.47156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183425,-99) , +7, 0.0391863, 1, 0, 0.450649,-99) , +1, 15.5, 0, 0, 0.486015,-99) ); + // itree = 419 + fBoostWeights.push_back(0.00739671); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680251,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408345,-99) , +14, -4.43787, 0, 0, 0.542717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392708,-99) , +13, 0.0177675, 1, 0, 0.529282,-99) , +15, 0.0484435, 1, 0, 0.545995,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400097,-99) , +7, 0.0588509, 1, 0, 0.492943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295955,-99) , +3, 0.7483, 0, 0, 0.485918,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125852,-99) , +8, 0.913979, 0, 0, 0.320235,-99) , +4, 1.73709, 1, 0, 0.472012,-99) , +11, 1.5, 0, 0, 0.497298,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159396,-99) , +4, 2.16145, 1, 0, 0.493547,-99) ); + // itree = 420 + fBoostWeights.push_back(0.00708333); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665644,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32731,-99) , +5, 2.02692, 1, 0, 0.557039,-99) , +12, 0.285232, 0, 0, 0.575055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43766,-99) , +13, 0.00013174, 0, 0, 0.551903,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39818,-99) , +12, 0.03128, 0, 0, 0.525541,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196915,-99) , +7, 0.0936519, 1, 0, 0.450021,-99) , +12, 0.099569, 1, 0, 0.481461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227369,-99) , +5, 2.21067, 1, 0, 0.475661,-99) , +11, 1.5, 0, 0, 0.500964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292854,-99) , +4, 1.98841, 1, 0, 0.493932,-99) ); + // itree = 421 + fBoostWeights.push_back(0.00889999); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649548,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429353,-99) , +13, 0.014723, 1, 0, 0.533844,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340877,-99) , +6, 0.397847, 0, 0, 0.415862,-99) , +8, 0.982976, 1, 0, 0.519264,-99) , +12, 0.41418, 0, 0, 0.527828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378771,-99) , +5, 0.457354, 0, 0, 0.520221,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482188,-99) , +13, 0.00154017, 1, 0, 0.580859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351629,-99) , +12, 0.031568, 0, 0, 0.522011,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613372,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481382,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0426908,-99) , +5, 2.08133, 1, 0, 0.269388,-99) , +8, 0.984207, 0, 0, 0.325249,-99) , +12, 0.454146, 0, 0, 0.362096,-99) , +12, 0.0939697, 1, 0, 0.426483,-99) , +4, 1.56018, 1, 0, 0.502394,-99) ); + // itree = 422 + fBoostWeights.push_back(0.00495846); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235794,-99) , +5, 2.27321, 1, 0, 0.539197,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39709,-99) , +7, 0.0134325, 0, 0, 0.477911,-99) , +12, 0.113902, 1, 0, 0.505157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325272,-99) , +12, 0.0195631, 0, 0, 0.499506,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 1.92023, 1, 0, 0.359401,-99) , +8, -0.974139, 0, 0, 0.492054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270118,-99) , +7, 0.00714105, 0, 0, 0.487466,-99) ); + // itree = 423 + fBoostWeights.push_back(0.00479034); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51212,-99) , +12, 0.513942, 0, 0, 0.518132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258465,-99) , +3, 0.999693, 1, 0, 0.513191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278171,-99) , +1, 77.5, 1, 0, 0.507884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193327,-99) , +5, 2.44869, 1, 0, 0.50372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253744,-99) , +12, 0.0178106, 0, 0, 0.497686,-99) ); + // itree = 424 + fBoostWeights.push_back(0.0107117); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379883,-99) , +7, 0.00922733, 0, 0, 0.528514,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138374,-99) , +5, 1.43996, 1, 0, 0.386559,-99) , +13, 0.0202362, 1, 0, 0.513302,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50558,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299431,-99) , +15, 0.37089, 0, 0, 0.358845,-99) , +4, 0.808926, 1, 0, 0.413709,-99) , +14, -3.65587, 0, 0, 0.497964,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442973,-99) , +9, -1.91376, 1, 0, 0.489308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250347,-99) , +1, 8.5, 0, 0, 0.45706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101553,-99) , +6, 0.700299, 1, 0, 0.220752,-99) , +13, 0.00222397, 1, 0, 0.396244,-99) , +5, 1.82276, 1, 0, 0.474328,-99) , +12, 0.522667, 0, 0, 0.482228,-99) ); + // itree = 425 + fBoostWeights.push_back(0.0046449); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502859,-99) , +16, 171.482, 1, 0, 0.523979,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114297,-99) , +4, 1.64355, 1, 0, 0.420516,-99) , +8, -0.895746, 0, 0, 0.512678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319806,-99) , +3, 0.99963, 1, 0, 0.506605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262096,-99) , +2, 6.5, 0, 0, 0.501769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255111,-99) , +4, 2.07372, 1, 0, 0.496861,-99) ); + // itree = 426 + fBoostWeights.push_back(0.00561292); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697952,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440098,-99) , +8, 0.965605, 1, 0, 0.508965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267925,-99) , +12, 0.0159776, 0, 0, 0.503309,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252429,-99) , +15, 0.0699479, 0, 0, 0.358146,-99) , +7, 0.00884872, 0, 0, 0.493385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311748,-99) , +13, 0.0314184, 1, 0, 0.485734,-99) , +12, 0.537257, 0, 0, 0.493116,-99) ); + // itree = 427 + fBoostWeights.push_back(0.00500017); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674933,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483228,-99) , +16, 76.4557, 1, 0, 0.503461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305693,-99) , +12, 0.0198115, 0, 0, 0.496926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196857,-99) , +13, 0.0560738, 1, 0, 0.491418,-99) , +12, 0.513211, 0, 0, 0.498299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259792,-99) , +7, 0.00714633, 0, 0, 0.493145,-99) ); + // itree = 428 + fBoostWeights.push_back(0.00484543); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675015,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293238,-99) , +1, 66.5, 1, 0, 0.504728,-99) , +12, 0.523213, 0, 0, 0.5114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275023,-99) , +7, 0.00711374, 0, 0, 0.5067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2391,-99) , +7, 0.209058, 1, 0, 0.50241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111726,-99) , +4, 2.15252, 1, 0, 0.497825,-99) ); + // itree = 429 + fBoostWeights.push_back(0.00882134); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48787,-99) , +6, 0.914749, 1, 0, 0.567835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432131,-99) , +8, 0.990588, 1, 0, 0.553757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361271,-99) , +12, 0.0198085, 0, 0, 0.540102,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48447,-99) , +2, 20.5, 0, 0, 0.520788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381537,-99) , +3, 0.998851, 1, 0, 0.506653,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258378,-99) , +8, 0.147883, 0, 0, 0.424608,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0429437,-99) , +0, 55.5, 1, 0, 0.400699,-99) , +5, 1.65089, 1, 0, 0.467232,-99) , +12, 0.113336, 1, 0, 0.502453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281778,-99) , +5, 2.31646, 1, 0, 0.496437,-99) ); + // itree = 430 + fBoostWeights.push_back(0.00691534); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653426,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552194,-99) , +0, 31.5, 0, 0, 0.57852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460201,-99) , +3, 0.995142, 1, 0, 0.553808,-99) , +10, -1630.28, 1, 0, 0.572255,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618866,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649116,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358557,-99) , +9, -0.192694, 1, 0, 0.425241,-99) , +5, 1.94179, 0, 0, 0.460508,-99) , +12, 0.234518, 0, 0, 0.495155,-99) , +6, 0.671646, 1, 0, 0.545485,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540465,-99) , +9, 7.74006, 0, 0, 0.578692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426117,-99) , +13, 0.010952, 1, 0, 0.556006,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45816,-99) , +10, 9294.28, 0, 0, 0.474035,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215234,-99) , +5, 1.72648, 1, 0, 0.362348,-99) , +1, 8.5, 0, 0, 0.460387,-99) , +9, 3.95621, 0, 0, 0.478315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194599,-99) , +4, 2.07717, 1, 0, 0.472889,-99) , +16, 272.755, 1, 0, 0.497129,-99) ); + // itree = 431 + fBoostWeights.push_back(0.0048299); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661404,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382267,-99) , +8, -0.969753, 0, 0, 0.503598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269958,-99) , +2, 6.5, 0, 0, 0.498711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151697,-99) , +13, 0.0693277, 1, 0, 0.494364,-99) , +12, 0.507497, 0, 0, 0.500904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276657,-99) , +4, 1.9682, 1, 0, 0.492884,-99) ); + // itree = 432 + fBoostWeights.push_back(0.0111577); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55406,-99) , +9, 4.55636, 0, 0, 0.57409,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365369,-99) , +3, 0.998917, 1, 0, 0.502998,-99) , +6, 0.662858, 1, 0, 0.543185,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462574,-99) , +14, -4.05189, 1, 0, 0.514471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35486,-99) , +12, 0.0945094, 0, 0, 0.456466,-99) , +8, 0.935957, 1, 0, 0.528215,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372133,-99) , +2, 7.5, 0, 0, 0.52186,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46693,-99) , +8, 0.983868, 1, 0, 0.590438,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290016,-99) , +0, 29.5, 1, 0, 0.45991,-99) , +11, 1.5, 0, 0, 0.515159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262726,-99) , +3, 0.998756, 1, 0, 0.496401,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549093,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302142,-99) , +1, 10.5, 0, 0, 0.453923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196841,-99) , +7, 0.0262374, 1, 0, 0.398253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.104278,-99) , +4, 1.75844, 1, 0, 0.315411,-99) , +8, 0.798939, 0, 0, 0.42649,-99) , +5, 1.79363, 1, 0, 0.497431,-99) ); + // itree = 433 + fBoostWeights.push_back(0.00682194); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703611,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45509,-99) , +12, 0.0314222, 0, 0, 0.545322,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416878,-99) , +5, 1.42827, 1, 0, 0.465151,-99) , +12, 0.125936, 1, 0, 0.507595,-99) , +12, 0.521669, 0, 0, 0.515495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270168,-99) , +3, 0.999634, 1, 0, 0.508586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141993,-99) , +5, 2.4484, 1, 0, 0.503997,-99) ); + // itree = 434 + fBoostWeights.push_back(0.00686842); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47544,-99) , +13, 0.00014558, 0, 0, 0.585981,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460921,-99) , +4, 1.29357, 1, 0, 0.514811,-99) , +9, 3.31279, 0, 0, 0.530477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356858,-99) , +3, 0.999613, 1, 0, 0.524998,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472218,-99) , +10, 5782.72, 0, 0, 0.535709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189311,-99) , +13, 0.000481965, 1, 0, 0.417519,-99) , +5, 2.03673, 1, 0, 0.513443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273461,-99) , +13, 0.0552021, 1, 0, 0.507968,-99) ); + // itree = 435 + fBoostWeights.push_back(0.00701166); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437857,-99) , +14, -4.64009, 0, 0, 0.529222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387241,-99) , +7, 0.00796254, 0, 0, 0.523222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387397,-99) , +13, 0.0288197, 1, 0, 0.516064,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204226,-99) , +7, 0.0122174, 0, 0, 0.491436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0551519,-99) , +13, 0.000845332, 1, 0, 0.371178,-99) , +4, 1.83293, 1, 0, 0.505513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289835,-99) , +8, -0.987864, 0, 0, 0.497245,-99) ); + // itree = 436 + fBoostWeights.push_back(0.00962744); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.689968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58227,-99) , +12, 0.126166, 1, 0, 0.642696,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364755,-99) , +5, 1.39001, 1, 0, 0.516374,-99) , +7, 0.0801436, 1, 0, 0.600941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419178,-99) , +12, 0.0335701, 0, 0, 0.578424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253057,-99) , +1, 13.5, 0, 0, 0.551971,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61211,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50921,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406063,-99) , +8, 0.977819, 1, 0, 0.493704,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156043,-99) , +8, -0.489784, 0, 0, 0.345047,-99) , +15, 0.0456993, 0, 0, 0.479793,-99) , +12, 0.422566, 0, 0, 0.488914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150305,-99) , +7, 0.0498293, 1, 0, 0.477751,-99) , +2, 24.5, 0, 0, 0.49716,-99) ); + // itree = 437 + fBoostWeights.push_back(0.00908841); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491145,-99) , +6, 0.909491, 1, 0, 0.557444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297696,-99) , +3, 0.998736, 1, 0, 0.466074,-99) , +13, 0.00798387, 1, 0, 0.529152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546163,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341514,-99) , +3, 0.972176, 1, 0, 0.40088,-99) , +4, 1.54283, 0, 0, 0.440095,-99) , +14, -3.87081, 0, 0, 0.516301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301193,-99) , +12, 0.0182039, 0, 0, 0.510781,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363159,-99) , +15, 0.190847, 0, 0, 0.515302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1321,-99) , +8, 0.946344, 0, 0, 0.367979,-99) , +5, 2.09036, 1, 0, 0.498888,-99) ); + // itree = 438 + fBoostWeights.push_back(0.00651015); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.723394,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52394,-99) , +9, 0.370869, 0, 0, 0.55373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318693,-99) , +4, 2.07698, 1, 0, 0.549773,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359584,-99) , +8, -0.944367, 0, 0, 0.50553,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103145,-99) , +7, 0.124227, 1, 0, 0.391001,-99) , +4, 1.42103, 1, 0, 0.473451,-99) , +12, 0.10141, 1, 0, 0.505517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254163,-99) , +12, 0.01821, 0, 0, 0.499405,-99) , +12, 0.526359, 0, 0, 0.507147,-99) ); + // itree = 439 + fBoostWeights.push_back(0.00816693); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647856,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51717,-99) , +9, 2.74625, 0, 0, 0.540035,-99) , +4, 0.418619, 1, 0, 0.559246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429417,-99) , +12, 0.0307204, 0, 0, 0.547025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344823,-99) , +7, 0.135459, 1, 0, 0.538298,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562888,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435949,-99) , +3, 0.903877, 0, 0, 0.543609,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380228,-99) , +8, 0.202538, 1, 0, 0.453013,-99) , +11, 0.5, 1, 0, 0.510909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34566,-99) , +3, 0.998812, 1, 0, 0.491981,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353489,-99) , +2, 11.5, 1, 0, 0.453612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27419,-99) , +5, 1.9706, 1, 0, 0.431071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187232,-99) , +3, 0.927373, 0, 0, 0.390355,-99) , +7, 0.0149842, 0, 0, 0.459855,-99) , +16, 1957.91, 1, 0, 0.500034,-99) ); + // itree = 440 + fBoostWeights.push_back(0.00652324); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554947,-99) , +9, 0.419169, 0, 0, 0.611533,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450639,-99) , +8, -0.727693, 0, 0, 0.522378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436678,-99) , +7, 0.0289362, 1, 0, 0.507237,-99) , +1, 20.5, 0, 0, 0.548542,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447648,-99) , +12, 0.0525135, 0, 0, 0.552154,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326613,-99) , +4, 1.84922, 1, 0, 0.462674,-99) , +16, 257.693, 1, 0, 0.492595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178969,-99) , +7, 0.143729, 1, 0, 0.485055,-99) , +4, 0.938366, 1, 0, 0.510531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304593,-99) , +3, 0.999568, 1, 0, 0.503376,-99) ); + // itree = 441 + fBoostWeights.push_back(0.00685972); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620085,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253592,-99) , +5, 2.30272, 1, 0, 0.5555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429918,-99) , +7, 0.0324488, 1, 0, 0.534552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381162,-99) , +14, -4.81492, 0, 0, 0.520801,-99) , +0, 34.5, 0, 0, 0.543752,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498642,-99) , +10, -5178.58, 1, 0, 0.509267,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235312,-99) , +5, 1.42234, 1, 0, 0.398768,-99) , +13, 0.0152568, 1, 0, 0.494256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346433,-99) , +1, 7.5, 0, 0, 0.483099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200961,-99) , +4, 1.98891, 1, 0, 0.474707,-99) , +11, 1.5, 0, 0, 0.497329,-99) ); + // itree = 442 + fBoostWeights.push_back(0.00590235); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512305,-99) , +11, 1.5, 0, 0, 0.537849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257207,-99) , +6, 0.271643, 0, 0, 0.437189,-99) , +14, -4.30627, 0, 0, 0.526663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382866,-99) , +8, -0.974449, 0, 0, 0.518769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311205,-99) , +5, 2.31016, 1, 0, 0.513074,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274703,-99) , +9, 0.272605, 0, 0, 0.377841,-99) , +7, 0.00922731, 0, 0, 0.502698,-99) ); + // itree = 443 + fBoostWeights.push_back(0.00764105); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.70632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640111,-99) , +16, 1434.03, 1, 0, 0.674067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502416,-99) , +7, 0.0212439, 0, 0, 0.547518,-99) , +8, -0.296309, 0, 0, 0.610394,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374761,-99) , +15, 0.379896, 1, 0, 0.487906,-99) , +13, 0.00117164, 0, 0, 0.573178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433169,-99) , +5, 0.444456, 0, 0, 0.554667,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368183,-99) , +3, 0.999328, 1, 0, 0.509605,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277028,-99) , +6, 0.595449, 1, 0, 0.413413,-99) , +3, 0.889664, 0, 0, 0.49818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2882,-99) , +5, 2.36282, 1, 0, 0.49122,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161369,-99) , +4, 1.36576, 1, 0, 0.351847,-99) , +13, 0.0176857, 1, 0, 0.478623,-99) , +4, 0.815474, 1, 0, 0.503847,-99) ); + // itree = 444 + fBoostWeights.push_back(0.00937829); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533157,-99) , +10, 8899.15, 0, 0, 0.547818,-99) , +2, 24.5, 0, 0, 0.56989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46272,-99) , +7, 0.0669823, 1, 0, 0.556094,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518449,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297847,-99) , +15, 1.23055, 1, 0, 0.371063,-99) , +3, 0.983108, 1, 0, 0.438052,-99) , +12, 0.0312849, 0, 0, 0.532791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6658,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42403,-99) , +5, 1.59076, 1, 0, 0.490042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217208,-99) , +7, 0.152796, 1, 0, 0.479261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205964,-99) , +8, -0.526092, 0, 0, 0.367808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.105432,-99) , +4, 1.74629, 1, 0, 0.341732,-99) , +7, 0.0135374, 0, 0, 0.444913,-99) , +12, 0.507814, 0, 0, 0.461692,-99) , +12, 0.11373, 1, 0, 0.495215,-99) ); + // itree = 445 + fBoostWeights.push_back(0.00855876); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704574,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58285,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486746,-99) , +2, 13.5, 0, 0, 0.548567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300742,-99) , +4, 0.897476, 1, 0, 0.385936,-99) , +8, 0.91416, 1, 0, 0.524485,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422388,-99) , +16, 528.201, 1, 0, 0.471928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239751,-99) , +13, 0.0130465, 1, 0, 0.453036,-99) , +5, 1.54839, 1, 0, 0.491563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127925,-99) , +5, 2.43946, 1, 0, 0.486927,-99) , +12, 0.526826, 0, 0, 0.495472,-99) ); + // itree = 446 + fBoostWeights.push_back(0.00763641); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322701,-99) , +12, 0.0198665, 0, 0, 0.527311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299382,-99) , +14, -5.71064, 0, 0, 0.520238,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310979,-99) , +12, 0.129896, 1, 0, 0.4211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126717,-99) , +0, 73.5, 1, 0, 0.385314,-99) , +3, 0.998954, 1, 0, 0.508191,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460074,-99) , +7, 0.0254768, 1, 0, 0.504842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400022,-99) , +11, 0.5, 0, 0, 0.47041,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53563,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0562434,-99) , +5, 1.67418, 1, 0, 0.273517,-99) , +12, 0.327939, 0, 0, 0.344988,-99) , +12, 0.129524, 1, 0, 0.418022,-99) , +8, -0.765639, 0, 0, 0.492924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0595688,-99) , +5, 2.57723, 1, 0, 0.490538,-99) ); + // itree = 447 + fBoostWeights.push_back(0.00589676); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496802,-99) , +5, 1.46594, 1, 0, 0.529499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332619,-99) , +12, 0.01821, 0, 0, 0.52324,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328135,-99) , +7, 0.0155705, 1, 0, 0.468096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296869,-99) , +8, -0.482957, 0, 0, 0.425877,-99) , +2, 9.5, 0, 0, 0.507135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24183,-99) , +4, 2.07555, 1, 0, 0.502073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254729,-99) , +3, 0.999642, 1, 0, 0.495565,-99) ); + // itree = 448 + fBoostWeights.push_back(0.00534541); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681724,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365697,-99) , +12, 0.0174853, 0, 0, 0.532967,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357373,-99) , +4, 1.5521, 1, 0, 0.469226,-99) , +12, 0.111255, 1, 0, 0.499532,-99) , +12, 0.525387, 0, 0, 0.505849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311023,-99) , +1, 65.5, 1, 0, 0.499742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102242,-99) , +7, 0.28174, 1, 0, 0.496397,-99) ); + // itree = 449 + fBoostWeights.push_back(0.00740149); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524808,-99) , +13, 0.000448648, 0, 0, 0.605174,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0998599,-99) , +1, 23.5, 0, 0, 0.423806,-99) , +7, 0.101136, 1, 0, 0.561837,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297667,-99) , +7, 0.0071135, 0, 0, 0.493531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157998,-99) , +7, 0.0496955, 1, 0, 0.483352,-99) , +2, 24.5, 0, 0, 0.502577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297246,-99) , +3, 0.999633, 1, 0, 0.497113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299409,-99) , +4, 1.98694, 1, 0, 0.490483,-99) ); + // itree = 450 + fBoostWeights.push_back(0.00751964); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697347,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610191,-99) , +1, 29.5, 1, 0, 0.643898,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423238,-99) , +5, 1.49291, 1, 0, 0.5091,-99) , +16, 965.513, 1, 0, 0.575758,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496046,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34373,-99) , +5, 2.10179, 1, 0, 0.483687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.131176,-99) , +7, 0.050451, 1, 0, 0.474732,-99) , +2, 24.5, 0, 0, 0.497971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325378,-99) , +7, 0.12423, 1, 0, 0.490186,-99) , +12, 0.525387, 0, 0, 0.498734,-99) ); + // itree = 451 + fBoostWeights.push_back(0.00534356); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481129,-99) , +13, 0.0109346, 1, 0, 0.54149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370137,-99) , +14, -5.44608, 0, 0, 0.535722,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441804,-99) , +16, 347.008, 1, 0, 0.482796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3184,-99) , +0, 13.5, 1, 0, 0.450374,-99) , +7, 0.012507, 0, 0, 0.517808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297856,-99) , +12, 0.0174853, 0, 0, 0.51227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254276,-99) , +7, 0.179327, 1, 0, 0.506527,-99) ); + // itree = 452 + fBoostWeights.push_back(0.00702859); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233033,-99) , +5, 2.49011, 1, 0, 0.529347,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15858,-99) , +4, 1.58434, 1, 0, 0.405834,-99) , +8, -0.945726, 0, 0, 0.519602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286165,-99) , +9, 0.624747, 0, 0, 0.391485,-99) , +7, 0.00940415, 0, 0, 0.508069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317304,-99) , +5, 1.74649, 1, 0, 0.462593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256626,-99) , +12, 0.21039, 1, 0, 0.417651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0442472,-99) , +7, 0.114685, 1, 0, 0.378299,-99) , +3, 0.999047, 1, 0, 0.497175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266537,-99) , +12, 0.01821, 0, 0, 0.490934,-99) ); + // itree = 453 + fBoostWeights.push_back(0.00541492); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594671,-99) , +4, 1.33163, 0, 0, 0.627865,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434632,-99) , +1, 10.5, 0, 0, 0.499272,-99) , +8, 0.3356, 1, 0, 0.565246,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444231,-99) , +12, 0.138223, 1, 0, 0.483864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335396,-99) , +14, -4.93931, 0, 0, 0.475823,-99) , +9, 4.45357, 0, 0, 0.490939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300492,-99) , +7, 0.145791, 1, 0, 0.484852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305721,-99) , +5, 2.22346, 1, 0, 0.477417,-99) ); + // itree = 454 + fBoostWeights.push_back(0.00778712); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682436,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484131,-99) , +3, 0.997787, 1, 0, 0.585602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264926,-99) , +7, 0.0453675, 1, 0, 0.50905,-99) , +2, 24.5, 0, 0, 0.529888,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352787,-99) , +12, 0.0182039, 0, 0, 0.423828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281223,-99) , +4, 1.70376, 1, 0, 0.403378,-99) , +12, 0.0296016, 0, 0, 0.516107,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406735,-99) , +9, -0.0986206, 1, 0, 0.465604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229697,-99) , +8, -0.910962, 0, 0, 0.445531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.153644,-99) , +4, 1.84894, 1, 0, 0.42733,-99) , +12, 0.196862, 1, 0, 0.492363,-99) , +12, 0.523051, 0, 0, 0.499804,-99) ); + // itree = 455 + fBoostWeights.push_back(0.00589825); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496164,-99) , +8, 0.70789, 1, 0, 0.531156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304834,-99) , +5, 2.23313, 1, 0, 0.526079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288678,-99) , +4, 0.993161, 1, 0, 0.389038,-99) , +8, -0.924256, 0, 0, 0.513346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307497,-99) , +4, 1.93184, 1, 0, 0.505005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218225,-99) , +12, 0.0182006, 0, 0, 0.497935,-99) ); + // itree = 456 + fBoostWeights.push_back(0.00906593); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687402,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483319,-99) , +12, 0.182774, 1, 0, 0.554428,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320401,-99) , +3, 0.995493, 1, 0, 0.441248,-99) , +8, 0.897921, 1, 0, 0.533447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373223,-99) , +5, 0.50588, 0, 0, 0.52093,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329314,-99) , +4, 2.06251, 1, 0, 0.523217,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164229,-99) , +1, 7.5, 0, 0, 0.417384,-99) , +16, 762.445, 1, 0, 0.46402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164493,-99) , +13, 0.0124626, 1, 0, 0.440676,-99) , +5, 1.64927, 1, 0, 0.490368,-99) , +12, 0.523206, 0, 0, 0.498131,-99) ); + // itree = 457 + fBoostWeights.push_back(0.0072551); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515962,-99) , +1, 60.5, 1, 0, 0.627403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467537,-99) , +8, -0.637362, 0, 0, 0.598859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276401,-99) , +1, 13.5, 0, 0, 0.580367,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376393,-99) , +15, 0.734518, 1, 0, 0.503078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322626,-99) , +5, 2.16532, 1, 0, 0.492519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225912,-99) , +7, 0.0561693, 1, 0, 0.482746,-99) , +2, 30.5, 0, 0, 0.501007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144424,-99) , +7, 0.253137, 1, 0, 0.497416,-99) ); + // itree = 458 + fBoostWeights.push_back(0.00814532); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505664,-99) , +4, 0.618006, 1, 0, 0.525513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367631,-99) , +5, 0.558125, 0, 0, 0.516333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321771,-99) , +14, -5.19959, 0, 0, 0.509246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329432,-99) , +8, -0.975078, 0, 0, 0.499094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401715,-99) , +12, 0.103352, 1, 0, 0.488021,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161897,-99) , +11, 1.5, 0, 0, 0.256575,-99) , +14, -3.4345, 1, 0, 0.382052,-99) , +5, 1.93635, 1, 0, 0.481757,-99) ); + // itree = 459 + fBoostWeights.push_back(0.00978014); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65579,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506533,-99) , +15, 0.480423, 1, 0, 0.565528,-99) , +6, 0.139562, 1, 0, 0.58396,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453165,-99) , +15, 0.0720461, 1, 0, 0.513195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382887,-99) , +6, 0.671264, 1, 0, 0.475357,-99) , +2, 11.5, 0, 0, 0.551149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371806,-99) , +14, -4.89468, 0, 0, 0.537428,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545737,-99) , +9, -0.391701, 1, 0, 0.594857,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407666,-99) , +12, 0.175217, 1, 0, 0.484519,-99) , +0, 21.5, 0, 0, 0.536931,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366892,-99) , +11, 0.5, 1, 0, 0.448588,-99) , +6, 0.939109, 1, 0, 0.51103,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4027,-99) , +15, 0.058702, 0, 0, 0.492155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304197,-99) , +3, 0.896938, 0, 0, 0.467404,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256364,-99) , +1, 12.5, 0, 0, 0.383507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158151,-99) , +4, 1.51352, 1, 0, 0.302697,-99) , +13, 0.0046676, 1, 0, 0.427544,-99) , +5, 1.47131, 1, 0, 0.466338,-99) , +11, 1.5, 0, 0, 0.490286,-99) ); + // itree = 460 + fBoostWeights.push_back(0.00608471); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638036,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48244,-99) , +10, 3335.25, 1, 0, 0.529817,-99) , +3, 0.912664, 1, 0, 0.548426,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431851,-99) , +12, 0.137016, 1, 0, 0.480556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189445,-99) , +5, 2.20944, 1, 0, 0.473603,-99) , +11, 1.5, 0, 0, 0.498352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248031,-99) , +4, 2.03909, 1, 0, 0.492534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279929,-99) , +8, -0.989583, 0, 0, 0.485784,-99) ); + // itree = 461 + fBoostWeights.push_back(0.0079905); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447595,-99) , +8, -0.922507, 0, 0, 0.567043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118626,-99) , +5, 2.22304, 1, 0, 0.560713,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568043,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515028,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394912,-99) , +6, 0.289491, 1, 0, 0.440701,-99) , +5, 1.96877, 0, 0, 0.474963,-99) , +13, 0.000430034, 0, 0, 0.533674,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660074,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405988,-99) , +5, 1.53641, 1, 0, 0.454787,-99) , +12, 0.523332, 0, 0, 0.468679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103088,-99) , +7, 0.179217, 1, 0, 0.461593,-99) , +12, 0.126392, 1, 0, 0.497379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236837,-99) , +12, 0.01821, 0, 0, 0.490864,-99) ); + // itree = 462 + fBoostWeights.push_back(0.00651327); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.724315,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331885,-99) , +1, 10.5, 0, 0, 0.537697,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177089,-99) , +7, 0.0359982, 1, 0, 0.469355,-99) , +2, 18.5, 0, 0, 0.494957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222284,-99) , +7, 0.252994, 1, 0, 0.491604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256276,-99) , +2, 6.5, 0, 0, 0.486795,-99) , +12, 0.534864, 0, 0, 0.495393,-99) ); + // itree = 463 + fBoostWeights.push_back(0.00717392); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585927,-99) , +12, 0.0854519, 0, 0, 0.599959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485289,-99) , +14, -2.11712, 1, 0, 0.582187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459673,-99) , +8, 0.973749, 1, 0, 0.562909,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341802,-99) , +2, 11.5, 0, 0, 0.455143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314433,-99) , +15, 2.58818, 1, 0, 0.419973,-99) , +12, 0.0313038, 0, 0, 0.53368,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604894,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281616,-99) , +3, 0.999117, 1, 0, 0.461324,-99) , +9, 5.67496, 0, 0, 0.476987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232809,-99) , +15, 0.744327, 1, 0, 0.468597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161785,-99) , +4, 2.0737, 1, 0, 0.462377,-99) , +12, 0.0995843, 1, 0, 0.492168,-99) ); + // itree = 464 + fBoostWeights.push_back(0.00643138); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680065,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487786,-99) , +16, 1168.3, 1, 0, 0.520352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292656,-99) , +13, 0.0560576, 1, 0, 0.516762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362548,-99) , +7, 0.00865728, 0, 0, 0.507679,-99) , +12, 0.519614, 0, 0, 0.514716,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38498,-99) , +12, 0.190612, 1, 0, 0.503037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316943,-99) , +13, 0.0112906, 1, 0, 0.464954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113653,-99) , +5, 2.20614, 1, 0, 0.452414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22575,-99) , +15, 0.824325, 1, 0, 0.409428,-99) , +3, 0.998043, 1, 0, 0.497646,-99) ); + // itree = 465 + fBoostWeights.push_back(0.00451891); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482411,-99) , +9, 0.563126, 0, 0, 0.508873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288982,-99) , +14, -5.85956, 0, 0, 0.503921,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19053,-99) , +7, 0.252106, 1, 0, 0.500873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229868,-99) , +3, 0.999713, 1, 0, 0.495856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308667,-99) , +5, 2.21234, 1, 0, 0.487216,-99) ); + // itree = 466 + fBoostWeights.push_back(0.00963062); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565831,-99) , +5, 1.77471, 0, 0, 0.59351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410332,-99) , +5, 2.08164, 1, 0, 0.57884,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469897,-99) , +5, 1.61974, 0, 0, 0.507664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187403,-99) , +1, 13.5, 0, 0, 0.47574,-99) , +7, 0.0417666, 1, 0, 0.551819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404899,-99) , +14, -4.6799, 0, 0, 0.539079,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506371,-99) , +2, 30.5, 0, 0, 0.525254,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352947,-99) , +6, 0.787413, 1, 0, 0.432255,-99) , +7, 0.0147827, 0, 0, 0.495616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347409,-99) , +7, 0.0895915, 1, 0, 0.485288,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578598,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277837,-99) , +11, 0.5, 1, 0, 0.37173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120103,-99) , +14, -2.63606, 1, 0, 0.306427,-99) , +12, 0.414713, 0, 0, 0.34208,-99) , +5, 1.87753, 1, 0, 0.460434,-99) , +16, 471.539, 1, 0, 0.490587,-99) ); + // itree = 467 + fBoostWeights.push_back(0.00726357); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498175,-99) , +12, 0.0454654, 0, 0, 0.573679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414095,-99) , +0, 88.5, 1, 0, 0.553661,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0800803,-99) , +4, 2.06589, 1, 0, 0.50849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323189,-99) , +7, 0.0271252, 1, 0, 0.488745,-99) , +2, 17.5, 0, 0, 0.520011,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434894,-99) , +14, -3.29809, 0, 0, 0.507647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345209,-99) , +5, 1.90693, 1, 0, 0.478718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189457,-99) , +7, 0.0305911, 1, 0, 0.449346,-99) , +1, 9.5, 0, 0, 0.504941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241927,-99) , +3, 0.999739, 1, 0, 0.500731,-99) ); + // itree = 468 + fBoostWeights.push_back(0.00673369); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399833,-99) , +8, -0.982765, 0, 0, 0.525042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364646,-99) , +14, -5.50696, 0, 0, 0.519147,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425639,-99) , +6, 1.00497, 0, 0, 0.472442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194711,-99) , +3, 0.866296, 0, 0, 0.455894,-99) , +6, 0.743287, 1, 0, 0.49844,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147889,-99) , +8, 0.95016, 0, 0, 0.384204,-99) , +5, 2.12901, 1, 0, 0.490624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167515,-99) , +7, 0.250645, 1, 0, 0.48736,-99) ); + // itree = 469 + fBoostWeights.push_back(0.00961231); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536805,-99) , +2, 38.5, 0, 0, 0.553573,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255221,-99) , +5, 1.77272, 1, 0, 0.472226,-99) , +3, 0.996562, 1, 0, 0.533456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369001,-99) , +12, 0.0248253, 0, 0, 0.525194,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508091,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27294,-99) , +1, 12.5, 0, 0, 0.339689,-99) , +12, 0.101281, 1, 0, 0.418939,-99) , +8, -0.886199, 0, 0, 0.511783,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50624,-99) , +3, 0.995285, 1, 0, 0.594906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421226,-99) , +3, 0.972802, 0, 0, 0.543576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377028,-99) , +1, 9.5, 0, 0, 0.49955,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0566248,-99) , +4, 1.8052, 1, 0, 0.277986,-99) , +14, -2.98952, 1, 0, 0.412456,-99) , +4, 1.58478, 1, 0, 0.494621,-99) ); + // itree = 470 + fBoostWeights.push_back(0.0081476); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449894,-99) , +14, -4.74883, 0, 0, 0.581062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466547,-99) , +3, 0.998046, 1, 0, 0.564299,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405537,-99) , +2, 11.5, 0, 0, 0.484568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177085,-99) , +7, 0.253231, 1, 0, 0.479265,-99) , +6, 0.401572, 1, 0, 0.518832,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454385,-99) , +13, 0.00146659, 0, 0, 0.537303,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194466,-99) , +5, 1.99016, 1, 0, 0.399161,-99) , +10, -451.637, 1, 0, 0.444894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0349123,-99) , +7, 0.0478684, 1, 0, 0.426353,-99) , +1, 9.5, 0, 0, 0.499831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227683,-99) , +2, 6.5, 0, 0, 0.494291,-99) ); + // itree = 471 + fBoostWeights.push_back(0.00368835); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336998,-99) , +14, -5.66195, 0, 0, 0.523337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315455,-99) , +2, 6.5, 0, 0, 0.519248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380063,-99) , +8, -0.977668, 0, 0, 0.512594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323564,-99) , +3, 0.999637, 1, 0, 0.507387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311629,-99) , +5, 2.27571, 1, 0, 0.50076,-99) ); + // itree = 472 + fBoostWeights.push_back(0.00703984); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.724979,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52375,-99) , +3, 0.997163, 1, 0, 0.614102,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380228,-99) , +7, 0.0391654, 1, 0, 0.523667,-99) , +2, 30.5, 0, 0, 0.544908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402589,-99) , +12, 0.0227642, 0, 0, 0.529689,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470451,-99) , +2, 42.5, 0, 0, 0.48157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244915,-99) , +0, 84.5, 1, 0, 0.470328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274856,-99) , +7, 0.00866202, 0, 0, 0.458236,-99) , +12, 0.110628, 1, 0, 0.492309,-99) , +12, 0.525387, 0, 0, 0.501313,-99) ); + // itree = 473 + fBoostWeights.push_back(0.00463324); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374228,-99) , +14, -4.52722, 0, 0, 0.545893,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450272,-99) , +12, 0.111195, 1, 0, 0.485312,-99) , +11, 1.5, 0, 0, 0.505807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336529,-99) , +4, 1.98895, 1, 0, 0.49983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172306,-99) , +13, 0.111134, 1, 0, 0.496715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24655,-99) , +2, 6.5, 0, 0, 0.491832,-99) ); + // itree = 474 + fBoostWeights.push_back(0.00634896); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555315,-99) , +8, -0.632567, 0, 0, 0.616607,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418272,-99) , +3, 0.978935, 1, 0, 0.480534,-99) , +13, 0.0018997, 0, 0, 0.565598,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251697,-99) , +2, 6.5, 0, 0, 0.489372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122377,-99) , +7, 0.250678, 1, 0, 0.485827,-99) , +4, 0.735088, 1, 0, 0.507485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317321,-99) , +5, 0.375997, 0, 0, 0.499694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0755863,-99) , +5, 2.49133, 1, 0, 0.496005,-99) ); + // itree = 475 + fBoostWeights.push_back(0.00990587); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571638,-99) , +6, 0.491515, 1, 0, 0.622742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508981,-99) , +8, -0.754892, 0, 0, 0.590281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423763,-99) , +12, 0.0742565, 0, 0, 0.498493,-99) , +13, 0.00208623, 0, 0, 0.561757,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570629,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400806,-99) , +13, 0.00104486, 1, 0, 0.454842,-99) , +1, 8.5, 1, 0, 0.491041,-99) , +2, 12.5, 0, 0, 0.539594,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642904,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310386,-99) , +3, 0.999078, 1, 0, 0.49061,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166539,-99) , +5, 2.23563, 1, 0, 0.37811,-99) , +12, 0.136043, 1, 0, 0.443075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136238,-99) , +13, 0.0222143, 1, 0, 0.430612,-99) , +12, 0.44905, 0, 0, 0.446487,-99) , +5, 1.53655, 1, 0, 0.495021,-99) ); + // itree = 476 + fBoostWeights.push_back(0.00537921); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524537,-99) , +5, 1.71077, 0, 0, 0.564819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446891,-99) , +8, 0.991426, 1, 0, 0.551327,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38393,-99) , +7, 0.0806903, 1, 0, 0.493133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30537,-99) , +4, 1.83319, 1, 0, 0.482555,-99) , +11, 1.5, 0, 0, 0.505327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22038,-99) , +5, 2.45763, 1, 0, 0.501848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200909,-99) , +3, 0.999708, 1, 0, 0.496503,-99) ); + // itree = 477 + fBoostWeights.push_back(0.00495693); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326676,-99) , +3, 0.755537, 0, 0, 0.513776,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478233,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339749,-99) , +3, 0.982847, 1, 0, 0.402138,-99) , +12, 0.0312838, 0, 0, 0.503717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275518,-99) , +2, 6.5, 0, 0, 0.498882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320221,-99) , +7, 0.1357, 1, 0, 0.492349,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277851,-99) , +10, 2915.98, 1, 0, 0.334846,-99) , +8, -0.971143, 0, 0, 0.483264,-99) ); + // itree = 478 + fBoostWeights.push_back(0.0067468); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661416,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502455,-99) , +2, 15.5, 0, 0, 0.548289,-99) , +12, 0.0904779, 0, 0, 0.56187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387473,-99) , +12, 0.0217817, 0, 0, 0.544422,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517335,-99) , +9, 3.03908, 0, 0, 0.543258,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407149,-99) , +5, 1.49863, 1, 0, 0.460157,-99) , +11, 1.5, 0, 0, 0.486452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180392,-99) , +7, 0.15629, 1, 0, 0.479252,-99) , +12, 0.100765, 1, 0, 0.506514,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268159,-99) , +4, 1.97334, 1, 0, 0.498764,-99) ); + // itree = 479 + fBoostWeights.push_back(0.00708635); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664827,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486321,-99) , +3, 0.996218, 1, 0, 0.562807,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253637,-99) , +7, 0.0435631, 1, 0, 0.486419,-99) , +2, 24.5, 0, 0, 0.506728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582209,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258651,-99) , +12, 0.101326, 1, 0, 0.353257,-99) , +9, -4.33103, 1, 0, 0.411823,-99) , +4, 1.63638, 1, 0, 0.492671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159156,-99) , +13, 0.0726367, 1, 0, 0.488608,-99) , +12, 0.525198, 0, 0, 0.494605,-99) ); + // itree = 480 + fBoostWeights.push_back(0.00762729); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596113,-99) , +16, 1505.42, 1, 0, 0.649343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527263,-99) , +6, 0.821663, 1, 0, 0.604914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474083,-99) , +0, 72.5, 1, 0, 0.570692,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353671,-99) , +8, -0.98242, 0, 0, 0.492991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176006,-99) , +4, 2.09854, 1, 0, 0.488604,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.097477,-99) , +2, 19.5, 0, 0, 0.253652,-99) , +7, 0.043232, 1, 0, 0.47305,-99) , +2, 29.5, 0, 0, 0.49075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233377,-99) , +7, 0.178342, 1, 0, 0.485609,-99) ); + // itree = 481 + fBoostWeights.push_back(0.00747533); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610033,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530706,-99) , +16, 2425.27, 1, 0, 0.572404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435558,-99) , +14, -3.91631, 0, 0, 0.553842,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398277,-99) , +12, 0.128698, 1, 0, 0.457202,-99) , +8, -0.797228, 0, 0, 0.534416,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287018,-99) , +5, 2.24363, 1, 0, 0.569592,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412966,-99) , +15, 0.239898, 0, 0, 0.447754,-99) , +16, 60.7599, 1, 0, 0.476232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235547,-99) , +7, 0.0909908, 1, 0, 0.463411,-99) , +4, 1.0164, 1, 0, 0.495168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256275,-99) , +12, 0.01821, 0, 0, 0.488913,-99) ); + // itree = 482 + fBoostWeights.push_back(0.00453702); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514611,-99) , +6, 0.136271, 1, 0, 0.527747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328598,-99) , +2, 6.5, 0, 0, 0.523893,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368058,-99) , +6, 0.501796, 1, 0, 0.435424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0839791,-99) , +5, 1.92198, 1, 0, 0.412037,-99) , +8, -0.912585, 0, 0, 0.512108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.197191,-99) , +5, 2.48989, 1, 0, 0.508959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337134,-99) , +7, 0.12117, 1, 0, 0.501492,-99) ); + // itree = 483 + fBoostWeights.push_back(0.00872968); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203416,-99) , +1, 14.5, 0, 0, 0.602493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157029,-99) , +7, 0.0632382, 1, 0, 0.519948,-99) , +2, 30.5, 0, 0, 0.535918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330433,-99) , +3, 0.734821, 0, 0, 0.530214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286492,-99) , +3, 0.999694, 1, 0, 0.525019,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538758,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506028,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357012,-99) , +3, 0.983195, 1, 0, 0.445522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276842,-99) , +4, 1.34064, 1, 0, 0.42198,-99) , +9, 3.06997, 0, 0, 0.451758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0658992,-99) , +4, 1.63603, 1, 0, 0.427046,-99) , +8, -0.758424, 0, 0, 0.508798,-99) ); + // itree = 484 + fBoostWeights.push_back(0.00837307); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459064,-99) , +1, 11.5, 0, 0, 0.621094,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505934,-99) , +9, 4.7548, 0, 0, 0.529343,-99) , +9, -3.49455, 1, 0, 0.550914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301813,-99) , +13, 0.0551993, 1, 0, 0.540117,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3294,-99) , +8, -0.928688, 0, 0, 0.484516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177025,-99) , +4, 1.98799, 1, 0, 0.476094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117589,-99) , +7, 0.0359029, 1, 0, 0.463913,-99) , +2, 14.5, 0, 0, 0.503477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25952,-99) , +12, 0.01821, 0, 0, 0.497681,-99) ); + // itree = 485 + fBoostWeights.push_back(0.00694476); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552409,-99) , +0, 16.5, 1, 0, 0.641843,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371119,-99) , +13, 0.0217085, 1, 0, 0.523124,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325252,-99) , +3, 0.957181, 0, 0, 0.44054,-99) , +6, 0.860628, 1, 0, 0.501025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248003,-99) , +5, 2.21078, 1, 0, 0.492491,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50242,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222417,-99) , +15, 0.32102, 1, 0, 0.308261,-99) , +5, 2.08297, 0, 0, 0.358318,-99) , +14, -4.54163, 0, 0, 0.480111,-99) , +12, 0.438429, 0, 0, 0.489891,-99) ); + // itree = 486 + fBoostWeights.push_back(0.00802078); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708582,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52558,-99) , +2, 18.5, 0, 0, 0.587277,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437918,-99) , +5, 1.22149, 0, 0, 0.487387,-99) , +13, 0.00206175, 0, 0, 0.549679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428076,-99) , +8, -0.912786, 0, 0, 0.532684,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318978,-99) , +3, 0.999256, 1, 0, 0.49199,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183087,-99) , +4, 1.7695, 1, 0, 0.369239,-99) , +15, 0.057286, 0, 0, 0.473408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100718,-99) , +13, 0.0262892, 1, 0, 0.46187,-99) , +5, 1.45272, 1, 0, 0.493996,-99) , +12, 0.526826, 0, 0, 0.50198,-99) ); + // itree = 487 + fBoostWeights.push_back(0.00513837); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444854,-99) , +8, -0.906691, 0, 0, 0.558199,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448368,-99) , +5, 1.47132, 1, 0, 0.488305,-99) , +16, 493.571, 1, 0, 0.51522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344875,-99) , +3, 0.999487, 1, 0, 0.506946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23889,-99) , +2, 6.5, 0, 0, 0.502143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159571,-99) , +5, 2.47694, 1, 0, 0.498578,-99) ); + // itree = 488 + fBoostWeights.push_back(0.00463474); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475348,-99) , +7, 0.014791, 0, 0, 0.522189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353651,-99) , +3, 0.999637, 1, 0, 0.517642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334509,-99) , +1, 68.5, 1, 0, 0.511221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316394,-99) , +4, 1.97336, 1, 0, 0.504362,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212571,-99) , +6, 0.497732, 1, 0, 0.321968,-99) , +7, 0.00863766, 0, 0, 0.494559,-99) ); + // itree = 489 + fBoostWeights.push_back(0.00582485); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68048,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533382,-99) , +9, -4.52343, 1, 0, 0.552439,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169011,-99) , +7, 0.246759, 1, 0, 0.481575,-99) , +11, 1.5, 0, 0, 0.504484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384198,-99) , +10, 3155.05, 1, 0, 0.429478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156199,-99) , +5, 1.67395, 1, 0, 0.380815,-99) , +8, -0.91538, 0, 0, 0.491871,-99) , +12, 0.519027, 0, 0, 0.498601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245279,-99) , +5, 2.32332, 1, 0, 0.492476,-99) ); + // itree = 490 + fBoostWeights.push_back(0.00857991); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425113,-99) , +1, 67.5, 1, 0, 0.603909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415135,-99) , +12, 0.0314507, 0, 0, 0.580111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189649,-99) , +1, 11.5, 0, 0, 0.560487,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509459,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344938,-99) , +14, -5.2805, 0, 0, 0.502315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308895,-99) , +5, 2.25681, 1, 0, 0.494496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170848,-99) , +7, 0.0485973, 1, 0, 0.483362,-99) , +2, 24.5, 0, 0, 0.502776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0767855,-99) , +7, 0.251046, 1, 0, 0.498926,-99) ); + // itree = 491 + fBoostWeights.push_back(0.007947); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639527,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465107,-99) , +5, 1.31421, 0, 0, 0.580242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461574,-99) , +8, 0.983355, 1, 0, 0.559499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410519,-99) , +7, 0.0375108, 1, 0, 0.543552,-99) , +0, 35.5, 0, 0, 0.565797,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522981,-99) , +10, 209.22, 1, 0, 0.54401,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274978,-99) , +8, 0.502525, 1, 0, 0.373456,-99) , +12, 0.0312599, 0, 0, 0.517007,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173998,-99) , +4, 1.89561, 1, 0, 0.466934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310128,-99) , +15, 0.259492, 1, 0, 0.446079,-99) , +12, 0.124176, 1, 0, 0.481089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171333,-99) , +5, 2.35519, 1, 0, 0.47604,-99) , +11, 1.5, 0, 0, 0.506427,-99) ); + // itree = 492 + fBoostWeights.push_back(0.00756996); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65811,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447308,-99) , +16, 3.45516, 0, 0, 0.54379,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222573,-99) , +5, 2.1221, 1, 0, 0.485485,-99) , +16, 364.313, 1, 0, 0.506407,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450131,-99) , +10, 5787.15, 0, 0, 0.508554,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206791,-99) , +0, 15.5, 1, 0, 0.311759,-99) , +14, -3.43915, 1, 0, 0.410194,-99) , +4, 1.58083, 1, 0, 0.488935,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263065,-99) , +5, 1.73655, 1, 0, 0.43338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259076,-99) , +15, 0.137503, 0, 0, 0.378617,-99) , +8, -0.901313, 0, 0, 0.476195,-99) , +12, 0.512572, 0, 0, 0.483421,-99) ); + // itree = 493 + fBoostWeights.push_back(0.00497093); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515121,-99) , +13, 0.00207545, 0, 0, 0.584658,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227103,-99) , +7, 0.0650215, 1, 0, 0.488431,-99) , +2, 33.5, 0, 0, 0.500947,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31085,-99) , +1, 65.5, 1, 0, 0.495565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294137,-99) , +4, 2.02291, 1, 0, 0.490278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199661,-99) , +7, 0.207895, 1, 0, 0.485933,-99) ); + // itree = 494 + fBoostWeights.push_back(0.00808287); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60209,-99) , +2, 19.5, 0, 0, 0.662073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519146,-99) , +8, -0.553665, 0, 0, 0.605417,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414121,-99) , +15, 0.288572, 1, 0, 0.488355,-99) , +13, 0.00112625, 0, 0, 0.569712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431953,-99) , +5, 0.375997, 0, 0, 0.551216,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483145,-99) , +12, 0.4496, 0, 0, 0.493605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303952,-99) , +3, 0.999365, 1, 0, 0.483446,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2753,-99) , +11, 0.5, 0, 0, 0.372528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0522988,-99) , +4, 1.7811, 1, 0, 0.343544,-99) , +3, 0.886313, 0, 0, 0.468864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126861,-99) , +7, 0.205443, 1, 0, 0.464435,-99) , +4, 0.797438, 1, 0, 0.493442,-99) ); + // itree = 495 + fBoostWeights.push_back(0.00805217); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.687366,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542896,-99) , +12, 0.178115, 1, 0, 0.63254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527212,-99) , +13, 0.0018361, 0, 0, 0.590008,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451104,-99) , +8, 0.909485, 1, 0, 0.565543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424804,-99) , +5, 0.62702, 0, 0, 0.540524,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40287,-99) , +8, 0.979193, 1, 0, 0.508358,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186532,-99) , +13, 0.0175269, 1, 0, 0.41475,-99) , +16, 498.827, 1, 0, 0.450645,-99) , +4, 0.73108, 1, 0, 0.47871,-99) , +10, -4087.62, 1, 0, 0.492884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280906,-99) , +4, 1.96821, 1, 0, 0.485368,-99) ); + // itree = 496 + fBoostWeights.push_back(0.00740154); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552552,-99) , +0, 23.5, 0, 0, 0.624213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46388,-99) , +8, -0.879684, 0, 0, 0.583625,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477629,-99) , +7, 0.0169958, 0, 0, 0.532241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384787,-99) , +15, 0.5031, 1, 0, 0.496884,-99) , +13, 0.00213475, 0, 0, 0.548425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416111,-99) , +5, 0.534332, 0, 0, 0.531606,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449961,-99) , +5, 1.50368, 0, 0, 0.524544,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1584,-99) , +5, 2.31656, 1, 0, 0.449709,-99) , +11, 1.5, 0, 0, 0.473921,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132864,-99) , +5, 2.5698, 1, 0, 0.471193,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281401,-99) , +7, 0.080043, 1, 0, 0.457831,-99) , +4, 0.917435, 1, 0, 0.486653,-99) ); + // itree = 497 + fBoostWeights.push_back(0.00764363); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532317,-99) , +13, 0.00859728, 1, 0, 0.608707,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391135,-99) , +1, 39.5, 1, 0, 0.531088,-99) , +16, 994.24, 1, 0, 0.569553,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307622,-99) , +8, -0.9886, 0, 0, 0.490601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16777,-99) , +0, 35.5, 1, 0, 0.484298,-99) , +2, 21.5, 0, 0, 0.507972,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0276283,-99) , +1, 22.5, 0, 0, 0.345095,-99) , +7, 0.104704, 1, 0, 0.497949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243349,-99) , +7, 0.0074769, 0, 0, 0.491183,-99) ); + // itree = 498 + fBoostWeights.push_back(0.00741975); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208224,-99) , +1, 12.5, 0, 0, 0.581704,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205392,-99) , +7, 0.0514024, 1, 0, 0.508382,-99) , +2, 24.5, 0, 0, 0.528134,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25145,-99) , +7, 0.0436848, 1, 0, 0.406363,-99) , +3, 0.999206, 1, 0, 0.518781,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389662,-99) , +7, 0.0282904, 1, 0, 0.466327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130664,-99) , +5, 1.79931, 1, 0, 0.426815,-99) , +8, -0.854867, 0, 0, 0.506811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336319,-99) , +2, 7.5, 0, 0, 0.499281,-99) ); + // itree = 499 + fBoostWeights.push_back(0.00737801); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675018,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580707,-99) , +6, 0.694021, 1, 0, 0.630284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.00864, 1, 0, 0.61085,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445085,-99) , +4, 1.45684, 0, 0, 0.505794,-99) , +8, 0.662309, 1, 0, 0.566987,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467451,-99) , +1, 10.5, 0, 0, 0.582408,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336004,-99) , +3, 0.997386, 1, 0, 0.497969,-99) , +9, -3.80668, 1, 0, 0.51796,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361961,-99) , +3, 0.997992, 1, 0, 0.468682,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0763934,-99) , +13, 0.0149579, 1, 0, 0.370181,-99) , +4, 1.404, 1, 0, 0.441629,-99) , +16, 1020.31, 1, 0, 0.476675,-99) , +9, 4.41839, 0, 0, 0.491258,-99) , +12, 0.544829, 0, 0, 0.497143,-99) ); + // itree = 500 + fBoostWeights.push_back(0.00894429); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.697762,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541015,-99) , +6, 0.44022, 1, 0, 0.57885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45069,-99) , +8, -0.919848, 0, 0, 0.557899,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466736,-99) , +4, 0.983884, 1, 0, 0.519843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380462,-99) , +5, 1.16623, 0, 0, 0.465878,-99) , +14, -2.75014, 0, 0, 0.527561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426695,-99) , +6, 0.262911, 0, 0, 0.495625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290679,-99) , +12, 0.0222896, 0, 0, 0.485275,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.106764,-99) , +5, 2.15488, 1, 0, 0.334089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0608513,-99) , +7, 0.0770543, 1, 0, 0.284976,-99) , +13, 0.00770762, 1, 0, 0.455893,-99) , +5, 1.49826, 1, 0, 0.490878,-99) , +12, 0.526395, 0, 0, 0.498358,-99) ); + // itree = 501 + fBoostWeights.push_back(0.00944573); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669427,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544162,-99) , +13, 0.0137628, 1, 0, 0.604232,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456353,-99) , +1, 11.5, 1, 0, 0.503393,-99) , +2, 18.5, 0, 0, 0.555462,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481588,-99) , +4, 0.899164, 1, 0, 0.525585,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322892,-99) , +5, 1.17286, 0, 0, 0.410919,-99) , +15, 0.279569, 1, 0, 0.471198,-99) , +14, -2.66947, 0, 0, 0.526499,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483838,-99) , +0, 16.5, 0, 0, 0.53811,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228606,-99) , +5, 2.15133, 1, 0, 0.427945,-99) , +11, 1.5, 0, 0, 0.468612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0319393,-99) , +14, -1.60939, 1, 0, 0.455544,-99) , +5, 1.49775, 1, 0, 0.490112,-99) , +12, 0.492332, 0, 0, 0.49779,-99) ); + // itree = 502 + fBoostWeights.push_back(0.00656125); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461464,-99) , +13, 0.0233909, 1, 0, 0.568704,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496688,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182624,-99) , +7, 0.049619, 1, 0, 0.486859,-99) , +2, 24.5, 0, 0, 0.507447,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180034,-99) , +5, 2.0622, 1, 0, 0.458851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158839,-99) , +7, 0.0997147, 1, 0, 0.428572,-99) , +3, 0.99804, 1, 0, 0.494349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.111374,-99) , +5, 2.56973, 1, 0, 0.492322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251624,-99) , +2, 6.5, 0, 0, 0.487498,-99) ); + // itree = 503 + fBoostWeights.push_back(0.00987042); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563385,-99) , +6, 0.270458, 1, 0, 0.595178,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459828,-99) , +11, 0.5, 1, 0, 0.516375,-99) , +16, 1141.71, 1, 0, 0.552146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432062,-99) , +8, -0.9558, 0, 0, 0.538265,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539766,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365059,-99) , +14, -4.54575, 1, 0, 0.404602,-99) , +3, 0.967208, 1, 0, 0.450459,-99) , +8, 0.914165, 1, 0, 0.522531,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570658,-99) , +12, 0.196379, 1, 0, 0.62172,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358141,-99) , +10, 5366.36, 1, 0, 0.496598,-99) , +0, 15.5, 0, 0, 0.557133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428765,-99) , +15, 0.617518, 1, 0, 0.536131,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333531,-99) , +6, 0.911203, 1, 0, 0.481049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243044,-99) , +5, 2.25703, 1, 0, 0.460948,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210591,-99) , +12, 0.249975, 0, 0, 0.305773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0307487,-99) , +5, 2.07673, 1, 0, 0.265937,-99) , +13, 0.00269826, 1, 0, 0.406427,-99) , +11, 1.5, 0, 0, 0.454507,-99) , +5, 1.64998, 1, 0, 0.495989,-99) ); + // itree = 504 + fBoostWeights.push_back(0.00764577); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532576,-99) , +8, 0.934872, 1, 0, 0.594457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436685,-99) , +3, 0.999082, 1, 0, 0.57684,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240992,-99) , +4, 1.98902, 1, 0, 0.494941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192468,-99) , +7, 0.0491853, 1, 0, 0.487951,-99) , +2, 24.5, 0, 0, 0.508279,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54323,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0770715,-99) , +5, 1.46822, 1, 0, 0.30431,-99) , +12, 0.396378, 0, 0, 0.371494,-99) , +13, 0.0229596, 1, 0, 0.498203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24523,-99) , +12, 0.01821, 0, 0, 0.492277,-99) ); + // itree = 505 + fBoostWeights.push_back(0.00723115); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506257,-99) , +6, 0.732857, 1, 0, 0.565189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440954,-99) , +8, 0.989923, 1, 0, 0.551046,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341502,-99) , +12, 0.0252547, 1, 0, 0.435436,-99) , +12, 0.0313038, 0, 0, 0.534637,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537513,-99) , +13, 0.0134845, 0, 0, 0.59786,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402297,-99) , +7, 0.0143751, 0, 0, 0.486561,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.145183,-99) , +7, 0.0674355, 1, 0, 0.384099,-99) , +4, 1.2917, 1, 0, 0.448536,-99) , +12, 0.415723, 0, 0, 0.465707,-99) , +12, 0.110628, 1, 0, 0.49663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274938,-99) , +12, 0.01821, 0, 0, 0.490715,-99) ); + // itree = 506 + fBoostWeights.push_back(0.00788304); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662924,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47312,-99) , +7, 0.053965, 1, 0, 0.555383,-99) , +16, 167.772, 0, 0, 0.569404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465842,-99) , +8, -0.896246, 0, 0, 0.557176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1506,-99) , +4, 2.0694, 1, 0, 0.550493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674639,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403886,-99) , +13, 0.0188379, 1, 0, 0.493883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341005,-99) , +12, 0.113366, 1, 0, 0.397365,-99) , +7, 0.0132788, 0, 0, 0.470351,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402726,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155517,-99) , +14, -3.06495, 1, 0, 0.307589,-99) , +4, 1.71368, 1, 0, 0.453607,-99) , +12, 0.492155, 0, 0, 0.463512,-99) , +16, 264.989, 1, 0, 0.492228,-99) ); + // itree = 507 + fBoostWeights.push_back(0.00486805); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665618,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413142,-99) , +14, -4.64766, 0, 0, 0.512371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287627,-99) , +0, 10.5, 1, 0, 0.394726,-99) , +7, 0.00908566, 0, 0, 0.503053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327648,-99) , +13, 0.0316678, 1, 0, 0.495985,-99) , +12, 0.509824, 0, 0, 0.502019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234511,-99) , +4, 2.06283, 1, 0, 0.496484,-99) ); + // itree = 508 + fBoostWeights.push_back(0.00798092); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561858,-99) , +8, -0.475536, 0, 0, 0.636856,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476822,-99) , +12, 0.205084, 1, 0, 0.551215,-99) , +16, 300.578, 1, 0, 0.597927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175023,-99) , +5, 2.25704, 1, 0, 0.586918,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415161,-99) , +5, 1.91981, 0, 0, 0.474642,-99) , +14, -3.6228, 0, 0, 0.558878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413376,-99) , +7, 0.00904184, 0, 0, 0.506923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339052,-99) , +3, 0.748857, 0, 0, 0.499824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342558,-99) , +3, 0.999224, 1, 0, 0.488651,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204178,-99) , +14, -3.42995, 1, 0, 0.328917,-99) , +4, 1.69967, 1, 0, 0.471464,-99) , +11, 1.5, 0, 0, 0.500871,-99) ); + // itree = 509 + fBoostWeights.push_back(0.0079061); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66714,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364083,-99) , +8, -0.982271, 0, 0, 0.516568,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260461,-99) , +1, 11.5, 1, 0, 0.364693,-99) , +14, -4.65075, 0, 0, 0.505606,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0847246,-99) , +8, 0.946352, 0, 0, 0.352654,-99) , +5, 2.09046, 1, 0, 0.493803,-99) , +12, 0.511562, 0, 0, 0.500319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218574,-99) , +7, 0.219572, 1, 0, 0.496367,-99) ); + // itree = 510 + fBoostWeights.push_back(0.00497449); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451912,-99) , +8, -0.884372, 0, 0, 0.551226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245126,-99) , +4, 2.07597, 1, 0, 0.54602,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460234,-99) , +12, 0.100182, 1, 0, 0.488084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341153,-99) , +12, 0.0286099, 0, 0, 0.479075,-99) , +16, 511.376, 1, 0, 0.505189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259178,-99) , +2, 6.5, 0, 0, 0.499927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223105,-99) , +7, 0.19385, 1, 0, 0.495227,-99) ); + // itree = 511 + fBoostWeights.push_back(0.00730469); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709448,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290694,-99) , +13, 0.0492026, 1, 0, 0.535435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303622,-99) , +12, 0.0216857, 0, 0, 0.525892,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390661,-99) , +8, 0.753448, 1, 0, 0.464827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199739,-99) , +7, 0.0280665, 1, 0, 0.448425,-99) , +2, 12.5, 0, 0, 0.496892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31449,-99) , +5, 2.21078, 1, 0, 0.488912,-99) , +12, 0.534374, 0, 0, 0.496632,-99) ); + // itree = 512 + fBoostWeights.push_back(0.00671231); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485312,-99) , +5, 1.53815, 1, 0, 0.544525,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239478,-99) , +7, 0.0360559, 1, 0, 0.482676,-99) , +2, 19.5, 0, 0, 0.506394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336261,-99) , +3, 0.99962, 1, 0, 0.501588,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41945,-99) , +6, 0.691399, 1, 0, 0.484468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326535,-99) , +5, 1.82417, 1, 0, 0.444213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0148338,-99) , +7, 0.0369502, 1, 0, 0.4143,-99) , +1, 8.5, 0, 0, 0.48966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0654887,-99) , +7, 0.351145, 1, 0, 0.487389,-99) ); + // itree = 513 + fBoostWeights.push_back(0.00846222); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.7034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596246,-99) , +16, 70.1536, 0, 0, 0.64916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505962,-99) , +15, 1.65224, 1, 0, 0.609328,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440205,-99) , +7, 0.0236424, 1, 0, 0.517558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311718,-99) , +5, 2.24263, 1, 0, 0.507584,-99) , +2, 24.5, 0, 0, 0.534891,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649925,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276012,-99) , +15, 0.0585713, 0, 0, 0.490855,-99) , +12, 0.330893, 0, 0, 0.509755,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372995,-99) , +2, 12.5, 0, 0, 0.431538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164271,-99) , +5, 2.17063, 1, 0, 0.41778,-99) , +11, 0.5, 1, 0, 0.471798,-99) , +16, 969.262, 1, 0, 0.500641,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24402,-99) , +4, 0.945312, 1, 0, 0.380809,-99) , +13, 0.0182087, 1, 0, 0.488918,-99) ); + // itree = 514 + fBoostWeights.push_back(0.00677157); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684661,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37957,-99) , +1, 68.5, 1, 0, 0.561959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274232,-99) , +1, 9.5, 0, 0, 0.551209,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470332,-99) , +10, -7029.07, 1, 0, 0.482712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15415,-99) , +7, 0.0447637, 1, 0, 0.473359,-99) , +2, 20.5, 0, 0, 0.498609,-99) , +12, 0.513211, 0, 0, 0.505231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0989689,-99) , +7, 0.280959, 1, 0, 0.502221,-99) ); + // itree = 515 + fBoostWeights.push_back(0.00666484); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490402,-99) , +5, 1.60129, 1, 0, 0.526623,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0301165,-99) , +1, 14.5, 0, 0, 0.418918,-99) , +7, 0.0801532, 1, 0, 0.51464,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390165,-99) , +8, 0.913101, 0, 0, 0.460399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18339,-99) , +13, 0.00210853, 1, 0, 0.402518,-99) , +7, 0.00922198, 0, 0, 0.506029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358595,-99) , +8, -0.98302, 0, 0, 0.499331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225129,-99) , +4, 2.07713, 1, 0, 0.49411,-99) ); + // itree = 516 + fBoostWeights.push_back(0.00625571); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516394,-99) , +7, 0.0179711, 0, 0, 0.603253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474457,-99) , +1, 43.5, 1, 0, 0.580343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463215,-99) , +1, 10.5, 0, 0, 0.55755,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414745,-99) , +8, 0.988621, 1, 0, 0.513149,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469201,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316755,-99) , +1, 8.5, 0, 0, 0.446839,-99) , +16, 3257.44, 1, 0, 0.481554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115503,-99) , +7, 0.21273, 1, 0, 0.477209,-99) , +4, 0.696957, 1, 0, 0.500794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241074,-99) , +4, 2.01487, 1, 0, 0.494251,-99) ); + // itree = 517 + fBoostWeights.push_back(0.0049687); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552335,-99) , +13, 0.00172798, 0, 0, 0.600574,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434851,-99) , +7, 0.0127905, 0, 0, 0.507399,-99) , +12, 0.0594875, 1, 0, 0.522956,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386482,-99) , +4, 1.0748, 0, 0, 0.433743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257674,-99) , +4, 1.61406, 1, 0, 0.403159,-99) , +12, 0.032708, 0, 0, 0.512316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34968,-99) , +3, 0.775689, 0, 0, 0.505382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30286,-99) , +3, 0.999652, 1, 0, 0.500135,-99) ); + // itree = 518 + fBoostWeights.push_back(0.00511845); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.706719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524378,-99) , +2, 14.5, 0, 0, 0.62928,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488558,-99) , +4, 0.0917971, 1, 0, 0.498264,-99) , +10, -8426.86, 1, 0, 0.506981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249104,-99) , +7, 0.170561, 1, 0, 0.502011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33268,-99) , +5, 0.56881, 0, 0, 0.493964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223148,-99) , +2, 6.5, 0, 0, 0.488946,-99) ); + // itree = 519 + fBoostWeights.push_back(0.00677951); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641463,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475687,-99) , +16, 967.566, 1, 0, 0.565947,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419427,-99) , +4, 1.10728, 0, 0, 0.486294,-99) , +13, 0.00563574, 0, 0, 0.513162,-99) , +6, 0.0989002, 1, 0, 0.533943,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488148,-99) , +13, 0.00210551, 0, 0, 0.562505,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379573,-99) , +3, 0.995619, 1, 0, 0.460217,-99) , +6, 0.820893, 1, 0, 0.523829,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422264,-99) , +9, -6.32615, 1, 0, 0.434911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137938,-99) , +7, 0.133239, 1, 0, 0.426891,-99) , +5, 1.44668, 1, 0, 0.472059,-99) , +11, 1.5, 0, 0, 0.492979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264044,-99) , +4, 2.07713, 1, 0, 0.488546,-99) ); + // itree = 520 + fBoostWeights.push_back(0.00678544); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481334,-99) , +7, 0.0151394, 0, 0, 0.520788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321413,-99) , +4, 1.97247, 1, 0, 0.514765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304049,-99) , +14, -5.5514, 0, 0, 0.508082,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233126,-99) , +2, 6.5, 0, 0, 0.502462,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303122,-99) , +3, 0.995261, 1, 0, 0.439768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0291943,-99) , +1, 18.5, 0, 0, 0.359524,-99) , +7, 0.0891699, 1, 0, 0.491256,-99) ); + // itree = 521 + fBoostWeights.push_back(0.00547525); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686892,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51431,-99) , +2, 17.5, 0, 0, 0.557129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38989,-99) , +15, 0.0842028, 0, 0, 0.540801,-99) , +15, 0.0527044, 1, 0, 0.55829,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365505,-99) , +1, 40.5, 1, 0, 0.500491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349953,-99) , +5, 2.06778, 1, 0, 0.49238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332559,-99) , +7, 0.103985, 1, 0, 0.483132,-99) , +11, 1.5, 0, 0, 0.508443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289195,-99) , +4, 1.96752, 1, 0, 0.500982,-99) ); + // itree = 522 + fBoostWeights.push_back(0.00693402); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693198,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549369,-99) , +6, 0.679845, 1, 0, 0.608072,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455087,-99) , +9, -2.33025, 1, 0, 0.498541,-99) , +13, 0.00395106, 0, 0, 0.550394,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286345,-99) , +13, 0.0296706, 1, 0, 0.493024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278593,-99) , +3, 0.999072, 1, 0, 0.478548,-99) , +5, 1.37113, 1, 0, 0.504627,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44955,-99) , +5, 1.4214, 0, 0, 0.477609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353938,-99) , +15, 0.133164, 0, 0, 0.439708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158489,-99) , +5, 1.88073, 1, 0, 0.41426,-99) , +8, -0.837444, 0, 0, 0.491758,-99) , +12, 0.526853, 0, 0, 0.498959,-99) ); + // itree = 523 + fBoostWeights.push_back(0.00511113); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620928,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438743,-99) , +1, 9.5, 0, 0, 0.509812,-99) , +9, 6.26016, 0, 0, 0.520388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354905,-99) , +3, 0.999492, 1, 0, 0.51344,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325179,-99) , +12, 0.129316, 1, 0, 0.415745,-99) , +8, -0.896962, 0, 0, 0.50217,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124045,-99) , +13, 0.00122374, 1, 0, 0.359832,-99) , +4, 1.87404, 1, 0, 0.494115,-99) ); + // itree = 524 + fBoostWeights.push_back(0.00927953); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503439,-99) , +15, 1.54183, 1, 0, 0.619419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424977,-99) , +1, 69.5, 1, 0, 0.597689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196271,-99) , +1, 12.5, 0, 0, 0.57886,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49966,-99) , +10, -4356.8, 1, 0, 0.510129,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120657,-99) , +8, 0.919449, 0, 0, 0.368253,-99) , +5, 2.1217, 1, 0, 0.499596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184774,-99) , +7, 0.0501985, 1, 0, 0.489077,-99) , +2, 26.5, 0, 0, 0.510535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294227,-99) , +3, 0.999625, 1, 0, 0.50431,-99) ); + // itree = 525 + fBoostWeights.push_back(0.00384901); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548706,-99) , +6, 0.532254, 1, 0, 0.632125,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648524,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461344,-99) , +5, 1.64489, 1, 0, 0.499182,-99) , +9, 9.80519, 0, 0, 0.506271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311312,-99) , +3, 0.99969, 1, 0, 0.501324,-99) , +12, 0.415723, 0, 0, 0.509591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352912,-99) , +2, 7.5, 0, 0, 0.502063,-99) ); + // itree = 526 + fBoostWeights.push_back(0.00570063); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671401,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479302,-99) , +12, 0.125358, 1, 0, 0.520804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313705,-99) , +14, -5.3152, 0, 0, 0.512669,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33612,-99) , +2, 9.5, 0, 0, 0.455793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263551,-99) , +12, 0.0298522, 0, 0, 0.439027,-99) , +6, 0.821055, 1, 0, 0.491769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315234,-99) , +5, 2.20145, 1, 0, 0.483781,-99) , +12, 0.513631, 0, 0, 0.491147,-99) ); + // itree = 527 + fBoostWeights.push_back(0.0080945); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514536,-99) , +14, -3.06963, 0, 0, 0.605593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448693,-99) , +13, 0.0180746, 1, 0, 0.579655,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466415,-99) , +15, 0.0892507, 0, 0, 0.51933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243705,-99) , +7, 0.031533, 1, 0, 0.500143,-99) , +2, 18.5, 0, 0, 0.527955,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344205,-99) , +2, 8.5, 0, 0, 0.5005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340742,-99) , +15, 1.10829, 1, 0, 0.481569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227453,-99) , +3, 0.866836, 0, 0, 0.46616,-99) , +6, 0.590581, 1, 0, 0.502353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235727,-99) , +4, 2.07717, 1, 0, 0.497726,-99) ); + // itree = 528 + fBoostWeights.push_back(0.00727318); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441975,-99) , +14, -3.86635, 0, 0, 0.525994,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327742,-99) , +1, 13.5, 0, 0, 0.430211,-99) , +8, -0.895085, 0, 0, 0.514763,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428005,-99) , +8, 0.991908, 0, 0, 0.500396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189751,-99) , +8, 0.746796, 0, 0, 0.420131,-99) , +5, 1.99208, 1, 0, 0.502954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230652,-99) , +12, 0.0168791, 0, 0, 0.497767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0283945,-99) , +7, 0.291101, 1, 0, 0.495055,-99) ); + // itree = 529 + fBoostWeights.push_back(0.00604174); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569459,-99) , +10, 3751.01, 0, 0, 0.620539,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301114,-99) , +1, 14.5, 0, 0, 0.511424,-99) , +11, 1.5, 0, 0, 0.570202,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392696,-99) , +15, 0.448686, 1, 0, 0.511682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339095,-99) , +5, 2.06472, 1, 0, 0.494633,-99) , +2, 20.5, 0, 0, 0.52139,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356736,-99) , +15, 0.883232, 1, 0, 0.493367,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3404,-99) , +6, 0.850072, 1, 0, 0.424135,-99) , +3, 0.976419, 0, 0, 0.467242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232544,-99) , +5, 2.31642, 1, 0, 0.462035,-99) , +16, 1038.88, 1, 0, 0.489369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274221,-99) , +3, 0.999696, 1, 0, 0.484718,-99) ); + // itree = 530 + fBoostWeights.push_back(0.00794197); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564396,-99) , +3, 0.9878, 0, 0, 0.618034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542674,-99) , +5, 2.08421, 0, 0, 0.569751,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387128,-99) , +2, 14.5, 0, 0, 0.466903,-99) , +16, 700.025, 1, 0, 0.537775,-99) , +8, 0.324573, 1, 0, 0.566567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432698,-99) , +8, -0.897834, 0, 0, 0.553913,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492333,-99) , +2, 24.5, 0, 0, 0.512534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319482,-99) , +3, 0.745014, 0, 0, 0.504418,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388228,-99) , +9, 2.81538, 0, 0, 0.44599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203224,-99) , +7, 0.065525, 1, 0, 0.405415,-99) , +3, 0.997965, 1, 0, 0.488976,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462109,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130291,-99) , +8, 0.89024, 0, 0, 0.319742,-99) , +4, 1.77613, 1, 0, 0.475453,-99) , +11, 1.5, 0, 0, 0.501728,-99) ); + // itree = 531 + fBoostWeights.push_back(0.00764859); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677647,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504194,-99) , +15, 0.559976, 1, 0, 0.553371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295346,-99) , +12, 0.0173719, 0, 0, 0.54013,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288234,-99) , +7, 0.00897731, 0, 0, 0.486748,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.074613,-99) , +8, -0.410757, 0, 0, 0.343515,-99) , +4, 1.54246, 1, 0, 0.459714,-99) , +12, 0.113273, 1, 0, 0.498747,-99) , +12, 0.497308, 0, 0, 0.505864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255486,-99) , +2, 6.5, 0, 0, 0.500702,-99) ); + // itree = 532 + fBoostWeights.push_back(0.00737435); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672786,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397487,-99) , +12, 0.0312534, 0, 0, 0.510312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285313,-99) , +14, -4.98776, 0, 0, 0.501253,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376059,-99) , +16, 343.087, 1, 0, 0.452722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141102,-99) , +14, -2.51393, 1, 0, 0.394716,-99) , +5, 1.93508, 1, 0, 0.486741,-99) , +12, 0.512884, 0, 0, 0.494033,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.121644,-99) , +4, 2.16192, 1, 0, 0.49044,-99) ); + // itree = 533 + fBoostWeights.push_back(0.00873165); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662831,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632167,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448611,-99) , +9, -1.53113, 1, 0, 0.512619,-99) , +6, 0.206926, 1, 0, 0.552525,-99) , +9, 2.87712, 0, 0, 0.580194,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603392,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218129,-99) , +5, 2.11477, 1, 0, 0.526363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286698,-99) , +8, 0.965171, 1, 0, 0.478405,-99) , +7, 0.0110341, 1, 0, 0.509873,-99) , +0, 16.5, 0, 0, 0.549142,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440009,-99) , +8, -0.807626, 0, 0, 0.548116,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355965,-99) , +10, 2416.27, 1, 0, 0.418106,-99) , +12, 0.0362326, 0, 0, 0.516878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430096,-99) , +2, 21.5, 0, 0, 0.455468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20695,-99) , +7, 0.0934512, 1, 0, 0.439695,-99) , +12, 0.108649, 1, 0, 0.473696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239535,-99) , +4, 1.98884, 1, 0, 0.466871,-99) , +11, 1.5, 0, 0, 0.494165,-99) ); + // itree = 534 + fBoostWeights.push_back(0.00452668); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669419,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229859,-99) , +5, 2.43407, 1, 0, 0.543533,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486249,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294108,-99) , +13, 0.0334742, 1, 0, 0.477683,-99) , +11, 1.5, 0, 0, 0.500136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326176,-99) , +12, 0.019767, 0, 0, 0.494199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316583,-99) , +15, 0.0349629, 0, 0, 0.486986,-99) , +12, 0.527172, 0, 0, 0.49321,-99) ); + // itree = 535 + fBoostWeights.push_back(0.00583809); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548374,-99) , +6, 0.555676, 1, 0, 0.615067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459543,-99) , +14, -3.45711, 0, 0, 0.543374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211302,-99) , +7, 0.0406535, 1, 0, 0.517785,-99) , +1, 15.5, 0, 0, 0.551967,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439519,-99) , +6, 0.786034, 1, 0, 0.501878,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399415,-99) , +10, 11431.7, 0, 0, 0.434579,-99) , +3, 0.991422, 1, 0, 0.480843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23477,-99) , +7, 0.00699733, 0, 0, 0.476116,-99) , +9, 2.92705, 0, 0, 0.494231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294518,-99) , +3, 0.999634, 1, 0, 0.488797,-99) ); + // itree = 536 + fBoostWeights.push_back(0.0101121); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557531,-99) , +13, 0.00220336, 0, 0, 0.617316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443832,-99) , +1, 52.5, 1, 0, 0.5927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195791,-99) , +1, 11.5, 0, 0, 0.576319,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350173,-99) , +14, -4.78448, 0, 0, 0.510764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235074,-99) , +5, 2.24537, 1, 0, 0.50026,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126751,-99) , +2, 16.5, 0, 0, 0.3165,-99) , +7, 0.0330927, 1, 0, 0.481613,-99) , +2, 24.5, 0, 0, 0.503992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260353,-99) , +7, 0.15601, 1, 0, 0.497787,-99) ); + // itree = 537 + fBoostWeights.push_back(0.0064937); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17169,-99) , +4, 1.98895, 1, 0, 0.534809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245434,-99) , +5, 2.24239, 1, 0, 0.527236,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530771,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365449,-99) , +5, 1.37835, 1, 0, 0.402816,-99) , +5, 2.01793, 0, 0, 0.439407,-99) , +14, -3.91751, 0, 0, 0.510248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326743,-99) , +7, 0.135535, 1, 0, 0.503528,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343462,-99) , +9, -0.6685, 0, 0, 0.424371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136854,-99) , +5, 1.82708, 1, 0, 0.392802,-99) , +8, -0.89627, 0, 0, 0.4912,-99) ); + // itree = 538 + fBoostWeights.push_back(0.00663804); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432655,-99) , +8, 0.984724, 1, 0, 0.529719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345807,-99) , +7, 0.0179727, 1, 0, 0.46347,-99) , +2, 11.5, 0, 0, 0.508431,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224793,-99) , +14, -4.04457, 1, 0, 0.383643,-99) , +5, 2.12456, 1, 0, 0.499707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219493,-99) , +13, 0.062928, 1, 0, 0.494743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228164,-99) , +12, 0.0165396, 0, 0, 0.489397,-99) ); + // itree = 539 + fBoostWeights.push_back(0.00807078); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241454,-99) , +7, 0.194184, 1, 0, 0.532648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326492,-99) , +1, 71.5, 1, 0, 0.526693,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329056,-99) , +6, 0.355249, 0, 0, 0.41673,-99) , +14, -4.39248, 0, 0, 0.516958,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540236,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351947,-99) , +3, 0.982362, 0, 0, 0.458713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216678,-99) , +0, 11.5, 1, 0, 0.393247,-99) , +7, 0.00915005, 0, 0, 0.507892,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125386,-99) , +14, -4.23426, 1, 0, 0.285715,-99) , +5, 2.13253, 1, 0, 0.495404,-99) ); + // itree = 540 + fBoostWeights.push_back(0.00821718); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355389,-99) , +5, 2.02144, 1, 0, 0.579224,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430835,-99) , +5, 1.85453, 0, 0, 0.501677,-99) , +14, -3.36795, 0, 0, 0.55184,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278926,-99) , +1, 26.5, 0, 0, 0.45172,-99) , +15, 1.26161, 1, 0, 0.534687,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648178,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392111,-99) , +4, 1.3584, 1, 0, 0.46219,-99) , +12, 0.508978, 0, 0, 0.475287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249039,-99) , +4, 1.8492, 1, 0, 0.461513,-99) , +12, 0.10141, 1, 0, 0.491125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220326,-99) , +12, 0.0174121, 0, 0, 0.485158,-99) ); + // itree = 541 + fBoostWeights.push_back(0.00691055); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495103,-99) , +5, 0.786064, 0, 0, 0.57735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454853,-99) , +2, 9.5, 0, 0, 0.564029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445673,-99) , +8, -0.945819, 0, 0, 0.548126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332873,-99) , +3, 0.987401, 1, 0, 0.429988,-99) , +6, 0.283338, 0, 0, 0.478995,-99) , +14, -3.172, 0, 0, 0.530906,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490751,-99) , +3, 0.998214, 0, 0, 0.58519,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196241,-99) , +7, 0.00736152, 0, 0, 0.458548,-99) , +9, 6.41125, 0, 0, 0.473089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187514,-99) , +7, 0.126792, 1, 0, 0.464393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160949,-99) , +3, 0.748278, 0, 0, 0.455908,-99) , +4, 1.13537, 1, 0, 0.495868,-99) ); + // itree = 542 + fBoostWeights.push_back(0.00358109); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634041,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524578,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459671,-99) , +8, 0.848087, 1, 0, 0.503412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328152,-99) , +13, 0.0254329, 1, 0, 0.494707,-99) , +12, 0.479045, 0, 0, 0.500563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367254,-99) , +5, 0.447282, 0, 0, 0.494405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353821,-99) , +4, 1.91929, 1, 0, 0.488144,-99) ); + // itree = 543 + fBoostWeights.push_back(0.0077992); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.773483,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376942,-99) , +8, 0.989985, 1, 0, 0.555596,-99) , +5, 2.15971, 0, 0, 0.571164,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532157,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279685,-99) , +12, 0.0235362, 0, 0, 0.382801,-99) , +8, 0.147053, 1, 0, 0.455075,-99) , +12, 0.0371721, 0, 0, 0.536702,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592798,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329234,-99) , +8, -0.968545, 0, 0, 0.473986,-99) , +16, 9.16659, 1, 0, 0.487225,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212919,-99) , +9, -0.798497, 1, 0, 0.337666,-99) , +4, 1.6765, 1, 0, 0.469958,-99) , +12, 0.0977799, 1, 0, 0.497219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200453,-99) , +5, 2.48996, 1, 0, 0.494208,-99) ); + // itree = 544 + fBoostWeights.push_back(0.00614551); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499765,-99) , +5, 1.43666, 1, 0, 0.528335,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126174,-99) , +4, 1.5669, 1, 0, 0.423537,-99) , +8, -0.908409, 0, 0, 0.516783,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497128,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270053,-99) , +16, 417.409, 1, 0, 0.353536,-99) , +11, 0.5, 1, 0, 0.419641,-99) , +7, 0.0100032, 0, 0, 0.50625,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23434,-99) , +7, 0.0254813, 1, 0, 0.372741,-99) , +3, 0.999155, 1, 0, 0.497048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254439,-99) , +5, 2.33369, 1, 0, 0.491467,-99) ); + // itree = 545 + fBoostWeights.push_back(0.00417549); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670775,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334068,-99) , +12, 0.0181941, 0, 0, 0.509939,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357027,-99) , +8, 0.737395, 1, 0, 0.434946,-99) , +2, 9.5, 0, 0, 0.497587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307656,-99) , +13, 0.0377037, 1, 0, 0.491714,-99) , +12, 0.521876, 0, 0, 0.498283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257676,-99) , +4, 2.07717, 1, 0, 0.493524,-99) ); + // itree = 546 + fBoostWeights.push_back(0.00961372); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501842,-99) , +6, 0.449762, 1, 0, 0.545724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384766,-99) , +14, -4.879, 0, 0, 0.536066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416685,-99) , +7, 0.00994547, 0, 0, 0.526761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428954,-99) , +8, -0.946433, 0, 0, 0.517249,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63183,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452327,-99) , +9, -3.14441, 1, 0, 0.499632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329898,-99) , +3, 0.997419, 1, 0, 0.473235,-99) , +2, 24.5, 0, 0, 0.503948,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559726,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158966,-99) , +0, 52.5, 1, 0, 0.382898,-99) , +10, -1600.77, 1, 0, 0.421601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.81969, 1, 0, 0.377688,-99) , +14, -2.99741, 1, 0, 0.444234,-99) , +4, 1.29371, 1, 0, 0.490472,-99) ); + // itree = 547 + fBoostWeights.push_back(0.00739806); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640794,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46062,-99) , +1, 12.5, 0, 0, 0.532103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421258,-99) , +3, 0.996557, 1, 0, 0.509264,-99) , +10, -3516.67, 1, 0, 0.527801,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357092,-99) , +13, 0.00816355, 1, 0, 0.528332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32963,-99) , +12, 0.0216857, 0, 0, 0.511965,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311694,-99) , +5, 2.14361, 1, 0, 0.510097,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346704,-99) , +8, 0.950365, 0, 0, 0.390007,-99) , +11, 1.5, 0, 0, 0.429219,-99) , +12, 0.11523, 1, 0, 0.467286,-99) , +4, 0.892497, 1, 0, 0.490619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238437,-99) , +3, 0.999742, 1, 0, 0.486581,-99) ); + // itree = 548 + fBoostWeights.push_back(0.00500364); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471115,-99) , +3, 0.995725, 1, 0, 0.595389,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301703,-99) , +7, 0.0569434, 1, 0, 0.493544,-99) , +2, 36.5, 0, 0, 0.506122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109957,-99) , +7, 0.246898, 1, 0, 0.503806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279851,-99) , +1, 77.5, 1, 0, 0.499063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.197143,-99) , +5, 2.47694, 1, 0, 0.495953,-99) ); + // itree = 549 + fBoostWeights.push_back(0.00873172); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69161,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466158,-99) , +14, -3.2953, 0, 0, 0.526998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32842,-99) , +5, 1.44032, 1, 0, 0.451623,-99) , +13, 0.010969, 1, 0, 0.511553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387656,-99) , +7, 0.00920108, 0, 0, 0.503056,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526764,-99) , +5, 2.14895, 0, 0, 0.595829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324176,-99) , +4, 1.67529, 1, 0, 0.408002,-99) , +2, 13.5, 0, 0, 0.502427,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28076,-99) , +12, 0.0657561, 1, 0, 0.352324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0538286,-99) , +4, 1.96546, 1, 0, 0.310636,-99) , +14, -3.31421, 1, 0, 0.418036,-99) , +5, 1.86021, 1, 0, 0.486456,-99) , +12, 0.534864, 0, 0, 0.493244,-99) ); + // itree = 550 + fBoostWeights.push_back(0.00764154); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378645,-99) , +7, 0.0135534, 0, 0, 0.552633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369624,-99) , +1, 69.5, 1, 0, 0.545461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348424,-99) , +1, 8.5, 0, 0, 0.534879,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457175,-99) , +16, 251.267, 1, 0, 0.492229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140247,-99) , +5, 2.3896, 1, 0, 0.484884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13441,-99) , +7, 0.0280665, 1, 0, 0.46409,-99) , +2, 12.5, 0, 0, 0.507365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227371,-99) , +7, 0.202562, 1, 0, 0.502957,-99) ); + // itree = 551 + fBoostWeights.push_back(0.00663448); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502091,-99) , +6, 0.664325, 1, 0, 0.554878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113429,-99) , +5, 2.28863, 1, 0, 0.549282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349682,-99) , +5, 1.84225, 0, 0, 0.426533,-99) , +14, -4.67523, 0, 0, 0.536109,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472522,-99) , +12, 0.436917, 0, 0, 0.488028,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258847,-99) , +7, 0.00805688, 0, 0, 0.478222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292653,-99) , +3, 0.999337, 1, 0, 0.466989,-99) , +12, 0.130742, 1, 0, 0.50239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259114,-99) , +12, 0.01821, 0, 0, 0.496263,-99) ); + // itree = 552 + fBoostWeights.push_back(0.00763052); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703555,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605051,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336466,-99) , +7, 0.163303, 1, 0, 0.587444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0864161,-99) , +5, 2.36277, 1, 0, 0.501223,-99) , +2, 18.5, 0, 0, 0.536136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408319,-99) , +12, 0.0324153, 0, 0, 0.522109,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464583,-99) , +9, -3.70088, 1, 0, 0.486323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326258,-99) , +7, 0.0813586, 1, 0, 0.471172,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320618,-99) , +3, 0.981933, 0, 0, 0.376823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170347,-99) , +5, 1.86146, 1, 0, 0.329398,-99) , +15, 0.0579109, 0, 0, 0.451543,-99) , +16, 1042.88, 1, 0, 0.483496,-99) , +12, 0.534137, 0, 0, 0.491246,-99) ); + // itree = 553 + fBoostWeights.push_back(0.00895196); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516994,-99) , +6, 0.878008, 1, 0, 0.579055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474186,-99) , +8, 0.982876, 1, 0, 0.563288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425426,-99) , +8, -0.946433, 0, 0, 0.552333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651619,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349484,-99) , +15, 0.0468739, 0, 0, 0.468604,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124446,-99) , +13, 0.00325329, 1, 0, 0.310266,-99) , +4, 1.57522, 1, 0, 0.441039,-99) , +12, 0.525205, 0, 0, 0.454892,-99) , +12, 0.113752, 1, 0, 0.495936,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333716,-99) , +8, 0.138417, 1, 0, 0.39014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17206,-99) , +5, 2.02295, 1, 0, 0.368677,-99) , +12, 0.0312849, 0, 0, 0.484918,-99) ); + // itree = 554 + fBoostWeights.push_back(0.00973972); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670788,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527936,-99) , +16, 1996.06, 1, 0, 0.616804,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471254,-99) , +6, 0.382187, 1, 0, 0.523231,-99) , +10, 4819.88, 1, 0, 0.5633,-99) , +10, 8506.88, 0, 0, 0.587863,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627581,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38462,-99) , +8, 0.774463, 1, 0, 0.488682,-99) , +1, 11.5, 0, 0, 0.554305,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408573,-99) , +2, 16.5, 0, 0, 0.507489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31612,-99) , +3, 0.997214, 1, 0, 0.435956,-99) , +9, -5.51977, 1, 0, 0.500598,-99) , +3, 0.991454, 1, 0, 0.545666,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506335,-99) , +16, 3230.63, 1, 0, 0.560403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468929,-99) , +2, 13.5, 0, 0, 0.527889,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124741,-99) , +7, 0.117073, 1, 0, 0.502033,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15099,-99) , +4, 1.82596, 1, 0, 0.395061,-99) , +9, 2.71883, 0, 0, 0.444531,-99) , +4, 0.840139, 1, 0, 0.475181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14727,-99) , +7, 0.00711479, 0, 0, 0.468661,-99) , +9, -0.82038, 1, 0, 0.501914,-99) ); + // itree = 555 + fBoostWeights.push_back(0.00402715); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207249,-99) , +7, 0.240602, 1, 0, 0.524657,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359114,-99) , +12, 0.0204025, 1, 0, 0.42197,-99) , +12, 0.0312422, 0, 0, 0.515483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369714,-99) , +2, 7.5, 0, 0, 0.508333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294887,-99) , +3, 0.999637, 1, 0, 0.502562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331745,-99) , +5, 2.2453, 1, 0, 0.496233,-99) ); + // itree = 556 + fBoostWeights.push_back(0.00812721); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482225,-99) , +7, 0.0248469, 0, 0, 0.575567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10037,-99) , +1, 17.5, 0, 0, 0.446696,-99) , +7, 0.0798389, 1, 0, 0.548071,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492907,-99) , +12, 0.41423, 0, 0, 0.506115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266019,-99) , +7, 0.0280484, 1, 0, 0.487292,-99) , +2, 16.5, 0, 0, 0.513812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298121,-99) , +12, 0.01821, 0, 0, 0.508332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294673,-99) , +3, 0.999638, 1, 0, 0.502322,-99) ); + // itree = 557 + fBoostWeights.push_back(0.00709586); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305128,-99) , +1, 13.5, 0, 0, 0.619664,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241831,-99) , +7, 0.0523542, 1, 0, 0.501678,-99) , +2, 32.5, 0, 0, 0.517773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229437,-99) , +1, 70.5, 1, 0, 0.512619,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221535,-99) , +1, 31.5, 0, 0, 0.359094,-99) , +15, 1.97104, 1, 0, 0.504318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344704,-99) , +2, 7.5, 0, 0, 0.496639,-99) ); + // itree = 558 + fBoostWeights.push_back(0.00409761); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41393,-99) , +7, 0.105891, 1, 0, 0.525715,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265794,-99) , +6, 0.542072, 1, 0, 0.403524,-99) , +3, 0.830377, 0, 0, 0.51748,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226038,-99) , +5, 1.84832, 1, 0, 0.396931,-99) , +8, -0.972039, 0, 0, 0.510597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237445,-99) , +5, 2.48284, 1, 0, 0.50783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280781,-99) , +3, 0.99965, 1, 0, 0.502031,-99) ); + // itree = 559 + fBoostWeights.push_back(0.00539025); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507363,-99) , +9, 6.26089, 0, 0, 0.516374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385543,-99) , +12, 0.022715, 0, 0, 0.510667,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227192,-99) , +8, 0.985025, 0, 0, 0.384398,-99) , +5, 2.1726, 1, 0, 0.50369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251541,-99) , +7, 0.00744826, 0, 0, 0.497041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268098,-99) , +7, 0.146098, 1, 0, 0.490169,-99) ); + // itree = 560 + fBoostWeights.push_back(0.00501963); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623738,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405892,-99) , +3, 0.998493, 1, 0, 0.536114,-99) , +6, 0.159742, 1, 0, 0.556738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224938,-99) , +5, 2.44721, 1, 0, 0.550237,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463826,-99) , +9, -1.2201, 1, 0, 0.489299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340411,-99) , +4, 1.87392, 1, 0, 0.481553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182163,-99) , +13, 0.0902365, 1, 0, 0.477391,-99) , +11, 1.5, 0, 0, 0.501161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280088,-99) , +12, 0.0195509, 0, 0, 0.495071,-99) ); + // itree = 561 + fBoostWeights.push_back(0.00762488); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701171,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409677,-99) , +5, 0.595822, 0, 0, 0.546939,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356899,-99) , +16, 1341.5, 1, 0, 0.416417,-99) , +13, 0.000545289, 0, 0, 0.524129,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210883,-99) , +3, 0.790357, 0, 0, 0.477446,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141962,-99) , +13, 0.018764, 1, 0, 0.461946,-99) , +5, 1.54838, 1, 0, 0.495206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328801,-99) , +2, 7.5, 0, 0, 0.48764,-99) , +12, 0.526742, 0, 0, 0.495746,-99) ); + // itree = 562 + fBoostWeights.push_back(0.00655584); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483311,-99) , +1, 60.5, 1, 0, 0.59758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286822,-99) , +1, 14.5, 0, 0, 0.577544,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325651,-99) , +8, -0.989378, 0, 0, 0.509309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0910195,-99) , +7, 0.0668663, 1, 0, 0.50138,-99) , +2, 30.5, 0, 0, 0.515887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120215,-99) , +7, 0.324593, 1, 0, 0.513639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263971,-99) , +12, 0.016565, 0, 0, 0.508771,-99) ); + // itree = 563 + fBoostWeights.push_back(0.00642648); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504502,-99) , +12, 0.0455052, 0, 0, 0.552437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437503,-99) , +8, 0.989909, 1, 0, 0.539603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323166,-99) , +12, 0.0173719, 0, 0, 0.528675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253094,-99) , +7, 0.134853, 1, 0, 0.466045,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0609095,-99) , +5, 1.97676, 1, 0, 0.314684,-99) , +7, 0.0100329, 0, 0, 0.450036,-99) , +12, 0.521876, 0, 0, 0.461206,-99) , +12, 0.110552, 1, 0, 0.492846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100883,-99) , +5, 2.49032, 1, 0, 0.489448,-99) ); + // itree = 564 + fBoostWeights.push_back(0.00380083); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646152,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472308,-99) , +12, 0.0984659, 1, 0, 0.497579,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245831,-99) , +15, 0.293628, 1, 0, 0.364283,-99) , +14, -4.87842, 0, 0, 0.489504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155705,-99) , +5, 2.40272, 1, 0, 0.487122,-99) , +12, 0.509317, 0, 0, 0.492634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325062,-99) , +4, 1.98694, 1, 0, 0.487186,-99) ); + // itree = 565 + fBoostWeights.push_back(0.0063871); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679013,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522482,-99) , +9, -6.57191, 1, 0, 0.53403,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374631,-99) , +16, 980.815, 1, 0, 0.425139,-99) , +15, 0.0986616, 0, 0, 0.520966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32737,-99) , +12, 0.0181941, 0, 0, 0.513981,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450404,-99) , +2, 12.5, 0, 0, 0.501322,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229548,-99) , +0, 24.5, 1, 0, 0.406092,-99) , +5, 1.4754, 1, 0, 0.452289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203885,-99) , +4, 1.77503, 1, 0, 0.432391,-99) , +12, 0.197515, 1, 0, 0.492056,-99) , +12, 0.523332, 0, 0, 0.49845,-99) ); + // itree = 566 + fBoostWeights.push_back(0.00366047); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577637,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502827,-99) , +10, 8656.97, 0, 0, 0.515819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226991,-99) , +7, 0.252094, 1, 0, 0.513139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287519,-99) , +7, 0.00711915, 0, 0, 0.508573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304343,-99) , +12, 0.0173719, 0, 0, 0.503966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243161,-99) , +4, 2.07557, 1, 0, 0.499143,-99) ); + // itree = 567 + fBoostWeights.push_back(0.00440353); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498948,-99) , +14, -3.83059, 0, 0, 0.560625,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392605,-99) , +16, 1608.74, 1, 0, 0.45624,-99) , +12, 0.0312838, 0, 0, 0.539097,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477618,-99) , +12, 0.450214, 0, 0, 0.490906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345197,-99) , +3, 0.999241, 1, 0, 0.480908,-99) , +12, 0.10141, 1, 0, 0.505611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317352,-99) , +5, 2.25671, 1, 0, 0.50149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270651,-99) , +4, 2.07376, 1, 0, 0.497032,-99) ); + // itree = 568 + fBoostWeights.push_back(0.00889936); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582223,-99) , +6, 0.436695, 1, 0, 0.613091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440794,-99) , +8, -0.882747, 0, 0, 0.574021,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54245,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344417,-99) , +16, 1072.38, 1, 0, 0.412036,-99) , +15, 0.292528, 1, 0, 0.482332,-99) , +13, 0.00303295, 0, 0, 0.537819,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308583,-99) , +0, 71.5, 1, 0, 0.494511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173447,-99) , +7, 0.00697176, 0, 0, 0.487657,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199815,-99) , +12, 0.402764, 0, 0, 0.310783,-99) , +13, 0.0124359, 1, 0, 0.470559,-99) , +5, 1.43598, 1, 0, 0.499147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244928,-99) , +3, 0.99965, 1, 0, 0.492658,-99) ); + // itree = 569 + fBoostWeights.push_back(0.00491254); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683499,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388143,-99) , +12, 0.01821, 0, 0, 0.549169,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455552,-99) , +11, 1.5, 0, 0, 0.487374,-99) , +12, 0.119779, 1, 0, 0.520274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328634,-99) , +13, 0.0377251, 1, 0, 0.513912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324905,-99) , +5, 2.22775, 1, 0, 0.506589,-99) , +12, 0.526853, 0, 0, 0.513023,-99) ); + // itree = 570 + fBoostWeights.push_back(0.00735102); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446634,-99) , +14, -3.24583, 0, 0, 0.558236,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328982,-99) , +13, 0.0110616, 1, 0, 0.496641,-99) , +5, 1.43395, 1, 0, 0.524254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272156,-99) , +13, 0.0374124, 1, 0, 0.520355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351406,-99) , +12, 0.018893, 0, 0, 0.513127,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619196,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514055,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321043,-99) , +5, 1.47708, 1, 0, 0.404054,-99) , +10, 5054.73, 0, 0, 0.441832,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185193,-99) , +14, -3.5123, 1, 0, 0.316844,-99) , +5, 1.87316, 1, 0, 0.414257,-99) , +12, 0.530061, 0, 0, 0.437594,-99) , +12, 0.196168, 1, 0, 0.490953,-99) ); + // itree = 571 + fBoostWeights.push_back(0.00763706); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407904,-99) , +12, 0.0216686, 0, 0, 0.546008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351864,-99) , +1, 70.5, 1, 0, 0.538144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204671,-99) , +7, 0.265233, 1, 0, 0.533568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369307,-99) , +1, 8.5, 0, 0, 0.523104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469132,-99) , +4, 1.61168, 0, 0, 0.491954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334703,-99) , +8, -0.868147, 0, 0, 0.473559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277404,-99) , +0, 15.5, 1, 0, 0.456581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125151,-99) , +5, 2.11108, 1, 0, 0.43398,-99) , +2, 11.5, 0, 0, 0.495163,-99) ); + // itree = 572 + fBoostWeights.push_back(0.00416621); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488107,-99) , +2, 23.5, 0, 0, 0.505954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308941,-99) , +12, 0.0167728, 0, 0, 0.501563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309924,-99) , +3, 0.999637, 1, 0, 0.496397,-99) , +12, 0.492021, 0, 0, 0.503891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210919,-99) , +4, 2.07376, 1, 0, 0.498755,-99) ); + // itree = 573 + fBoostWeights.push_back(0.00856332); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449547,-99) , +3, 0.997773, 1, 0, 0.607648,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3642,-99) , +14, -4.07462, 0, 0, 0.51456,-99) , +2, 18.5, 0, 0, 0.553041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422633,-99) , +12, 0.0312211, 0, 0, 0.539133,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527857,-99) , +2, 23.5, 0, 0, 0.57261,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41826,-99) , +5, 1.2311, 0, 0, 0.466375,-99) , +13, 0.00535495, 0, 0, 0.516403,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445686,-99) , +10, -4397.94, 1, 0, 0.466118,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128453,-99) , +1, 23.5, 0, 0, 0.308966,-99) , +7, 0.0376424, 1, 0, 0.440565,-99) , +5, 1.434, 1, 0, 0.47267,-99) , +16, 487.289, 1, 0, 0.498004,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0977863,-99) , +4, 1.58306, 1, 0, 0.353267,-99) , +8, -0.967625, 0, 0, 0.489172,-99) ); + // itree = 574 + fBoostWeights.push_back(0.00663223); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670746,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517439,-99) , +14, -3.21315, 0, 0, 0.624564,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499711,-99) , +5, 1.37397, 1, 0, 0.527373,-99) , +9, 2.87221, 0, 0, 0.552536,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439877,-99) , +11, 0.5, 1, 0, 0.492383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275883,-99) , +13, 0.028135, 1, 0, 0.484288,-99) , +16, 1957.71, 1, 0, 0.519172,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327212,-99) , +4, 0.983618, 1, 0, 0.405894,-99) , +8, -0.895998, 0, 0, 0.506206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212303,-99) , +4, 1.96825, 1, 0, 0.497511,-99) ); + // itree = 575 + fBoostWeights.push_back(0.00530674); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663998,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585566,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505459,-99) , +12, 0.0597036, 1, 0, 0.526084,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306343,-99) , +8, 0.901473, 1, 0, 0.426334,-99) , +12, 0.0313038, 0, 0, 0.514225,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348296,-99) , +7, 0.0411596, 1, 0, 0.472481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234271,-99) , +4, 1.74038, 1, 0, 0.450767,-99) , +12, 0.197504, 1, 0, 0.496757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231103,-99) , +7, 0.00691466, 0, 0, 0.492936,-99) , +12, 0.525198, 0, 0, 0.498727,-99) ); + // itree = 576 + fBoostWeights.push_back(0.00798127); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684388,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548841,-99) , +16, 246.539, 1, 0, 0.598306,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401554,-99) , +15, 0.896241, 1, 0, 0.512927,-99) , +3, 0.982253, 1, 0, 0.553805,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38746,-99) , +13, 0.00744093, 1, 0, 0.497175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390727,-99) , +12, 0.0336111, 0, 0, 0.47251,-99) , +6, 0.624575, 1, 0, 0.521434,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463149,-99) , +0, 13.5, 0, 0, 0.53558,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381353,-99) , +4, 1.07904, 1, 0, 0.440797,-99) , +11, 1.5, 0, 0, 0.472023,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213492,-99) , +13, 0.00110587, 1, 0, 0.344922,-99) , +4, 1.58719, 1, 0, 0.450166,-99) , +12, 0.110628, 1, 0, 0.484069,-99) , +12, 0.52367, 0, 0, 0.490602,-99) ); + // itree = 577 + fBoostWeights.push_back(0.00756565); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667167,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524723,-99) , +5, 1.83971, 0, 0, 0.541917,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341213,-99) , +6, 0.413222, 0, 0, 0.429079,-99) , +14, -4.37626, 0, 0, 0.52832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319919,-99) , +5, 2.17084, 1, 0, 0.520432,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56475,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407007,-99) , +5, 1.39883, 1, 0, 0.449828,-99) , +10, -1576.07, 1, 0, 0.470568,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0536709,-99) , +2, 8.5, 0, 0, 0.329387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0670968,-99) , +13, 0.0151349, 1, 0, 0.297091,-99) , +4, 1.5891, 1, 0, 0.443098,-99) , +12, 0.126584, 1, 0, 0.483985,-99) , +12, 0.539953, 0, 0, 0.490394,-99) ); + // itree = 578 + fBoostWeights.push_back(0.0102928); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516563,-99) , +5, 1.38614, 1, 0, 0.57858,-99) , +5, 1.89017, 0, 0, 0.603541,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427055,-99) , +8, 0.966206, 1, 0, 0.558986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407966,-99) , +7, 0.0220775, 1, 0, 0.525512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135222,-99) , +5, 2.35603, 1, 0, 0.514825,-99) , +0, 20.5, 0, 0, 0.554975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592093,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444732,-99) , +8, 0.736834, 1, 0, 0.521212,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389638,-99) , +2, 14.5, 0, 0, 0.451482,-99) , +9, -0.118294, 1, 0, 0.490876,-99) , +10, -2557.42, 1, 0, 0.506617,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632836,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322681,-99) , +12, 0.132158, 1, 0, 0.400931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170656,-99) , +4, 1.81726, 1, 0, 0.367435,-99) , +8, 0.997508, 0, 0, 0.404889,-99) , +5, 1.64941, 1, 0, 0.470124,-99) , +11, 1.5, 0, 0, 0.499065,-99) ); + // itree = 579 + fBoostWeights.push_back(0.00291766); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495249,-99) , +12, 0.124767, 1, 0, 0.519869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391,-99) , +8, -0.982487, 0, 0, 0.513815,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318811,-99) , +7, 0.00714175, 0, 0, 0.509695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293802,-99) , +1, 78.5, 1, 0, 0.50593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226071,-99) , +7, 0.234018, 1, 0, 0.5029,-99) ); + // itree = 580 + fBoostWeights.push_back(0.00708091); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647324,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469177,-99) , +8, -0.90201, 0, 0, 0.556512,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43462,-99) , +5, 1.20441, 0, 0, 0.477493,-99) , +14, -2.77209, 0, 0, 0.531031,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435474,-99) , +16, 534.445, 1, 0, 0.474673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0881312,-99) , +13, 0.0263061, 1, 0, 0.461824,-99) , +5, 1.54853, 1, 0, 0.500061,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389995,-99) , +3, 0.986619, 0, 0, 0.451225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295075,-99) , +6, 0.788097, 1, 0, 0.409588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179953,-99) , +5, 2.04426, 1, 0, 0.382053,-99) , +15, 0.0577334, 0, 0, 0.485441,-99) , +12, 0.510131, 0, 0, 0.49178,-99) ); + // itree = 581 + fBoostWeights.push_back(0.00643259); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498931,-99) , +6, 0.954336, 1, 0, 0.567957,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387316,-99) , +3, 0.886733, 0, 0, 0.498307,-99) , +12, 0.113902, 1, 0, 0.531148,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32643,-99) , +3, 0.997989, 1, 0, 0.46613,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196858,-99) , +4, 1.51588, 1, 0, 0.433796,-99) , +13, 0.0125115, 1, 0, 0.514707,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380366,-99) , +15, 1.54229, 1, 0, 0.430078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172068,-99) , +4, 1.6947, 1, 0, 0.397762,-99) , +12, 0.0313038, 0, 0, 0.504826,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23911,-99) , +2, 6.5, 0, 0, 0.499988,-99) ); + // itree = 582 + fBoostWeights.push_back(0.00341389); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538642,-99) , +13, 0.00215557, 0, 0, 0.602152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442395,-99) , +4, 1.29127, 1, 0, 0.484166,-99) , +12, 0.483704, 0, 0, 0.489892,-99) , +10, -8075.7, 1, 0, 0.497664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242096,-99) , +13, 0.0810049, 1, 0, 0.494406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225607,-99) , +5, 2.49129, 1, 0, 0.491675,-99) ); + // itree = 583 + fBoostWeights.push_back(0.00672675); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509883,-99) , +12, 0.113389, 1, 0, 0.541398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295183,-99) , +15, 3.5749, 1, 0, 0.535657,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494845,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248007,-99) , +7, 0.0263203, 1, 0, 0.372132,-99) , +12, 0.100427, 1, 0, 0.429793,-99) , +8, -0.921946, 0, 0, 0.524034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333505,-99) , +6, 0.363808, 0, 0, 0.463774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223391,-99) , +2, 11.5, 0, 0, 0.404352,-99) , +14, -4.64892, 0, 0, 0.514241,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340227,-99) , +0, 10.5, 1, 0, 0.439632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175807,-99) , +13, 0.00292968, 1, 0, 0.391033,-99) , +7, 0.00903901, 0, 0, 0.505749,-99) ); + // itree = 584 + fBoostWeights.push_back(0.00703261); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501781,-99) , +8, -0.653299, 0, 0, 0.559316,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39222,-99) , +15, 0.39402, 1, 0, 0.481133,-99) , +8, 0.711095, 1, 0, 0.53423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400938,-99) , +5, 0.505267, 0, 0, 0.524741,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463133,-99) , +11, 1.5, 0, 0, 0.506811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296061,-99) , +1, 7.5, 0, 0, 0.490357,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504279,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291535,-99) , +16, 256.534, 1, 0, 0.358822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0730206,-99) , +5, 2.15499, 1, 0, 0.325281,-99) , +14, -2.22444, 1, 0, 0.462788,-99) , +5, 1.68542, 1, 0, 0.503199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0886364,-99) , +7, 0.330462, 1, 0, 0.500967,-99) ); + // itree = 585 + fBoostWeights.push_back(0.00408396); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503331,-99) , +16, 359.511, 1, 0, 0.548765,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272369,-99) , +3, 0.734285, 0, 0, 0.48799,-99) , +11, 1.5, 0, 0, 0.508362,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329645,-99) , +8, -0.987046, 0, 0, 0.502654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0662241,-99) , +5, 2.57722, 1, 0, 0.500444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20292,-99) , +13, 0.0811795, 1, 0, 0.496999,-99) ); + // itree = 586 + fBoostWeights.push_back(0.00595262); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674428,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482324,-99) , +8, 0.867625, 1, 0, 0.54978,-99) , +4, 1.70075, 0, 0, 0.566282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447293,-99) , +15, 0.204964, 0, 0, 0.545296,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505527,-99) , +2, 28.5, 0, 0, 0.527841,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4285,-99) , +8, 0.998224, 0, 0, 0.44739,-99) , +4, 0.985927, 1, 0, 0.480959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.08576,-99) , +7, 0.2509, 1, 0, 0.477521,-99) , +12, 0.0915734, 1, 0, 0.499272,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385582,-99) , +3, 0.978508, 0, 0, 0.451061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283134,-99) , +10, 4827.37, 1, 0, 0.395817,-99) , +12, 0.0324514, 0, 0, 0.490085,-99) ); + // itree = 587 + fBoostWeights.push_back(0.00806991); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660781,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575642,-99) , +5, 1.73873, 0, 0, 0.604565,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40966,-99) , +16, 281.047, 1, 0, 0.504789,-99) , +0, 12.5, 0, 0, 0.578687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4739,-99) , +7, 0.0666069, 1, 0, 0.564655,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330687,-99) , +0, 16.5, 0, 0, 0.442698,-99) , +8, 0.970868, 1, 0, 0.540753,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447692,-99) , +3, 0.996406, 1, 0, 0.526558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232602,-99) , +3, 0.796242, 0, 0, 0.512081,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415204,-99) , +4, 0.712906, 1, 0, 0.446999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199167,-99) , +13, 0.0334568, 1, 0, 0.434677,-99) , +11, 0.5, 1, 0, 0.47239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169666,-99) , +4, 2.01798, 1, 0, 0.46599,-99) , +11, 1.5, 0, 0, 0.491169,-99) ); + // itree = 588 + fBoostWeights.push_back(0.0064349); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534112,-99) , +3, 0.982174, 1, 0, 0.579095,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435871,-99) , +3, 0.939272, 0, 0, 0.517239,-99) , +16, 1351.3, 1, 0, 0.548642,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391782,-99) , +8, -0.883078, 0, 0, 0.505618,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0264413,-99) , +3, 0.88979, 0, 0, 0.410642,-99) , +4, 1.49261, 1, 0, 0.483767,-99) , +12, 0.110653, 1, 0, 0.512619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29371,-99) , +12, 0.0181796, 0, 0, 0.506853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269202,-99) , +3, 0.999629, 1, 0, 0.500416,-99) ); + // itree = 589 + fBoostWeights.push_back(0.00401953); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560012,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498299,-99) , +5, 1.4018, 1, 0, 0.521962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317245,-99) , +1, 69.5, 1, 0, 0.516772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177747,-99) , +7, 0.265306, 1, 0, 0.514079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345232,-99) , +8, 0.251443, 1, 0, 0.413859,-99) , +12, 0.0314081, 0, 0, 0.50523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319238,-99) , +8, -0.983988, 0, 0, 0.49759,-99) ); + // itree = 590 + fBoostWeights.push_back(0.00492379); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525426,-99) , +10, 14822.3, 1, 0, 0.590606,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405783,-99) , +7, 0.00867743, 0, 0, 0.510966,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301027,-99) , +9, 4.79383, 0, 0, 0.416807,-99) , +3, 0.998659, 1, 0, 0.502456,-99) , +9, -6.53706, 1, 0, 0.510244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314689,-99) , +13, 0.0725779, 1, 0, 0.507342,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10824,-99) , +14, -2.91165, 1, 0, 0.366905,-99) , +4, 1.83119, 1, 0, 0.498579,-99) ); + // itree = 591 + fBoostWeights.push_back(0.00415975); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5264,-99) , +2, 28.5, 0, 0, 0.547998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330851,-99) , +7, 0.00887992, 0, 0, 0.481525,-99) , +16, 486.476, 1, 0, 0.507483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370245,-99) , +12, 0.0239286, 0, 0, 0.500609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302668,-99) , +3, 0.99965, 1, 0, 0.495559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176979,-99) , +5, 2.48276, 1, 0, 0.492789,-99) ); + // itree = 592 + fBoostWeights.push_back(0.00519998); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471276,-99) , +6, 0.849712, 1, 0, 0.521489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353217,-99) , +5, 2.3088, 1, 0, 0.516734,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417742,-99) , +12, 0.215218, 0, 0, 0.468027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160375,-99) , +4, 1.31469, 1, 0, 0.404028,-99) , +13, 0.0187606, 1, 0, 0.506685,-99) , +12, 0.526395, 0, 0, 0.512758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216873,-99) , +7, 0.00711697, 0, 0, 0.507353,-99) ); + // itree = 593 + fBoostWeights.push_back(0.00795973); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522035,-99) , +13, 0.00202506, 0, 0, 0.57639,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249834,-99) , +7, 0.0422355, 1, 0, 0.509651,-99) , +2, 21.5, 0, 0, 0.533685,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22289,-99) , +7, 0.0314698, 1, 0, 0.471276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24398,-99) , +3, 0.945, 0, 0, 0.443496,-99) , +1, 9.5, 0, 0, 0.517316,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446376,-99) , +13, 0.0017239, 0, 0, 0.543987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353589,-99) , +7, 0.0351976, 1, 0, 0.476762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228739,-99) , +5, 1.84417, 1, 0, 0.434203,-99) , +3, 0.997886, 1, 0, 0.50343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333502,-99) , +8, -0.984885, 0, 0, 0.496011,-99) ); + // itree = 594 + fBoostWeights.push_back(0.00645426); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678546,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.41103, 1, 0, 0.511928,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358977,-99) , +6, 0.601652, 0, 0, 0.417163,-99) , +8, 0.981053, 1, 0, 0.49633,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308972,-99) , +12, 0.19606, 1, 0, 0.425512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0813682,-99) , +5, 1.95197, 1, 0, 0.404472,-99) , +8, -0.851892, 0, 0, 0.483727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.329358, 1, 0, 0.481517,-99) , +12, 0.526248, 0, 0, 0.488093,-99) ); + // itree = 595 + fBoostWeights.push_back(0.0060522); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528304,-99) , +6, 0.216439, 1, 0, 0.553926,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416957,-99) , +12, 0.188558, 1, 0, 0.48262,-99) , +16, 272.755, 1, 0, 0.505891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.282135, 1, 0, 0.502923,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345063,-99) , +9, 0.211571, 0, 0, 0.412458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252157,-99) , +12, 0.0165266, 0, 0, 0.369099,-99) , +12, 0.0286101, 0, 0, 0.493236,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209178,-99) , +2, 6.5, 0, 0, 0.487866,-99) ); + // itree = 596 + fBoostWeights.push_back(0.00514335); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459251,-99) , +6, 0.954845, 1, 0, 0.568172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40116,-99) , +8, 0.990339, 1, 0, 0.550532,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482879,-99) , +2, 29.5, 0, 0, 0.497199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239457,-99) , +7, 0.145707, 1, 0, 0.490642,-99) , +12, 0.109496, 1, 0, 0.516701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361402,-99) , +5, 2.2429, 1, 0, 0.510551,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261416,-99) , +15, 4.08392, 1, 0, 0.506419,-99) ); + // itree = 597 + fBoostWeights.push_back(0.00892717); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456765,-99) , +7, 0.0243392, 0, 0, 0.572269,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315596,-99) , +7, 0.0279179, 1, 0, 0.493064,-99) , +2, 17.5, 0, 0, 0.530252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.064115,-99) , +7, 0.250303, 1, 0, 0.52738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288232,-99) , +1, 74.5, 1, 0, 0.520063,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468477,-99) , +16, 150.911, 1, 0, 0.509663,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.079677,-99) , +4, 1.7981, 1, 0, 0.385109,-99) , +12, 0.185823, 1, 0, 0.467453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231116,-99) , +3, 0.931807, 0, 0, 0.447871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0705943,-99) , +7, 0.0430966, 1, 0, 0.427371,-99) , +1, 9.5, 0, 0, 0.500619,-99) ); + // itree = 598 + fBoostWeights.push_back(0.00552658); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561843,-99) , +10, 2896, 1, 0, 0.615454,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101539,-99) , +4, 1.96838, 1, 0, 0.533597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427932,-99) , +8, 0.979392, 1, 0, 0.518623,-99) , +12, 0.0855194, 0, 0, 0.536992,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500665,-99) , +16, 2545.96, 1, 0, 0.559816,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231653,-99) , +7, 0.0358624, 1, 0, 0.458389,-99) , +2, 18.5, 0, 0, 0.487102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346581,-99) , +7, 0.0844831, 1, 0, 0.475984,-99) , +12, 0.101389, 1, 0, 0.500102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372482,-99) , +12, 0.0217797, 0, 0, 0.494913,-99) ); + // itree = 599 + fBoostWeights.push_back(0.00427167); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456466,-99) , +6, 0.771483, 1, 0, 0.599923,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391646,-99) , +3, 0.827782, 0, 0, 0.50355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334223,-99) , +14, -5.41849, 0, 0, 0.497396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300642,-99) , +2, 6.5, 0, 0, 0.492909,-99) , +10, -6147.49, 1, 0, 0.501995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282636,-99) , +3, 0.999662, 1, 0, 0.496528,-99) ); + // itree = 600 + fBoostWeights.push_back(0.00487177); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49972,-99) , +1, 11.5, 0, 0, 0.603725,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367868,-99) , +8, -0.974302, 0, 0, 0.500045,-99) , +6, 0.0723653, 1, 0, 0.51182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125664,-99) , +5, 2.5697, 1, 0, 0.509761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230957,-99) , +2, 6.5, 0, 0, 0.504339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168304,-99) , +3, 0.999757, 1, 0, 0.49992,-99) ); + // itree = 601 + fBoostWeights.push_back(0.00592505); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580368,-99) , +2, 21.5, 0, 0, 0.61854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592429,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470123,-99) , +9, 0.555054, 0, 0, 0.525376,-99) , +8, -0.373687, 0, 0, 0.579655,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388942,-99) , +12, 0.142552, 0, 0, 0.477241,-99) , +8, 0.914378, 1, 0, 0.557814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438874,-99) , +5, 0.482572, 0, 0, 0.544296,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280863,-99) , +3, 0.730154, 0, 0, 0.480795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235135,-99) , +5, 2.48979, 1, 0, 0.477224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262319,-99) , +3, 0.999582, 1, 0, 0.472277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160311,-99) , +7, 0.170523, 1, 0, 0.466308,-99) , +4, 0.902363, 1, 0, 0.497422,-99) ); + // itree = 602 + fBoostWeights.push_back(0.00664841); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477445,-99) , +8, -0.812219, 0, 0, 0.578958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399756,-99) , +14, -4.02938, 0, 0, 0.560073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449213,-99) , +5, 0.505825, 0, 0, 0.544573,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495474,-99) , +15, 0.0274738, 1, 0, 0.504353,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0971961,-99) , +4, 1.68851, 1, 0, 0.424107,-99) , +8, -0.351566, 0, 0, 0.484099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133228,-99) , +7, 0.209122, 1, 0, 0.479453,-99) , +4, 0.834463, 1, 0, 0.502438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2596,-99) , +12, 0.0181829, 0, 0, 0.496823,-99) ); + // itree = 603 + fBoostWeights.push_back(0.00458452); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413633,-99) , +8, -0.923969, 0, 0, 0.511494,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214887,-99) , +14, -3.03715, 1, 0, 0.388913,-99) , +4, 1.82954, 1, 0, 0.503742,-99) , +10, -13239.1, 1, 0, 0.509389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293219,-99) , +7, 0.170607, 1, 0, 0.504353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228082,-99) , +2, 6.5, 0, 0, 0.498984,-99) ); + // itree = 604 + fBoostWeights.push_back(0.00515192); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524293,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440738,-99) , +1, 8.5, 0, 0, 0.513461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322557,-99) , +4, 1.9965, 1, 0, 0.507901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123685,-99) , +7, 0.248758, 1, 0, 0.504095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273586,-99) , +12, 0.0182006, 0, 0, 0.497565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1837,-99) , +2, 6.5, 0, 0, 0.491528,-99) ); + // itree = 605 + fBoostWeights.push_back(0.0031989); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343137,-99) , +13, 0.0551611, 1, 0, 0.517852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312773,-99) , +7, 0.00714056, 0, 0, 0.513933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3296,-99) , +3, 0.99965, 1, 0, 0.508879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357779,-99) , +5, 2.23631, 1, 0, 0.502519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34121,-99) , +8, -0.984777, 0, 0, 0.496236,-99) ); + // itree = 606 + fBoostWeights.push_back(0.00342897); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443087,-99) , +8, 0.983387, 1, 0, 0.514778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339577,-99) , +12, 0.018167, 0, 0, 0.509759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372192,-99) , +13, 0.0311859, 1, 0, 0.503681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348806,-99) , +5, 2.2429, 1, 0, 0.497679,-99) , +12, 0.525205, 0, 0, 0.504699,-99) ); + // itree = 607 + fBoostWeights.push_back(0.00454439); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599682,-99) , +6, 0.699487, 1, 0, 0.642663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534146,-99) , +8, 0.631008, 1, 0, 0.59856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345277,-99) , +5, 2.02669, 1, 0, 0.580281,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509826,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316881,-99) , +1, 83.5, 1, 0, 0.505573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319913,-99) , +2, 6.5, 0, 0, 0.501352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314809,-99) , +1, 6.5, 0, 0, 0.495527,-99) , +9, 4.39396, 0, 0, 0.508409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24582,-99) , +3, 0.999694, 1, 0, 0.502557,-99) ); + // itree = 608 + fBoostWeights.push_back(0.00568785); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.690501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583905,-99) , +3, 0.942169, 1, 0, 0.616282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46902,-99) , +7, 0.0126871, 0, 0, 0.589431,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403267,-99) , +14, -4.5566, 0, 0, 0.566347,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478639,-99) , +9, -0.2581, 1, 0, 0.503565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289123,-99) , +3, 0.999668, 1, 0, 0.49849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35673,-99) , +3, 0.834605, 0, 0, 0.490387,-99) , +6, 0.159724, 1, 0, 0.506985,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309598,-99) , +2, 12.5, 0, 0, 0.389572,-99) , +9, 0.55831, 0, 0, 0.438251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.63748, 1, 0, 0.415078,-99) , +8, -0.854893, 0, 0, 0.495028,-99) ); + // itree = 609 + fBoostWeights.push_back(0.00662608); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558943,-99) , +7, 0.0175089, 0, 0, 0.642989,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452706,-99) , +13, 0.0034226, 0, 0, 0.504934,-99) , +3, 0.98509, 1, 0, 0.579862,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503845,-99) , +3, 0.992545, 1, 0, 0.556334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453515,-99) , +9, -1.13342, 1, 0, 0.526786,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389528,-99) , +5, 1.86222, 1, 0, 0.490968,-99) , +9, 0.26292, 0, 0, 0.533781,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611255,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284062,-99) , +13, 0.0314274, 1, 0, 0.482128,-99) , +12, 0.411832, 0, 0, 0.4915,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284238,-99) , +4, 1.30436, 1, 0, 0.37907,-99) , +3, 0.922896, 0, 0, 0.476218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259007,-99) , +3, 0.999625, 1, 0, 0.470084,-99) , +6, 0.292796, 1, 0, 0.492479,-99) ); + // itree = 610 + fBoostWeights.push_back(0.00484632); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505922,-99) , +2, 12.5, 1, 0, 0.601133,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384731,-99) , +14, -4.75471, 0, 0, 0.510531,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350959,-99) , +16, 1010.28, 1, 0, 0.408031,-99) , +15, 0.060391, 0, 0, 0.499171,-99) , +12, 0.38835, 0, 0, 0.507219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350226,-99) , +8, -0.974523, 0, 0, 0.499018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304692,-99) , +5, 2.25689, 1, 0, 0.492463,-99) ); + // itree = 611 + fBoostWeights.push_back(0.00832946); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568657,-99) , +8, -0.464565, 0, 0, 0.628274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530298,-99) , +2, 13.5, 0, 0, 0.591701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373354,-99) , +8, 0.912918, 1, 0, 0.547816,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506433,-99) , +5, 1.91442, 0, 0, 0.53641,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423072,-99) , +11, 0.5, 1, 0, 0.470191,-99) , +16, 470.246, 1, 0, 0.495267,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485907,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1869,-99) , +12, 0.411625, 0, 0, 0.284929,-99) , +5, 1.44026, 1, 0, 0.385956,-99) , +13, 0.0103388, 1, 0, 0.477304,-99) , +4, 0.75728, 1, 0, 0.495994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336773,-99) , +5, 0.481968, 0, 0, 0.489295,-99) ); + // itree = 612 + fBoostWeights.push_back(0.00818217); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513678,-99) , +13, 0.0189085, 1, 0, 0.579484,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368138,-99) , +12, 0.074483, 0, 0, 0.489622,-99) , +8, 0.609563, 1, 0, 0.551361,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339034,-99) , +14, -4.38754, 0, 0, 0.504049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213142,-99) , +7, 0.0768742, 1, 0, 0.487957,-99) , +5, 1.41941, 1, 0, 0.523981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37131,-99) , +5, 0.482621, 0, 0, 0.514621,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504708,-99) , +7, 0.0146487, 1, 0, 0.548481,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416733,-99) , +10, 6009.25, 0, 0, 0.460915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293332,-99) , +1, 9.5, 0, 0, 0.426391,-99) , +16, 65.8124, 1, 0, 0.45582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287867,-99) , +3, 0.99789, 1, 0, 0.43231,-99) , +5, 1.75514, 1, 0, 0.491414,-99) ); + // itree = 613 + fBoostWeights.push_back(0.00956906); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548772,-99) , +10, -3920.67, 1, 0, 0.561518,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402262,-99) , +4, 1.36715, 0, 0, 0.462688,-99) , +12, 0.0313038, 0, 0, 0.548149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244617,-99) , +4, 2.06283, 1, 0, 0.543269,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501323,-99) , +9, 3.42779, 0, 0, 0.52611,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34755,-99) , +13, 0.00281818, 1, 0, 0.41297,-99) , +7, 0.0141598, 0, 0, 0.49771,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232957,-99) , +5, 1.88596, 1, 0, 0.35579,-99) , +12, 0.438322, 0, 0, 0.386663,-99) , +4, 1.27044, 1, 0, 0.456272,-99) , +12, 0.113902, 1, 0, 0.496664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170228,-99) , +12, 0.01821, 0, 0, 0.489683,-99) ); + // itree = 614 + fBoostWeights.push_back(0.00340437); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497279,-99) , +12, 0.10141, 1, 0, 0.519757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373063,-99) , +12, 0.02276, 0, 0, 0.513374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219623,-99) , +7, 0.251777, 1, 0, 0.510381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278463,-99) , +2, 6.5, 0, 0, 0.506034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142944,-99) , +5, 2.54934, 1, 0, 0.50376,-99) ); + // itree = 615 + fBoostWeights.push_back(0.00672599); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551275,-99) , +13, 0.0028034, 0, 0, 0.59817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516124,-99) , +8, -0.764819, 0, 0, 0.579095,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454348,-99) , +4, 0.794509, 0, 0, 0.507296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40796,-99) , +7, 0.0189531, 0, 0, 0.479949,-99) , +6, 0.698511, 1, 0, 0.534973,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452544,-99) , +1, 9.5, 0, 0, 0.532064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311104,-99) , +12, 0.0192724, 0, 0, 0.518017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594307,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203722,-99) , +7, 0.00796797, 0, 0, 0.416357,-99) , +12, 0.411844, 0, 0, 0.44176,-99) , +12, 0.111319, 1, 0, 0.475853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0263467,-99) , +7, 0.203231, 1, 0, 0.471327,-99) , +5, 1.37991, 1, 0, 0.496063,-99) ); + // itree = 616 + fBoostWeights.push_back(0.00635294); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513619,-99) , +9, -6.90816, 1, 0, 0.522112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334552,-99) , +3, 0.999638, 1, 0, 0.516664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301104,-99) , +14, -5.73444, 0, 0, 0.511388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213809,-99) , +4, 1.3996, 1, 0, 0.362032,-99) , +7, 0.00922688, 0, 0, 0.499403,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0838818,-99) , +1, 25.5, 0, 0, 0.340403,-99) , +7, 0.0979288, 1, 0, 0.489249,-99) ); + // itree = 617 + fBoostWeights.push_back(0.00457561); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557424,-99) , +5, 1.96437, 0, 0, 0.574884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458935,-99) , +14, -4.72785, 0, 0, 0.562408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410201,-99) , +8, -0.921296, 0, 0, 0.54891,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295922,-99) , +3, 0.9996, 1, 0, 0.494723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122597,-99) , +7, 0.291115, 1, 0, 0.491282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122281,-99) , +5, 2.31658, 1, 0, 0.486291,-99) , +11, 1.5, 0, 0, 0.506685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186252,-99) , +4, 2.21951, 1, 0, 0.504567,-99) ); + // itree = 618 + fBoostWeights.push_back(0.00931557); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682401,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517422,-99) , +16, 1424.04, 0, 0, 0.57641,-99) , +16, 22.6849, 1, 0, 0.610054,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624711,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447396,-99) , +3, 0.955182, 1, 0, 0.49288,-99) , +5, 1.35376, 1, 0, 0.535004,-99) , +6, 0.552461, 0, 0, 0.56936,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379552,-99) , +6, 0.399496, 1, 0, 0.458741,-99) , +2, 9.5, 0, 0, 0.552643,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521661,-99) , +11, 0.5, 1, 0, 0.580696,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3945,-99) , +15, 0.0619502, 0, 0, 0.497312,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245039,-99) , +9, -5.69158, 1, 0, 0.347002,-99) , +3, 0.997886, 1, 0, 0.47885,-99) , +9, 4.17743, 0, 0, 0.497468,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445814,-99) , +4, 1.94016, 0, 0, 0.51611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233227,-99) , +8, 0.934547, 0, 0, 0.387948,-99) , +5, 1.90809, 1, 0, 0.480323,-99) , +11, 1.5, 0, 0, 0.504717,-99) ); + // itree = 619 + fBoostWeights.push_back(0.00629476); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534675,-99) , +13, 0.00547448, 0, 0, 0.586391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49676,-99) , +1, 38.5, 1, 0, 0.563074,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.119934,-99) , +4, 2.14444, 1, 0, 0.50101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0942737,-99) , +0, 39.5, 1, 0, 0.494449,-99) , +2, 24.5, 0, 0, 0.509967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298784,-99) , +7, 0.00711731, 0, 0, 0.505341,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0587693,-99) , +4, 1.27731, 1, 0, 0.367931,-99) , +7, 0.109479, 1, 0, 0.497834,-99) ); + // itree = 620 + fBoostWeights.push_back(0.0045994); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490703,-99) , +12, 0.0406205, 0, 0, 0.555934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428861,-99) , +14, -4.64824, 0, 0, 0.541319,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46265,-99) , +0, 14.5, 0, 0, 0.535423,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218379,-99) , +7, 0.0783667, 1, 0, 0.456096,-99) , +5, 1.34391, 1, 0, 0.48255,-99) , +12, 0.111253, 1, 0, 0.508772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330394,-99) , +12, 0.01821, 0, 0, 0.504238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368178,-99) , +8, -0.982503, 0, 0, 0.49801,-99) ); + // itree = 621 + fBoostWeights.push_back(0.0061981); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645877,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533218,-99) , +4, 0.196586, 1, 0, 0.54501,-99) , +10, -5524.97, 1, 0, 0.554718,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467662,-99) , +3, 0.989805, 1, 0, 0.528392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25173,-99) , +7, 0.00867867, 0, 0, 0.443038,-99) , +4, 0.95691, 1, 0, 0.478005,-99) , +12, 0.124483, 1, 0, 0.513004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0890905,-99) , +7, 0.25306, 1, 0, 0.509409,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253987,-99) , +14, -3.34777, 0, 0, 0.380354,-99) , +12, 0.0313553, 0, 0, 0.498473,-99) ); + // itree = 622 + fBoostWeights.push_back(0.00707393); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518254,-99) , +0, 14.5, 0, 0, 0.598125,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276167,-99) , +5, 2.20101, 1, 0, 0.531934,-99) , +11, 1.5, 0, 0, 0.555363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391998,-99) , +15, 4.07537, 1, 0, 0.54702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392131,-99) , +14, -4.64986, 0, 0, 0.530255,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435371,-99) , +1, 10.5, 0, 0, 0.532897,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35758,-99) , +7, 0.0274848, 1, 0, 0.452564,-99) , +4, 0.818764, 1, 0, 0.481748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30769,-99) , +7, 0.0087011, 0, 0, 0.471354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168889,-99) , +4, 1.95618, 1, 0, 0.461717,-99) , +12, 0.101342, 1, 0, 0.4915,-99) ); + // itree = 623 + fBoostWeights.push_back(0.00642686); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487671,-99) , +12, 0.038432, 0, 0, 0.541758,-99) , +6, 0.097552, 1, 0, 0.553537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351092,-99) , +12, 0.0182006, 0, 0, 0.541861,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314776,-99) , +3, 0.999207, 1, 0, 0.516457,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261837,-99) , +6, 0.84881, 1, 0, 0.411653,-99) , +7, 0.0146042, 0, 0, 0.485178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215121,-99) , +7, 0.133595, 1, 0, 0.476654,-99) , +12, 0.111424, 1, 0, 0.50667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296705,-99) , +5, 2.33369, 1, 0, 0.501465,-99) ); + // itree = 624 + fBoostWeights.push_back(0.00675673); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528852,-99) , +1, 16.5, 0, 0, 0.598547,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421909,-99) , +8, 0.988177, 1, 0, 0.538898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333633,-99) , +12, 0.0182039, 0, 0, 0.52708,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493002,-99) , +2, 23.5, 0, 0, 0.539999,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318808,-99) , +7, 0.0274406, 1, 0, 0.425172,-99) , +5, 1.2521, 1, 0, 0.460654,-99) , +12, 0.113524, 1, 0, 0.492511,-99) , +6, 0.0693099, 1, 0, 0.503876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311518,-99) , +5, 2.24529, 1, 0, 0.496899,-99) ); + // itree = 625 + fBoostWeights.push_back(0.0082037); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510571,-99) , +2, 24.5, 0, 0, 0.532169,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527825,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154324,-99) , +5, 1.46876, 1, 0, 0.405632,-99) , +7, 0.0845847, 1, 0, 0.521873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381349,-99) , +5, 0.482764, 0, 0, 0.51487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332878,-99) , +7, 0.0230812, 0, 0, 0.412613,-99) , +14, -4.63951, 0, 0, 0.507031,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0951859,-99) , +14, -3.34624, 1, 0, 0.283275,-99) , +5, 2.15673, 1, 0, 0.495665,-99) ); + // itree = 626 + fBoostWeights.push_back(0.00603125); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523262,-99) , +8, 0.913648, 1, 0, 0.580011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4508,-99) , +16, 1.89422, 0, 0, 0.568379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459611,-99) , +12, 0.0335996, 0, 0, 0.554062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410151,-99) , +13, 0.0217785, 1, 0, 0.544284,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458003,-99) , +7, 0.105872, 1, 0, 0.56843,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237816,-99) , +7, 0.0412738, 1, 0, 0.473639,-99) , +2, 26.5, 0, 0, 0.495574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297749,-99) , +8, -0.982765, 0, 0, 0.486603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311249,-99) , +4, 1.88359, 1, 0, 0.47824,-99) , +16, 471.701, 1, 0, 0.503484,-99) ); + // itree = 627 + fBoostWeights.push_back(0.00674788); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.712224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56159,-99) , +4, 1.90794, 0, 0, 0.570427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477037,-99) , +7, 0.0115708, 0, 0, 0.556453,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442521,-99) , +6, 0.430912, 0, 0, 0.512608,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331548,-99) , +6, 0.813097, 1, 0, 0.46303,-99) , +12, 0.0324855, 0, 0, 0.535989,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477582,-99) , +11, 1.5, 0, 0, 0.50094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343733,-99) , +2, 7.5, 0, 0, 0.492388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245392,-99) , +15, 0.0612248, 1, 0, 0.333888,-99) , +4, 1.6372, 1, 0, 0.471913,-99) , +12, 0.110588, 1, 0, 0.501771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135604,-99) , +5, 2.43801, 1, 0, 0.497603,-99) ); + // itree = 628 + fBoostWeights.push_back(0.00639568); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708295,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503169,-99) , +10, -4107.93, 1, 0, 0.513801,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306732,-99) , +12, 0.340796, 0, 0, 0.402188,-99) , +15, 0.0439201, 0, 0, 0.504787,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189556,-99) , +5, 1.46347, 1, 0, 0.379222,-99) , +13, 0.0176813, 1, 0, 0.492853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.092065,-99) , +5, 2.48281, 1, 0, 0.489425,-99) , +12, 0.526826, 0, 0, 0.498436,-99) ); + // itree = 629 + fBoostWeights.push_back(0.00562633); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668715,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529212,-99) , +9, -5.46141, 1, 0, 0.55019,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0510538,-99) , +4, 2.00673, 1, 0, 0.482553,-99) , +11, 1.5, 0, 0, 0.505588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486954,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258547,-99) , +5, 1.3799, 1, 0, 0.406666,-99) , +13, 0.0163334, 1, 0, 0.494821,-99) , +12, 0.495577, 0, 0, 0.50172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320123,-99) , +5, 2.26544, 1, 0, 0.495717,-99) ); + // itree = 630 + fBoostWeights.push_back(0.00904785); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68091,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440093,-99) , +13, 0.010528, 1, 0, 0.553757,-99) , +5, 1.16096, 1, 0, 0.577603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428381,-99) , +8, -0.906444, 0, 0, 0.562329,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518216,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268414,-99) , +6, 1.00406, 0, 0, 0.450232,-99) , +6, 0.954833, 1, 0, 0.543494,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527955,-99) , +11, 0.5, 1, 0, 0.600488,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337626,-99) , +4, 1.69251, 1, 0, 0.511304,-99) , +12, 0.0612136, 1, 0, 0.548654,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295689,-99) , +13, 0.000449114, 0, 0, 0.399999,-99) , +12, 0.0342795, 0, 0, 0.518263,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60592,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368164,-99) , +7, 0.0147658, 0, 0, 0.451733,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16401,-99) , +5, 1.37961, 1, 0, 0.323555,-99) , +13, 0.0151612, 1, 0, 0.427804,-99) , +12, 0.491658, 0, 0, 0.44247,-99) , +12, 0.113622, 1, 0, 0.475853,-99) , +16, 450.53, 1, 0, 0.501577,-99) ); + // itree = 631 + fBoostWeights.push_back(0.00648773); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556642,-99) , +15, 0.211911, 0, 0, 0.615575,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326292,-99) , +5, 2.11387, 1, 0, 0.529258,-99) , +16, 15.369, 0, 0, 0.569059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377587,-99) , +8, -0.880667, 0, 0, 0.546794,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485777,-99) , +10, 11031.9, 0, 0, 0.496318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283193,-99) , +5, 2.1526, 1, 0, 0.49251,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41227,-99) , +16, 3264.37, 1, 0, 0.506973,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125778,-99) , +13, 0.00550577, 1, 0, 0.323406,-99) , +3, 0.992614, 0, 0, 0.413226,-99) , +4, 1.5357, 1, 0, 0.476904,-99) , +16, 86.7738, 1, 0, 0.494271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289093,-99) , +7, 0.15287, 1, 0, 0.488831,-99) ); + // itree = 632 + fBoostWeights.push_back(0.00784662); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.730676,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517967,-99) , +6, 0.765793, 1, 0, 0.595051,-99) , +4, 1.64671, 0, 0, 0.614807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461761,-99) , +14, -3.43669, 0, 0, 0.582513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238896,-99) , +4, 1.97393, 1, 0, 0.568862,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610542,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314145,-99) , +14, -5.06717, 0, 0, 0.4952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300853,-99) , +5, 2.13165, 1, 0, 0.489087,-99) , +12, 0.411835, 0, 0, 0.497385,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618427,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248293,-99) , +9, -1.90736, 1, 0, 0.36837,-99) , +1, 23.5, 0, 0, 0.423286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0482093,-99) , +8, -0.410757, 0, 0, 0.383338,-99) , +4, 1.68775, 1, 0, 0.484244,-99) , +9, 3.96689, 0, 0, 0.500233,-99) ); + // itree = 633 + fBoostWeights.push_back(0.00577957); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588602,-99) , +4, 1.39128, 0, 0, 0.616335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510368,-99) , +15, 0.681776, 1, 0, 0.59317,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473469,-99) , +3, 0.994791, 1, 0, 0.545735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42319,-99) , +9, 0.00165707, 0, 0, 0.522005,-99) , +9, -1.24746, 1, 0, 0.5499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436788,-99) , +8, -0.895533, 0, 0, 0.537009,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5204,-99) , +13, 0.00374969, 0, 0, 0.583888,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493789,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274289,-99) , +7, 0.0394399, 1, 0, 0.47863,-99) , +2, 29.5, 0, 0, 0.494585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266623,-99) , +3, 0.745011, 0, 0, 0.487706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314749,-99) , +7, 0.105785, 1, 0, 0.479234,-99) , +16, 528.702, 1, 0, 0.502345,-99) ); + // itree = 634 + fBoostWeights.push_back(0.00753155); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616149,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198667,-99) , +4, 1.98815, 1, 0, 0.536817,-99) , +14, -4.10148, 1, 0, 0.552846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436447,-99) , +8, -0.859462, 0, 0, 0.539078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381644,-99) , +16, 2.01004, 0, 0, 0.525775,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416862,-99) , +14, -3.35864, 0, 0, 0.507752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342211,-99) , +7, 0.0990258, 1, 0, 0.494915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363965,-99) , +13, 0.00215324, 1, 0, 0.471894,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.145527,-99) , +14, -3.74909, 0, 0, 0.322144,-99) , +11, 0.5, 1, 0, 0.409764,-99) , +7, 0.0149779, 0, 0, 0.467962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228496,-99) , +4, 1.92774, 1, 0, 0.459059,-99) , +16, 470.857, 1, 0, 0.484941,-99) ); + // itree = 635 + fBoostWeights.push_back(0.00527792); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571339,-99) , +3, 0.98813, 1, 0, 0.615802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533999,-99) , +16, 2514.98, 1, 0, 0.578834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486439,-99) , +2, 23.5, 0, 0, 0.528481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421908,-99) , +12, 0.0526575, 0, 0, 0.50426,-99) , +6, 0.617733, 1, 0, 0.54206,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318497,-99) , +7, 0.00729722, 0, 0, 0.51312,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431726,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148354,-99) , +5, 2.02871, 1, 0, 0.406492,-99) , +13, 0.0074143, 1, 0, 0.492906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294476,-99) , +14, -5.44572, 0, 0, 0.484509,-99) , +5, 1.37994, 1, 0, 0.50645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284003,-99) , +13, 0.0811888, 1, 0, 0.503593,-99) ); + // itree = 636 + fBoostWeights.push_back(0.00398522); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670368,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406001,-99) , +13, 0.0188469, 1, 0, 0.515604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362167,-99) , +5, 0.505205, 0, 0, 0.508505,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340472,-99) , +5, 2.25681, 1, 0, 0.502702,-99) , +12, 0.525387, 0, 0, 0.509326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293243,-99) , +12, 0.0182039, 0, 0, 0.503972,-99) ); + // itree = 637 + fBoostWeights.push_back(0.00524684); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505522,-99) , +2, 26.5, 0, 0, 0.520709,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477779,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100412,-99) , +1, 17.5, 0, 0, 0.425789,-99) , +7, 0.0801463, 1, 0, 0.512708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326617,-99) , +12, 0.0182039, 0, 0, 0.508391,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206002,-99) , +12, 0.189113, 1, 0, 0.371399,-99) , +3, 0.999322, 1, 0, 0.500456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292797,-99) , +4, 1.9963, 1, 0, 0.494547,-99) ); + // itree = 638 + fBoostWeights.push_back(0.00614679); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68733,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527396,-99) , +6, 0.28574, 1, 0, 0.557955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184154,-99) , +5, 2.25768, 1, 0, 0.548596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397902,-99) , +14, -4.54431, 0, 0, 0.532963,-99) , +12, 0.323445, 0, 0, 0.554098,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496459,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381479,-99) , +3, 0.999092, 1, 0, 0.486763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320478,-99) , +3, 0.789022, 0, 0, 0.479585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22176,-99) , +2, 6.5, 0, 0, 0.474182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17925,-99) , +13, 0.0725587, 1, 0, 0.469228,-99) , +11, 1.5, 0, 0, 0.497645,-99) ); + // itree = 639 + fBoostWeights.push_back(0.00726743); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638703,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560476,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45713,-99) , +16, 2.4624, 0, 0, 0.547906,-99) , +2, 30.5, 0, 0, 0.561819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429487,-99) , +15, 1.70005, 1, 0, 0.551695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279665,-99) , +4, 2.04485, 1, 0, 0.546238,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503668,-99) , +3, 0.995381, 1, 0, 0.586861,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224252,-99) , +7, 0.0658266, 1, 0, 0.434454,-99) , +5, 1.49755, 1, 0, 0.536711,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422883,-99) , +7, 0.0147706, 0, 0, 0.463829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240204,-99) , +7, 0.0358482, 1, 0, 0.448289,-99) , +2, 22.5, 0, 0, 0.473619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181087,-99) , +4, 2.12972, 1, 0, 0.470055,-99) , +16, 450.703, 1, 0, 0.499109,-99) ); + // itree = 640 + fBoostWeights.push_back(0.00755444); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532371,-99) , +6, 0.378505, 1, 0, 0.61237,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532929,-99) , +3, 0.996134, 0, 0, 0.578864,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413368,-99) , +15, 0.319818, 1, 0, 0.474335,-99) , +4, 1.37824, 0, 0, 0.509188,-99) , +3, 0.952107, 1, 0, 0.534945,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53397,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400319,-99) , +8, 0.943116, 1, 0, 0.515918,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399663,-99) , +9, 2.21745, 0, 0, 0.438425,-99) , +12, 0.195174, 1, 0, 0.494324,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326942,-99) , +13, 0.00331299, 1, 0, 0.434118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0279929,-99) , +13, 0.0175895, 1, 0, 0.411925,-99) , +5, 1.69255, 1, 0, 0.468082,-99) , +11, 1.5, 0, 0, 0.490835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170834,-99) , +5, 2.47688, 1, 0, 0.487741,-99) ); + // itree = 641 + fBoostWeights.push_back(0.00471721); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458157,-99) , +13, 0.0109424, 1, 0, 0.513034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149519,-99) , +4, 2.21981, 1, 0, 0.510799,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232144,-99) , +9, 0.44689, 0, 0, 0.373335,-99) , +7, 0.00869406, 0, 0, 0.502579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284287,-99) , +3, 0.999649, 1, 0, 0.497246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27509,-99) , +12, 0.0181941, 0, 0, 0.491735,-99) ); + // itree = 642 + fBoostWeights.push_back(0.00706768); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461829,-99) , +7, 0.0581286, 1, 0, 0.569446,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483739,-99) , +14, -3.53595, 0, 0, 0.550348,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464036,-99) , +6, 0.671157, 1, 0, 0.506972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338196,-99) , +5, 1.95915, 1, 0, 0.495514,-99) , +16, 271.549, 1, 0, 0.513822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327653,-99) , +3, 0.999594, 1, 0, 0.508279,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390894,-99) , +9, 0.352652, 0, 0, 0.493487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519038,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159325,-99) , +11, 1.5, 0, 0, 0.250444,-99) , +8, 0.989193, 0, 0, 0.319212,-99) , +12, 0.111363, 1, 0, 0.403987,-99) , +4, 1.64181, 1, 0, 0.493609,-99) ); + // itree = 643 + fBoostWeights.push_back(0.00818043); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530941,-99) , +13, 0.00263162, 0, 0, 0.580682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261495,-99) , +4, 1.97386, 1, 0, 0.569034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511376,-99) , +9, -8.12459, 1, 0, 0.521566,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258221,-99) , +5, 1.47337, 1, 0, 0.428743,-99) , +13, 0.011097, 1, 0, 0.501262,-99) , +10, -618.707, 1, 0, 0.517616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283733,-99) , +3, 0.999694, 1, 0, 0.511467,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403048,-99) , +13, 0.000464339, 0, 0, 0.494471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32001,-99) , +0, 14.5, 1, 0, 0.466784,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283636,-99) , +12, 0.365823, 0, 0, 0.353537,-99) , +15, 0.0459851, 0, 0, 0.436038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100182,-99) , +5, 2.29219, 1, 0, 0.426451,-99) , +7, 0.0135843, 0, 0, 0.49106,-99) ); + // itree = 644 + fBoostWeights.push_back(0.0072446); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423793,-99) , +3, 0.999203, 1, 0, 0.556622,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168926,-99) , +0, 24.5, 1, 0, 0.49473,-99) , +2, 16.5, 0, 0, 0.525046,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413003,-99) , +16, 343.427, 1, 0, 0.465475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0340277,-99) , +0, 20.5, 1, 0, 0.431723,-99) , +1, 8.5, 0, 0, 0.512358,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365263,-99) , +10, 2314.3, 1, 0, 0.435334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129955,-99) , +4, 1.58685, 1, 0, 0.414581,-99) , +8, -0.894233, 0, 0, 0.501435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204357,-99) , +5, 2.48967, 1, 0, 0.498774,-99) ); + // itree = 645 + fBoostWeights.push_back(0.00543345); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.738188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582969,-99) , +5, 1.9711, 0, 0, 0.630202,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511261,-99) , +3, 0.961513, 1, 0, 0.541445,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272882,-99) , +2, 7.5, 0, 0, 0.475289,-99) , +11, 1.5, 0, 0, 0.497934,-99) , +12, 0.415622, 0, 0, 0.507024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33337,-99) , +5, 0.528034, 0, 0, 0.499679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192129,-99) , +7, 0.179323, 1, 0, 0.494503,-99) ); + // itree = 646 + fBoostWeights.push_back(0.00847715); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623913,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478303,-99) , +12, 0.0795743, 1, 0, 0.526586,-99) , +6, 0.489889, 1, 0, 0.568664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256203,-99) , +5, 2.10084, 1, 0, 0.563078,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.691959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529332,-99) , +6, 0.740722, 1, 0, 0.615185,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332685,-99) , +7, 0.0113136, 0, 0, 0.570807,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559279,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453356,-99) , +10, 2927.45, 1, 0, 0.50799,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331035,-99) , +12, 0.047682, 0, 0, 0.39294,-99) , +0, 17.5, 1, 0, 0.454186,-99) , +4, 1.47402, 0, 0, 0.494454,-99) , +14, -2.72788, 0, 0, 0.523949,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582613,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466544,-99) , +6, 0.299135, 1, 0, 0.539317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437255,-99) , +2, 12.5, 0, 0, 0.503641,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370615,-99) , +5, 1.83611, 1, 0, 0.442044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233845,-99) , +8, -0.925596, 0, 0, 0.428299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0926332,-99) , +7, 0.141427, 1, 0, 0.420558,-99) , +4, 0.902539, 1, 0, 0.452597,-99) , +12, 0.11364, 1, 0, 0.48634,-99) ); + // itree = 647 + fBoostWeights.push_back(0.00419672); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458223,-99) , +5, 0.624775, 0, 0, 0.560568,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162591,-99) , +5, 2.49352, 1, 0, 0.493985,-99) , +4, 0.664058, 1, 0, 0.511504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331852,-99) , +3, 0.999638, 1, 0, 0.506513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255169,-99) , +15, 4.17083, 1, 0, 0.502102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261089,-99) , +2, 6.5, 0, 0, 0.497545,-99) ); + // itree = 648 + fBoostWeights.push_back(0.00404505); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637288,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501914,-99) , +15, 0.0712727, 1, 0, 0.512143,-99) , +10, -8284.4, 1, 0, 0.521464,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423013,-99) , +12, 0.144301, 1, 0, 0.469187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301725,-99) , +6, 0.0692598, 0, 0, 0.455748,-99) , +7, 0.0147808, 0, 0, 0.502443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286406,-99) , +3, 0.999717, 1, 0, 0.498355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320305,-99) , +3, 0.745149, 0, 0, 0.492757,-99) ); + // itree = 649 + fBoostWeights.push_back(0.0063844); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583782,-99) , +5, 1.77307, 0, 0, 0.62705,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429816,-99) , +7, 0.0244489, 1, 0, 0.532833,-99) , +2, 18.5, 0, 0, 0.571335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438673,-99) , +3, 0.998869, 1, 0, 0.558408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388926,-99) , +8, -0.900524, 0, 0, 0.54128,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230869,-99) , +4, 1.97628, 1, 0, 0.493174,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285094,-99) , +13, 0.00106977, 1, 0, 0.394576,-99) , +7, 0.00931116, 0, 0, 0.483426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272565,-99) , +5, 2.21222, 1, 0, 0.475363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271656,-99) , +7, 0.104421, 1, 0, 0.466199,-99) , +16, 486.401, 1, 0, 0.495637,-99) ); + // itree = 650 + fBoostWeights.push_back(0.00999979); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668679,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511934,-99) , +14, -2.72433, 0, 0, 0.558473,-99) , +12, 0.148563, 0, 0, 0.594315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481905,-99) , +13, 0.0107979, 1, 0, 0.57149,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503771,-99) , +8, 0.0872043, 0, 0, 0.569912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410793,-99) , +8, 0.951234, 1, 0, 0.528568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368858,-99) , +6, 0.80286, 1, 0, 0.4949,-99) , +0, 15.5, 0, 0, 0.541052,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365719,-99) , +7, 0.0143676, 0, 0, 0.52906,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0608004,-99) , +7, 0.0513927, 1, 0, 0.454147,-99) , +1, 12.5, 0, 0, 0.496057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251448,-99) , +14, -5.01315, 0, 0, 0.48786,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572023,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122994,-99) , +3, 0.925325, 0, 0, 0.353783,-99) , +8, 0.994425, 0, 0, 0.429673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141853,-99) , +13, 0.00342261, 1, 0, 0.374247,-99) , +5, 1.92617, 1, 0, 0.471404,-99) , +11, 1.5, 0, 0, 0.494696,-99) ); + // itree = 651 + fBoostWeights.push_back(0.00597455); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651234,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461093,-99) , +3, 0.998908, 1, 0, 0.550878,-99) , +12, 0.353692, 0, 0, 0.560897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443204,-99) , +8, -0.921106, 0, 0, 0.550075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268567,-99) , +4, 2.05933, 1, 0, 0.544336,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486294,-99) , +2, 39.5, 0, 0, 0.498272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343037,-99) , +0, 75.5, 1, 0, 0.488983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339382,-99) , +7, 0.0089369, 0, 0, 0.478565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15206,-99) , +5, 2.18196, 1, 0, 0.467018,-99) , +16, 1091.94, 1, 0, 0.503376,-99) ); + // itree = 652 + fBoostWeights.push_back(0.00703722); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566599,-99) , +6, 0.144677, 1, 0, 0.598476,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418354,-99) , +7, 0.021939, 1, 0, 0.540297,-99) , +1, 14.5, 0, 0, 0.568198,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504339,-99) , +5, 1.68908, 0, 0, 0.531288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385358,-99) , +6, 0.973636, 0, 0, 0.481053,-99) , +6, 0.822105, 1, 0, 0.545719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322479,-99) , +12, 0.0239822, 0, 0, 0.531849,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59166,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449189,-99) , +9, 0.514244, 0, 0, 0.495225,-99) , +2, 24.5, 0, 0, 0.528741,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37019,-99) , +1, 9.5, 0, 0, 0.446246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123773,-99) , +5, 2.48986, 1, 0, 0.44228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.056094,-99) , +0, 98.5, 1, 0, 0.433326,-99) , +5, 1.37771, 1, 0, 0.469913,-99) , +16, 514.828, 1, 0, 0.494182,-99) ); + // itree = 653 + fBoostWeights.push_back(0.00765321); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336159,-99) , +7, 0.251653, 1, 0, 0.578919,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19695,-99) , +7, 0.0510786, 1, 0, 0.51176,-99) , +2, 24.5, 0, 0, 0.532247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292531,-99) , +3, 0.999648, 1, 0, 0.52622,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410221,-99) , +14, -3.45597, 0, 0, 0.495246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200609,-99) , +3, 0.932277, 0, 0, 0.469798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125026,-99) , +0, 22.5, 1, 0, 0.444622,-99) , +1, 9.5, 0, 0, 0.50965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294413,-99) , +12, 0.0203187, 0, 0, 0.50298,-99) ); + // itree = 654 + fBoostWeights.push_back(0.00488596); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384761,-99) , +8, 0.990574, 1, 0, 0.532974,-99) , +5, 2.02019, 0, 0, 0.547759,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389709,-99) , +12, 0.127096, 1, 0, 0.468658,-99) , +8, -0.767789, 0, 0, 0.534762,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254112,-99) , +7, 0.132374, 1, 0, 0.501515,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171467,-99) , +5, 2.14288, 1, 0, 0.400094,-99) , +2, 9.5, 0, 0, 0.483778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261956,-99) , +1, 60.5, 1, 0, 0.47627,-99) , +16, 471.128, 1, 0, 0.498237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225021,-99) , +4, 2.15244, 1, 0, 0.495285,-99) ); + // itree = 655 + fBoostWeights.push_back(0.00476367); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658329,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486655,-99) , +12, 0.415695, 0, 0, 0.494273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254946,-99) , +2, 6.5, 0, 0, 0.489949,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116057,-99) , +5, 1.78125, 1, 0, 0.345203,-99) , +3, 0.999108, 1, 0, 0.480853,-99) , +10, -15200.9, 1, 0, 0.486757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.57736, 1, 0, 0.484579,-99) ); + // itree = 656 + fBoostWeights.push_back(0.00655276); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569471,-99) , +3, 0.982456, 1, 0, 0.625641,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681639,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512162,-99) , +10, 892.364, 1, 0, 0.538188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415801,-99) , +8, 0.921226, 1, 0, 0.509528,-99) , +4, 1.94281, 0, 0, 0.524696,-99) , +6, 0.159703, 1, 0, 0.548496,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430276,-99) , +7, 0.0127304, 0, 0, 0.488547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25819,-99) , +3, 0.732808, 0, 0, 0.482139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272279,-99) , +13, 0.0350657, 1, 0, 0.473247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 2.10615, 1, 0, 0.468163,-99) , +11, 1.5, 0, 0, 0.495753,-99) ); + // itree = 657 + fBoostWeights.push_back(0.00725405); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462789,-99) , +8, 0.979072, 1, 0, 0.554057,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35642,-99) , +3, 0.858593, 0, 0, 0.494465,-99) , +6, 0.371949, 1, 0, 0.521214,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216265,-99) , +13, 0.0115449, 1, 0, 0.385531,-99) , +3, 0.998899, 1, 0, 0.510858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257424,-99) , +7, 0.00796843, 0, 0, 0.505622,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442005,-99) , +13, 0.00177384, 0, 0, 0.495674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242001,-99) , +5, 2.08495, 1, 0, 0.477347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226237,-99) , +3, 0.927384, 0, 0, 0.456968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16501,-99) , +7, 0.034606, 1, 0, 0.432543,-99) , +1, 9.5, 0, 0, 0.49034,-99) ); + // itree = 658 + fBoostWeights.push_back(0.00630071); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391912,-99) , +12, 0.0290787, 0, 0, 0.517024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33449,-99) , +3, 0.999633, 1, 0, 0.511338,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301125,-99) , +12, 0.170041, 1, 0, 0.40949,-99) , +8, -0.917479, 0, 0, 0.500286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275384,-99) , +14, -5.31224, 0, 0, 0.49365,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429586,-99) , +1, 10.5, 1, 0, 0.494755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235862,-99) , +8, 0.911119, 0, 0, 0.400554,-99) , +5, 1.98956, 1, 0, 0.482148,-99) ); + // itree = 659 + fBoostWeights.push_back(0.0074538); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53431,-99) , +12, 0.13039, 1, 0, 0.601816,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471355,-99) , +6, 0.432181, 0, 0, 0.53701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397686,-99) , +16, 3.4322, 0, 0, 0.507592,-99) , +3, 0.975207, 1, 0, 0.54585,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44752,-99) , +7, 0.101219, 1, 0, 0.55783,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293317,-99) , +7, 0.0455382, 1, 0, 0.480762,-99) , +2, 30.5, 0, 0, 0.496224,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433014,-99) , +3, 0.996332, 0, 0, 0.51869,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17954,-99) , +5, 1.84632, 1, 0, 0.314322,-99) , +8, 0.900041, 0, 0, 0.408021,-99) , +4, 1.54898, 1, 0, 0.480759,-99) , +16, 81.7125, 1, 0, 0.496944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303237,-99) , +5, 2.30366, 1, 0, 0.491831,-99) ); + // itree = 660 + fBoostWeights.push_back(0.00579358); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.691581,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439556,-99) , +13, 0.0142775, 1, 0, 0.524934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346295,-99) , +12, 0.0227284, 0, 0, 0.516107,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372161,-99) , +15, 0.04735, 0, 0, 0.45731,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281824,-99) , +5, 2.08843, 1, 0, 0.441786,-99) , +7, 0.014792, 0, 0, 0.494286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161285,-99) , +13, 0.0577484, 1, 0, 0.48935,-99) , +12, 0.521665, 0, 0, 0.497049,-99) ); + // itree = 661 + fBoostWeights.push_back(0.00432156); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395602,-99) , +3, 0.999348, 1, 0, 0.519574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275842,-99) , +15, 4.04966, 1, 0, 0.515098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350263,-99) , +8, -0.982996, 0, 0, 0.507722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290818,-99) , +7, 0.00730153, 0, 0, 0.502741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0638429,-99) , +5, 2.49382, 1, 0, 0.499351,-99) ); + // itree = 662 + fBoostWeights.push_back(0.00623141); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534307,-99) , +5, 2.09792, 0, 0, 0.550193,-99) , +9, 4.17494, 0, 0, 0.56937,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341269,-99) , +1, 8.5, 0, 0, 0.509598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322378,-99) , +4, 1.70955, 1, 0, 0.491772,-99) , +11, 1.5, 0, 0, 0.51858,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458873,-99) , +12, 0.38756, 0, 0, 0.475398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208965,-99) , +5, 2.36237, 1, 0, 0.469154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242295,-99) , +7, 0.0248227, 1, 0, 0.454113,-99) , +2, 11.5, 0, 0, 0.497076,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306934,-99) , +3, 0.999637, 1, 0, 0.491917,-99) ); + // itree = 663 + fBoostWeights.push_back(0.00613213); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513137,-99) , +13, 0.00122428, 0, 0, 0.55247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436535,-99) , +8, -0.922367, 0, 0, 0.541088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397438,-99) , +12, 0.0217728, 0, 0, 0.528219,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630366,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397461,-99) , +2, 9.5, 0, 0, 0.503686,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235727,-99) , +8, -0.0378139, 0, 0, 0.39784,-99) , +5, 1.64014, 1, 0, 0.461392,-99) , +12, 0.534864, 0, 0, 0.471857,-99) , +12, 0.111424, 1, 0, 0.497917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0947269,-99) , +7, 0.324392, 1, 0, 0.495884,-99) ); + // itree = 664 + fBoostWeights.push_back(0.0049419); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.707707,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45812,-99) , +5, 0.865138, 0, 0, 0.540867,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520825,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426835,-99) , +4, 1.01634, 1, 0, 0.470209,-99) , +12, 0.129247, 1, 0, 0.506123,-99) , +9, 13.342, 0, 0, 0.51157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227754,-99) , +7, 0.00691466, 0, 0, 0.507161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280536,-99) , +12, 0.01821, 0, 0, 0.501099,-99) ); + // itree = 665 + fBoostWeights.push_back(0.00716625); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321224,-99) , +1, 10.5, 0, 0, 0.567854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24445,-99) , +7, 0.0332294, 1, 0, 0.494316,-99) , +2, 18.5, 0, 0, 0.521554,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366367,-99) , +9, 0.591086, 0, 0, 0.433484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0338469,-99) , +4, 1.6548, 1, 0, 0.413772,-99) , +8, -0.895617, 0, 0, 0.509936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.163727,-99) , +7, 0.252106, 1, 0, 0.506848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317064,-99) , +8, 0.242663, 1, 0, 0.389174,-99) , +12, 0.0313859, 0, 0, 0.497069,-99) ); + // itree = 666 + fBoostWeights.push_back(0.00414815); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514954,-99) , +12, 0.493228, 0, 0, 0.520234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305172,-99) , +2, 6.5, 0, 0, 0.515589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142241,-99) , +7, 0.190847, 1, 0, 0.512023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32203,-99) , +1, 66.5, 1, 0, 0.506655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237385,-99) , +12, 0.0165015, 0, 0, 0.50142,-99) ); + // itree = 667 + fBoostWeights.push_back(0.00820512); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.705243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594679,-99) , +2, 18.5, 0, 0, 0.651175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491712,-99) , +8, -0.883154, 0, 0, 0.615543,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37293,-99) , +3, 0.982188, 1, 0, 0.467104,-99) , +13, 0.0012373, 0, 0, 0.569965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416879,-99) , +5, 0.504902, 0, 0, 0.549403,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636167,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418275,-99) , +12, 0.191243, 1, 0, 0.491591,-99) , +12, 0.449233, 0, 0, 0.499901,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403991,-99) , +1, 12.5, 0, 0, 0.508149,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.88893, 1, 0, 0.375868,-99) , +9, -0.688799, 1, 0, 0.421369,-99) , +3, 0.963574, 0, 0, 0.477857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245048,-99) , +7, 0.1417, 1, 0, 0.472172,-99) , +4, 0.782664, 1, 0, 0.496742,-99) ); + // itree = 668 + fBoostWeights.push_back(0.00511279); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291656,-99) , +1, 14.5, 0, 0, 0.567554,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191776,-99) , +7, 0.0572854, 1, 0, 0.499083,-99) , +2, 28.5, 0, 0, 0.513576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366573,-99) , +8, -0.987842, 0, 0, 0.508226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209381,-99) , +5, 2.48008, 1, 0, 0.505463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288076,-99) , +3, 0.999676, 1, 0, 0.500697,-99) ); + // itree = 669 + fBoostWeights.push_back(0.00482851); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503339,-99) , +10, -5966.71, 1, 0, 0.512537,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268212,-99) , +14, -2.66706, 1, 0, 0.401081,-99) , +15, 0.0479306, 0, 0, 0.502642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214193,-99) , +13, 0.049695, 1, 0, 0.498456,-99) , +12, 0.523332, 0, 0, 0.50499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282803,-99) , +1, 77.5, 1, 0, 0.500033,-99) ); + // itree = 670 + fBoostWeights.push_back(0.00558692); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513363,-99) , +16, 2929.52, 1, 0, 0.558273,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466757,-99) , +6, 0.164732, 1, 0, 0.491984,-99) , +9, -0.686945, 1, 0, 0.521674,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427499,-99) , +3, 0.951108, 1, 0, 0.457322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0330695,-99) , +5, 1.97529, 1, 0, 0.438073,-99) , +8, -0.76984, 0, 0, 0.50796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257843,-99) , +4, 2.09858, 1, 0, 0.504253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253513,-99) , +3, 0.685985, 0, 0, 0.499825,-99) ); + // itree = 671 + fBoostWeights.push_back(0.00461103); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561411,-99) , +0, 75.5, 1, 0, 0.615224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515593,-99) , +6, 0.853424, 1, 0, 0.579879,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271341,-99) , +7, 0.0647103, 1, 0, 0.496261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144769,-99) , +0, 55.5, 1, 0, 0.491269,-99) , +2, 37.5, 0, 0, 0.502546,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241837,-99) , +7, 0.22007, 1, 0, 0.499666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292202,-99) , +3, 0.99965, 1, 0, 0.493981,-99) ); + // itree = 672 + fBoostWeights.push_back(0.00361241); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638724,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516842,-99) , +10, 11582.4, 0, 0, 0.53538,-99) , +0, 35.5, 0, 0, 0.559694,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320069,-99) , +3, 0.712912, 0, 0, 0.500794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268314,-99) , +4, 2.14444, 1, 0, 0.498296,-99) , +11, 1.5, 0, 0, 0.518971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381118,-99) , +8, -0.98298, 0, 0, 0.512761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323496,-99) , +3, 0.999646, 1, 0, 0.508291,-99) ); + // itree = 673 + fBoostWeights.push_back(0.00644626); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504597,-99) , +3, 0.944786, 1, 0, 0.558366,-99) , +12, 0.10953, 1, 0, 0.601637,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216114,-99) , +5, 2.05822, 1, 0, 0.467704,-99) , +1, 12.5, 0, 0, 0.554714,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501985,-99) , +15, 0.140172, 1, 0, 0.573124,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347851,-99) , +2, 7.5, 0, 0, 0.488748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302721,-99) , +5, 1.99142, 1, 0, 0.474652,-99) , +8, 0.991135, 0, 0, 0.486772,-99) , +6, 0.170762, 1, 0, 0.502284,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144854,-99) , +5, 1.82337, 1, 0, 0.380606,-99) , +3, 0.99915, 1, 0, 0.49349,-99) ); + // itree = 674 + fBoostWeights.push_back(0.00375929); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479433,-99) , +2, 13.5, 0, 0, 0.514288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306871,-99) , +1, 75.5, 1, 0, 0.509701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340506,-99) , +8, -0.984768, 0, 0, 0.503122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295312,-99) , +7, 0.00735785, 0, 0, 0.497932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0705485,-99) , +7, 0.323959, 1, 0, 0.495836,-99) ); + // itree = 675 + fBoostWeights.push_back(0.00670693); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652422,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455434,-99) , +6, 0.990312, 1, 0, 0.5387,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405523,-99) , +9, 7.7872, 0, 0, 0.451323,-99) , +3, 0.997908, 1, 0, 0.522117,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31999,-99) , +7, 0.0215, 1, 0, 0.466971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208275,-99) , +5, 2.14369, 1, 0, 0.451059,-99) , +2, 11.5, 0, 0, 0.497848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159697,-99) , +5, 1.45909, 1, 0, 0.364931,-99) , +13, 0.0211448, 1, 0, 0.487966,-99) , +12, 0.498981, 0, 0, 0.494748,-99) ); + // itree = 676 + fBoostWeights.push_back(0.00752098); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540892,-99) , +13, 0.00172138, 0, 0, 0.571756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468197,-99) , +8, -0.885075, 0, 0, 0.559769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428632,-99) , +3, 0.999132, 1, 0, 0.550234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311263,-99) , +12, 0.0165015, 0, 0, 0.538915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361713,-99) , +1, 9.5, 0, 0, 0.518849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252365,-99) , +7, 0.0241238, 1, 0, 0.446121,-99) , +2, 13.5, 0, 0, 0.48424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180115,-99) , +7, 0.146042, 1, 0, 0.476287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256417,-99) , +5, 2.10683, 1, 0, 0.460762,-99) , +12, 0.101394, 1, 0, 0.494604,-99) ); + // itree = 677 + fBoostWeights.push_back(0.00565858); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522049,-99) , +16, 30.9186, 0, 0, 0.587693,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451835,-99) , +13, 0.00200044, 0, 0, 0.506845,-99) , +16, 1848.4, 1, 0, 0.548073,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271769,-99) , +3, 0.999482, 1, 0, 0.488393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234856,-99) , +3, 0.722001, 0, 0, 0.481436,-99) , +4, 0.916472, 1, 0, 0.506657,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188942,-99) , +5, 1.84557, 1, 0, 0.369093,-99) , +8, -0.947017, 0, 0, 0.495676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316847,-99) , +7, 0.119912, 1, 0, 0.488108,-99) ); + // itree = 678 + fBoostWeights.push_back(0.00392212); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619509,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565384,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486667,-99) , +12, 0.0597036, 1, 0, 0.504873,-99) , +10, -4959.63, 1, 0, 0.515494,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259894,-99) , +7, 0.148553, 1, 0, 0.477133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320697,-99) , +3, 0.89693, 0, 0, 0.46356,-99) , +6, 0.665708, 1, 0, 0.496038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309135,-99) , +12, 0.0165011, 0, 0, 0.492073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312684,-99) , +3, 0.999624, 1, 0, 0.487035,-99) ); + // itree = 679 + fBoostWeights.push_back(0.00489593); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671881,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479451,-99) , +8, 0.915208, 1, 0, 0.525532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396286,-99) , +3, 0.789517, 0, 0, 0.518878,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421032,-99) , +1, 11.5, 0, 0, 0.478817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172037,-99) , +5, 1.72709, 1, 0, 0.431646,-99) , +8, -0.85417, 0, 0, 0.507827,-99) , +12, 0.510131, 0, 0, 0.51361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284617,-99) , +3, 0.999634, 1, 0, 0.507522,-99) ); + // itree = 680 + fBoostWeights.push_back(0.00575362); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444109,-99) , +15, 0.194869, 0, 0, 0.5528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410294,-99) , +4, 1.36441, 0, 0, 0.468774,-99) , +6, 0.871919, 1, 0, 0.531606,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464052,-99) , +9, 6.22029, 0, 0, 0.478743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135317,-99) , +7, 0.156536, 1, 0, 0.471643,-99) , +12, 0.100949, 1, 0, 0.496256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291561,-99) , +12, 0.0182006, 0, 0, 0.490866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224739,-99) , +3, 0.999733, 1, 0, 0.486247,-99) ); + // itree = 681 + fBoostWeights.push_back(0.0056487); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570796,-99) , +5, 1.93146, 0, 0, 0.592778,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418073,-99) , +8, 0.044218, 1, 0, 0.48016,-99) , +6, 0.780526, 1, 0, 0.556874,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483921,-99) , +10, 9990.33, 0, 0, 0.498741,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151252,-99) , +15, 0.262698, 1, 0, 0.395565,-99) , +1, 8.5, 0, 0, 0.487121,-99) , +10, 14.4222, 1, 0, 0.505356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32049,-99) , +3, 0.999632, 1, 0, 0.500152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156003,-99) , +5, 2.4484, 1, 0, 0.4964,-99) ); + // itree = 682 + fBoostWeights.push_back(0.0079365); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559918,-99) , +5, 0.995867, 1, 0, 0.588009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492968,-99) , +8, -0.912664, 0, 0, 0.573227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434063,-99) , +14, -4.28157, 0, 0, 0.559925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3838,-99) , +5, 0.482544, 0, 0, 0.538173,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.716949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544923,-99) , +3, 0.991978, 0, 0, 0.629666,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562293,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424042,-99) , +3, 0.993596, 1, 0, 0.508342,-99) , +16, 2354.98, 1, 0, 0.57679,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352344,-99) , +1, 17.5, 1, 0, 0.464309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0558478,-99) , +7, 0.0509364, 1, 0, 0.455662,-99) , +2, 24.5, 0, 0, 0.47898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240689,-99) , +7, 0.124126, 1, 0, 0.471781,-99) , +4, 0.809261, 1, 0, 0.494682,-99) ); + // itree = 683 + fBoostWeights.push_back(0.00686646); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585822,-99) , +16, 495.07, 1, 0, 0.625833,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469385,-99) , +10, 4015.19, 1, 0, 0.529566,-99) , +12, 0.0479627, 0, 0, 0.578155,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381187,-99) , +3, 0.999232, 1, 0, 0.510486,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.02905, 1, 0, 0.423513,-99) , +8, -0.47978, 0, 0, 0.489847,-99) , +12, 0.0686069, 1, 0, 0.5096,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36648,-99) , +16, 1004.77, 1, 0, 0.434618,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261186,-99) , +9, -1.04949, 0, 0, 0.377551,-99) , +12, 0.0307491, 0, 0, 0.498625,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231223,-99) , +7, 0.00716452, 0, 0, 0.493077,-99) ); + // itree = 684 + fBoostWeights.push_back(0.00869592); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574801,-99) , +9, -0.932972, 1, 0, 0.623637,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506068,-99) , +16, 1913.06, 1, 0, 0.594407,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590502,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492925,-99) , +10, -4080.38, 1, 0, 0.508952,-99) , +9, -4.51602, 1, 0, 0.523803,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446758,-99) , +2, 36.5, 0, 0, 0.502982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229906,-99) , +5, 1.46836, 1, 0, 0.421477,-99) , +14, -1.95976, 1, 0, 0.502654,-99) , +15, 0.0682865, 1, 0, 0.515104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424233,-99) , +10, 4982.59, 1, 0, 0.492282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256135,-99) , +8, -0.774708, 0, 0, 0.392651,-99) , +13, 0.00309216, 1, 0, 0.467389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14714,-99) , +4, 1.96547, 1, 0, 0.457604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214426,-99) , +0, 16.5, 1, 0, 0.43987,-99) , +7, 0.0140528, 0, 0, 0.495594,-99) ); + // itree = 685 + fBoostWeights.push_back(0.00619058); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546781,-99) , +8, 0.529048, 0, 0, 0.618539,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427284,-99) , +5, 1.82401, 1, 0, 0.528978,-99) , +3, 0.95075, 1, 0, 0.556663,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389562,-99) , +5, 2.02135, 1, 0, 0.537724,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437415,-99) , +12, 0.414092, 0, 0, 0.460976,-99) , +12, 0.113881, 1, 0, 0.493123,-99) , +16, 899.378, 1, 0, 0.522392,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456192,-99) , +9, 5.58699, 0, 0, 0.475393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286552,-99) , +3, 0.999074, 1, 0, 0.463351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275334,-99) , +2, 8.5, 0, 0, 0.451014,-99) , +6, 0.821122, 1, 0, 0.502573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299097,-99) , +3, 0.999634, 1, 0, 0.497141,-99) ); + // itree = 686 + fBoostWeights.push_back(0.00912073); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528441,-99) , +4, 1.49381, 1, 0, 0.598645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482685,-99) , +16, 6.37709, 0, 0, 0.579295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403399,-99) , +12, 0.0241448, 0, 0, 0.560775,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645158,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548742,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310806,-99) , +13, 0.00581792, 1, 0, 0.42061,-99) , +5, 1.35539, 1, 0, 0.470209,-99) , +9, 5.81991, 0, 0, 0.49139,-99) , +12, 0.127326, 1, 0, 0.528972,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661216,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575493,-99) , +4, 1.30484, 0, 0, 0.621156,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0930644,-99) , +5, 2.12368, 1, 0, 0.481304,-99) , +13, 0.000236502, 1, 0, 0.515004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302487,-99) , +12, 0.0329875, 0, 0, 0.497647,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554022,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337663,-99) , +12, 0.147747, 1, 0, 0.409446,-99) , +9, 4.13039, 0, 0, 0.437773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226317,-99) , +5, 1.99787, 1, 0, 0.41533,-99) , +11, 0.5, 1, 0, 0.465014,-99) , +16, 1142.96, 1, 0, 0.494617,-99) ); + // itree = 687 + fBoostWeights.push_back(0.00626872); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668884,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623923,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386839,-99) , +12, 0.0227642, 0, 0, 0.51153,-99) , +10, -5528.96, 1, 0, 0.523478,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417578,-99) , +7, 0.0147853, 0, 0, 0.489532,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266578,-99) , +13, 0.00243779, 1, 0, 0.381461,-99) , +5, 1.64483, 1, 0, 0.448509,-99) , +12, 0.13624, 1, 0, 0.491929,-99) , +12, 0.526853, 0, 0, 0.498752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22978,-99) , +4, 2.07357, 1, 0, 0.494176,-99) ); + // itree = 688 + fBoostWeights.push_back(0.00640225); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519017,-99) , +4, 0.552929, 1, 0, 0.608075,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532485,-99) , +8, -0.398935, 0, 0, 0.583017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437685,-99) , +9, -2.42621, 1, 0, 0.491434,-99) , +9, 0.616559, 0, 0, 0.535112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411333,-99) , +13, 0.000136333, 0, 0, 0.520338,-99) , +3, 0.951147, 1, 0, 0.544177,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478866,-99) , +16, 2795.93, 1, 0, 0.58393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437362,-99) , +13, 0.00140767, 1, 0, 0.467851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124493,-99) , +0, 46.5, 1, 0, 0.461188,-99) , +2, 33.5, 0, 0, 0.472988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248765,-99) , +7, 0.106174, 1, 0, 0.464443,-99) , +4, 0.91767, 1, 0, 0.49558,-99) ); + // itree = 689 + fBoostWeights.push_back(0.00554581); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537967,-99) , +15, 0.389439, 1, 0, 0.587609,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366496,-99) , +5, 2.0814, 1, 0, 0.532482,-99) , +12, 0.101366, 1, 0, 0.555819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414236,-99) , +12, 0.0245224, 0, 0, 0.546379,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 2.07742, 1, 0, 0.521255,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305419,-99) , +5, 1.9882, 1, 0, 0.448593,-99) , +11, 0.5, 1, 0, 0.485899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262433,-99) , +3, 0.722001, 0, 0, 0.479908,-99) , +16, 487.251, 1, 0, 0.505416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155828,-99) , +7, 0.253257, 1, 0, 0.502466,-99) ); + // itree = 690 + fBoostWeights.push_back(0.00616564); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57921,-99) , +5, 2.11803, 0, 0, 0.58993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39955,-99) , +1, 13.5, 0, 0, 0.574399,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280428,-99) , +4, 1.98886, 1, 0, 0.506468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30699,-99) , +0, 28.5, 1, 0, 0.496369,-99) , +2, 24.5, 0, 0, 0.513811,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204493,-99) , +4, 1.06196, 1, 0, 0.355526,-99) , +13, 0.0251411, 1, 0, 0.503518,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270456,-99) , +12, 0.01821, 0, 0, 0.497308,-99) ); + // itree = 691 + fBoostWeights.push_back(0.00383125); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390064,-99) , +15, 1.8119, 1, 0, 0.520602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377963,-99) , +7, 0.1357, 1, 0, 0.515268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397083,-99) , +12, 0.129454, 1, 0, 0.456052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.22328, 1, 0, 0.448143,-99) , +8, -0.663913, 0, 0, 0.501805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280678,-99) , +7, 0.00699682, 0, 0, 0.497908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272518,-99) , +3, 0.999713, 1, 0, 0.493427,-99) ); + // itree = 692 + fBoostWeights.push_back(0.00528427); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.732964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552969,-99) , +4, 1.9393, 0, 0, 0.572456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413916,-99) , +15, 0.0585156, 0, 0, 0.554238,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490493,-99) , +12, 0.0493408, 1, 0, 0.504554,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247168,-99) , +14, -2.53459, 1, 0, 0.409762,-99) , +4, 1.57258, 1, 0, 0.489225,-99) , +9, -3.77377, 1, 0, 0.501934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216672,-99) , +7, 0.252109, 1, 0, 0.499252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216814,-99) , +12, 0.0167728, 0, 0, 0.49404,-99) ); + // itree = 693 + fBoostWeights.push_back(0.00617662); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565057,-99) , +7, 0.0125243, 1, 0, 0.587029,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406847,-99) , +6, 0.999176, 0, 0, 0.48106,-99) , +6, 0.858336, 1, 0, 0.558498,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601425,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237847,-99) , +5, 2.19428, 1, 0, 0.483232,-99) , +10, -3562.85, 1, 0, 0.498613,-99) , +16, 1028.68, 1, 0, 0.528197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374501,-99) , +12, 0.0217335, 0, 0, 0.517209,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631347,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449883,-99) , +0, 17.5, 0, 0, 0.509826,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240004,-99) , +4, 1.89321, 1, 0, 0.427041,-99) , +11, 1.5, 0, 0, 0.454555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324541,-99) , +8, -0.879647, 0, 0, 0.440609,-99) , +12, 0.49407, 0, 0, 0.456426,-99) , +12, 0.136063, 1, 0, 0.489905,-99) ); + // itree = 694 + fBoostWeights.push_back(0.00580021); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411882,-99) , +1, 67.5, 1, 0, 0.551628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281664,-99) , +1, 10.5, 0, 0, 0.540638,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0993735,-99) , +4, 2.0734, 1, 0, 0.488128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258763,-99) , +7, 0.0387563, 1, 0, 0.472969,-99) , +2, 24.5, 0, 0, 0.490227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16391,-99) , +7, 0.282135, 1, 0, 0.487967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257881,-99) , +5, 2.33369, 1, 0, 0.482845,-99) ); + // itree = 695 + fBoostWeights.push_back(0.00604251); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452328,-99) , +6, 0.915968, 1, 0, 0.551099,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114962,-99) , +7, 0.056794, 1, 0, 0.484366,-99) , +2, 24.5, 0, 0, 0.50092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281681,-99) , +14, -5.90276, 0, 0, 0.49619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277583,-99) , +2, 6.5, 0, 0, 0.49161,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335162,-99) , +5, 1.90566, 1, 0, 0.442765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254582,-99) , +7, 0.0327075, 1, 0, 0.368013,-99) , +3, 0.999035, 1, 0, 0.481101,-99) ); + // itree = 696 + fBoostWeights.push_back(0.00886194); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392361,-99) , +4, 1.47203, 1, 0, 0.554754,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336932,-99) , +3, 0.871778, 0, 0, 0.488403,-99) , +6, 0.600299, 1, 0, 0.525155,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484381,-99) , +8, 0.984617, 1, 0, 0.550651,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324172,-99) , +12, 0.0809207, 0, 0, 0.426594,-99) , +5, 1.85396, 0, 0, 0.464162,-99) , +8, 0.892181, 1, 0, 0.509304,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536801,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108916,-99) , +8, 0.909367, 0, 0, 0.405536,-99) , +5, 2.1156, 1, 0, 0.502054,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302563,-99) , +4, 1.28422, 1, 0, 0.465758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +1, 20.5, 0, 0, 0.380855,-99) , +7, 0.0891195, 1, 0, 0.492915,-99) ); + // itree = 697 + fBoostWeights.push_back(0.00546443); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686056,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495221,-99) , +2, 39.5, 0, 0, 0.508534,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.14381, 1, 0, 0.428484,-99) , +3, 0.997423, 1, 0, 0.492501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24806,-99) , +2, 6.5, 0, 0, 0.488056,-99) , +12, 0.521312, 0, 0, 0.49511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0584583,-99) , +5, 2.49032, 1, 0, 0.491894,-99) ); + // itree = 698 + fBoostWeights.push_back(0.00433334); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577392,-99) , +6, 0.763739, 0, 0, 0.619214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532088,-99) , +3, 0.969699, 0, 0, 0.589662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509421,-99) , +15, 0.501608, 1, 0, 0.567497,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469103,-99) , +15, 0.468443, 1, 0, 0.518607,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431079,-99) , +12, 0.446186, 0, 0, 0.456571,-99) , +12, 0.197118, 1, 0, 0.500838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350492,-99) , +3, 0.770951, 0, 0, 0.494641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343531,-99) , +4, 1.83322, 1, 0, 0.485522,-99) , +16, 34.2945, 1, 0, 0.501583,-99) ); + // itree = 699 + fBoostWeights.push_back(0.00592782); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547682,-99) , +8, 0.55549, 1, 0, 0.619344,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450673,-99) , +12, 0.0327361, 0, 0, 0.541072,-99) , +9, 3.9991, 0, 0, 0.555651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354442,-99) , +12, 0.018188, 0, 0, 0.543506,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181235,-99) , +7, 0.143756, 1, 0, 0.50189,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226852,-99) , +7, 0.0300649, 1, 0, 0.368481,-99) , +8, -0.885182, 0, 0, 0.487545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147151,-99) , +1, 69.5, 1, 0, 0.480273,-99) , +12, 0.101389, 1, 0, 0.507197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35265,-99) , +1, 6.5, 0, 0, 0.501244,-99) ); + // itree = 700 + fBoostWeights.push_back(0.0058995); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63324,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453901,-99) , +6, 0.570477, 1, 0, 0.538656,-99) , +9, 0.712565, 0, 0, 0.572602,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502997,-99) , +3, 0.997635, 0, 0, 0.547544,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384928,-99) , +13, 0.0011964, 0, 0, 0.465519,-99) , +15, 0.468935, 1, 0, 0.507973,-99) , +3, 0.982209, 1, 0, 0.536915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345654,-99) , +3, 0.999097, 1, 0, 0.49659,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295583,-99) , +8, -0.959454, 1, 0, 0.370457,-99) , +8, -0.885298, 0, 0, 0.482549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310653,-99) , +4, 1.81714, 1, 0, 0.47109,-99) , +12, 0.10141, 1, 0, 0.498489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302549,-99) , +12, 0.0182039, 0, 0, 0.493561,-99) ); + // itree = 701 + fBoostWeights.push_back(0.00630196); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527731,-99) , +7, 0.0588961, 1, 0, 0.591796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497328,-99) , +3, 0.974281, 1, 0, 0.530044,-99) , +2, 17.5, 0, 0, 0.55674,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460285,-99) , +0, 16.5, 0, 0, 0.538611,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201676,-99) , +1, 40.5, 1, 0, 0.451351,-99) , +11, 1.5, 0, 0, 0.480085,-99) , +12, 0.109415, 1, 0, 0.510655,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412571,-99) , +9, 0.271879, 0, 0, 0.471987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280797,-99) , +6, 0.788276, 1, 0, 0.411289,-99) , +12, 0.0305522, 0, 0, 0.50212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32449,-99) , +3, 0.99963, 1, 0, 0.497306,-99) ); + // itree = 702 + fBoostWeights.push_back(0.00567458); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543735,-99) , +13, 0.00250672, 0, 0, 0.6013,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415363,-99) , +8, 0.558107, 1, 0, 0.507561,-99) , +6, 0.437641, 1, 0, 0.544276,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468313,-99) , +15, 0.234849, 0, 0, 0.497805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310412,-99) , +13, 0.0154792, 1, 0, 0.482426,-99) , +5, 1.39058, 1, 0, 0.507151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271165,-99) , +2, 6.5, 0, 0, 0.502798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275333,-99) , +12, 0.0176003, 0, 0, 0.497801,-99) ); + // itree = 703 + fBoostWeights.push_back(0.00334554); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488478,-99) , +2, 24.5, 0, 0, 0.50613,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273131,-99) , +13, 0.0569757, 1, 0, 0.502479,-99) , +12, 0.521876, 0, 0, 0.50795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285089,-99) , +2, 6.5, 0, 0, 0.503641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313355,-99) , +3, 0.999634, 1, 0, 0.498857,-99) ); + // itree = 704 + fBoostWeights.push_back(0.00745465); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546799,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347837,-99) , +5, 2.25771, 1, 0, 0.542482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355447,-99) , +14, -5.46461, 0, 0, 0.533558,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449496,-99) , +12, 0.169058, 0, 0, 0.52931,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222483,-99) , +8, -0.0429255, 0, 0, 0.404009,-99) , +5, 1.56421, 1, 0, 0.469022,-99) , +12, 0.127002, 1, 0, 0.502895,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117893,-99) , +4, 1.58028, 1, 0, 0.372456,-99) , +3, 0.999224, 1, 0, 0.493568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226104,-99) , +2, 6.5, 0, 0, 0.488235,-99) ); + // itree = 705 + fBoostWeights.push_back(0.00730452); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609746,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535146,-99) , +9, -3.35408, 1, 0, 0.550483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443722,-99) , +12, 0.0305427, 0, 0, 0.540368,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523265,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427064,-99) , +5, 1.53566, 0, 0, 0.490667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260488,-99) , +7, 0.0235968, 1, 0, 0.468923,-99) , +2, 12.5, 0, 0, 0.518911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362188,-99) , +3, 0.999216, 1, 0, 0.510178,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544037,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310591,-99) , +13, 0.00346185, 1, 0, 0.447058,-99) , +5, 1.37953, 1, 0, 0.482886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215138,-99) , +5, 2.0231, 1, 0, 0.459149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152721,-99) , +7, 0.0304183, 1, 0, 0.428797,-99) , +1, 9.5, 0, 0, 0.493299,-99) ); + // itree = 706 + fBoostWeights.push_back(0.00419369); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.693985,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685128,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493924,-99) , +16, 76.474, 1, 0, 0.510812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356591,-99) , +8, -0.985076, 0, 0, 0.504582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340052,-99) , +3, 0.99938, 1, 0, 0.4969,-99) , +10, -14777.8, 1, 0, 0.502872,-99) , +12, 0.513304, 0, 0, 0.510604,-99) ); + // itree = 707 + fBoostWeights.push_back(0.00465554); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520366,-99) , +6, 0.0591738, 1, 0, 0.530747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35571,-99) , +1, 55.5, 1, 0, 0.523575,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402612,-99) , +5, 1.49386, 0, 0, 0.480906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314003,-99) , +1, 13.5, 1, 0, 0.457944,-99) , +7, 0.0146072, 0, 0, 0.505088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34155,-99) , +7, 0.141664, 1, 0, 0.499376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270172,-99) , +7, 0.00716579, 0, 0, 0.494806,-99) ); + // itree = 708 + fBoostWeights.push_back(0.00505949); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652516,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527534,-99) , +9, -4.78972, 1, 0, 0.546504,-99) , +0, 33.5, 0, 0, 0.570257,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500793,-99) , +9, 10.0569, 0, 0, 0.507451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320338,-99) , +7, 0.00714423, 0, 0, 0.501901,-99) , +11, 1.5, 0, 0, 0.524122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316034,-99) , +8, -0.984638, 0, 0, 0.51777,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283281,-99) , +15, 0.228482, 1, 0, 0.4008,-99) , +13, 0.0201003, 1, 0, 0.5081,-99) ); + // itree = 709 + fBoostWeights.push_back(0.00544409); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523705,-99) , +8, 0.712138, 1, 0, 0.57718,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259473,-99) , +7, 0.0461247, 1, 0, 0.497368,-99) , +2, 24.5, 0, 0, 0.513399,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339469,-99) , +5, 1.46907, 1, 0, 0.447879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0978943,-99) , +4, 1.68351, 1, 0, 0.426252,-99) , +13, 0.0139844, 1, 0, 0.501867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271344,-99) , +2, 6.5, 0, 0, 0.497464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258857,-99) , +15, 4.16271, 1, 0, 0.493227,-99) ); + // itree = 710 + fBoostWeights.push_back(0.00919532); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486196,-99) , +15, 0.823382, 1, 0, 0.578239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427236,-99) , +14, -4.58666, 0, 0, 0.559929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432044,-99) , +8, -0.858071, 0, 0, 0.543017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28336,-99) , +5, 1.74771, 1, 0, 0.400972,-99) , +12, 0.0313553, 0, 0, 0.517121,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461673,-99) , +13, 0.0180672, 1, 0, 0.529273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412502,-99) , +3, 0.997858, 1, 0, 0.508791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491306,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325806,-99) , +12, 0.199476, 0, 0, 0.379099,-99) , +10, 3937.06, 0, 0, 0.42532,-99) , +7, 0.0146933, 0, 0, 0.484591,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166894,-99) , +7, 0.0771403, 1, 0, 0.429215,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141158,-99) , +4, 2.07376, 1, 0, 0.40878,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137975,-99) , +8, 0.00121749, 0, 0, 0.357542,-99) , +4, 1.43993, 1, 0, 0.452045,-99) , +12, 0.110628, 1, 0, 0.482741,-99) ); + // itree = 711 + fBoostWeights.push_back(0.00474191); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431265,-99) , +13, 0.000249074, 0, 0, 0.584403,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467268,-99) , +9, 0.543327, 0, 0, 0.49659,-99) , +4, 0.528786, 1, 0, 0.512823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384609,-99) , +5, 0.570354, 0, 0, 0.506321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251174,-99) , +4, 2.06757, 1, 0, 0.501655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262651,-99) , +3, 0.730301, 0, 0, 0.495808,-99) ); + // itree = 712 + fBoostWeights.push_back(0.00482144); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638051,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526203,-99) , +10, 18189.6, 1, 0, 0.598402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499446,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373189,-99) , +3, 0.999223, 1, 0, 0.492186,-99) , +9, -6.59854, 1, 0, 0.503195,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318705,-99) , +7, 0.00896767, 0, 0, 0.4374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200703,-99) , +4, 1.78184, 1, 0, 0.418977,-99) , +15, 0.0793337, 0, 0, 0.486125,-99) , +12, 0.509824, 0, 0, 0.492012,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26755,-99) , +7, 0.178502, 1, 0, 0.487825,-99) ); + // itree = 713 + fBoostWeights.push_back(0.00390727); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365546,-99) , +8, -0.979963, 0, 0, 0.515151,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536285,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386594,-99) , +10, 9218.54, 0, 0, 0.440352,-99) , +3, 0.998059, 1, 0, 0.50332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318018,-99) , +7, 0.00714071, 0, 0, 0.499271,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160633,-99) , +7, 0.253618, 1, 0, 0.496555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307626,-99) , +12, 0.01821, 0, 0, 0.491812,-99) ); + // itree = 714 + fBoostWeights.push_back(0.00371465); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677925,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511792,-99) , +2, 13.5, 0, 0, 0.584135,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537306,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470936,-99) , +9, -1.21677, 1, 0, 0.498664,-99) , +9, 6.34077, 0, 0, 0.507469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216664,-99) , +5, 2.49011, 1, 0, 0.504814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339286,-99) , +13, 0.0303353, 1, 0, 0.498096,-99) , +12, 0.522667, 0, 0, 0.504197,-99) ); + // itree = 715 + fBoostWeights.push_back(0.00539202); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537669,-99) , +0, 16.5, 0, 0, 0.587354,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473131,-99) , +4, 1.43637, 0, 0, 0.519824,-99) , +6, 0.398653, 1, 0, 0.551416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406225,-99) , +14, -4.67513, 0, 0, 0.537209,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503966,-99) , +6, 0.0836283, 1, 0, 0.517961,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427171,-99) , +15, 0.0243452, 1, 0, 0.446532,-99) , +12, 0.134216, 1, 0, 0.485717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183293,-99) , +5, 2.30887, 1, 0, 0.480234,-99) , +11, 1.5, 0, 0, 0.499274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298727,-99) , +3, 0.999647, 1, 0, 0.49446,-99) ); + // itree = 716 + fBoostWeights.push_back(0.00822747); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.700667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533561,-99) , +2, 34.5, 0, 0, 0.546605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337708,-99) , +1, 47.5, 1, 0, 0.539504,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319988,-99) , +13, 0.0175018, 1, 0, 0.502002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36865,-99) , +2, 24.5, 0, 0, 0.464208,-99) , +15, 0.633401, 1, 0, 0.52313,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1778,-99) , +5, 1.75927, 1, 0, 0.437765,-99) , +8, -0.89439, 0, 0, 0.513813,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385811,-99) , +8, 0.855733, 1, 0, 0.498325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319188,-99) , +5, 1.98505, 1, 0, 0.477209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284574,-99) , +3, 0.956438, 0, 0, 0.451507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125185,-99) , +7, 0.0314074, 1, 0, 0.421056,-99) , +1, 9.5, 0, 0, 0.49487,-99) ); + // itree = 717 + fBoostWeights.push_back(0.0091688); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581905,-99) , +4, 0.652342, 1, 0, 0.61892,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467057,-99) , +12, 0.226604, 0, 0, 0.513047,-99) , +13, 0.0103373, 1, 0, 0.5753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443144,-99) , +7, 0.0140044, 0, 0, 0.557179,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586127,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374232,-99) , +14, -3.87284, 0, 0, 0.430372,-99) , +9, -0.0227014, 1, 0, 0.489487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294561,-99) , +10, 6088.67, 1, 0, 0.449584,-99) , +13, 0.00168938, 0, 0, 0.519911,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456539,-99) , +15, 0.259269, 0, 0, 0.494122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324882,-99) , +12, 0.0236344, 0, 0, 0.483817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358135,-99) , +3, 0.887593, 0, 0, 0.470491,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535718,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236465,-99) , +9, -0.257682, 1, 0, 0.336024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115638,-99) , +4, 1.65594, 1, 0, 0.300147,-99) , +11, 1.5, 0, 0, 0.379683,-99) , +13, 0.00770564, 1, 0, 0.45253,-99) , +4, 1.0147, 1, 0, 0.482432,-99) ); + // itree = 718 + fBoostWeights.push_back(0.00385121); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530906,-99) , +6, 0.0329964, 0, 0, 0.600171,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477731,-99) , +9, -0.777828, 1, 0, 0.506839,-99) , +6, 0.0644884, 1, 0, 0.516759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356788,-99) , +5, 2.25775, 1, 0, 0.511132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352819,-99) , +8, -0.984599, 0, 0, 0.504922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300477,-99) , +3, 0.999645, 1, 0, 0.499955,-99) ); + // itree = 719 + fBoostWeights.push_back(0.00692235); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611463,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507073,-99) , +10, 8653.28, 0, 0, 0.5212,-99) , +6, 0.0719945, 1, 0, 0.532128,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376351,-99) , +5, 1.33244, 1, 0, 0.475347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234673,-99) , +3, 0.998129, 1, 0, 0.432724,-99) , +13, 0.0167731, 1, 0, 0.516671,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395975,-99) , +8, -0.657822, 0, 0, 0.493729,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241113,-99) , +7, 0.00914895, 0, 0, 0.386193,-99) , +12, 0.165862, 1, 0, 0.452097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 2.0149, 1, 0, 0.443072,-99) , +7, 0.0147807, 0, 0, 0.495427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23644,-99) , +15, 4.61116, 1, 0, 0.491636,-99) ); + // itree = 720 + fBoostWeights.push_back(0.00615607); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471751,-99) , +7, 0.103129, 1, 0, 0.561846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225773,-99) , +1, 10.5, 0, 0, 0.548515,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40887,-99) , +8, 0.979662, 1, 0, 0.498782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176812,-99) , +7, 0.0455639, 1, 0, 0.487827,-99) , +2, 24.5, 0, 0, 0.503332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311488,-99) , +3, 0.999688, 1, 0, 0.499363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221456,-99) , +2, 6.5, 0, 0, 0.49463,-99) ); + // itree = 721 + fBoostWeights.push_back(0.00374604); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535442,-99) , +9, -3.71133, 1, 0, 0.554327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297538,-99) , +3, 0.764327, 0, 0, 0.497104,-99) , +16, 492.966, 1, 0, 0.518995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249522,-99) , +7, 0.252106, 1, 0, 0.516416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3441,-99) , +12, 0.0190252, 0, 0, 0.511427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279944,-99) , +2, 6.5, 0, 0, 0.507009,-99) ); + // itree = 722 + fBoostWeights.push_back(0.00624774); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496159,-99) , +2, 16.5, 0, 0, 0.564562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424239,-99) , +1, 62.5, 1, 0, 0.553021,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219747,-99) , +5, 2.27784, 1, 0, 0.501045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0450278,-99) , +0, 41.5, 1, 0, 0.491881,-99) , +1, 14.5, 0, 0, 0.520571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323467,-99) , +3, 0.999651, 1, 0, 0.515441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231118,-99) , +2, 6.5, 0, 0, 0.510241,-99) ); + // itree = 723 + fBoostWeights.push_back(0.00454016); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675491,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44067,-99) , +5, 2.03442, 1, 0, 0.547177,-99) , +1, 19.5, 0, 0, 0.577397,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412748,-99) , +8, -0.857285, 0, 0, 0.55906,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648116,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330748,-99) , +14, -4.89654, 0, 0, 0.486988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333,-99) , +5, 2.16541, 1, 0, 0.479123,-99) , +12, 0.492292, 0, 0, 0.486346,-99) , +9, -3.72438, 1, 0, 0.500567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283419,-99) , +7, 0.178342, 1, 0, 0.496391,-99) ); + // itree = 724 + fBoostWeights.push_back(0.00737831); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.746471,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465138,-99) , +13, 0.00136652, 0, 0, 0.571665,-99) , +4, 1.80332, 0, 0, 0.599187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446891,-99) , +1, 8.5, 0, 0, 0.571096,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502613,-99) , +6, 0.170866, 1, 0, 0.529781,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308567,-99) , +12, 0.0299848, 0, 0, 0.467852,-99) , +16, 1111.77, 1, 0, 0.495697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287803,-99) , +5, 2.27558, 1, 0, 0.48947,-99) , +10, 8903.92, 0, 0, 0.502222,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310817,-99) , +3, 0.996368, 1, 0, 0.453376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0308804,-99) , +1, 17.5, 0, 0, 0.389352,-99) , +7, 0.0837049, 1, 0, 0.492251,-99) ); + // itree = 725 + fBoostWeights.push_back(0.00561721); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469908,-99) , +8, 0.970481, 1, 0, 0.554974,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343683,-99) , +12, 0.0312838, 0, 0, 0.493093,-99) , +16, 1038.15, 1, 0, 0.521995,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402472,-99) , +13, 0.00811866, 1, 0, 0.448838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.067372,-99) , +5, 1.91977, 1, 0, 0.424885,-99) , +8, -0.842564, 0, 0, 0.509273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254148,-99) , +2, 6.5, 0, 0, 0.504808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266711,-99) , +3, 0.71543, 0, 0, 0.499699,-99) ); + // itree = 726 + fBoostWeights.push_back(0.00814866); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568686,-99) , +13, 0.00531675, 1, 0, 0.629887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524557,-99) , +13, 0.000529104, 0, 0, 0.596038,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576323,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41112,-99) , +9, 4.4167, 0, 0, 0.478322,-99) , +3, 0.972446, 1, 0, 0.507417,-99) , +6, 0.219055, 1, 0, 0.536947,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410528,-99) , +15, 0.0584209, 0, 0, 0.494159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374364,-99) , +13, 0.0240608, 1, 0, 0.486145,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305331,-99) , +5, 2.07672, 1, 0, 0.479609,-99) , +9, 0.497043, 0, 0, 0.505266,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431733,-99) , +1, 9.5, 0, 0, 0.537894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289564,-99) , +13, 0.00396119, 1, 0, 0.490343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22893,-99) , +3, 0.897584, 0, 0, 0.403657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162812,-99) , +4, 1.9711, 1, 0, 0.366095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109804,-99) , +8, -0.403376, 0, 0, 0.331861,-99) , +9, -1.22093, 1, 0, 0.403712,-99) , +4, 1.55762, 1, 0, 0.486786,-99) ); + // itree = 727 + fBoostWeights.push_back(0.00571833); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483745,-99) , +5, 1.21254, 0, 0, 0.548536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432702,-99) , +8, 0.988716, 1, 0, 0.535829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359421,-99) , +12, 0.01821, 0, 0, 0.526537,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519658,-99) , +15, 0.189975, 1, 0, 0.580924,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406951,-99) , +7, 0.0136947, 1, 0, 0.461017,-99) , +0, 16.5, 0, 0, 0.525773,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345319,-99) , +3, 0.997833, 1, 0, 0.458543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250049,-99) , +4, 1.70846, 1, 0, 0.443067,-99) , +11, 1.5, 0, 0, 0.469099,-99) , +12, 0.119218, 1, 0, 0.497909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360613,-99) , +5, 2.19661, 1, 0, 0.491593,-99) ); + // itree = 728 + fBoostWeights.push_back(0.00535555); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641029,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442885,-99) , +8, -0.914717, 0, 0, 0.552151,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422718,-99) , +13, 0.00347535, 0, 0, 0.470624,-99) , +15, 0.552591, 1, 0, 0.520092,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54169,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434488,-99) , +5, 0.858265, 0, 0, 0.518398,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0702745,-99) , +7, 0.109404, 1, 0, 0.424513,-99) , +4, 1.00049, 1, 0, 0.467064,-99) , +12, 0.12498, 1, 0, 0.494155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29379,-99) , +5, 2.31711, 1, 0, 0.489116,-99) , +9, 11.5583, 0, 0, 0.494484,-99) ); + // itree = 729 + fBoostWeights.push_back(0.00613081); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361112,-99) , +1, 74.5, 1, 0, 0.552895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377141,-99) , +1, 10.5, 0, 0, 0.539134,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273037,-99) , +7, 0.0313268, 1, 0, 0.487887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0453047,-99) , +0, 28.5, 1, 0, 0.479243,-99) , +2, 16.5, 0, 0, 0.505027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323115,-99) , +8, -0.991053, 0, 0, 0.499804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278832,-99) , +3, 0.999718, 1, 0, 0.495668,-99) ); + // itree = 730 + fBoostWeights.push_back(0.00387339); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6831,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484599,-99) , +2, 24.5, 0, 0, 0.502478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144735,-99) , +7, 0.26332, 1, 0, 0.4998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271979,-99) , +7, 0.0071459, 0, 0, 0.495638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302647,-99) , +3, 0.741135, 0, 0, 0.489733,-99) , +12, 0.545255, 0, 0, 0.49625,-99) ); + // itree = 731 + fBoostWeights.push_back(0.00605617); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454734,-99) , +15, 1.65392, 1, 0, 0.585733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450066,-99) , +1, 63.5, 1, 0, 0.568158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229694,-99) , +1, 10.5, 0, 0, 0.555335,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280395,-99) , +5, 2.3884, 1, 0, 0.497624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286607,-99) , +0, 31.5, 1, 0, 0.491882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1561,-99) , +7, 0.0569752, 1, 0, 0.484526,-99) , +2, 24.5, 0, 0, 0.502563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281244,-99) , +3, 0.999634, 1, 0, 0.497285,-99) ); + // itree = 732 + fBoostWeights.push_back(0.00622095); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52486,-99) , +16, 1664.16, 1, 0, 0.593592,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676675,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518162,-99) , +7, 0.0166483, 1, 0, 0.602152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549786,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474149,-99) , +2, 24.5, 0, 0, 0.501979,-99) , +15, 0.064223, 1, 0, 0.512376,-99) , +6, 0.0641822, 1, 0, 0.521147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158306,-99) , +7, 0.354082, 1, 0, 0.518744,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598565,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313365,-99) , +5, 1.86189, 1, 0, 0.458312,-99) , +15, 0.131029, 0, 0, 0.516718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305877,-99) , +0, 14.5, 1, 0, 0.49268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228834,-99) , +4, 1.38453, 1, 0, 0.346311,-99) , +14, -2.68213, 1, 0, 0.448206,-99) , +7, 0.0132704, 0, 0, 0.502599,-99) ); + // itree = 733 + fBoostWeights.push_back(0.00512245); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663769,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477324,-99) , +16, 450.971, 1, 0, 0.502241,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214794,-99) , +14, -3.82906, 1, 0, 0.368188,-99) , +4, 1.81157, 1, 0, 0.493887,-99) , +10, -15209.8, 1, 0, 0.499132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.145575,-99) , +7, 0.324392, 1, 0, 0.497366,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215451,-99) , +2, 6.5, 0, 0, 0.492201,-99) ); + // itree = 734 + fBoostWeights.push_back(0.00567009); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517861,-99) , +12, 0.125377, 1, 0, 0.560514,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408283,-99) , +12, 0.0289881, 0, 0, 0.546565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387973,-99) , +16, 1.55895, 0, 0, 0.533821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357221,-99) , +8, -0.946846, 0, 0, 0.522123,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40798,-99) , +14, -4.11031, 0, 0, 0.522131,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427256,-99) , +5, 1.33989, 1, 0, 0.454437,-99) , +12, 0.0706912, 1, 0, 0.473207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24506,-99) , +4, 1.97113, 1, 0, 0.466667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223296,-99) , +3, 0.999642, 1, 0, 0.459897,-99) , +16, 492.966, 1, 0, 0.483765,-99) ); + // itree = 735 + fBoostWeights.push_back(0.00574472); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620533,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458557,-99) , +3, 0.995946, 1, 0, 0.544132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433925,-99) , +1, 9.5, 0, 0, 0.526644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156065,-99) , +4, 2.05847, 1, 0, 0.520893,-99) , +9, -5.13042, 1, 0, 0.536897,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581962,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387713,-99) , +7, 0.028977, 1, 0, 0.495543,-99) , +2, 29.5, 0, 0, 0.519315,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43475,-99) , +11, 0.5, 1, 0, 0.474733,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138777,-99) , +5, 2.01947, 1, 0, 0.32915,-99) , +13, 0.00833047, 1, 0, 0.451999,-99) , +5, 1.41965, 1, 0, 0.48058,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228812,-99) , +13, 0.0707336, 1, 0, 0.476003,-99) , +11, 1.5, 0, 0, 0.496182,-99) ); + // itree = 736 + fBoostWeights.push_back(0.00477506); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654174,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37878,-99) , +13, 0.0252557, 1, 0, 0.504987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356134,-99) , +12, 0.0216607, 0, 0, 0.497909,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276511,-99) , +5, 2.08094, 1, 0, 0.449606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268818,-99) , +7, 0.00896757, 0, 0, 0.406323,-99) , +15, 0.0583582, 0, 0, 0.486128,-99) , +12, 0.512772, 0, 0, 0.492478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117187,-99) , +7, 0.251046, 1, 0, 0.489068,-99) ); + // itree = 737 + fBoostWeights.push_back(0.00719072); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519837,-99) , +13, 0.00198558, 0, 0, 0.61809,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462213,-99) , +8, 0.651343, 1, 0, 0.547968,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294676,-99) , +12, 0.169671, 1, 0, 0.439343,-99) , +6, 0.780131, 1, 0, 0.511791,-99) , +15, 0.0939007, 1, 0, 0.542917,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524474,-99) , +5, 1.70756, 0, 0, 0.573274,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421725,-99) , +0, 19.5, 0, 0, 0.475981,-99) , +12, 0.101513, 1, 0, 0.521887,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327909,-99) , +13, 0.0311583, 1, 0, 0.461442,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215346,-99) , +14, -4.11795, 1, 0, 0.310931,-99) , +5, 1.9817, 1, 0, 0.445032,-99) , +11, 1.5, 0, 0, 0.470372,-99) , +9, 2.87452, 0, 0, 0.488155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125187,-99) , +5, 2.59392, 1, 0, 0.486409,-99) ); + // itree = 738 + fBoostWeights.push_back(0.00464845); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245855,-99) , +4, 1.81695, 1, 0, 0.565681,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480215,-99) , +4, 1.46247, 0, 0, 0.511956,-99) , +8, 0.438495, 1, 0, 0.539198,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424706,-99) , +8, -0.735474, 0, 0, 0.515336,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13063,-99) , +2, 7.5, 0, 0, 0.435296,-99) , +4, 1.2868, 1, 0, 0.484119,-99) , +12, 0.13624, 1, 0, 0.513817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311819,-99) , +3, 0.999685, 1, 0, 0.509917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316574,-99) , +12, 0.0168727, 0, 0, 0.50595,-99) ); + // itree = 739 + fBoostWeights.push_back(0.008295); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.724883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57821,-99) , +6, 0.88764, 1, 0, 0.670663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532998,-99) , +8, 0.690457, 1, 0, 0.618984,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616093,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509935,-99) , +16, 1256.48, 1, 0, 0.562497,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191977,-99) , +7, 0.136897, 1, 0, 0.477731,-99) , +4, 0.909636, 1, 0, 0.517336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293155,-99) , +3, 0.999432, 1, 0, 0.506858,-99) , +9, 4.71138, 0, 0, 0.524014,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515158,-99) , +4, 1.35747, 0, 0, 0.568516,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330451,-99) , +8, -0.887358, 0, 0, 0.467833,-99) , +12, 0.0752891, 1, 0, 0.491048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345195,-99) , +15, 0.440163, 1, 0, 0.480571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16557,-99) , +7, 0.0282995, 1, 0, 0.462938,-99) , +2, 13.5, 0, 0, 0.496749,-99) ); + // itree = 740 + fBoostWeights.push_back(0.00313131); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478366,-99) , +1, 10.5, 0, 0, 0.584591,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432308,-99) , +8, -0.914372, 0, 0, 0.508796,-99) , +10, 10853.9, 0, 0, 0.51735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387049,-99) , +12, 0.0229865, 0, 0, 0.511543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351283,-99) , +7, 0.00738125, 0, 0, 0.507278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314814,-99) , +3, 0.999638, 1, 0, 0.502057,-99) ); + // itree = 741 + fBoostWeights.push_back(0.00364544); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617971,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470171,-99) , +12, 0.100163, 1, 0, 0.500104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359507,-99) , +12, 0.0220065, 0, 0, 0.494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278977,-99) , +15, 0.0308752, 0, 0, 0.489468,-99) , +12, 0.443537, 0, 0, 0.496522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261434,-99) , +4, 2.06713, 1, 0, 0.492367,-99) ); + // itree = 742 + fBoostWeights.push_back(0.00631615); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709519,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558255,-99) , +8, 0.165496, 0, 0, 0.658349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458877,-99) , +12, 0.0622389, 0, 0, 0.591712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477441,-99) , +10, 8523.89, 0, 0, 0.491909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.197111,-99) , +7, 0.062927, 1, 0, 0.483508,-99) , +2, 35.5, 0, 0, 0.497177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0513107,-99) , +7, 0.21299, 1, 0, 0.494341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324624,-99) , +1, 64.5, 1, 0, 0.488473,-99) ); + // itree = 743 + fBoostWeights.push_back(0.00683617); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.690595,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524057,-99) , +4, 0.834637, 1, 0, 0.556805,-99) , +9, -5.19006, 1, 0, 0.575746,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393606,-99) , +7, 0.0141049, 1, 0, 0.483414,-99) , +1, 9.5, 0, 0, 0.558837,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316037,-99) , +4, 1.58093, 1, 0, 0.463844,-99) , +16, 5.57431, 0, 0, 0.540516,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606146,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48043,-99) , +13, 0.00985285, 1, 0, 0.517344,-99) , +6, 0.492437, 1, 0, 0.553439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434135,-99) , +13, 0.00203001, 0, 0, 0.518387,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56789,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459434,-99) , +15, 0.0712766, 1, 0, 0.486742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33934,-99) , +7, 0.00930967, 0, 0, 0.46918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209835,-99) , +13, 0.0151096, 1, 0, 0.450239,-99) , +5, 1.34523, 1, 0, 0.475856,-99) , +16, 532.119, 1, 0, 0.501162,-99) ); + // itree = 744 + fBoostWeights.push_back(0.0038573); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662938,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489426,-99) , +11, 1.5, 0, 0, 0.509308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338018,-99) , +13, 0.0377251, 1, 0, 0.504127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353458,-99) , +15, 0.0387165, 0, 0, 0.496903,-99) , +12, 0.509317, 0, 0, 0.502915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207192,-99) , +4, 2.06958, 1, 0, 0.497928,-99) ); + // itree = 745 + fBoostWeights.push_back(0.00387444); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629957,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269164,-99) , +5, 2.30382, 1, 0, 0.51953,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337451,-99) , +2, 12.5, 1, 0, 0.431675,-99) , +14, -4.57917, 0, 0, 0.510975,-99) , +9, 10.0569, 0, 0, 0.516282,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299309,-99) , +4, 1.08773, 1, 0, 0.422785,-99) , +13, 0.0175316, 1, 0, 0.506266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297145,-99) , +4, 2.07376, 1, 0, 0.502467,-99) ); + // itree = 746 + fBoostWeights.push_back(0.00668169); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46831,-99) , +13, 0.00081558, 0, 0, 0.561406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436726,-99) , +7, 0.014377, 0, 0, 0.53902,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402859,-99) , +14, -4.67533, 0, 0, 0.508421,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140617,-99) , +4, 1.76084, 1, 0, 0.405503,-99) , +14, -2.39694, 1, 0, 0.480316,-99) , +5, 1.44017, 1, 0, 0.50535,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199675,-99) , +12, 0.190149, 1, 0, 0.342694,-99) , +3, 0.999385, 1, 0, 0.497064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.074824,-99) , +7, 0.240014, 1, 0, 0.493675,-99) ); + // itree = 747 + fBoostWeights.push_back(0.00678739); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554091,-99) , +6, 0.160354, 1, 0, 0.577687,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234374,-99) , +5, 2.3217, 1, 0, 0.571538,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401222,-99) , +5, 1.91043, 0, 0, 0.495811,-99) , +14, -3.46743, 0, 0, 0.549125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410936,-99) , +13, 0.0212354, 1, 0, 0.539383,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510753,-99) , +6, 0.819398, 1, 0, 0.569025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451244,-99) , +13, 0.0020128, 0, 0, 0.5302,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185989,-99) , +7, 0.00706906, 0, 0, 0.463177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.121984,-99) , +13, 0.0367801, 1, 0, 0.456043,-99) , +5, 1.32872, 1, 0, 0.482099,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192965,-99) , +3, 0.99526, 1, 0, 0.360915,-99) , +8, -0.944385, 0, 0, 0.472148,-99) , +11, 1.5, 0, 0, 0.495,-99) ); + // itree = 748 + fBoostWeights.push_back(0.00634113); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677839,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434174,-99) , +8, 0.990478, 1, 0, 0.561756,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40935,-99) , +4, 1.4604, 1, 0, 0.484641,-99) , +12, 0.10094, 1, 0, 0.513891,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331952,-99) , +4, 1.68926, 1, 0, 0.476541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380573,-99) , +4, 1.21742, 0, 0, 0.424899,-99) , +12, 0.0369407, 0, 0, 0.501941,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15355,-99) , +5, 1.38766, 1, 0, 0.37622,-99) , +13, 0.0218644, 1, 0, 0.493417,-99) , +12, 0.544829, 0, 0, 0.499384,-99) ); + // itree = 749 + fBoostWeights.push_back(0.00471622); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636381,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566677,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496138,-99) , +2, 11.5, 0, 0, 0.544987,-99) , +6, 0.112324, 1, 0, 0.560957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443297,-99) , +8, 0.991377, 1, 0, 0.547561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534319,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389637,-99) , +3, 0.876076, 0, 0, 0.521765,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530472,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403846,-99) , +8, 0.954774, 0, 0, 0.447576,-99) , +5, 1.65196, 1, 0, 0.495723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34241,-99) , +7, 0.0959695, 1, 0, 0.486108,-99) , +11, 1.5, 0, 0, 0.506342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331238,-99) , +4, 1.96732, 1, 0, 0.500629,-99) ); + // itree = 750 + fBoostWeights.push_back(0.00423332); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567768,-99) , +8, -0.6862, 0, 0, 0.621782,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408614,-99) , +4, 1.38305, 0, 0, 0.473977,-99) , +8, 0.586508, 1, 0, 0.561658,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480126,-99) , +4, 0.761227, 1, 0, 0.500237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36785,-99) , +3, 0.999141, 1, 0, 0.492456,-99) , +9, 4.4007, 0, 0, 0.50312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31802,-99) , +4, 1.98914, 1, 0, 0.498728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138807,-99) , +5, 2.46997, 1, 0, 0.49543,-99) ); + // itree = 751 + fBoostWeights.push_back(0.00372048); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471778,-99) , +6, 0.979484, 1, 0, 0.528559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342396,-99) , +3, 0.999686, 1, 0, 0.524456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336832,-99) , +2, 6.5, 0, 0, 0.520605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385849,-99) , +12, 0.0233927, 0, 0, 0.514684,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516941,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374889,-99) , +13, 0.0237953, 0, 0, 0.416558,-99) , +13, 0.00754863, 1, 0, 0.456418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0621733,-99) , +4, 1.64501, 1, 0, 0.436456,-99) , +8, -0.847314, 0, 0, 0.504147,-99) ); + // itree = 752 + fBoostWeights.push_back(0.00522183); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536841,-99) , +8, 0.494314, 1, 0, 0.595169,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493207,-99) , +9, 5.32952, 0, 0, 0.506808,-99) , +12, 0.0588766, 1, 0, 0.522128,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335022,-99) , +3, 0.983178, 1, 0, 0.408796,-99) , +12, 0.0324183, 0, 0, 0.511534,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340055,-99) , +3, 0.942746, 0, 0, 0.486302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307921,-99) , +2, 9.5, 1, 0, 0.423439,-99) , +7, 0.0100117, 0, 0, 0.502186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321573,-99) , +3, 0.999625, 1, 0, 0.497064,-99) ); + // itree = 753 + fBoostWeights.push_back(0.00457038); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627065,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492999,-99) , +6, 0.250009, 1, 0, 0.511531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295409,-99) , +13, 0.0569972, 1, 0, 0.506663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345013,-99) , +12, 0.01821, 0, 0, 0.500692,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431113,-99) , +15, 0.0682276, 1, 0, 0.508883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319071,-99) , +0, 11.5, 1, 0, 0.425254,-99) , +7, 0.0133033, 0, 0, 0.463084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304155,-99) , +5, 1.95907, 1, 0, 0.437575,-99) , +15, 0.0879077, 0, 0, 0.485747,-99) , +12, 0.532578, 0, 0, 0.490353,-99) ); + // itree = 754 + fBoostWeights.push_back(0.00668116); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.764425,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558487,-99) , +15, 0.280808, 1, 0, 0.605093,-99) , +4, 1.95011, 0, 0, 0.625716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448614,-99) , +1, 8.5, 0, 0, 0.594572,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627012,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393706,-99) , +0, 18.5, 1, 0, 0.534978,-99) , +1, 14.5, 0, 0, 0.57017,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371625,-99) , +4, 1.69162, 1, 0, 0.489832,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207767,-99) , +13, 0.00941606, 1, 0, 0.36462,-99) , +3, 0.997828, 1, 0, 0.477882,-99) , +10, -2011.35, 1, 0, 0.496759,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212486,-99) , +14, -3.69545, 1, 0, 0.361476,-99) , +5, 2.12019, 1, 0, 0.487741,-99) , +10, 10923, 0, 0, 0.500807,-99) ); + // itree = 755 + fBoostWeights.push_back(0.00634529); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529862,-99) , +6, 0.331088, 1, 0, 0.626877,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49165,-99) , +12, 0.111379, 1, 0, 0.582794,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391356,-99) , +8, 0.823561, 1, 0, 0.494036,-99) , +4, 1.42595, 0, 0, 0.521146,-99) , +3, 0.950984, 1, 0, 0.546753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357238,-99) , +14, -4.80632, 0, 0, 0.532377,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397949,-99) , +8, -0.946431, 0, 0, 0.493312,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312708,-99) , +7, 0.0124178, 0, 0, 0.40947,-99) , +15, 0.0499276, 0, 0, 0.482668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198943,-99) , +13, 0.0813225, 1, 0, 0.478612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311518,-99) , +5, 2.15284, 1, 0, 0.47048,-99) , +11, 1.5, 0, 0, 0.490925,-99) ); + // itree = 756 + fBoostWeights.push_back(0.00589946); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665194,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575091,-99) , +2, 33.5, 0, 0, 0.591951,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464791,-99) , +4, 1.50627, 0, 0, 0.492598,-99) , +9, 2.06035, 1, 0, 0.567371,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50251,-99) , +10, -8277.51, 1, 0, 0.510874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35133,-99) , +12, 0.0305374, 0, 0, 0.499559,-99) , +16, 271.158, 1, 0, 0.522438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315417,-99) , +1, 69.5, 1, 0, 0.516807,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417714,-99) , +15, 0.174456, 0, 0, 0.488165,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33948,-99) , +7, 0.0243924, 1, 0, 0.387534,-99) , +3, 0.988115, 1, 0, 0.44192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110702,-99) , +4, 1.57465, 1, 0, 0.41691,-99) , +8, -0.776242, 0, 0, 0.501605,-99) ); + // itree = 757 + fBoostWeights.push_back(0.00793025); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669206,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55117,-99) , +5, 1.74144, 0, 0, 0.568462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485966,-99) , +2, 10.5, 0, 0, 0.550036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451562,-99) , +8, 0.983265, 1, 0, 0.53419,-99) , +4, 1.92285, 0, 0, 0.54357,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637993,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459867,-99) , +15, 0.521608, 1, 0, 0.514372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291437,-99) , +15, 1.64356, 1, 0, 0.499604,-99) , +2, 50.5, 0, 0, 0.51406,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435964,-99) , +1, 14.5, 0, 0, 0.501947,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359167,-99) , +15, 0.0654585, 1, 0, 0.425698,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0624864,-99) , +5, 1.93372, 1, 0, 0.282398,-99) , +8, 0.4184, 0, 0, 0.375801,-99) , +5, 1.39776, 1, 0, 0.426968,-99) , +12, 0.113767, 1, 0, 0.467641,-99) , +11, 1.5, 0, 0, 0.493418,-99) ); + // itree = 758 + fBoostWeights.push_back(0.00921213); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511655,-99) , +4, 1.3886, 1, 0, 0.593466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213209,-99) , +5, 2.12175, 1, 0, 0.583453,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667076,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553201,-99) , +6, 0.737653, 1, 0, 0.608392,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341041,-99) , +12, 0.0330246, 0, 0, 0.469372,-99) , +4, 1.66756, 0, 0, 0.50224,-99) , +14, -2.99631, 0, 0, 0.548975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386912,-99) , +5, 2.03159, 1, 0, 0.523378,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.145623,-99) , +4, 1.52352, 1, 0, 0.397837,-99) , +14, -2.5307, 1, 0, 0.497773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243787,-99) , +0, 17.5, 1, 0, 0.482308,-99) , +7, 0.0156435, 0, 0, 0.523395,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455653,-99) , +1, 32.5, 1, 0, 0.538417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385693,-99) , +2, 14.5, 0, 0, 0.503264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32757,-99) , +4, 1.35827, 1, 0, 0.469159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174548,-99) , +3, 0.999315, 1, 0, 0.448619,-99) , +13, 0.0105545, 1, 0, 0.509539,-99) ); + // itree = 759 + fBoostWeights.push_back(0.00636648); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506062,-99) , +16, 434.68, 1, 0, 0.537468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413826,-99) , +12, 0.225034, 0, 0, 0.464893,-99) , +8, 0.930775, 1, 0, 0.518755,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309188,-99) , +7, 0.0157262, 0, 0, 0.418,-99) , +8, -0.920915, 0, 0, 0.508785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369715,-99) , +5, 0.452389, 0, 0, 0.502167,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311116,-99) , +7, 0.0126617, 0, 0, 0.485232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241889,-99) , +14, -3.03715, 1, 0, 0.397509,-99) , +4, 1.70936, 1, 0, 0.491298,-99) ); + // itree = 760 + fBoostWeights.push_back(0.00379274); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620472,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44659,-99) , +4, 1.57692, 1, 0, 0.509881,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444345,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.143115,-99) , +4, 1.81758, 1, 0, 0.430448,-99) , +15, 0.0604899, 0, 0, 0.499693,-99) , +12, 0.418008, 0, 0, 0.506828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303436,-99) , +7, 0.027556, 1, 0, 0.402564,-99) , +3, 0.998951, 1, 0, 0.497819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26719,-99) , +4, 2.07717, 1, 0, 0.493939,-99) ); + // itree = 761 + fBoostWeights.push_back(0.00701822); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621288,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605088,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6193,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487371,-99) , +8, -0.231192, 1, 0, 0.514105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370795,-99) , +8, -0.852641, 0, 0, 0.497108,-99) , +9, 4.0636, 0, 0, 0.519727,-99) , +3, 0.900372, 1, 0, 0.534543,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392801,-99) , +7, 0.0845847, 1, 0, 0.506695,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279853,-99) , +10, 2064.02, 1, 0, 0.385971,-99) , +7, 0.00941227, 0, 0, 0.495348,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252581,-99) , +0, 11.5, 1, 0, 0.362875,-99) , +1, 7.5, 0, 0, 0.483242,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288626,-99) , +1, 14.5, 0, 0, 0.406024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.5445, 1, 0, 0.364091,-99) , +13, 0.0162564, 1, 0, 0.470036,-99) , +11, 1.5, 0, 0, 0.491738,-99) ); + // itree = 762 + fBoostWeights.push_back(0.00590046); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438867,-99) , +12, 0.0305869, 0, 0, 0.555735,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415542,-99) , +4, 1.47916, 0, 0, 0.456903,-99) , +8, 0.705169, 1, 0, 0.519854,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437696,-99) , +7, 0.0140079, 0, 0, 0.495162,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345433,-99) , +14, -2.86849, 1, 0, 0.420342,-99) , +4, 1.28124, 1, 0, 0.46894,-99) , +12, 0.11833, 1, 0, 0.493563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348252,-99) , +4, 1.98694, 1, 0, 0.489179,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22459,-99) , +2, 6.5, 0, 0, 0.484443,-99) ); + // itree = 763 + fBoostWeights.push_back(0.00607973); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666339,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446042,-99) , +12, 0.0326435, 0, 0, 0.562837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20675,-99) , +1, 11.5, 0, 0, 0.545813,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115826,-99) , +5, 2.46109, 1, 0, 0.480011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.04906,-99) , +0, 42.5, 1, 0, 0.473731,-99) , +2, 23.5, 0, 0, 0.493469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318438,-99) , +3, 0.999635, 1, 0, 0.488252,-99) , +12, 0.539953, 0, 0, 0.494155,-99) ); + // itree = 764 + fBoostWeights.push_back(0.00745662); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666868,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503793,-99) , +15, 0.544695, 1, 0, 0.546275,-99) , +10, -1417.32, 1, 0, 0.569598,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212782,-99) , +5, 2.46103, 1, 0, 0.512733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178335,-99) , +7, 0.0485866, 1, 0, 0.502668,-99) , +2, 24.5, 0, 0, 0.519165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289705,-99) , +7, 0.00734213, 0, 0, 0.513785,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576761,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27562,-99) , +9, -5.68019, 1, 0, 0.417083,-99) , +9, 4.76445, 0, 0, 0.473403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28292,-99) , +5, 1.79138, 1, 0, 0.433806,-99) , +3, 0.997997, 1, 0, 0.50112,-99) ); + // itree = 765 + fBoostWeights.push_back(0.00849768); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573778,-99) , +16, 85.9229, 0, 0, 0.607436,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436154,-99) , +7, 0.0178085, 1, 0, 0.533723,-99) , +2, 17.5, 0, 0, 0.569712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463383,-99) , +14, -2.37343, 1, 0, 0.546391,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368453,-99) , +1, 14.5, 0, 0, 0.452066,-99) , +9, -1.03175, 1, 0, 0.492424,-99) , +12, 0.133865, 1, 0, 0.538251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412161,-99) , +8, -0.895927, 0, 0, 0.524861,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608987,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463571,-99) , +12, 0.155531, 0, 0, 0.504018,-99) , +6, 0.492437, 1, 0, 0.548317,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386695,-99) , +9, 0.28933, 1, 0, 0.432393,-99) , +8, 0.542807, 1, 0, 0.512883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612264,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382674,-99) , +11, 0.5, 1, 0, 0.438788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215813,-99) , +13, 0.00890654, 1, 0, 0.408328,-99) , +12, 0.450164, 0, 0, 0.424706,-99) , +5, 1.42684, 1, 0, 0.46346,-99) , +16, 528.472, 1, 0, 0.487598,-99) ); + // itree = 766 + fBoostWeights.push_back(0.00608533); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506351,-99) , +5, 1.45224, 1, 0, 0.561227,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367199,-99) , +7, 0.0357863, 1, 0, 0.501569,-99) , +2, 24.5, 0, 0, 0.515251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35376,-99) , +12, 0.0188283, 0, 0, 0.510837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381797,-99) , +13, 0.0377251, 1, 0, 0.505659,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442629,-99) , +16, 926.166, 1, 0, 0.551715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184408,-99) , +13, 0.00157988, 1, 0, 0.467972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122487,-99) , +3, 0.969335, 0, 0, 0.399832,-99) , +4, 1.77229, 1, 0, 0.496581,-99) ); + // itree = 767 + fBoostWeights.push_back(0.0031947); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461606,-99) , +13, 0.0110854, 1, 0, 0.523475,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291464,-99) , +8, -0.923562, 0, 0, 0.463486,-99) , +6, 0.814462, 1, 0, 0.506172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384267,-99) , +14, -4.99013, 0, 0, 0.499951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384032,-99) , +5, 2.18189, 1, 0, 0.494376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318311,-99) , +7, 0.00734119, 0, 0, 0.489877,-99) ); + // itree = 768 + fBoostWeights.push_back(0.00812382); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.700548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597188,-99) , +9, 0.370305, 0, 0, 0.645143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540034,-99) , +6, 0.888619, 1, 0, 0.608098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459764,-99) , +8, -0.913515, 0, 0, 0.576721,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535049,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401827,-99) , +6, 0.417437, 1, 0, 0.451442,-99) , +5, 1.23413, 0, 0, 0.484276,-99) , +13, 0.0040748, 0, 0, 0.53327,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515872,-99) , +5, 1.87949, 0, 0, 0.551396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361733,-99) , +3, 0.998841, 1, 0, 0.53636,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497784,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379161,-99) , +0, 26.5, 1, 0, 0.475965,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201141,-99) , +8, 0.79737, 0, 0, 0.34212,-99) , +5, 1.9351, 1, 0, 0.445189,-99) , +16, 532.143, 1, 0, 0.482255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176199,-99) , +14, -1.52731, 1, 0, 0.473316,-99) , +5, 1.41154, 1, 0, 0.498092,-99) ); + // itree = 769 + fBoostWeights.push_back(0.00721814); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667691,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522758,-99) , +15, 1.61593, 1, 0, 0.611095,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498004,-99) , +5, 1.3953, 0, 0, 0.545062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385056,-99) , +14, -4.83393, 0, 0, 0.531288,-99) , +2, 28.5, 0, 0, 0.550899,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459172,-99) , +3, 0.997812, 1, 0, 0.54834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403377,-99) , +7, 0.0145871, 0, 0, 0.519496,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361509,-99) , +6, 0.739106, 1, 0, 0.545731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386401,-99) , +16, 26.8298, 1, 0, 0.41551,-99) , +15, 0.0400925, 1, 0, 0.441783,-99) , +5, 1.4259, 1, 0, 0.473824,-99) , +12, 0.100554, 1, 0, 0.502764,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31965,-99) , +7, 0.0341295, 1, 0, 0.426752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285056,-99) , +0, 14.5, 0, 0, 0.387866,-99) , +12, 0.0287663, 0, 0, 0.494619,-99) ); + // itree = 770 + fBoostWeights.push_back(0.00647645); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663531,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472606,-99) , +16, 575.312, 1, 0, 0.549095,-99) , +0, 20.5, 0, 0, 0.593229,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603174,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497726,-99) , +6, 0.22528, 1, 0, 0.544883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433179,-99) , +8, 0.951839, 1, 0, 0.522375,-99) , +4, 1.20075, 0, 0, 0.555695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407086,-99) , +8, -0.896332, 0, 0, 0.542049,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580731,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487552,-99) , +12, 0.0587985, 1, 0, 0.503263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394259,-99) , +12, 0.0329201, 0, 0, 0.493455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345859,-99) , +3, 0.797913, 0, 0, 0.486244,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0493713,-99) , +8, 0.659502, 0, 0, 0.328878,-99) , +5, 2.02876, 1, 0, 0.472328,-99) , +11, 1.5, 0, 0, 0.49573,-99) ); + // itree = 771 + fBoostWeights.push_back(0.00721955); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41495,-99) , +8, -0.971182, 0, 0, 0.534767,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369478,-99) , +13, 0.000912652, 0, 0, 0.422198,-99) , +12, 0.0312422, 0, 0, 0.525219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346727,-99) , +7, 0.00748195, 0, 0, 0.520043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0861104,-99) , +4, 1.95603, 1, 0, 0.513508,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547024,-99) , +10, 3611.76, 1, 0, 0.619043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419047,-99) , +6, 0.291924, 0, 0, 0.548373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345172,-99) , +14, -3.53642, 1, 0, 0.523858,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490814,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331818,-99) , +9, -0.766656, 1, 0, 0.384344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212563,-99) , +1, 9.5, 0, 0, 0.351938,-99) , +5, 1.31613, 1, 0, 0.392582,-99) , +5, 1.92104, 0, 0, 0.442137,-99) , +8, 0.930132, 1, 0, 0.496412,-99) ); + // itree = 772 + fBoostWeights.push_back(0.00686572); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646981,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508452,-99) , +12, 0.100103, 1, 0, 0.544697,-99) , +10, -1754.82, 1, 0, 0.565961,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395145,-99) , +8, 0.461359, 1, 0, 0.490391,-99) , +16, 1682.42, 1, 0, 0.5489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23765,-99) , +5, 2.48006, 1, 0, 0.54438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45131,-99) , +0, 11.5, 0, 0, 0.533068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394427,-99) , +1, 38.5, 1, 0, 0.521524,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377096,-99) , +10, 8303.22, 1, 0, 0.488333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26482,-99) , +5, 1.79885, 1, 0, 0.374871,-99) , +16, 1080.8, 1, 0, 0.444864,-99) , +11, 0.5, 1, 0, 0.481873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241748,-99) , +5, 2.15676, 1, 0, 0.471464,-99) , +11, 1.5, 0, 0, 0.496411,-99) ); + // itree = 773 + fBoostWeights.push_back(0.00324629); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525552,-99) , +4, 1.89041, 0, 0, 0.536932,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400493,-99) , +5, 1.95602, 1, 0, 0.482781,-99) , +16, 264.989, 1, 0, 0.500849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172232,-99) , +4, 2.20644, 1, 0, 0.498624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354751,-99) , +3, 0.754968, 0, 0, 0.493252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200882,-99) , +7, 0.25306, 1, 0, 0.490574,-99) ); + // itree = 774 + fBoostWeights.push_back(0.0050805); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380964,-99) , +1, 41.5, 1, 0, 0.503078,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112045,-99) , +2, 61.5, 0, 0, 0.394139,-99) , +7, 0.104598, 1, 0, 0.497077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306001,-99) , +12, 0.01821, 0, 0, 0.4924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.159926,-99) , +4, 2.06343, 1, 0, 0.489877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236505,-99) , +5, 2.30886, 1, 0, 0.483968,-99) ); + // itree = 775 + fBoostWeights.push_back(0.00393412); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641934,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461635,-99) , +7, 0.0268656, 1, 0, 0.496129,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231187,-99) , +0, 14.5, 1, 0, 0.431666,-99) , +7, 0.012671, 0, 0, 0.482612,-99) , +9, 11.8115, 0, 0, 0.48714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245443,-99) , +5, 2.4913, 1, 0, 0.484866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309312,-99) , +3, 0.999629, 1, 0, 0.480221,-99) ); + // itree = 776 + fBoostWeights.push_back(0.00524765); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506158,-99) , +1, 9.5, 0, 0, 0.608089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460451,-99) , +6, 0.917756, 1, 0, 0.569661,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482011,-99) , +12, 0.124192, 1, 0, 0.546862,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449288,-99) , +12, 0.441954, 0, 0, 0.45822,-99) , +16, 66.8945, 1, 0, 0.478803,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247395,-99) , +3, 0.999585, 1, 0, 0.472819,-99) , +10, 10920.4, 0, 0, 0.484357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133416,-99) , +5, 2.5698, 1, 0, 0.482671,-99) ); + // itree = 777 + fBoostWeights.push_back(0.00627885); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515794,-99) , +9, -8.05511, 1, 0, 0.524363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255348,-99) , +7, 0.175236, 1, 0, 0.521075,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564705,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285944,-99) , +8, 0.954773, 0, 0, 0.41883,-99) , +2, 31.5, 0, 0, 0.445548,-99) , +8, 0.920444, 1, 0, 0.503514,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187562,-99) , +14, -4.4325, 1, 0, 0.360816,-99) , +5, 2.15977, 1, 0, 0.495956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298848,-99) , +1, 69.5, 1, 0, 0.490066,-99) ); + // itree = 778 + fBoostWeights.push_back(0.0039783); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60954,-99) , +15, 0.0454553, 1, 0, 0.648528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495251,-99) , +1, 9.5, 0, 0, 0.609943,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49336,-99) , +10, -7992.05, 1, 0, 0.500829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342837,-99) , +13, 0.0371634, 1, 0, 0.496181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281927,-99) , +3, 0.99963, 1, 0, 0.490602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271756,-99) , +15, 0.0347288, 0, 0, 0.485425,-99) , +12, 0.386379, 0, 0, 0.49567,-99) ); + // itree = 779 + fBoostWeights.push_back(0.00641476); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637882,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606596,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446368,-99) , +8, 0.502872, 0, 0, 0.491217,-99) , +9, -7.06467, 1, 0, 0.529894,-99) , +3, 0.983548, 1, 0, 0.57282,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526671,-99) , +15, 0.111423, 0, 0, 0.57995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413933,-99) , +9, 0.397846, 0, 0, 0.542566,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332633,-99) , +6, 0.765844, 1, 0, 0.459337,-99) , +15, 0.304133, 1, 0, 0.508672,-99) , +9, -0.783726, 1, 0, 0.536012,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452684,-99) , +13, 0.00221536, 0, 0, 0.528749,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193595,-99) , +7, 0.0854246, 1, 0, 0.460843,-99) , +5, 1.38893, 1, 0, 0.488263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31624,-99) , +7, 0.00792782, 0, 0, 0.480777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243158,-99) , +3, 0.99963, 1, 0, 0.474438,-99) , +16, 353.168, 1, 0, 0.496289,-99) ); + // itree = 780 + fBoostWeights.push_back(0.00722005); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550069,-99) , +13, 0.00704307, 0, 0, 0.565946,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27906,-99) , +5, 1.69994, 1, 0, 0.464243,-99) , +13, 0.0106992, 1, 0, 0.54843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0837344,-99) , +4, 2.15918, 1, 0, 0.543609,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48896,-99) , +1, 17.5, 0, 0, 0.569794,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416234,-99) , +13, 0.00800656, 1, 0, 0.487259,-99) , +3, 0.948897, 1, 0, 0.510773,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327156,-99) , +12, 0.0287189, 0, 0, 0.478763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259287,-99) , +13, 0.00501694, 1, 0, 0.436741,-99) , +5, 1.59982, 1, 0, 0.479978,-99) , +10, 1540.59, 1, 0, 0.503648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260154,-99) , +2, 6.5, 0, 0, 0.499202,-99) ); + // itree = 781 + fBoostWeights.push_back(0.00801709); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501294,-99) , +6, 0.885015, 1, 0, 0.590658,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441862,-99) , +4, 1.54462, 0, 0, 0.514452,-99) , +8, 0.951694, 1, 0, 0.567434,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344724,-99) , +7, 0.0290057, 1, 0, 0.498191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235691,-99) , +5, 2.27499, 1, 0, 0.489929,-99) , +2, 16.5, 0, 0, 0.519316,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433626,-99) , +3, 0.995699, 1, 0, 0.501658,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267868,-99) , +3, 0.972402, 0, 0, 0.415916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0745982,-99) , +7, 0.0599455, 1, 0, 0.336764,-99) , +5, 1.40194, 1, 0, 0.437803,-99) , +13, 0.010943, 1, 0, 0.504457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339883,-99) , +12, 0.0227642, 0, 0, 0.497756,-99) ); + // itree = 782 + fBoostWeights.push_back(0.00426977); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622871,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467805,-99) , +12, 0.129946, 1, 0, 0.52725,-99) , +15, 0.0527055, 1, 0, 0.537728,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409244,-99) , +15, 0.634562, 1, 0, 0.484431,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303104,-99) , +3, 0.778866, 0, 0, 0.476297,-99) , +11, 1.5, 0, 0, 0.496253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196743,-99) , +5, 2.4913, 1, 0, 0.49374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31514,-99) , +8, -0.98524, 0, 0, 0.487054,-99) ); + // itree = 783 + fBoostWeights.push_back(0.00743987); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636247,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466749,-99) , +15, 0.323399, 1, 0, 0.531459,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379006,-99) , +16, 446.707, 1, 0, 0.453222,-99) , +8, 0.937917, 1, 0, 0.512379,-99) , +10, 9457.1, 0, 0, 0.531044,-99) , +6, 0.0909903, 1, 0, 0.547145,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528618,-99) , +9, -0.39097, 1, 0, 0.587417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472327,-99) , +13, 0.00192185, 0, 0, 0.550609,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430041,-99) , +4, 0.903123, 0, 0, 0.470206,-99) , +6, 0.815311, 1, 0, 0.519734,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333858,-99) , +7, 0.0751246, 1, 0, 0.490322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180844,-99) , +7, 0.00711308, 0, 0, 0.479042,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345092,-99) , +4, 1.23946, 0, 0, 0.423229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200598,-99) , +4, 1.45796, 1, 0, 0.350009,-99) , +13, 0.00507073, 1, 0, 0.447893,-99) , +5, 1.39346, 1, 0, 0.477333,-99) , +11, 1.5, 0, 0, 0.500912,-99) ); + // itree = 784 + fBoostWeights.push_back(0.00496218); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.715458,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592357,-99) , +1, 14.5, 1, 0, 0.655891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550006,-99) , +0, 13.5, 0, 0, 0.619176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434381,-99) , +6, 0.943859, 1, 0, 0.578376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537994,-99) , +5, 1.47865, 1, 0, 0.604459,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438094,-99) , +3, 0.997394, 1, 0, 0.563455,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294092,-99) , +7, 0.0637832, 1, 0, 0.485137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216096,-99) , +0, 55.5, 1, 0, 0.48018,-99) , +2, 39.5, 0, 0, 0.490283,-99) , +10, 9891, 0, 0, 0.502617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265562,-99) , +13, 0.059668, 1, 0, 0.498377,-99) ); + // itree = 785 + fBoostWeights.push_back(0.00509145); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506273,-99) , +16, 2929.9, 1, 0, 0.55076,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.64338, 1, 0, 0.442796,-99) , +8, -0.804142, 0, 0, 0.535946,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464538,-99) , +4, 1.04695, 1, 0, 0.505407,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23286,-99) , +1, 30.5, 1, 0, 0.403237,-99) , +9, 0.5439, 0, 0, 0.48493,-99) , +9, -0.321064, 1, 0, 0.509136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319377,-99) , +7, 0.00714227, 0, 0, 0.504979,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274805,-99) , +15, 4.29098, 1, 0, 0.501526,-99) ); + // itree = 786 + fBoostWeights.push_back(0.00473172); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61641,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325224,-99) , +1, 52.5, 1, 0, 0.50679,-99) , +10, -8689.43, 1, 0, 0.513336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215275,-99) , +5, 2.54966, 1, 0, 0.511482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308222,-99) , +7, 0.0068963, 0, 0, 0.507675,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456188,-99) , +3, 0.976411, 1, 0, 0.49854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257137,-99) , +5, 1.72463, 1, 0, 0.380332,-99) , +2, 22.5, 0, 0, 0.462922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0529166,-99) , +4, 2.0022, 1, 0, 0.454381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0778685,-99) , +12, 0.160057, 1, 0, 0.438859,-99) , +15, 0.63031, 1, 0, 0.494391,-99) ); + // itree = 787 + fBoostWeights.push_back(0.00468439); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560044,-99) , +2, 16.5, 0, 0, 0.606674,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474594,-99) , +6, 0.53039, 1, 0, 0.504588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146451,-99) , +7, 0.0313873, 1, 0, 0.427823,-99) , +1, 9.5, 0, 0, 0.489439,-99) , +9, 7.74912, 0, 0, 0.497558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124405,-99) , +7, 0.28174, 1, 0, 0.495285,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234301,-99) , +3, 0.999726, 1, 0, 0.490798,-99) ); + // itree = 788 + fBoostWeights.push_back(0.00562001); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563786,-99) , +2, 36.5, 0, 0, 0.584859,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366895,-99) , +0, 43.5, 1, 0, 0.513789,-99) , +16, 2328.92, 1, 0, 0.551291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390881,-99) , +12, 0.0309508, 0, 0, 0.540171,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5376,-99) , +4, 0.661186, 0, 0, 0.564848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459264,-99) , +9, 0.42024, 0, 0, 0.53898,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43194,-99) , +12, 0.114379, 1, 0, 0.483989,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219879,-99) , +1, 38.5, 1, 0, 0.402533,-99) , +10, 989.418, 1, 0, 0.447326,-99) , +4, 0.901901, 1, 0, 0.483373,-99) , +9, -0.793243, 1, 0, 0.507105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267846,-99) , +13, 0.0729551, 1, 0, 0.503823,-99) ); + // itree = 789 + fBoostWeights.push_back(0.00540907); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633866,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172138,-99) , +1, 11.5, 0, 0, 0.548215,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134883,-99) , +7, 0.0572943, 1, 0, 0.479667,-99) , +2, 28.5, 0, 0, 0.494085,-99) , +15, 0.0270581, 1, 0, 0.498777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36299,-99) , +3, 0.999522, 1, 0, 0.493103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263899,-99) , +7, 0.00714068, 0, 0, 0.488893,-99) ); + // itree = 790 + fBoostWeights.push_back(0.00470702); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224193,-99) , +7, 0.246781, 1, 0, 0.522528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477145,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155447,-99) , +7, 0.0306063, 1, 0, 0.446005,-99) , +1, 9.5, 0, 0, 0.505629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36193,-99) , +5, 0.481968, 0, 0, 0.499237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293471,-99) , +8, 0.999682, 1, 0, 0.49498,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222254,-99) , +5, 2.46103, 1, 0, 0.492184,-99) ); + // itree = 791 + fBoostWeights.push_back(0.00549238); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61473,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313741,-99) , +4, 1.7645, 1, 0, 0.499994,-99) , +10, 13106.2, 1, 0, 0.561364,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483629,-99) , +2, 36.5, 0, 0, 0.492271,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180441,-99) , +4, 1.16798, 1, 0, 0.374476,-99) , +0, 70.5, 1, 0, 0.483717,-99) , +10, 9566.68, 0, 0, 0.494063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259791,-99) , +7, 0.00699586, 0, 0, 0.490004,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324937,-99) , +9, 3.6971, 0, 0, 0.392252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0307414,-99) , +0, 85.5, 1, 0, 0.363327,-99) , +3, 0.999148, 1, 0, 0.480782,-99) ); + // itree = 792 + fBoostWeights.push_back(0.00673455); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364783,-99) , +5, 2.25394, 1, 0, 0.57521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440137,-99) , +8, -0.94938, 0, 0, 0.562248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40547,-99) , +8, 0.990312, 1, 0, 0.545142,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3805,-99) , +3, 0.879346, 0, 0, 0.490388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0733557,-99) , +7, 0.0236485, 1, 0, 0.381918,-99) , +1, 8.5, 0, 0, 0.474995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.104981,-99) , +15, 0.988612, 1, 0, 0.470704,-99) , +12, 0.127516, 1, 0, 0.505377,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306451,-99) , +14, -3.59758, 0, 0, 0.436749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262368,-99) , +6, 0.908911, 1, 0, 0.396695,-99) , +12, 0.0327201, 0, 0, 0.495416,-99) ); + // itree = 793 + fBoostWeights.push_back(0.00532639); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417171,-99) , +3, 0.999142, 1, 0, 0.546443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405659,-99) , +15, 1.82767, 1, 0, 0.533261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327369,-99) , +7, 0.0285173, 1, 0, 0.480173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178912,-99) , +0, 24.5, 1, 0, 0.470395,-99) , +2, 16.5, 0, 0, 0.495678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306532,-99) , +1, 66.5, 1, 0, 0.491759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258577,-99) , +7, 0.170523, 1, 0, 0.486691,-99) ); + // itree = 794 + fBoostWeights.push_back(0.00881543); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520493,-99) , +2, 13.5, 0, 0, 0.560889,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336222,-99) , +13, 0.00203773, 0, 0, 0.461278,-99) , +15, 0.744026, 1, 0, 0.538361,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330835,-99) , +7, 0.0774338, 1, 0, 0.488611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28514,-99) , +7, 0.00931131, 0, 0, 0.472484,-99) , +12, 0.182562, 1, 0, 0.515986,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538937,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332814,-99) , +7, 0.0217502, 0, 0, 0.449213,-99) , +7, 0.0125041, 1, 0, 0.477121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361509,-99) , +10, 864.981, 0, 0, 0.44478,-99) , +14, -3.73336, 0, 0, 0.504111,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603359,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218098,-99) , +15, 0.117692, 0, 0, 0.356546,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125217,-99) , +5, 2.44703, 1, 0, 0.330985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0304931,-99) , +8, -0.568527, 0, 0, 0.293079,-99) , +8, 0.995514, 0, 0, 0.38751,-99) , +5, 2.03214, 1, 0, 0.493131,-99) ); + // itree = 795 + fBoostWeights.push_back(0.00624773); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526537,-99) , +10, -222.812, 1, 0, 0.55337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182661,-99) , +7, 0.25306, 1, 0, 0.546688,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333497,-99) , +12, 0.0235074, 0, 0, 0.5342,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348222,-99) , +14, -5.20428, 0, 0, 0.490855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116317,-99) , +4, 2.17915, 1, 0, 0.48818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21764,-99) , +7, 0.0330571, 1, 0, 0.474073,-99) , +2, 16.5, 0, 0, 0.500565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255027,-99) , +3, 0.999718, 1, 0, 0.496392,-99) ); + // itree = 796 + fBoostWeights.push_back(0.00429715); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.706224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505086,-99) , +5, 1.95019, 0, 0, 0.601771,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373823,-99) , +5, 0.558611, 0, 0, 0.501238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280098,-99) , +5, 2.21127, 1, 0, 0.494051,-99) , +8, 0.998217, 0, 0, 0.501913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30136,-99) , +1, 5.5, 0, 0, 0.497919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278987,-99) , +12, 0.0171171, 0, 0, 0.493268,-99) ); + // itree = 797 + fBoostWeights.push_back(0.00369235); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645253,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3768,-99) , +12, 0.0191507, 0, 0, 0.520643,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235703,-99) , +7, 0.0267919, 1, 0, 0.458667,-99) , +2, 11.5, 0, 0, 0.499791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251677,-99) , +13, 0.0591743, 1, 0, 0.496187,-99) , +12, 0.510577, 0, 0, 0.501698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271117,-99) , +3, 0.999733, 1, 0, 0.49798,-99) ); + // itree = 798 + fBoostWeights.push_back(0.00810791); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568054,-99) , +16, 421.752, 0, 0, 0.658952,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476365,-99) , +13, 0.000776343, 0, 0, 0.547961,-99) , +4, 1.60629, 0, 0, 0.577689,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421203,-99) , +2, 13.5, 0, 0, 0.489042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181629,-99) , +4, 1.64422, 1, 0, 0.467753,-99) , +8, -0.477383, 0, 0, 0.553115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303288,-99) , +7, 0.127656, 1, 0, 0.543548,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543046,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232651,-99) , +5, 2.12189, 1, 0, 0.531501,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395505,-99) , +16, 215.765, 1, 0, 0.444551,-99) , +8, 0.935824, 1, 0, 0.509332,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308897,-99) , +7, 0.105686, 1, 0, 0.467224,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262698,-99) , +6, 0.996465, 0, 0, 0.35118,-99) , +10, 2353.55, 1, 0, 0.434165,-99) , +6, 0.648708, 1, 0, 0.481633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149307,-99) , +5, 2.44828, 1, 0, 0.478033,-99) , +9, -1.27138, 1, 0, 0.502773,-99) ); + // itree = 799 + fBoostWeights.push_back(0.00547183); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53443,-99) , +9, -0.399706, 1, 0, 0.567899,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482434,-99) , +10, 10993.3, 0, 0, 0.512408,-99) , +3, 0.991118, 1, 0, 0.543712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533001,-99) , +3, 0.989711, 1, 0, 0.565816,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0797621,-99) , +7, 0.208925, 1, 0, 0.447351,-99) , +5, 1.0552, 1, 0, 0.469881,-99) , +12, 0.111167, 1, 0, 0.500963,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340718,-99) , +8, 0.133033, 1, 0, 0.399632,-99) , +12, 0.0295419, 0, 0, 0.492911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275544,-99) , +7, 0.00794581, 0, 0, 0.485857,-99) ); + // itree = 800 + fBoostWeights.push_back(0.00446943); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646995,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469784,-99) , +14, -2.08844, 1, 0, 0.531384,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245667,-99) , +7, 0.02662, 1, 0, 0.468533,-99) , +2, 13.5, 0, 0, 0.50306,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310236,-99) , +13, 0.0375667, 1, 0, 0.497646,-99) , +12, 0.519027, 0, 0, 0.502662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268329,-99) , +4, 2.07722, 1, 0, 0.498825,-99) ); + // itree = 801 + fBoostWeights.push_back(0.00521558); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424395,-99) , +7, 0.165442, 1, 0, 0.606017,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433803,-99) , +12, 0.0371065, 0, 0, 0.577676,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242639,-99) , +7, 0.0594608, 1, 0, 0.511061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.135366,-99) , +0, 44.5, 1, 0, 0.505114,-99) , +2, 29.5, 0, 0, 0.517636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0948346,-99) , +7, 0.323268, 1, 0, 0.515995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347572,-99) , +5, 0.440895, 0, 0, 0.509252,-99) ); + // itree = 802 + fBoostWeights.push_back(0.00298953); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647617,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561476,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495603,-99) , +16, 64.7267, 1, 0, 0.510401,-99) , +12, 0.507657, 0, 0, 0.515683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325447,-99) , +2, 6.5, 0, 0, 0.51176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322191,-99) , +3, 0.999685, 1, 0, 0.507855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288761,-99) , +1, 77.5, 1, 0, 0.503298,-99) ); + // itree = 803 + fBoostWeights.push_back(0.00774468); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.740496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566957,-99) , +4, 1.73237, 0, 0, 0.591419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410072,-99) , +1, 67.5, 1, 0, 0.572131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200346,-99) , +1, 11.5, 0, 0, 0.552999,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478582,-99) , +9, -0.756244, 1, 0, 0.505016,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257754,-99) , +13, 0.000291924, 1, 0, 0.392038,-99) , +5, 2.06304, 1, 0, 0.494336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210847,-99) , +7, 0.0418889, 1, 0, 0.481153,-99) , +2, 25.5, 0, 0, 0.498132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337286,-99) , +5, 0.482133, 0, 0, 0.491246,-99) ); + // itree = 804 + fBoostWeights.push_back(0.00460229); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651383,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475104,-99) , +14, -2.75806, 0, 0, 0.527812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37941,-99) , +5, 0.429213, 0, 0, 0.516588,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434676,-99) , +16, 471.406, 1, 0, 0.468093,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0710036,-99) , +13, 0.0268506, 1, 0, 0.458932,-99) , +5, 1.59952, 1, 0, 0.492899,-99) , +12, 0.524926, 0, 0, 0.497836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161988,-99) , +5, 2.56393, 1, 0, 0.496183,-99) ); + // itree = 805 + fBoostWeights.push_back(0.00535402); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514888,-99) , +6, 0.657207, 1, 0, 0.568674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43918,-99) , +8, 0.988196, 1, 0, 0.555004,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409041,-99) , +8, -0.791662, 0, 0, 0.525719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413083,-99) , +4, 0.678181, 1, 0, 0.448413,-99) , +9, -0.880332, 1, 0, 0.489296,-99) , +9, 2.9113, 0, 0, 0.504989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295238,-99) , +3, 0.999686, 1, 0, 0.500245,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208337,-99) , +5, 1.74922, 1, 0, 0.369555,-99) , +12, 0.0246262, 0, 0, 0.493217,-99) ); + // itree = 806 + fBoostWeights.push_back(0.00514638); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622263,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485961,-99) , +4, 0.619335, 1, 0, 0.503908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308882,-99) , +12, 0.01821, 0, 0, 0.497393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26659,-99) , +13, 0.0582668, 1, 0, 0.492683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396301,-99) , +9, -0.33165, 1, 0, 0.459206,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352283,-99) , +10, 2607.74, 1, 0, 0.396639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285473,-99) , +5, 1.86149, 1, 0, 0.371666,-99) , +16, 357.151, 1, 0, 0.3987,-99) , +15, 0.0908036, 0, 0, 0.470627,-99) , +12, 0.525198, 0, 0, 0.476244,-99) ); + // itree = 807 + fBoostWeights.push_back(0.00563273); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363124,-99) , +4, 1.6547, 1, 0, 0.616746,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649591,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281128,-99) , +3, 0.999587, 1, 0, 0.507669,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0755636,-99) , +7, 0.0313585, 1, 0, 0.447096,-99) , +2, 12.5, 0, 0, 0.484508,-99) , +12, 0.525198, 0, 0, 0.490082,-99) , +10, -8715.48, 1, 0, 0.4975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0623059,-99) , +7, 0.291384, 1, 0, 0.495304,-99) ); + // itree = 808 + fBoostWeights.push_back(0.00675924); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661267,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538786,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372248,-99) , +8, -0.984048, 0, 0, 0.529968,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420062,-99) , +7, 0.0103428, 1, 0, 0.447517,-99) , +14, -3.55354, 0, 0, 0.514846,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396173,-99) , +8, 0.995454, 0, 0, 0.464806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14401,-99) , +14, -2.51393, 1, 0, 0.410611,-99) , +5, 1.95616, 1, 0, 0.501001,-99) , +12, 0.525387, 0, 0, 0.506824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.202748,-99) , +3, 0.999712, 1, 0, 0.502163,-99) ); + // itree = 809 + fBoostWeights.push_back(0.00772484); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634486,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59167,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456082,-99) , +3, 0.985602, 0, 0, 0.496732,-99) , +10, 1354.13, 1, 0, 0.527944,-99) , +6, 0.434834, 1, 0, 0.567776,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419191,-99) , +8, 0.952655, 0, 0, 0.465062,-99) , +13, 0.00206929, 0, 0, 0.535093,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539208,-99) , +10, -2667.82, 1, 0, 0.555383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418043,-99) , +15, 1.23438, 1, 0, 0.534569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369116,-99) , +14, -4.50598, 0, 0, 0.509033,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635549,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404142,-99) , +16, 36.0665, 1, 0, 0.430081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24389,-99) , +13, 0.0159005, 1, 0, 0.410322,-99) , +12, 0.512598, 0, 0, 0.428602,-99) , +12, 0.113631, 1, 0, 0.465655,-99) , +5, 1.32312, 1, 0, 0.490122,-99) ); + // itree = 810 + fBoostWeights.push_back(0.00531647); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407181,-99) , +8, 0.989965, 1, 0, 0.56405,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457432,-99) , +4, 0.938167, 1, 0, 0.494902,-99) , +12, 0.11369, 1, 0, 0.523373,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376953,-99) , +16, 1018.2, 1, 0, 0.461769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275572,-99) , +6, 0.804996, 1, 0, 0.412956,-99) , +12, 0.0314081, 0, 0, 0.513799,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301102,-99) , +2, 6.5, 0, 0, 0.509837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368039,-99) , +5, 0.538452, 0, 0, 0.503105,-99) ); + // itree = 811 + fBoostWeights.push_back(0.00475484); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.762838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547761,-99) , +5, 2.00185, 0, 0, 0.613407,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434216,-99) , +12, 0.0312838, 0, 0, 0.522004,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176999,-99) , +5, 1.75943, 1, 0, 0.419746,-99) , +8, -0.946424, 0, 0, 0.51398,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530085,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38226,-99) , +0, 10.5, 1, 0, 0.431379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0865098,-99) , +5, 2.15323, 1, 0, 0.412454,-99) , +15, 0.0552986, 0, 0, 0.503689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342851,-99) , +13, 0.0302885, 1, 0, 0.497798,-99) , +12, 0.414272, 0, 0, 0.505167,-99) ); + // itree = 812 + fBoostWeights.push_back(0.00590451); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458876,-99) , +13, 0.00283876, 0, 0, 0.590276,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490592,-99) , +16, 26.2263, 1, 0, 0.509688,-99) , +2, 24.5, 0, 0, 0.531419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404606,-99) , +5, 0.53974, 0, 0, 0.520323,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468967,-99) , +1, 11.5, 1, 0, 0.497708,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219596,-99) , +5, 2.11129, 1, 0, 0.407396,-99) , +1, 9.5, 0, 0, 0.476055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269598,-99) , +7, 0.0691571, 1, 0, 0.465171,-99) , +5, 1.53097, 1, 0, 0.493976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281932,-99) , +7, 0.177686, 1, 0, 0.489922,-99) ); + // itree = 813 + fBoostWeights.push_back(0.00602765); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409774,-99) , +8, -0.983803, 0, 0, 0.542698,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36337,-99) , +7, 0.0353162, 0, 0, 0.434697,-99) , +8, 0.979861, 1, 0, 0.528143,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402442,-99) , +8, 0.674941, 1, 0, 0.488176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323761,-99) , +14, -1.97699, 1, 0, 0.441894,-99) , +3, 0.997865, 1, 0, 0.513037,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469512,-99) , +2, 9.5, 1, 0, 0.531796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279045,-99) , +5, 1.94543, 1, 0, 0.430754,-99) , +9, 0.160532, 0, 0, 0.48141,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459874,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324957,-99) , +9, -1.09294, 1, 0, 0.382102,-99) , +6, 0.796386, 1, 0, 0.459249,-99) , +7, 0.0147955, 0, 0, 0.497521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31709,-99) , +4, 1.99653, 1, 0, 0.492722,-99) ); + // itree = 814 + fBoostWeights.push_back(0.0048433); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658233,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526833,-99) , +7, 0.0133452, 0, 0, 0.588826,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472853,-99) , +6, 0.575461, 1, 0, 0.502601,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293877,-99) , +5, 1.26143, 1, 0, 0.412882,-99) , +13, 0.0167546, 1, 0, 0.492687,-99) , +15, 0.0450477, 1, 0, 0.500556,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281528,-99) , +15, 0.0577797, 0, 0, 0.377016,-99) , +7, 0.00931116, 0, 0, 0.491448,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242572,-99) , +3, 0.999723, 1, 0, 0.487378,-99) ); + // itree = 815 + fBoostWeights.push_back(0.00646242); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64403,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467898,-99) , +8, -0.586452, 0, 0, 0.565945,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421828,-99) , +15, 0.815208, 1, 0, 0.488507,-99) , +4, 0.619902, 1, 0, 0.510562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361654,-99) , +5, 0.512545, 0, 0, 0.499668,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462664,-99) , +15, 0.391882, 1, 0, 0.511653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368985,-99) , +10, 3351.46, 1, 0, 0.434708,-99) , +15, 0.20608, 0, 0, 0.468903,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455114,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232114,-99) , +9, 2.39658, 0, 0, 0.297442,-99) , +13, 0.00573512, 1, 0, 0.440755,-99) , +5, 1.6492, 1, 0, 0.477572,-99) , +12, 0.509679, 0, 0, 0.483436,-99) ); + // itree = 816 + fBoostWeights.push_back(0.00649991); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258486,-99) , +5, 2.23193, 1, 0, 0.576235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455091,-99) , +8, 0.981481, 1, 0, 0.557379,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527223,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358457,-99) , +2, 35.5, 0, 0, 0.441795,-99) , +15, 0.531066, 1, 0, 0.487354,-99) , +6, 0.838906, 1, 0, 0.537667,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521661,-99) , +10, 10477.9, 1, 0, 0.559419,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497012,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408201,-99) , +5, 1.40266, 1, 0, 0.442953,-99) , +10, 8506.03, 0, 0, 0.464002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182185,-99) , +7, 0.152873, 1, 0, 0.457553,-99) , +12, 0.110613, 1, 0, 0.494059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27298,-99) , +12, 0.0181941, 0, 0, 0.488599,-99) ); + // itree = 817 + fBoostWeights.push_back(0.00535508); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596734,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525535,-99) , +10, 1563.52, 1, 0, 0.552683,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276059,-99) , +3, 0.789268, 0, 0, 0.479289,-99) , +12, 0.112226, 1, 0, 0.511042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325634,-99) , +8, 0.472075, 1, 0, 0.40387,-99) , +12, 0.0289881, 0, 0, 0.502738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156872,-99) , +13, 0.0730075, 1, 0, 0.498574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218983,-99) , +2, 6.5, 0, 0, 0.49354,-99) ); + // itree = 818 + fBoostWeights.push_back(0.00333784); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518366,-99) , +1, 10.5, 0, 0, 0.613611,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649791,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480762,-99) , +4, 0.719802, 1, 0, 0.497813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300117,-99) , +3, 0.999662, 1, 0, 0.493931,-99) , +12, 0.513631, 0, 0, 0.499755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192346,-99) , +4, 2.14443, 1, 0, 0.497192,-99) , +10, -8432.04, 1, 0, 0.504726,-99) ); + // itree = 819 + fBoostWeights.push_back(0.0095152); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520218,-99) , +8, -0.676795, 0, 0, 0.584072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275395,-99) , +5, 2.20671, 1, 0, 0.576627,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451083,-99) , +3, 0.98176, 0, 0, 0.517434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38311,-99) , +15, 1.9938, 1, 0, 0.498609,-99) , +6, 0.773257, 1, 0, 0.550066,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410403,-99) , +12, 0.046516, 0, 0, 0.507516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315528,-99) , +4, 1.19711, 0, 0, 0.432307,-99) , +14, -3.96111, 0, 0, 0.526462,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53422,-99) , +10, 1904.22, 1, 0, 0.568486,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43065,-99) , +1, 9.5, 1, 0, 0.467421,-99) , +2, 12.5, 0, 0, 0.523986,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37654,-99) , +3, 0.98971, 1, 0, 0.442757,-99) , +13, 0.0141443, 1, 0, 0.502991,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60109,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447352,-99) , +12, 0.336159, 0, 0, 0.482277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.173523,-99) , +7, 0.0775925, 1, 0, 0.465497,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183676,-99) , +8, 0.993399, 0, 0, 0.308553,-99) , +5, 1.9354, 1, 0, 0.418971,-99) , +4, 1.23913, 1, 0, 0.470109,-99) , +12, 0.113524, 1, 0, 0.496833,-99) ); + // itree = 820 + fBoostWeights.push_back(0.00526413); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607413,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612211,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342405,-99) , +4, 1.71392, 1, 0, 0.494404,-99) , +8, 0.999219, 0, 0, 0.503318,-99) , +5, 0.993786, 1, 0, 0.514532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37175,-99) , +8, -0.981676, 0, 0, 0.507563,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402458,-99) , +12, 0.182167, 1, 0, 0.477801,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328058,-99) , +12, 0.0330248, 0, 0, 0.462128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0914177,-99) , +5, 2.20841, 1, 0, 0.455442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302501,-99) , +3, 0.929428, 0, 0, 0.438404,-99) , +6, 0.765827, 1, 0, 0.486587,-99) ); + // itree = 821 + fBoostWeights.push_back(0.00550536); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630088,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427275,-99) , +13, 0.00167023, 1, 0, 0.621843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456886,-99) , +3, 0.97228, 0, 0, 0.572387,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554541,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422282,-99) , +15, 0.363275, 1, 0, 0.45638,-99) , +12, 0.144555, 0, 0, 0.49461,-99) , +5, 1.77905, 0, 0, 0.51853,-99) , +6, 0.0977041, 1, 0, 0.535162,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324462,-99) , +8, -0.989113, 0, 0, 0.490396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238321,-99) , +3, 0.99965, 1, 0, 0.484764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26522,-99) , +3, 0.745431, 0, 0, 0.478623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170883,-99) , +5, 2.33316, 1, 0, 0.474,-99) , +11, 1.5, 0, 0, 0.494563,-99) ); + // itree = 822 + fBoostWeights.push_back(0.00782913); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497339,-99) , +13, 0.000283785, 0, 0, 0.554922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433452,-99) , +5, 2.12981, 1, 0, 0.546041,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472263,-99) , +7, 0.0217963, 0, 0, 0.493457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309696,-99) , +3, 0.90677, 0, 0, 0.472991,-99) , +6, 0.671659, 1, 0, 0.522863,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467309,-99) , +5, 1.45038, 1, 0, 0.523891,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152072,-99) , +13, 0.0201062, 1, 0, 0.372811,-99) , +3, 0.997868, 1, 0, 0.494791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174427,-99) , +2, 14.5, 0, 0, 0.464258,-99) , +7, 0.0275955, 1, 0, 0.501755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325543,-99) , +4, 1.97324, 1, 0, 0.496235,-99) ); + // itree = 823 + fBoostWeights.push_back(0.00571401); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643164,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474347,-99) , +3, 0.924235, 0, 0, 0.55165,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374209,-99) , +7, 0.0181097, 0, 0, 0.469228,-99) , +3, 0.990975, 1, 0, 0.520104,-99) , +10, 11442.9, 0, 0, 0.536215,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466601,-99) , +9, 3.16648, 0, 0, 0.488685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307751,-99) , +5, 2.15471, 1, 0, 0.479187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203931,-99) , +7, 0.145611, 1, 0, 0.472359,-99) , +12, 0.101366, 1, 0, 0.498522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291889,-99) , +12, 0.0181941, 0, 0, 0.493303,-99) ); + // itree = 824 + fBoostWeights.push_back(0.00603437); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56299,-99) , +12, 0.0894369, 0, 0, 0.576539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464855,-99) , +14, -4.54892, 0, 0, 0.563696,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360884,-99) , +8, 0.298269, 1, 0, 0.414458,-99) , +12, 0.0312838, 0, 0, 0.532975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619935,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15404,-99) , +7, 0.0778956, 1, 0, 0.465082,-99) , +2, 39.5, 0, 0, 0.479732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169476,-99) , +7, 0.162653, 1, 0, 0.473964,-99) , +12, 0.101426, 1, 0, 0.499336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277851,-99) , +7, 0.00714456, 0, 0, 0.494715,-99) ); + // itree = 825 + fBoostWeights.push_back(0.00406476); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656177,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395487,-99) , +1, 9.5, 0, 0, 0.54953,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477622,-99) , +10, -13246.7, 1, 0, 0.483019,-99) , +6, 0.159704, 1, 0, 0.497583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182172,-99) , +13, 0.0694026, 1, 0, 0.494013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223215,-99) , +5, 2.40728, 1, 0, 0.490365,-99) , +12, 0.510577, 0, 0, 0.496614,-99) ); + // itree = 826 + fBoostWeights.push_back(0.00411441); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663331,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510942,-99) , +3, 0.907962, 1, 0, 0.535089,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465577,-99) , +8, 0.997419, 0, 0, 0.475569,-99) , +6, 0.253876, 1, 0, 0.494768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261277,-99) , +7, 0.00706943, 0, 0, 0.490479,-99) , +12, 0.509824, 0, 0, 0.496685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276799,-99) , +7, 0.170561, 1, 0, 0.491819,-99) ); + // itree = 827 + fBoostWeights.push_back(0.00574404); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53318,-99) , +3, 0.979091, 1, 0, 0.590086,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339879,-99) , +3, 0.755233, 0, 0, 0.510231,-99) , +4, 0.394719, 1, 0, 0.522493,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251903,-99) , +15, 0.393574, 1, 0, 0.399192,-99) , +14, -4.60496, 0, 0, 0.512317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359307,-99) , +5, 0.484037, 0, 0, 0.505563,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242388,-99) , +8, 0.94025, 0, 0, 0.393977,-99) , +4, 1.74931, 1, 0, 0.495534,-99) ); + // itree = 828 + fBoostWeights.push_back(0.00510404); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65051,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504933,-99) , +15, 0.195104, 1, 0, 0.531199,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392286,-99) , +12, 0.213178, 0, 0, 0.447258,-99) , +7, 0.0171919, 0, 0, 0.519976,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453683,-99) , +11, 0.5, 1, 0, 0.482776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13787,-99) , +7, 0.0270878, 1, 0, 0.465766,-99) , +2, 12.5, 0, 0, 0.498584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363386,-99) , +3, 0.999379, 1, 0, 0.492605,-99) , +10, -15196.3, 1, 0, 0.497377,-99) ); + // itree = 829 + fBoostWeights.push_back(0.00485312); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665284,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423888,-99) , +7, 0.0127211, 0, 0, 0.513714,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162164,-99) , +7, 0.022632, 1, 0, 0.448261,-99) , +2, 10.5, 0, 0, 0.497436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339655,-99) , +3, 0.999497, 1, 0, 0.49109,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226239,-99) , +5, 2.33304, 1, 0, 0.485752,-99) , +12, 0.544852, 0, 0, 0.491789,-99) ); + // itree = 830 + fBoostWeights.push_back(0.00568519); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653831,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566355,-99) , +3, 0.9685, 1, 0, 0.599197,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489333,-99) , +9, 4.42108, 0, 0, 0.507431,-99) , +6, 0.141805, 1, 0, 0.526337,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0571167,-99) , +5, 2.40256, 1, 0, 0.475876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0784789,-99) , +7, 0.0359864, 1, 0, 0.464746,-99) , +2, 14.5, 0, 0, 0.496918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133359,-99) , +13, 0.0970076, 1, 0, 0.494438,-99) , +12, 0.537642, 0, 0, 0.499779,-99) ); + // itree = 831 + fBoostWeights.push_back(0.00541721); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434948,-99) , +15, 0.120324, 0, 0, 0.53418,-99) , +12, 0.236014, 0, 0, 0.550327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447792,-99) , +8, -0.823144, 0, 0, 0.535329,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507921,-99) , +10, 10905.8, 0, 0, 0.523812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322775,-99) , +1, 8.5, 0, 0, 0.51437,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425256,-99) , +7, 0.0148146, 0, 0, 0.459718,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271359,-99) , +7, 0.022405, 1, 0, 0.439412,-99) , +2, 13.5, 0, 0, 0.480382,-99) , +16, 285.374, 1, 0, 0.499116,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291794,-99) , +3, 0.999633, 1, 0, 0.493967,-99) ); + // itree = 832 + fBoostWeights.push_back(0.00706624); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.702041,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625344,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359647,-99) , +8, -0.635851, 0, 0, 0.505772,-99) , +10, 9646.05, 0, 0, 0.543368,-99) , +3, 0.911294, 1, 0, 0.570665,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543696,-99) , +9, 4.53547, 0, 0, 0.597244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45564,-99) , +13, 0.000604123, 0, 0, 0.554472,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554094,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195445,-99) , +4, 1.3888, 1, 0, 0.375398,-99) , +11, 1.5, 0, 0, 0.444213,-99) , +9, 2.50521, 0, 0, 0.492735,-99) , +9, -0.321847, 1, 0, 0.528998,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575903,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440461,-99) , +9, -1.39243, 1, 0, 0.471044,-99) , +9, 7.88218, 0, 0, 0.480974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354457,-99) , +3, 0.862543, 0, 0, 0.472329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28472,-99) , +5, 2.11128, 1, 0, 0.464526,-99) , +6, 0.438409, 1, 0, 0.494969,-99) ); + // itree = 833 + fBoostWeights.push_back(0.00591414); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465367,-99) , +14, -3.86979, 0, 0, 0.52985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43179,-99) , +12, 0.0265438, 0, 0, 0.5232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329906,-99) , +3, 0.999663, 1, 0, 0.517934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36193,-99) , +2, 7.5, 0, 0, 0.511618,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427345,-99) , +5, 2.20142, 0, 0, 0.545888,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567065,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207371,-99) , +5, 2.01952, 1, 0, 0.251735,-99) , +12, 0.410337, 0, 0, 0.299385,-99) , +14, -3.79864, 1, 0, 0.417473,-99) , +5, 1.97958, 1, 0, 0.500036,-99) ); + // itree = 834 + fBoostWeights.push_back(0.00465957); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480747,-99) , +7, 0.0181379, 1, 0, 0.598262,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526578,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386194,-99) , +5, 2.1206, 1, 0, 0.517312,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38594,-99) , +11, 0.5, 1, 0, 0.458189,-99) , +16, 3573.92, 1, 0, 0.490486,-99) , +12, 0.387255, 0, 0, 0.498657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280202,-99) , +2, 6.5, 0, 0, 0.494367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193202,-99) , +13, 0.0727869, 1, 0, 0.490679,-99) ); + // itree = 835 + fBoostWeights.push_back(0.00485139); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544041,-99) , +4, 0.389856, 1, 0, 0.592436,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477311,-99) , +8, -0.78296, 0, 0, 0.544285,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4335,-99) , +1, 28.5, 1, 0, 0.521629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415749,-99) , +8, 0.855437, 1, 0, 0.49834,-99) , +3, 0.951857, 1, 0, 0.523824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427624,-99) , +6, 0.465413, 0, 0, 0.473128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233996,-99) , +7, 0.00711413, 0, 0, 0.468117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17823,-99) , +5, 2.49363, 1, 0, 0.464647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267552,-99) , +7, 0.12494, 1, 0, 0.458478,-99) , +4, 0.903355, 1, 0, 0.483478,-99) ); + // itree = 836 + fBoostWeights.push_back(0.00514339); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485197,-99) , +5, 1.6519, 1, 0, 0.518953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313777,-99) , +2, 6.5, 0, 0, 0.514835,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367405,-99) , +4, 1.00616, 1, 0, 0.44538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127939,-99) , +5, 1.78861, 1, 0, 0.40958,-99) , +8, -0.895843, 0, 0, 0.503528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283857,-99) , +3, 0.999624, 1, 0, 0.497805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.179435,-99) , +4, 2.06952, 1, 0, 0.492938,-99) ); + // itree = 837 + fBoostWeights.push_back(0.0056783); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55211,-99) , +12, 0.0850148, 0, 0, 0.572439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464745,-99) , +13, 0.00760356, 1, 0, 0.556683,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396367,-99) , +12, 0.0395716, 1, 0, 0.468255,-99) , +14, -4.19302, 0, 0, 0.541757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320535,-99) , +12, 0.0175239, 0, 0, 0.531712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412924,-99) , +7, 0.0132644, 0, 0, 0.477104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255813,-99) , +7, 0.0599687, 1, 0, 0.467822,-99) , +2, 41.5, 0, 0, 0.479053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241873,-99) , +7, 0.15164, 1, 0, 0.472912,-99) , +12, 0.111146, 1, 0, 0.500123,-99) ); + // itree = 838 + fBoostWeights.push_back(0.00622028); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523641,-99) , +16, 1970.06, 1, 0, 0.598546,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392126,-99) , +1, 24.5, 1, 0, 0.521308,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217774,-99) , +2, 19.5, 0, 0, 0.425948,-99) , +7, 0.0394111, 1, 0, 0.513051,-99) , +2, 30.5, 0, 0, 0.522244,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283405,-99) , +14, -3.42302, 0, 0, 0.425039,-99) , +12, 0.0305522, 0, 0, 0.515123,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320425,-99) , +5, 1.49167, 1, 0, 0.471354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114144,-99) , +1, 17.5, 0, 0, 0.411741,-99) , +7, 0.0845138, 1, 0, 0.506551,-99) ); + // itree = 839 + fBoostWeights.push_back(0.0040056); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675284,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560799,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46589,-99) , +6, 0.888961, 1, 0, 0.539655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440419,-99) , +16, 3.59293, 0, 0, 0.522001,-99) , +4, 1.95536, 0, 0, 0.531228,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371528,-99) , +13, 0.0142053, 1, 0, 0.548659,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239109,-99) , +7, 0.00746759, 0, 0, 0.465241,-99) , +9, 4.29354, 0, 0, 0.480189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140054,-99) , +5, 2.4913, 1, 0, 0.477768,-99) , +16, 204.935, 1, 0, 0.49448,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37002,-99) , +3, 0.791603, 0, 0, 0.488554,-99) ); + // itree = 840 + fBoostWeights.push_back(0.00317321); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656298,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353115,-99) , +8, -0.995065, 0, 0, 0.508908,-99) , +10, -14843.3, 1, 0, 0.513314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224633,-99) , +7, 0.180329, 1, 0, 0.510049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263116,-99) , +15, 4.10015, 1, 0, 0.50619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270732,-99) , +2, 6.5, 0, 0, 0.501785,-99) ); + // itree = 841 + fBoostWeights.push_back(0.00686951); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516155,-99) , +12, 0.0391668, 0, 0, 0.598412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237955,-99) , +5, 2.05523, 1, 0, 0.587936,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383785,-99) , +15, 0.592659, 0, 0, 0.448482,-99) , +5, 1.95311, 0, 0, 0.486898,-99) , +13, 0.000529784, 0, 0, 0.551008,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533668,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390012,-99) , +10, 4355.29, 0, 0, 0.466443,-99) , +9, 3.0191, 0, 0, 0.495092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378291,-99) , +15, 0.196173, 1, 0, 0.470806,-99) , +12, 0.127494, 1, 0, 0.515546,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474666,-99) , +1, 10.5, 1, 0, 0.491012,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294259,-99) , +5, 1.7348, 1, 0, 0.417452,-99) , +1, 9.5, 0, 0, 0.474837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34183,-99) , +7, 0.0934429, 1, 0, 0.468382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332381,-99) , +4, 1.68175, 1, 0, 0.453963,-99) , +16, 2484.28, 1, 0, 0.486323,-99) ); + // itree = 842 + fBoostWeights.push_back(0.00376773); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556282,-99) , +13, 0.00426009, 0, 0, 0.612045,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31726,-99) , +14, -5.57422, 0, 0, 0.495586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364612,-99) , +5, 2.15355, 1, 0, 0.488702,-99) , +10, -8174.64, 1, 0, 0.496285,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293772,-99) , +3, 0.999636, 1, 0, 0.491176,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279976,-99) , +12, 0.018167, 0, 0, 0.486284,-99) ); + // itree = 843 + fBoostWeights.push_back(0.00434715); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624988,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398735,-99) , +8, 0.991423, 1, 0, 0.520605,-99) , +0, 38.5, 0, 0, 0.541918,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413582,-99) , +6, 0.991296, 1, 0, 0.485508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27606,-99) , +5, 2.15978, 1, 0, 0.477932,-99) , +11, 1.5, 0, 0, 0.49925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210489,-99) , +5, 2.48989, 1, 0, 0.496763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292013,-99) , +3, 0.999604, 1, 0, 0.49091,-99) ); + // itree = 844 + fBoostWeights.push_back(0.008276); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.720745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594797,-99) , +16, 1327.36, 1, 0, 0.661061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482661,-99) , +15, 1.14855, 1, 0, 0.607538,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380919,-99) , +12, 0.0962178, 1, 0, 0.465945,-99) , +1, 42.5, 1, 0, 0.555643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252681,-99) , +1, 11.5, 0, 0, 0.540229,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403258,-99) , +7, 0.00936119, 0, 0, 0.498681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370179,-99) , +14, -4.72856, 0, 0, 0.489571,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250228,-99) , +3, 0.969424, 0, 0, 0.459003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19261,-99) , +14, -2.8448, 1, 0, 0.390379,-99) , +4, 1.74863, 1, 0, 0.48053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219984,-99) , +7, 0.049426, 1, 0, 0.468925,-99) , +2, 29.5, 0, 0, 0.483333,-99) ); + // itree = 845 + fBoostWeights.push_back(0.00620888); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671241,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513932,-99) , +11, 1.5, 0, 0, 0.575142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502407,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349622,-99) , +9, -0.575197, 1, 0, 0.454881,-99) , +9, 3.67185, 0, 0, 0.492087,-99) , +3, 0.972999, 1, 0, 0.522981,-99) , +5, 2.19455, 0, 0, 0.535636,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30477,-99) , +13, 0.0404706, 1, 0, 0.484735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362504,-99) , +2, 8.5, 0, 0, 0.474301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297938,-99) , +8, -0.984837, 0, 0, 0.46719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248791,-99) , +5, 2.16126, 1, 0, 0.457134,-99) , +16, 351.596, 1, 0, 0.48575,-99) ); + // itree = 846 + fBoostWeights.push_back(0.00854143); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.73229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548113,-99) , +5, 2.01254, 0, 0, 0.599734,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.755168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566484,-99) , +4, 1.50882, 0, 0, 0.623278,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429614,-99) , +13, 0.000673562, 0, 0, 0.507548,-99) , +3, 0.995602, 0, 0, 0.531856,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390026,-99) , +8, 0.674571, 1, 0, 0.480332,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233737,-99) , +13, 0.0166845, 1, 0, 0.430458,-99) , +3, 0.998094, 1, 0, 0.512182,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444378,-99) , +7, 0.0144364, 0, 0, 0.484554,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192484,-99) , +8, 0.950367, 0, 0, 0.354789,-99) , +5, 1.99117, 1, 0, 0.468177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260512,-99) , +7, 0.028798, 1, 0, 0.451622,-99) , +2, 16.5, 0, 0, 0.478762,-99) , +12, 0.414466, 0, 0, 0.486721,-99) ); + // itree = 847 + fBoostWeights.push_back(0.0039497); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647677,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288864,-99) , +14, -5.87367, 0, 0, 0.503739,-99) , +12, 0.495308, 0, 0, 0.509411,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112185,-99) , +7, 0.246898, 1, 0, 0.507344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313922,-99) , +1, 68.5, 1, 0, 0.501597,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290517,-99) , +15, 0.0738381, 0, 0, 0.366272,-99) , +7, 0.00889296, 0, 0, 0.493547,-99) ); + // itree = 848 + fBoostWeights.push_back(0.0038843); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640158,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438057,-99) , +12, 0.0387301, 0, 0, 0.510801,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292382,-99) , +5, 1.93503, 1, 0, 0.443632,-99) , +15, 0.0862456, 0, 0, 0.496432,-99) , +12, 0.495916, 0, 0, 0.501852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345844,-99) , +4, 1.99648, 1, 0, 0.497552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247108,-99) , +7, 0.00714056, 0, 0, 0.492655,-99) ); + // itree = 849 + fBoostWeights.push_back(0.00648515); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483465,-99) , +9, -0.501152, 1, 0, 0.546025,-99) , +9, 0.549067, 0, 0, 0.602373,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49983,-99) , +11, 1.5, 0, 0, 0.566607,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389908,-99) , +12, 0.128737, 1, 0, 0.460831,-99) , +6, 0.397508, 0, 0, 0.507918,-99) , +3, 0.980535, 1, 0, 0.552894,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418399,-99) , +6, 1.00301, 0, 0, 0.468441,-99) , +6, 0.820942, 1, 0, 0.531309,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499615,-99) , +13, 0.00209088, 0, 0, 0.539263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399191,-99) , +3, 0.998234, 1, 0, 0.519215,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436547,-99) , +4, 0.634544, 1, 0, 0.463227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228082,-99) , +4, 1.92369, 1, 0, 0.453713,-99) , +12, 0.100951, 1, 0, 0.479959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268994,-99) , +8, -0.98465, 0, 0, 0.47232,-99) , +16, 406.584, 1, 0, 0.493468,-99) ); + // itree = 850 + fBoostWeights.push_back(0.00529808); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56425,-99) , +10, 3186.96, 0, 0, 0.609139,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489472,-99) , +8, 0.37621, 1, 0, 0.528296,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3669,-99) , +8, 0.835238, 1, 0, 0.440497,-99) , +5, 1.60589, 1, 0, 0.511939,-99) , +3, 0.904095, 1, 0, 0.526633,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.210287,-99) , +7, 0.108294, 1, 0, 0.487375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312201,-99) , +3, 0.834177, 0, 0, 0.477347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216111,-99) , +13, 0.0217231, 1, 0, 0.466683,-99) , +4, 1.19078, 1, 0, 0.500925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245886,-99) , +2, 6.5, 0, 0, 0.496218,-99) ); + // itree = 851 + fBoostWeights.push_back(0.00386654); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518671,-99) , +4, 0.459314, 1, 0, 0.533503,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248969,-99) , +3, 0.761308, 0, 0, 0.473778,-99) , +16, 2444.1, 1, 0, 0.505717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307238,-99) , +3, 0.999687, 1, 0, 0.501466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288853,-99) , +2, 6.5, 0, 0, 0.497095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122294,-99) , +7, 0.265405, 1, 0, 0.494559,-99) ); + // itree = 852 + fBoostWeights.push_back(0.00647704); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568416,-99) , +3, 0.980006, 1, 0, 0.618079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450826,-99) , +10, 3568.24, 1, 0, 0.502174,-99) , +9, -5.3579, 1, 0, 0.525532,-99) , +6, 0.160591, 1, 0, 0.547922,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357814,-99) , +1, 13.5, 0, 0, 0.567166,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109832,-99) , +0, 36.5, 1, 0, 0.485014,-99) , +2, 24.5, 0, 0, 0.502906,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4862,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344769,-99) , +10, 4757.37, 1, 0, 0.440401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230029,-99) , +6, 1.00441, 0, 0, 0.400494,-99) , +6, 0.980044, 1, 0, 0.48603,-99) , +11, 1.5, 0, 0, 0.506884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307939,-99) , +3, 0.999651, 1, 0, 0.502095,-99) ); + // itree = 853 + fBoostWeights.push_back(0.00738153); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678183,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500764,-99) , +8, -0.921509, 0, 0, 0.575197,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538146,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411082,-99) , +9, -0.102106, 1, 0, 0.47479,-99) , +14, -2.73753, 0, 0, 0.543689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399961,-99) , +5, 0.50588, 0, 0, 0.526896,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466601,-99) , +11, 1.5, 0, 0, 0.497676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191428,-99) , +12, 0.0196194, 0, 0, 0.488102,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24595,-99) , +1, 11.5, 0, 0, 0.37143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.058993,-99) , +4, 1.76836, 1, 0, 0.345555,-99) , +13, 0.00829363, 1, 0, 0.466313,-99) , +5, 1.37978, 1, 0, 0.490951,-99) , +12, 0.526853, 0, 0, 0.497554,-99) ); + // itree = 854 + fBoostWeights.push_back(0.00544051); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462626,-99) , +8, -0.836617, 0, 0, 0.526717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161102,-99) , +4, 1.96809, 1, 0, 0.523217,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46184,-99) , +12, 0.0986961, 1, 0, 0.541798,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466769,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338509,-99) , +2, 15.5, 0, 0, 0.416811,-99) , +5, 1.80688, 0, 0, 0.46908,-99) , +8, 0.935558, 1, 0, 0.511435,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444817,-99) , +15, 0.0274333, 1, 0, 0.498787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304707,-99) , +12, 0.340982, 0, 0, 0.41463,-99) , +15, 0.0468486, 0, 0, 0.502064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286332,-99) , +5, 2.25671, 1, 0, 0.495589,-99) ); + // itree = 855 + fBoostWeights.push_back(0.00754091); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.756712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533818,-99) , +13, 0.0037924, 0, 0, 0.586239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408706,-99) , +4, 1.3568, 1, 0, 0.558899,-99) , +5, 2.11753, 0, 0, 0.576603,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.205497, 1, 0, 0.437584,-99) , +3, 0.997825, 1, 0, 0.545856,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411781,-99) , +7, 0.0332099, 1, 0, 0.512615,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240774,-99) , +1, 13.5, 1, 0, 0.440818,-99) , +7, 0.01276, 0, 0, 0.491821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270708,-99) , +0, 34.5, 1, 0, 0.486898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128693,-99) , +7, 0.0586093, 1, 0, 0.478429,-99) , +2, 26.5, 0, 0, 0.493928,-99) ); + // itree = 856 + fBoostWeights.push_back(0.00359852); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500852,-99) , +12, 0.449338, 0, 0, 0.507249,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337246,-99) , +8, -0.989124, 0, 0, 0.502189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278198,-99) , +12, 0.0165015, 0, 0, 0.497727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177379,-99) , +7, 0.252106, 1, 0, 0.494909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254992,-99) , +2, 6.5, 0, 0, 0.490297,-99) ); + // itree = 857 + fBoostWeights.push_back(0.003772); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247223,-99) , +7, 0.107474, 1, 0, 0.500992,-99) , +2, 54.5, 0, 0, 0.50871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138338,-99) , +7, 0.239941, 1, 0, 0.50649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293597,-99) , +1, 77.5, 1, 0, 0.502056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302074,-99) , +3, 0.755789, 0, 0, 0.49512,-99) ); + // itree = 858 + fBoostWeights.push_back(0.00651599); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501604,-99) , +3, 0.996958, 0, 0, 0.573524,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482925,-99) , +9, -0.390291, 1, 0, 0.519672,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342771,-99) , +2, 8.5, 0, 0, 0.461013,-99) , +16, 4068.84, 1, 0, 0.49201,-99) , +10, -5481.19, 1, 0, 0.500072,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0420472,-99) , +8, 0.95012, 0, 0, 0.371587,-99) , +5, 2.12918, 1, 0, 0.492507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276045,-99) , +7, 0.148691, 1, 0, 0.486799,-99) ); + // itree = 859 + fBoostWeights.push_back(0.00641425); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663043,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466408,-99) , +8, 0.710662, 1, 0, 0.514717,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260815,-99) , +8, 0.900294, 0, 0, 0.388633,-99) , +4, 1.71416, 1, 0, 0.503734,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318163,-99) , +7, 0.00872027, 0, 0, 0.436575,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206552,-99) , +0, 15.5, 1, 0, 0.398913,-99) , +15, 0.0583711, 0, 0, 0.49047,-99) , +12, 0.525784, 0, 0, 0.496618,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292592,-99) , +14, -5.31556, 0, 0, 0.489267,-99) ); + // itree = 860 + fBoostWeights.push_back(0.00673536); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529259,-99) , +3, 0.978863, 0, 0, 0.564014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46207,-99) , +10, 6684.57, 1, 0, 0.541553,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380047,-99) , +5, 1.49517, 1, 0, 0.468977,-99) , +15, 0.44454, 1, 0, 0.519115,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45203,-99) , +7, 0.0174019, 0, 0, 0.490135,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191618,-99) , +0, 21.5, 0, 0, 0.417249,-99) , +7, 0.0275295, 1, 0, 0.465236,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199793,-99) , +4, 1.8995, 1, 0, 0.45942,-99) , +16, 506.506, 1, 0, 0.482762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220557,-99) , +4, 2.07552, 1, 0, 0.478671,-99) ); + // itree = 861 + fBoostWeights.push_back(0.00588352); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483563,-99) , +8, 0.982846, 1, 0, 0.559611,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463391,-99) , +1, 35.5, 1, 0, 0.54706,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378318,-99) , +12, 0.0182006, 0, 0, 0.537198,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604678,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538306,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43517,-99) , +2, 18.5, 0, 0, 0.468142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196753,-99) , +1, 60.5, 1, 0, 0.45981,-99) , +16, 8.10835, 1, 0, 0.47495,-99) , +12, 0.110628, 1, 0, 0.504111,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334261,-99) , +12, 0.142524, 1, 0, 0.405736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0515951,-99) , +5, 1.85981, 1, 0, 0.377298,-99) , +8, -0.945871, 0, 0, 0.494513,-99) ); + // itree = 862 + fBoostWeights.push_back(0.00583996); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.761029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54828,-99) , +5, 2.1461, 0, 0, 0.565713,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212619,-99) , +7, 0.0445424, 1, 0, 0.492041,-99) , +2, 24.5, 0, 0, 0.510124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368562,-99) , +12, 0.0246262, 0, 0, 0.503277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317409,-99) , +14, -5.54194, 0, 0, 0.497791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0322844,-99) , +7, 0.280354, 1, 0, 0.495066,-99) ); + // itree = 863 + fBoostWeights.push_back(0.00353958); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519134,-99) , +2, 24.5, 0, 0, 0.531376,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108804,-99) , +5, 2.02868, 1, 0, 0.461318,-99) , +13, 0.010992, 1, 0, 0.518437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318529,-99) , +7, 0.00716461, 0, 0, 0.514415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354839,-99) , +12, 0.0222178, 0, 0, 0.508038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.104727,-99) , +7, 0.324392, 1, 0, 0.506214,-99) ); + // itree = 864 + fBoostWeights.push_back(0.00621189); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538677,-99) , +15, 0.386882, 1, 0, 0.609079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483615,-99) , +5, 1.98803, 0, 0, 0.514857,-99) , +16, 29.627, 0, 0, 0.564495,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539297,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315523,-99) , +5, 1.98314, 1, 0, 0.530266,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340816,-99) , +5, 1.93892, 0, 0, 0.409943,-99) , +8, 0.737722, 1, 0, 0.483643,-99) , +6, 0.558456, 1, 0, 0.53127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401754,-99) , +8, -0.883359, 0, 0, 0.5176,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558082,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432191,-99) , +4, 0.901901, 1, 0, 0.459453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328103,-99) , +3, 0.999189, 1, 0, 0.451131,-99) , +10, -6280.13, 1, 0, 0.460764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209079,-99) , +5, 2.23622, 1, 0, 0.453483,-99) , +16, 501.777, 1, 0, 0.478476,-99) ); + // itree = 865 + fBoostWeights.push_back(0.00607467); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.70574,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500967,-99) , +6, 0.586261, 1, 0, 0.546646,-99) , +5, 2.00823, 0, 0, 0.572692,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496313,-99) , +12, 0.124176, 1, 0, 0.530155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391977,-99) , +12, 0.030443, 0, 0, 0.519517,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470165,-99) , +9, -2.29941, 1, 0, 0.507607,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333062,-99) , +7, 0.0143371, 0, 0, 0.417168,-99) , +16, 512.419, 1, 0, 0.452574,-99) , +10, 2541.16, 1, 0, 0.487719,-99) , +10, 9175.73, 0, 0, 0.499983,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224592,-99) , +13, 0.0182417, 1, 0, 0.429507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.207025,-99) , +8, 0.854409, 1, 0, 0.380179,-99) , +3, 0.999139, 1, 0, 0.491014,-99) ); + // itree = 866 + fBoostWeights.push_back(0.00382756); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658923,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648311,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523978,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456648,-99) , +7, 0.0143934, 0, 0, 0.50967,-99) , +12, 0.494707, 0, 0, 0.515624,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413611,-99) , +5, 1.65073, 1, 0, 0.469714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0254776,-99) , +0, 28.5, 1, 0, 0.45475,-99) , +1, 9.5, 0, 0, 0.503398,-99) , +9, 11.3624, 0, 0, 0.508335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339305,-99) , +3, 0.999638, 1, 0, 0.504015,-99) ); + // itree = 867 + fBoostWeights.push_back(0.00543396); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497025,-99) , +6, 0.916453, 1, 0, 0.566205,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382657,-99) , +15, 0.668197, 1, 0, 0.494351,-99) , +2, 26.5, 0, 0, 0.509233,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292037,-99) , +5, 1.41061, 1, 0, 0.421723,-99) , +13, 0.0208323, 1, 0, 0.501282,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500947,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337893,-99) , +7, 0.0111687, 0, 0, 0.472414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248138,-99) , +1, 7.5, 0, 0, 0.454379,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297689,-99) , +14, -2.57235, 1, 0, 0.419853,-99) , +5, 1.88647, 1, 0, 0.486548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243664,-99) , +3, 0.999703, 1, 0, 0.481794,-99) ); + // itree = 868 + fBoostWeights.push_back(0.00557322); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557645,-99) , +4, 0.613434, 1, 0, 0.590252,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382664,-99) , +16, 1133.03, 1, 0, 0.461866,-99) , +8, 0.718755, 1, 0, 0.55649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417746,-99) , +5, 0.398546, 0, 0, 0.539534,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485704,-99) , +16, 1292.36, 1, 0, 0.526167,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429553,-99) , +12, 0.427428, 0, 0, 0.449738,-99) , +12, 0.138441, 1, 0, 0.491275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224912,-99) , +7, 0.1368, 1, 0, 0.485547,-99) , +5, 1.37728, 1, 0, 0.506606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37606,-99) , +8, -0.982993, 0, 0, 0.501421,-99) ); + // itree = 869 + fBoostWeights.push_back(0.00609832); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640287,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487912,-99) , +13, 0.0106022, 1, 0, 0.53373,-99) , +10, 10931.1, 0, 0, 0.546934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384329,-99) , +4, 1.66428, 1, 0, 0.537019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136934,-99) , +5, 2.12462, 1, 0, 0.528113,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386146,-99) , +14, -4.60177, 0, 0, 0.484317,-99) , +5, 2.13889, 0, 0, 0.497899,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517536,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255679,-99) , +10, 2852.07, 1, 0, 0.3705,-99) , +9, -2.64727, 1, 0, 0.417619,-99) , +1, 9.5, 0, 0, 0.482313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313712,-99) , +3, 0.998928, 1, 0, 0.468918,-99) , +8, 0.436838, 1, 0, 0.498194,-99) ); + // itree = 870 + fBoostWeights.push_back(0.0072092); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497628,-99) , +5, 1.42155, 0, 0, 0.555796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0918579,-99) , +5, 2.30974, 1, 0, 0.548899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452996,-99) , +8, 0.981053, 1, 0, 0.534069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613624,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39093,-99) , +15, 0.0581754, 0, 0, 0.463667,-99) , +10, -7785.84, 1, 0, 0.474657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243683,-99) , +3, 0.755718, 0, 0, 0.466803,-99) , +16, 485.855, 1, 0, 0.491633,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439049,-99) , +5, 1.46953, 1, 0, 0.524574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372039,-99) , +10, 5277.14, 1, 0, 0.481054,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33902,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132871,-99) , +4, 1.32414, 1, 0, 0.270671,-99) , +1, 19.5, 0, 0, 0.411138,-99) , +15, 0.743533, 1, 0, 0.479126,-99) ); + // itree = 871 + fBoostWeights.push_back(0.00695301); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.757168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552655,-99) , +5, 2.11885, 0, 0, 0.570112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232191,-99) , +1, 11.5, 0, 0, 0.552637,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0661999,-99) , +4, 2.06959, 1, 0, 0.498367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199031,-99) , +7, 0.0485965, 1, 0, 0.489622,-99) , +2, 24.5, 0, 0, 0.504005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0805933,-99) , +7, 0.208737, 1, 0, 0.501006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244309,-99) , +1, 76.5, 1, 0, 0.495992,-99) ); + // itree = 872 + fBoostWeights.push_back(0.00333196); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505196,-99) , +12, 0.502953, 0, 0, 0.509484,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307662,-99) , +7, 0.00668952, 0, 0, 0.506492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341601,-99) , +12, 0.0181941, 0, 0, 0.502636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301998,-99) , +3, 0.99969, 1, 0, 0.498453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158377,-99) , +4, 2.06707, 1, 0, 0.493384,-99) ); + // itree = 873 + fBoostWeights.push_back(0.00675804); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541589,-99) , +5, 2.07892, 0, 0, 0.554534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426911,-99) , +3, 0.998823, 1, 0, 0.542747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338315,-99) , +5, 2.36266, 1, 0, 0.537484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611659,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378443,-99) , +5, 1.31869, 0, 0, 0.487841,-99) , +13, 0.00396594, 0, 0, 0.519565,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432065,-99) , +2, 12.5, 0, 0, 0.505003,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279125,-99) , +8, -0.160296, 0, 0, 0.405929,-99) , +5, 1.40096, 1, 0, 0.444508,-99) , +12, 0.100609, 1, 0, 0.473979,-99) , +11, 1.5, 0, 0, 0.495486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270381,-99) , +12, 0.0188354, 0, 0, 0.489772,-99) ); + // itree = 874 + fBoostWeights.push_back(0.00601043); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620488,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505191,-99) , +12, 0.446102, 0, 0, 0.512263,-99) , +2, 26.5, 0, 0, 0.519369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362681,-99) , +8, -0.983788, 0, 0, 0.512689,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349335,-99) , +2, 24.5, 0, 0, 0.504841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331171,-99) , +3, 0.997831, 1, 0, 0.470196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0673107,-99) , +1, 10.5, 0, 0, 0.44393,-99) , +7, 0.0421695, 1, 0, 0.49686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275219,-99) , +2, 6.5, 0, 0, 0.492892,-99) ); + // itree = 875 + fBoostWeights.push_back(0.00434401); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605471,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220107,-99) , +4, 2.06754, 1, 0, 0.535521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444759,-99) , +5, 1.32598, 0, 0, 0.510602,-99) , +0, 37.5, 0, 0, 0.529233,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460478,-99) , +2, 13.5, 0, 0, 0.491426,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151258,-99) , +4, 1.968, 1, 0, 0.421633,-99) , +6, 0.916389, 1, 0, 0.476159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194094,-99) , +13, 0.0628639, 1, 0, 0.471525,-99) , +11, 1.5, 0, 0, 0.49089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271166,-99) , +3, 0.999727, 1, 0, 0.487229,-99) ); + // itree = 876 + fBoostWeights.push_back(0.00380048); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.591479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469121,-99) , +12, 0.0549996, 0, 0, 0.566828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460587,-99) , +4, -0.134102, 0, 0, 0.53916,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386114,-99) , +13, 0.0163986, 1, 0, 0.486704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295429,-99) , +12, 0.018188, 0, 0, 0.48145,-99) , +4, 0.653544, 1, 0, 0.496726,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234963,-99) , +13, 0.0969482, 1, 0, 0.494451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279633,-99) , +4, 2.01811, 1, 0, 0.489581,-99) ); + // itree = 877 + fBoostWeights.push_back(0.00482865); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58152,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510227,-99) , +12, 0.34438, 0, 0, 0.518232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358196,-99) , +7, 0.00714695, 0, 0, 0.514667,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319558,-99) , +1, 13.5, 0, 0, 0.425768,-99) , +8, -0.915841, 0, 0, 0.50564,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323225,-99) , +5, 1.53579, 1, 0, 0.46346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0988779,-99) , +1, 19.5, 0, 0, 0.411985,-99) , +7, 0.0844957, 1, 0, 0.497416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269474,-99) , +4, 2.02292, 1, 0, 0.492376,-99) ); + // itree = 878 + fBoostWeights.push_back(0.00418319); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311925,-99) , +5, 2.27976, 1, 0, 0.51248,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0742559,-99) , +1, 17.5, 0, 0, 0.414326,-99) , +7, 0.0857115, 1, 0, 0.504523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374397,-99) , +8, -0.981676, 0, 0, 0.498268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330479,-99) , +4, 1.97103, 1, 0, 0.493292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262574,-99) , +8, 0.999754, 1, 0, 0.489119,-99) ); + // itree = 879 + fBoostWeights.push_back(0.0038762); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674707,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432676,-99) , +15, 0.506579, 1, 0, 0.575612,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373522,-99) , +8, -0.974268, 0, 0, 0.480692,-99) , +9, 6.64699, 0, 0, 0.489896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302554,-99) , +3, 0.999694, 1, 0, 0.486053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235707,-99) , +2, 6.5, 0, 0, 0.482135,-99) , +12, 0.535654, 0, 0, 0.4888,-99) ); + // itree = 880 + fBoostWeights.push_back(0.00671832); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570109,-99) , +5, 1.9524, 0, 0, 0.606352,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445422,-99) , +1, 12.5, 0, 0, 0.501267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0837664,-99) , +5, 2.49356, 1, 0, 0.498648,-99) , +15, 0.0645557, 1, 0, 0.50887,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44617,-99) , +0, 12.5, 1, 0, 0.529293,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439038,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205532,-99) , +3, 0.939824, 0, 0, 0.391919,-99) , +12, 0.113701, 1, 0, 0.455594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0488294,-99) , +5, 2.25784, 1, 0, 0.443364,-99) , +7, 0.0140826, 0, 0, 0.491764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23938,-99) , +3, 0.999741, 1, 0, 0.48808,-99) ); + // itree = 881 + fBoostWeights.push_back(0.00552826); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66341,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498512,-99) , +2, 24.5, 0, 0, 0.518732,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101019,-99) , +5, 2.15574, 1, 0, 0.446157,-99) , +3, 0.997773, 1, 0, 0.505594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22671,-99) , +13, 0.0560698, 1, 0, 0.500757,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41846,-99) , +16, 791.421, 1, 0, 0.4685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279771,-99) , +12, 0.233807, 0, 0, 0.424269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180207,-99) , +8, -0.771582, 0, 0, 0.397006,-99) , +15, 0.0579439, 0, 0, 0.488733,-99) , +12, 0.513631, 0, 0, 0.495237,-99) ); + // itree = 882 + fBoostWeights.push_back(0.00334502); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658969,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375809,-99) , +12, 0.0227607, 0, 0, 0.499679,-99) , +12, 0.508039, 0, 0, 0.505439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.313323,-99) , +7, 0.00743903, 0, 0, 0.500779,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142633,-99) , +7, 0.234087, 1, 0, 0.498685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294416,-99) , +1, 69.5, 1, 0, 0.493266,-99) ); + // itree = 883 + fBoostWeights.push_back(0.00542341); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561916,-99) , +0, 11.5, 1, 0, 0.60443,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41871,-99) , +8, 0.725781, 1, 0, 0.520559,-99) , +5, 1.66538, 0, 0, 0.556268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424645,-99) , +3, 0.998074, 1, 0, 0.519128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397745,-99) , +2, 15.5, 0, 0, 0.49552,-99) , +15, 0.477645, 1, 0, 0.528105,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461728,-99) , +3, 0.996096, 1, 0, 0.515142,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261542,-99) , +7, 0.00974432, 0, 0, 0.440998,-99) , +3, 0.985687, 0, 0, 0.480156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177053,-99) , +15, 0.902701, 1, 0, 0.475892,-99) , +12, 0.118225, 1, 0, 0.501808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149855,-99) , +5, 2.59381, 1, 0, 0.500501,-99) ); + // itree = 884 + fBoostWeights.push_back(0.00763854); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47938,-99) , +12, 0.180153, 1, 0, 0.594559,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413276,-99) , +8, -0.945762, 0, 0, 0.522711,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30662,-99) , +9, -2.86493, 0, 0, 0.450002,-99) , +14, -3.09063, 0, 0, 0.500814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363058,-99) , +5, 0.512545, 0, 0, 0.492148,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583843,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344835,-99) , +6, 0.866332, 1, 0, 0.442035,-99) , +9, 2.89429, 0, 0, 0.475853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485323,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18097,-99) , +7, 0.0182555, 1, 0, 0.291317,-99) , +10, 5888.5, 0, 0, 0.36209,-99) , +12, 0.113631, 1, 0, 0.414465,-99) , +4, 1.41124, 1, 0, 0.471557,-99) , +10, -8170.32, 1, 0, 0.480768,-99) ); + // itree = 885 + fBoostWeights.push_back(0.00723089); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554386,-99) , +6, 0.0977005, 1, 0, 0.570412,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45966,-99) , +9, -7.44194, 1, 0, 0.491017,-99) , +10, 5029.44, 1, 0, 0.545851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413726,-99) , +12, 0.0235703, 0, 0, 0.533307,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496532,-99) , +10, -1689.15, 1, 0, 0.518904,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314067,-99) , +0, 13.5, 1, 0, 0.436163,-99) , +7, 0.0138109, 0, 0, 0.497264,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383432,-99) , +9, -0.837536, 1, 0, 0.495994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241565,-99) , +13, 0.00108171, 1, 0, 0.38111,-99) , +4, 1.55176, 1, 0, 0.475394,-99) , +12, 0.118339, 1, 0, 0.503583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216024,-99) , +3, 0.99975, 1, 0, 0.499739,-99) ); + // itree = 886 + fBoostWeights.push_back(0.00415634); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682326,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540074,-99) , +9, -12.5966, 0, 0, 0.608883,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46442,-99) , +5, 1.47564, 1, 0, 0.490155,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272833,-99) , +3, 0.999664, 1, 0, 0.485988,-99) , +9, -9.12586, 1, 0, 0.493182,-99) , +12, 0.521876, 0, 0, 0.500347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193386,-99) , +2, 6.5, 0, 0, 0.495421,-99) ); + // itree = 887 + fBoostWeights.push_back(0.00584538); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444985,-99) , +14, -4.8892, 0, 0, 0.554145,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401389,-99) , +7, 0.0279748, 1, 0, 0.458938,-99) , +6, 0.929717, 1, 0, 0.534417,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456877,-99) , +0, 19.5, 0, 0, 0.536301,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407888,-99) , +12, 0.272299, 0, 0, 0.45218,-99) , +4, 0.845106, 1, 0, 0.482936,-99) , +12, 0.114006, 1, 0, 0.507434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386028,-99) , +8, -0.984058, 0, 0, 0.501577,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496599,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235328,-99) , +14, -3.71389, 1, 0, 0.363231,-99) , +4, 1.84786, 1, 0, 0.493962,-99) ); + // itree = 888 + fBoostWeights.push_back(0.00336412); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472031,-99) , +5, 1.57562, 1, 0, 0.504528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32451,-99) , +3, 0.999663, 1, 0, 0.500081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280724,-99) , +12, 0.0165015, 0, 0, 0.495886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212605,-99) , +5, 2.46981, 1, 0, 0.493238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26958,-99) , +2, 6.5, 0, 0, 0.488786,-99) ); + // itree = 889 + fBoostWeights.push_back(0.00545188); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561463,-99) , +8, 0.619011, 1, 0, 0.617964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439448,-99) , +1, 9.5, 0, 0, 0.568194,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51011,-99) , +12, 0.417829, 0, 0, 0.518709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270136,-99) , +4, 1.92775, 1, 0, 0.512574,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14527,-99) , +4, 2.02275, 1, 0, 0.507748,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183842,-99) , +3, 0.999151, 1, 0, 0.385378,-99) , +9, 3.27268, 0, 0, 0.445076,-99) , +3, 0.991452, 1, 0, 0.489286,-99) , +9, -6.15278, 1, 0, 0.497234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353294,-99) , +7, 0.00754516, 0, 0, 0.492855,-99) ); + // itree = 890 + fBoostWeights.push_back(0.00556355); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.736085,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57798,-99) , +9, 1.24508, 0, 0, 0.647353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281056,-99) , +1, 9.5, 0, 0, 0.599715,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540859,-99) , +8, 0.388491, 0, 0, 0.56834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465573,-99) , +8, -0.760604, 0, 0, 0.542663,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37799,-99) , +3, 0.98438, 1, 0, 0.43381,-99) , +8, 0.839133, 1, 0, 0.510495,-99) , +5, 1.94735, 0, 0, 0.528742,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375731,-99) , +12, 0.0287383, 0, 0, 0.488204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293852,-99) , +7, 0.00689984, 0, 0, 0.483345,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251069,-99) , +6, 0.624212, 1, 0, 0.369585,-99) , +8, -0.946457, 0, 0, 0.473935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305662,-99) , +7, 0.125315, 1, 0, 0.467485,-99) , +11, 1.5, 0, 0, 0.488187,-99) ); + // itree = 891 + fBoostWeights.push_back(0.00382359); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664242,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326447,-99) , +12, 0.0197537, 0, 0, 0.499715,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.11305,-99) , +5, 1.84557, 1, 0, 0.40848,-99) , +8, -0.915891, 0, 0, 0.4903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314693,-99) , +4, 2.01811, 1, 0, 0.486152,-99) , +12, 0.523169, 0, 0, 0.492089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312627,-99) , +1, 69.5, 1, 0, 0.486624,-99) ); + // itree = 892 + fBoostWeights.push_back(0.00455729); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522404,-99) , +9, 0.974663, 1, 0, 0.598513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490064,-99) , +0, 46.5, 0, 0, 0.557747,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390418,-99) , +14, -5.20252, 0, 0, 0.494756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300321,-99) , +5, 2.36282, 1, 0, 0.491111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256915,-99) , +7, 0.0572864, 1, 0, 0.484789,-99) , +2, 30.5, 0, 0, 0.49481,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0472394,-99) , +1, 17.5, 0, 0, 0.360396,-99) , +7, 0.0993885, 1, 0, 0.487041,-99) ); + // itree = 893 + fBoostWeights.push_back(0.00597858); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0577865,-99) , +5, 2.19659, 1, 0, 0.527661,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270414,-99) , +12, 0.0295071, 0, 0, 0.474197,-99) , +8, 0.836011, 1, 0, 0.508159,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527175,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20473,-99) , +15, 0.0433965, 0, 0, 0.356406,-99) , +13, 0.000160254, 1, 0, 0.412358,-99) , +7, 0.0095321, 0, 0, 0.49996,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148084,-99) , +5, 1.77317, 1, 0, 0.396383,-99) , +8, -0.946424, 0, 0, 0.491835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.351656, 1, 0, 0.489893,-99) ); + // itree = 894 + fBoostWeights.push_back(0.00526786); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661083,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466496,-99) , +1, 19.5, 1, 0, 0.53123,-99) , +13, 0.00778191, 1, 0, 0.576809,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477494,-99) , +15, 0.509015, 1, 0, 0.533283,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430882,-99) , +16, 2445.01, 1, 0, 0.517122,-99) , +13, 0.00395756, 0, 0, 0.541118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305391,-99) , +5, 2.48055, 1, 0, 0.537314,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628518,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40809,-99) , +3, 0.996392, 1, 0, 0.477486,-99) , +10, -8435.58, 1, 0, 0.485281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.121886,-99) , +7, 0.207036, 1, 0, 0.480791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235273,-99) , +5, 2.21067, 1, 0, 0.473001,-99) , +11, 1.5, 0, 0, 0.495195,-99) ); + // itree = 895 + fBoostWeights.push_back(0.00787809); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647154,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488713,-99) , +7, 0.0401071, 1, 0, 0.538885,-99) , +6, 0.270996, 1, 0, 0.566097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453135,-99) , +8, -0.925521, 0, 0, 0.546993,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446879,-99) , +15, 0.251621, 1, 0, 0.505315,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346939,-99) , +5, 1.32465, 0, 0, 0.395001,-99) , +3, 0.988344, 1, 0, 0.454409,-99) , +13, 0.00116853, 0, 0, 0.522413,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507831,-99) , +4, 1.94011, 0, 0, 0.53155,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299046,-99) , +1, 7.5, 0, 0, 0.45687,-99) , +16, 887.632, 1, 0, 0.491749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302991,-99) , +12, 0.0203717, 0, 0, 0.484076,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611415,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146589,-99) , +7, 0.0566486, 1, 0, 0.32584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157543,-99) , +5, 1.98161, 1, 0, 0.291117,-99) , +12, 0.420302, 0, 0, 0.343802,-99) , +13, 0.00503678, 1, 0, 0.456748,-99) , +5, 1.59969, 1, 0, 0.495031,-99) ); + // itree = 896 + fBoostWeights.push_back(0.00687385); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655519,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459643,-99) , +5, 1.43987, 0, 0, 0.530867,-99) , +2, 15.5, 0, 0, 0.56737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460723,-99) , +12, 0.0446357, 0, 0, 0.521767,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331743,-99) , +12, 0.0246954, 1, 0, 0.401785,-99) , +1, 19.5, 0, 0, 0.475031,-99) , +15, 0.558857, 1, 0, 0.525721,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60721,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445904,-99) , +2, 14.5, 0, 0, 0.487288,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398703,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147651,-99) , +0, 53.5, 1, 0, 0.382831,-99) , +4, 1.35788, 1, 0, 0.460233,-99) , +12, 0.492021, 0, 0, 0.469655,-99) , +12, 0.0952502, 1, 0, 0.492491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322805,-99) , +4, 1.86547, 1, 0, 0.484231,-99) ); + // itree = 897 + fBoostWeights.push_back(0.00636597); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526994,-99) , +10, -5408.09, 1, 0, 0.540404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347093,-99) , +1, 9.5, 0, 0, 0.531553,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503411,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.44724, 1, 0, 0.498758,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157869,-99) , +2, 13.5, 0, 0, 0.292676,-99) , +7, 0.0276664, 1, 0, 0.476456,-99) , +2, 18.5, 0, 0, 0.496481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243462,-99) , +13, 0.0776655, 1, 0, 0.493427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348816,-99) , +12, 0.0234631, 0, 0, 0.487144,-99) ); + // itree = 898 + fBoostWeights.push_back(0.00692167); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.782754,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539878,-99) , +1, 34.5, 1, 0, 0.58649,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464269,-99) , +13, 0.00202836, 0, 0, 0.549234,-99) , +5, 2.11963, 0, 0, 0.570192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237761,-99) , +1, 14.5, 0, 0, 0.546419,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495098,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321635,-99) , +7, 0.00696981, 0, 0, 0.491253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.055248,-99) , +5, 2.4914, 1, 0, 0.487854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251669,-99) , +7, 0.0572382, 1, 0, 0.482467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122181,-99) , +0, 43.5, 1, 0, 0.475264,-99) , +2, 31.5, 0, 0, 0.4889,-99) ); + // itree = 899 + fBoostWeights.push_back(0.00698566); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567146,-99) , +7, 0.0266059, 0, 0, 0.630021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517802,-99) , +15, 0.442941, 1, 0, 0.592828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529033,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260105,-99) , +1, 20.5, 0, 0, 0.49147,-99) , +7, 0.0588662, 1, 0, 0.558426,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454565,-99) , +14, -3.55997, 0, 0, 0.535118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393747,-99) , +7, 0.0206188, 1, 0, 0.504473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199496,-99) , +5, 2.26441, 1, 0, 0.494726,-99) , +0, 19.5, 0, 0, 0.527352,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493064,-99) , +12, 0.211125, 1, 0, 0.556287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429727,-99) , +8, -0.82104, 0, 0, 0.524092,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38539,-99) , +5, 1.19322, 0, 0, 0.454507,-99) , +13, 0.00198951, 0, 0, 0.501762,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441462,-99) , +10, -2661.07, 1, 0, 0.457005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.139349,-99) , +7, 0.00710955, 0, 0, 0.448829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267692,-99) , +7, 0.0650084, 1, 0, 0.436532,-99) , +5, 1.41269, 1, 0, 0.463363,-99) , +16, 362.82, 1, 0, 0.486588,-99) ); + // itree = 900 + fBoostWeights.push_back(0.00355531); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524559,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461786,-99) , +15, 0.0879056, 0, 0, 0.508291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0710386,-99) , +7, 0.299106, 1, 0, 0.506471,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368309,-99) , +5, 0.457191, 0, 0, 0.499721,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2099,-99) , +5, 2.46963, 1, 0, 0.497006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20675,-99) , +12, 0.016483, 0, 0, 0.492383,-99) ); + // itree = 901 + fBoostWeights.push_back(0.00607039); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5897,-99) , +16, 2406.55, 1, 0, 0.6225,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448637,-99) , +16, 2007.5, 1, 0, 0.521171,-99) , +15, 0.3341, 1, 0, 0.572177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409502,-99) , +7, 0.0139877, 0, 0, 0.545834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46692,-99) , +3, 0.997978, 1, 0, 0.548617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432559,-99) , +14, -4.68316, 0, 0, 0.533958,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486436,-99) , +12, 0.343805, 0, 0, 0.514516,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0432846,-99) , +4, 1.90403, 1, 0, 0.431844,-99) , +14, -2.86849, 1, 0, 0.464989,-99) , +12, 0.0789467, 1, 0, 0.487146,-99) , +4, 0.591703, 1, 0, 0.501036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262182,-99) , +15, 4.08714, 1, 0, 0.497376,-99) ); + // itree = 902 + fBoostWeights.push_back(0.00552586); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479792,-99) , +6, 0.391495, 1, 0, 0.509506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186607,-99) , +5, 2.26439, 1, 0, 0.506556,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536311,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320966,-99) , +5, 1.53454, 1, 0, 0.374491,-99) , +3, 0.942141, 1, 0, 0.424227,-99) , +8, 0.983465, 1, 0, 0.496631,-99) , +12, 0.483939, 0, 0, 0.502823,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.104147,-99) , +13, 0.000847541, 1, 0, 0.342753,-99) , +4, 1.83113, 1, 0, 0.493538,-99) ); + // itree = 903 + fBoostWeights.push_back(0.00553176); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459175,-99) , +7, 0.0159275, 0, 0, 0.541529,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0849494,-99) , +3, 0.999359, 1, 0, 0.458968,-99) , +13, 0.0109795, 1, 0, 0.523078,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120012,-99) , +4, 1.96805, 1, 0, 0.473771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201339,-99) , +0, 17.5, 1, 0, 0.461801,-99) , +2, 11.5, 0, 0, 0.50396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318512,-99) , +12, 0.01821, 0, 0, 0.499533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235513,-99) , +5, 2.46103, 1, 0, 0.496819,-99) ); + // itree = 904 + fBoostWeights.push_back(0.0039039); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664008,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503358,-99) , +10, -4175.43, 1, 0, 0.513191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355202,-99) , +3, 0.999646, 1, 0, 0.508672,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211675,-99) , +4, 1.66786, 1, 0, 0.458768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213341,-99) , +8, -0.507136, 0, 0, 0.415152,-99) , +15, 0.0468348, 0, 0, 0.500875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30216,-99) , +12, 0.0165266, 0, 0, 0.496629,-99) , +12, 0.527172, 0, 0, 0.502419,-99) ); + // itree = 905 + fBoostWeights.push_back(0.00363899); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.727354,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464738,-99) , +6, 0.915791, 1, 0, 0.542673,-99) , +4, 1.94378, 0, 0, 0.563079,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481789,-99) , +10, -585.497, 1, 0, 0.499337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118145,-99) , +4, 2.17392, 1, 0, 0.497034,-99) , +9, -4.18942, 1, 0, 0.508759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301287,-99) , +7, 0.00697269, 0, 0, 0.505096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258771,-99) , +3, 0.999733, 1, 0, 0.501196,-99) ); + // itree = 906 + fBoostWeights.push_back(0.0060561); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553259,-99) , +7, 0.0129829, 1, 0, 0.580324,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287357,-99) , +4, 1.63263, 1, 0, 0.500793,-99) , +12, 0.113902, 1, 0, 0.538471,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478685,-99) , +13, 0.00150477, 0, 0, 0.55983,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418054,-99) , +9, -3.72781, 1, 0, 0.457063,-99) , +9, 4.4178, 0, 0, 0.482607,-99) , +3, 0.979124, 1, 0, 0.507232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320845,-99) , +5, 2.30884, 1, 0, 0.501607,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459631,-99) , +7, 0.0320296, 0, 0, 0.519788,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324639,-99) , +7, 0.0804735, 1, 0, 0.438873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160466,-99) , +5, 2.068, 1, 0, 0.429581,-99) , +11, 1.5, 0, 0, 0.456022,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265738,-99) , +2, 8.5, 0, 0, 0.443738,-99) , +6, 0.829198, 1, 0, 0.485522,-99) ); + // itree = 907 + fBoostWeights.push_back(0.00322541); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265794,-99) , +5, 2.4937, 1, 0, 0.514418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339093,-99) , +3, 0.999624, 1, 0, 0.510316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29034,-99) , +2, 6.5, 0, 0, 0.505881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.209971,-99) , +7, 0.154573, 1, 0, 0.502034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33795,-99) , +1, 63.5, 1, 0, 0.496406,-99) ); + // itree = 908 + fBoostWeights.push_back(0.00705135); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634162,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615784,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50562,-99) , +3, 0.996876, 0, 0, 0.515577,-99) , +6, 0.0613572, 1, 0, 0.527484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484306,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346364,-99) , +12, 0.196574, 1, 0, 0.445755,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0934641,-99) , +0, 92.5, 1, 0, 0.419539,-99) , +3, 0.997996, 1, 0, 0.509738,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459041,-99) , +7, 0.00996172, 1, 0, 0.516423,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523465,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212217,-99) , +8, 0.295609, 0, 0, 0.334233,-99) , +9, 3.10952, 0, 0, 0.381341,-99) , +12, 0.114623, 1, 0, 0.443852,-99) , +7, 0.0133583, 0, 0, 0.494523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304968,-99) , +4, 2.00681, 1, 0, 0.489609,-99) ); + // itree = 909 + fBoostWeights.push_back(0.00449431); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40667,-99) , +13, 0.0179125, 1, 0, 0.55281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370301,-99) , +3, 0.999241, 1, 0, 0.496926,-99) , +6, 0.522461, 1, 0, 0.524972,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612793,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385044,-99) , +10, 4240.91, 1, 0, 0.43713,-99) , +5, 2.0842, 0, 0, 0.461418,-99) , +14, -3.65564, 0, 0, 0.510562,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389408,-99) , +12, 0.158913, 1, 0, 0.457884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32861,-99) , +6, 0.699847, 1, 0, 0.419371,-99) , +8, -0.8517, 0, 0, 0.498708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322575,-99) , +5, 2.25426, 1, 0, 0.493235,-99) ); + // itree = 910 + fBoostWeights.push_back(0.00326712); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648374,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352982,-99) , +12, 0.0216868, 0, 0, 0.489391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360285,-99) , +16, 2.56219, 0, 0, 0.484228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253825,-99) , +3, 0.99971, 1, 0, 0.480615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.56523, 1, 0, 0.478715,-99) , +10, -14103.9, 1, 0, 0.484547,-99) ); + // itree = 911 + fBoostWeights.push_back(0.00598963); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413914,-99) , +14, -3.94639, 0, 0, 0.526936,-99) , +5, 2.05043, 0, 0, 0.537719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333872,-99) , +12, 0.0182039, 0, 0, 0.527551,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383177,-99) , +12, 0.142652, 0, 0, 0.503282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363,-99) , +1, 41.5, 1, 0, 0.489764,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347507,-99) , +6, 0.624558, 0, 0, 0.430429,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188682,-99) , +0, 18.5, 1, 0, 0.403426,-99) , +1, 9.5, 0, 0, 0.470853,-99) , +12, 0.125932, 1, 0, 0.499952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267796,-99) , +4, 2.07376, 1, 0, 0.496147,-99) ); + // itree = 912 + fBoostWeights.push_back(0.00579824); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554433,-99) , +16, 1416.56, 1, 0, 0.597158,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475381,-99) , +4, 1.22723, 0, 0, 0.522493,-99) , +13, 0.00172918, 0, 0, 0.549644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404107,-99) , +15, 2.89555, 1, 0, 0.536082,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676021,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342657,-99) , +5, 1.84167, 1, 0, 0.495683,-99) , +13, 0.00113852, 1, 0, 0.559137,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484715,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341788,-99) , +14, -4.02683, 0, 0, 0.469225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25852,-99) , +5, 2.09929, 1, 0, 0.459645,-99) , +12, 0.341652, 0, 0, 0.475592,-99) , +12, 0.070024, 1, 0, 0.494419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275114,-99) , +4, 2.07357, 1, 0, 0.49098,-99) ); + // itree = 913 + fBoostWeights.push_back(0.00546416); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497355,-99) , +6, 0.830751, 1, 0, 0.547314,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539553,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376653,-99) , +16, 3046.1, 0, 0, 0.451425,-99) , +14, -4.11934, 0, 0, 0.531099,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514455,-99) , +4, 0.45714, 0, 0, 0.577158,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435435,-99) , +12, 0.491125, 0, 0, 0.44656,-99) , +5, 1.1217, 1, 0, 0.474663,-99) , +12, 0.113902, 1, 0, 0.500965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309745,-99) , +12, 0.0165266, 0, 0, 0.496901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269475,-99) , +4, 1.9733, 1, 0, 0.490586,-99) ); + // itree = 914 + fBoostWeights.push_back(0.00661576); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.662567,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639074,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503223,-99) , +4, 1.113, 1, 0, 0.581122,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470871,-99) , +4, 1.43808, 0, 0, 0.499141,-99) , +3, 0.951403, 1, 0, 0.523486,-99) , +9, 6.47073, 0, 0, 0.536422,-99) , +9, -6.63011, 1, 0, 0.548011,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659596,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503784,-99) , +3, 0.863534, 1, 0, 0.515899,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237306,-99) , +8, -0.135444, 0, 0, 0.374401,-99) , +2, 8.5, 0, 0, 0.502589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228072,-99) , +3, 0.745075, 0, 0, 0.494039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288835,-99) , +7, 0.10252, 1, 0, 0.483233,-99) , +11, 1.5, 0, 0, 0.505176,-99) ); + // itree = 915 + fBoostWeights.push_back(0.00584944); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659453,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498888,-99) , +3, 0.977278, 1, 0, 0.558084,-99) , +1, 29.5, 1, 0, 0.593788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35134,-99) , +1, 14.5, 0, 0, 0.578771,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434261,-99) , +8, -0.822378, 0, 0, 0.50187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.255154,-99) , +5, 2.44703, 1, 0, 0.498852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176583,-99) , +7, 0.0564826, 1, 0, 0.488999,-99) , +2, 29.5, 0, 0, 0.506287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28545,-99) , +7, 0.173317, 1, 0, 0.502183,-99) ); + // itree = 916 + fBoostWeights.push_back(0.0056287); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645837,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478003,-99) , +8, 0.597472, 1, 0, 0.535234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241684,-99) , +4, 1.86522, 1, 0, 0.516569,-99) , +1, 14.5, 0, 0, 0.563558,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522292,-99) , +3, 0.997881, 1, 0, 0.587804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454928,-99) , +2, 10.5, 0, 0, 0.558541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392282,-99) , +7, 0.0888218, 1, 0, 0.544448,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478981,-99) , +6, 0.170686, 1, 0, 0.504071,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212512,-99) , +7, 0.00784741, 0, 0, 0.439915,-99) , +12, 0.143357, 1, 0, 0.476804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193333,-99) , +3, 0.99935, 1, 0, 0.469947,-99) , +10, 8506.34, 0, 0, 0.484494,-99) , +9, 5.06034, 0, 0, 0.495037,-99) ); + // itree = 917 + fBoostWeights.push_back(0.00837894); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585747,-99) , +12, 0.147192, 0, 0, 0.633737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481233,-99) , +3, 0.988654, 1, 0, 0.581139,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609187,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457005,-99) , +9, 3.61507, 0, 0, 0.48914,-99) , +9, -4.56363, 1, 0, 0.510619,-99) , +6, 0.239493, 1, 0, 0.533675,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546072,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149118,-99) , +5, 1.9267, 1, 0, 0.507758,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266495,-99) , +8, 0.838886, 1, 0, 0.444353,-99) , +1, 9.5, 0, 0, 0.517234,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59191,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43886,-99) , +4, 0.926617, 1, 0, 0.474602,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298265,-99) , +9, -6.51584, 1, 0, 0.374825,-99) , +3, 0.996579, 1, 0, 0.454022,-99) , +10, -6297.77, 1, 0, 0.464087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229712,-99) , +4, 1.87409, 1, 0, 0.454594,-99) , +16, 1510.15, 1, 0, 0.485559,-99) ); + // itree = 918 + fBoostWeights.push_back(0.00596722); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456733,-99) , +8, 0.984606, 1, 0, 0.545348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365868,-99) , +5, 2.22308, 1, 0, 0.539946,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611485,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478123,-99) , +12, 0.387652, 0, 0, 0.490924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12945,-99) , +7, 0.030925, 1, 0, 0.478895,-99) , +2, 13.5, 0, 0, 0.510721,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286962,-99) , +2, 44.5, 0, 0, 0.393517,-99) , +1, 40.5, 1, 0, 0.503969,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100329,-99) , +5, 1.55707, 1, 0, 0.365021,-99) , +7, 0.109389, 1, 0, 0.496927,-99) ); + // itree = 919 + fBoostWeights.push_back(0.00505016); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554058,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470224,-99) , +0, 13.5, 0, 0, 0.534185,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448879,-99) , +9, -3.13642, 1, 0, 0.479312,-99) , +4, 1.13726, 1, 0, 0.508406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280616,-99) , +7, 0.00690927, 0, 0, 0.504491,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497117,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345345,-99) , +16, 477.091, 1, 0, 0.420732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261525,-99) , +10, 336.374, 0, 0, 0.383103,-99) , +12, 0.0313775, 0, 0, 0.494143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273748,-99) , +3, 0.999625, 1, 0, 0.488545,-99) ); + // itree = 920 + fBoostWeights.push_back(0.00456897); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459833,-99) , +12, 0.038432, 0, 0, 0.52857,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0711417,-99) , +4, 2.06626, 1, 0, 0.473424,-99) , +12, 0.185981, 1, 0, 0.512686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384038,-99) , +14, -5.46573, 0, 0, 0.507314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250018,-99) , +7, 0.00667906, 0, 0, 0.503799,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505151,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334552,-99) , +3, 0.994474, 1, 0, 0.447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181181,-99) , +5, 1.71915, 1, 0, 0.404332,-99) , +13, 0.0176856, 1, 0, 0.493826,-99) ); + // itree = 921 + fBoostWeights.push_back(0.0051006); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671726,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584385,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446938,-99) , +8, -0.634197, 0, 0, 0.537981,-99) , +3, 0.951126, 1, 0, 0.573067,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377447,-99) , +15, 0.259943, 1, 0, 0.456825,-99) , +13, 0.00123653, 0, 0, 0.538343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329622,-99) , +15, 2.13223, 1, 0, 0.49067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295385,-99) , +3, 0.730405, 0, 0, 0.485991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0977457,-99) , +7, 0.205443, 1, 0, 0.482178,-99) , +4, 0.760631, 1, 0, 0.499547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279259,-99) , +2, 6.5, 0, 0, 0.495615,-99) ); + // itree = 922 + fBoostWeights.push_back(0.00623771); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646332,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428008,-99) , +13, 0.000638346, 0, 0, 0.568819,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441321,-99) , +2, 14.5, 0, 0, 0.482062,-99) , +4, 0.675943, 1, 0, 0.511299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388511,-99) , +5, 0.433238, 0, 0, 0.502602,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128239,-99) , +4, 2.20635, 1, 0, 0.471824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237311,-99) , +6, 0.974308, 1, 0, 0.45793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28132,-99) , +13, 0.00948815, 1, 0, 0.438904,-99) , +5, 1.65142, 1, 0, 0.47905,-99) , +10, -12473.1, 1, 0, 0.486718,-99) ); + // itree = 923 + fBoostWeights.push_back(0.00572615); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513969,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370037,-99) , +7, 0.102656, 1, 0, 0.504701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167562,-99) , +5, 2.44696, 1, 0, 0.502385,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33033,-99) , +1, 10.5, 0, 0, 0.570742,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346804,-99) , +11, 0.5, 1, 0, 0.383733,-99) , +5, 2.04258, 0, 0, 0.432835,-99) , +14, -3.59902, 0, 0, 0.487792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268671,-99) , +2, 6.5, 0, 0, 0.483564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299571,-99) , +12, 0.0187761, 0, 0, 0.478703,-99) ); + // itree = 924 + fBoostWeights.push_back(0.00507489); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478017,-99) , +6, 0.889667, 1, 0, 0.542308,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328835,-99) , +7, 0.0587737, 1, 0, 0.489088,-99) , +5, 1.46814, 1, 0, 0.515112,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404339,-99) , +5, 1.59613, 0, 0, 0.474639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30755,-99) , +0, 12.5, 1, 0, 0.439615,-99) , +2, 9.5, 0, 0, 0.503258,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360911,-99) , +12, 0.129568, 1, 0, 0.441186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.171249,-99) , +4, 1.58763, 1, 0, 0.424958,-99) , +8, -0.896278, 0, 0, 0.494412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285484,-99) , +4, 2.07379, 1, 0, 0.49109,-99) ); + // itree = 925 + fBoostWeights.push_back(0.00473577); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415258,-99) , +14, -4.56086, 0, 0, 0.526931,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482747,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308645,-99) , +6, 0.98753, 1, 0, 0.467005,-99) , +7, 0.0136062, 0, 0, 0.510418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341105,-99) , +12, 0.0182006, 0, 0, 0.505456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320461,-99) , +5, 2.25774, 1, 0, 0.499678,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487905,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242332,-99) , +12, 0.389004, 0, 0, 0.314072,-99) , +4, 0.955124, 1, 0, 0.413875,-99) , +13, 0.0156311, 1, 0, 0.489499,-99) ); + // itree = 926 + fBoostWeights.push_back(0.00660936); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531032,-99) , +14, -2.16967, 1, 0, 0.600318,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533834,-99) , +8, 0.0875664, 0, 0, 0.601887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455405,-99) , +8, 0.954838, 1, 0, 0.568756,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544256,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400485,-99) , +10, -710.573, 1, 0, 0.44308,-99) , +9, -2.46747, 1, 0, 0.470335,-99) , +7, 0.0176377, 1, 0, 0.518602,-99) , +2, 24.5, 0, 0, 0.540222,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624386,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364296,-99) , +1, 7.5, 0, 0, 0.48586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328684,-99) , +1, 33.5, 1, 0, 0.476796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110624,-99) , +4, 1.00973, 1, 0, 0.348277,-99) , +7, 0.0802921, 1, 0, 0.466077,-99) , +9, 8.72875, 0, 0, 0.47579,-99) , +11, 1.5, 0, 0, 0.497121,-99) ); + // itree = 927 + fBoostWeights.push_back(0.00646113); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499235,-99) , +6, 0.246026, 1, 0, 0.52412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194015,-99) , +5, 2.2063, 1, 0, 0.51806,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658036,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535335,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399361,-99) , +5, 1.95267, 0, 0, 0.441643,-99) , +12, 0.367911, 0, 0, 0.47085,-99) , +8, 0.920487, 1, 0, 0.504191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311648,-99) , +2, 6.5, 0, 0, 0.500412,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282041,-99) , +5, 1.51571, 1, 0, 0.455138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285839,-99) , +3, 0.9976, 1, 0, 0.412788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138402,-99) , +4, 1.6835, 1, 0, 0.393935,-99) , +13, 0.0188448, 1, 0, 0.49065,-99) ); + // itree = 928 + fBoostWeights.push_back(0.00447045); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398043,-99) , +15, 1.79721, 1, 0, 0.514852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.40016, 1, 0, 0.511203,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578654,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320784,-99) , +15, 0.123646, 1, 0, 0.380501,-99) , +5, 2.04355, 0, 0, 0.443135,-99) , +8, 0.983849, 1, 0, 0.501928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355936,-99) , +3, 0.999634, 1, 0, 0.498004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310631,-99) , +2, 6.5, 0, 0, 0.494594,-99) ); + // itree = 929 + fBoostWeights.push_back(0.00479506); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387339,-99) , +14, -4.99075, 0, 0, 0.536871,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454176,-99) , +4, 0.737171, 1, 0, 0.475096,-99) , +16, 694.883, 1, 0, 0.501617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277837,-99) , +7, 0.00711447, 0, 0, 0.497126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315991,-99) , +5, 0.483291, 0, 0, 0.489365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160581,-99) , +5, 2.38457, 1, 0, 0.485003,-99) ); + // itree = 930 + fBoostWeights.push_back(0.006577); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.72369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577522,-99) , +5, 1.74801, 0, 0, 0.624923,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53891,-99) , +4, 1.36168, 0, 0, 0.57935,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39111,-99) , +7, 0.0237894, 0, 0, 0.465451,-99) , +16, 272.001, 1, 0, 0.525976,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110772,-99) , +4, 1.98716, 1, 0, 0.514788,-99) , +11, 0.5, 1, 0, 0.551267,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485341,-99) , +15, 0.206622, 0, 0, 0.558458,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433548,-99) , +13, 0.00264297, 0, 0, 0.474227,-99) , +15, 0.456824, 1, 0, 0.519089,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431858,-99) , +12, 0.17492, 0, 0, 0.527365,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363502,-99) , +8, -0.483489, 0, 0, 0.440034,-99) , +16, 113.481, 1, 0, 0.462081,-99) , +12, 0.111611, 1, 0, 0.488499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286664,-99) , +4, 1.99479, 1, 0, 0.483653,-99) , +10, -249.556, 1, 0, 0.50059,-99) ); + // itree = 931 + fBoostWeights.push_back(0.00535214); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627082,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469885,-99) , +6, 0.573121, 1, 0, 0.529344,-99) , +10, -2972.39, 1, 0, 0.544959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414738,-99) , +7, 0.108959, 1, 0, 0.536131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400332,-99) , +8, -0.945565, 0, 0, 0.525553,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569531,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404019,-99) , +4, -0.151087, 0, 0, 0.511314,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440431,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0247549,-99) , +7, 0.155683, 1, 0, 0.434722,-99) , +4, 0.783542, 1, 0, 0.46123,-99) , +10, -6296.2, 1, 0, 0.470228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29826,-99) , +5, 2.13249, 1, 0, 0.461091,-99) , +16, 262.038, 1, 0, 0.482714,-99) ); + // itree = 932 + fBoostWeights.push_back(0.00641675); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670042,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653741,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518287,-99) , +10, 8374.11, 0, 0, 0.541374,-99) , +6, 0.186777, 1, 0, 0.571504,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63223,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490842,-99) , +12, 0.437011, 0, 0, 0.500039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150274,-99) , +7, 0.0522105, 1, 0, 0.49201,-99) , +2, 24.5, 0, 0, 0.510785,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414296,-99) , +9, -6.41525, 1, 0, 0.46617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188545,-99) , +5, 2.06228, 1, 0, 0.45073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10253,-99) , +7, 0.129843, 1, 0, 0.429327,-99) , +3, 0.998035, 1, 0, 0.499156,-99) , +10, -14810, 1, 0, 0.504701,-99) ); + // itree = 933 + fBoostWeights.push_back(0.00469937); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672335,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526133,-99) , +12, 0.0588267, 1, 0, 0.54641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398965,-99) , +14, -4.52442, 0, 0, 0.531722,-99) , +5, 2.22265, 0, 0, 0.543423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401367,-99) , +8, -0.92633, 0, 0, 0.531771,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267177,-99) , +1, 5.5, 0, 0, 0.489751,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122161,-99) , +7, 0.246759, 1, 0, 0.487059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225832,-99) , +1, 74.5, 1, 0, 0.481665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307095,-99) , +3, 0.789411, 0, 0, 0.473236,-99) , +11, 1.5, 0, 0, 0.49346,-99) ); + // itree = 934 + fBoostWeights.push_back(0.0073338); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639063,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374036,-99) , +5, 1.79634, 1, 0, 0.546218,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41124,-99) , +15, 0.380102, 1, 0, 0.466992,-99) , +14, -3.32526, 0, 0, 0.51847,-99) , +4, 1.80788, 0, 0, 0.531139,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517249,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439374,-99) , +8, -0.407167, 0, 0, 0.497204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303739,-99) , +7, 0.105872, 1, 0, 0.488626,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597562,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221068,-99) , +16, 485.866, 1, 0, 0.310443,-99) , +10, 9617.38, 0, 0, 0.364726,-99) , +5, 1.92663, 1, 0, 0.46884,-99) , +12, 0.101688, 1, 0, 0.496039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24402,-99) , +3, 0.999624, 1, 0, 0.490117,-99) ); + // itree = 935 + fBoostWeights.push_back(0.00618638); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461792,-99) , +8, 0.974418, 1, 0, 0.524708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312432,-99) , +2, 6.5, 0, 0, 0.520279,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409369,-99) , +10, 1507.14, 1, 0, 0.444717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.137525,-99) , +4, 1.75371, 1, 0, 0.436129,-99) , +8, -0.897326, 0, 0, 0.510737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.413448,-99) , +3, 0.997771, 1, 0, 0.525872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303974,-99) , +2, 36.5, 0, 0, 0.482547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0629367,-99) , +1, 14.5, 0, 0, 0.43462,-99) , +7, 0.0587747, 1, 0, 0.499737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21058,-99) , +5, 2.45779, 1, 0, 0.497094,-99) ); + // itree = 936 + fBoostWeights.push_back(0.00396748); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.681658,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165459,-99) , +7, 0.108122, 1, 0, 0.499723,-99) , +2, 52.5, 0, 0, 0.507263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363585,-99) , +1, 53.5, 1, 0, 0.50099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266567,-99) , +15, 4.47824, 1, 0, 0.497291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.56475, 1, 0, 0.49527,-99) ); + // itree = 937 + fBoostWeights.push_back(0.00407248); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50934,-99) , +6, 0.74389, 1, 0, 0.572473,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472257,-99) , +4, 0.903352, 1, 0, 0.494017,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330367,-99) , +3, 0.999575, 1, 0, 0.48966,-99) , +9, -6.53822, 1, 0, 0.497363,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27028,-99) , +2, 6.5, 0, 0, 0.493139,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174483,-99) , +14, -3.31418, 1, 0, 0.357755,-99) , +4, 1.8399, 1, 0, 0.485678,-99) ); + // itree = 938 + fBoostWeights.push_back(0.00592262); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658141,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372481,-99) , +15, 0.0410647, 0, 0, 0.515399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39369,-99) , +15, 0.141689, 1, 0, 0.435364,-99) , +8, 0.915036, 1, 0, 0.496983,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392084,-99) , +7, 0.0138287, 0, 0, 0.495894,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259078,-99) , +14, -3.07241, 1, 0, 0.424762,-99) , +5, 1.93573, 1, 0, 0.486466,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157651,-99) , +3, 0.998037, 1, 0, 0.373555,-99) , +13, 0.0252675, 1, 0, 0.479777,-99) , +12, 0.539953, 0, 0, 0.485857,-99) ); + // itree = 939 + fBoostWeights.push_back(0.00342608); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488349,-99) , +10, 5210.56, 0, 0, 0.502764,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17194,-99) , +7, 0.0300902, 1, 0, 0.451782,-99) , +1, 9.5, 0, 0, 0.492692,-99) , +10, -12095.8, 1, 0, 0.496642,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312443,-99) , +12, 0.129949, 1, 0, 0.421318,-99) , +3, 0.999068, 1, 0, 0.490732,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285224,-99) , +2, 6.5, 0, 0, 0.486883,-99) ); + // itree = 940 + fBoostWeights.push_back(0.00535713); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616614,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237352,-99) , +0, 55.5, 1, 0, 0.502593,-99) , +2, 42.5, 0, 0, 0.513203,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148062,-99) , +5, 2.08839, 1, 0, 0.542283,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33867,-99) , +9, -3.94169, 1, 0, 0.409988,-99) , +9, 4.76371, 0, 0, 0.455846,-99) , +3, 0.996215, 1, 0, 0.49834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.182869,-99) , +7, 0.25096, 1, 0, 0.495638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281869,-99) , +2, 6.5, 0, 0, 0.491322,-99) ); + // itree = 941 + fBoostWeights.push_back(0.00321957); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651859,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543825,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491308,-99) , +2, 18.5, 0, 0, 0.510438,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280104,-99) , +3, 0.989748, 1, 0, 0.412788,-99) , +12, 0.0265438, 0, 0, 0.504025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161972,-99) , +13, 0.0778749, 1, 0, 0.501053,-99) , +12, 0.537642, 0, 0, 0.505975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154304,-99) , +5, 2.59392, 1, 0, 0.504646,-99) ); + // itree = 942 + fBoostWeights.push_back(0.00650361); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606577,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627451,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395173,-99) , +4, 1.77213, 1, 0, 0.508365,-99) , +9, -7.61528, 1, 0, 0.517556,-99) , +0, 10.5, 1, 0, 0.527953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356472,-99) , +15, 2.61245, 1, 0, 0.519053,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512066,-99) , +1, 10.5, 0, 0, 0.581979,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382358,-99) , +8, 0.642713, 1, 0, 0.484966,-99) , +11, 0.5, 1, 0, 0.545162,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337848,-99) , +12, 0.0227741, 0, 0, 0.417151,-99) , +12, 0.0368721, 0, 0, 0.515384,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459675,-99) , +15, 0.0521735, 1, 0, 0.479756,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0805095,-99) , +5, 2.15746, 1, 0, 0.350988,-99) , +7, 0.0130063, 0, 0, 0.442736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28076,-99) , +7, 0.053183, 1, 0, 0.423834,-99) , +12, 0.113376, 1, 0, 0.46423,-99) , +16, 1042.58, 1, 0, 0.489682,-99) ); + // itree = 943 + fBoostWeights.push_back(0.00808047); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670508,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527577,-99) , +3, 0.938999, 1, 0, 0.549919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410661,-99) , +8, 0.980733, 1, 0, 0.53557,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561223,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399176,-99) , +6, 0.976383, 0, 0, 0.44382,-99) , +9, 4.90688, 0, 0, 0.463382,-99) , +6, 0.61412, 1, 0, 0.502811,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367992,-99) , +1, 9.5, 0, 0, 0.519193,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396989,-99) , +10, -3076.68, 1, 0, 0.416846,-99) , +16, 527.139, 1, 0, 0.459989,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281599,-99) , +15, 0.102377, 0, 0, 0.412206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164284,-99) , +5, 1.89061, 1, 0, 0.331941,-99) , +13, 0.00325118, 1, 0, 0.427368,-99) , +5, 1.6491, 1, 0, 0.475487,-99) , +12, 0.534864, 0, 0, 0.481754,-99) ); + // itree = 944 + fBoostWeights.push_back(0.00608894); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514358,-99) , +5, 0.833537, 0, 0, 0.581868,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274226,-99) , +13, 0.0131215, 1, 0, 0.486113,-99) , +5, 1.39138, 1, 0, 0.541054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.139453,-99) , +1, 9.5, 0, 0, 0.527861,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454493,-99) , +6, 0.532254, 1, 0, 0.482041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282245,-99) , +5, 2.32316, 1, 0, 0.477348,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140971,-99) , +7, 0.0510567, 1, 0, 0.469997,-99) , +2, 22.5, 0, 0, 0.486004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301937,-99) , +15, 4.38232, 1, 0, 0.483439,-99) ); + // itree = 945 + fBoostWeights.push_back(0.00482223); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518304,-99) , +6, 0.811088, 1, 0, 0.591067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539329,-99) , +13, 0.00400562, 1, 0, 0.587499,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307194,-99) , +15, 0.0351609, 0, 0, 0.492278,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469828,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.138934,-99) , +5, 1.35019, 1, 0, 0.360245,-99) , +13, 0.0186871, 1, 0, 0.482157,-99) , +12, 0.386907, 0, 0, 0.49083,-99) , +9, -7.24913, 1, 0, 0.498869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322763,-99) , +4, 1.99479, 1, 0, 0.494332,-99) ); + // itree = 946 + fBoostWeights.push_back(0.00675594); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666059,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483541,-99) , +11, 1.5, 0, 0, 0.546495,-99) , +12, 0.0596471, 1, 0, 0.584694,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562889,-99) , +3, 0.979715, 0, 0, 0.600576,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405367,-99) , +8, 0.924263, 1, 0, 0.503776,-99) , +12, 0.202057, 0, 0, 0.530062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390454,-99) , +3, 0.998129, 1, 0, 0.509447,-99) , +16, 133.107, 0, 0, 0.533657,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492012,-99) , +13, 0.0181362, 1, 0, 0.572704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447441,-99) , +8, -0.915511, 0, 0, 0.544968,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415619,-99) , +7, 0.0430786, 1, 0, 0.483172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367489,-99) , +2, 10.5, 0, 0, 0.458788,-99) , +8, 0.434813, 1, 0, 0.510814,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44442,-99) , +3, 0.976684, 1, 0, 0.477438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331374,-99) , +3, 0.940161, 0, 0, 0.445245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0503803,-99) , +7, 0.113066, 1, 0, 0.436275,-99) , +5, 1.65314, 1, 0, 0.483884,-99) , +16, 527.72, 1, 0, 0.503793,-99) ); + // itree = 947 + fBoostWeights.push_back(0.00564828); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660834,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427383,-99) , +7, 0.0144369, 0, 0, 0.516298,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468983,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0997236,-99) , +13, 0.0229768, 1, 0, 0.457565,-99) , +5, 1.4799, 1, 0, 0.486094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237477,-99) , +3, 0.999716, 1, 0, 0.481776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.103467,-99) , +5, 2.48278, 1, 0, 0.479043,-99) , +12, 0.526853, 0, 0, 0.485991,-99) ); + // itree = 948 + fBoostWeights.push_back(0.0064123); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675826,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510835,-99) , +5, 1.65355, 0, 0, 0.550002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.222007,-99) , +5, 2.05226, 1, 0, 0.532008,-99) , +1, 14.5, 0, 0, 0.584423,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652657,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467508,-99) , +6, 0.589991, 1, 0, 0.498905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384748,-99) , +14, -4.65025, 0, 0, 0.491463,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632888,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40354,-99) , +6, 0.354882, 0, 0, 0.52891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198488,-99) , +8, 0.908296, 0, 0, 0.409464,-99) , +5, 1.99464, 1, 0, 0.482233,-99) , +12, 0.520728, 0, 0, 0.488757,-99) , +10, -4431.99, 1, 0, 0.500396,-99) ); + // itree = 949 + fBoostWeights.push_back(0.00586965); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.695597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563367,-99) , +4, 1.49382, 0, 0, 0.61524,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440727,-99) , +8, 0.977814, 1, 0, 0.516188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314632,-99) , +5, 2.24263, 1, 0, 0.510247,-99) , +15, 0.0645816, 1, 0, 0.519877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294417,-99) , +3, 0.999686, 1, 0, 0.51439,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595489,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39371,-99) , +5, 1.92194, 0, 0, 0.449048,-99) , +0, 11.5, 1, 0, 0.519245,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411055,-99) , +3, 0.96257, 1, 0, 0.443586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.113114,-99) , +5, 2.21073, 1, 0, 0.434654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.197495,-99) , +3, 0.912066, 0, 0, 0.40604,-99) , +6, 0.314852, 1, 0, 0.452867,-99) , +7, 0.0138054, 0, 0, 0.498898,-99) ); + // itree = 950 + fBoostWeights.push_back(0.00395961); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439623,-99) , +13, 0.00158128, 1, 0, 0.60737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389473,-99) , +7, 0.00869173, 0, 0, 0.507234,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337556,-99) , +8, 0.998845, 0, 0, 0.392377,-99) , +14, -4.57871, 0, 0, 0.498391,-99) , +4, 1.80646, 0, 0, 0.505136,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281052,-99) , +7, 0.0305632, 1, 0, 0.394394,-99) , +3, 0.999224, 1, 0, 0.497945,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358708,-99) , +5, 2.17267, 1, 0, 0.491562,-99) ); + // itree = 951 + fBoostWeights.push_back(0.00317955); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611201,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490833,-99) , +12, 0.101688, 1, 0, 0.51498,-99) , +9, 5.63099, 0, 0, 0.524597,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369357,-99) , +8, -0.896593, 0, 0, 0.489465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306634,-99) , +3, 0.866863, 0, 0, 0.478467,-99) , +6, 0.767359, 1, 0, 0.51018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361552,-99) , +3, 0.999624, 1, 0, 0.506316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269718,-99) , +2, 6.5, 0, 0, 0.502061,-99) ); + // itree = 952 + fBoostWeights.push_back(0.00680309); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.685282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539854,-99) , +10, 2395.49, 0, 0, 0.633593,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586448,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416748,-99) , +2, 12.5, 0, 0, 0.498999,-99) , +9, 0.396848, 0, 0, 0.538511,-99) , +4, 1.51026, 0, 0, 0.561067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569166,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391099,-99) , +9, -4.03425, 1, 0, 0.456761,-99) , +9, 3.28786, 0, 0, 0.502156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.148535,-99) , +4, 2.0754, 1, 0, 0.494822,-99) , +3, 0.989765, 1, 0, 0.531576,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511319,-99) , +10, 7346.01, 0, 0, 0.52986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403134,-99) , +8, -0.969631, 0, 0, 0.515589,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452497,-99) , +8, 0.991414, 0, 0, 0.493965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361831,-99) , +10, 4958.01, 1, 0, 0.454138,-99) , +8, 0.718471, 1, 0, 0.495165,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538778,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172369,-99) , +8, -0.809799, 0, 0, 0.393478,-99) , +15, 0.22832, 0, 0, 0.439948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264136,-99) , +0, 35.5, 1, 0, 0.4149,-99) , +4, 1.38322, 1, 0, 0.472331,-99) , +16, 506.854, 1, 0, 0.495649,-99) ); + // itree = 953 + fBoostWeights.push_back(0.00722068); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640735,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563748,-99) , +2, 29.5, 0, 0, 0.587774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479153,-99) , +7, 0.0149195, 0, 0, 0.564742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442381,-99) , +5, 0.567326, 0, 0, 0.548717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371822,-99) , +12, 0.032964, 0, 0, 0.532441,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510511,-99) , +13, 0.000309058, 1, 0, 0.550506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423362,-99) , +14, -4.30727, 0, 0, 0.530615,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385964,-99) , +8, -0.561839, 0, 0, 0.500364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568759,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385683,-99) , +2, 27.5, 0, 0, 0.407283,-99) , +11, 0.5, 1, 0, 0.453322,-99) , +16, 272.928, 1, 0, 0.478969,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242679,-99) , +7, 0.0888474, 1, 0, 0.468654,-99) , +5, 1.37387, 1, 0, 0.493083,-99) ); + // itree = 954 + fBoostWeights.push_back(0.00651058); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5129,-99) , +10, 517.088, 1, 0, 0.529325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22956,-99) , +4, 2.06953, 1, 0, 0.527456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373327,-99) , +5, 2.2428, 1, 0, 0.522042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205882,-99) , +6, 0.34756, 1, 0, 0.324954,-99) , +16, 1183.92, 1, 0, 0.424747,-99) , +3, 0.889538, 0, 0, 0.510542,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549122,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300033,-99) , +3, 0.983659, 0, 0, 0.437575,-99) , +4, 0.780098, 1, 0, 0.489574,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.1383,-99) , +5, 2.01357, 1, 0, 0.473972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204775,-99) , +3, 0.997855, 1, 0, 0.423023,-99) , +13, 0.0139742, 1, 0, 0.498917,-99) ); + // itree = 955 + fBoostWeights.push_back(0.00428744); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646614,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598154,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454167,-99) , +13, 0.00217573, 0, 0, 0.531371,-99) , +4, 1.58506, 0, 0, 0.562813,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473936,-99) , +12, 0.100786, 1, 0, 0.496707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344595,-99) , +12, 0.0181796, 0, 0, 0.492463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279249,-99) , +5, 2.49125, 1, 0, 0.490468,-99) , +9, -4.13737, 1, 0, 0.503152,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498819,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294621,-99) , +12, 0.250415, 0, 0, 0.366603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144984,-99) , +4, 1.45381, 1, 0, 0.33669,-99) , +16, 291.55, 1, 0, 0.394557,-99) , +13, 0.0166254, 1, 0, 0.491902,-99) ); + // itree = 956 + fBoostWeights.push_back(0.00578048); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644666,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596315,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432248,-99) , +7, 0.0275196, 1, 0, 0.502022,-99) , +2, 27.5, 0, 0, 0.52762,-99) , +4, 0.280881, 1, 0, 0.551269,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543527,-99) , +16, 20.4596, 1, 0, 0.583097,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453015,-99) , +3, 0.964519, 1, 0, 0.489717,-99) , +4, 1.41567, 0, 0, 0.533335,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251134,-99) , +1, 6.5, 0, 0, 0.458943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.43528, 1, 0, 0.45417,-99) , +11, 1.5, 0, 0, 0.48227,-99) , +5, 1.37866, 1, 0, 0.507418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361137,-99) , +5, 0.422278, 0, 0, 0.501299,-99) ); + // itree = 957 + fBoostWeights.push_back(0.00607427); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59396,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534802,-99) , +5, 2.07784, 0, 0, 0.558733,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360113,-99) , +8, 0.046448, 0, 0, 0.474533,-99) , +11, 1.5, 0, 0, 0.521242,-99) , +4, 0.705327, 1, 0, 0.540671,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614368,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491447,-99) , +15, 0.262949, 1, 0, 0.544534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454824,-99) , +7, 0.0162586, 0, 0, 0.522075,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537565,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455124,-99) , +6, 0.635052, 0, 0, 0.485487,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350443,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0883674,-99) , +4, 1.75734, 1, 0, 0.326338,-99) , +13, 0.0059938, 1, 0, 0.457377,-99) , +5, 1.38585, 1, 0, 0.482278,-99) , +16, 487.115, 1, 0, 0.504691,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397362,-99) , +15, 0.17665, 0, 0, 0.459039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329719,-99) , +3, 0.99652, 1, 0, 0.431521,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.12462, 1, 0, 0.420899,-99) , +8, -0.882629, 0, 0, 0.495168,-99) ); + // itree = 958 + fBoostWeights.push_back(0.00309981); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428771,-99) , +1, 7.5, 0, 0, 0.507795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386804,-99) , +8, -0.984885, 0, 0, 0.502601,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244178,-99) , +2, 57.5, 0, 0, 0.384173,-99) , +1, 50.5, 1, 0, 0.496331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340799,-99) , +4, 1.97635, 1, 0, 0.491922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154386,-99) , +7, 0.253137, 1, 0, 0.48947,-99) ); + // itree = 959 + fBoostWeights.push_back(0.00618513); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545767,-99) , +0, 15.5, 0, 0, 0.60849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480969,-99) , +13, 0.0144391, 1, 0, 0.583768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461215,-99) , +6, 0.581003, 1, 0, 0.554119,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527551,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394885,-99) , +5, 1.32654, 1, 0, 0.45762,-99) , +8, 0.912556, 1, 0, 0.533316,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486893,-99) , +6, 1.01135, 0, 0, 0.498797,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25113,-99) , +0, 20.5, 1, 0, 0.361714,-99) , +3, 0.88944, 0, 0, 0.48504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335243,-99) , +7, 0.0090227, 0, 0, 0.473618,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.205995,-99) , +7, 0.136897, 1, 0, 0.467742,-99) , +4, 0.917753, 1, 0, 0.493124,-99) ); + // itree = 960 + fBoostWeights.push_back(0.0037758); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464139,-99) , +13, 0.00283327, 0, 0, 0.581305,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448323,-99) , +8, -0.66313, 0, 0, 0.501069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342092,-99) , +7, 0.0559281, 1, 0, 0.493343,-99) , +2, 38.5, 0, 0, 0.502169,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301168,-99) , +1, 69.5, 1, 0, 0.498272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275452,-99) , +7, 0.172989, 1, 0, 0.494028,-99) ); + // itree = 961 + fBoostWeights.push_back(0.00668775); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.649405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544311,-99) , +8, 0.123659, 1, 0, 0.594021,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423562,-99) , +3, 0.985373, 1, 0, 0.498222,-99) , +8, -0.578671, 0, 0, 0.555812,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373886,-99) , +15, 0.294373, 1, 0, 0.459345,-99) , +13, 0.00168638, 0, 0, 0.523152,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322278,-99) , +4, 2.07555, 1, 0, 0.489134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290981,-99) , +12, 0.0198393, 0, 0, 0.482695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254946,-99) , +7, 0.0069475, 0, 0, 0.477642,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273326,-99) , +8, -0.635347, 1, 0, 0.393545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.154343,-99) , +5, 1.7988, 1, 0, 0.346037,-99) , +13, 0.0115952, 1, 0, 0.461162,-99) , +4, 0.913059, 1, 0, 0.485579,-99) ); + // itree = 962 + fBoostWeights.push_back(0.00654658); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541658,-99) , +15, 1.50049, 0, 0, 0.554558,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460418,-99) , +3, 0.995786, 0, 0, 0.49053,-99) , +6, 0.85028, 1, 0, 0.537144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356436,-99) , +2, 8.5, 0, 0, 0.531156,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426555,-99) , +9, 4.74761, 0, 0, 0.473601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156513,-99) , +5, 2.08409, 1, 0, 0.460851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.085931,-99) , +7, 0.19082, 1, 0, 0.445338,-99) , +3, 0.997677, 1, 0, 0.51476,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58955,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530258,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410893,-99) , +14, -3.32971, 0, 0, 0.479137,-99) , +15, 0.0377613, 1, 0, 0.498588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286898,-99) , +0, 12.5, 1, 0, 0.376303,-99) , +13, 0.00347859, 1, 0, 0.469628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318487,-99) , +5, 2.02275, 1, 0, 0.452677,-99) , +7, 0.0147799, 0, 0, 0.497151,-99) ); + // itree = 963 + fBoostWeights.push_back(0.00690056); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63164,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488616,-99) , +4, 0.795972, 0, 0, 0.520763,-99) , +3, 0.945974, 1, 0, 0.549499,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453737,-99) , +2, 18.5, 0, 0, 0.505421,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357318,-99) , +4, 1.16609, 0, 0, 0.416959,-99) , +13, 0.00235918, 0, 0, 0.472444,-99) , +6, 0.608914, 1, 0, 0.513723,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587203,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28938,-99) , +7, 0.0266846, 1, 0, 0.440106,-99) , +1, 26.5, 0, 0, 0.459083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142169,-99) , +1, 60.5, 1, 0, 0.451348,-99) , +5, 1.65155, 1, 0, 0.490813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24403,-99) , +2, 6.5, 0, 0, 0.486598,-99) ); + // itree = 964 + fBoostWeights.push_back(0.0061558); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545526,-99) , +12, 0.171776, 1, 0, 0.628236,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496822,-99) , +13, 0.00120827, 0, 0, 0.585362,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161083,-99) , +5, 2.08558, 1, 0, 0.570505,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524976,-99) , +16, 3613.87, 1, 0, 0.592157,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343971,-99) , +1, 34.5, 1, 0, 0.494561,-99) , +2, 44.5, 0, 0, 0.503694,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432473,-99) , +3, 0.998739, 0, 0, 0.5064,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333173,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0895669,-99) , +13, 0.019553, 1, 0, 0.296713,-99) , +9, -5.1608, 1, 0, 0.403347,-99) , +3, 0.997629, 1, 0, 0.48964,-99) , +9, 5.79329, 0, 0, 0.49911,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149318,-99) , +5, 2.49133, 1, 0, 0.49666,-99) ); + // itree = 965 + fBoostWeights.push_back(0.00820759); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370973,-99) , +8, -0.98298, 0, 0, 0.541473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0708515,-99) , +4, 1.84728, 1, 0, 0.537347,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623921,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302347,-99) , +6, 0.332737, 0, 0, 0.378216,-99) , +5, 2.08756, 0, 0, 0.44,-99) , +8, 0.97921, 1, 0, 0.520342,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402278,-99) , +12, 0.0489259, 0, 0, 0.497296,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100249,-99) , +7, 0.205497, 1, 0, 0.488771,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431947,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.218856,-99) , +4, 1.44686, 1, 0, 0.356998,-99) , +3, 0.969266, 0, 0, 0.457674,-99) , +6, 0.672029, 1, 0, 0.497198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0969559,-99) , +5, 2.47708, 1, 0, 0.494078,-99) ); + // itree = 966 + fBoostWeights.push_back(0.00519717); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.669526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553441,-99) , +16, 1614.08, 1, 0, 0.619647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492235,-99) , +1, 12.5, 0, 0, 0.575791,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52009,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419922,-99) , +3, 0.889117, 0, 0, 0.509051,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198257,-99) , +2, 15.5, 0, 0, 0.456631,-99) , +7, 0.0282928, 1, 0, 0.489761,-99) , +6, 0.0979775, 1, 0, 0.501661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290571,-99) , +14, -5.69147, 0, 0, 0.496898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334303,-99) , +5, 2.25696, 1, 0, 0.492051,-99) ); + // itree = 967 + fBoostWeights.push_back(0.00527781); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410684,-99) , +7, 0.0215018, 0, 0, 0.537308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366248,-99) , +1, 63.5, 1, 0, 0.524426,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44856,-99) , +16, 2483.93, 1, 0, 0.483076,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0964549,-99) , +2, 11.5, 0, 0, 0.328805,-99) , +7, 0.0268626, 1, 0, 0.466552,-99) , +2, 17.5, 0, 0, 0.490196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297414,-99) , +12, 0.016565, 0, 0, 0.486326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123639,-99) , +7, 0.32389, 1, 0, 0.484897,-99) ); + // itree = 968 + fBoostWeights.push_back(0.00555097); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566633,-99) , +7, 0.0503713, 0, 0, 0.625174,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455875,-99) , +10, 3231.53, 1, 0, 0.516459,-99) , +1, 30.5, 1, 0, 0.5789,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366893,-99) , +0, 29.5, 1, 0, 0.513304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195504,-99) , +4, 2.23919, 1, 0, 0.511631,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2181,-99) , +2, 15.5, 0, 0, 0.389848,-99) , +7, 0.0358014, 1, 0, 0.501135,-99) , +2, 26.5, 0, 0, 0.514508,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50059,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352135,-99) , +3, 0.995665, 1, 0, 0.453267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0759349,-99) , +1, 17.5, 0, 0, 0.396792,-99) , +7, 0.0866128, 1, 0, 0.505333,-99) ); + // itree = 969 + fBoostWeights.push_back(0.00502992); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.689651,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544333,-99) , +12, 0.164796, 0, 0, 0.621935,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300991,-99) , +7, 0.107757, 1, 0, 0.547845,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5236,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442744,-99) , +9, -1.21583, 1, 0, 0.486948,-99) , +10, 845.625, 1, 0, 0.506416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293086,-99) , +5, 2.14761, 1, 0, 0.498346,-99) , +8, 0.993313, 0, 0, 0.508242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356827,-99) , +14, -5.44644, 0, 0, 0.502755,-99) ); + // itree = 970 + fBoostWeights.push_back(0.0049171); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552902,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483988,-99) , +8, 0.919516, 1, 0, 0.531958,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411304,-99) , +11, 1.5, 0, 0, 0.460374,-99) , +6, 0.915621, 1, 0, 0.516555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378042,-99) , +8, -0.983971, 0, 0, 0.51052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370537,-99) , +3, 0.759303, 0, 0, 0.504607,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291478,-99) , +4, 1.32488, 1, 0, 0.428606,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142904,-99) , +13, 0.0138977, 1, 0, 0.380292,-99) , +3, 0.999128, 1, 0, 0.49578,-99) ); + // itree = 971 + fBoostWeights.push_back(0.00428946); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571039,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447117,-99) , +5, 0.555434, 0, 0, 0.554617,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203363,-99) , +7, 0.246898, 1, 0, 0.502442,-99) , +4, 0.902138, 1, 0, 0.522996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385575,-99) , +14, -5.31569, 0, 0, 0.518209,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384406,-99) , +8, -0.984913, 0, 0, 0.512342,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151013,-99) , +8, 0.954571, 0, 0, 0.375883,-99) , +5, 2.15977, 1, 0, 0.505236,-99) ); + // itree = 972 + fBoostWeights.push_back(0.00621299); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.715495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559598,-99) , +4, 1.73227, 0, 0, 0.574836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291038,-99) , +1, 12.5, 0, 0, 0.558866,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304827,-99) , +5, 2.23566, 1, 0, 0.501056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168662,-99) , +7, 0.0502075, 1, 0, 0.49183,-99) , +2, 24.5, 0, 0, 0.510544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348674,-99) , +3, 0.999624, 1, 0, 0.506063,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238113,-99) , +15, 0.0470408, 0, 0, 0.3777,-99) , +7, 0.00920928, 0, 0, 0.497218,-99) ); + // itree = 973 + fBoostWeights.push_back(0.00474606); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641732,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489861,-99) , +6, 0.313094, 1, 0, 0.50925,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0736969,-99) , +4, 1.51228, 1, 0, 0.425253,-99) , +13, 0.0142132, 1, 0, 0.498811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296877,-99) , +15, 4.10052, 1, 0, 0.495242,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264082,-99) , +1, 11.5, 1, 0, 0.401246,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0769163,-99) , +4, 1.76911, 1, 0, 0.377514,-99) , +15, 0.0468629, 0, 0, 0.486123,-99) , +12, 0.513942, 0, 0, 0.491832,-99) ); + // itree = 974 + fBoostWeights.push_back(0.00574617); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552647,-99) , +9, 2.42616, 0, 0, 0.581707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469582,-99) , +14, -3.0911, 0, 0, 0.555612,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522179,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373453,-99) , +9, -1.64979, 1, 0, 0.431986,-99) , +10, 1653.23, 1, 0, 0.46928,-99) , +0, 15.5, 0, 0, 0.526568,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490785,-99) , +9, -3.15769, 1, 0, 0.522264,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407262,-99) , +16, 416.954, 1, 0, 0.440292,-99) , +12, 0.0790012, 1, 0, 0.465453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272425,-99) , +15, 1.91539, 1, 0, 0.457572,-99) , +4, 0.988162, 1, 0, 0.48628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358554,-99) , +5, 0.506585, 0, 0, 0.480698,-99) ); + // itree = 975 + fBoostWeights.push_back(0.00537322); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534985,-99) , +16, 33.6729, 0, 0, 0.56144,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486098,-99) , +0, 30.5, 0, 0, 0.497259,-99) , +16, 71.7883, 1, 0, 0.512047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325737,-99) , +0, 54.5, 1, 0, 0.507997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216252,-99) , +5, 2.49352, 1, 0, 0.505823,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557134,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467426,-99) , +0, 65.5, 0, 0, 0.523156,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308454,-99) , +1, 87.5, 1, 0, 0.490079,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15483,-99) , +1, 20.5, 0, 0, 0.423645,-99) , +7, 0.0652397, 1, 0, 0.495194,-99) ); + // itree = 976 + fBoostWeights.push_back(0.00782159); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.709481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572399,-99) , +5, 1.73367, 0, 0, 0.616298,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538902,-99) , +13, 0.00737397, 0, 0, 0.597469,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445687,-99) , +6, 0.938286, 1, 0, 0.561481,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373297,-99) , +5, 1.93223, 0, 0, 0.430658,-99) , +8, 0.680512, 1, 0, 0.507419,-99) , +11, 0.5, 1, 0, 0.541098,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476823,-99) , +8, -0.145145, 0, 0, 0.541286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374718,-99) , +12, 0.0285894, 0, 0, 0.530414,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509086,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355481,-99) , +3, 0.990653, 0, 0, 0.446417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0828012,-99) , +7, 0.0443506, 1, 0, 0.43205,-99) , +1, 10.5, 0, 0, 0.502581,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36854,-99) , +13, 0.0102343, 1, 0, 0.459493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297797,-99) , +9, 0.122648, 0, 0, 0.444252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22704,-99) , +5, 2.11894, 1, 0, 0.431171,-99) , +9, -0.0625173, 1, 0, 0.477134,-99) , +10, -681.711, 1, 0, 0.491737,-99) ); + // itree = 977 + fBoostWeights.push_back(0.00600482); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56329,-99) , +16, 408.765, 1, 0, 0.595243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400013,-99) , +14, -3.55419, 0, 0, 0.562201,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459758,-99) , +6, 0.67545, 1, 0, 0.548895,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484603,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399877,-99) , +8, -0.837916, 0, 0, 0.473209,-99) , +9, 4.17726, 0, 0, 0.485837,-99) , +4, 0.505692, 1, 0, 0.50008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375266,-99) , +5, 0.428077, 0, 0, 0.494438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240435,-99) , +3, 0.972302, 0, 0, 0.454052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.185584,-99) , +13, 0.000847541, 1, 0, 0.365306,-99) , +4, 1.7664, 1, 0, 0.484463,-99) ); + // itree = 978 + fBoostWeights.push_back(0.00513633); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589798,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244929,-99) , +1, 13.5, 0, 0, 0.571557,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269354,-99) , +7, 0.0497458, 1, 0, 0.489028,-99) , +2, 30.5, 0, 0, 0.501189,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51132,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275272,-99) , +2, 53.5, 0, 0, 0.404135,-99) , +15, 1.71454, 1, 0, 0.495304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340389,-99) , +3, 0.99965, 1, 0, 0.491311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251929,-99) , +7, 0.007377, 0, 0, 0.48651,-99) ); + // itree = 979 + fBoostWeights.push_back(0.00432178); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608036,-99) , +10, 3712.88, 0, 0, 0.640763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509372,-99) , +11, 1.5, 0, 0, 0.588989,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570694,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471063,-99) , +4, 0.733281, 1, 0, 0.520146,-99) , +5, 1.54028, 0, 0, 0.555344,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480328,-99) , +5, 1.49728, 1, 0, 0.50846,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.63625, 1, 0, 0.424519,-99) , +8, -0.845278, 0, 0, 0.497328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301215,-99) , +3, 0.730104, 0, 0, 0.492409,-99) , +16, 67.3609, 1, 0, 0.507299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187242,-99) , +5, 2.48979, 1, 0, 0.504855,-99) ); + // itree = 980 + fBoostWeights.push_back(0.00757155); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50476,-99) , +10, 4265.02, 1, 0, 0.575375,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272719,-99) , +7, 0.0497458, 1, 0, 0.508664,-99) , +2, 30.5, 0, 0, 0.526817,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.100921,-99) , +7, 0.108196, 1, 0, 0.402527,-99) , +3, 0.999139, 1, 0, 0.516184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298,-99) , +12, 0.0195631, 0, 0, 0.510067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500308,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376543,-99) , +0, 14.5, 1, 0, 0.486669,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281482,-99) , +15, 0.0844782, 0, 0, 0.394727,-99) , +8, -0.558505, 0, 0, 0.46572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250075,-99) , +4, 1.89828, 1, 0, 0.45666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13625,-99) , +7, 0.0273527, 1, 0, 0.442219,-99) , +2, 11.5, 0, 0, 0.488775,-99) ); + // itree = 981 + fBoostWeights.push_back(0.00400932); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481334,-99) , +8, 0.934525, 1, 0, 0.532144,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262226,-99) , +3, 0.838599, 0, 0, 0.473988,-99) , +6, 0.678546, 1, 0, 0.510551,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35019,-99) , +8, -0.984585, 0, 0, 0.504838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298409,-99) , +7, 0.00730086, 0, 0, 0.50023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280507,-99) , +3, 0.999638, 1, 0, 0.495085,-99) ); + // itree = 982 + fBoostWeights.push_back(0.00537731); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458212,-99) , +8, 0.862594, 1, 0, 0.495946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330178,-99) , +15, 0.0363229, 0, 0, 0.491685,-99) , +12, 0.387715, 0, 0, 0.499714,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398953,-99) , +9, -2.4547, 1, 0, 0.465882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.143729,-99) , +3, 0.999202, 1, 0, 0.446632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0318626,-99) , +8, -0.258261, 0, 0, 0.400783,-99) , +4, 1.69971, 1, 0, 0.489286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24429,-99) , +2, 6.5, 0, 0, 0.48519,-99) ); + // itree = 983 + fBoostWeights.push_back(0.0049196); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657812,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432019,-99) , +1, 40.5, 1, 0, 0.552327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.121608,-99) , +5, 2.11217, 1, 0, 0.450667,-99) , +7, 0.0128946, 0, 0, 0.527195,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487023,-99) , +2, 65.5, 0, 0, 0.494417,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0404691,-99) , +4, 1.8399, 1, 0, 0.396052,-99) , +16, 2459.04, 1, 0, 0.472568,-99) , +11, 0.5, 1, 0, 0.490316,-99) , +9, 12.2621, 0, 0, 0.494562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302989,-99) , +3, 0.999638, 1, 0, 0.489738,-99) ); + // itree = 984 + fBoostWeights.push_back(0.00764042); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628355,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592001,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41967,-99) , +3, 0.996568, 1, 0, 0.491955,-99) , +10, 7155.19, 0, 0, 0.513731,-99) , +12, 0.0775897, 1, 0, 0.543839,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463694,-99) , +0, 15.5, 0, 0, 0.50578,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.422761,-99) , +5, 1.1919, 0, 0, 0.473156,-99) , +13, 0.00192624, 0, 0, 0.520416,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564816,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286336,-99) , +12, 0.0271506, 0, 0, 0.477578,-99) , +5, 1.73646, 1, 0, 0.498833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376348,-99) , +5, 1.61834, 0, 0, 0.483782,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56961,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250893,-99) , +7, 0.0260672, 1, 0, 0.361696,-99) , +9, 3.46976, 0, 0, 0.406902,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130528,-99) , +4, 1.76063, 1, 0, 0.377334,-99) , +13, 0.00284926, 1, 0, 0.451897,-99) , +5, 1.53007, 1, 0, 0.487338,-99) ); + // itree = 985 + fBoostWeights.push_back(0.00448873); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442883,-99) , +12, 0.0312599, 0, 0, 0.539163,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503233,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409282,-99) , +4, 1.56749, 1, 0, 0.487371,-99) , +12, 0.101366, 1, 0, 0.509325,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54647,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405302,-99) , +9, -6.21401, 1, 0, 0.451785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0764636,-99) , +13, 0.0274417, 1, 0, 0.427201,-99) , +3, 0.998654, 1, 0, 0.499466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303786,-99) , +2, 6.5, 0, 0, 0.495906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300933,-99) , +14, -5.8559, 0, 0, 0.491967,-99) ); + // itree = 986 + fBoostWeights.push_back(0.0036069); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379035,-99) , +8, -0.984939, 0, 0, 0.512657,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312903,-99) , +4, 1.92761, 1, 0, 0.508344,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557518,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5157,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364726,-99) , +5, 1.37586, 1, 0, 0.411814,-99) , +5, 2.08104, 0, 0, 0.442094,-99) , +8, 0.974507, 1, 0, 0.497752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308175,-99) , +3, 0.698342, 0, 0, 0.493958,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248028,-99) , +5, 2.43948, 1, 0, 0.491186,-99) ); + // itree = 987 + fBoostWeights.push_back(0.0047576); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.733492,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606041,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491281,-99) , +8, 0.685207, 1, 0, 0.562827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433698,-99) , +7, 0.0148237, 0, 0, 0.529615,-99) , +4, 1.80813, 0, 0, 0.545341,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384575,-99) , +7, 0.0088761, 0, 0, 0.497252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291534,-99) , +5, 2.22775, 1, 0, 0.492646,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283819,-99) , +6, 0.304627, 1, 0, 0.365225,-99) , +14, -4.66181, 0, 0, 0.483082,-99) , +9, 2.7544, 0, 0, 0.499138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318329,-99) , +4, 1.98895, 1, 0, 0.494086,-99) ); + // itree = 988 + fBoostWeights.push_back(0.00702297); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703099,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629462,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432174,-99) , +8, 0.93236, 1, 0, 0.556781,-99) , +3, 0.995259, 0, 0, 0.611575,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590394,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38823,-99) , +13, 0.000343517, 0, 0, 0.491856,-99) , +3, 0.951411, 1, 0, 0.519906,-99) , +4, 1.43369, 0, 0, 0.548498,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51629,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434169,-99) , +14, -3.33185, 0, 0, 0.499247,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277721,-99) , +14, -2.81166, 1, 0, 0.426935,-99) , +5, 1.79645, 1, 0, 0.482513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0867384,-99) , +4, 2.15909, 1, 0, 0.480161,-99) , +11, 1.5, 0, 0, 0.503086,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +1, 16.5, 0, 0, 0.354271,-99) , +7, 0.10477, 1, 0, 0.495062,-99) ); + // itree = 989 + fBoostWeights.push_back(0.0049234); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634579,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434878,-99) , +13, 0.010969, 1, 0, 0.506289,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363104,-99) , +12, 0.0227741, 0, 0, 0.498186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530626,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.13938,-99) , +4, 1.7195, 1, 0, 0.401739,-99) , +9, 3.29878, 0, 0, 0.432576,-99) , +15, 0.0878651, 0, 0, 0.482854,-99) , +12, 0.513211, 0, 0, 0.488491,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.114064,-99) , +5, 2.48285, 1, 0, 0.485659,-99) ); + // itree = 990 + fBoostWeights.push_back(0.0056842); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560067,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444858,-99) , +15, 1.39331, 1, 0, 0.543469,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357869,-99) , +5, 1.85337, 0, 0, 0.444464,-99) , +14, -4.01594, 0, 0, 0.524706,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470886,-99) , +4, 0.93697, 1, 0, 0.516342,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134409,-99) , +15, 0.359325, 1, 0, 0.433146,-99) , +5, 1.47528, 1, 0, 0.47155,-99) , +12, 0.125932, 1, 0, 0.498883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0951821,-99) , +7, 0.281901, 1, 0, 0.496638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16501,-99) , +5, 2.4485, 1, 0, 0.49361,-99) ); + // itree = 991 + fBoostWeights.push_back(0.00595979); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654833,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515759,-99) , +4, 1.40952, 0, 0, 0.53943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412656,-99) , +10, 2205.42, 1, 0, 0.526775,-99) , +9, 1.1017, 1, 0, 0.546752,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494105,-99) , +9, -5.76502, 1, 0, 0.510147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351162,-99) , +8, -0.964477, 0, 0, 0.500741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314188,-99) , +7, 0.00866381, 0, 0, 0.489696,-99) , +9, 0.563083, 0, 0, 0.515633,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59872,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46345,-99) , +6, 0.90329, 1, 0, 0.502484,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429159,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26662,-99) , +1, 8.5, 0, 0, 0.407529,-99) , +11, 0.5, 1, 0, 0.441858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.188505,-99) , +4, 2.01818, 1, 0, 0.433196,-99) , +9, -10.7848, 1, 0, 0.442804,-99) , +6, 0.742267, 1, 0, 0.49286,-99) ); + // itree = 992 + fBoostWeights.push_back(0.00699114); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535013,-99) , +15, 0.572475, 1, 0, 0.609295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485633,-99) , +12, 0.20052, 1, 0, 0.578075,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38272,-99) , +12, 0.0329921, 0, 0, 0.501727,-99) , +6, 0.0560208, 1, 0, 0.514098,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601597,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46039,-99) , +8, 0.517762, 1, 0, 0.535761,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37327,-99) , +16, 134.653, 1, 0, 0.414043,-99) , +10, -6.19767, 1, 0, 0.444508,-99) , +7, 0.0149197, 0, 0, 0.49312,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375338,-99) , +4, 1.49571, 1, 0, 0.520745,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208105,-99) , +10, 5199.01, 0, 0, 0.309372,-99) , +9, 4.92017, 0, 0, 0.402131,-99) , +3, 0.998043, 1, 0, 0.481039,-99) , +10, 11959.3, 0, 0, 0.490376,-99) ); + // itree = 993 + fBoostWeights.push_back(0.00605744); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.677235,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472344,-99) , +16, 3742.39, 1, 0, 0.5426,-99) , +15, 0.226478, 0, 0, 0.590295,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540256,-99) , +12, 0.0446867, 0, 0, 0.591326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485628,-99) , +14, -2.08109, 1, 0, 0.558962,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504959,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39023,-99) , +0, 13.5, 0, 0, 0.482926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387095,-99) , +5, 1.21976, 0, 0, 0.462506,-99) , +13, 0.0016685, 0, 0, 0.506762,-99) , +15, 0.287002, 1, 0, 0.53233,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217032,-99) , +5, 2.25096, 1, 0, 0.537901,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505535,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418695,-99) , +11, 0.5, 1, 0, 0.46322,-99) , +16, 471.284, 1, 0, 0.490441,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239508,-99) , +15, 0.805984, 1, 0, 0.484722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31268,-99) , +2, 7.5, 0, 0, 0.476155,-99) , +12, 0.101411, 1, 0, 0.500445,-99) ); + // itree = 994 + fBoostWeights.push_back(0.00551978); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510074,-99) , +2, 15.5, 0, 0, 0.598967,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362858,-99) , +3, 0.999368, 1, 0, 0.517803,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39782,-99) , +12, 0.242741, 0, 0, 0.427228,-99) , +8, 0.916518, 1, 0, 0.498877,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48326,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251146,-99) , +1, 8.5, 0, 0, 0.457538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272025,-99) , +8, 0.602402, 0, 0, 0.413038,-99) , +5, 1.88922, 1, 0, 0.483866,-99) , +10, -8351.34, 1, 0, 0.491338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338353,-99) , +8, -0.984575, 0, 0, 0.485364,-99) ); + // itree = 995 + fBoostWeights.push_back(0.00654917); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539613,-99) , +8, -0.508669, 0, 0, 0.595136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492483,-99) , +13, 0.00188187, 0, 0, 0.560986,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621505,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503461,-99) , +13, 0.0003786, 0, 0, 0.580052,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470625,-99) , +2, 8.5, 1, 0, 0.496829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435771,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231489,-99) , +2, 17.5, 0, 0, 0.392281,-99) , +7, 0.0259239, 1, 0, 0.467776,-99) , +10, -633.367, 1, 0, 0.492097,-99) , +5, 1.38936, 1, 0, 0.515382,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569165,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38423,-99) , +15, 0.585328, 1, 0, 0.455347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259159,-99) , +4, 1.9733, 1, 0, 0.446511,-99) , +9, -6.50565, 1, 0, 0.46359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211883,-99) , +3, 0.837811, 0, 0, 0.452302,-99) , +6, 0.663019, 1, 0, 0.491898,-99) ); + // itree = 996 + fBoostWeights.push_back(0.00904295); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.683313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56694,-99) , +7, 0.0600443, 1, 0, 0.627062,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608997,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51654,-99) , +3, 0.946534, 1, 0, 0.536957,-99) , +2, 23.5, 0, 0, 0.564465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429795,-99) , +12, 0.0361075, 0, 0, 0.550349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416449,-99) , +5, 0.506585, 0, 0, 0.535349,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54621,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0646409,-99) , +5, 2.21209, 1, 0, 0.53113,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387483,-99) , +5, 1.80201, 0, 0, 0.459387,-99) , +14, -3.62914, 0, 0, 0.504227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367019,-99) , +3, 0.828887, 0, 0, 0.493986,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349557,-99) , +13, 0.0163224, 1, 0, 0.446191,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183054,-99) , +10, -649.313, 1, 0, 0.273127,-99) , +5, 1.66862, 1, 0, 0.372373,-99) , +14, -2.28081, 1, 0, 0.466065,-99) , +5, 1.38314, 1, 0, 0.494444,-99) ); + // itree = 997 + fBoostWeights.push_back(0.00743369); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539105,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457785,-99) , +8, -0.920915, 0, 0, 0.530984,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393425,-99) , +9, -0.343188, 1, 0, 0.457551,-99) , +3, 0.894546, 0, 0, 0.522752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21484,-99) , +5, 2.49117, 1, 0, 0.520173,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282213,-99) , +9, 0.64194, 0, 0, 0.404068,-99) , +7, 0.00888976, 0, 0, 0.509803,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569907,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466604,-99) , +13, 0.000811436, 0, 0, 0.531186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287616,-99) , +15, 0.883913, 1, 0, 0.424978,-99) , +13, 0.010664, 1, 0, 0.492466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.204782,-99) , +1, 12.5, 0, 0, 0.474951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22655,-99) , +2, 24.5, 0, 0, 0.432204,-99) , +7, 0.0398244, 1, 0, 0.491993,-99) ); + // itree = 998 + fBoostWeights.push_back(0.00554912); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654669,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606534,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514981,-99) , +9, -3.76104, 1, 0, 0.531941,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421854,-99) , +6, 1.0116, 0, 0, 0.46556,-99) , +6, 0.821194, 1, 0, 0.511333,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.432517,-99) , +15, 0.228297, 0, 0, 0.490426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248141,-99) , +13, 0.00316393, 1, 0, 0.442944,-99) , +5, 1.81555, 1, 0, 0.496664,-99) , +12, 0.525205, 0, 0, 0.501859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.146447,-99) , +5, 2.46981, 1, 0, 0.499156,-99) ); + // itree = 999 + fBoostWeights.push_back(0.00515928); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549772,-99) , +4, 1.72805, 1, 0, 0.606374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455777,-99) , +13, 0.00171726, 0, 0, 0.521679,-99) , +4, 1.48716, 0, 0, 0.544671,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363905,-99) , +3, 0.782166, 0, 0, 0.500719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357387,-99) , +4, 1.81959, 1, 0, 0.491832,-99) , +11, 1.5, 0, 0, 0.509762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273487,-99) , +2, 6.5, 0, 0, 0.50565,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500564,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348296,-99) , +13, 0.0186822, 1, 0, 0.452678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325196,-99) , +7, 0.0151091, 0, 0, 0.417393,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0569271,-99) , +4, 1.64387, 1, 0, 0.400119,-99) , +8, -0.898363, 0, 0, 0.49415,-99) ); + // itree = 1000 + fBoostWeights.push_back(0.00590349); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617294,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518639,-99) , +12, 0.17806, 1, 0, 0.577918,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401939,-99) , +3, 0.987976, 1, 0, 0.487933,-99) , +13, 0.00198646, 0, 0, 0.539705,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.203935,-99) , +7, 0.0648217, 1, 0, 0.494725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349084,-99) , +0, 51.5, 1, 0, 0.481659,-99) , +4, 0.959636, 1, 0, 0.505484,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463382,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343682,-99) , +12, 0.142957, 1, 0, 0.419853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149017,-99) , +4, 1.63534, 1, 0, 0.405003,-99) , +8, -0.932182, 0, 0, 0.496358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310501,-99) , +7, 0.00818818, 0, 0, 0.488732,-99) ); + // itree = 1001 + fBoostWeights.push_back(0.00298085); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656979,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607984,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496218,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380155,-99) , +15, 0.0372726, 0, 0, 0.490818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354314,-99) , +4, 1.83995, 1, 0, 0.484314,-99) , +9, -9.61938, 1, 0, 0.490467,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.192932,-99) , +5, 2.49356, 1, 0, 0.488203,-99) , +12, 0.509824, 0, 0, 0.494917,-99) ); + // itree = 1002 + fBoostWeights.push_back(0.00405108); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624364,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381499,-99) , +9, 2.03784, 1, 0, 0.526939,-99) , +9, 3.4928, 0, 0, 0.538192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416598,-99) , +10, -5420.49, 0, 0, 0.52893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381733,-99) , +3, 0.999219, 1, 0, 0.520517,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505318,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452547,-99) , +11, 0.5, 1, 0, 0.479153,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321585,-99) , +3, 0.760587, 0, 0, 0.473693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311592,-99) , +1, 60.5, 1, 0, 0.468303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317831,-99) , +4, 1.86567, 1, 0, 0.460929,-99) , +16, 443.783, 1, 0, 0.483761,-99) ); + // itree = 1003 + fBoostWeights.push_back(0.00427339); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654331,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527619,-99) , +4, 1.89188, 0, 0, 0.53832,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259116,-99) , +5, 2.18973, 1, 0, 0.47674,-99) , +16, 489.002, 1, 0, 0.500698,-99) , +10, -12885.5, 1, 0, 0.506739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267304,-99) , +2, 56.5, 0, 0, 0.387291,-99) , +15, 1.91173, 1, 0, 0.499842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358482,-99) , +2, 7.5, 0, 0, 0.493473,-99) ); + // itree = 1004 + fBoostWeights.push_back(0.00465891); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472443,-99) , +5, 0.694659, 0, 0, 0.553516,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343665,-99) , +3, 0.988538, 1, 0, 0.450375,-99) , +14, -3.12233, 0, 0, 0.526833,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626821,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484856,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42109,-99) , +14, -2.53129, 1, 0, 0.46253,-99) , +9, 8.76364, 0, 0, 0.472755,-99) , +4, 0.918377, 1, 0, 0.493841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304938,-99) , +3, 0.999645, 1, 0, 0.489415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342265,-99) , +8, -0.983, 0, 0, 0.483286,-99) ); + // itree = 1005 + fBoostWeights.push_back(0.00641372); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546371,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489341,-99) , +16, 2484.28, 1, 0, 0.518427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28489,-99) , +5, 2.22151, 1, 0, 0.514844,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309746,-99) , +5, 1.44259, 1, 0, 0.470677,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18073,-99) , +3, 0.998294, 1, 0, 0.424214,-99) , +13, 0.0175293, 1, 0, 0.504601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337924,-99) , +4, 1.82984, 1, 0, 0.496617,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549574,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400538,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189331,-99) , +6, 0.358618, 0, 0, 0.31011,-99) , +5, 2.04394, 0, 0, 0.38551,-99) , +14, -4.57912, 0, 0, 0.486985,-99) ); + // itree = 1006 + fBoostWeights.push_back(0.00404741); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.67066,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499241,-99) , +6, 0.183165, 1, 0, 0.520594,-99) , +9, -6.48222, 1, 0, 0.537303,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480486,-99) , +10, -6620.09, 1, 0, 0.489261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246481,-99) , +4, 1.97627, 1, 0, 0.483648,-99) , +11, 1.5, 0, 0, 0.501238,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195106,-99) , +7, 0.252109, 1, 0, 0.498938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251047,-99) , +3, 0.999695, 1, 0, 0.49417,-99) ); + // itree = 1007 + fBoostWeights.push_back(0.00750254); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531926,-99) , +13, 0.0038404, 0, 0, 0.607425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504761,-99) , +16, 123.509, 0, 0, 0.577304,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49392,-99) , +7, 0.0172804, 0, 0, 0.525631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.396364,-99) , +7, 0.0321684, 1, 0, 0.509685,-99) , +2, 24.5, 0, 0, 0.529549,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361367,-99) , +7, 0.0316096, 1, 0, 0.454107,-99) , +3, 0.998707, 1, 0, 0.520274,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496525,-99) , +5, 1.96236, 0, 0, 0.560834,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309732,-99) , +12, 0.0240743, 0, 0, 0.524034,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.411375,-99) , +7, 0.00992462, 0, 0, 0.535205,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35216,-99) , +11, 1.5, 0, 0, 0.404603,-99) , +15, 0.0482892, 1, 0, 0.436267,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283806,-99) , +5, 2.1591, 1, 0, 0.416851,-99) , +12, 0.0692704, 1, 0, 0.448985,-99) , +5, 1.65109, 1, 0, 0.49382,-99) ); + // itree = 1008 + fBoostWeights.push_back(0.00505178); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481329,-99) , +15, 1.15205, 1, 0, 0.570052,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321596,-99) , +7, 0.0444605, 1, 0, 0.487497,-99) , +2, 29.5, 0, 0, 0.501171,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0625333,-99) , +4, 1.30368, 1, 0, 0.399134,-99) , +7, 0.109439, 1, 0, 0.495307,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264207,-99) , +2, 6.5, 0, 0, 0.491226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328916,-99) , +5, 2.22423, 1, 0, 0.485284,-99) ); + // itree = 1009 + fBoostWeights.push_back(0.00969275); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596975,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510886,-99) , +3, 0.952359, 1, 0, 0.541671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500714,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408474,-99) , +13, 0.0101141, 1, 0, 0.482254,-99) , +9, -0.09944, 1, 0, 0.512057,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546064,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.170105,-99) , +5, 1.62974, 1, 0, 0.357039,-99) , +9, -5.69016, 1, 0, 0.427254,-99) , +3, 0.996034, 1, 0, 0.492595,-99) , +10, -5204.52, 1, 0, 0.503125,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.651988,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291389,-99) , +15, 0.149705, 1, 0, 0.464074,-99) , +12, 0.070334, 1, 0, 0.546237,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370745,-99) , +3, 0.927876, 1, 0, 0.427528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152967,-99) , +4, 1.91953, 1, 0, 0.38941,-99) , +3, 0.988808, 0, 0, 0.475126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.10976,-99) , +5, 1.90277, 1, 0, 0.274706,-99) , +13, 0.00305614, 1, 0, 0.423997,-99) , +4, 1.47188, 1, 0, 0.485229,-99) ); + // itree = 1010 + fBoostWeights.push_back(0.00346028); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481755,-99) , +6, 0.851839, 1, 0, 0.539462,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497711,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343157,-99) , +7, 0.0853715, 1, 0, 0.48689,-99) , +12, 0.111385, 1, 0, 0.510051,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.437866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193644,-99) , +5, 1.75986, 1, 0, 0.408717,-99) , +8, -0.945993, 0, 0, 0.502252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389582,-99) , +12, 0.0233211, 0, 0, 0.496972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289635,-99) , +7, 0.00699782, 0, 0, 0.49313,-99) ); + // itree = 1011 + fBoostWeights.push_back(0.00531562); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.702078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596445,-99) , +10, 15694.1, 1, 0, 0.651927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478591,-99) , +15, 0.104708, 0, 0, 0.603252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398464,-99) , +7, 0.0766906, 1, 0, 0.581498,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340613,-99) , +4, 1.87209, 1, 0, 0.533917,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604833,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445545,-99) , +10, -13239.1, 1, 0, 0.465729,-99) , +3, 0.993511, 1, 0, 0.512022,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448867,-99) , +12, 0.351363, 0, 0, 0.468336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289664,-99) , +3, 0.882805, 0, 0, 0.447106,-99) , +7, 0.0138054, 0, 0, 0.49532,-99) , +10, 11038.1, 0, 0, 0.505324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299136,-99) , +12, 0.01821, 0, 0, 0.50066,-99) ); + // itree = 1012 + fBoostWeights.push_back(0.00866665); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534384,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401748,-99) , +14, -4.8698, 0, 0, 0.525428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358907,-99) , +0, 51.5, 1, 0, 0.519513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391819,-99) , +1, 69.5, 1, 0, 0.498797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0628913,-99) , +1, 17.5, 0, 0, 0.44413,-99) , +7, 0.0589316, 1, 0, 0.506339,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184119,-99) , +5, 1.80669, 1, 0, 0.406121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0309337,-99) , +7, 0.142657, 1, 0, 0.38009,-99) , +3, 0.999144, 1, 0, 0.496655,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439069,-99) , +10, -754.952, 0, 0, 0.517085,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457277,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305859,-99) , +5, 1.83599, 1, 0, 0.407853,-99) , +9, 0.665717, 0, 0, 0.45593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33368,-99) , +6, 0.823372, 1, 0, 0.429023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.98717, 1, 0, 0.419788,-99) , +7, 0.0128285, 0, 0, 0.480387,-99) ); + // itree = 1013 + fBoostWeights.push_back(0.00452621); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625762,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493419,-99) , +12, 0.387545, 0, 0, 0.503026,-99) , +10, -5373.93, 1, 0, 0.513729,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366323,-99) , +15, 1.26115, 1, 0, 0.485234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302856,-99) , +7, 0.0106806, 0, 0, 0.465335,-99) , +6, 0.787673, 1, 0, 0.499475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317051,-99) , +3, 0.999642, 1, 0, 0.494908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228762,-99) , +3, 0.700889, 0, 0, 0.489495,-99) ); + // itree = 1014 + fBoostWeights.push_back(0.0068315); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525317,-99) , +7, 0.0992327, 1, 0, 0.598626,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498794,-99) , +9, -1.05559, 1, 0, 0.527706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244757,-99) , +4, 1.57948, 1, 0, 0.443137,-99) , +13, 0.00493165, 1, 0, 0.502737,-99) , +2, 36.5, 0, 0, 0.518479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367273,-99) , +12, 0.0227607, 0, 0, 0.510947,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637949,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546036,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429321,-99) , +5, 1.42799, 1, 0, 0.489905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.228483,-99) , +4, 1.92324, 1, 0, 0.482969,-99) , +14, -3.55074, 1, 0, 0.528651,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482686,-99) , +3, 0.996166, 1, 0, 0.546611,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21234,-99) , +4, 1.81761, 1, 0, 0.446361,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.1011, 1, 0, 0.326791,-99) , +3, 0.989194, 1, 0, 0.41483,-99) , +10, 8900.89, 0, 0, 0.442073,-99) , +9, 2.8058, 0, 0, 0.463774,-99) , +16, 1170.96, 1, 0, 0.485965,-99) ); + // itree = 1015 + fBoostWeights.push_back(0.00602816); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648916,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542979,-99) , +1, 20.5, 0, 0, 0.579734,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448782,-99) , +5, 2.02456, 0, 0, 0.502281,-99) , +8, 0.913621, 1, 0, 0.550655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431857,-99) , +8, -0.885232, 0, 0, 0.536904,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344527,-99) , +12, 0.0233211, 0, 0, 0.496674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252361,-99) , +13, 0.0299398, 1, 0, 0.490461,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502284,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219117,-99) , +15, 0.0911448, 1, 0, 0.382279,-99) , +5, 1.16752, 1, 0, 0.41344,-99) , +12, 0.215375, 1, 0, 0.472046,-99) , +6, 0.199632, 1, 0, 0.489748,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230626,-99) , +4, 2.06713, 1, 0, 0.485793,-99) ); + // itree = 1016 + fBoostWeights.push_back(0.00720589); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470627,-99) , +13, 0.00198802, 0, 0, 0.570255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399681,-99) , +1, 63.5, 1, 0, 0.54659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232637,-99) , +1, 11.5, 0, 0, 0.532015,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479138,-99) , +4, 1.89305, 0, 0, 0.484217,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26168,-99) , +14, -4.33108, 1, 0, 0.385329,-99) , +5, 2.11399, 1, 0, 0.477228,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141108,-99) , +7, 0.0515265, 1, 0, 0.468956,-99) , +2, 24.5, 0, 0, 0.484293,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0685984,-99) , +7, 0.284891, 1, 0, 0.482081,-99) ); + // itree = 1017 + fBoostWeights.push_back(0.00632149); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653706,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536301,-99) , +6, 0.0966435, 1, 0, 0.547082,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351407,-99) , +5, 1.74602, 0, 0, 0.440287,-99) , +8, 0.98798, 1, 0, 0.533806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320521,-99) , +12, 0.01821, 0, 0, 0.523231,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480884,-99) , +15, 0.0679218, 1, 0, 0.502345,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309528,-99) , +3, 0.999284, 1, 0, 0.489099,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433504,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235022,-99) , +5, 1.97655, 1, 0, 0.415482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0775722,-99) , +4, 1.7407, 1, 0, 0.386919,-99) , +7, 0.0130131, 0, 0, 0.465506,-99) , +12, 0.110599, 1, 0, 0.492466,-99) , +12, 0.526853, 0, 0, 0.498189,-99) ); + // itree = 1018 + fBoostWeights.push_back(0.00459961); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.673189,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494391,-99) , +13, 0.0029214, 0, 0, 0.514669,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248979,-99) , +5, 2.48264, 1, 0, 0.512299,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377992,-99) , +12, 0.252269, 1, 0, 0.414654,-99) , +15, 0.0441162, 0, 0, 0.504962,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230023,-99) , +5, 1.39505, 1, 0, 0.396245,-99) , +13, 0.0142999, 1, 0, 0.492419,-99) , +12, 0.523213, 0, 0, 0.499069,-99) ); + // itree = 1019 + fBoostWeights.push_back(0.00699178); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548387,-99) , +15, 0.204493, 0, 0, 0.605175,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526734,-99) , +10, -1472.17, 0, 0, 0.574253,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596086,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488092,-99) , +0, 12.5, 0, 0, 0.559586,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372178,-99) , +3, 0.964737, 1, 0, 0.438631,-99) , +10, 4913.24, 0, 0, 0.517111,-99) , +10, 2634.14, 1, 0, 0.542903,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560153,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300045,-99) , +5, 1.64229, 1, 0, 0.522372,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.327702,-99) , +5, 1.85845, 0, 0, 0.378993,-99) , +13, 0.00117164, 0, 0, 0.461734,-99) , +15, 0.590897, 1, 0, 0.514941,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475809,-99) , +13, 0.00107058, 1, 0, 0.541983,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445952,-99) , +12, 0.172227, 1, 0, 0.460117,-99) , +3, 0.953131, 1, 0, 0.484657,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318351,-99) , +5, 1.5626, 1, 0, 0.39855,-99) , +12, 0.154848, 0, 0, 0.471008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325717,-99) , +4, 1.82168, 1, 0, 0.461927,-99) , +12, 0.127213, 1, 0, 0.489138,-99) ); + // itree = 1020 + fBoostWeights.push_back(0.00896378); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.735839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611016,-99) , +5, 2.14418, 0, 0, 0.651626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462999,-99) , +13, 0.00288063, 1, 0, 0.624366,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495817,-99) , +16, 1284.5, 1, 0, 0.536679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344081,-99) , +8, 0.982625, 1, 0, 0.515528,-99) , +4, 1.60688, 0, 0, 0.535352,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423588,-99) , +12, 0.0198376, 1, 0, 0.49664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332176,-99) , +0, 26.5, 1, 0, 0.437946,-99) , +12, 0.0312838, 0, 0, 0.517118,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590681,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470821,-99) , +6, 0.135627, 0, 0, 0.529089,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355195,-99) , +5, 1.29693, 1, 0, 0.440177,-99) , +12, 0.203934, 1, 0, 0.495749,-99) , +12, 0.338786, 0, 0, 0.514119,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440612,-99) , +15, 0.0762173, 1, 0, 0.55282,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.284476,-99) , +7, 0.0300814, 1, 0, 0.428115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256731,-99) , +4, 1.64386, 1, 0, 0.394386,-99) , +8, 0.983079, 0, 0, 0.427282,-99) , +4, 1.01123, 1, 0, 0.467719,-99) , +12, 0.11049, 1, 0, 0.490158,-99) ); + // itree = 1021 + fBoostWeights.push_back(0.00687176); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646303,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599853,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486172,-99) , +6, 0.553142, 1, 0, 0.550842,-99) , +16, 19.1911, 1, 0, 0.599113,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481801,-99) , +11, 1.5, 0, 0, 0.552004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404188,-99) , +10, 5651.51, 1, 0, 0.514227,-99) , +15, 0.187613, 0, 0, 0.556728,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506384,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266931,-99) , +4, 1.15532, 1, 0, 0.43366,-99) , +15, 0.786385, 1, 0, 0.534806,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44093,-99) , +6, 0.871583, 1, 0, 0.516284,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419506,-99) , +10, 5466.86, 0, 0, 0.446966,-99) , +12, 0.120239, 1, 0, 0.479676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286055,-99) , +8, -0.982759, 0, 0, 0.471539,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219325,-99) , +4, 1.97331, 1, 0, 0.465026,-99) , +16, 265.107, 1, 0, 0.488845,-99) ); + // itree = 1022 + fBoostWeights.push_back(0.00561408); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433312,-99) , +5, 1.57313, 1, 0, 0.590166,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419694,-99) , +5, 1.66203, 0, 0, 0.49185,-99) , +14, -2.68094, 0, 0, 0.554889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363845,-99) , +7, 0.168937, 1, 0, 0.539635,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324851,-99) , +4, 2.23883, 1, 0, 0.500972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357537,-99) , +0, 28.5, 1, 0, 0.495374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244996,-99) , +7, 0.0396054, 1, 0, 0.481661,-99) , +2, 24.5, 0, 0, 0.496025,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317383,-99) , +3, 0.999664, 1, 0, 0.491732,-99) ); + // itree = 1023 + fBoostWeights.push_back(0.00548484); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508088,-99) , +6, 0.0963367, 1, 0, 0.520589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29208,-99) , +5, 2.12022, 1, 0, 0.515596,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59726,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427684,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293699,-99) , +12, 0.115535, 1, 0, 0.398366,-99) , +12, 0.19618, 0, 0, 0.447264,-99) , +14, -3.95358, 0, 0, 0.505318,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525024,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19789,-99) , +14, -3.26398, 1, 0, 0.409206,-99) , +4, 1.76856, 1, 0, 0.497664,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314835,-99) , +3, 0.999643, 1, 0, 0.492891,-99) ); + // itree = 1024 + fBoostWeights.push_back(0.00318967); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518961,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457111,-99) , +6, 0.917608, 1, 0, 0.505767,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319436,-99) , +3, 0.697485, 0, 0, 0.502094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33283,-99) , +3, 0.99965, 1, 0, 0.497037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267894,-99) , +2, 6.5, 0, 0, 0.493343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280938,-99) , +12, 0.0182006, 0, 0, 0.488385,-99) ); + // itree = 1025 + fBoostWeights.push_back(0.00605192); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528936,-99) , +15, 0.45768, 1, 0, 0.588422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483113,-99) , +1, 9.5, 0, 0, 0.571889,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462646,-99) , +6, 0.969526, 0, 0, 0.532213,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389091,-99) , +3, 0.971109, 0, 0, 0.497867,-99) , +6, 0.631953, 1, 0, 0.544996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424063,-99) , +16, 2.4624, 0, 0, 0.531888,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528532,-99) , +5, 1.63169, 0, 0, 0.583443,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410538,-99) , +16, 2362.16, 1, 0, 0.474583,-99) , +11, 0.5, 1, 0, 0.531263,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328347,-99) , +7, 0.00918691, 0, 0, 0.458259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19384,-99) , +5, 2.1898, 1, 0, 0.452908,-99) , +10, -563.508, 1, 0, 0.471456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176725,-99) , +5, 2.33294, 1, 0, 0.466604,-99) , +16, 492.966, 1, 0, 0.492136,-99) ); + // itree = 1026 + fBoostWeights.push_back(0.00484758); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511279,-99) , +9, -3.74514, 1, 0, 0.525378,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330012,-99) , +3, 0.994162, 1, 0, 0.426705,-99) , +12, 0.0287743, 0, 0, 0.517861,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217214,-99) , +5, 1.42557, 1, 0, 0.399969,-99) , +13, 0.0279145, 1, 0, 0.511126,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.416914,-99) , +10, 2552.34, 1, 0, 0.48741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31143,-99) , +5, 1.9738, 1, 0, 0.462743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187097,-99) , +0, 12.5, 1, 0, 0.416025,-99) , +7, 0.00998716, 0, 0, 0.501717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0987823,-99) , +5, 2.57715, 1, 0, 0.500235,-99) ); + // itree = 1027 + fBoostWeights.push_back(0.00617089); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.670305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.553461,-99) , +10, 4518.7, 1, 0, 0.578945,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557505,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478267,-99) , +7, 0.0214296, 1, 0, 0.519749,-99) , +9, -0.496037, 1, 0, 0.546958,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30233,-99) , +9, 0.259189, 0, 0, 0.429936,-99) , +8, -0.874134, 0, 0, 0.533659,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485461,-99) , +3, 0.910671, 1, 0, 0.50018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278142,-99) , +4, 1.97627, 1, 0, 0.494845,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454552,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260733,-99) , +0, 13.5, 1, 0, 0.413526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0533383,-99) , +5, 2.15687, 1, 0, 0.396534,-99) , +7, 0.0125066, 0, 0, 0.473326,-99) , +16, 1031.27, 1, 0, 0.50188,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256937,-99) , +3, 0.999649, 1, 0, 0.496455,-99) ); + // itree = 1028 + fBoostWeights.push_back(0.00542732); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525597,-99) , +13, 0.0017252, 0, 0, 0.597753,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391015,-99) , +1, 12.5, 0, 0, 0.478039,-99) , +6, 0.741679, 1, 0, 0.553658,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500865,-99) , +1, 13.5, 0, 0, 0.548947,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276769,-99) , +3, 0.997463, 1, 0, 0.471452,-99) , +9, 3.38398, 0, 0, 0.49084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196314,-99) , +4, 2.02284, 1, 0, 0.486236,-99) , +9, -3.80366, 1, 0, 0.498824,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362389,-99) , +1, 6.5, 0, 0, 0.49368,-99) ); + // itree = 1029 + fBoostWeights.push_back(0.00635396); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68138,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473574,-99) , +4, 1.12767, 1, 0, 0.555516,-99) , +4, 1.7316, 0, 0, 0.567542,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409272,-99) , +1, 82.5, 1, 0, 0.553127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239954,-99) , +1, 12.5, 0, 0, 0.534393,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36998,-99) , +15, 0.660617, 1, 0, 0.502037,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420647,-99) , +9, -3.19251, 1, 0, 0.454285,-99) , +6, 0.589184, 1, 0, 0.483761,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142784,-99) , +4, 2.14444, 1, 0, 0.480917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.181223,-99) , +7, 0.0491957, 1, 0, 0.471331,-99) , +2, 26.5, 0, 0, 0.485886,-99) ); + // itree = 1030 + fBoostWeights.push_back(0.00261819); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611742,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317424,-99) , +4, 1.98886, 1, 0, 0.497727,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309823,-99) , +6, 0.371745, 0, 0, 0.405469,-99) , +14, -4.8962, 0, 0, 0.491947,-99) , +5, 2.30001, 0, 0, 0.496724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323971,-99) , +2, 6.5, 0, 0, 0.493166,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321928,-99) , +3, 0.99965, 1, 0, 0.489014,-99) ); + // itree = 1031 + fBoostWeights.push_back(0.00592065); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648119,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565048,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512415,-99) , +10, 2990.55, 1, 0, 0.538003,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301018,-99) , +8, 0.698152, 1, 0, 0.427746,-99) , +3, 0.998033, 1, 0, 0.523465,-99) , +9, -8.19765, 1, 0, 0.532375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402557,-99) , +8, -0.924521, 0, 0, 0.52052,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51435,-99) , +3, 0.98465, 1, 0, 0.554641,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388866,-99) , +4, 0.999056, 1, 0, 0.465167,-99) , +9, -0.247997, 1, 0, 0.510753,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408619,-99) , +11, 0.5, 1, 0, 0.480927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334503,-99) , +3, 0.822041, 0, 0, 0.462434,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36717,-99) , +10, 8675.44, 0, 0, 0.407762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217602,-99) , +13, 0.0070319, 1, 0, 0.370756,-99) , +3, 0.993377, 1, 0, 0.431859,-99) , +5, 1.44989, 1, 0, 0.467426,-99) , +16, 1327.49, 1, 0, 0.493017,-99) ); + // itree = 1032 + fBoostWeights.push_back(0.00422341); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630494,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.31745, 1, 0, 0.507379,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558746,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367376,-99) , +7, 0.0357659, 0, 0, 0.430679,-99) , +8, 0.979617, 1, 0, 0.496555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355838,-99) , +13, 0.0355776, 1, 0, 0.491923,-99) , +12, 0.513631, 0, 0, 0.497493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308278,-99) , +4, 1.9682, 1, 0, 0.491937,-99) ); + // itree = 1033 + fBoostWeights.push_back(0.00591955); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4151,-99) , +7, 0.0195075, 0, 0, 0.549239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290415,-99) , +1, 8.5, 0, 0, 0.541051,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493459,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343665,-99) , +7, 0.00743876, 0, 0, 0.486796,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260059,-99) , +7, 0.027949, 1, 0, 0.468242,-99) , +2, 16.5, 0, 0, 0.499941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33846,-99) , +12, 0.0227642, 0, 0, 0.493414,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0993915,-99) , +5, 2.4827, 1, 0, 0.490609,-99) ); + // itree = 1034 + fBoostWeights.push_back(0.00562931); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.691952,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516952,-99) , +6, 0.352114, 1, 0, 0.621682,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64233,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47922,-99) , +4, 1.43331, 0, 0, 0.51066,-99) , +9, 5.53034, 0, 0, 0.532925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393572,-99) , +8, 0.988048, 1, 0, 0.514938,-99) , +3, 0.957086, 1, 0, 0.543904,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417982,-99) , +4, 1.69961, 1, 0, 0.499433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311344,-99) , +3, 0.794492, 0, 0, 0.491235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.124419,-99) , +7, 0.168313, 1, 0, 0.487525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31429,-99) , +1, 52.5, 1, 0, 0.478914,-99) , +11, 1.5, 0, 0, 0.500941,-99) ); + // itree = 1035 + fBoostWeights.push_back(0.00628231); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499819,-99) , +12, 0.129226, 1, 0, 0.531795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107911,-99) , +5, 2.14548, 1, 0, 0.521864,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686787,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407573,-99) , +12, 0.321629, 0, 0, 0.435244,-99) , +5, 2.34972, 0, 0, 0.458287,-99) , +8, 0.932668, 1, 0, 0.506087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385044,-99) , +5, 0.594481, 0, 0, 0.500029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282186,-99) , +7, 0.170561, 1, 0, 0.495555,-99) ); + // itree = 1036 + fBoostWeights.push_back(0.00597963); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676353,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622919,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495694,-99) , +10, -3864.57, 1, 0, 0.560761,-99) , +15, 0.221837, 1, 0, 0.596716,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612276,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539202,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363351,-99) , +12, 0.136941, 1, 0, 0.486764,-99) , +12, 0.259252, 0, 0, 0.519149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0691404,-99) , +7, 0.0532375, 1, 0, 0.504175,-99) , +1, 14.5, 0, 0, 0.541037,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467103,-99) , +6, 0.866631, 1, 0, 0.572992,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478514,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3059,-99) , +7, 0.0677702, 1, 0, 0.473886,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256547,-99) , +0, 55.5, 1, 0, 0.468038,-99) , +2, 43.5, 0, 0, 0.478722,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336503,-99) , +3, 0.999139, 1, 0, 0.47075,-99) , +9, 2.71733, 0, 0, 0.488903,-99) ); + // itree = 1037 + fBoostWeights.push_back(0.00424713); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618047,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505488,-99) , +6, 0.104524, 0, 0, 0.566684,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431387,-99) , +12, 0.0474816, 0, 0, 0.543731,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473,-99) , +10, 8501.21, 0, 0, 0.487953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347269,-99) , +13, 0.0205824, 1, 0, 0.478787,-99) , +4, 0.739622, 1, 0, 0.496268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379362,-99) , +5, 0.48356, 0, 0, 0.490604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264053,-99) , +7, 0.00711941, 0, 0, 0.486314,-99) ); + // itree = 1038 + fBoostWeights.push_back(0.00711252); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.68904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5829,-99) , +1, 18.5, 1, 0, 0.623407,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507698,-99) , +12, 0.0454664, 0, 0, 0.587202,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648573,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480846,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247333,-99) , +1, 13.5, 0, 0, 0.456773,-99) , +8, 0.997576, 0, 0, 0.493885,-99) , +8, 0.508422, 1, 0, 0.53255,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.499887,-99) , +15, 0.0269809, 1, 0, 0.507627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324247,-99) , +5, 2.21129, 1, 0, 0.499377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309001,-99) , +7, 0.0287877, 1, 0, 0.485234,-99) , +2, 17.5, 0, 0, 0.502196,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39613,-99) , +12, 0.188589, 0, 0, 0.49727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326582,-99) , +1, 15.5, 0, 0, 0.444404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167619,-99) , +3, 0.998866, 1, 0, 0.414631,-99) , +14, -1.78525, 1, 0, 0.492367,-99) ); + // itree = 1039 + fBoostWeights.push_back(0.00379354); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530421,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431141,-99) , +7, 0.0891461, 1, 0, 0.523304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368608,-99) , +3, 0.737072, 0, 0, 0.519069,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351311,-99) , +1, 12.5, 0, 0, 0.437183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0636257,-99) , +4, 1.63603, 1, 0, 0.418103,-99) , +8, -0.938624, 0, 0, 0.510622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344318,-99) , +3, 0.999597, 1, 0, 0.505501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22955,-99) , +2, 6.5, 0, 0, 0.501176,-99) ); + // itree = 1040 + fBoostWeights.push_back(0.00576623); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.675673,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534312,-99) , +3, 0.951011, 1, 0, 0.558151,-99) , +9, -5.21808, 1, 0, 0.575204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426923,-99) , +8, -0.921376, 0, 0, 0.558964,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350536,-99) , +5, 1.93814, 0, 0, 0.457768,-99) , +13, 0.000138064, 0, 0, 0.538798,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510286,-99) , +4, 1.80597, 0, 0, 0.517724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.319819,-99) , +1, 49.5, 1, 0, 0.507935,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360334,-99) , +3, 0.954055, 0, 0, 0.450944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293173,-99) , +3, 0.999052, 1, 0, 0.437535,-99) , +6, 0.821069, 1, 0, 0.487139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294892,-99) , +5, 2.20951, 1, 0, 0.480941,-99) , +11, 1.5, 0, 0, 0.500077,-99) ); + // itree = 1041 + fBoostWeights.push_back(0.00844239); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.703269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572298,-99) , +5, 1.94249, 0, 0, 0.589895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464048,-99) , +1, 10.5, 0, 0, 0.568597,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403042,-99) , +14, -3.41261, 0, 0, 0.482087,-99) , +15, 0.227068, 0, 0, 0.5479,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36821,-99) , +5, 1.80839, 1, 0, 0.477099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259931,-99) , +8, 0.879288, 1, 0, 0.427531,-99) , +12, 0.0327419, 0, 0, 0.520571,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603509,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504991,-99) , +6, 0.551514, 1, 0, 0.558717,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404752,-99) , +4, 0.984941, 1, 0, 0.475779,-99) , +7, 0.0180379, 1, 0, 0.508387,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415097,-99) , +5, 1.47371, 1, 0, 0.512938,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360777,-99) , +3, 0.987565, 1, 0, 0.414741,-99) , +2, 19.5, 0, 0, 0.44532,-99) , +16, 3101.81, 1, 0, 0.477231,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562062,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453961,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0938638,-99) , +6, 0.479995, 1, 0, 0.270757,-99) , +16, 381.205, 1, 0, 0.343549,-99) , +14, -4.42944, 1, 0, 0.390327,-99) , +5, 1.86672, 1, 0, 0.459928,-99) , +12, 0.101379, 1, 0, 0.486145,-99) ); + // itree = 1042 + fBoostWeights.push_back(0.00620851); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.652412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563884,-99) , +6, 0.710896, 0, 0, 0.604859,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634162,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511286,-99) , +1, 12.5, 0, 0, 0.579633,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306215,-99) , +6, 0.957565, 1, 0, 0.438612,-99) , +16, 273.288, 1, 0, 0.511709,-99) , +11, 0.5, 1, 0, 0.543513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504958,-99) , +6, 0.149286, 1, 0, 0.539801,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495642,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392045,-99) , +15, 0.0619004, 0, 0, 0.477577,-99) , +11, 1.5, 0, 0, 0.497439,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584192,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409181,-99) , +3, 0.998944, 0, 0, 0.509264,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286797,-99) , +9, -5.17954, 1, 0, 0.412769,-99) , +3, 0.997867, 1, 0, 0.485484,-99) , +10, 41.2106, 1, 0, 0.501122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26753,-99) , +5, 2.40273, 1, 0, 0.498105,-99) ); + // itree = 1043 + fBoostWeights.push_back(0.0065075); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.645167,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463306,-99) , +13, 0.00181184, 0, 0, 0.547051,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245511,-99) , +5, 1.99561, 1, 0, 0.536536,-99) , +8, 0.987339, 0, 0, 0.554987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316978,-99) , +1, 14.5, 0, 0, 0.53244,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370298,-99) , +14, -4.82803, 0, 0, 0.500376,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226855,-99) , +8, 0.802132, 0, 0, 0.414913,-99) , +5, 1.98367, 1, 0, 0.489901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325551,-99) , +7, 0.0405029, 1, 0, 0.482439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0876882,-99) , +0, 41.5, 1, 0, 0.477128,-99) , +2, 24.5, 0, 0, 0.49121,-99) ); + // itree = 1044 + fBoostWeights.push_back(0.00388634); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550091,-99) , +12, 0.143458, 1, 0, 0.599424,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594524,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5106,-99) , +12, 0.235448, 0, 0, 0.532741,-99) , +6, 0.169981, 1, 0, 0.548923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440946,-99) , +12, 0.0324609, 0, 0, 0.537598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429581,-99) , +8, -0.897458, 0, 0, 0.526065,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569697,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276492,-99) , +7, 0.00736746, 0, 0, 0.472368,-99) , +10, -5481.26, 1, 0, 0.481457,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.109646,-99) , +4, 2.1617, 1, 0, 0.478882,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293631,-99) , +0, 79.5, 1, 0, 0.47058,-99) , +16, 963.226, 1, 0, 0.496167,-99) ); + // itree = 1045 + fBoostWeights.push_back(0.00947916); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634937,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379035,-99) , +8, 0.984854, 1, 0, 0.531258,-99) , +3, 0.91781, 1, 0, 0.553124,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379248,-99) , +15, 0.0466122, 0, 0, 0.514494,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387108,-99) , +4, 1.47418, 0, 0, 0.438045,-99) , +8, 0.724192, 1, 0, 0.490325,-99) , +6, 0.377168, 1, 0, 0.515801,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349885,-99) , +13, 0.0352717, 1, 0, 0.508942,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667799,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429073,-99) , +4, 1.66533, 0, 0, 0.544442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385189,-99) , +1, 10.5, 0, 0, 0.497782,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381472,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0626347,-99) , +13, 0.0110659, 1, 0, 0.346312,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.102387,-99) , +5, 2.12014, 1, 0, 0.282635,-99) , +14, -3.69545, 1, 0, 0.384605,-99) , +12, 0.442659, 0, 0, 0.413711,-99) , +5, 1.86874, 1, 0, 0.491762,-99) ); + // itree = 1046 + fBoostWeights.push_back(0.00673986); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479965,-99) , +7, 0.0147804, 0, 0, 0.530124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.214218,-99) , +5, 2.13026, 1, 0, 0.524969,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666511,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414216,-99) , +4, 1.61275, 0, 0, 0.442182,-99) , +5, 2.171, 0, 0, 0.465094,-99) , +8, 0.91546, 1, 0, 0.509243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352016,-99) , +8, -0.98417, 0, 0, 0.502119,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240508,-99) , +15, 0.195177, 0, 0, 0.396987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +3, 0.998622, 1, 0, 0.35391,-99) , +4, 1.81964, 1, 0, 0.493257,-99) ); + // itree = 1047 + fBoostWeights.push_back(0.00594677); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622118,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535545,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337265,-99) , +5, 2.44681, 1, 0, 0.533161,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.33782,-99) , +12, 0.0911019, 0, 0, 0.426786,-99) , +14, -4.37902, 0, 0, 0.520849,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0795045,-99) , +7, 0.184237, 1, 0, 0.51735,-99) , +1, 44.5, 0, 0, 0.527402,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483295,-99) , +8, 0.96351, 0, 0, 0.50401,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356562,-99) , +3, 0.817547, 0, 0, 0.494026,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378092,-99) , +11, 1.5, 0, 0, 0.430358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.10104, 1, 0, 0.413557,-99) , +11, 0.5, 1, 0, 0.469224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252045,-99) , +8, -0.984541, 0, 0, 0.459769,-99) , +16, 4039.3, 1, 0, 0.496878,-99) ); + // itree = 1048 + fBoostWeights.push_back(0.00450313); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656229,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554241,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486783,-99) , +6, 0.87299, 1, 0, 0.536937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393452,-99) , +12, 0.01821, 0, 0, 0.529014,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425869,-99) , +5, 1.53086, 1, 0, 0.473518,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.175561,-99) , +0, 96.5, 1, 0, 0.465321,-99) , +12, 0.11364, 1, 0, 0.497083,-99) , +12, 0.536291, 0, 0, 0.501974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264376,-99) , +2, 6.5, 0, 0, 0.498116,-99) ); + // itree = 1049 + fBoostWeights.push_back(0.00318095); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544725,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428988,-99) , +8, -0.921186, 0, 0, 0.533171,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454567,-99) , +4, 0.966964, 1, 0, 0.486914,-99) , +16, 436.063, 1, 0, 0.504367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0772195,-99) , +7, 0.284997, 1, 0, 0.502881,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316504,-99) , +1, 87.5, 1, 0, 0.49951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260539,-99) , +2, 6.5, 0, 0, 0.495408,-99) ); + // itree = 1050 + fBoostWeights.push_back(0.00499956); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538007,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421419,-99) , +1, 9.5, 0, 0, 0.53124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363142,-99) , +3, 0.999547, 1, 0, 0.524473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425883,-99) , +7, 0.0172318, 0, 0, 0.514181,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370724,-99) , +14, -4.98936, 0, 0, 0.488324,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370196,-99) , +0, 17.5, 1, 0, 0.480207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178633,-99) , +7, 0.0284535, 1, 0, 0.463952,-99) , +2, 13.5, 0, 0, 0.492477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289395,-99) , +4, 1.91818, 1, 0, 0.485191,-99) ); + // itree = 1051 + fBoostWeights.push_back(0.00463942); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524305,-99) , +14, -5.94609, 0, 0, 0.596022,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562084,-99) , +5, 0.892466, 1, 0, 0.597761,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43108,-99) , +4, 0.865335, 0, 0, 0.492498,-99) , +6, 0.645975, 1, 0, 0.542094,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486881,-99) , +2, 26.5, 0, 0, 0.499257,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249339,-99) , +3, 0.998692, 1, 0, 0.415267,-99) , +14, -2.10875, 1, 0, 0.481238,-99) , +5, 1.12353, 1, 0, 0.49591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268089,-99) , +5, 2.27806, 1, 0, 0.490952,-99) , +8, 0.998765, 0, 0, 0.497373,-99) ); + // itree = 1052 + fBoostWeights.push_back(0.00591481); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.672043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579259,-99) , +6, 0.725687, 1, 0, 0.626272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524283,-99) , +2, 16.5, 0, 0, 0.590766,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50165,-99) , +8, -0.76616, 0, 0, 0.563376,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574848,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498973,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388852,-99) , +4, 0.793231, 1, 0, 0.447922,-99) , +13, 7.99214e-05, 1, 0, 0.480572,-99) , +13, 0.00231101, 0, 0, 0.534907,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661317,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525196,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453154,-99) , +11, 1.5, 0, 0, 0.478043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229281,-99) , +5, 2.48989, 1, 0, 0.474744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26693,-99) , +13, 0.0139182, 1, 0, 0.459155,-99) , +12, 0.506508, 0, 0, 0.468386,-99) , +5, 1.37069, 1, 0, 0.49419,-99) ); + // itree = 1053 + fBoostWeights.push_back(0.00658372); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577581,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464224,-99) , +6, 0.790496, 1, 0, 0.527205,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250988,-99) , +5, 1.82838, 1, 0, 0.472036,-99) , +3, 0.993175, 1, 0, 0.511099,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400209,-99) , +5, 1.35138, 1, 0, 0.494941,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236494,-99) , +2, 24.5, 0, 0, 0.450743,-99) , +7, 0.0405838, 1, 0, 0.497695,-99) , +10, 11955.2, 0, 0, 0.504821,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559127,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483532,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.262208,-99) , +9, 2.72091, 0, 0, 0.370958,-99) , +9, -1.90428, 1, 0, 0.455465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211811,-99) , +8, -0.214729, 0, 0, 0.42192,-99) , +4, 1.68175, 1, 0, 0.495438,-99) ); + // itree = 1054 + fBoostWeights.push_back(0.00553361); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546588,-99) , +6, 0.170437, 1, 0, 0.57161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433732,-99) , +0, 13.5, 0, 0, 0.545777,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39802,-99) , +8, -0.944681, 0, 0, 0.497001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266704,-99) , +5, 2.31694, 1, 0, 0.493297,-99) , +11, 1.5, 0, 0, 0.51118,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552555,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445253,-99) , +8, 0.84384, 1, 0, 0.525177,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298186,-99) , +7, 0.0253936, 1, 0, 0.494628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.258775,-99) , +5, 1.8442, 1, 0, 0.449424,-99) , +1, 9.5, 0, 0, 0.498395,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298165,-99) , +3, 0.999717, 1, 0, 0.494576,-99) ); + // itree = 1055 + fBoostWeights.push_back(0.00509172); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655632,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570689,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494825,-99) , +3, 0.977132, 1, 0, 0.538094,-99) , +3, 0.995186, 0, 0, 0.562399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485035,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166699,-99) , +5, 1.9805, 1, 0, 0.459532,-99) , +3, 0.997878, 1, 0, 0.541567,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393546,-99) , +7, 0.0282957, 1, 0, 0.497982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259298,-99) , +4, 1.98841, 1, 0, 0.492428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0786589,-99) , +7, 0.0572138, 1, 0, 0.486565,-99) , +2, 21.5, 0, 0, 0.503139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301154,-99) , +13, 0.0707336, 1, 0, 0.500548,-99) ); + // itree = 1056 + fBoostWeights.push_back(0.00654608); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671594,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378986,-99) , +15, 0.0445217, 0, 0, 0.544213,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451333,-99) , +3, 0.953229, 1, 0, 0.482389,-99) , +8, 0.510771, 1, 0, 0.51104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412961,-99) , +3, 0.991256, 1, 0, 0.489773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320971,-99) , +5, 1.44014, 1, 0, 0.441836,-99) , +13, 0.0122466, 1, 0, 0.500258,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533103,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243421,-99) , +14, -3.65118, 1, 0, 0.387761,-99) , +4, 1.7161, 1, 0, 0.48933,-99) , +12, 0.535654, 0, 0, 0.495637,-99) ); + // itree = 1057 + fBoostWeights.push_back(0.00317601); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48129,-99) , +5, 1.73406, 1, 0, 0.591828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498042,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366843,-99) , +8, -0.982477, 0, 0, 0.492376,-99) , +10, -8003.35, 1, 0, 0.498793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334206,-99) , +3, 0.722978, 0, 0, 0.494827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246077,-99) , +4, 2.23892, 1, 0, 0.493353,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315188,-99) , +12, 0.112318, 1, 0, 0.400747,-99) , +2, 8.5, 0, 0, 0.485096,-99) ); + // itree = 1058 + fBoostWeights.push_back(0.0043916); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621621,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612364,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517914,-99) , +3, 0.996504, 0, 0, 0.543777,-99) , +6, 0.168793, 1, 0, 0.562378,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434855,-99) , +3, 0.990418, 1, 0, 0.505109,-99) , +15, 0.466927, 1, 0, 0.54451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408749,-99) , +16, 2.4624, 0, 0, 0.52956,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51473,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456831,-99) , +8, 0.434681, 1, 0, 0.487413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322913,-99) , +1, 51.5, 1, 0, 0.480011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.101489,-99) , +4, 1.97611, 1, 0, 0.477765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309836,-99) , +5, 2.10686, 1, 0, 0.468017,-99) , +16, 500.939, 1, 0, 0.492375,-99) ); + // itree = 1059 + fBoostWeights.push_back(0.00337517); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619018,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.541373,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489336,-99) , +4, 0.725479, 1, 0, 0.504791,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39902,-99) , +5, 0.43803, 0, 0, 0.499372,-99) , +4, 1.68762, 0, 0, 0.504605,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535315,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277346,-99) , +13, 0.000247091, 1, 0, 0.411198,-99) , +4, 1.76189, 1, 0, 0.497359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.108563,-99) , +7, 0.284023, 1, 0, 0.4953,-99) ); + // itree = 1060 + fBoostWeights.push_back(0.00828076); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648407,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.612061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52512,-99) , +3, 0.933294, 1, 0, 0.542428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408944,-99) , +13, 0.0288159, 1, 0, 0.53039,-99) , +9, -6.06924, 1, 0, 0.544428,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430905,-99) , +8, 0.930636, 1, 0, 0.517558,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548306,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334329,-99) , +6, 0.508879, 1, 0, 0.389721,-99) , +8, 0.989249, 0, 0, 0.431096,-99) , +5, 1.43429, 0, 0, 0.466278,-99) , +14, -2.75626, 0, 0, 0.517476,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539637,-99) , +10, 2897.69, 1, 0, 0.595118,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488069,-99) , +4, 1.83837, 0, 0, 0.518636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386609,-99) , +16, 885.24, 1, 0, 0.480835,-99) , +0, 18.5, 0, 0, 0.527645,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420489,-99) , +11, 0.5, 1, 0, 0.510294,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415293,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226553,-99) , +7, 0.0396817, 1, 0, 0.387681,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161002,-99) , +5, 2.12017, 1, 0, 0.363584,-99) , +14, -3.69527, 1, 0, 0.415554,-99) , +11, 1.5, 0, 0, 0.457505,-99) , +5, 1.64929, 1, 0, 0.495314,-99) ); + // itree = 1061 + fBoostWeights.push_back(0.00374354); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.671245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51808,-99) , +4, 1.86266, 0, 0, 0.523342,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352097,-99) , +4, 1.97334, 1, 0, 0.519802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340423,-99) , +13, 0.0375676, 1, 0, 0.515248,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376446,-99) , +3, 0.982039, 1, 0, 0.444052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125982,-99) , +4, 1.54245, 1, 0, 0.423621,-99) , +8, -0.90201, 0, 0, 0.505546,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300471,-99) , +5, 2.30896, 1, 0, 0.501001,-99) ); + // itree = 1062 + fBoostWeights.push_back(0.00387531); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53961,-99) , +8, 0.0805906, 1, 0, 0.579011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392886,-99) , +5, 2.08694, 1, 0, 0.570451,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508849,-99) , +3, 0.917605, 1, 0, 0.537025,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484493,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360124,-99) , +4, 0.463238, 0, 0, 0.474197,-99) , +6, 0.23793, 1, 0, 0.493361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304889,-99) , +7, 0.00734406, 0, 0, 0.488925,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344099,-99) , +3, 0.999142, 1, 0, 0.480691,-99) , +9, 5.6726, 0, 0, 0.491437,-99) ); + // itree = 1063 + fBoostWeights.push_back(0.0092011); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573522,-99) , +2, 11.5, 0, 0, 0.614895,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468887,-99) , +5, 2.08696, 1, 0, 0.604914,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435804,-99) , +7, 0.0638995, 1, 0, 0.566661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410774,-99) , +0, 17.5, 0, 0, 0.513941,-99) , +15, 0.152716, 1, 0, 0.55577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409036,-99) , +6, 0.991006, 1, 0, 0.535286,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620806,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539512,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434078,-99) , +12, 0.0693137, 0, 0, 0.514395,-99) , +12, 0.0569576, 1, 0, 0.534515,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543412,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41834,-99) , +2, 13.5, 0, 0, 0.493424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36776,-99) , +3, 0.986962, 1, 0, 0.44193,-99) , +12, 0.0461788, 0, 0, 0.503186,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492216,-99) , +10, 4627.92, 0, 0, 0.542065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40567,-99) , +2, 12.5, 0, 0, 0.501926,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370703,-99) , +3, 0.975408, 1, 0, 0.469333,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249787,-99) , +9, -0.65942, 1, 0, 0.348601,-99) , +6, 0.188092, 1, 0, 0.388641,-99) , +5, 1.34285, 1, 0, 0.428677,-99) , +12, 0.113589, 1, 0, 0.463673,-99) , +9, 2.88843, 0, 0, 0.481148,-99) ); + // itree = 1064 + fBoostWeights.push_back(0.00890372); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604181,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504862,-99) , +15, 0.118119, 0, 0, 0.576183,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522092,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386275,-99) , +4, 0.815125, 1, 0, 0.47444,-99) , +13, 0.00814218, 1, 0, 0.54276,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390071,-99) , +15, 0.265436, 1, 0, 0.50643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357304,-99) , +8, 0.969994, 0, 0, 0.463252,-99) , +8, 0.91442, 1, 0, 0.522951,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374785,-99) , +14, -3.70137, 0, 0, 0.489673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.375695,-99) , +8, -0.750759, 0, 0, 0.472438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309992,-99) , +3, 0.885688, 0, 0, 0.459383,-99) , +6, 0.590535, 1, 0, 0.495268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620171,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443845,-99) , +2, 11.5, 0, 0, 0.558226,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287849,-99) , +16, 682.161, 1, 0, 0.368887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0571537,-99) , +5, 2.26444, 1, 0, 0.319189,-99) , +14, -3.9794, 1, 0, 0.422219,-99) , +5, 1.94292, 1, 0, 0.485243,-99) ); + // itree = 1065 + fBoostWeights.push_back(0.00500939); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545174,-99) , +13, 0.00393637, 0, 0, 0.601098,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467135,-99) , +8, 0.863019, 1, 0, 0.557346,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304813,-99) , +15, 1.95936, 1, 0, 0.490289,-99) , +5, 1.4871, 1, 0, 0.523157,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506245,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389522,-99) , +15, 0.22872, 1, 0, 0.484172,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.332234,-99) , +7, 0.00939397, 0, 0, 0.4702,-99) , +12, 0.111237, 1, 0, 0.494559,-99) , +10, -8078.09, 1, 0, 0.501913,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.213887,-99) , +15, 0.141531, 0, 0, 0.3738,-99) , +8, -0.975686, 0, 0, 0.495476,-99) ); + // itree = 1066 + fBoostWeights.push_back(0.00290148); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495089,-99) , +6, 0.27189, 1, 0, 0.512901,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393782,-99) , +14, -4.99056, 0, 0, 0.506573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36945,-99) , +5, 2.24281, 1, 0, 0.502129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.18686,-99) , +7, 0.284097, 1, 0, 0.500212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253878,-99) , +2, 6.5, 0, 0, 0.495376,-99) ); + // itree = 1067 + fBoostWeights.push_back(0.00308914); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.673648,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43759,-99) , +15, 0.0663481, 0, 0, 0.496937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318014,-99) , +14, -5.85956, 0, 0, 0.49325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31743,-99) , +3, 0.721925, 0, 0, 0.48892,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.134757,-99) , +7, 0.284097, 1, 0, 0.487045,-99) , +12, 0.526853, 0, 0, 0.494129,-99) ); + // itree = 1068 + fBoostWeights.push_back(0.00512866); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.711811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478013,-99) , +8, 0.447027, 1, 0, 0.609567,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618426,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448874,-99) , +13, 0.00137782, 0, 0, 0.565075,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235407,-99) , +3, 0.730017, 0, 0, 0.476879,-99) , +4, 0.390953, 1, 0, 0.488391,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362097,-99) , +5, 0.539941, 0, 0, 0.482164,-99) , +10, -8059.38, 1, 0, 0.490929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240136,-99) , +12, 0.0165158, 0, 0, 0.486766,-99) ); + // itree = 1069 + fBoostWeights.push_back(0.00454948); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639737,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61637,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525342,-99) , +9, -8.47713, 1, 0, 0.549341,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425897,-99) , +15, 0.95918, 1, 0, 0.534211,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478498,-99) , +10, -8057.68, 1, 0, 0.487495,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.446409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.167092,-99) , +13, 0.00212254, 1, 0, 0.381178,-99) , +4, 1.63946, 1, 0, 0.474533,-99) , +9, -3.20886, 1, 0, 0.487619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349372,-99) , +13, 0.0296889, 1, 0, 0.481478,-99) , +12, 0.525205, 0, 0, 0.487064,-99) ); + // itree = 1070 + fBoostWeights.push_back(0.00588007); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536456,-99) , +2, 16.5, 0, 0, 0.584394,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487704,-99) , +1, 32.5, 1, 0, 0.56485,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543895,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366164,-99) , +8, 0.585156, 1, 0, 0.430025,-99) , +8, 0.962408, 0, 0, 0.462091,-99) , +13, 0.00292841, 0, 0, 0.525215,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478125,-99) , +0, 10.5, 1, 0, 0.49419,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.257849,-99) , +4, 1.5876, 1, 0, 0.409581,-99) , +13, 0.00609678, 1, 0, 0.478065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294884,-99) , +7, 0.0795137, 1, 0, 0.467798,-99) , +5, 1.38049, 1, 0, 0.490583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282315,-99) , +3, 0.999675, 1, 0, 0.486155,-99) ); + // itree = 1071 + fBoostWeights.push_back(0.00771645); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558288,-99) , +3, 0.995261, 0, 0, 0.614422,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57536,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444736,-99) , +15, 0.136068, 1, 0, 0.516357,-99) , +1, 11.5, 0, 0, 0.568589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112928,-99) , +4, 2.10596, 1, 0, 0.560493,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64246,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549418,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463639,-99) , +5, 1.32802, 1, 0, 0.51481,-99) , +6, 0.213082, 1, 0, 0.55573,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160374,-99) , +5, 2.43431, 1, 0, 0.484955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178008,-99) , +7, 0.0491869, 1, 0, 0.476567,-99) , +2, 24.5, 0, 0, 0.494419,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622262,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488734,-99) , +8, 0.837557, 1, 0, 0.565205,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381423,-99) , +13, 0.0063659, 1, 0, 0.517726,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151751,-99) , +5, 2.02189, 1, 0, 0.364946,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198592,-99) , +3, 0.999373, 1, 0, 0.333444,-99) , +9, -5.17029, 1, 0, 0.423276,-99) , +3, 0.996199, 1, 0, 0.479062,-99) , +10, -1628.84, 1, 0, 0.494409,-99) ); + // itree = 1072 + fBoostWeights.push_back(0.0064018); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.680497,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570776,-99) , +4, 1.42583, 0, 0, 0.607108,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.575405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464402,-99) , +16, 1484.71, 0, 0, 0.5309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23301,-99) , +7, 0.0323507, 1, 0, 0.502344,-99) , +1, 14.5, 0, 0, 0.542466,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53001,-99) , +9, -4.56795, 0, 0, 0.55762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439946,-99) , +6, 0.914724, 1, 0, 0.530584,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455542,-99) , +4, 0.691057, 1, 0, 0.476807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264136,-99) , +3, 0.996584, 1, 0, 0.459573,-99) , +9, -3.70153, 1, 0, 0.477634,-99) , +9, 2.78693, 0, 0, 0.493646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350642,-99) , +5, 0.450886, 0, 0, 0.487335,-99) ); + // itree = 1073 + fBoostWeights.push_back(0.00572583); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472206,-99) , +6, 0.832709, 1, 0, 0.618113,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445175,-99) , +4, 1.61891, 0, 0, 0.477737,-99) , +8, 0.708462, 1, 0, 0.563148,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526952,-99) , +2, 30.5, 0, 0, 0.546556,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504128,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325871,-99) , +10, 6279.72, 1, 0, 0.455179,-99) , +12, 0.0327224, 0, 0, 0.5263,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477075,-99) , +5, 1.90894, 0, 0, 0.485176,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307949,-99) , +12, 0.411844, 0, 0, 0.363496,-99) , +5, 1.95945, 1, 0, 0.468081,-99) , +12, 0.100949, 1, 0, 0.492484,-99) , +9, 4.91985, 0, 0, 0.502365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195204,-99) , +13, 0.110219, 1, 0, 0.500204,-99) ); + // itree = 1074 + fBoostWeights.push_back(0.00379355); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624975,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511137,-99) , +1, 9.5, 0, 0, 0.587806,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425884,-99) , +15, 0.80139, 1, 0, 0.563408,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.614883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488737,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.307212,-99) , +3, 0.999253, 1, 0, 0.481716,-99) , +10, -11965.1, 1, 0, 0.487617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 2.20336, 1, 0, 0.485754,-99) , +10, 10989.1, 0, 0, 0.494829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267163,-99) , +7, 0.00711657, 0, 0, 0.490639,-99) ); + // itree = 1075 + fBoostWeights.push_back(0.00498307); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636018,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38391,-99) , +14, -5.19352, 0, 0, 0.504524,-99) , +4, 1.92357, 0, 0, 0.510624,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405166,-99) , +12, 0.166233, 1, 0, 0.509743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328043,-99) , +12, 0.0651839, 0, 0, 0.453462,-99) , +6, 0.939099, 1, 0, 0.49998,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337513,-99) , +5, 2.49125, 1, 0, 0.498295,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43317,-99) , +2, 19.5, 0, 0, 0.500622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390381,-99) , +3, 0.996996, 1, 0, 0.470477,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285491,-99) , +5, 1.57333, 1, 0, 0.427504,-99) , +13, 0.00964188, 1, 0, 0.48466,-99) ); + // itree = 1076 + fBoostWeights.push_back(0.003765); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665664,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.463415,-99) , +12, 0.0310581, 0, 0, 0.529853,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387511,-99) , +4, 1.53338, 1, 0, 0.464659,-99) , +12, 0.136403, 1, 0, 0.502112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346922,-99) , +8, -0.981405, 0, 0, 0.495107,-99) , +12, 0.523186, 0, 0, 0.500877,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176108,-99) , +5, 2.49129, 1, 0, 0.498461,-99) ); + // itree = 1077 + fBoostWeights.push_back(0.00517879); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590854,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516938,-99) , +12, 0.127032, 1, 0, 0.556569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441539,-99) , +12, 0.030443, 0, 0, 0.544756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392945,-99) , +3, 0.999148, 1, 0, 0.535742,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299507,-99) , +4, 1.98841, 1, 0, 0.501182,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364371,-99) , +7, 0.026574, 1, 0, 0.488645,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.117036,-99) , +0, 26.5, 1, 0, 0.47873,-99) , +2, 16.5, 0, 0, 0.503556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314663,-99) , +3, 0.999674, 1, 0, 0.499045,-99) ); + // itree = 1078 + fBoostWeights.push_back(0.00668342); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.704139,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578886,-99) , +13, 0.00126575, 0, 0, 0.642123,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495697,-99) , +5, 2.09244, 0, 0, 0.528315,-99) , +15, 0.188767, 0, 0, 0.584027,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423158,-99) , +2, 11.5, 0, 0, 0.516913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395984,-99) , +15, 0.382922, 1, 0, 0.480386,-99) , +3, 0.975422, 1, 0, 0.527671,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286202,-99) , +3, 0.999207, 1, 0, 0.560769,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0715866,-99) , +0, 55.5, 1, 0, 0.46589,-99) , +2, 40.5, 0, 0, 0.478417,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.277402,-99) , +12, 0.0188313, 0, 0, 0.472959,-99) , +6, 0.296726, 1, 0, 0.491991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274516,-99) , +7, 0.0074299, 0, 0, 0.486743,-99) ); + // itree = 1079 + fBoostWeights.push_back(0.00400485); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648129,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625448,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529605,-99) , +1, 14.5, 0, 0, 0.563102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240562,-99) , +5, 2.02305, 1, 0, 0.549618,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351163,-99) , +7, 0.00884556, 0, 0, 0.482679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360167,-99) , +3, 0.999116, 1, 0, 0.475998,-99) , +9, 4.28317, 0, 0, 0.488452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303221,-99) , +5, 2.26567, 1, 0, 0.483664,-99) , +12, 0.526853, 0, 0, 0.489628,-99) ); + // itree = 1080 + fBoostWeights.push_back(0.00444211); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511453,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338881,-99) , +12, 0.01821, 0, 0, 0.506765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362299,-99) , +13, 0.0377402, 1, 0, 0.50126,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.289066,-99) , +7, 0.0115443, 0, 0, 0.384658,-99) , +15, 0.0417649, 0, 0, 0.492763,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374681,-99) , +10, 3759.61, 1, 0, 0.445614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315334,-99) , +15, 0.345926, 1, 0, 0.405527,-99) , +8, 0.984937, 1, 0, 0.482481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317835,-99) , +5, 2.23643, 1, 0, 0.477085,-99) ); + // itree = 1081 + fBoostWeights.push_back(0.00437972); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65227,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537339,-99) , +2, 23.5, 0, 0, 0.58549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481599,-99) , +13, 0.00186439, 0, 0, 0.557457,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640455,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32639,-99) , +13, 0.0206279, 1, 0, 0.474362,-99) , +12, 0.499302, 0, 0, 0.481618,-99) , +5, 1.13304, 1, 0, 0.496717,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.357109,-99) , +5, 0.436112, 0, 0, 0.490776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297226,-99) , +5, 2.25092, 1, 0, 0.484971,-99) ); + // itree = 1082 + fBoostWeights.push_back(0.00593756); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688622,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653267,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455004,-99) , +8, 0.922005, 1, 0, 0.528223,-99) , +9, -5.16376, 1, 0, 0.547395,-99) , +6, 0.0824607, 1, 0, 0.565557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358263,-99) , +14, -4.84626, 0, 0, 0.550831,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484735,-99) , +10, -2390.49, 1, 0, 0.497845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.227325,-99) , +1, 5.5, 0, 0, 0.491914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123923,-99) , +7, 0.135521, 1, 0, 0.486655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308242,-99) , +1, 52.5, 1, 0, 0.4783,-99) , +11, 1.5, 0, 0, 0.502641,-99) ); + // itree = 1083 + fBoostWeights.push_back(0.00575202); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.688896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523075,-99) , +6, 0.288252, 1, 0, 0.617039,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.599223,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216828,-99) , +4, 1.99501, 1, 0, 0.487475,-99) , +9, -5.46381, 1, 0, 0.506702,-99) , +3, 0.950137, 1, 0, 0.534205,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517899,-99) , +2, 30.5, 0, 0, 0.55011,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410321,-99) , +15, 0.263585, 1, 0, 0.455173,-99) , +13, 0.00263629, 0, 0, 0.516421,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490082,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417133,-99) , +11, 0.5, 1, 0, 0.453063,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279283,-99) , +7, 0.0695649, 1, 0, 0.440815,-99) , +5, 1.39177, 1, 0, 0.472276,-99) , +11, 1.5, 0, 0, 0.493384,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303805,-99) , +3, 0.999645, 1, 0, 0.488816,-99) ); + // itree = 1084 + fBoostWeights.push_back(0.00512794); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701548,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588311,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4693,-99) , +3, 0.987483, 1, 0, 0.524941,-99) , +15, 0.569292, 1, 0, 0.58111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221216,-99) , +1, 14.5, 0, 0, 0.5614,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482847,-99) , +16, 471.29, 1, 0, 0.503643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328241,-99) , +1, 34.5, 1, 0, 0.498631,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180729,-99) , +7, 0.079848, 1, 0, 0.492528,-99) , +2, 39.5, 0, 0, 0.501794,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.441638,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189471,-99) , +5, 1.75954, 1, 0, 0.409482,-99) , +8, -0.935835, 0, 0, 0.494043,-99) ); + // itree = 1085 + fBoostWeights.push_back(0.0072037); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60028,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512989,-99) , +6, 0.662033, 1, 0, 0.568961,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443061,-99) , +8, -0.893293, 0, 0, 0.555435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400759,-99) , +16, 3.32022, 0, 0, 0.531427,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521692,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128526,-99) , +4, 2.06351, 1, 0, 0.516908,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49148,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25286,-99) , +2, 21.5, 0, 0, 0.439377,-99) , +7, 0.0331436, 1, 0, 0.489081,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465672,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325094,-99) , +8, 0.887412, 1, 0, 0.435214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252999,-99) , +5, 1.8762, 1, 0, 0.399064,-99) , +7, 0.0128262, 0, 0, 0.468563,-99) , +16, 271.158, 1, 0, 0.490118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291676,-99) , +3, 0.99965, 1, 0, 0.485402,-99) ); + // itree = 1086 + fBoostWeights.push_back(0.00396328); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666474,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522951,-99) , +3, 0.993795, 1, 0, 0.608415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488481,-99) , +9, 1.36647, 1, 0, 0.570262,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501221,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199758,-99) , +4, 2.20307, 1, 0, 0.499593,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272712,-99) , +7, 0.0650985, 1, 0, 0.491455,-99) , +2, 39.5, 0, 0, 0.501032,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0870051,-99) , +7, 0.330376, 1, 0, 0.49932,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299113,-99) , +12, 0.01821, 0, 0, 0.494729,-99) ); + // itree = 1087 + fBoostWeights.push_back(0.0052142); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594676,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513662,-99) , +10, 2476.5, 1, 0, 0.550066,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318068,-99) , +12, 0.0165015, 0, 0, 0.539996,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590636,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469155,-99) , +2, 25.5, 0, 0, 0.488624,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260984,-99) , +7, 0.0997566, 1, 0, 0.478507,-99) , +12, 0.113401, 1, 0, 0.507746,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249921,-99) , +3, 0.687679, 0, 0, 0.503582,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358969,-99) , +5, 0.505717, 0, 0, 0.497053,-99) ); + // itree = 1088 + fBoostWeights.push_back(0.00420354); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578352,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.468599,-99) , +14, -2.89052, 0, 0, 0.542808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420175,-99) , +5, 0.523452, 0, 0, 0.527672,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566069,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480069,-99) , +3, 0.957042, 1, 0, 0.492427,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341164,-99) , +8, 0.821653, 0, 0, 0.387143,-99) , +3, 0.913341, 0, 0, 0.478759,-99) , +4, 0.891937, 1, 0, 0.497912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333621,-99) , +3, 0.999665, 1, 0, 0.494292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295501,-99) , +5, 2.25092, 1, 0, 0.488534,-99) ); + // itree = 1089 + fBoostWeights.push_back(0.00320681); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633583,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398865,-99) , +14, -4.57863, 0, 0, 0.516579,-99) , +8, 0.999557, 0, 0, 0.521588,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322353,-99) , +4, 2.07717, 1, 0, 0.518468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32725,-99) , +12, 0.0192724, 0, 0, 0.513828,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503434,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243044,-99) , +5, 1.84979, 1, 0, 0.354642,-99) , +3, 0.951219, 1, 0, 0.401856,-99) , +8, -0.945944, 0, 0, 0.505017,-99) ); + // itree = 1090 + fBoostWeights.push_back(0.00436249); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554551,-99) , +9, -7.2959, 1, 0, 0.569208,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426446,-99) , +7, 0.0256827, 1, 0, 0.491082,-99) , +10, 1979.63, 0, 0, 0.539339,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.351597,-99) , +10, 4808.75, 1, 0, 0.457729,-99) , +12, 0.0465163, 0, 0, 0.523385,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372989,-99) , +7, 0.084193, 1, 0, 0.483544,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326622,-99) , +2, 7.5, 0, 0, 0.475917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336175,-99) , +3, 0.999388, 1, 0, 0.468266,-99) , +16, 957.348, 1, 0, 0.493198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353464,-99) , +8, -0.972059, 0, 0, 0.486156,-99) ); + // itree = 1091 + fBoostWeights.push_back(0.00449357); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564338,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256969,-99) , +1, 12.5, 0, 0, 0.548363,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200974,-99) , +7, 0.0565488, 1, 0, 0.480091,-99) , +2, 30.5, 0, 0, 0.491008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.158512,-99) , +5, 2.57722, 1, 0, 0.489454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120629,-99) , +7, 0.234429, 1, 0, 0.48751,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31321,-99) , +1, 68.5, 1, 0, 0.482494,-99) ); + // itree = 1092 + fBoostWeights.push_back(0.00819536); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628067,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621822,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259987,-99) , +5, 1.76068, 1, 0, 0.484923,-99) , +6, 0.483685, 1, 0, 0.550915,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47215,-99) , +4, 1.69365, 1, 0, 0.551811,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391481,-99) , +3, 0.979185, 1, 0, 0.434713,-99) , +4, 1.41532, 0, 0, 0.477835,-99) , +13, 0.00187741, 0, 0, 0.508242,-99) , +10, -4175.43, 1, 0, 0.52418,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516322,-99) , +8, 0.488867, 0, 0, 0.573517,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38989,-99) , +1, 9.5, 0, 0, 0.539601,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369053,-99) , +2, 9.5, 0, 0, 0.465867,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305407,-99) , +4, 1.70828, 1, 0, 0.452296,-99) , +9, -1.08584, 1, 0, 0.484256,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529255,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326483,-99) , +6, 0.946461, 0, 0, 0.362945,-99) , +9, 6.3294, 0, 0, 0.414962,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118772,-99) , +15, 0.614634, 1, 0, 0.393334,-99) , +3, 0.997126, 1, 0, 0.464806,-99) , +12, 0.101379, 1, 0, 0.49017,-99) ); + // itree = 1093 + fBoostWeights.push_back(0.00667618); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.667234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569259,-99) , +12, 0.0684851, 1, 0, 0.608791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56623,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402864,-99) , +1, 35.5, 1, 0, 0.509237,-99) , +16, 1716.19, 1, 0, 0.564616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.206714,-99) , +1, 10.5, 0, 0, 0.549936,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636179,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347793,-99) , +13, 0.0163313, 1, 0, 0.482187,-99) , +9, -9.77374, 1, 0, 0.48939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26268,-99) , +7, 0.0393753, 1, 0, 0.476494,-99) , +2, 23.5, 0, 0, 0.496141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278654,-99) , +12, 0.0173719, 0, 0, 0.491372,-99) ); + // itree = 1094 + fBoostWeights.push_back(0.00233828); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.632902,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480324,-99) , +4, 0.838802, 1, 0, 0.499742,-99) , +10, -13241, 1, 0, 0.504897,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34263,-99) , +3, 0.999685, 1, 0, 0.501037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312359,-99) , +2, 6.5, 0, 0, 0.497617,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.163201,-99) , +5, 2.5698, 1, 0, 0.496289,-99) ); + // itree = 1095 + fBoostWeights.push_back(0.00512759); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635887,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623189,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49304,-99) , +7, 0.0209882, 0, 0, 0.572999,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380479,-99) , +4, -0.205876, 0, 0, 0.492308,-99) , +3, 0.951049, 1, 0, 0.513607,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618011,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47716,-99) , +10, 12318.8, 0, 0, 0.494368,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431632,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.268703,-99) , +4, 1.82178, 1, 0, 0.416775,-99) , +12, 0.124355, 1, 0, 0.455328,-99) , +4, 0.913059, 1, 0, 0.478844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291759,-99) , +14, -5.77556, 0, 0, 0.474264,-99) , +10, -13278.5, 1, 0, 0.47997,-99) ); + // itree = 1096 + fBoostWeights.push_back(0.00458922); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.682283,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606444,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537274,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457158,-99) , +9, 1.73686, 1, 0, 0.520353,-99) , +10, -4132.79, 1, 0, 0.530479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38566,-99) , +12, 0.0165266, 0, 0, 0.524248,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.592912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46439,-99) , +5, 1.66456, 1, 0, 0.55673,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582328,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442889,-99) , +9, 8.68126, 0, 0, 0.453137,-99) , +10, 9477.89, 0, 0, 0.467866,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305505,-99) , +5, 2.12369, 1, 0, 0.456856,-99) , +12, 0.11223, 1, 0, 0.489813,-99) , +12, 0.523169, 0, 0, 0.496769,-99) ); + // itree = 1097 + fBoostWeights.push_back(0.00559185); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616461,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525119,-99) , +13, 0.0110552, 1, 0, 0.580588,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524875,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426174,-99) , +15, 0.293737, 1, 0, 0.484036,-99) , +8, 0.424525, 1, 0, 0.535331,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515977,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.394628,-99) , +12, 0.0312599, 0, 0, 0.503631,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477474,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305037,-99) , +5, 1.42822, 1, 0, 0.381575,-99) , +13, 0.0074373, 1, 0, 0.479628,-99) , +4, 0.860427, 1, 0, 0.500212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.244798,-99) , +7, 0.00677737, 0, 0, 0.496999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328074,-99) , +8, -0.988169, 0, 0, 0.491349,-99) ); + // itree = 1098 + fBoostWeights.push_back(0.002897); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603528,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504252,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383348,-99) , +14, -1.5919, 1, 0, 0.498218,-99) , +5, 0.799129, 1, 0, 0.504183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322348,-99) , +7, 0.00711389, 0, 0, 0.500402,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380913,-99) , +5, 0.455288, 0, 0, 0.494951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.267657,-99) , +3, 0.999642, 1, 0, 0.489806,-99) ); + // itree = 1099 + fBoostWeights.push_back(0.0037775); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638794,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398119,-99) , +5, 0.516124, 0, 0, 0.508224,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234502,-99) , +13, 0.0151468, 1, 0, 0.45918,-99) , +5, 1.59853, 1, 0, 0.487893,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.246433,-99) , +7, 0.00668203, 0, 0, 0.484858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.201656,-99) , +13, 0.065529, 1, 0, 0.481572,-99) , +12, 0.52475, 0, 0, 0.487068,-99) ); + // itree = 1100 + fBoostWeights.push_back(0.00412383); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.706291,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508618,-99) , +16, 74.1657, 1, 0, 0.531203,-99) , +4, 1.81105, 0, 0, 0.54868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0945496,-99) , +5, 2.27317, 1, 0, 0.54224,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621399,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494596,-99) , +10, 455.687, 1, 0, 0.500498,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308381,-99) , +8, 0.652423, 1, 0, 0.412183,-99) , +9, 1.71293, 1, 0, 0.491031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229603,-99) , +13, 0.0719091, 1, 0, 0.488213,-99) , +9, 2.91299, 0, 0, 0.501234,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326017,-99) , +3, 0.999637, 1, 0, 0.496581,-99) ); + // itree = 1101 + fBoostWeights.push_back(0.00576262); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.729653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.429976,-99) , +8, 0.970212, 1, 0, 0.533704,-99) , +4, 1.80265, 0, 0, 0.550951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133827,-99) , +1, 10.5, 0, 0, 0.537219,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557364,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475997,-99) , +16, 11.9843, 1, 0, 0.487212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292943,-99) , +14, -5.69376, 0, 0, 0.481905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.129637,-99) , +7, 0.0548971, 1, 0, 0.47534,-99) , +2, 24.5, 0, 0, 0.49107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166688,-99) , +7, 0.24866, 1, 0, 0.488559,-99) ); + // itree = 1102 + fBoostWeights.push_back(0.00734282); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.26469, 1, 0, 0.561183,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356669,-99) , +8, 0.967, 0, 0, 0.476893,-99) , +8, 0.921572, 1, 0, 0.537747,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59825,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507614,-99) , +13, 0.00150755, 0, 0, 0.543698,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393765,-99) , +9, 2.34593, 0, 0, 0.439019,-99) , +12, 0.0995748, 1, 0, 0.483534,-99) , +9, -0.213307, 1, 0, 0.510148,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455101,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362035,-99) , +15, 0.13122, 0, 0, 0.419368,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0677164,-99) , +4, 1.63673, 1, 0, 0.404849,-99) , +8, -0.947019, 0, 0, 0.501551,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548993,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342612,-99) , +9, -6.62922, 1, 0, 0.416789,-99) , +10, -5211.24, 1, 0, 0.45292,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.062391,-99) , +5, 2.15967, 1, 0, 0.442016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132709,-99) , +0, 86.5, 1, 0, 0.422815,-99) , +3, 0.998129, 1, 0, 0.489675,-99) ); + // itree = 1103 + fBoostWeights.push_back(0.00584127); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516281,-99) , +5, 1.97941, 0, 0, 0.590686,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648674,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578602,-99) , +6, 0.0721518, 1, 0, 0.611842,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530863,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.435448,-99) , +15, 0.0888596, 0, 0, 0.494589,-99) , +1, 15.5, 0, 0, 0.553889,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269577,-99) , +13, 0.0643836, 1, 0, 0.481845,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345473,-99) , +8, 0.983154, 1, 0, 0.473086,-99) , +6, 0.171633, 1, 0, 0.490974,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471765,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160981,-99) , +8, 0.946389, 0, 0, 0.330215,-99) , +5, 2.08848, 1, 0, 0.481364,-99) , +8, 0.998216, 0, 0, 0.488586,-99) ); + // itree = 1104 + fBoostWeights.push_back(0.00372105); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658634,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494847,-99) , +10, -3867.5, 1, 0, 0.508318,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.393279,-99) , +12, 0.138799, 1, 0, 0.445698,-99) , +7, 0.0144882, 0, 0, 0.491358,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.16275,-99) , +7, 0.24882, 1, 0, 0.489051,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297645,-99) , +12, 0.0173719, 0, 0, 0.484914,-99) , +12, 0.536636, 0, 0, 0.490202,-99) ); + // itree = 1105 + fBoostWeights.push_back(0.00325422); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508,-99) , +0, 19.5, 0, 0, 0.545935,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405257,-99) , +7, 0.0600099, 1, 0, 0.49123,-99) , +11, 1.5, 0, 0, 0.509388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0800422,-99) , +5, 2.54964, 1, 0, 0.507695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381568,-99) , +14, -5.29943, 0, 0, 0.502522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304198,-99) , +3, 0.723285, 0, 0, 0.497802,-99) ); + // itree = 1106 + fBoostWeights.push_back(0.00432295); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628695,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516094,-99) , +16, 1551.88, 0, 0, 0.578226,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5464,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487027,-99) , +9, 3.60073, 0, 0, 0.500243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370158,-99) , +8, -0.982737, 0, 0, 0.493905,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316634,-99) , +14, -5.46183, 0, 0, 0.489346,-99) , +10, 12234, 0, 0, 0.497584,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443948,-99) , +16, 213.866, 1, 0, 0.513831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.247126,-99) , +8, 0.946369, 0, 0, 0.409614,-99) , +5, 2.02747, 1, 0, 0.489142,-99) ); + // itree = 1107 + fBoostWeights.push_back(0.0024101); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482557,-99) , +9, -1.21626, 1, 0, 0.50112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388868,-99) , +8, -0.983947, 0, 0, 0.496416,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324701,-99) , +4, 2.06704, 1, 0, 0.493591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306708,-99) , +15, 3.99085, 1, 0, 0.490065,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302625,-99) , +1, 5.5, 0, 0, 0.48615,-99) ); + // itree = 1108 + fBoostWeights.push_back(0.00576096); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596996,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582801,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469001,-99) , +4, 1.43323, 0, 0, 0.491428,-99) , +13, 0.0112774, 0, 0, 0.510983,-99) , +3, 0.936097, 1, 0, 0.531376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516188,-99) , +1, 33.5, 1, 0, 0.559106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418708,-99) , +7, 0.113159, 1, 0, 0.527095,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369708,-99) , +4, 1.664, 1, 0, 0.470355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126504,-99) , +7, 0.0571202, 1, 0, 0.460043,-99) , +2, 30.5, 0, 0, 0.472486,-99) , +16, 82.2326, 1, 0, 0.487327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436055,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165683,-99) , +13, 0.0008453, 1, 0, 0.350543,-99) , +4, 1.82602, 1, 0, 0.479535,-99) ); + // itree = 1109 + fBoostWeights.push_back(0.00474625); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619577,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494573,-99) , +15, 0.518482, 1, 0, 0.580408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450424,-99) , +15, 0.0983021, 0, 0, 0.551099,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515903,-99) , +15, 0.0874258, 0, 0, 0.56892,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335907,-99) , +8, 0.991409, 1, 0, 0.483672,-99) , +7, 0.0149157, 1, 0, 0.508071,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433767,-99) , +7, 0.035136, 1, 0, 0.516944,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459044,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.346669,-99) , +7, 0.0135718, 0, 0, 0.428699,-99) , +9, 2.88768, 0, 0, 0.4543,-99) , +16, 1086.16, 1, 0, 0.478991,-99) , +10, 10209, 0, 0, 0.488372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35672,-99) , +4, 1.96546, 1, 0, 0.484335,-99) ); + // itree = 1110 + fBoostWeights.push_back(0.00482318); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497985,-99) , +5, 2.38323, 0, 0, 0.502256,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305451,-99) , +1, 70.5, 1, 0, 0.497659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305857,-99) , +7, 0.184535, 1, 0, 0.493706,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533851,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235569,-99) , +3, 0.907501, 0, 0, 0.441736,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281732,-99) , +7, 0.0106416, 1, 0, 0.390785,-99) , +12, 0.0701243, 1, 0, 0.428504,-99) , +7, 0.0124274, 0, 0, 0.480857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311675,-99) , +12, 0.0195631, 0, 0, 0.47641,-99) ); + // itree = 1111 + fBoostWeights.push_back(0.00360121); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534938,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433326,-99) , +6, 0.994188, 1, 0, 0.524242,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337001,-99) , +1, 12.5, 0, 0, 0.463535,-99) , +15, 0.471812, 1, 0, 0.509436,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523989,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.410322,-99) , +10, 1747.96, 1, 0, 0.454697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177978,-99) , +5, 2.02871, 1, 0, 0.443774,-99) , +8, -0.852154, 0, 0, 0.500709,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281241,-99) , +13, 0.0797573, 1, 0, 0.498301,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298505,-99) , +3, 0.999689, 1, 0, 0.494271,-99) ); + // itree = 1112 + fBoostWeights.push_back(0.00360266); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653717,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551944,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373621,-99) , +1, 12.5, 0, 0, 0.53956,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334586,-99) , +7, 0.0376441, 1, 0, 0.473304,-99) , +2, 24.5, 0, 0, 0.488608,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365065,-99) , +13, 0.0303186, 1, 0, 0.483322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29807,-99) , +12, 0.0173719, 0, 0, 0.479385,-99) , +12, 0.534864, 0, 0, 0.484941,-99) ); + // itree = 1113 + fBoostWeights.push_back(0.00398239); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631994,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.533095,-99) , +0, 40.5, 0, 0, 0.549869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15914,-99) , +4, 2.16211, 1, 0, 0.545683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147444,-99) , +7, 0.246898, 1, 0, 0.496423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243257,-99) , +1, 69.5, 1, 0, 0.490836,-99) , +11, 1.5, 0, 0, 0.509397,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272199,-99) , +7, 0.0071142, 0, 0, 0.505001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341857,-99) , +5, 0.538452, 0, 0, 0.498027,-99) ); + // itree = 1114 + fBoostWeights.push_back(0.00255719); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644325,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51591,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412815,-99) , +12, 0.0246049, 0, 0, 0.510552,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122761,-99) , +4, 1.64398, 1, 0, 0.437425,-99) , +8, -0.885179, 0, 0, 0.502057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364299,-99) , +7, 0.00752411, 0, 0, 0.498003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342191,-99) , +3, 0.999597, 1, 0, 0.493597,-99) , +10, -15775.4, 1, 0, 0.497788,-99) ); + // itree = 1115 + fBoostWeights.push_back(0.00564596); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607037,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.60666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517339,-99) , +6, 1.00666, 0, 0, 0.528394,-99) , +4, 0.287028, 1, 0, 0.539985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424007,-99) , +16, 2.04717, 0, 0, 0.531187,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.606496,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519252,-99) , +10, 1042.37, 1, 0, 0.546568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.449711,-99) , +15, 0.736775, 1, 0, 0.527538,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517396,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419822,-99) , +12, 0.113941, 1, 0, 0.467259,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271103,-99) , +13, 0.00609553, 1, 0, 0.438019,-99) , +5, 1.42437, 1, 0, 0.475785,-99) , +16, 1107.81, 1, 0, 0.502257,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584426,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474444,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37354,-99) , +4, 0.643759, 1, 0, 0.415468,-99) , +4, 1.33929, 0, 0, 0.446543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0995118,-99) , +4, 1.64467, 1, 0, 0.430409,-99) , +8, -0.852154, 0, 0, 0.49245,-99) ); + // itree = 1116 + fBoostWeights.push_back(0.00491944); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308942,-99) , +5, 2.02587, 1, 0, 0.535687,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494226,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35697,-99) , +3, 0.99823, 1, 0, 0.480095,-99) , +13, 0.00177499, 0, 0, 0.509114,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.395307,-99) , +2, 22.5, 0, 0, 0.45934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194227,-99) , +4, 1.33956, 1, 0, 0.425847,-99) , +13, 0.0187159, 1, 0, 0.501177,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507368,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241142,-99) , +14, -3.65136, 1, 0, 0.381849,-99) , +4, 1.8333, 1, 0, 0.494666,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271176,-99) , +1, 5.5, 0, 0, 0.490277,-99) ); + // itree = 1117 + fBoostWeights.push_back(0.00583416); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.653291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558261,-99) , +0, 21.5, 0, 0, 0.590969,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501149,-99) , +15, 0.50341, 1, 0, 0.567829,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421182,-99) , +13, 0.000112907, 0, 0, 0.550289,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495307,-99) , +10, 5720.12, 0, 0, 0.517584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443412,-99) , +12, 0.0446698, 0, 0, 0.504652,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.366189,-99) , +10, 2376.35, 1, 0, 0.435177,-99) , +7, 0.0148994, 0, 0, 0.487765,-99) , +6, 0.372111, 1, 0, 0.511889,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.583814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469473,-99) , +12, 0.0761434, 1, 0, 0.505204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241811,-99) , +6, 0.993947, 1, 0, 0.495279,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348422,-99) , +3, 0.997643, 1, 0, 0.473819,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226532,-99) , +8, -0.897119, 0, 0, 0.460398,-99) , +5, 1.67862, 1, 0, 0.493947,-99) ); + // itree = 1118 + fBoostWeights.push_back(0.00694129); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.684787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.587366,-99) , +8, -0.122236, 0, 0, 0.641102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483394,-99) , +13, 0.00113731, 0, 0, 0.583502,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562355,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334322,-99) , +10, 4814.67, 0, 0, 0.430042,-99) , +9, 0.61647, 0, 0, 0.490301,-99) , +1, 15.5, 0, 0, 0.535997,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493154,-99) , +9, -3.13472, 1, 0, 0.511042,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419857,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.120983,-99) , +4, 1.65434, 1, 0, 0.401377,-99) , +8, -0.851972, 0, 0, 0.497561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.282963,-99) , +2, 25.5, 0, 0, 0.46087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.152539,-99) , +1, 12.5, 0, 0, 0.423654,-99) , +7, 0.0397736, 1, 0, 0.480918,-99) , +6, 0.20964, 1, 0, 0.496303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294752,-99) , +4, 2.07376, 1, 0, 0.493094,-99) ); + // itree = 1119 + fBoostWeights.push_back(0.00400914); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62597,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603339,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502809,-99) , +5, 1.96182, 0, 0, 0.516802,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355629,-99) , +12, 0.0181974, 0, 0, 0.507958,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56053,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451619,-99) , +2, 12.5, 0, 0, 0.529383,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402138,-99) , +16, 458.574, 1, 0, 0.434952,-99) , +5, 1.25213, 1, 0, 0.462902,-99) , +12, 0.110584, 1, 0, 0.48429,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.23428,-99) , +13, 0.072936, 1, 0, 0.481781,-99) , +12, 0.527172, 0, 0, 0.486523,-99) ); + // itree = 1120 + fBoostWeights.push_back(0.00582751); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.620575,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529316,-99) , +16, 113.497, 0, 0, 0.597731,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439745,-99) , +13, 0.0352018, 1, 0, 0.578305,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424983,-99) , +12, 0.0326435, 0, 0, 0.5595,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287123,-99) , +1, 11.5, 0, 0, 0.545366,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392621,-99) , +8, -0.893242, 0, 0, 0.478002,-99) , +9, -9.89696, 1, 0, 0.483839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275935,-99) , +0, 33.5, 1, 0, 0.479235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.119403,-99) , +7, 0.0571965, 1, 0, 0.471943,-99) , +2, 25.5, 0, 0, 0.490339,-99) ); + // itree = 1121 + fBoostWeights.push_back(0.00662623); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566829,-99) , +13, 0.0104343, 1, 0, 0.627709,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460238,-99) , +4, 1.37588, 0, 0, 0.505305,-99) , +13, 0.00375146, 0, 0, 0.568917,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229807,-99) , +4, 1.98895, 1, 0, 0.495809,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.236915,-99) , +7, 0.0465572, 1, 0, 0.488012,-99) , +2, 24.5, 0, 0, 0.504469,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401195,-99) , +3, 0.983098, 1, 0, 0.467584,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0526158,-99) , +1, 19.5, 0, 0, 0.406687,-99) , +7, 0.0891686, 1, 0, 0.497006,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286995,-99) , +7, 0.00725398, 0, 0, 0.493278,-99) ); + // itree = 1122 + fBoostWeights.push_back(0.00531335); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699177,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502855,-99) , +8, 0.717763, 1, 0, 0.54769,-99) , +5, 2.13107, 0, 0, 0.557389,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58422,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440045,-99) , +8, -0.345446, 1, 0, 0.482476,-99) , +7, 0.0114994, 1, 0, 0.503245,-99) , +12, 0.0455111, 0, 0, 0.539353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.336465,-99) , +15, 3.95256, 1, 0, 0.532048,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.635115,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666057,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476321,-99) , +2, 42.5, 0, 0, 0.490423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303425,-99) , +1, 55.5, 1, 0, 0.482529,-99) , +15, 0.0370818, 1, 0, 0.49666,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423928,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223092,-99) , +3, 0.932162, 0, 0, 0.380983,-99) , +7, 0.0102091, 0, 0, 0.483721,-99) , +12, 0.111609, 1, 0, 0.506437,-99) ); + // itree = 1123 + fBoostWeights.push_back(0.00757568); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.642956,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522286,-99) , +3, 0.946639, 1, 0, 0.551495,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.561752,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.450646,-99) , +6, 1.04782, 0, 0, 0.48269,-99) , +6, 0.580705, 1, 0, 0.518267,-99) , +9, -6.53647, 1, 0, 0.530372,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462049,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344426,-99) , +14, -4.2038, 1, 0, 0.409649,-99) , +14, -3.56373, 0, 0, 0.513091,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457818,-99) , +5, 1.9029, 0, 0, 0.546527,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41919,-99) , +4, 0.842007, 1, 0, 0.441176,-99) , +12, 0.0761796, 1, 0, 0.474909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271159,-99) , +12, 0.0227642, 0, 0, 0.465612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.253376,-99) , +13, 0.00824494, 1, 0, 0.44202,-99) , +5, 1.64948, 1, 0, 0.486756,-99) ); + // itree = 1124 + fBoostWeights.push_back(0.00328443); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.668221,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485372,-99) , +6, 0.171633, 1, 0, 0.500658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.121593,-99) , +5, 2.54949, 1, 0, 0.499214,-99) , +10, -15145.2, 1, 0, 0.504297,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328728,-99) , +7, 0.00788594, 0, 0, 0.498434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335157,-99) , +14, -5.20233, 0, 0, 0.491094,-99) ); + // itree = 1125 + fBoostWeights.push_back(0.00355077); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.546583,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444706,-99) , +14, -4.60971, 0, 0, 0.53622,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485018,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291825,-99) , +3, 0.772968, 0, 0, 0.478187,-99) , +16, 186.771, 1, 0, 0.495795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176309,-99) , +7, 0.177929, 1, 0, 0.492653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.349666,-99) , +1, 63.5, 1, 0, 0.48741,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.150359,-99) , +5, 2.49375, 1, 0, 0.485135,-99) ); + // itree = 1126 + fBoostWeights.push_back(0.00566877); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522491,-99) , +8, -0.741139, 0, 0, 0.593602,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459522,-99) , +13, 0.000685851, 0, 0, 0.569586,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440996,-99) , +5, 0.602124, 0, 0, 0.551398,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345022,-99) , +15, 0.149219, 1, 0, 0.432438,-99) , +2, 11.5, 0, 0, 0.522408,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45692,-99) , +14, -2.97632, 1, 0, 0.492848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287733,-99) , +3, 0.732894, 0, 0, 0.486622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30228,-99) , +3, 0.999404, 1, 0, 0.479445,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123431,-99) , +1, 69.5, 1, 0, 0.474077,-99) , +5, 1.46944, 1, 0, 0.496397,-99) ); + // itree = 1127 + fBoostWeights.push_back(0.00268094); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643897,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.508506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299522,-99) , +13, 0.0567385, 1, 0, 0.504991,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345832,-99) , +12, 0.0191123, 0, 0, 0.50052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324975,-99) , +3, 0.731403, 0, 0, 0.496354,-99) , +12, 0.526248, 0, 0, 0.501343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312167,-99) , +2, 6.5, 0, 0, 0.497663,-99) ); + // itree = 1128 + fBoostWeights.push_back(0.00645746); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638211,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619043,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516666,-99) , +13, 0.00820079, 1, 0, 0.574511,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461402,-99) , +6, 0.818521, 1, 0, 0.531148,-99) , +2, 30.5, 0, 0, 0.564923,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551816,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.401534,-99) , +8, 0.711759, 1, 0, 0.45597,-99) , +8, 0.973276, 0, 0, 0.481978,-99) , +13, 0.00207063, 0, 0, 0.53703,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440698,-99) , +14, -4.60765, 0, 0, 0.542159,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496663,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358012,-99) , +8, -0.257752, 0, 0, 0.468149,-99) , +12, 0.102993, 1, 0, 0.499286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.200913,-99) , +7, 0.00691566, 0, 0, 0.493855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30054,-99) , +7, 0.0684201, 1, 0, 0.479375,-99) , +5, 1.41352, 1, 0, 0.503417,-99) ); + // itree = 1129 + fBoostWeights.push_back(0.0062008); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634138,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5133,-99) , +3, 0.942448, 1, 0, 0.540697,-99) , +9, 2.91876, 0, 0, 0.565488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.96611, 1, 0, 0.558767,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567734,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361256,-99) , +6, 0.437875, 1, 0, 0.399484,-99) , +5, 1.88773, 0, 0, 0.466405,-99) , +13, 0.000749353, 0, 0, 0.526058,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604162,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37332,-99) , +12, 0.0312472, 0, 0, 0.481388,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226946,-99) , +5, 1.63661, 1, 0, 0.39446,-99) , +8, -0.818665, 0, 0, 0.467935,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0414813,-99) , +5, 2.31026, 1, 0, 0.462724,-99) , +8, 0.998291, 0, 0, 0.47157,-99) , +11, 1.5, 0, 0, 0.489634,-99) ); + // itree = 1130 + fBoostWeights.push_back(0.00536286); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637406,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581571,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490234,-99) , +3, 0.974461, 1, 0, 0.528344,-99) , +10, 10942.6, 0, 0, 0.545096,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390308,-99) , +14, -4.4724, 0, 0, 0.532151,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49271,-99) , +6, 0.786449, 1, 0, 0.542742,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447592,-99) , +13, 0.00144117, 0, 0, 0.520426,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286328,-99) , +0, 43.5, 1, 0, 0.488309,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39844,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0813937,-99) , +5, 2.06763, 1, 0, 0.378394,-99) , +13, 0.00342481, 1, 0, 0.453701,-99) , +5, 1.4112, 1, 0, 0.482979,-99) , +11, 1.5, 0, 0, 0.499225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330623,-99) , +8, 0.999655, 1, 0, 0.495553,-99) ); + // itree = 1131 + fBoostWeights.push_back(0.00701906); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655746,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271948,-99) , +15, 0.0419275, 0, 0, 0.536786,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417183,-99) , +12, 0.232972, 0, 0, 0.449701,-99) , +14, -3.17169, 0, 0, 0.5125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367034,-99) , +5, 0.438112, 0, 0, 0.503814,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515843,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408578,-99) , +12, 0.115072, 1, 0, 0.460768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.132323,-99) , +8, -0.967167, 0, 0, 0.451321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224734,-99) , +0, 45.5, 1, 0, 0.430526,-99) , +4, 1.46005, 1, 0, 0.486587,-99) , +12, 0.525387, 0, 0, 0.492501,-99) ); + // itree = 1132 + fBoostWeights.push_back(0.00550211); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593719,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481795,-99) , +8, -0.545434, 0, 0, 0.568395,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51095,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367935,-99) , +12, 0.0233798, 0, 0, 0.504088,-99) , +6, 0.141134, 1, 0, 0.51729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379027,-99) , +14, -5.44797, 0, 0, 0.512711,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570364,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453568,-99) , +3, 0.980793, 1, 0, 0.519199,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296477,-99) , +0, 11.5, 1, 0, 0.422233,-99) , +6, 0.519903, 1, 0, 0.477268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304562,-99) , +7, 0.0181505, 1, 0, 0.449988,-99) , +2, 11.5, 0, 0, 0.492927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.298524,-99) , +3, 0.999638, 1, 0, 0.487966,-99) ); + // itree = 1133 + fBoostWeights.push_back(0.00442284); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565661,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4949,-99) , +16, 2324.06, 1, 0, 0.530228,-99) , +2, 29.5, 0, 0, 0.561145,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521467,-99) , +4, 1.73733, 0, 0, 0.554596,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151241,-99) , +5, 2.49011, 1, 0, 0.488353,-99) , +9, -3.19236, 1, 0, 0.503835,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424099,-99) , +2, 16.5, 0, 0, 0.474087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194855,-99) , +5, 1.9012, 1, 0, 0.448633,-99) , +13, 0.00523797, 1, 0, 0.488542,-99) , +5, 1.06055, 1, 0, 0.499713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392207,-99) , +5, 0.425894, 0, 0, 0.494732,-99) ); + // itree = 1134 + fBoostWeights.push_back(0.00534054); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.64816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519697,-99) , +3, 0.983552, 1, 0, 0.587446,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44609,-99) , +8, -0.856588, 0, 0, 0.53754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.161668,-99) , +5, 2.40686, 1, 0, 0.533237,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34998,-99) , +5, 1.95203, 0, 0, 0.424852,-99) , +8, 0.974443, 1, 0, 0.514152,-99) , +4, 0.507793, 1, 0, 0.530437,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517987,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430282,-99) , +6, 0.900935, 1, 0, 0.496688,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338583,-99) , +7, 0.0087041, 0, 0, 0.487277,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264261,-99) , +8, 0.998295, 0, 0, 0.380714,-99) , +14, -4.33159, 0, 0, 0.477002,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212307,-99) , +5, 2.29248, 1, 0, 0.472276,-99) , +16, 1100.17, 1, 0, 0.499112,-99) ); + // itree = 1135 + fBoostWeights.push_back(0.00604177); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650935,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.57972,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419591,-99) , +12, 0.0330036, 0, 0, 0.558604,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189501,-99) , +1, 10.5, 0, 0, 0.54278,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.276853,-99) , +4, 2.03924, 1, 0, 0.489746,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398197,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.118784,-99) , +2, 13.5, 0, 0, 0.34694,-99) , +7, 0.0327492, 1, 0, 0.474472,-99) , +2, 24.5, 0, 0, 0.491371,-99) , +12, 0.507814, 0, 0, 0.497633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328575,-99) , +5, 0.461375, 0, 0, 0.490725,-99) ); + // itree = 1136 + fBoostWeights.push_back(0.00338596); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516345,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.163489,-99) , +7, 0.200889, 1, 0, 0.5149,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.54974, 1, 0, 0.513304,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515076,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304576,-99) , +8, 0.998645, 0, 0, 0.421908,-99) , +14, -4.60198, 0, 0, 0.505424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.344551,-99) , +1, 68.5, 1, 0, 0.501634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.251968,-99) , +15, 4.16271, 1, 0, 0.49782,-99) ); + // itree = 1137 + fBoostWeights.push_back(0.00505417); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66288,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566681,-99) , +2, 16.5, 0, 0, 0.597757,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485482,-99) , +7, 0.0568302, 1, 0, 0.57942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452706,-99) , +8, -0.897236, 0, 0, 0.56004,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55643,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376272,-99) , +0, 18.5, 0, 0, 0.474899,-99) , +8, 0.920467, 1, 0, 0.53683,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335751,-99) , +8, -0.98764, 0, 0, 0.492988,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296133,-99) , +1, 5.5, 0, 0, 0.487303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225405,-99) , +1, 50.5, 1, 0, 0.481097,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.333647,-99) , +7, 0.105836, 1, 0, 0.473451,-99) , +11, 1.5, 0, 0, 0.495354,-99) ); + // itree = 1138 + fBoostWeights.push_back(0.00409472); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656151,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512847,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.122337,-99) , +4, 1.96529, 1, 0, 0.50796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400724,-99) , +5, 1.96182, 0, 0, 0.445507,-99) , +14, -3.58284, 0, 0, 0.494354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.127527,-99) , +7, 0.328926, 1, 0, 0.492939,-99) , +12, 0.535437, 0, 0, 0.498273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.184884,-99) , +5, 2.4913, 1, 0, 0.496006,-99) ); + // itree = 1139 + fBoostWeights.push_back(0.00507391); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.708402,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3469,-99) , +4, 1.70868, 1, 0, 0.526934,-99) , +5, 2.17251, 0, 0, 0.539165,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493138,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355588,-99) , +8, 0.296922, 1, 0, 0.423257,-99) , +12, 0.0286175, 0, 0, 0.519458,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474128,-99) , +15, 0.0689888, 1, 0, 0.49627,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451068,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.314312,-99) , +6, 0.768004, 1, 0, 0.42115,-99) , +7, 0.0133309, 0, 0, 0.477463,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281891,-99) , +3, 0.999619, 1, 0, 0.472554,-99) , +12, 0.101394, 1, 0, 0.492268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.156965,-99) , +7, 0.25306, 1, 0, 0.489938,-99) ); + // itree = 1140 + fBoostWeights.push_back(0.00630899); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.692161,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563317,-99) , +1, 30.5, 1, 0, 0.621685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482226,-99) , +13, 0.00229582, 0, 0, 0.574425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280822,-99) , +1, 13.5, 0, 0, 0.553867,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374104,-99) , +8, -0.947225, 0, 0, 0.515857,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520626,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424135,-99) , +4, 0.70628, 1, 0, 0.453383,-99) , +1, 12.5, 1, 0, 0.489125,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.116077,-99) , +7, 0.0634026, 1, 0, 0.482217,-99) , +2, 29.5, 0, 0, 0.494302,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334319,-99) , +1, 61.5, 1, 0, 0.488396,-99) ); + // itree = 1141 + fBoostWeights.push_back(0.00498552); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678533,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542321,-99) , +2, 14.5, 0, 0, 0.613804,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.46231,-99) , +6, 0.955604, 1, 0, 0.580568,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509634,-99) , +3, 0.989963, 1, 0, 0.532525,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42385,-99) , +7, 0.0155671, 0, 0, 0.473744,-99) , +3, 0.986681, 0, 0, 0.493869,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531351,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.20756,-99) , +5, 2.05127, 1, 0, 0.514416,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295363,-99) , +7, 0.028981, 1, 0, 0.371012,-99) , +9, -5.208, 1, 0, 0.432246,-99) , +3, 0.996175, 1, 0, 0.480031,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359728,-99) , +2, 7.5, 0, 0, 0.474706,-99) , +9, 7.17485, 0, 0, 0.483556,-99) ); + // itree = 1142 + fBoostWeights.push_back(0.00378849); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545245,-99) , +0, 16.5, 1, 0, 0.599487,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402634,-99) , +5, 2.01042, 1, 0, 0.524501,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392325,-99) , +5, 1.98984, 0, 0, 0.448554,-99) , +8, 0.968603, 1, 0, 0.511542,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43497,-99) , +12, 0.291423, 0, 0, 0.470019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358651,-99) , +5, 1.8731, 1, 0, 0.449329,-99) , +12, 0.197106, 1, 0, 0.495666,-99) , +12, 0.427428, 0, 0, 0.501482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215085,-99) , +5, 2.49362, 1, 0, 0.499427,-99) ); + // itree = 1143 + fBoostWeights.push_back(0.00544012); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.663905,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62454,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474595,-99) , +13, 0.00369443, 0, 0, 0.56668,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543178,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469474,-99) , +16, 178.371, 1, 0, 0.491393,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421229,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +1, 17.5, 0, 0, 0.345725,-99) , +7, 0.0800126, 1, 0, 0.481106,-99) , +5, 1.10297, 1, 0, 0.496062,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364818,-99) , +5, 0.454128, 0, 0, 0.490239,-99) , +12, 0.541847, 0, 0, 0.49601,-99) ); + // itree = 1144 + fBoostWeights.push_back(0.0039703); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548039,-99) , +15, 0.455391, 1, 0, 0.591161,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.555506,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481274,-99) , +8, 0.245713, 1, 0, 0.517468,-99) , +16, 78.8413, 1, 0, 0.537351,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488518,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37,-99) , +5, 1.98164, 1, 0, 0.474356,-99) , +12, 0.507814, 0, 0, 0.483728,-99) , +12, 0.100175, 1, 0, 0.505145,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.295972,-99) , +7, 0.00734394, 0, 0, 0.5005,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34871,-99) , +12, 0.0232558, 0, 0, 0.494527,-99) ); + // itree = 1145 + fBoostWeights.push_back(0.0069195); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492521,-99) , +12, 0.209889, 1, 0, 0.533399,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403815,-99) , +12, 0.100891, 1, 0, 0.453859,-99) , +8, -0.882629, 0, 0, 0.521261,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.198945,-99) , +5, 2.20974, 1, 0, 0.518447,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574684,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48464,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.230737,-99) , +7, 0.0234076, 0, 0, 0.332629,-99) , +7, 0.0135171, 1, 0, 0.384754,-99) , +12, 0.170736, 0, 0, 0.438266,-99) , +14, -3.93888, 0, 0, 0.507666,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532282,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402471,-99) , +14, -2.84345, 1, 0, 0.495392,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250524,-99) , +3, 0.999043, 1, 0, 0.476993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.190871,-99) , +3, 0.892045, 0, 0, 0.454956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107421,-99) , +13, 0.00948935, 1, 0, 0.425393,-99) , +4, 1.56771, 1, 0, 0.494031,-99) ); + // itree = 1146 + fBoostWeights.push_back(0.00384721); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664225,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514367,-99) , +2, 14.5, 0, 0, 0.60175,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518576,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457987,-99) , +7, 0.0581179, 1, 0, 0.509386,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363615,-99) , +7, 0.00739763, 0, 0, 0.506079,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380114,-99) , +8, -0.984231, 0, 0, 0.500653,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522019,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.211973,-99) , +8, 0.908463, 0, 0, 0.397339,-99) , +4, 1.76094, 1, 0, 0.49271,-99) , +10, -8272.58, 1, 0, 0.50004,-99) ); + // itree = 1147 + fBoostWeights.push_back(0.00422487); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531575,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36892,-99) , +15, 1.97104, 1, 0, 0.524839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330813,-99) , +1, 62.5, 1, 0, 0.519056,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467969,-99) , +16, 297.617, 1, 0, 0.497553,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461124,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272152,-99) , +1, 11.5, 1, 0, 0.402366,-99) , +12, 0.208512, 0, 0, 0.463501,-99) , +15, 0.115126, 0, 0, 0.499937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329488,-99) , +7, 0.148236, 1, 0, 0.495859,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37312,-99) , +5, 0.427031, 0, 0, 0.490282,-99) ); + // itree = 1148 + fBoostWeights.push_back(0.00609752); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618756,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473503,-99) , +7, 0.0166496, 1, 0, 0.530804,-99) , +1, 14.5, 0, 0, 0.558551,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.624215,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504653,-99) , +3, 0.960947, 1, 0, 0.522557,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578102,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456639,-99) , +8, 0.986918, 0, 0, 0.468188,-99) , +9, -1.32928, 1, 0, 0.492044,-99) , +9, 4.39931, 0, 0, 0.503792,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265268,-99) , +14, -5.52268, 0, 0, 0.498376,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644374,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.491906,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.125395,-99) , +5, 2.36185, 1, 0, 0.451063,-99) , +10, 7378.98, 0, 0, 0.505359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254856,-99) , +8, 0.898523, 0, 0, 0.417822,-99) , +5, 1.9796, 1, 0, 0.488811,-99) ); + // itree = 1149 + fBoostWeights.push_back(0.00429459); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626655,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44977,-99) , +13, 0.00793121, 1, 0, 0.533796,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320366,-99) , +16, 857.228, 1, 0, 0.433337,-99) , +12, 0.0324972, 0, 0, 0.520268,-99) , +7, 0.00876897, 1, 0, 0.528882,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477993,-99) , +9, 3.05879, 0, 0, 0.495982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.358105,-99) , +7, 0.00939397, 0, 0, 0.484198,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217438,-99) , +3, 0.999626, 1, 0, 0.478288,-99) , +12, 0.113902, 1, 0, 0.501374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337715,-99) , +12, 0.0202202, 0, 0, 0.496235,-99) ); + // itree = 1150 + fBoostWeights.push_back(0.00512472); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594317,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50486,-99) , +2, 11.5, 0, 0, 0.595883,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517861,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376665,-99) , +14, -4.64944, 0, 0, 0.505666,-99) , +4, 1.49665, 0, 0, 0.51749,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412894,-99) , +7, 0.0190284, 0, 0, 0.470029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353051,-99) , +8, -0.76925, 0, 0, 0.452153,-99) , +6, 0.667143, 1, 0, 0.497746,-99) , +6, 1.07399, 0, 0, 0.504849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.238218,-99) , +14, -3.81315, 1, 0, 0.375362,-99) , +4, 1.81739, 1, 0, 0.497005,-99) ); + // itree = 1151 + fBoostWeights.push_back(0.00505965); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593639,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52011,-99) , +11, 1.5, 0, 0, 0.544805,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504144,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365989,-99) , +5, 1.85313, 0, 0, 0.421651,-99) , +8, 0.982924, 1, 0, 0.527867,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.590171,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212441,-99) , +5, 2.14365, 1, 0, 0.45885,-99) , +8, 0.994285, 0, 0, 0.473751,-99) , +12, 0.135756, 1, 0, 0.501344,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515481,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.31586,-99) , +5, 1.791, 1, 0, 0.462415,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30018,-99) , +6, 0.71497, 1, 0, 0.408619,-99) , +12, 0.0312849, 0, 0, 0.494216,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260115,-99) , +13, 0.0726047, 1, 0, 0.491604,-99) ); + // itree = 1152 + fBoostWeights.push_back(0.0060428); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650855,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53036,-99) , +8, 0.738238, 1, 0, 0.581378,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459407,-99) , +5, 1.53579, 0, 0, 0.533936,-99) , +12, 0.0479627, 0, 0, 0.563202,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523119,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.291751,-99) , +12, 0.0291286, 0, 0, 0.449086,-99) , +6, 0.814555, 1, 0, 0.532372,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619122,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484324,-99) , +10, -8343.84, 1, 0, 0.493177,-99) , +15, 0.0306743, 1, 0, 0.501508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335621,-99) , +2, 7.5, 0, 0, 0.494259,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501452,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345605,-99) , +15, 0.28625, 1, 0, 0.456423,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330093,-99) , +7, 0.0142913, 0, 0, 0.424374,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.21223,-99) , +4, 1.64437, 1, 0, 0.411763,-99) , +8, -0.459608, 0, 0, 0.47477,-99) , +12, 0.0596911, 1, 0, 0.489325,-99) ); + // itree = 1153 + fBoostWeights.push_back(0.00738337); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563078,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456102,-99) , +15, 0.0629532, 0, 0, 0.547723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.26457, 1, 0, 0.540711,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.608682,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.42993,-99) , +12, 0.0624543, 1, 0, 0.464563,-99) , +15, 0.0451891, 1, 0, 0.48612,-99) , +8, 0.8378, 1, 0, 0.519665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.405342,-99) , +13, 0.0233602, 1, 0, 0.513127,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611482,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504358,-99) , +7, 0.0636389, 1, 0, 0.562768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.281537,-99) , +1, 11.5, 0, 0, 0.536238,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481653,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243141,-99) , +3, 0.998936, 1, 0, 0.46089,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294842,-99) , +12, 0.0457037, 0, 0, 0.439194,-99) , +2, 23.5, 0, 0, 0.472508,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.164064,-99) , +4, 1.58048, 1, 0, 0.344017,-99) , +3, 0.952395, 0, 0, 0.450724,-99) , +6, 0.705844, 1, 0, 0.491769,-99) ); + // itree = 1154 + fBoostWeights.push_back(0.00476899); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.728996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552945,-99) , +5, 2.14505, 0, 0, 0.563208,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361481,-99) , +1, 10.5, 0, 0, 0.550674,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.565459,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484728,-99) , +16, 19.7163, 1, 0, 0.498419,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0929882,-99) , +7, 0.045449, 1, 0, 0.491353,-99) , +2, 18.5, 0, 0, 0.512136,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165483,-99) , +7, 0.206536, 1, 0, 0.509931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355411,-99) , +1, 63.5, 1, 0, 0.504678,-99) ); + // itree = 1155 + fBoostWeights.push_back(0.00604357); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.674112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538816,-99) , +16, 1481.46, 1, 0, 0.606266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51909,-99) , +13, 0.00645275, 1, 0, 0.567914,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465931,-99) , +8, 0.913752, 1, 0, 0.54613,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5909,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54784,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45857,-99) , +5, 1.28624, 0, 0, 0.505923,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408703,-99) , +1, 18.5, 1, 0, 0.481655,-99) , +2, 52.5, 0, 0, 0.492337,-99) , +6, 0.440751, 1, 0, 0.515,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453614,-99) , +15, 0.228435, 0, 0, 0.48398,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323135,-99) , +13, 0.0151357, 1, 0, 0.474014,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256117,-99) , +1, 7.5, 0, 0, 0.460168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300804,-99) , +3, 0.998114, 1, 0, 0.439922,-99) , +5, 1.65209, 1, 0, 0.487539,-99) ); + // itree = 1156 + fBoostWeights.push_back(0.005586); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5241,-99) , +12, 0.135913, 1, 0, 0.564937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472441,-99) , +12, 0.0409893, 0, 0, 0.550129,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4299,-99) , +8, -0.895927, 0, 0, 0.537241,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.556487,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431272,-99) , +8, 0.93515, 1, 0, 0.536271,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498366,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406584,-99) , +3, 0.981354, 0, 0, 0.465498,-99) , +6, 0.582221, 1, 0, 0.502577,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421922,-99) , +10, 6012.9, 0, 0, 0.470733,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270892,-99) , +14, -2.30209, 1, 0, 0.434416,-99) , +5, 1.66913, 1, 0, 0.479905,-99) , +16, 475.51, 1, 0, 0.501865,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275394,-99) , +2, 6.5, 0, 0, 0.49784,-99) ); + // itree = 1157 + fBoostWeights.push_back(0.00349447); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467928,-99) , +3, 0.99289, 1, 0, 0.496341,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515724,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.338609,-99) , +12, 0.365845, 0, 0, 0.421678,-99) , +15, 0.052382, 0, 0, 0.487887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310772,-99) , +3, 0.999694, 1, 0, 0.484744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.229102,-99) , +5, 2.46103, 1, 0, 0.482439,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.242064,-99) , +2, 6.5, 0, 0, 0.478129,-99) ); + // itree = 1158 + fBoostWeights.push_back(0.00442005); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.655942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501427,-99) , +13, 0.00373972, 0, 0, 0.596719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504199,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225321,-99) , +7, 0.0644865, 1, 0, 0.499137,-99) , +2, 33.5, 0, 0, 0.508278,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.168358,-99) , +7, 0.162186, 1, 0, 0.505606,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5746,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409113,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.223888,-99) , +2, 42.5, 0, 0, 0.34601,-99) , +2, 76.5, 0, 0, 0.427484,-99) , +1, 40.5, 1, 0, 0.498795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342172,-99) , +2, 6.5, 0, 0, 0.495721,-99) ); + // itree = 1159 + fBoostWeights.push_back(0.00427028); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643714,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.558898,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442612,-99) , +8, 0.915105, 1, 0, 0.529526,-99) , +5, 2.03149, 0, 0, 0.544699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.24513,-99) , +5, 2.44721, 1, 0, 0.539875,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492554,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.112175,-99) , +4, 2.14449, 1, 0, 0.490061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0682966,-99) , +7, 0.280354, 1, 0, 0.48713,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.245655,-99) , +1, 5.5, 0, 0, 0.481586,-99) , +11, 1.5, 0, 0, 0.50107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360692,-99) , +8, -0.984885, 0, 0, 0.495284,-99) ); + // itree = 1160 + fBoostWeights.push_back(0.00329804); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.142745,-99) , +4, 1.96543, 1, 0, 0.534432,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47657,-99) , +2, 52.5, 0, 0, 0.485034,-99) , +8, 0.625318, 1, 0, 0.51099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35636,-99) , +3, 0.999629, 1, 0, 0.506697,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28026,-99) , +2, 6.5, 0, 0, 0.502992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330311,-99) , +8, -0.989404, 0, 0, 0.497193,-99) ); + // itree = 1161 + fBoostWeights.push_back(0.00672575); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.638666,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535805,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400535,-99) , +12, 0.317051, 1, 0, 0.527849,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304046,-99) , +8, 0.421439, 1, 0, 0.412816,-99) , +12, 0.0313674, 0, 0, 0.516078,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451316,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0677417,-99) , +4, 1.31337, 1, 0, 0.388269,-99) , +13, 0.0218496, 1, 0, 0.503598,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.597652,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467036,-99) , +3, 0.966152, 1, 0, 0.516326,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527951,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392194,-99) , +5, 1.37962, 1, 0, 0.433556,-99) , +16, 760.851, 1, 0, 0.464582,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187081,-99) , +5, 1.87303, 1, 0, 0.341808,-99) , +0, 14.5, 1, 0, 0.438945,-99) , +7, 0.015506, 0, 0, 0.483893,-99) , +12, 0.521876, 0, 0, 0.489325,-99) ); + // itree = 1162 + fBoostWeights.push_back(0.00937635); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616372,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528471,-99) , +8, -0.593704, 0, 0, 0.577882,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426984,-99) , +3, 0.988356, 1, 0, 0.496185,-99) , +14, -2.68933, 0, 0, 0.547807,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554807,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445044,-99) , +9, -0.0318666, 1, 0, 0.504291,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.40128,-99) , +7, 0.0247468, 0, 0, 0.463673,-99) , +6, 0.830718, 1, 0, 0.518015,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.686627,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539345,-99) , +5, 1.86728, 0, 0, 0.589281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.292931,-99) , +0, 37.5, 1, 0, 0.478193,-99) , +11, 1.5, 0, 0, 0.520286,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364315,-99) , +8, 0.99041, 1, 0, 0.499866,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285628,-99) , +1, 8.5, 0, 0, 0.458867,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0971689,-99) , +7, 0.0232947, 1, 0, 0.299195,-99) , +8, -0.223055, 0, 0, 0.424729,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.194705,-99) , +4, 1.83113, 1, 0, 0.404367,-99) , +12, 0.132028, 1, 0, 0.454536,-99) , +5, 1.43394, 1, 0, 0.482582,-99) ); + // itree = 1163 + fBoostWeights.push_back(0.00685138); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.661037,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572699,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472694,-99) , +6, 0.938343, 1, 0, 0.547525,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41375,-99) , +14, -3.70212, 0, 0, 0.530565,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507619,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367206,-99) , +8, 0.548906, 0, 0, 0.464045,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0559147,-99) , +7, 0.0926549, 1, 0, 0.449052,-99) , +5, 1.67948, 1, 0, 0.503262,-99) , +10, 2649.08, 1, 0, 0.513828,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462982,-99) , +10, -659.079, 1, 0, 0.513191,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514231,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.407479,-99) , +16, 307.151, 1, 0, 0.445944,-99) , +8, 0.672515, 1, 0, 0.484903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.254187,-99) , +4, 2.04678, 1, 0, 0.481026,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.263052,-99) , +9, -0.0578416, 1, 0, 0.345248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133684,-99) , +4, 1.69959, 1, 0, 0.324746,-99) , +9, 0.14516, 0, 0, 0.464639,-99) , +9, -0.320301, 1, 0, 0.487488,-99) ); + // itree = 1164 + fBoostWeights.push_back(0.00358271); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658475,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514515,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38389,-99) , +8, -0.982681, 0, 0, 0.508838,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324171,-99) , +7, 0.00714058, 0, 0, 0.504757,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438327,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187087,-99) , +13, 0.0109592, 1, 0, 0.382904,-99) , +3, 0.999134, 1, 0, 0.497121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293163,-99) , +12, 0.01821, 0, 0, 0.492286,-99) , +10, -15407.6, 1, 0, 0.497217,-99) ); + // itree = 1165 + fBoostWeights.push_back(0.00748034); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699419,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475991,-99) , +13, 0.00230443, 0, 0, 0.570409,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.215185,-99) , +7, 0.134706, 1, 0, 0.48585,-99) , +5, 1.44592, 1, 0, 0.543191,-99) , +5, 2.06058, 0, 0, 0.557184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217911,-99) , +1, 10.5, 0, 0, 0.543823,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641656,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.566013,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488201,-99) , +11, 0.5, 1, 0, 0.518661,-99) , +16, 10.3645, 1, 0, 0.536583,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.486659,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382744,-99) , +7, 0.0282063, 1, 0, 0.474683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269158,-99) , +4, 1.82199, 1, 0, 0.463949,-99) , +10, 1596.66, 1, 0, 0.491707,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.22697,-99) , +7, 0.0412669, 1, 0, 0.478954,-99) , +2, 24.5, 0, 0, 0.496173,-99) ); + // itree = 1166 + fBoostWeights.push_back(0.0051156); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.616773,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484654,-99) , +6, 0.0337458, 0, 0, 0.589203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41827,-99) , +8, -0.827311, 0, 0, 0.565062,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389306,-99) , +3, 0.999249, 1, 0, 0.503343,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19802,-99) , +3, 0.962358, 0, 0, 0.387294,-99) , +15, 0.0418318, 0, 0, 0.49479,-99) , +6, 0.171858, 1, 0, 0.510787,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348324,-99) , +5, 2.0308, 0, 0, 0.411013,-99) , +14, -4.87755, 0, 0, 0.504001,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225032,-99) , +2, 6.5, 0, 0, 0.4996,-99) ); + // itree = 1167 + fBoostWeights.push_back(0.00562666); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.679008,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595091,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458179,-99) , +7, 0.0172006, 0, 0, 0.542911,-99) , +3, 0.939039, 0, 0, 0.572076,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362101,-99) , +8, -0.137548, 1, 0, 0.430759,-99) , +6, 0.672743, 1, 0, 0.534654,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.593052,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564884,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.470126,-99) , +13, 0.00406784, 0, 0, 0.491959,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440982,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +4, 1.69226, 1, 0, 0.42444,-99) , +13, 0.00925185, 1, 0, 0.477188,-99) , +15, 0.0334085, 1, 0, 0.484226,-99) , +3, 0.954816, 1, 0, 0.497744,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.261081,-99) , +15, 4.43423, 1, 0, 0.494479,-99) ); + // itree = 1168 + fBoostWeights.push_back(0.0055331); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.66261,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584456,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501,-99) , +13, 0.00242801, 0, 0, 0.5601,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50841,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421629,-99) , +15, 0.338682, 1, 0, 0.491442,-99) , +2, 21.5, 0, 0, 0.519002,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493822,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.361179,-99) , +3, 0.999143, 1, 0, 0.48553,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14566,-99) , +5, 1.92135, 1, 0, 0.353926,-99) , +14, -2.3018, 1, 0, 0.456715,-99) , +5, 1.49918, 1, 0, 0.488487,-99) , +12, 0.52584, 0, 0, 0.494237,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248181,-99) , +12, 0.016565, 0, 0, 0.489734,-99) ); + // itree = 1169 + fBoostWeights.push_back(0.00325062); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641912,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430814,-99) , +8, 0.980733, 1, 0, 0.525643,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466591,-99) , +10, -8375.85, 1, 0, 0.475134,-99) , +16, 513.888, 1, 0, 0.494686,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362067,-99) , +5, 2.16528, 1, 0, 0.488658,-99) , +12, 0.526705, 0, 0, 0.494034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166554,-99) , +7, 0.253137, 1, 0, 0.491494,-99) ); + // itree = 1170 + fBoostWeights.push_back(0.00644627); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.701475,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423179,-99) , +14, -3.71916, 0, 0, 0.53714,-99) , +5, 1.94984, 0, 0, 0.558508,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310149,-99) , +4, 1.98718, 1, 0, 0.55042,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473395,-99) , +9, -0.32022, 1, 0, 0.509911,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498594,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320884,-99) , +9, -3.07462, 1, 0, 0.438127,-99) , +3, 0.996213, 1, 0, 0.494796,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.505359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.341606,-99) , +3, 0.968665, 0, 0, 0.453387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.237268,-99) , +8, 0.365352, 0, 0, 0.393392,-99) , +4, 1.57468, 1, 0, 0.479658,-99) , +10, -618.166, 1, 0, 0.495899,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155237,-99) , +7, 0.252094, 1, 0, 0.493186,-99) ); + // itree = 1171 + fBoostWeights.push_back(0.00501583); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.699204,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518727,-99) , +8, -0.694283, 0, 0, 0.613656,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452695,-99) , +15, 0.37755, 1, 0, 0.516161,-99) , +8, 0.0773524, 1, 0, 0.560366,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637764,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482393,-99) , +6, 0.612928, 1, 0, 0.58658,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528986,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457413,-99) , +4, 0.751696, 1, 0, 0.47784,-99) , +12, 0.416559, 0, 0, 0.487416,-99) , +12, 0.0637098, 1, 0, 0.501671,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370722,-99) , +4, 1.19832, 0, 0, 0.434141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269646,-99) , +4, 1.68779, 1, 0, 0.413242,-99) , +12, 0.0312599, 0, 0, 0.493816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354047,-99) , +5, 0.443713, 0, 0, 0.487834,-99) ); + // itree = 1172 + fBoostWeights.push_back(0.00706045); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629985,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512793,-99) , +5, 0.829692, 0, 0, 0.600999,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502694,-99) , +12, 0.19282, 1, 0, 0.573738,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554662,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369072,-99) , +12, 0.0742757, 0, 0, 0.470559,-99) , +13, 0.00119789, 0, 0, 0.549586,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542017,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481783,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.377047,-99) , +15, 0.109915, 1, 0, 0.42995,-99) , +1, 8.5, 1, 0, 0.46403,-99) , +2, 12.5, 0, 0, 0.523343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654912,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513418,-99) , +7, 0.0236054, 1, 0, 0.601908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389554,-99) , +1, 8.5, 0, 0, 0.561133,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324971,-99) , +5, 2.24284, 1, 0, 0.509739,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.578321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.403543,-99) , +12, 0.463535, 0, 0, 0.42238,-99) , +12, 0.110599, 1, 0, 0.46083,-99) , +9, -4.34402, 1, 0, 0.477248,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.136853,-99) , +7, 0.133155, 1, 0, 0.471292,-99) , +5, 1.53564, 1, 0, 0.498429,-99) ); + // itree = 1173 + fBoostWeights.push_back(0.00576274); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424399,-99) , +12, 0.0294655, 0, 0, 0.525791,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547871,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32251,-99) , +0, 10.5, 1, 0, 0.433138,-99) , +7, 0.0100512, 0, 0, 0.517223,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534336,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447592,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36238,-99) , +2, 16.5, 1, 0, 0.415535,-99) , +12, 0.170439, 0, 0, 0.444665,-99) , +14, -3.85961, 0, 0, 0.506126,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.275297,-99) , +13, 0.0796594, 1, 0, 0.503447,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430243,-99) , +8, 0.997768, 0, 0, 0.499868,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224662,-99) , +8, 0.919805, 0, 0, 0.396164,-99) , +5, 1.99478, 1, 0, 0.491869,-99) ); + // itree = 1174 + fBoostWeights.push_back(0.00271158); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610268,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.515546,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467412,-99) , +5, 1.42352, 1, 0, 0.488817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310844,-99) , +13, 0.0494953, 1, 0, 0.48554,-99) , +12, 0.513631, 0, 0, 0.489839,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299275,-99) , +7, 0.00714287, 0, 0, 0.486255,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260925,-99) , +5, 2.33369, 1, 0, 0.482353,-99) ); + // itree = 1175 + fBoostWeights.push_back(0.00592565); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640326,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.594365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383302,-99) , +7, 0.0162389, 1, 0, 0.515953,-99) , +2, 17.5, 0, 0, 0.572585,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551389,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.48238,-99) , +8, 0.912285, 1, 0, 0.528743,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549889,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400749,-99) , +5, 1.84072, 0, 0, 0.44688,-99) , +16, 81.6212, 1, 0, 0.512154,-99) , +16, 214.776, 0, 0, 0.531872,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427478,-99) , +8, -0.883526, 0, 0, 0.521157,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582778,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496995,-99) , +1, 11.5, 1, 0, 0.527132,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382894,-99) , +12, 0.284315, 0, 0, 0.440075,-99) , +15, 0.0880654, 0, 0, 0.503391,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.47492,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294049,-99) , +7, 0.0856296, 1, 0, 0.460634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304717,-99) , +1, 8.5, 0, 0, 0.439133,-99) , +11, 0.5, 1, 0, 0.476247,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178516,-99) , +4, 1.97324, 1, 0, 0.469585,-99) , +16, 996.421, 1, 0, 0.493526,-99) ); + // itree = 1176 + fBoostWeights.push_back(0.00446565); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490673,-99) , +7, 0.108695, 1, 0, 0.589782,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472665,-99) , +15, 1.83322, 1, 0, 0.561474,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392267,-99) , +3, 0.999257, 1, 0, 0.547103,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482402,-99) , +10, -641.719, 1, 0, 0.49465,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.12235,-99) , +5, 2.49336, 1, 0, 0.4922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177255,-99) , +7, 0.0559158, 1, 0, 0.482679,-99) , +2, 30.5, 0, 0, 0.494541,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.199112,-99) , +7, 0.324392, 1, 0, 0.493331,-99) ); + // itree = 1177 + fBoostWeights.push_back(0.0060865); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.630523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.542022,-99) , +6, 0.801277, 1, 0, 0.593725,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570667,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526183,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447408,-99) , +5, 1.16213, 0, 0, 0.485315,-99) , +2, 20.5, 0, 0, 0.514589,-99) , +12, 0.130705, 1, 0, 0.558022,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544195,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439632,-99) , +8, 0.977641, 0, 0, 0.475924,-99) , +8, 0.704647, 1, 0, 0.535621,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551165,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388717,-99) , +16, 2.62804, 0, 0, 0.536583,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493917,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391028,-99) , +11, 0.5, 1, 0, 0.454921,-99) , +16, 1355.49, 1, 0, 0.495422,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.157876,-99) , +7, 0.00691023, 0, 0, 0.489549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278715,-99) , +13, 0.0154647, 1, 0, 0.47549,-99) , +5, 1.43261, 1, 0, 0.50209,-99) ); + // itree = 1178 + fBoostWeights.push_back(0.00702372); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.778926,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596606,-99) , +4, 1.83021, 0, 0, 0.61343,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445824,-99) , +15, 1.15421, 1, 0, 0.580096,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59712,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335437,-99) , +13, 0.0076972, 1, 0, 0.417265,-99) , +7, 0.14096, 0, 0, 0.475538,-99) , +1, 40.5, 1, 0, 0.548704,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.191571,-99) , +1, 10.5, 0, 0, 0.534493,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391496,-99) , +15, 0.565522, 1, 0, 0.49242,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329546,-99) , +7, 0.0072981, 0, 0, 0.487486,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.243585,-99) , +7, 0.0465751, 1, 0, 0.482334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115676,-99) , +0, 34.5, 1, 0, 0.475401,-99) , +2, 22.5, 0, 0, 0.492757,-99) ); + // itree = 1179 + fBoostWeights.push_back(0.00383768); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.62654,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383297,-99) , +13, 0.037596, 1, 0, 0.517785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308402,-99) , +15, 0.0316527, 0, 0, 0.512105,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55729,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331823,-99) , +7, 0.0149389, 1, 0, 0.39343,-99) , +6, 0.795942, 0, 0, 0.435757,-99) , +8, 0.978342, 1, 0, 0.501042,-99) , +12, 0.52549, 0, 0, 0.50548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.322802,-99) , +5, 2.31036, 1, 0, 0.501478,-99) ); + // itree = 1180 + fBoostWeights.push_back(0.00221232); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627305,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49996,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384879,-99) , +13, 0.0356222, 1, 0, 0.496225,-99) , +15, 0.0266476, 1, 0, 0.500887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.293085,-99) , +7, 0.00668197, 0, 0, 0.49811,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317065,-99) , +3, 0.999712, 1, 0, 0.495272,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130302,-99) , +7, 0.281901, 1, 0, 0.493334,-99) ); + // itree = 1181 + fBoostWeights.push_back(0.00411601); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537964,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444866,-99) , +0, 11.5, 0, 0, 0.530353,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.379894,-99) , +1, 65.5, 1, 0, 0.524205,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493434,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363677,-99) , +6, 0.848958, 1, 0, 0.469207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.32334, 1, 0, 0.460526,-99) , +7, 0.0129631, 0, 0, 0.510283,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535903,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399336,-99) , +4, 1.21268, 0, 0, 0.458745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.311311,-99) , +6, 0.872145, 1, 0, 0.422045,-99) , +12, 0.032386, 0, 0, 0.502273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299476,-99) , +3, 0.99965, 1, 0, 0.49765,-99) ); + // itree = 1182 + fBoostWeights.push_back(0.00465353); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646425,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49108,-99) , +3, 0.994448, 1, 0, 0.585784,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.598908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493618,-99) , +4, 0.726001, 0, 0, 0.559998,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.512966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453856,-99) , +6, 0.674195, 1, 0, 0.493232,-99) , +2, 24.5, 0, 0, 0.504415,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460924,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186029,-99) , +2, 31.5, 0, 0, 0.375785,-99) , +7, 0.062922, 1, 0, 0.495379,-99) , +2, 53.5, 0, 0, 0.50281,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461118,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29668,-99) , +5, 1.5938, 1, 0, 0.380495,-99) , +1, 7.5, 0, 0, 0.493636,-99) ); + // itree = 1183 + fBoostWeights.push_back(0.00477421); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665753,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.539462,-99) , +7, 0.0281576, 1, 0, 0.594551,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563331,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438024,-99) , +4, 1.20712, 0, 0, 0.502177,-99) , +13, 0.00172729, 0, 0, 0.544391,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523104,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460987,-99) , +5, 1.37639, 1, 0, 0.48607,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316517,-99) , +7, 0.00744826, 0, 0, 0.480837,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.54979, 1, 0, 0.478541,-99) , +12, 0.0716944, 1, 0, 0.494079,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477818,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28768,-99) , +8, 0.185736, 1, 0, 0.380094,-99) , +12, 0.0312849, 0, 0, 0.484794,-99) ); + // itree = 1184 + fBoostWeights.push_back(0.00511982); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.660253,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628212,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5204,-99) , +2, 16.5, 0, 0, 0.573433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.186908,-99) , +5, 2.08106, 1, 0, 0.56456,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658965,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436958,-99) , +15, 0.634363, 1, 0, 0.48576,-99) , +5, 2.43341, 0, 0, 0.490848,-99) , +13, 0.00534214, 0, 0, 0.505142,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528077,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389933,-99) , +2, 22.5, 0, 0, 0.4696,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273356,-99) , +5, 1.47777, 1, 0, 0.411917,-99) , +13, 0.010982, 1, 0, 0.490511,-99) , +12, 0.525205, 0, 0, 0.496611,-99) ); + // itree = 1185 + fBoostWeights.push_back(0.0075594); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657863,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495873,-99) , +7, 0.0337603, 1, 0, 0.569755,-99) , +2, 38.5, 0, 0, 0.58513,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415469,-99) , +13, 0.0314426, 1, 0, 0.569022,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.478932,-99) , +12, 0.0744898, 0, 0, 0.52187,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.428003,-99) , +15, 0.0963238, 0, 0, 0.499949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402749,-99) , +12, 0.0315268, 0, 0, 0.484292,-99) , +13, 0.00222365, 0, 0, 0.537988,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.633723,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376832,-99) , +1, 8.5, 0, 0, 0.58854,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485575,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2231,-99) , +4, 1.99385, 1, 0, 0.475889,-99) , +9, -3.60054, 1, 0, 0.49794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256069,-99) , +3, 0.999382, 1, 0, 0.489992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.151751,-99) , +7, 0.0909877, 1, 0, 0.478199,-99) , +5, 1.56204, 1, 0, 0.510534,-99) ); + // itree = 1186 + fBoostWeights.push_back(0.00474022); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.560851,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500458,-99) , +12, 0.0993872, 1, 0, 0.524373,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521449,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359413,-99) , +3, 0.989633, 1, 0, 0.461266,-99) , +8, 0.935902, 1, 0, 0.510108,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406539,-99) , +16, 5.14535, 0, 0, 0.502772,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356958,-99) , +12, 0.0235703, 0, 0, 0.49704,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.460251,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.145682,-99) , +14, -3.31418, 1, 0, 0.356308,-99) , +4, 1.84638, 1, 0, 0.489845,-99) ); + // itree = 1187 + fBoostWeights.push_back(0.00577908); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.588796,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567304,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496135,-99) , +6, 0.1689, 1, 0, 0.511061,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408064,-99) , +10, 7704.99, 1, 0, 0.50177,-99) , +10, 10999.1, 0, 0, 0.511181,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55037,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45198,-99) , +6, 0.267499, 0, 0, 0.516295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404637,-99) , +8, 0.963332, 0, 0, 0.484974,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352054,-99) , +12, 0.0742125, 0, 0, 0.44981,-99) , +8, 0.911184, 1, 0, 0.497988,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666112,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498398,-99) , +8, 0.967376, 1, 0, 0.555831,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406211,-99) , +10, 3545.79, 1, 0, 0.495482,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378797,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.119904,-99) , +3, 0.993044, 1, 0, 0.304008,-99) , +8, 0.897608, 0, 0, 0.41907,-99) , +5, 1.90711, 1, 0, 0.485842,-99) ); + // itree = 1188 + fBoostWeights.push_back(0.00432518); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.535127,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278979,-99) , +5, 2.12366, 1, 0, 0.527879,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492336,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252783,-99) , +8, 0.955647, 0, 0, 0.467009,-99) , +8, 0.934753, 1, 0, 0.51239,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408729,-99) , +8, -0.972997, 0, 0, 0.506953,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32569,-99) , +2, 6.5, 0, 0, 0.50363,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487507,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266106,-99) , +7, 0.0351183, 1, 0, 0.405994,-99) , +3, 0.999228, 1, 0, 0.49696,-99) ); + // itree = 1189 + fBoostWeights.push_back(0.00338638); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.525135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404129,-99) , +7, 0.00922132, 0, 0, 0.519135,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.389809,-99) , +13, 0.037838, 1, 0, 0.514346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.337136,-99) , +12, 0.0173719, 0, 0, 0.510606,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511667,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.288828,-99) , +5, 1.91759, 1, 0, 0.471775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.249661,-99) , +0, 12.5, 1, 0, 0.420927,-99) , +2, 8.5, 0, 0, 0.502562,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274457,-99) , +3, 0.999753, 1, 0, 0.499811,-99) ); + // itree = 1190 + fBoostWeights.push_back(0.00602671); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637543,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.518887,-99) , +6, 0.505941, 1, 0, 0.587423,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.461271,-99) , +16, 137.475, 1, 0, 0.493443,-99) , +12, 0.108474, 1, 0, 0.537938,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524527,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.384686,-99) , +15, 0.757413, 1, 0, 0.504029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353562,-99) , +9, 3.30103, 0, 0, 0.472351,-99) , +3, 0.993389, 1, 0, 0.513401,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628967,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495785,-99) , +3, 0.998791, 0, 0, 0.566624,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.537883,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.433553,-99) , +3, 0.958054, 1, 0, 0.464935,-99) , +9, -8.11177, 1, 0, 0.479327,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0987739,-99) , +4, 1.55261, 1, 0, 0.330971,-99) , +9, -0.217368, 1, 0, 0.464644,-99) , +9, 0.165823, 0, 0, 0.488494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.303556,-99) , +4, 2.07376, 1, 0, 0.485726,-99) ); + // itree = 1191 + fBoostWeights.push_back(0.00500349); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.629965,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524363,-99) , +1, 52.5, 1, 0, 0.59224,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.250787,-99) , +1, 17.5, 0, 0, 0.571638,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504568,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.409002,-99) , +14, -4.81527, 0, 0, 0.496719,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467721,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26468,-99) , +3, 0.9959, 1, 0, 0.419123,-99) , +13, 0.0111113, 1, 0, 0.486858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.221904,-99) , +7, 0.0787526, 1, 0, 0.481343,-99) , +2, 38.5, 0, 0, 0.493244,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.29378,-99) , +4, 1.9733, 1, 0, 0.488132,-99) ); + // itree = 1192 + fBoostWeights.push_back(0.00417037); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.611646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527578,-99) , +10, 104.898, 1, 0, 0.545664,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489739,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256467,-99) , +4, 1.27321, 1, 0, 0.451219,-99) , +1, 9.5, 0, 0, 0.530104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589299,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480726,-99) , +0, 10.5, 1, 0, 0.493776,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356175,-99) , +3, 0.887506, 0, 0, 0.481752,-99) , +6, 0.391419, 1, 0, 0.502777,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278625,-99) , +5, 2.49115, 1, 0, 0.50108,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.442193,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.141193,-99) , +13, 0.0130482, 1, 0, 0.386637,-99) , +3, 0.999348, 1, 0, 0.49456,-99) ); + // itree = 1193 + fBoostWeights.push_back(0.00628299); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.6253,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479108,-99) , +15, 0.0568614, 1, 0, 0.581236,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.440141,-99) , +8, 0.984091, 1, 0, 0.556878,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.549015,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454422,-99) , +13, 0.00395559, 0, 0, 0.484532,-99) , +6, 0.513642, 1, 0, 0.520281,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459858,-99) , +12, 0.178068, 1, 0, 0.482581,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.324114,-99) , +13, 0.00680577, 0, 0, 0.383371,-99) , +12, 0.155539, 0, 0, 0.460568,-99) , +12, 0.123372, 1, 0, 0.493252,-99) , +12, 0.367983, 0, 0, 0.500705,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.569716,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359611,-99) , +3, 0.9555, 1, 0, 0.442705,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.126418,-99) , +8, 0.687741, 0, 0, 0.37427,-99) , +5, 2.1023, 1, 0, 0.492431,-99) ); + // itree = 1194 + fBoostWeights.push_back(0.00376612); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.602466,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490155,-99) , +7, 0.079618, 1, 0, 0.556948,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500927,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231811,-99) , +7, 0.0572923, 1, 0, 0.492331,-99) , +2, 30.5, 0, 0, 0.504388,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356231,-99) , +12, 0.0182006, 0, 0, 0.500528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259704,-99) , +13, 0.0807334, 1, 0, 0.498008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.305478,-99) , +7, 0.00716742, 0, 0, 0.494368,-99) ); + // itree = 1195 + fBoostWeights.push_back(0.00484258); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.625835,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522561,-99) , +13, 0.000981339, 0, 0, 0.592488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438205,-99) , +6, 0.24473, 1, 0, 0.551113,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637287,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4615,-99) , +8, 0.29358, 0, 0, 0.585565,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.408756,-99) , +15, 1.09108, 1, 0, 0.482022,-99) , +12, 0.386354, 0, 0, 0.490235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.362765,-99) , +6, 0.114699, 0, 0, 0.48305,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490488,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350015,-99) , +15, 0.115945, 0, 0, 0.441356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297314,-99) , +6, 0.652606, 1, 0, 0.397943,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0839812,-99) , +5, 2.17722, 1, 0, 0.380709,-99) , +3, 0.889538, 0, 0, 0.471822,-99) , +4, 0.361866, 1, 0, 0.484731,-99) ); + // itree = 1196 + fBoostWeights.push_back(0.00651513); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.666367,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55941,-99) , +5, 1.3666, 1, 0, 0.596721,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.434025,-99) , +13, 0.0111078, 1, 0, 0.566342,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.596942,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445072,-99) , +6, 0.979542, 1, 0, 0.555698,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452245,-99) , +10, -580.234, 1, 0, 0.475015,-99) , +9, -4.19536, 1, 0, 0.489999,-99) , +6, 0.21895, 1, 0, 0.509282,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.576409,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458796,-99) , +8, 0.991777, 0, 0, 0.512447,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372467,-99) , +6, 0.184799, 0, 0, 0.477088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342778,-99) , +9, -2.59305, 0, 0, 0.446766,-99) , +14, -3.56284, 0, 0, 0.496431,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547969,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.219664,-99) , +14, -3.81383, 1, 0, 0.399753,-99) , +5, 2.1018, 1, 0, 0.490018,-99) ); + // itree = 1197 + fBoostWeights.push_back(0.00288536); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.503219,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436745,-99) , +5, 1.93568, 1, 0, 0.494275,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.325746,-99) , +3, 0.725867, 0, 0, 0.49029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.283513,-99) , +2, 6.5, 0, 0, 0.486455,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.149044,-99) , +5, 2.5698, 1, 0, 0.485093,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187395,-99) , +13, 0.0727469, 1, 0, 0.481903,-99) ); + // itree = 1198 + fBoostWeights.push_back(0.00762887); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650437,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544897,-99) , +3, 0.986268, 0, 0, 0.604611,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.595937,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.448017,-99) , +8, 0.973006, 0, 0, 0.498866,-99) , +13, 0.00199371, 0, 0, 0.564827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467056,-99) , +8, -0.847487, 0, 0, 0.547684,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386178,-99) , +5, 0.427143, 0, 0, 0.530561,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.646322,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.545129,-99) , +8, -0.0684312, 1, 0, 0.572083,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.536523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414946,-99) , +2, 24.5, 0, 0, 0.475529,-99) , +15, 0.617518, 1, 0, 0.535093,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585225,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464817,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.356232,-99) , +15, 0.054013, 0, 0, 0.447111,-99) , +15, 0.0324343, 1, 0, 0.464559,-99) , +15, 0.232841, 0, 0, 0.49372,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.45887,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224211,-99) , +4, 1.52614, 1, 0, 0.426475,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256315,-99) , +15, 0.297385, 1, 0, 0.385141,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0786277,-99) , +4, 1.76083, 1, 0, 0.360959,-99) , +13, 0.00851039, 1, 0, 0.474272,-99) , +5, 1.3944, 1, 0, 0.497035,-99) ); + // itree = 1199 + fBoostWeights.push_back(0.0037248); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.658885,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.4987,-99) , +7, 0.0681269, 1, 0, 0.616982,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467364,-99) , +15, 0.0988113, 0, 0, 0.516551,-99) , +7, 0.0226516, 0, 0, 0.568371,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.572211,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490646,-99) , +2, 39.5, 0, 0, 0.500222,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.252139,-99) , +4, 1.99653, 1, 0, 0.49563,-99) , +10, 9565.13, 0, 0, 0.50569,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331562,-99) , +3, 0.99962, 1, 0, 0.500763,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30403,-99) , +12, 0.01821, 0, 0, 0.49581,-99) ); + // itree = 1200 + fBoostWeights.push_back(0.00513092); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648968,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554033,-99) , +16, 759.043, 1, 0, 0.602094,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487782,-99) , +7, 0.0483551, 0, 0, 0.57918,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382793,-99) , +1, 77.5, 1, 0, 0.556891,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.196621,-99) , +1, 11.5, 0, 0, 0.544401,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507026,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369949,-99) , +14, -5.4707, 0, 0, 0.501216,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110273,-99) , +4, 1.63672, 1, 0, 0.40637,-99) , +8, -0.935131, 0, 0, 0.492827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306639,-99) , +1, 31.5, 1, 0, 0.488206,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.155037,-99) , +7, 0.0693547, 1, 0, 0.482302,-99) , +2, 30.5, 0, 0, 0.493846,-99) ); + // itree = 1201 + fBoostWeights.push_back(0.00521195); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647084,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.631836,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.41784,-99) , +4, 1.35186, 1, 0, 0.597675,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604743,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.456081,-99) , +4, 1.68302, 0, 0, 0.483144,-99) , +13, 0.00371273, 0, 0, 0.535993,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492503,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.38974,-99) , +4, 1.74693, 1, 0, 0.483354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.266285,-99) , +7, 0.041887, 1, 0, 0.47532,-99) , +2, 23.5, 0, 0, 0.489784,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454789,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.260763,-99) , +5, 1.3124, 1, 0, 0.377995,-99) , +13, 0.0203209, 1, 0, 0.481289,-99) , +12, 0.555743, 0, 0, 0.486482,-99) ); + // itree = 1202 + fBoostWeights.push_back(0.00623444); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493678,-99) , +13, 0.00177523, 0, 0, 0.56573,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436929,-99) , +1, 62.5, 1, 0, 0.544004,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.3019,-99) , +1, 14.5, 0, 0, 0.526824,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577501,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489111,-99) , +12, 0.0423248, 1, 0, 0.49612,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.397222,-99) , +15, 0.612971, 1, 0, 0.488701,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.17447,-99) , +7, 0.0466457, 1, 0, 0.478497,-99) , +2, 24.5, 0, 0, 0.490591,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5029,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.176555,-99) , +14, -3.42246, 1, 0, 0.377852,-99) , +4, 1.82018, 1, 0, 0.483849,-99) ); + // itree = 1203 + fBoostWeights.push_back(0.00378082); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.650693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497421,-99) , +13, 0.00233571, 0, 0, 0.583303,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526658,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481208,-99) , +12, 0.0984411, 1, 0, 0.499782,-99) , +9, -5.90301, 1, 0, 0.508285,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.605605,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321562,-99) , +8, 0.98626, 0, 0, 0.423226,-99) , +4, 1.76837, 1, 0, 0.501531,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378432,-99) , +8, -0.981496, 0, 0, 0.496381,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.269117,-99) , +3, 0.999753, 1, 0, 0.49311,-99) ); + // itree = 1204 + fBoostWeights.push_back(0.00511216); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580801,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502796,-99) , +10, 4002.9, 1, 0, 0.548235,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.110196,-99) , +5, 2.25158, 1, 0, 0.541667,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523672,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458083,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308227,-99) , +12, 0.0774096, 1, 0, 0.384108,-99) , +7, 0.0209355, 0, 0, 0.454018,-99) , +14, -3.54405, 0, 0, 0.520408,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657679,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498558,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.430228,-99) , +12, 0.136147, 1, 0, 0.466594,-99) , +5, 2.11309, 0, 0, 0.471526,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323193,-99) , +5, 2.16623, 1, 0, 0.465161,-99) , +16, 1085.87, 1, 0, 0.491081,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28851,-99) , +3, 0.999637, 1, 0, 0.486096,-99) ); + // itree = 1205 + fBoostWeights.push_back(0.00374308); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.637383,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506271,-99) , +1, 20.5, 0, 0, 0.563059,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.557395,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465716,-99) , +6, 0.914646, 1, 0, 0.532731,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477848,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.36873,-99) , +4, 1.71687, 1, 0, 0.466628,-99) , +9, -3.18969, 1, 0, 0.482468,-99) , +4, 0.390545, 1, 0, 0.493712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.35796,-99) , +5, 0.4581, 0, 0, 0.487745,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.30723,-99) , +14, -5.73772, 0, 0, 0.483526,-99) ); + // itree = 1206 + fBoostWeights.push_back(0.00464678); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.664492,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.425996,-99) , +8, -0.900729, 0, 0, 0.549075,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547023,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.420117,-99) , +4, 0.759932, 1, 0, 0.475059,-99) , +15, 0.444321, 1, 0, 0.526124,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51369,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439486,-99) , +12, 0.104793, 1, 0, 0.471243,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15504,-99) , +4, 1.97331, 1, 0, 0.466975,-99) , +16, 456.25, 1, 0, 0.489489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.287038,-99) , +5, 2.26444, 1, 0, 0.484163,-99) , +10, -15056.2, 1, 0, 0.489804,-99) ); + // itree = 1207 + fBoostWeights.push_back(0.00743723); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.628685,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.548587,-99) , +16, 1623.69, 1, 0, 0.588192,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.604054,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500016,-99) , +9, 6.48252, 0, 0, 0.511577,-99) , +4, 0.505631, 1, 0, 0.530073,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419839,-99) , +5, 0.593481, 0, 0, 0.520827,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354206,-99) , +7, 0.00924779, 0, 0, 0.511422,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644257,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527157,-99) , +14, -3.89242, 0, 0, 0.588936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.363334,-99) , +8, 0.719855, 0, 0, 0.549211,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547055,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431034,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.115824,-99) , +5, 2.36153, 1, 0, 0.414227,-99) , +9, -4.03453, 1, 0, 0.440423,-99) , +11, 0.5, 1, 0, 0.476434,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488987,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387404,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.177394,-99) , +5, 1.83216, 1, 0, 0.288162,-99) , +11, 1.5, 0, 0, 0.36122,-99) , +13, 0.00210923, 1, 0, 0.440703,-99) , +5, 1.67717, 1, 0, 0.487415,-99) ); + // itree = 1208 + fBoostWeights.push_back(0.0043149); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648828,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659516,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.522772,-99) , +6, 0.176617, 1, 0, 0.571732,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.531654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.43434,-99) , +13, 0.0026932, 0, 0, 0.489664,-99) , +3, 0.982135, 1, 0, 0.526616,-99) , +4, 1.73414, 0, 0, 0.541121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.380836,-99) , +8, 0.996994, 1, 0, 0.529598,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513266,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438032,-99) , +3, 0.997597, 1, 0, 0.500309,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.447556,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.178405,-99) , +13, 0.0712741, 1, 0, 0.440635,-99) , +6, 0.838758, 1, 0, 0.483581,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.140356,-99) , +4, 2.20331, 1, 0, 0.481869,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.224904,-99) , +2, 6.5, 0, 0, 0.477215,-99) , +11, 1.5, 0, 0, 0.495025,-99) ); + // itree = 1209 + fBoostWeights.push_back(0.00690503); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.750168,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543021,-99) , +4, 1.566, 0, 0, 0.60807,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.438492,-99) , +12, 0.0288253, 0, 0, 0.541704,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.466749,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0609375,-99) , +7, 0.237406, 1, 0, 0.461105,-99) , +12, 0.125547, 1, 0, 0.508141,-99) , +15, 0.0690117, 1, 0, 0.517821,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386503,-99) , +16, 3.35351, 0, 0, 0.510813,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607517,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547298,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421048,-99) , +0, 11.5, 1, 0, 0.484186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421785,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195969,-99) , +7, 0.00910536, 0, 0, 0.37689,-99) , +6, 0.745339, 1, 0, 0.451768,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.147585,-99) , +5, 2.11359, 1, 0, 0.434762,-99) , +8, 0.996857, 0, 0, 0.452519,-99) , +7, 0.014807, 0, 0, 0.49422,-99) ); + // itree = 1210 + fBoostWeights.push_back(0.00378938); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.700879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49169,-99) , +13, 0.00394384, 0, 0, 0.600343,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.559263,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.490436,-99) , +8, 0.702477, 1, 0, 0.529576,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495489,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.426748,-99) , +8, -0.510893, 0, 0, 0.47899,-99) , +16, 471.711, 1, 0, 0.497915,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.339991,-99) , +1, 6.5, 0, 0, 0.492589,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.220077,-99) , +3, 0.999718, 1, 0, 0.488518,-99) , +10, -8271.06, 1, 0, 0.496284,-99) ); + // itree = 1211 + fBoostWeights.push_back(0.00494559); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.187094,-99) , +4, 1.81742, 1, 0, 0.564579,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.584158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.418115,-99) , +4, 1.48074, 0, 0, 0.484019,-99) , +13, 0.00173168, 0, 0, 0.527281,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617957,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501829,-99) , +5, 1.54273, 1, 0, 0.568257,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.483858,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.406385,-99) , +3, 0.99235, 1, 0, 0.46611,-99) , +9, 6.55704, 0, 0, 0.481529,-99) , +9, -0.9461, 1, 0, 0.499909,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.321733,-99) , +3, 0.999657, 1, 0, 0.49579,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306148,-99) , +7, 0.00739685, 0, 0, 0.491532,-99) ); + // itree = 1212 + fBoostWeights.push_back(0.00470584); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643239,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.563913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493411,-99) , +4, 0.757478, 1, 0, 0.517992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.348487,-99) , +1, 65.5, 1, 0, 0.51044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479601,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.353191,-99) , +5, 1.98478, 1, 0, 0.464646,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0677361,-99) , +7, 0.0504846, 1, 0, 0.451537,-99) , +1, 10.5, 0, 0, 0.493109,-99) , +12, 0.499154, 0, 0, 0.498929,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.329021,-99) , +12, 0.0227741, 0, 0, 0.492574,-99) ); + // itree = 1213 + fBoostWeights.push_back(0.00375157); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.647467,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510321,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.271539,-99) , +5, 2.20935, 1, 0, 0.506253,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.488529,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318994,-99) , +6, 0.37, 0, 0, 0.408832,-99) , +14, -4.54063, 0, 0, 0.497633,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.270725,-99) , +13, 0.0590895, 1, 0, 0.494499,-99) , +12, 0.502184, 0, 0, 0.500376,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.294466,-99) , +4, 1.97619, 1, 0, 0.495046,-99) ); + // itree = 1214 + fBoostWeights.push_back(0.00457929); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.621648,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516025,-99) , +9, -7.77889, 1, 0, 0.523078,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.544317,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310665,-99) , +8, 0.143361, 1, 0, 0.429243,-99) , +12, 0.03047, 0, 0, 0.514857,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521186,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.443403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299553,-99) , +7, 0.00886848, 0, 0, 0.359912,-99) , +12, 0.117721, 1, 0, 0.436492,-99) , +7, 0.0100386, 0, 0, 0.506297,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.513479,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330649,-99) , +13, 0.0340099, 0, 0, 0.447754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.208349,-99) , +3, 0.998281, 1, 0, 0.408232,-99) , +13, 0.0231836, 1, 0, 0.499357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308905,-99) , +4, 2.06599, 1, 0, 0.496332,-99) ); + // itree = 1215 + fBoostWeights.push_back(0.0036214); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.600832,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387991,-99) , +8, -0.249398, 0, 0, 0.568503,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.509233,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.417882,-99) , +14, -3.53579, 0, 0, 0.491354,-99) , +4, 1.58704, 0, 0, 0.502074,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39228,-99) , +4, 1.85373, 1, 0, 0.496505,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.300451,-99) , +12, 0.0165412, 0, 0, 0.492727,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.286873,-99) , +13, 0.0582729, 1, 0, 0.48923,-99) ); + // itree = 1216 + fBoostWeights.push_back(0.00560825); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.527549,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451663,-99) , +8, -0.847122, 0, 0, 0.515354,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53027,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350638,-99) , +5, 1.41332, 1, 0, 0.415189,-99) , +8, 0.983136, 1, 0, 0.50405,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.618273,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.467224,-99) , +8, 0.994682, 0, 0, 0.548546,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.216549,-99) , +8, 0.944842, 0, 0, 0.42332,-99) , +5, 2.02885, 1, 0, 0.496354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312981,-99) , +2, 6.5, 0, 0, 0.492587,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280959,-99) , +3, 0.999711, 1, 0, 0.488854,-99) ); + // itree = 1217 + fBoostWeights.push_back(0.00587916); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.617665,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.511293,-99) , +10, 9527.68, 0, 0, 0.527695,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.497438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.355592,-99) , +5, 1.65114, 1, 0, 0.465842,-99) , +6, 0.900236, 1, 0, 0.514203,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.240197,-99) , +5, 2.49306, 1, 0, 0.512499,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376523,-99) , +5, 0.565007, 0, 0, 0.503891,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.56131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.453238,-99) , +10, 3639.06, 1, 0, 0.513635,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381605,-99) , +12, 0.274416, 0, 0, 0.428616,-99) , +12, 0.133685, 1, 0, 0.471635,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.239115,-99) , +5, 2.11127, 1, 0, 0.456107,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.160199,-99) , +7, 0.0277873, 1, 0, 0.44173,-99) , +2, 11.5, 0, 0, 0.484467,-99) ); + // itree = 1218 + fBoostWeights.push_back(0.00858933); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654671,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550708,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.166239,-99) , +5, 1.8806, 1, 0, 0.524468,-99) , +8, 0.785323, 0, 0, 0.582033,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.641313,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.144115,-99) , +5, 1.90337, 1, 0, 0.620519,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528688,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.280371,-99) , +3, 0.9983, 1, 0, 0.495357,-99) , +9, -6.6022, 1, 0, 0.535146,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.603627,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496896,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369687,-99) , +10, 7731.97, 1, 0, 0.422378,-99) , +5, 2.14647, 0, 0, 0.448898,-99) , +8, 0.81418, 1, 0, 0.505862,-99) , +3, 0.980815, 1, 0, 0.532474,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619548,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489469,-99) , +13, 0.000604123, 0, 0, 0.578442,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.550359,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.400766,-99) , +3, 0.998614, 1, 0, 0.522172,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457628,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34037,-99) , +3, 0.993359, 0, 0, 0.410795,-99) , +6, 0.765536, 0, 0, 0.475761,-99) , +6, 0.376349, 1, 0, 0.515419,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.484435,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387468,-99) , +4, 1.41896, 1, 0, 0.462547,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225991,-99) , +15, 0.0321411, 0, 0, 0.451955,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.235691,-99) , +3, 0.997198, 1, 0, 0.441215,-99) , +9, 2.55105, 0, 0, 0.475036,-99) , +9, -0.767729, 1, 0, 0.499538,-99) ); + // itree = 1219 + fBoostWeights.push_back(0.00559362); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.717503,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.540075,-99) , +4, 1.54368, 0, 0, 0.586643,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.571483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.481633,-99) , +2, 15.5, 0, 0, 0.527679,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.378761,-99) , +3, 0.999085, 1, 0, 0.506787,-99) , +11, 1.5, 0, 0, 0.535753,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.640375,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.472826,-99) , +9, -0.797148, 1, 0, 0.584362,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.530163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454572,-99) , +3, 0.952045, 1, 0, 0.481855,-99) , +6, 0.657848, 0, 0, 0.494335,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.54613,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.471166,-99) , +15, 0.3716, 1, 0, 0.514666,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404787,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.165232,-99) , +13, 0.0151604, 1, 0, 0.375866,-99) , +6, 1.0106, 0, 0, 0.434286,-99) , +6, 0.786523, 1, 0, 0.477715,-99) , +9, 3.04971, 0, 0, 0.49121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347556,-99) , +12, 0.0227741, 0, 0, 0.485356,-99) ); + // itree = 1220 + fBoostWeights.push_back(0.00251294); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.654335,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.551295,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.496758,-99) , +2, 30.5, 0, 0, 0.507557,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.330566,-99) , +3, 0.99972, 1, 0, 0.503852,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.272575,-99) , +5, 2.4913, 1, 0, 0.502121,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.359447,-99) , +15, 0.0369743, 0, 0, 0.495689,-99) , +12, 0.507781, 0, 0, 0.501739,-99) ); + // itree = 1221 + fBoostWeights.push_back(0.0025); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.58615,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.500812,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.415621,-99) , +3, 0.884047, 0, 0, 0.491894,-99) , +4, 0.105574, 1, 0, 0.499309,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.331015,-99) , +14, -5.73726, 0, 0, 0.495436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388946,-99) , +5, 0.50588, 0, 0, 0.490572,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.345345,-99) , +5, 2.22327, 1, 0, 0.485521,-99) ); + // itree = 1222 + fBoostWeights.push_back(0.00442404); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.657084,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.568647,-99) , +7, 0.0268168, 1, 0, 0.604651,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.623902,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494701,-99) , +7, 0.0158451, 1, 0, 0.541145,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517254,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340242,-99) , +7, 0.0179079, 0, 0, 0.442599,-99) , +16, 835.453, 1, 0, 0.513498,-99) , +13, 0.00442244, 0, 0, 0.542281,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.421264,-99) , +8, -0.898089, 0, 0, 0.529649,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.5003,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427878,-99) , +6, 0.993465, 1, 0, 0.489823,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.376628,-99) , +4, 1.82192, 1, 0, 0.483428,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.285072,-99) , +3, 0.999605, 1, 0, 0.477956,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.274394,-99) , +3, 0.712762, 0, 0, 0.472931,-99) , +11, 1.5, 0, 0, 0.491883,-99) ); + // itree = 1223 + fBoostWeights.push_back(0.0042566); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.643184,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.579169,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.49743,-99) , +5, 1.2008, 1, 0, 0.522267,-99) , +3, 0.897864, 1, 0, 0.538788,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427244,-99) , +7, 0.0116606, 0, 0, 0.524826,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589408,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482652,-99) , +2, 30.5, 0, 0, 0.493963,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367846,-99) , +1, 40.5, 1, 0, 0.484012,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.59712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.318383,-99) , +10, -4335.58, 1, 0, 0.370534,-99) , +4, 1.67642, 1, 0, 0.473206,-99) , +16, 308.576, 1, 0, 0.490931,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34107,-99) , +5, 2.27799, 1, 0, 0.486984,-99) ); + // itree = 1224 + fBoostWeights.push_back(0.00275317); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607995,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.552346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489984,-99) , +4, 0.739461, 1, 0, 0.508912,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465303,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308279,-99) , +12, 0.0295578, 0, 0, 0.452219,-99) , +3, 0.994039, 1, 0, 0.490815,-99) , +9, 10.8193, 0, 0, 0.495413,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.212333,-99) , +4, 2.24563, 1, 0, 0.494106,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.299861,-99) , +7, 0.00716642, 0, 0, 0.490233,-99) ); + // itree = 1225 + fBoostWeights.push_back(0.00290269); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.601269,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51834,-99) , +13, 0.00344809, 0, 0, 0.56944,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610668,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523147,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465899,-99) , +12, 0.11373, 1, 0, 0.492024,-99) , +9, 7.95972, 0, 0, 0.500064,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.354682,-99) , +7, 0.086608, 1, 0, 0.491858,-99) , +5, 0.997194, 1, 0, 0.501495,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.387304,-99) , +5, 0.43734, 0, 0, 0.49642,-99) ); + // itree = 1226 + fBoostWeights.push_back(0.00688663); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644816,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.567323,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.459703,-99) , +6, 0.916971, 1, 0, 0.541377,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.390449,-99) , +5, 1.88006, 1, 0, 0.520606,-99) , +8, 0.996412, 0, 0, 0.533053,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.678099,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502441,-99) , +10, -4094.33, 1, 0, 0.567467,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507329,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.174289,-99) , +7, 0.0413423, 1, 0, 0.489991,-99) , +1, 15.5, 0, 0, 0.517312,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493873,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.391608,-99) , +1, 43.5, 1, 0, 0.478912,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547682,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.342513,-99) , +8, 0.975287, 0, 0, 0.388139,-99) , +15, 0.143978, 0, 0, 0.441657,-99) , +10, 845.394, 1, 0, 0.477373,-99) , +9, -1.64376, 1, 0, 0.496494,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.279052,-99) , +13, 0.0576018, 1, 0, 0.492376,-99) ); + // itree = 1227 + fBoostWeights.push_back(0.0060895); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.659913,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.554472,-99) , +14, -1.96096, 1, 0, 0.611814,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543939,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.419983,-99) , +13, 0.006937, 1, 0, 0.492334,-99) , +2, 16.5, 0, 0, 0.556569,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524438,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.399306,-99) , +12, 0.0744293, 0, 0, 0.467158,-99) , +14, -2.71727, 0, 0, 0.527199,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.526738,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.455334,-99) , +12, 0.118255, 1, 0, 0.491133,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.317429,-99) , +13, 0.0163145, 1, 0, 0.480427,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.323817,-99) , +1, 7.5, 0, 0, 0.468239,-99) , +5, 1.46817, 1, 0, 0.493933,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334758,-99) , +5, 0.507591, 0, 0, 0.487035,-99) ); + // itree = 1228 + fBoostWeights.push_back(0.00568934); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.712641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585324,-99) , +8, 0.471744, 1, 0, 0.643971,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585808,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474933,-99) , +15, 0.212933, 1, 0, 0.532482,-99) , +4, 1.30939, 0, 0, 0.578655,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2071,-99) , +4, 1.95381, 1, 0, 0.567159,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622158,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.514596,-99) , +16, 1144.66, 1, 0, 0.566363,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.69654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.501468,-99) , +4, 2.1288, 0, 0, 0.506589,-99) , +12, 0.0939131, 1, 0, 0.525031,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465879,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.388993,-99) , +0, 20.5, 1, 0, 0.426575,-99) , +12, 0.0369267, 0, 0, 0.513916,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.487971,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.248967,-99) , +4, 2.03882, 1, 0, 0.485075,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.304148,-99) , +9, 0.180214, 0, 0, 0.466698,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.232281,-99) , +3, 0.998017, 1, 0, 0.451797,-99) , +9, -0.0966898, 1, 0, 0.487145,-99) , +9, 4.82226, 0, 0, 0.498651,-99) ); + // itree = 1229 + fBoostWeights.push_back(0.00642412); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.529791,-99) , +15, 0.173076, 1, 0, 0.570522,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.53876,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485556,-99) , +12, 0.110474, 1, 0, 0.509022,-99) , +9, 3.30206, 0, 0, 0.522371,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.474207,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.32469,-99) , +8, 0.998978, 0, 0, 0.405689,-99) , +14, -4.68257, 0, 0, 0.514123,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.350629,-99) , +1, 62.5, 1, 0, 0.508104,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.639993,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475466,-99) , +1, 10.5, 0, 0, 0.582855,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.392698,-99) , +8, 0.900294, 0, 0, 0.543478,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.169258,-99) , +3, 0.947009, 0, 0, 0.5016,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.172164,-99) , +14, -2.81329, 1, 0, 0.414997,-99) , +4, 1.69213, 1, 0, 0.498424,-99) ); + // itree = 1230 + fBoostWeights.push_back(0.00351344); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.648143,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.504978,-99) , +9, 11.333, 0, 0, 0.510163,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.195921,-99) , +7, 0.250994, 1, 0, 0.508044,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532361,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423518,-99) , +4, 1.10263, 0, 0, 0.461357,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.087557,-99) , +4, 1.57448, 1, 0, 0.440365,-99) , +8, -0.834325, 0, 0, 0.498333,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326037,-99) , +3, 0.706502, 0, 0, 0.494442,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.360886,-99) , +12, 0.0220065, 0, 0, 0.489192,-99) ); + // itree = 1231 + fBoostWeights.push_back(0.00276713); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613775,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.494142,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.123031,-99) , +7, 0.168589, 1, 0, 0.491905,-99) , +2, 78.5, 0, 0, 0.496354,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.256779,-99) , +7, 0.00678936, 0, 0, 0.49334,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.315635,-99) , +3, 0.999662, 1, 0, 0.489451,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.162705,-99) , +5, 2.4937, 1, 0, 0.487386,-99) ); + // itree = 1232 + fBoostWeights.push_back(0.00471116); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.636319,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.627728,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534629,-99) , +4, 0.337997, 0, 0, 0.589537,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.517325,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431229,-99) , +10, 5150.77, 1, 0, 0.489138,-99) , +8, 0.339567, 1, 0, 0.534904,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.414768,-99) , +8, -0.885075, 0, 0, 0.51639,-99) , +3, 0.905838, 1, 0, 0.535415,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.520609,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.462783,-99) , +9, -0.0732493, 1, 0, 0.492522,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0999387,-99) , +7, 0.284097, 1, 0, 0.490424,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.19804,-99) , +6, 0.110759, 0, 0, 0.485561,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.340708,-99) , +3, 0.847708, 0, 0, 0.475411,-99) , +4, 0.845754, 1, 0, 0.497057,-99) ); + // itree = 1233 + fBoostWeights.push_back(0.00296026); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.521433,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.424624,-99) , +7, 0.0798114, 1, 0, 0.512813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.370141,-99) , +8, -0.987868, 0, 0, 0.507468,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.365212,-99) , +14, -5.31091, 0, 0, 0.502111,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.290441,-99) , +3, 0.691124, 0, 0, 0.498483,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +5, 2.56529, 1, 0, 0.496797,-99) ); + // itree = 1234 + fBoostWeights.push_back(0.0051984); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.63405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.51812,-99) , +3, 0.831119, 1, 0, 0.525754,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.404159,-99) , +3, 0.737458, 0, 0, 0.520819,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493803,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.130198,-99) , +7, 0.045531, 1, 0, 0.478537,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.231795,-99) , +3, 0.956505, 0, 0, 0.450368,-99) , +1, 9.5, 0, 0, 0.506526,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457784,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.241715,-99) , +5, 1.60624, 1, 0, 0.387276,-99) , +3, 0.99917, 1, 0, 0.498178,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444137,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.265634,-99) , +5, 1.73463, 1, 0, 0.393862,-99) , +12, 0.0312599, 0, 0, 0.489348,-99) ); + // itree = 1235 + fBoostWeights.push_back(0.0059381); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589432,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.479635,-99) , +7, 0.0850548, 1, 0, 0.557762,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.180523,-99) , +1, 10.5, 0, 0, 0.545068,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.492008,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.373405,-99) , +7, 0.0331107, 1, 0, 0.481191,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.0140114,-99) , +0, 43.5, 1, 0, 0.474703,-99) , +2, 24.5, 0, 0, 0.492071,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0,-99) , +7, 0.322914, 1, 0, 0.490337,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310207,-99) , +12, 0.0181941, 0, 0, 0.48587,-99) ); + // itree = 1236 + fBoostWeights.push_back(0.0058793); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.615021,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.477685,-99) , +13, 0.036751, 1, 0, 0.593217,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.502076,-99) , +13, 0.00191185, 0, 0, 0.562749,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.516614,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.369644,-99) , +1, 27.5, 1, 0, 0.510774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264705,-99) , +7, 0.0501267, 1, 0, 0.500619,-99) , +2, 30.5, 0, 0, 0.511589,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.581408,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.524052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.306798,-99) , +9, -3.16799, 1, 0, 0.427301,-99) , +9, 9.15823, 0, 0, 0.466122,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.193309,-99) , +7, 0.0997806, 1, 0, 0.443378,-99) , +3, 0.998052, 1, 0, 0.500268,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.297645,-99) , +2, 6.5, 0, 0, 0.496854,-99) ); + // itree = 1237 + fBoostWeights.push_back(0.00504248); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.673346,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573409,-99) , +13, 0.00299853, 0, 0, 0.624314,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.52952,-99) , +9, -2.33146, 0, 0, 0.595345,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.610563,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55903,-99) , +8, 0.404705, 0, 0, 0.584909,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.506816,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.381932,-99) , +7, 0.0285072, 1, 0, 0.488175,-99) , +3, 0.997182, 0, 0, 0.511463,-99) , +2, 24.5, 0, 0, 0.537344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.386028,-99) , +12, 0.01821, 0, 0, 0.528675,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.573052,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.482217,-99) , +9, -0.704184, 1, 0, 0.518086,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.464076,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302045,-99) , +15, 0.361093, 1, 0, 0.444103,-99) , +3, 0.992437, 1, 0, 0.491115,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.371371,-99) , +7, 0.00927356, 0, 0, 0.481678,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.335977,-99) , +4, 1.82581, 1, 0, 0.473353,-99) , +12, 0.11049, 1, 0, 0.499256,-99) ); + // itree = 1238 + fBoostWeights.push_back(0.00267787); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.609995,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.507886,-99) , +8, 0.993235, 0, 0, 0.513775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.398547,-99) , +14, -5.10416, 0, 0, 0.507814,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.326965,-99) , +3, 0.999649, 1, 0, 0.503634,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.316655,-99) , +2, 6.5, 0, 0, 0.499793,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.309734,-99) , +12, 0.01821, 0, 0, 0.495369,-99) ); + // itree = 1239 + fBoostWeights.push_back(0.00472121); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.665845,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.547131,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485101,-99) , +9, -1.10265, 1, 0, 0.509468,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.452232,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.107221,-99) , +0, 22.5, 1, 0, 0.436021,-99) , +1, 9.5, 0, 0, 0.495455,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.402167,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.14633,-99) , +13, 0.0114064, 1, 0, 0.34812,-99) , +3, 0.999134, 1, 0, 0.487027,-99) , +9, 12.9108, 0, 0, 0.491186,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.278594,-99) , +12, 0.01821, 0, 0, 0.486574,-99) ); + // itree = 1240 + fBoostWeights.push_back(0.00470255); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.65438,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.538387,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.480635,-99) , +8, 0.892283, 1, 0, 0.522825,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.493405,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.368502,-99) , +15, 0.063518, 0, 0, 0.474593,-99) , +16, 4083.78, 1, 0, 0.500406,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.26635,-99) , +5, 2.28857, 1, 0, 0.498349,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.543961,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.308445,-99) , +1, 10.5, 0, 0, 0.468683,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.217344,-99) , +14, -2.84499, 1, 0, 0.399256,-99) , +4, 1.70301, 1, 0, 0.488801,-99) , +12, 0.493768, 0, 0, 0.495382,-99) ); + // itree = 1241 + fBoostWeights.push_back(0.00615023); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.562345,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.451481,-99) , +8, -0.767529, 0, 0, 0.546743,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.498775,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.259955,-99) , +0, 79.5, 1, 0, 0.48548,-99) , +16, 1971.12, 1, 0, 0.517936,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.334224,-99) , +13, 0.056903, 1, 0, 0.513059,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.613616,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476859,-99) , +14, -3.03186, 1, 0, 0.501898,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.458864,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.296003,-99) , +0, 11.5, 1, 0, 0.395381,-99) , +14, -3.33944, 0, 0, 0.467284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.133141,-99) , +7, 0.0267996, 1, 0, 0.451962,-99) , +2, 11.5, 0, 0, 0.493656,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.320242,-99) , +3, 0.999622, 1, 0, 0.489122,-99) ); + // itree = 1242 + fBoostWeights.push_back(0.00838077); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.644615,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.580075,-99) , +5, 1.26272, 1, 0, 0.615556,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.577355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.427809,-99) , +16, 41.0129, 1, 0, 0.530181,-99) , +16, 215.217, 0, 0, 0.564826,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534671,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.431694,-99) , +5, 1.33819, 0, 0, 0.487648,-99) , +2, 12.5, 0, 0, 0.541513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.619984,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.367598,-99) , +8, -0.105032, 0, 0, 0.587794,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476302,-99) , +4, 1.5089, 0, 0, 0.530707,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570355,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.382737,-99) , +6, 0.620017, 0, 0, 0.463922,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.2112,-99) , +13, 0.00313258, 1, 0, 0.406759,-99) , +11, 1.5, 0, 0, 0.475394,-99) , +5, 1.65081, 1, 0, 0.516789,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.574944,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.586214,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.44327,-99) , +10, 3009, 1, 0, 0.527829,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.444528,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.128726,-99) , +5, 2.1301, 1, 0, 0.437581,-99) , +13, 0.000902971, 1, 0, 0.471342,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.475365,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.347344,-99) , +10, 2646.91, 1, 0, 0.412622,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.234248,-99) , +4, 1.54881, 1, 0, 0.384753,-99) , +11, 0.5, 1, 0, 0.442512,-99) , +10, 11452.3, 0, 0, 0.456003,-99) , +16, 2316.2, 1, 0, 0.487918,-99) ); + // itree = 1243 + fBoostWeights.push_back(0.00592376); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.656322,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.585585,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.485159,-99) , +8, 0.910757, 1, 0, 0.563747,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.50087,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.37231,-99) , +3, 0.790806, 0, 0, 0.489715,-99) , +4, 0.730631, 1, 0, 0.512476,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.25636,-99) , +15, 0.0320959, 0, 0, 0.506681,-99) , +12, 0.417282, 0, 0, 0.51736,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.626635,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.564523,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.457345,-99) , +10, 10916.1, 0, 0, 0.482088,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.189627,-99) , +5, 2.02149, 1, 0, 0.471726,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.519774,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.374715,-99) , +4, 1.40595, 0, 0, 0.43284,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.312847,-99) , +1, 10.5, 0, 0, 0.389043,-99) , +8, 0.864511, 1, 0, 0.448386,-99) , +10, -14838.5, 1, 0, 0.46081,-99) , +3, 0.990011, 1, 0, 0.492689,-99) ); + // itree = 1244 + fBoostWeights.push_back(0.00373221); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.61268,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.570598,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.476149,-99) , +7, 0.0167008, 1, 0, 0.524886,-99) , +2, 20.5, 0, 0, 0.549702,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.439939,-99) , +15, 1.15424, 1, 0, 0.537795,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.423888,-99) , +8, -0.797215, 0, 0, 0.521712,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489908,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.328605,-99) , +14, -5.35767, 0, 0, 0.484567,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.352085,-99) , +2, 7.5, 0, 0, 0.478813,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.226464,-99) , +13, 0.0793784, 1, 0, 0.475693,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.310499,-99) , +3, 0.774557, 0, 0, 0.468872,-99) , +11, 1.5, 0, 0, 0.487194,-99) ); + // itree = 1245 + fBoostWeights.push_back(0.00531426); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.676198,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.534349,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.445979,-99) , +12, 0.0388713, 0, 0, 0.518633,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.465673,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.28502,-99) , +4, 1.67637, 1, 0, 0.44742,-99) , +12, 0.197529, 1, 0, 0.499436,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.264784,-99) , +2, 6.5, 0, 0, 0.494896,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.582243,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.39966,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.233186,-99) , +6, 0.358805, 0, 0, 0.326077,-99) , +5, 2.11184, 0, 0, 0.390361,-99) , +14, -4.67499, 0, 0, 0.486269,-99) , +12, 0.525387, 0, 0, 0.492723,-99) ); + // itree = 1246 + fBoostWeights.push_back(0.00503897); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.622644,-99) , +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.532762,-99) , +10, 3798.63, 1, 0, 0.583127,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.495712,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.412269,-99) , +6, 0.870916, 1, 0, 0.471608,-99) , +13, 0.00395468, 0, 0, 0.531164,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.607654,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.469327,-99) , +9, -8.48724, 1, 0, 0.477896,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.55276,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.273217,-99) , +12, 0.397643, 0, 0, 0.351775,-99) , +13, 0.0139882, 1, 0, 0.466497,-99) , +5, 1.37106, 1, 0, 0.489934,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.364926,-99) , +5, 0.570454, 0, 0, 0.483842,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.15548,-99) , +5, 2.56973, 1, 0, 0.482511,-99) ); + // itree = 1247 + fBoostWeights.push_back(0.00314249); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.589316,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.510677,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.454816,-99) , +8, 0.718639, 1, 0, 0.488356,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.225668,-99) , +4, 2.16193, 1, 0, 0.485756,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.302103,-99) , +3, 0.736853, 0, 0, 0.481107,-99) , +4, 0.0654309, 1, 0, 0.489641,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.34337,-99) , +5, 0.44466, 0, 0, 0.48332,-99) ); + // itree = 1248 + fBoostWeights.push_back(0.00303527); + fForest.push_back( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.634513,-99) , +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.528948,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.436656,-99) , +8, -0.871959, 0, 0, 0.51825,-99) , +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.489056,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.372576,-99) , +5, 1.92656, 1, 0, 0.473443,-99) , +16, 992.322, 1, 0, 0.493949,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.301059,-99) , +2, 6.5, 0, 0, 0.490344,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.343643,-99) , +13, 0.0340396, 1, 0, 0.485307,-99) , +12, 0.526826, 0, 0, 0.490787,-99) ); + // itree = 1249 + fBoostWeights.push_back(0.00279527); + fForest.push_back( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +new BDTNode( +0, +0, +-1, 0, 1, 1, 0.523347,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.473698,-99) , +1, 9.5, 0, 0, 0.512184,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.383482,-99) , +1, 67.5, 1, 0, 0.508403,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.385026,-99) , +8, -0.982444, 0, 0, 0.502981,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.27458,-99) , +2, 6.5, 0, 0, 0.4992,-99) , +new BDTNode( +0, +0, +-1, 0, 1, -1, 0.183813,-99) , +4, 2.07717, 1, 0, 0.495393,-99) ); + return; +} + +// Clean up +inline void ReadBDT::Clear() +{ + for (unsigned int itree=0; itree& inputValues ) const + { + // classifier response value + double retval = 0; + + // classifier response, sanity check first + if (!IsStatusClean()) { + std::cout << "Problem in class \"" << fClassName << "\": cannot return classifier response" + << " because status is dirty" << std::endl; + retval = 0; + } + else { + if (IsNormalised()) { + // normalise variables + std::vector iV; + iV.reserve(inputValues.size()); + int ivar = 0; + for (std::vector::const_iterator varIt = inputValues.begin(); + varIt != inputValues.end(); varIt++, ivar++) { + iV.push_back(NormVariable( *varIt, fVmin[ivar], fVmax[ivar] )); + } + retval = GetMvaValue__( iV ); + } + else { + retval = GetMvaValue__( inputValues ); + } + } + + return retval; + } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h b/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h new file mode 100644 index 000000000..cebce3c00 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h @@ -0,0 +1,425 @@ +#ifndef __ATLAS_H__ +#define __ATLAS_H__ + +//NOTE: pending in-use; +//this only moves some preparing functions into a file +//with additional structure; +//it DOES NOT really factor out common functions. + +//#include "larsim/MCCheater/BackTrackerService.h" +//#include "larsim/MCCheater/ParticleInventoryService.h" +//#include "SinglePhoton_module.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" + +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + + + + +/* + * Get Labels & prepare vector maps + */ + +namespace single_photon +{ /*************** + * A class that designed for storing addresses for all associated (to an event) tracks, showers, + * and their cooresponding PFParticles. + * evt (input) - the event that we currently look at. + * *************/ + +// typedef std::vector< art::Ptr > PFParticleVector; +// typedef std::vector< art::Ptr > TrackVector; +// typedef std::vector< art::Ptr > ShowerVector; +// typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + class Atlas{//Initialize this with event address; + friend class SinglePhoton;//private as default + + public: + //Constructor + Atlas();//this might be useless; + //Overflow constructor 1; + Atlas( const art::Event &evt, + std::vector< std::string > labels, + bool is_data);//this initialize vectors and maps below + +// ~Atlas(){ +// MCParticleToTrackIdMap.clear(); +// }; +// //main stuffs that we feed into the vertex builder. + +/* + * The constructor takes care of the following basic recob objects. + * + */ + //the following recob objects are created through the overflow constructor 1 (see above); + std::vector< art::Ptr > particles;//this is loaded depends on the option m_run_all_pfps, configurable in the .fcl file. + std::vector< art::Ptr > all_pfparticles; + std::vector< art::Ptr > all_tracks; + std::vector< art::Ptr > all_showers; + std::vector< art::Ptr > all_hits; + std::vector< art::Ptr > all_opflashes; + //get the cluster handle for the dQ/dx calc + std::vector< art::Ptr > all_clusters; + std::vector> kalmanTrackVector; + std::vector> sliceVector; + + //MCTruth (only initialized when the sample is not data) + std::vector> mcTruthVector; + std::vector> matchedMCParticleVector; + +/* + * The overload constructor 1 takes care of the following maps. + * + */ + std::map< size_t, art::Ptr> IDToPFParticleMap; +// std::map< art::Ptr> PFParticleToIDMap;//This makse more consistant, but it needs works! + std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; + std::map< art::Ptr , std::vector> > PFParticleToMetadataMap;//old name pfParticleToMetadataMap; + std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; + std::map< art::Ptr , std::vector> > PFParticleToClustersMap; + std::map< art::Ptr , std::vector> > ClusterToHitsMap; + std::map, art::Ptr> PFParticlesToShowerReco3DMap; + std::map, art::Ptr> PFParticlesToShowerKalmanMap; + std::map,std::vector>> kalmanTrackToCaloMap; + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map< art::Ptr, std::vector> > sliceToHitsMap; + std::map> > sliceIDToPFParticlesMap; + std::map> > sliceIDToHitsMap; +/* + * Initially empty variables to be filled from other parts of the code. + * + */ +//The followings are taken care by the CollectTracksAndShowers_v2() in BobbyVertexBuilder.h + std::vector< art::Ptr > selected_tracks; + std::vector< art::Ptr > selected_showers; + std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. + std::vector< art::Ptr > more_showers; + //Maps for more pandora objects. + std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; + std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + + std::map< art::Ptr , double > trackToDistMap; + std::map< art::Ptr , double > showerToDistMap; + +//The followings are taken care by the AnalyzeSlices() in analyze_Slice.h + std::map sliceIdToNuScoreMap; + //Pairs that connect PFParticle to sliceID. + std::vector,int>> primaryPFPSliceIdVec; + std::map< art::Ptr, int> PFPToSliceIdMap; + std::map< art::Ptr, bool> PFPToClearCosmicMap; + std::map< art::Ptr, bool> PFPToNuSliceMap; + std::map< art::Ptr, double> PFPToTrackScoreMap; + +//Maps for simb objects; for MC sample, not applied to data + + + //Filled in the CollectMCParticles_v2() in Singlephoton_module.cc + std::map> MCParticleToTrackIdMap; + std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; + std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + std::map< art::Ptr, int> MCParticleToAncestorPdgMap; + + //Filled in the showerRecoMCmatching() in reco_truth_matching.h +// std::vector> matchedMCParticleVector; + std::map< art::Ptr, art::Ptr > showerToMCParticleMap; + + //Filled in the RecoMCTracks() in analyze_Tracks.h + std::map< art::Ptr, art::Ptr > trackToMCParticleMap; + + + //FindManyP's! + //specially for the number of coorresponding recob (pandora_objects) to a PFParticle; + // example: PFParticleIsATrack[particles.key()] gives the vector that containts all + // cooresponding tracks; + art::FindManyP< recob::Track >* PFParticleAsATrack; + art::FindManyP< recob::Shower >* PFParticleAsAShower; + +// art::FindManyP< recob::Track > PFParticleAsATrack(PFParticleHandle, evt, m_trackLabel); +// art::FindManyP< recob::Shower > PFParticleAsAShower(PFParticleHandle, evt, m_showerLabel); + + private: + /*********************** + * + * Wigets for constructing the different types of varaibels.in this class + * 1. HandleToVector; + * + * **********************/ + //1. Scratch from Handle, and return a equivalently useful vector. + //sample usage: + // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; + // recob::Hit dummy_hit;//This is to specify the template; + // std::vector> hitVector = HandleToVector(dummy_hit, evt, m_hitfinderLabel); + template //A helper template that allows you to make compliated types. + struct temporary_types{ + using type1 = std::vector>; + using type2 = art::ValidHandle>; + using type3 = std::vector; + }; + template //ref_type is only used to identify the temporary_types late. + typename temporary_types::type1 HandleToVector(recob_object ref_type, const art::Event &evt, std::string &label){ + + typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); + typename temporary_types::type1 Vector; + art::fill_ptr_vector(Vector,Handle); + return Vector; + } + + //2. Wiget 2 comes here.. + + }; + + +//sth similar to class DetectorObjects + +//create struct for Track and Shower to add more detail to them, i.e. the geoalgo class; + +//struct Track +//struct Shower + + + + + + + + +//THE HEADER FILE IS THE ABOVE + + + + //Constructor + Atlas::Atlas (){} + //Overloaded Constructor 1, initialize the essential variables + Atlas::Atlas ( const art::Event &evt, + std::vector labels, + bool is_data){ + + //PREPARE some recob objects; + //vector labels = {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel,m_generatorLabel, m_geantModuleLabel} + recob::PFParticle dummy_PFParticle; + all_pfparticles = HandleToVector(dummy_PFParticle, evt, labels[4]); + recob::Track dummy_track;//This is to specify the template; + all_tracks = HandleToVector(dummy_track, evt, labels[0]);//m_trackLabel + kalmanTrackVector = HandleToVector(dummy_track,evt,labels[6]);//m_showerKalmanLabel + + recob::Shower dummy_shower;//This is to specify the template; + all_showers = HandleToVector(dummy_shower, evt, labels[1]);//m_showerLabel + recob::Hit dummy_hit; + all_hits = HandleToVector(dummy_hit, evt, labels[2]);//m_hitfinderLabel + + recob::OpFlash dummy_opflash; + all_opflashes = HandleToVector(dummy_opflash, evt, labels[3]);//m_flashLabel + + recob::Cluster dummy_cluster; + all_clusters = HandleToVector(dummy_cluster, evt, labels[4]);//m_pandoraLabel + + recob::Slice dummy_slice; + sliceVector = HandleToVector(dummy_slice, evt, labels[4]); + + if(!is_data){ + //MCTruth Handle + simb::MCTruth dummy_geant; //for Geant info. + mcTruthVector = HandleToVector(dummy_geant, evt, labels[8]); + + simb::MCParticle dummy_genie; //for Genie info. + matchedMCParticleVector = HandleToVector(dummy_genie, evt, labels[9]); + } + //CREATE maps! + //Ingredient 1: Handles; I temporary define it here for mapping purpose; + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(labels[4]);//This is useful for FindManyP< reco::Track/Shower> + art::ValidHandle> const & clusterHandle = evt.getValidHandle>(labels[4]); + art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(labels[6]); + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(labels[4]); + //a cross check + if (!pfParticleHandle.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; + return; + } + + + //Ingredient 2: FindManyPs; these will be gone when construction finished + art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, labels[4]); + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP spacePoints_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, labels[4]); + art::FindManyP hits_per_cluster(clusterHandle, evt, labels[4]); + art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, labels[5]); + art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, labels[6]); + art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, labels[7]); + art::FindManyP pfparticles_per_slice(sliceHandle, evt, labels[4]); + art::FindManyP hits_per_slice(sliceHandle, evt, labels[4]); + + //make maps here; + for(size_t i=0; i< all_pfparticles.size(); ++i){ + const art::Ptr pfp = all_pfparticles[i]; + PFParticlesToVerticesMap[pfp] = vertices_per_pfparticle.at(pfp.key());//old name: pfParticlesToVerticesMap; + + PFParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + IDToPFParticleMap[pfp->Self()] = pfp; + PFParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); + PFParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + + //3D Showers + if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ + PFParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); + } + //---------Kalman Track Showers + if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ + PFParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); + } + } + //other maps not on pfParticles; + for(size_t i=0; i< all_clusters.size(); ++i){ + auto cluster = all_clusters[i]; + ClusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); + } + + //----- kalmon Cali + for(size_t i=0; i< kalmanTrackVector.size(); ++i){ + auto trk = kalmanTrackVector[i]; + if(cali_per_kalmantrack.at(trk.key()).size()!=0){ + kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); + } + } + + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToPFParticlesMap[slice] = pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); + sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); + } + +//------- trackToMCParticleMap -------- +// if(!is_data){ +// //Fill in trackToMCParticleMap; +// //https://indico.fnal.gov/event/20453/session/6/contribution/4/material/slides/0.pdf +// //BackTrackerService and ParticleInventoryService +// art::ServiceHandle bt_serv; +// art::ServiceHandle pi_serv; +// //Get tracks +// art::Handle< std::vector > trackListHandle; +// std::vector > tracklist; +// if (evt.getByLabel(labels[0],trackListHandle)) art::fill_ptr_vector(tracklist, trackListHandle); +// //Get hit-track association +// art::FindManyP fmth(trackListHandle, evt, labels[0]); +// //Loop over all tracks +// for(size_t i=0; i > allHits = fmth.at(i); +// std::map trkide; +// cout<<"Size of hits "< hit = allHits[h]; +// //TrackIDE saves the energy deposition for each Geant particle ID +// std::vector TrackIDs = bt_serv->HitToEveTrackIDEs(hit); +// cout<<"Size of TrackIDs "<::iterator ii = trkide.begin(); ii!=trkide.end(); ++ii){ +// cout<<"Possible IDs "<first<second; +// if ((ii->second)>maxe){ +// TrackID = ii->first; //TrackID maxe = ii->second; //Energy +// } } +// // Now have trackID, so get PdG code. +// +// // const simb::MCParticle *particle = pi_serv->TrackIdToParticle_P(TrackID); +// +// cout<<"Ptr::MCP CHECK "< mcp : matchedMCParticleVector){ +// //cout<<"Match ID "<TrackId()<TrackId() == TrackID){ cout<<"Yes"< +#include +#include +#include +#include +#include + + +class DBSCAN{ + + public: + double m_eps; + int m_minpts; + + /// constructor + DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + // Guanqun: probably not needed + ~DBSCAN(){} + + // scan over points, and group them into different clusters + std::vector Scan2D(std::vector> &pts); + // grab neighbours of point i. + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // merge neighbours in seed and pts together into seed + int UnionSets(std::vector> &seed, std::vector> &pts); +}; + +std::vector DBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + +} + + + +std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; +} + + +int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; +} + + +#endif diff --git a/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc b/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc new file mode 100644 index 000000000..58f00d8eb --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc @@ -0,0 +1,207 @@ +//////////////////////////////////////////////////////////////////////// +// Class: NCRadiativeResonant +// Plugin Type: filter (art v2_05_00) +// File: NCRadiativeResonant_module.cc +// +// Generated at Fri Jun 23 10:33:44 2017 by Robert Murrells using cetskelgen +// from cetlib version v1_21_00. +//////////////////////////////////////////////////////////////////////// + + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + + +#include "art/Framework/Services/Optional/TFileService.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Optional/TFileDirectory.h" + +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "TTree.h" + +#include + +class NCRadiativeResonant : public art::EDFilter { + + TTree * ftree; + + int frun; + int fsubrun; + int fevent; + int fnu_pdg; + int fccnc; + int fmode; + int finteraction_type; + int fis_nc_delta_radiative; + int fparent_status_code; + int fparent_pdg; + +public: + explicit NCRadiativeResonant(fhicl::ParameterSet const & p); + + NCRadiativeResonant(NCRadiativeResonant const &) = delete; + NCRadiativeResonant(NCRadiativeResonant &&) = delete; + NCRadiativeResonant & operator = (NCRadiativeResonant const &) = delete; + NCRadiativeResonant & operator = (NCRadiativeResonant &&) = delete; + + void cout_stuff(art::Event & e, bool passed); + void FillTree(art::Event & e, + size_t const mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative); + void Reset(); + bool filter(art::Event & e) override; + +}; + + +NCRadiativeResonant::NCRadiativeResonant(fhicl::ParameterSet const & p) : + ftree(nullptr) { + + if(true) { + + art::ServiceHandle tfs; + ftree = tfs->make("NCRadiativeResonantFilter", ""); + + ftree->Branch("run", &frun, "run/I"); + ftree->Branch("subrun", &fsubrun, "subrun/I"); + ftree->Branch("event", &fevent, "event/I"); + ftree->Branch("nu_pdg", &fnu_pdg, "nu_pdg/I"); + ftree->Branch("ccnc", &fccnc, "ccnc/I"); + ftree->Branch("mode", &fmode, "mode/I"); + ftree->Branch("is_nc_delta_radiative", &fis_nc_delta_radiative, "is_nc_delta_radiative/I"); + ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); + ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); + + } + +} + + +void NCRadiativeResonant::cout_stuff(art::Event & e, bool passed = false) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + std::cout << passed << "\n" + << "==========================\n"; + for(simb::MCTruth const & mct : *ev_mct) { + std::cout << "----------------------------\n"; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + std::cout <<"FULL: "<< mcp.TrackId() << " " << mcp.PdgCode() << " " << mcp.Mother() << " " << mcp.StatusCode() << "\n"; + } + } + +} + + +void NCRadiativeResonant::Reset() { + + frun = -1; + fsubrun = -1; + fevent = -1; + fnu_pdg = 0; + fccnc = -1; + fmode = -2; + finteraction_type = -2; + fis_nc_delta_radiative = -1; + fparent_status_code = -1; + fparent_pdg = 0; + +} + + +void NCRadiativeResonant::FillTree(art::Event & e, + size_t mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative) { + + Reset(); + + frun = e.id().run(); + fsubrun = e.id().subRun(); + fevent = e.id().event(); + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); + + fnu_pdg = mcn.Nu().PdgCode(); + fccnc = mcn.CCNC(); + fmode = mcn.Mode(); + finteraction_type = mcn.InteractionType(); + + fis_nc_delta_radiative = is_nc_delta_radiative; + if(parent_index != SIZE_MAX) { + fparent_status_code = ev_mct->at(mct_index).GetParticle(parent_index).StatusCode(); + fparent_pdg = ev_mct->at(mct_index).GetParticle(parent_index).PdgCode(); + } + + ftree->Fill(); + +} + + +bool NCRadiativeResonant::filter(art::Event & e) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + cout_stuff(e,true); + + for(size_t i = 0; i < ev_mct->size(); ++i) { + + simb::MCTruth const & mct = ev_mct->at(i); + if(mct.GetNeutrino().CCNC() != 1) continue; + + std::vector exiting_photon_parents; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + if(mcp.TrackId() != i) { + std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; + exit(1); + } + if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; + exiting_photon_parents.push_back(mcp.Mother()); + } + + std::vector in_nucleus_photons; + for(size_t const s : exiting_photon_parents) { + simb::MCParticle const & mcp = mct.GetParticle(s); + if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) { + if(ftree) FillTree(e, i, mcp.PdgCode(), true); + std::cout<<"YES: "< +#include + +namespace seaview{ + + int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ + + const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); + bool found_hit_in_slice = false, found_hit_not_in_slice = false; + for(auto hit : f_hits){ + auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); + if( iter == slice_hits.end()) + found_hit_not_in_slice = true; + else{ + found_hit_in_slice = true; + } + + if(found_hit_in_slice && found_hit_not_in_slice) return 0; + } + + return found_hit_in_slice ? 1 : -1; + } + + void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ + + //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC + double max_ioc_to_shower_start = DBL_MIN; + size_t num_hits = cl.f_hits.size(); + + + for(size_t i = 0; i!= num_hits; ++i){ + auto &h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + //geometric properties + double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); + double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); + double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; + cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); + cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); + + //remember two hits with min/max IOC + if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ + cl.f_min_ioc_to_shower_start = ioc_to_shower_start; + cl.start_hit_idx = i; + } + if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. + max_ioc_to_shower_start = ioc_to_shower_start; + cl.end_hit_idx = i; + } + + + } //end of hit loop + + + // second round: group hits in two categories, first half and second half + // get the direction of the cluster + auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); + std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; + std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; + std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; + std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; + cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); + + cl.f_hit_group.resize(num_hits); + for(size_t i = 0; i!=num_hits; ++i){ + auto h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; + + if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ + cl.f_hit_group[i] = 1; + cl.f_mean_ADC_first_half += h->SummedADC(); + } + else{ + cl.f_hit_group[i] = 2; + cl.f_mean_ADC_second_half += h->SummedADC(); + } + } + cl.f_track_treated = true; + + size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); + size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); + if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; + if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; + cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); + + if( num_hits < 2){ + std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; + return; + } + + //angle between the track cluster and the shower direction + //cluster direction unit vector + double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); + std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; + //shower direction unit vector + double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); + std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; + //angle between two unit vector, in radian + cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); + + + if(cl.f_score.min_wire == cl.f_score.max_wire){ + std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; + return; + } + //fit to wire-tick plot of the cluster, see how straight cluster is + TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); + //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); + //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + if(fit_status == 0){ + //f1 = graph_copy->GetFunction("f1"); + f1 = cl.f_graph.GetFunction("f1"); + cl.f_fit_chi2 = f1->GetChisquare(); + } + //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; + } + + + // constructor + SEAviewer::SEAviewer(std::string intag, geo::GeometryCore const * ingeom, detinfo::DetectorProperties const * intheDetector ): tag(intag), geom(ingeom), theDetector(intheDetector){ + chan_max = {-9999,-9999,-9999}; + chan_min = {9999,9999,9999}; + tick_max = -99999; + tick_min = 99999; + + plot_true_vertex = false; + vertex_tick.resize(3); + vertex_chan.resize(3); + vertex_graph.resize(3); + + true_vertex_tick.resize(3); + true_vertex_chan.resize(3); + true_vertex_graph.resize(3); + + tick_shift = 350; + chan_shift = 100; + + n_showers=0; + n_pfps = 0; + has_been_clustered = false; + hit_threshold = -10; + + rangen = new TRandom3(0); //same seed everytime + } + + + int SEAviewer::setBadChannelList(std::vector> &in){ + m_bad_channel_list = in; + return 0; + } + + int SEAviewer::addHitsToConsider(std::vector>& hits){ + for(auto &h: hits){ + map_unassociated_hits[h] = true; + map_considered_hits[h] = true; + } + return 0; + } + + int SEAviewer::filterConsideredHits(double dist_to_vertex){ + + //collect all hits that are under consideration for clustering + std::vector> current_hits; + for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ + current_hits.push_back(map_iter->first); + } + + //remove hits that are too far from vertex + for(auto &h: current_hits){ + int p = h->View(); + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); + + if(dist > dist_to_vertex){ + map_unassociated_hits.erase(h); + map_considered_hits.erase(h); + } + } + return 0; + } + + int SEAviewer::setHitThreshold(double h){ + hit_threshold = h; + return 0; + } + int SEAviewer::addAllHits(std::vector>& hits){ + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto&h: hits){ + if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + //tick_max = std::max(tick_max, (double)h->PeakTime()); + //tick_min = std::min(tick_min, (double)h->PeakTime()); + //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + } + + for(int i=0; i<3; i++){ + vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph + } + + vec_all_ticks = vec_tick; + vec_all_chans = vec_chan; + + return 0; + } + + std::vector SEAviewer::calcUnassociatedHits(){ + int n_unassoc=0; + int n_below_thresh = 0; + std::vector> vec_tick(3); + std::vector> vec_chan(3); + std::vector>> vec_pts(3); + std::vector>> vec_hits(3); + + + int n_all =map_considered_hits.size(); + + for(const auto &pair: map_considered_hits ){ + auto& h = pair.first; //type of h: recob::Hit + if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ + + if(h->SummedADC() < hit_threshold){ + n_below_thresh++; + continue; + } + + // if summed ADC of the hit passes threshold + n_unassoc++; + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back(tick); + + vec_pts[(int)h->View()].push_back({wire,tick}); + vec_hits[(int)h->View()].push_back(h); + tick_max = std::max(tick_max, tick); + tick_min = std::min(tick_min, tick); + //chan_max, chan_min stores: max, min unassociated channel for each plane + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + + } + + for(int i=0; i<3; i++){ + vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + + vec_unass_ticks = vec_tick; + vec_unass_chans = vec_chan; + vec_unass_pts = vec_pts; + vec_unass_hits = vec_hits; + + return {n_all,n_unassoc,n_below_thresh}; + } + + + int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ + n_pfps++; + + format_legend(legend, arg1, arg2, arg3); + + vec_pfp_legend.push_back(legend); + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto &h: hits){ + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //remove from unassociated hits + map_unassociated_hits[h] = false; + } + + std::vector t_graphs; + for(int i=0; i<3; i++){ + t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + vec_graphs.push_back(t_graphs); + vec_ticks.push_back(vec_tick); + vec_chans.push_back(vec_chan); + return 0; + } + + int SEAviewer::addShower(art::Ptr&shr){ + n_showers++; + + vec_showers.push_back(shr); + + return 0; + } + + int SEAviewer::addTrack(art::Ptr&trk){ + n_tracks++; + + vec_tracks.push_back(trk); + + return 0; + } + + + std::vector> SEAviewer::to2D(std::vector & threeD){ + + auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + std::vector> ans(3); + + for(int i=0; i<3; i++){ + double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); + double time = calcTime(threeD[0], i, fTPC,fCryostat, *theDetector); + + ans[i] = {wire,time}; + } + + return ans; + } + + + + int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + // use vector here, so that to plot the single point using TGraph + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; + + vertex_tick[i] = time[0]; + vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + plot_true_vertex = true; + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; + + true_vertex_tick[i] = time[0]; + true_vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + true_vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::Print(double plot_distance){ + + + std::string print_name = "SEAview_"+tag; + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); + can->Divide(4,1,0,0.1); + + double plot_point_size=0.4; + + //******************************* First plot "Vertex" *************************************** + + //Calculate some things + //Guanqun: what does tick_min - tick_shift actually mean? + double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; + double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; + //double real_tick_min = tick_min-tick_shift ; + //double real_tick_max = tick_max+tick_shift ; + + + std::vector real_wire_min(3); //real x axis edges for 3 planes + std::vector real_wire_max(3); + + for(int i=0; i<3; i++){ + TPad * pader = (TPad*)can->cd(i+1); + + if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); + + //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) + real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; + real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; + + //fix the area to show, always show area large enough to hold all track/showers + //real_wire_min[i] = chan_min[i]-chan_shift ; + //real_wire_max[i] = chan_max[i]+chan_shift ; + + vertex_graph[i].SetMarkerStyle(29); + vertex_graph[i].SetMarkerSize(2); + vertex_graph[i].SetMarkerColor(kMagenta-3); + vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); + vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); + vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); + vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); + vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + vertex_graph[i].Draw("ap"); + + if(i>0){ + vertex_graph[i].GetYaxis()->SetLabelOffset(999); + vertex_graph[i].GetYaxis()->SetLabelSize(0); + } + } + + /********************************* Non Slice Hits ****************************/ + + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + vec_all_graphs[i].Draw("p same"); + vec_all_graphs[i].SetMarkerColor(kGray); + vec_all_graphs[i].SetFillColor(kWhite); + vec_all_graphs[i].SetMarkerStyle(20); + vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); + } + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< m_bad_channel_list.size(); i++){ + int badchan = m_bad_channel_list[i].first; + int ok = m_bad_channel_list[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + + if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ + //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){ + can->cd(thisp+1); + TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); + //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); + l->SetLineColor(kGray+1); + l->Draw("same"); + //can->cd(thisp+5);// Guanqun: how many values can plane ID take? + //l->Draw("same"); + //can->cd(thisp+9); + //l->Draw("same"); + } + } + + + ///******************************** Plotting all PFP's *********************************8 + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + + if(n_pfps > (int)tcols.size()){ + for(int i =0; i< (int)(n_pfps +2); i++){ + //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + tcols.push_back(kRed); + } + } + + + for(int p=0; pcd(i+1); + if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_graphs[p][i].Draw("p same"); + vec_graphs[p][i].SetMarkerColor(tcol); + vec_graphs[p][i].SetFillColor(tcol); + vec_graphs[p][i].SetMarkerStyle(20); + vec_graphs[p][i].SetMarkerSize(plot_point_size); + } + } + } + + + //Plot all Shower lines. Might need a bit of work here.. + std::vector lines; + + for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + //std::cout<cd(i+1); + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0]cd(i+1); + TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); + lines.push_back(l); + l->SetLineColorAlpha(tcols[s],0.5); + l->SetLineWidth(1); + l->SetLineStyle(2); + l->Draw(); + + } + + } + + /********************************* Unassociated Hits ****************************/ + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_unass_graphs[i].Draw("p same"); + vec_unass_graphs[i].SetMarkerColor(kBlack); + vec_unass_graphs[i].SetFillColor(kBlack); + vec_unass_graphs[i].SetMarkerStyle(20); + vec_unass_graphs[i].SetMarkerSize(plot_point_size); + } + } + + /******************************* Clustered Hits ***********************************/ + // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. + if(has_been_clustered){ + + std::vector cluster_colors(vec_clusters.size()+1,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(size_t j=0; j< vec_clusters.size()+1; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + for(auto &c: vec_clusters){ + int pl = c.getPlane(); + can->cd(pl+1); + if (c.getGraph()->GetN()>0){ + c.getGraph()->Draw("p same"); + c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); + c.getGraph()->SetFillColor(cluster_colors[c_offset]); + c.getGraph()->SetMarkerStyle(20); + //c.getGraph()->SetMarkerSize(plot_point_size); + c.getGraph()->SetMarkerSize(plot_point_size*1.5); + //std::cout<<"Printing cluster "<cd(i+1); + vertex_graph[i].Draw("p same"); + + double rad_cm = 12.0; + TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); + ell_p.SetLineColor(kRed); + ell_p.SetFillStyle(0); + ell_p.Draw("same"); + } + + //**************************** INFO ***************************/ + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + /*TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + */ + TLegend l_top(0.1,0.0,0.9,1.0); + l_top.SetTextSize(0.05); + + for(int p=0; p0){ + l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][1].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][2].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); + } + + } + + // draw legend for clustered hits if there is any + for(const auto &cluster : vec_clusters){ + + // only consider clusters that are second shower candidates + if(cluster.getLegend().empty()) continue; + + // if the cluster is out of the plotting range, do not include it in the legend + if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ + l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); + } + } + + l_top.SetHeader(print_name.c_str(),"C"); + l_top.SetLineWidth(0); + l_top.SetLineColor(kWhite); + l_top.Draw("same"); + + + + can->Update(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + + + return 0; + } + + int SEAviewer::runseaDBSCAN(double min_pts, double eps){ + + has_been_clustered = true; + num_clusters = {0,0,0}; + cluster_labels.resize(3); + + for(int i=0; i<3; i++){ + + std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; + std::vector> hitz; + + + for(size_t p=0; p< vec_unass_pts[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ + + t_pts.push_back(vec_unass_pts[i][p]); + hitz.push_back(vec_unass_hits[i][p]); + } + + } + + if(hitz.size()!=0){ + std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + + // Grab the shower start and shower direction + std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + vec_clusters[c].setShowerRemerge(is_in_shower); + + std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); + std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + /* + std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); + for(size_t c=0; c< vec_clusters.size(); c++){ + //Loop over all hits in this clusters + for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ + int n2_hits = vec_clusters[c2].getHits().size(); + int n2_matched = 0; + if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane + for(auto &h : vec_clusters[c].getHits()){ + //get time spread of this hit. + double pp = h->PeakTimePlusRMS(1.0); + double pm = h->PeakTimeMinusRMS(1.0); + for(auto &h2 : vec_clusters[c2].getHits()){ + if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; + } + } + percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; + std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); + std::cout<0){ + + + TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); + + int Npts = 20; + //TODO need to write this function + TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + + //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + } + + double impact_parameter = 1e10; + + //rudimentary! + for(double k=chan_min[pl]; k< chan_max[pl];k++){ + double y = slope*k+con; + double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); + impact_parameter = std::min(impact_parameter,dist); + } + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; + double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); + double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); + double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); + + + std::cout<<"SSSNEW "<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + std::vector> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; + double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); + + if(dist< min_d){ + min_p = (int)p; + min_d = dist; + } + } + + } + + + + } + + } + */ + + return {0}; + + + } + + double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ + // convert {wire, tick} coordinate to [cm, cm] coordinate + double x1 =X1.at(0)*wire_con; + double y1 =X1.at(1)*tick_con; + + double x2 =X2.at(0)*wire_con; + double y2 =X2.at(1)*tick_con; + + double x0 =point.at(0)*wire_con; + double y0 =point.at(1)*tick_con; + + double x10 = x1-x0; + double y10 = y1-y0; + + double x21 = x2-x1; + double y21 = y2-y1; + + double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); + + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); + + + return sqrt(d2); + + } + + cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + cluster_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } // end of hitz loop + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; + std::vectorall_tick; + std::vectorall_dist; + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + // sorted_in has indices of elements in all_dist in descending order + std::vector sorted_in = seaview_sort_indexes(all_dist); + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i>& hitz = cl.getHits(); + cl.f_ADC_hist.StatOverflows(kTRUE); + + for(auto& h : hitz){ + cl.f_ADC_hist.Fill(h->SummedADC()); + } + + cl.f_meanADC = cl.f_ADC_hist.GetMean(); + cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); + return; + } + + + + void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ + + //grab the plane number, and impact parameter of the cluster + int plane = vec_clusters.at(cluster).getPlane(); + double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); + + //need to use stringstream to control the number of digits.. + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << energy; + ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; + ss3 << std::setprecision(2) << std::fixed << overlay_fraction; + + std::string legend; + //add the truth information to the legend if the cluster is matched to a MCParticle + if(is_matched == 1){ + legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " + + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; + } + else{ + legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); + } + vec_clusters.at(cluster).setLegend(legend); + } + + + void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << arg1; + ss2 << std::setprecision(2) << std::fixed << arg2; + ss3 << std::setprecision(1) << std::fixed << arg3; + + if(leg == "Shower"){ + leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " + + ss3.str() + " impact par.}"; + //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; + + }else{ + //for tracks, 3rd argument is not used + leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; + } + } + +} diff --git a/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h b/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h new file mode 100644 index 000000000..6e8df27fc --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h @@ -0,0 +1,453 @@ +#ifndef SEAVIEWER_H +#define SEAVIEWER_H + +#include + +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include + +#include + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "larcore/Geometry/Geometry.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "TCanvas.h" +#include "TGraph.h" +#include "TFile.h" +#include "TAxis.h" +#include "TLine.h" +#include "TLatex.h" +#include "TLegend.h" +#include "TPrincipal.h" +#include "TFitResultPtr.h" +#include "TVectorD.h" +#include "TMatrixD.h" +#include "TF1.h" +#include "TH1D.h" +#include "TEllipse.h" +#include "TRandom3.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "seaDBSCAN.h" +namespace seaview { + + class SEAviewer; + + template + std::vector seaview_sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); //fill the range with sequentially increasing values + + // sort indexes based on comparing values in v (descending order) + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + + + struct cluster_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; /* number of wires spanned by the cluster */ + int n_ticks; /* number of ticks spanned by the cluster */ + + bool pass; + + cluster_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of cluster_score class + + + + + class cluster { + friend class SEAviewer; + public: + + + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){ + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts, &wires[0], &ticks[0]); + f_graph = af_graph; + + }; + int setScore(cluster_score &in_score){ f_score = in_score;return 0;} + void setLegend(const std::string &in_leg){ + f_legend = in_leg; + } + + void setWireTickBasedLength( double d) { f_wire_tick_based_length = d;} + double getWireTickBasedLength() const {return f_wire_tick_based_length; } + bool isTrackAnalyzed() const {return f_track_treated; } + cluster_score * getScore(){return &f_score;}; + int getID() const {return f_ID;} + int getPlane() const {return f_plane; } + std::vector> getPTS() const {return f_pts;} + TGraph * getGraph(){ return &f_graph;} + TH1D* getADCHist() {return &f_ADC_hist;} + const TGraph * getGraph() const { return &f_graph;} + const std::string &getLegend() const {return f_legend; } + const std::vector>& getHits(){return f_hits;} + int getShowerRemerge() const {return f_shower_remerge;} + int setShowerRemerge(int remerge_in){ + f_shower_remerge = remerge_in; + return f_shower_remerge; + } + double getMeanADC() const { return f_meanADC; } + double getADCrms() const {return f_ADC_RMS;} + + //----------------------- second-shower relatd function ----------------------- + void setImpactParam(double d) {f_ImpactParameter = d; } + + /* brief: set the angle between direction of second shower candidate cluster and direction of the primary shower*/ + void setAngleWRTShower(double d) {f_AngleWRTShower = d;} + void setFitSlope(double d) { f_FitSlope = d;} + void setFitCons(double d) { f_FitCons = d;} + double getAngleWRTShower() const {return f_AngleWRTShower;} + double getFitSlope() const {return f_FitSlope; } + double getFitCons() const {return f_FitCons;} + double getImpactParam() const {return f_ImpactParameter; } + + + // ----------------------- track search related function ----------------------- + double getMinHitImpactParam() const {return f_min_impact_parameter_to_shower; } + double getMinHitConvDist() const { return f_min_conversion_dist_to_shower_start; } + double getMinHitIOC() const {return f_min_ioc_to_shower_start;} + double getIOCbasedLength() const {return f_ioc_based_length; } + size_t getTrackStartIdx() const {return start_hit_idx; } + size_t getTrackEndIdx() const {return end_hit_idx;} + double getMeanADCFirstHalf() const { return f_mean_ADC_first_half; } + double getMeanADCSecondHalf() const {return f_mean_ADC_second_half; } + double getMeanADCRatio() const {return f_mean_ADC_first_to_second_ratio; } + double getTrackAngleToShowerDirection() const {return f_angle_wrt_shower_direction; } + double getLinearChi() const {return f_fit_chi2; } + + /* brief: check if this cluster is fully in given slice or not + * return: 1 -> Fully in given Slice; -1 --> Fully not in given slice; 0: parts in given slices, parts not + */ + int InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID); + + // determine if the cluster is within the plot range + // tick_max, tick_min, wire_max, and wire_min are the edges of the X axis(wire) and Y axis(tick) + bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const{ + return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max; + } + + + private: + int f_ID; + int f_npts; + int f_plane; + bool f_track_treated = false; //boolean indicating whether the hits have been analyzed as track candidate + + std::vector> f_pts; //vector of {wire, tick} pairs of all the hits + std::vector> f_hits; + std::vector f_hit_group; //group the hits in two groups: first half, second half (directionality-wise) + cluster_score f_score; + int f_shower_remerge = -1; //index of the reco shower if the cluseter is close enough to a reco shower, otherwise -1. + TGraph f_graph; //2D {wire, tick} graph + TH1D f_ADC_hist; // histograms of ADC of every hit + std::string f_legend; //legend of the f_graph + + + // -------- track-like properties ------------------------- + + //add a few parameters that are useful to find tracks in no recob::track events + double f_min_impact_parameter_to_shower = 1e10; // mininum impact parameter of hits to the recob::shower direction + // will be default value if the cluster didn't pass cut on ssscore + double f_min_conversion_dist_to_shower_start = 1e10; //minimum distance of hits to the recob::shower start + double f_min_ioc_to_shower_start = 1e10; //minimum ioc of all hits to the recob::shower direction + double f_ioc_based_length = -1.0; // length of the cluster, calculated based on the IOC of hits + double f_wire_tick_based_length = -1.0; + + size_t start_hit_idx = SIZE_MAX; //index of the start hit + size_t end_hit_idx = SIZE_MAX; //index of the end hit + double f_mean_ADC_first_half = 0.0; + double f_mean_ADC_second_half = 0.0; + double f_mean_ADC_first_to_second_ratio = 0.0; + + double f_angle_wrt_shower_direction = -1.0; // angle between the cluster direction and the shower direction, in radian + // for track search, for proton track veto + double f_fit_chi2 = 0.0; //chi2 of the linear fit to the cluster (2D) + double f_ADC_RMS = -1.0; //RMS of the summed ADC of hits + double f_meanADC = -1.0; // mean of hits ADC + + + //-------- shower-like properties ------------------------------- + + double f_ImpactParameter = -1.0; //impact parameter of the vertex wrt to the cluster + double f_FitSlope = 0.0; //slope of the fitted shower/cluster direction + double f_FitCons = 0.0; //intercept of the fitted shower/cluster direction + + double f_AngleWRTShower = -1.0; //angle between cluster-vertex direction and primary_shower_start-vertex direction, assuming cluster and primary shower both point back to the vertex + // specific for second shower search for 1g1p analysis + + }; // end of class cluster + + + class SEAviewer { + + public: + + //constructor + SEAviewer(std::string tag,geo::GeometryCore const * geom,detinfo::DetectorProperties const * theDetector ); + + void configure(const fhicl::ParameterSet& pset){}; + + int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z); + int addTrueVertex(double x, double y,double z); + + /* @brief: add all the given hits to be considered for clustering + * @note: these hits are subject to further selection by filterConsideredHits() before clustering + */ + int addHitsToConsider(std::vector>& hits); + int addAllHits(std::vector>& hits); + + /* @brief: filter given hits before further clustering - only use hits near vertex for clustering + * @param: dist_to_vertex - distance to vertex in cm + */ + int filterConsideredHits(double dist_to_vertex); + + /* @brief: add hits for PFParticles + * @param: leg - legend for this PFParticle, for plotting purposes + * @param: if leg is 'shower', arg1 expects shower energy; arg2 expects conversion distance; arg3 expects impact parameter + * @param: if leg is 'track', arg1 expects track length; arg2 expects PCA; arg3 currently not used + */ + int addPFParticleHits(std::vector>& hits, std::string leg , double arg1 = 0.0, double arg2 = 0.0, double arg3=0.0); + int setBadChannelList(std::vector> &in); + int addShower(art::Ptr&shr); + int addTrack(art::Ptr&trk); + std::vector calcUnassociatedHits(); + int setHitThreshold(double); + int Print(double plot_distance); + int runseaDBSCAN(double min_pts, double eps); + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + //WireCoordinate returns the index of the nearest wire to the specified position. + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ + double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + /* @brief: given a 3D space point, calculate the [wire, tick] of the point on 3 planes */ + std::vector> to2D(std::vector & threeD); + + + /* @brief: given two points on a line, and another point (in 2D space), calculate the impact parameter + * @param: 3 parameter of std::vector are {wire, tick} vectors + */ + double dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point); + + + //distance between two {wire, tick} points, in cm + double dist_point_point(double w1, double t1, double w2, double t2) const{ + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + } + + + //@brief: given a cluster, loop through all its hits, calc and update info on mean ADC, ADC RMS. + void BasicClusterCalorimetry(cluster& cl); + + // @brief: given primary shower, analyze all the clusters in a track-like way with the assumtion that primary shower will point back to the cluster + // @param: vec_c: vector of clusters to be filled + std::vector analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); + + + // @brief: given primary shower, analyze all the clusters, draw them on the canvas, together with fitted direction of the cluseter (with the assumption that the cluster and primary shower both pointing back to the vertex) + // @param: vec_c: vector of clusters to be filled + std::vector analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); + + + // @brief: analyze cluster cl as a track candidate, and save track-related information in the cluster object + // @param: shower_start_pt_2D, shower_other_pt_2D: {wire, tick} coordinate of shower start, and another point on shower direction line, projected to the plane cl is on. + void TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D); + + + // @brief: check if there is a hit in hitz close enought to one of the reco showers, if so return the index of that reco shower + // @param: hitz is usually a cluster of unassociated hits + int SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); + + // Guanqun: @brief: analyze a cluster of hits and summarize its property into an cluster_score + // argument shower is not used in the function body + cluster_score SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); + + //@ brief: as name says, get Npts hits that're nearest from vertex + // return the {wire, tick} info of these hits as a TGraph + TGraph* SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + + void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction); + + + + //conversion from wire, tick to cm + static constexpr double wire_con = 0.3; + static constexpr double tick_con = 1.0/25.0; + + protected: + + int n_pfps; // num of PFParticles (including shower & track) + int n_showers; //num of showers + int n_tracks; //num of tracks + + std::string tag; + double hit_threshold; + bool has_been_clustered; + // PFP, Plane: index + std::vector> vec_graphs; //vector of graphs of [tick vs. wire] for hits of PFParticles. + + std::vector vec_pfp_legend; //legend for each PFParticle, for plotting purpose + // PFP, Plane: index + std::vector>> vec_ticks; //vector of ticks on each plane for all PFParticles + std::vector>> vec_chans; //vector of wires on each plane for all PFParticle + + geo::GeometryCore const * geom; + detinfo::DetectorProperties const * theDetector ; + + double tick_shift; + double chan_shift; + + double tick_max; //min, max tick of all hits + double tick_min; + std::vector chan_max; //min, max wire of all (including vertex) + std::vector chan_min; + + std::vector> m_bad_channel_list; + + //Vertex, size of 3 (on 3 planes) + std::vector vertex_tick; + std::vector vertex_chan; + std::vector vertex_graph; + + bool plot_true_vertex; + //True vertex, size of 3 + std::vector true_vertex_tick; + std::vector true_vertex_chan; + std::vector true_vertex_graph; + + //std::vector> considered_hits; //all hits considered for clustering + //std::vector> all_hits; + std::map,bool> map_unassociated_hits; + std::map, bool> map_considered_hits; + + //Plane: index + std::vector vec_unass_graphs; //graph of [tick vs wire] for unassociated hits that pass the hit threshold + std::vector> vec_unass_ticks; //tick of unassso hits that pass threshold + std::vector> vec_unass_chans; + std::vector>> vec_unass_pts; // [wire, tick] pair for unassociatd hits that pass threshold on each plane + std::vector>> vec_unass_hits; //vector of unasso hits that pss hit threshold on each plane + + + //Plane: index + std::vector vec_all_graphs; //graph of [tick vs wire] for all hits that are not in the slice + std::vector> vec_all_ticks; //tick of all hits that are not in the slice (grouped by plane #) + std::vector> vec_all_chans; //wire of all hits that are not in the slice on each plane. + + std::vector num_clusters; //number of clusters for unassociated hits on each plane + std::vector> cluster_labels; //one-to-one mapped cluster labels for unassociated hits in `vec_unass_pts` + TRandom3 *rangen; + + // all clusters on all 3 planes, each cluster includes points/hits identified for that cluster + std::vector vec_clusters; + std::vector> vec_showers; //vector of recob::Shower contained in this class + std::vector> vec_tracks; + + //-----helper function----------- + + // form legend for recob::shower and recob::track objects + void format_legend(std::string &leg, double arg1 = 0.0, double arg2 = 0.0, double arg3 = 0.0); + + }; + + //define wire conversion, tick conversion factor + constexpr double SEAviewer::wire_con; + constexpr double SEAviewer::tick_con; + +}// namespace + +#endif + diff --git a/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h new file mode 100644 index 000000000..3bd274140 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h @@ -0,0 +1,159 @@ +/** + * \file seaDBSCAN.h + * + * + * \brief Class def header for a class seaDBSCAN + * + * @author mark ross-lonergan markrl@nevis.columbia.edu + * Written 20th May 2019. + */ + +#ifndef seaDBSCAN_H +#define seaDBSCAN_H + +#include +#include +#include +#include +#include +#include + + +class seaDBSCAN{ + + public: + double m_eps; + int m_minpts; + + /// constructor + seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + ~seaDBSCAN(){} + + // identify each hit to a certain cluster, or identify as noise + std::vector Scan2D(std::vector> &pts); + // get neighbour points for point i from vector pts + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // combine elements in pts to seed if not found in seed + int UnionSets(std::vector> &seed, std::vector> &pts); + // calculate distance between (w1, t1) and (w2, t2) + double SimpleDist(double w1, double t1, double w2, double t2); + +}; + +std::vector seaDBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + //Guanqun: change vector while looping over its elements + //new elements are pushed back to seed_set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + +} + + + +std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; +} + +int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; +} + +double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ + // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 + double wire_con = 0.3; + double tick_con = 1.0/25.0; + + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + +} + +#endif diff --git a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc new file mode 100644 index 000000000..65ee207c3 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc @@ -0,0 +1,2248 @@ +#include "SinglePhoton_module.h" +#include "analyze_OpFlashes.h" +#include "analyze_Tracks.h" +#include "analyze_Showers.h" +#include "analyze_Template.h" +#include "analyze_MCTruth.h" +#include "analyze_EventWeight.h" +#include "analyze_Slice.h" +#include "analyze_Geant4.h" +#include "fiducial_volume.h" +#include "second_shower_search.h" +#include "isolation.h" + +namespace single_photon +{ + + //Constructor from .fcl parameters + SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) + { + this->reconfigure(pset); + //Set up some detector, timing, spacecharge and geometry services + theDetector = lar::providerFrom(); + detClocks = lar::providerFrom(); + SCE = lar::providerFrom(); + geom = lar::providerFrom(); + + } + + //Reconfigure the internal class parameters from .fcl parameters + void SinglePhoton::reconfigure(fhicl::ParameterSet const &pset) + { + //input parameters for what file/mode were running in + m_print_out_event = pset.get("PrintOut", false); + m_is_verbose = pset.get("Verbose",false); + m_is_data = pset.get("isData",false); + m_is_overlayed = pset.get("isOverlayed",false); + m_is_textgen = pset.get("isTextGen",false); + + //some specific additonal info, default not include + m_use_PID_algorithms = pset.get("usePID",false); + m_use_delaunay = pset.get("useDelaunay",false); + m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); + + //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) + m_fill_trees = pset.get("FillTrees",true); + m_run_pi0_filter = pset.get("RunPi0Filter",false); + m_run_pi0_filter_2g1p = pset.get("FilterMode2g1p",false); + m_run_pi0_filter_2g0p = pset.get("FilterMode2g0p",false); + + if(m_run_pi0_filter) m_is_data = true;// If running in filter mode, treat all as data + + //Some output for logging + std::cout<<"SinglePhoton::reconfigure || whats configured? "<("SelectEvent", false); + m_selected_event_list = pset.get("SelectEventList", ""); + + //Studies for photo nuclear EventWeights + m_runPhotoNuTruth = pset.get("RunPhotoNu",false); + + //Ability to save some FULL eventweight components, rather than run later. Useful for systematic studies. Harcoded to two currently (TODO) + m_runTrueEventweight = pset.get("RunTrueEventWeight",false); + m_true_eventweight_label = pset.get("true_eventweight_label","eventweight"); + m_Spline_CV_label = pset.get("SplineCVLabel", "eventweight");//4to4aFix"); + + + //Input ArtRoot data products + m_pandoraLabel = pset.get("PandoraLabel"); + m_trackLabel = pset.get("TrackLabel"); + m_sliceLabel = pset.get("SliceLabel","pandora"); + m_showerLabel = pset.get("ShowerLabel"); + m_caloLabel = pset.get("CaloLabel"); + m_flashLabel = pset.get("FlashLabel"); + m_potLabel = pset.get("POTLabel"); + m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); + m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); + m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); + m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + m_generatorLabel = pset.get("GeneratorLabel","generator"); + m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); + m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); + m_geantModuleLabel = pset.get("GeantModule","largeant"); + m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); + m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); + m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); + m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); + + //Flash related variables. + m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change + m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); + + // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); + m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); + + //CRT related variables, should run only for RUN3+ enabled + m_runCRT = pset.get("runCRT",false); + m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); + m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); + + //Some track calorimetry parameters + m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); + m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); + m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? + m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); + + //Some shower calorimetry parameters + m_work_function = pset.get("work_function"); + m_recombination_factor =pset.get("recombination_factor"); + m_gain_mc =pset.get>("gain_mc"); + m_gain_data =pset.get>("gain_data"); + m_wire_spacing = pset.get("wire_spacing"); + m_width_dqdx_box = pset.get("width_box"); + m_length_dqdx_box = pset.get("length_box"); + m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); + + //A seperate mode to run over AllPFPs and not just slice particles + m_run_all_pfps = pset.get("runAllPFPs",false); + + + //Some paramaters for counting protons & photons + m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); + m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); + m_mass_pi0_mev = 139.57; + + //SEAviwer Settings for shower clustering and proton stub finding + //Have two sets: + //Base SEAview is for Second Shower Veto + m_runSEAview = pset.get("runSEAviewShower", false); + m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); + m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); + m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); + m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); + m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); + m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); + m_SEAviewNumRecoShower = pset.get("SEAviewShowerNumRecoShower", -1); + m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); + + // Second set is for Proton Stub finding + m_runSEAviewStub = pset.get("runSEAviewStub", false); + m_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); + m_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); + m_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); + m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); + m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); + m_SEAviewStubNumRecoShower = pset.get("SEAviewStubNumRecoShower", -1); + m_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); + + bool_make_sss_plots = true; + + //Misc setup + this->setTPCGeom(); + rangen = new TRandom3(22); + + //Whats a Delta? + std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; + std::vector delta_pdg_list = {2224,2214,1114,2114}; + for(size_t i=0; i< delta_pdg_list.size(); ++i){ + is_delta_map[delta_pdg_list[i]] = delta_names[i]; + is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; + } + + + //Text print event? Depreciated at the moment. + if (m_print_out_event ){ + out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); + if (!out_stream.is_open()){ + std::cout<<"ERROR output file not open"< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; + //sssVetov1 = new ReadBDT(inputVars); + + } + + //------------------------------------------------------------------------------------------------------------------------------------------ + + + + //--------------------------------------- Primary Filter------------------------------------------------------------------------------------ + // Runs over every artroot event + bool SinglePhoton::filter(art::Event &evt) + { + + std::cout<<"---------------------------------------------------------------------------------"<ClearVertex(); + + //Some event based properties + m_subrun_counts++; + m_number_of_events++; + m_run_number = evt.run(); + m_subrun_number = evt.subRun(); + m_event_number = evt.id().event(); + + + //if module is run in selected-event mode, and current event is not in the list, skip it + if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ + std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; + return true; + } + + //Timing and TPC info + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + m_Cryostat = ID.Cryostat; + m_TPC = ID.TPC; + _time2cm = theDetector->SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc + + + //******************************Setup*****************Setup**************************************/ + //******************************Setup*****************Setup**************************************/ + // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. + // Make sure under the hood you understand this! + // ------------------------ + // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g + // tracks->pfparticles->hits + // tracks->pfparticles->spacepoints ..etc.. + // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. + //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. + + + // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. + art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); + std::vector> hitVector; + art::fill_ptr_vector(hitVector,hitHandle); + + //Lets do "THE EXACT SAME STUFF" for Optical Flashes + art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); + std::vector> flashVector; + art::fill_ptr_vector(flashVector,flashHandle); + + //tracks + art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); + std::vector> trackVector; + art::fill_ptr_vector(trackVector,trackHandle); + + //BadChannels// Fill later + art::Handle > badChannelHandle; + std::vector badChannelVector; + if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ + badChannelVector = *(badChannelHandle); + } + + //Collect the PFParticles from the event. This is the core! + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> pfParticleVector; + art::fill_ptr_vector(pfParticleVector,pfParticleHandle); + //So a cross check + if (!pfParticleHandle.isValid()) + { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; + return (m_run_pi0_filter ? false : true) ; + } + + //get the cluster handle for the dQ/dx calc + art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector< art::Ptr > clusterVector; + art::fill_ptr_vector(clusterVector,clusterHandle); + + // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; + // typedef std::map< size_t, art::Ptr> + // Produce a map of the PFParticle IDs for fast navigation through the hierarchy + PFParticleIdMap pfParticleMap; + this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); + + //Slices + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> sliceVector; + art::fill_ptr_vector(sliceVector,sliceHandle); + + //And some associations + art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); + + //Slice to PFParticle + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map> > sliceIDToPFParticlesMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + } + + //Slice to Hits + std::map< art::Ptr, std::vector> > sliceToHitsMap; + std::map> > sliceIDToHitsMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); + sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); + } + + //And some verticies. + art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> vertexVector; + art::fill_ptr_vector(vertexVector,vertexHandle); + if(vertexVector.size()>0) m_number_of_vertices++; + + //PFParticle to Vertices + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); + } + + //------- 3D showers + art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); + std::map, art::Ptr> pfParticlesToShowerReco3DMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ + pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); + } + + } + //---------Kalman Track Showers + art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); + std::map, art::Ptr> pfParticlesToShowerKalmanMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ + pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); + } + } + + //----- kalmon Cali + art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); + std::vector> kalmanTrackVector; + art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); + + art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); + std::map,std::vector>> kalmanTrackToCaloMap; + for(size_t i=0; i< kalmanTrackVector.size(); ++i){ + auto trk = kalmanTrackVector[i]; + if(cali_per_kalmantrack.at(trk.key()).size()!=0){ + kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); + } + } + + // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: + //-------------------------------- + // Produce two PFParticle vectors containing final-state particles: + // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis + // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis + std::vector< art::Ptr > crParticles; + std::vector< art::Ptr > nuParticles; + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + + + //if not running over neutrino slice only, use all pfp's in event + if (m_run_all_pfps ==true){ + nuParticles = pfParticleVector; + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToSpacePointsMap; + for(size_t i=0; i< nuParticles.size(); ++i){ + const art::Ptr pfp = nuParticles[i]; + pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToMetadataMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + const art::Ptr pfp = pfParticleVector[i]; + pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + } + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToClustersMap; + std::map, std::vector> > clusterToHitsMap; + //fill map PFP to Clusters + for(size_t i=0; i< nuParticles.size(); ++i){ + auto pfp = nuParticles[i]; + pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } + //fill map Cluster to Hits + for(size_t i=0; i< clusterVector.size(); ++i){ + auto cluster = clusterVector[i]; + clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); + } + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; + + + //use pfp->cluster and cluster->hit to build pfp->hit map + //for each PFP + for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; + + //make empty vector to store hits + std::vector> hits_for_pfp = {}; + + + //for each cluster, get the associated hits + for (art::Ptr cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; + + //insert hits into vector + hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); + } + + //fill the map + pfParticleToHitsMap[pfp] = hits_for_pfp; + + }//for each pfp + + + + /************************************************************************** + * For SEAview: grab cosmic-related PFPaticles and recob::Hits + * + **************************************************************************/ + std::map, std::vector> > cr_pfParticleToClustersMap; + std::map, std::vector> > cr_pfParticleToHitsMap; + + //first, collect all daughters of primary cosmic + int num_primary_cosmic_particle = crParticles.size(); + for(int i =0; i!=num_primary_cosmic_particle; ++i){ + auto& pParticle = crParticles[i]; + for(const size_t daughterId : pParticle->Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + crParticles.push_back(pfParticleMap.at(daughterId)); + } + } + + //second, build PFP to hits map for cosmic-related PFParticles + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; + cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; + + // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; + + //make empty vector to store hits + std::vector> hits_for_pfp = {}; + + // std::cout<<"-- there are "< cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; + + // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()< nu_scores; + bool isSelectedSlice = false; + int primaries = 0; + int primary_pdg = 0; + + for(auto &pfp: pfps){ + std::vector> metadatas = pfParticleToMetadataMap[pfp]; + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + //for each of the things in the list + if(propertiesmap.count("NuScore")==1){ + nu_scores.push_back(propertiesmap["NuScore"]); + } + if(propertiesmap.count("IsNeutrino")==1){ + isSelectedSlice = true; + } + } + + if (pfp->IsPrimary()) { + primaries++; + primary_pdg = (pfp->PdgCode()); + } + /*if (!pfp->IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + if(isNeutrino){ + isSelectedSlice = true; + }*/ + } + + if(nu_scores.size()>0){ + double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); + if(mean!=nu_scores.front()){ + std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. + //tracks is a vector of recob::Tracks and same for showers. + //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. + std::vector< art::Ptr > tracks; + std::vector< art::Ptr > showers; + std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; + std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + //Track Calorimetry. Bit odd here but bear with me, good to match and fill here + art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); + std::map, std::vector> > trackToCalorimetryMap; + //So a cross check + if (!calo_per_track.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; + return (m_run_pi0_filter ? false : true); + } + + //Loop over all tracks we have to fill calorimetry map + for(size_t i=0; i< tracks.size(); ++i){ + if(calo_per_track.at(tracks[i].key()).size() ==0){ + std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, m_pidLabel); + std::map, art::Ptr > trackToPIDMap; + + // If we want PID algorithms to run. do so here + // Build a map to get PID from PFParticles, then call PID collection function + if(m_use_PID_algorithms){ + for(size_t i=0; i< tracks.size(); ++i){ + trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); + } + } + + + + //**********************************************************************************************/ + //**********************************************************************************************/ + //---------------------------------- MC TRUTH, MC Only--------------------------- + //**********************************************************************************************/ + //**********************************************************************************************/ + + //Get the MCtruth handles and vectors + std::vector> mcTruthVector; + std::vector> mcParticleVector; + + //Then build a map from MCparticles to Hits and vice versa + std::map< art::Ptr, std::vector > > mcParticleToHitsMap; + std::map< art::Ptr, art::Ptr > hitToMCParticleMap; + + //Apparrently a MCParticle doesn't know its origin (thanks Andy!) + //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa + //Note which map is which! //First is one-to-many. //Second is one-to-one + std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; + std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + std::map > MCParticleToTrackIdMap; + + std::vector> mcTrackVector; + std::vector> mcShowerVector; + + std::vector> matchedMCParticleVector; + std::map, art::Ptr > trackToMCParticleMap; + std::map, art::Ptr > showerToMCParticleMap; + + //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower + std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; + std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; + + if(m_is_verbose){ + std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; + } + + //**********************************************************************************************/ + //**********************************************************************************************/ + + //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). + if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + + + //*******************************Slices***************************************************************/ + //*******************************Slices***************************************************************/ + + //these are all filled in analyze slice + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind + std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score + std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise + std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's + std::map,bool> PFPToNuSliceMap; + std::map,double> PFPToTrackScoreMap; + std::map sliceIdToNumPFPsMap; + std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); + + if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<Self()<> pfp_vec = pair.second; + int slice_id = pair.first; + //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) + for(auto pfp: pfp_vec){ + if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ + std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; + + if(m_runCRT){ + art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); + for(size_t i=0; i< flashVector.size(); ++i){ + crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); + } + } + + art::Handle> crthit_h; //only filled when there are hits, otherwise empty + art::Handle rawHandle_DAQHeader; + double evt_timeGPS_nsec = -999 ; + if(m_runCRT){ + evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + evt.getByLabel(m_CRTHitProducer, crthit_h); + raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); + art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); + evt_timeGPS_nsec = evtTimeGPS.timeLow(); + std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); + + + + //******************************* Common Optical Filter **************************************************************/ + //******************************* Common Optical Filter **************************************************************/ + //Raw Optical fltr + art::Handle uBooNE_common_optFltr; + if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ + m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); + m_flash_optfltr_pe_beam_tot = uBooNE_common_optFltr->PE_Beam_Total(); + m_flash_optfltr_pe_veto = uBooNE_common_optFltr->PE_Veto(); + m_flash_optfltr_pe_veto_tot = uBooNE_common_optFltr->PE_Veto_Total(); + }else{ + m_flash_optfltr_pe_beam = -999; + m_flash_optfltr_pe_beam_tot = -999; + m_flash_optfltr_pe_veto = -999; + m_flash_optfltr_pe_veto_tot = -999; + std::cout<<"No opfiltercommon product:"<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); + this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); + + //Run over PID? + if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); + + + //******************************* Showers **************************************************************/ + //******************************* Showers **************************************************************/ + std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); + this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); + + + //Some misc things thrown in here rather than in a proper helper function. TODO. fix + //Calc a fake shower "end" distance. How to define an end distance? good question + for(size_t i_shr = 0; i_shr s = showers[i_shr]; + const art::Ptr pfp = showerToNuPFParticleMap[s]; + const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; + + m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; + m_reco_shower_end_dist_to_SCB[i_shr] = 99999; + + for(auto &sp: shr_spacepoints){ + std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; + m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); + double tmo; + this->distToSCB(tmo,tmp_spt); + m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); + + //This section runs for only 1 shower events for purpose of testing delta specifics + if(showers.size()==1){ + m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); + m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); + m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); + } + + } + } + + + //******************************* MCTruth **************************************************************/ + //******************************* MCTruth **************************************************************/ + + //Grab the backtracker info for MCTruth Matching + art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); + + // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. + // MCShower and MCTrack come from energy depositions in GEANT4 + + //Only run if its not data :) + if(!m_is_data){ + + std::vector> gTruthVector; + if(!m_is_textgen){ + + // if Text is in the generator label, skip it. TODO this is a bit simple but works, maybe add a boolean + art::ValidHandle> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); + art::fill_ptr_vector(gTruthVector,gTruthHandle); + if(m_is_verbose){ + for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); + art::fill_ptr_vector(mcTruthVector,mcTruthHandle); + + //get MCPartilces (GEANT4) + art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); + art::fill_ptr_vector(mcParticleVector,mcParticleHandle); + + //Found inanalyze_Geant4.h + //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! + this->AnalyzeGeant4(mcParticleVector); + + + //Get the MCParticles (move to do this ourselves later) + this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); + + + //mcc9 march miniretreat fix + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + m_test_matched_hits = 0; + + for(size_t j=0; j hit = hitVector[j]; + + particle_vec.clear(); match_vec.clear(); //only store per hit + mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); + if(particle_vec.size() > 0){ + m_test_matched_hits++; + } + } + + + //Important map, given a MCparticle, whats the "hits" associated + this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); + + + //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); + std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); + + //photoNuclearTesting(matchedMCParticleVector); + + std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); + + std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); + + + std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); + + + //added since last time? + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); + std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ + std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); + + //if(!m_run_pi0_filter){ + // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); + //} + + std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); + + if (m_print_out_event){ + if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ + out_stream <<"run subrunevent "<> ev_evw ; + if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ + + std::map> const & weight_map = ev_evw->front().fWeight; + if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; + + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.second.size()==1 && x.first == "splines_general_Spline"){ + m_genie_spline_weight = x.second.front(); + std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; + if( evt.getByLabel("eventweight",ev_evw_ph)){ + std::map> const & weight_map = ev_evw_ph->front().fWeight; + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.first == "photonuclear_photon_PhotoNuclear"){ + auto vec = x.second; + double ph_low = vec[1]; + double ph_high = vec[0]; + std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); + std::map> const & weight_map = ev_evw_true->front().fWeight; + if(ev_evw_true->size() > 1) { + std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" + << "WARNING: eventweight has more than one entry\n"; + } + fmcweight=weight_map; + } + + }//end NOT textgen + + + + std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"< IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap); + + + + + // ################################################### SEAview SEAview ######################################################### + // ################################################### SEAview SEAview ######################################################### + + + // ################################################### Proton Stub ########################################### + // ------------- stub clustering --------------------------- + std::cout << "----------------- Stub clustering --------------------------- " << std::endl; + std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + + if(!m_run_pi0_filter && m_runSEAviewStub && (m_SEAviewStubNumRecoShower == -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ + + // grab all hits in the slice of the reco shower + art::Ptr p_shr = showers.front(); + art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + int p_sliceid = PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + + //Setup seaviewr object + seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector ); + //Pass in any bad channels you like + sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); + + //Add the hits from just this slice, as well as hits within 150cm of the vertex + sevd.addHitsToConsider(hitVector); // std::vector> + sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view + sevd.addHitsToConsider(p_slice_hits); + + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(m_SEAviewStubHitThreshold); + + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } + + //Add all cosmic-relatd PFP + for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } + + + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; + m_trackstub_unassociated_hits_below_threshold = vnh[2]; + m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); + + //And some plotting + // If we want to plot pdfs again later, then we can't plot here + //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); + + //Analyze formed clusters and save info + std::vector vec_SEAclusters ; + sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + + + //And save to file. + std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); + int remerge = clu.getShowerRemerge(); + seaview::cluster_score * ssscorz = clu.getScore(); + + std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ + //decide not to add energy of the cluster to reco shower if it's matched + // + //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! + } + + ++m_trackstub_num_candidates; + //determine if this cluster is in neutrino slice + m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + m_trackstub_candidate_num_hits.push_back((int)hitz.size()); + m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); + m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + m_trackstub_candidate_plane.push_back(pl); + m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); + m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); + m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); + m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); + m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); + m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); + m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); + m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); + m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); + m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); + m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); + m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); + m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); + m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); + m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); + m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); + m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); + m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); + m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); + m_trackstub_candidate_energy.push_back(Ep); + m_trackstub_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(m_is_data){ + m_trackstub_candidate_matched.push_back(-1); + m_trackstub_candidate_pdg.push_back(-1); + m_trackstub_candidate_parent_pdg.push_back(-1); + m_trackstub_candidate_trackid.push_back(-1); + m_trackstub_candidate_true_energy.push_back(-1); + m_trackstub_candidate_overlay_fraction.push_back(-1); + m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + m_trackstub_candidate_matched.push_back(ssmatched[0]); + m_trackstub_candidate_pdg.push_back(ssmatched[1]); + m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); + m_trackstub_candidate_trackid.push_back(ssmatched[3]); + m_trackstub_candidate_true_energy.push_back(ssmatched[4]); + m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); + m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; + std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; + } + + sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); + + + } //end of cluster loop + + // Plot the event + if(m_SEAviewStubMakePDF){ + sevd.Print(m_SEAviewStubPlotDistance); + } + + //group clusters HERE + std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); + m_trackstub_num_candidate_groups = group_result.first; + m_grouped_trackstub_candidate_indices = group_result.second.first; + m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; + } + + + // --------------- shower clustering -------------------------- + std::cout << "------------- Shower clustering --------------------" << std::endl; + std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + + if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ + + art::Ptr p_shr = showers.front(); + art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + + int p_sliceid = PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + + //Setup seaviewr object + seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); + //Pass in any bad channels you like + sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); + + //Add hits to consider for clustering + //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV + //sevd.filterConsideredHits(150); + sevd.addHitsToConsider(p_slice_hits); + + //Add all hits in the events + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(m_SEAviewHitThreshold); + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } + + //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 + /*for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } + */ + + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + m_sss_num_unassociated_hits =vnh[1]+vnh[2]; + m_sss_num_unassociated_hits_below_threshold = vnh[2]; + m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); + + + //This is the place I will put the new Second Shower Search + std::vector vec_SEAclusters ; + sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + + //And save to file. + std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); + int remerge = clu.getShowerRemerge(); + seaview::cluster_score * ssscorz = clu.getScore(); + + std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ + if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! + } + + ++m_sss_num_candidates; + + //determine if this cluster is in neutrino slice + m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + m_sss_candidate_num_hits.push_back((int)hitz.size()); + m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); + m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + m_sss_candidate_plane.push_back(pl); + m_sss_candidate_PCA.push_back(ssscorz->pca_0); + m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); + m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); + m_sss_candidate_fit_constant.push_back(clu.getFitCons()); + m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); + m_sss_candidate_max_tick.push_back(ssscorz->max_tick); + m_sss_candidate_min_tick.push_back(ssscorz->min_tick); + m_sss_candidate_min_wire.push_back(ssscorz->min_wire); + m_sss_candidate_max_wire.push_back(ssscorz->max_wire); + m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); + m_sss_candidate_min_dist.push_back(ssscorz->min_dist); + m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); + m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); + m_sss_candidate_energy.push_back(Ep); + m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); + m_sss_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(m_is_data){ + m_sss_candidate_matched.push_back(-1); + m_sss_candidate_pdg.push_back(-1); + m_sss_candidate_parent_pdg.push_back(-1); + m_sss_candidate_trackid.push_back(-1); + m_sss_candidate_true_energy.push_back(-1); + m_sss_candidate_overlay_fraction.push_back(-1); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + m_sss_candidate_matched.push_back(ssmatched[0]); + m_sss_candidate_pdg.push_back(ssmatched[1]); + m_sss_candidate_parent_pdg.push_back(ssmatched[2]); + m_sss_candidate_trackid.push_back(ssmatched[3]); + m_sss_candidate_true_energy.push_back(ssmatched[4]); + m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; + std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; + } + + + sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); + + } //end of cluster loop + + // Plot the event + if(m_SEAviewMakePDF){ + sevd.Print(m_SEAviewPlotDistance); + } + + } + + for(int i =0; i<(int)showers.size(); i++){ + m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); + } + + // ################################################### END SEAview END SEAview ######################################################### + // ##################################################################################################################################### + + + + // PandoraAllOutComes + // I.e This runs over all 3D reco showers in the whole event and find second shower candidates + if(!m_run_pi0_filter){ + std::cout<<"------------ Shower3D --------------"<Self()<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); + + + //And cluster the 2d and 3d second showers. Very simple TODO + this->SimpleSecondShowerCluster(); + + } + + + // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### + + size_t n_neutrino_slice=0; + size_t n_neutrino_candidate_pfp_id=0; + + for(size_t s=0; s< sliceVector.size(); s++){ + auto slice = sliceVector[s]; + std::vector> pfps = sliceToPFParticlesMap[slice]; + + int primaries=0; + int n_dau=0; + int found = 0; + //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; + // Check if this particle is identified as the neutrino + const int pdg(pfp->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + //Ok this is neutrino candidate. + + std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); + for (const size_t daughterId : pfp->Daughters()){ + n_dau++; + auto dau = pfParticleMap[daughterId]; + std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ + while(tmp->NumDaughters()>0 && n_gen < 4){ + for(int k=0; k< n_gen; k++){ + std::cout<<"---> "; + } + auto grandau = pfParticleMap[granDaughterId]; + std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; + } + + } + std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ + std::cout<<"We're Missing Something!."<1){ + throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "<Fill(); + ncdelta_slice_tree->Fill(); + eventweight_tree->Fill(); + true_eventweight_tree->Fill(); + geant4_tree->Fill(); + } + + + //Rest the vertex after filling + this->ClearVertex(); + + if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; + else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; + + //if not in filter mode pass all + return true; + + }// end filter_module main class + + + + //------------------------------------------------------------------------------------------- + void SinglePhoton::endJob() + { + if (m_print_out_event){ + out_stream.close(); + } + pot_tree->Fill(); + } + + //------------------------------------------------------------------------------------------- + + //This runs ONCE at the start of the job and sets up all the necessary services and TTrees + void SinglePhoton::beginJob() + { + mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; + art::ServiceHandle tfs; + + vertex_tree = tfs->make("vertex_tree", "vertex_tree"); + pot_tree = tfs->make("pot_tree", "pot_tree"); + eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); + ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); + run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); + geant4_tree = tfs->make("geant4_tree","geant4_tree"); + + //run_subrun_tree, reset some POT + m_run = 0; + m_subrun = 0; + m_subrun_pot = 0; + run_subrun_tree->Branch("run",&m_run,"run/I"); + run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); + run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); + run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + + true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); + true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); + + // --------------------- POT Releated variables ----------------- + m_number_of_events = 0; + m_number_of_vertices = 0; + m_pot_count=0; + m_pot_per_event = 0; + m_pot_per_subrun = 0; + m_number_of_events_in_subrun=0; + + + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); + vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); + vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + + vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); + vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); + vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); + vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); + vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); + vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); + vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + + //create branches as found in individual analyze_XXX.h + this->CreateIsolationBranches(); + this->CreateSecondShowerBranches(); + this->CreateSecondShowerBranches3D(); + this->CreateStubBranches(); + this->CreateFlashBranches(); + this->CreateShowerBranches(); + this->CreateSliceBranches(); + this->CreateMCTruthBranches(); + this->CreateEventWeightBranches(); + this->CreateGeant4Branches(); + this->CreateTrackBranches(); + + //hardcode some info (TODO change) + std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; + + //Get the info for length->energy conversion from PSTAR database. + TFile *fileconv; + struct stat buffer; + + //some useful input data + if(!m_run_pi0_filter){ + if(stat("proton_conversion.root", &buffer) == 0){ + fileconv = new TFile("proton_conversion.root", "read"); + }else{ + fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); + } + + proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); + proton_length2energy_tgraph.GetMean(); + fileconv->Close(); + } + + //bad channels + std::string bad_channel_file = "MCC9_channel_list.txt"; + + if(!m_run_pi0_filter){ + if(stat(bad_channel_file.c_str(), &buffer) != 0){ + bad_channel_file = gpvm_location+bad_channel_file; + } + + std::ifstream bc_file(bad_channel_file); + + if (bc_file.is_open()) + { + std::string line; + while ( getline (bc_file,line) ) + { + std::vector res; + std::istringstream iss(line); + for(std::string s; iss >> s; ) + res.push_back( std::stof(s)); + + std::pair t(res[0],res[1]); + bad_channel_list_fixed_mcc9.push_back(t); + } + bc_file.close(); + } + } + + + //------------------- List of Selected Events to run -------- + if(m_runSelectedEvent){ + std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; + + std::ifstream infile(m_selected_event_list); + if(!infile){ + std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; + return; + } + + //read from file, run number, subrun number ,event number that should be run + m_selected_set.clear(); + std::string line; + while(std::getline(infile, line)){ + std::istringstream ss(line); + + std::vector event_info; + for(int i; ss >> i; ) event_info.push_back(i); + + m_selected_set.insert(event_info); + } + + infile.close(); + + if(m_is_verbose){ + std::cout << "Selected Events: " << std::endl; + std::cout << "Run \t SubRun \t Event" << std::endl; + for(auto & v: m_selected_set){ + std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); + std::cout << std::endl; + } + } + } + + std::cout<<"SinglePhoton \t||\t beginJob() is complete"<ClearIsolation(); + this->ClearSecondShowers(); + this->ClearSecondShowers3D(); + this->ClearStubs(); + this->ClearFlashes(); + this->ClearTracks(); + this->ClearShowers(); + this->ClearMCTruths(); + this->ClearEventWeightBranches(); + fmcweight.clear(); + this->ClearGeant4Branches(); + this->ClearSlices(); + + + } + + + bool SinglePhoton::beginSubRun(art::SubRun& sr) { + + + m_run = sr.run(); + m_subrun = sr.subRun(); + + double this_pot = 0; + + //reset subrun count + m_subrun_counts = 0; + + + if(m_potLabel != ""){ + if(m_potLabel == "generator"){ + + art::Handle gen_pot_hand; + if(sr.getByLabel(m_potLabel,gen_pot_hand)){ + this_pot = gen_pot_hand->totgoodpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; + if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ + this_pot =potSummaryHandlebnbETOR875->totpot; + m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<Fill(); + return true; + } + + + + + + + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------------------------------------------------------------- + + void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; + int n_vert =0; + + //std::cout<<"There are "<second; + if (!vertexVector.empty()) + { + if (vertexVector.size() !=1) + std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; + + const art::Ptr vertex = *(vertexVector.begin()); + double xyz[3] = {0.0, 0.0, 0.0} ; + vertex->XYZ(xyz); + + n_vert++; + //std::cout<<"Vertex!"<<"\t "< tmp = {xyz[0],xyz[1],xyz[2]}; + m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); + + if(!m_run_pi0_filter){ + m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); + m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); + m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); + } + + }else{ + std::cout << " Error: vertexVector associated with this particle is empty " << "\n"; + std::cerr << " Error: vertexVector associated with this particle is empty " << "\n"; + //exit(0); + + } + } + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) + { + const art::Ptr pParticle(pfParticleHandle, i); + // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) + { + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + } + + + void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) + { + + int found = 0; + int primaries = 0; + int full = 0; + for (PFParticleIdMap::const_iterator it = pfParticleMap.begin(); it != pfParticleMap.end(); ++it) + { + const art::Ptr pParticle(it->second); + + full++; + // Only look for primary particles + if (!pParticle->IsPrimary()) continue; + + // Check if this particle is identified as the neutrino + const int pdg(pParticle->PdgCode()); + const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + + + primaries++; + // If it is, lets get the vertex position + if(isNeutrino){ + found++; + this->GetVertex(pfParticlesToVerticesMap, pParticle ); + + } + + // All non-neutrino primary particles are reconstructed under the cosmic hypothesis + if (!isNeutrino) + { + crParticles.push_back(pParticle); + continue; + } + + // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. + // If this is not the case please handle accordingly + if (!nuParticles.empty()) + { + throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; + } + + // Add the daughters of the neutrino PFParticle to the nuPFParticles vector + for (const size_t daughterId : pParticle->Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + nuParticles.push_back(pfParticleMap.at(daughterId)); + } + } + std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + + + // Get the associations between PFParticles and tracks/showers from the event + art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + + //if running over the neutrino slice only + if (m_run_all_pfps == false){ + for (const art::Ptr &pParticle : particles) { + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + } + } else{ //if running over all slices + std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; + + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + } + } + + + } + + void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + + const unsigned int nTracks(associatedTracks.size()); + const unsigned int nShowers(associatedShowers.size()); + + + // Check if the PFParticle has no associated tracks or showers + if (nTracks == 0 && nShowers == 0) + { + // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; + return; + } + + // Check if there is an associated track + if (nTracks == 1 && nShowers == 0) + { + + tracks.push_back(associatedTracks.front()); + trackToNuPFParticleMap[tracks.back()]= pParticle; + //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); + + } + + + + + double SinglePhoton::triangle_area(double a1, double a2, double b1, double b2, double c1, double c2){ + double m1 = 0.3; + double m2 = 1.0/25.0; + + return fabs((a1*m1*(b2*m2-c2*m2)+b1*m1*(c2*m2-a2*m2)+c1*m1*(a2*m2-b2*m2))/2.0); + } + + int SinglePhoton::quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area){ + + std::vector z(n,0.0); + + TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); + TGraphDelaunay delan(g); + delan.SetMarginBinsContent(0); + delan.ComputeZ(0,0); + delan.FindAllTriangles(); + (*num_triangles)=delan.GetNdt(); // number of Delaunay triangles found + + //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays + Int_t *MT = delan.GetMTried(); + Int_t *NT = delan.GetNTried(); + Int_t *PT = delan.GetPTried(); + + (*area)=0.0; + for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ + + int n = hits.size(); + std::vector C0,T0; + std::vector C1,T1; + std::vector C2,T2; + size_t n_0=0; + size_t n_1=0; + size_t n_2=0; + + for(int i=0;i hit = hits[i]; + switch(hit->View()){ + case 0: + C0.push_back((double)hit->WireID().Wire); + T0.push_back(hit->PeakTime()); + n_0++; + break; + case 1: + C1.push_back((double)hit->WireID().Wire); + T1.push_back(hit->PeakTime()); + n_1++; + break; + case 2: + C2.push_back((double)hit->WireID().Wire); + T2.push_back(hit->PeakTime()); + n_2++; + break; + default: + break; + } + } + if(m_use_delaunay){ + if(n_0>0 && (int)n_0 < m_delaunay_max_hits) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); + if(n_1>0 && (int)n_1 < m_delaunay_max_hits) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); + if(n_2>0 && (int)n_2 < m_delaunay_max_hits) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); + } + num_hits[0] = n_0; + num_hits[1] = n_1; + num_hits[2] = n_2; + + //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ + corrected.resize(3); + + double kx = input[0]; + double ky = input[1]; + double kz = input[2]; + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + // double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & mcparticle, std::vector & corrected){ + corrected.resize(3); + + double kx = mcparticle->Vx(); + double ky = mcparticle->Vy(); + double kz = mcparticle->Vz(); + + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + //double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = scecorr.Y(); + double zOffset = scecorr.Z(); + + corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & corrected){ + corrected.resize(3); + //Space Charge Effect! functionize this soon. + double kx = mcparticle.Vx(); + double ky = mcparticle.Vy(); + double kz = mcparticle.Vz(); + auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); + + double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky + scecorr.Y(); + corrected[2]=kz + scecorr.Z(); + return 0; + } + + void SinglePhoton::CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr > & MCParticleToTrackIdMap) + { + + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(label, theParticles); + + if (!theParticles.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, label); + + for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) + { + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + truthToParticles[truth].push_back(particle); + particlesToTruth[particle] = truth; + MCParticleToTrackIdMap[particle->TrackId()] = particle; + } + + std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) + { + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + + art::Handle< std::vector > theSimChannels; + evt.getByLabel(label, theSimChannels); + + if (!theSimChannels.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; + } + + for (unsigned int i = 0; i < theSimChannels->size(); ++i) + { + const art::Ptr channel(theSimChannels, i); + simChannelVector.push_back(channel); + } + } + + + void SinglePhoton::BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap) + { + std::vector< art::Ptr > simChannelVector; + std::map< art::Ptr, std::vector> > truthToParticles; + std::map< art::Ptr, art::Ptr > particlesToTruth; + std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; + + this->CollectSimChannels(evt, label, simChannelVector); + this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + + + } + + bool SinglePhoton::Pi0PreselectionFilter() + { + + if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; + if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; + if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=1) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_conversion_distance.size()!=2) return false; + if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; + + return true; + } + + + + bool SinglePhoton::Pi0PreselectionFilter2g0p() + { + + if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; + if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; + if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=0) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_energy_max.size()!=2) return false; + //if the maximum energy of all showers on all planes is smaller than 30 + if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; + + return true; + } + + bool SinglePhoton::IsEventInList(int run, int subrun, int event){ + if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ + if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ + if(m_selected_set.find({run}) == m_selected_set.end()) + return false; + } + } + return true; + } + +} //namespace diff --git a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h new file mode 100644 index 000000000..f44a08373 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h @@ -0,0 +1,1998 @@ +#ifndef SINGLE_PHOTON_ANALYSIS +#define SINGLE_PHOTON_ANALYSIS + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Optional/TFileService.h" +#include "art/Framework/Services/Optional/TFileDirectory.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +#include "ubobj/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +#include "ubobj/Optical/UbooneOpticalFilter.h" + +// Helper function for PID stuff +#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" +#include "TGeoPolygon.h" + +#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bad_channel_matching.h" +//#include "sssVeto_BDT.class.h" +#include "DBSCAN.h" + +#include "SEAview/SEAviewer.h" + +//------------------------------------------------------------------------------------------------------------------------------------------ + +namespace single_photon +{ + + // distance between point (x, y, z) and the shower direction line + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); + + } + + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; + + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + + } + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); + + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + } + + + + // sort indices in descending order + template + std::vector sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + // sort indices such that elements in v are in ascending order + template + std::vector sort_indexes_rev(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); + + return idx; + } + + + // check if two vectors have same elements (regardless of the order), and arrange their elements in order + template + bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + return v1 == v2; + } + + + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + + + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ + double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } + + + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; + + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + + double close_tick; + double close_wire; /* wire of hit that's closest to vertex */ + double angle;//w.r.t shower primary + + double impact_parameter; + + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + + double mean_dist; + double max_dist; + double min_dist; + + double pca_0; + double pca_1; + double pca_theta; + + int n_wires; /* number of wires hits correspond to */ + int n_ticks; + + bool pass; + + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of class sss_score + + class cluster { + + public: + + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { + + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts,&wires[0],&ticks[0]); + f_graph = af_graph; + + }; + + int getID() {return f_ID;} + int getN() {return f_npts;} + int getPlane(){ return f_plane;} + TGraph * getGraph(){ return &f_graph;} + std::vector> getHits(){return f_hits;} + int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} + sss_score * getSSScore(){return f_SSScore;} + private: + + int f_ID; + int f_npts; + int f_plane; + std::vector> f_pts; + std::vector> f_hits; + TGraph f_graph; + sss_score *f_SSScore; + }; // end of class cluster + + + + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDFilter + { + public: + // name alias from pandora + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + bool filter(art::Event &evt) override; + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob() override; + + /** + * @brief End the job, setting down ! + * + */ + void endJob() override; + /** + * @brief: grab run, subrun number, and subrun POT, fill the TTree */ + bool beginSubRun(art::SubRun& sr) override; + bool endSubRun(art::SubRun& sr) override; + + private: + /** + * @brief: reset/clear data members + */ + void ClearVertex(); + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleHandle the handle for the PFParticle collection + * @param pfParticleMap the mapping from ID to PFParticle + */ + void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); + + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ + void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; + + /** + * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation + * + * @param pfParticleMap the mapping from ID to PFParticle + * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis + * @param nuParticles a vector to hold the final-states of the reconstruced neutrino + */ + void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); + + /** + * @brief Collect associated tracks and showers to particles in an input particle vector + * + * @param particles a vector holding PFParticles from which to find the associated tracks and showers + * @param pfParticleHandle the handle for the PFParticle collection + * @param evt the art event to analyze + * @param tracks a vector to hold the associated tracks + * @param showers a vector to hold the associated showers + */ + void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: analyze associated tracks/showers for an PFParticle + * @param: pParticle: PFParticle to be analyzed + * @param: associatedTracks: a vector of asso track for pParticle + * @param: associatedShowers: a vector of asso shower for pParticle + * @param: tracks: associated track will be added into tracks + * @param: showers: associated shower will be added into showers + * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle + */ + void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: get vertex for particle + * @param: particle: a primary neutrino + */ + void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); + + void CollectCalo(const art::Event &evt,const art::Ptr &shower); + + + /* + *@brief Calculated the shower energy by looping over all the hits and summing the charge + *@param hits - an art pointer of all the hits in a shower + * */ + double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ + + int getNHitsPlane(std::vector> hits, int this_plane); + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + + /** + *@brief Takes a hit and multiplies the charge by the gain + *@param thishitptr art pointer to a hit + *@param plane the plane the hit is on + **/ + double GetQHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV for a given hit + * @param thishit - an individual hit + * + * + * */ + double QtoEConversionHit(art::Ptr thishitptr, int plane); + + /** + * @brief Calculate the E value in MeV from a given Q value + * @param q - the charge value + * + * */ + double QtoEConversion(double q); + + + /** + *@brief Takes a vector of dQ/dx values and converts to dE/dx + *@param dqdx - vector of dqdx points + * + * */ + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + /** + * + *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane + *@param shower - a Pandora shower + *@param clusters - all of the clusters in the shower + *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster + *@param plane - a single plane + * * */ + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane); + /** + *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) + *@param shower_dir - the 3D shower direction + *@param plane - a single plane + * */ + double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ + TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ + double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + + double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ + int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + + double degToRad(double deg); + double radToDeg(double rad); + /** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); + + /** + *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle + *@param thishit_pos - 2d location of a hit in cm + *@param rectangle - vector of the positions of the four corners of the rectangle + * + * */ + bool insideBox(std::vector thishit_pos, std::vector> rectangle); + + /** + * + *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary + *uses triangle area check + * + * */ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + + double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); + + /*** + *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 + *@param thisvector - vector of doubles + * + * */ + double getMedian(std::vector thisvector); + + + //---------------- Templatees ---------------------------- + void AnalyzeTemplates(); + void ClearTemplates(); + void ResizeTemplates(size_t); + void CreateTemplateBranches(); + + //---------------- Potential Track Stub -------------------- + void ClearStubs(); + void CreateStubBranches(); + + /* @brief: given indices of clusters, determine if they overlap in time + * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters + * candidate_indices provided the indices of clusters of which we'd like to check the overlap + */ + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information + * @brief: candidate clusters on different plane that overlap in time tick will be grouped together + * @return: return.first -> number of possible matches + * return.second.first -> 2D vector, indices of clusters in every possible match + * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match + */ + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + + + + //---------------- SecondShower---- + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + + void SimpleSecondShowerCluster(); + + + void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); + + + /* this function is now redundant, not in use anymore */ + void SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits + * and return a vector of 7 elements: + * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} + */ + std::vectorSecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + + + /* analyze a cluster of hits, and return corresponding sss_score */ + sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); + + /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits + * This function is currently used in function 'SecondShowerSearch' + * @parameter: plane, cluster are not in use + * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire + */ + TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); + + + /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ + int CompareToShowers(int,int,std::vector>& hitz,double,double, + const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); + //---------------- Isolation ----------------- + + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + + /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ + void IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); + + + + //---------------- Flashes ---------------------------- + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + + // void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h); + + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + + //---------------- Tracks ---------------------------- + /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ + void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, + std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap + ); + + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); + + + /* @brief: analyze MCParticle related to recob::Track if it has one + * variables starting with 'm_sim_track_' will be updated + * */ + void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector& vec); + + + /* collect information from anab::sParticleIDAlgScores of reco track */ + void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); + TGraph proton_length2energy_tgraph; + + //---------------- Showers ---------------------------- + + void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr> &PFPtoShowerReco3DMap + ); + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, + std::map,art::Ptr> & pfptotrkmap, + std::map,std::vector>> & trktocalomap, + std::map, std::vector>> & pfParticleToHitMap + ); + + void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector); + + /** + * @brief: match showers to MCParticles + * @arguments filled during function execution: + * mcParticleVector: vector of mother particles of showers + * objectToMCParticleMap: map of shower to its mother particle + */ + void showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap); + + + /* tranverse through mcParticleVector, and print out infos for photons */ + int photoNuclearTesting(std::vector>& mcParticleVector); + + // ------------ Fid Volume and SCB------------------------- // + double m_tpc_active_x_low; + double m_tpc_active_x_high; + double m_tpc_active_y_low; + double m_tpc_active_y_high; + double m_tpc_active_z_low ; + double m_tpc_active_z_high; + + double m_SCB_YX_TOP_y1_array; + std::vector m_SCB_YX_TOP_x1_array; + std::vector m_SCB_YX_TOP_y2_array; + double m_SCB_YX_TOP_x2_array; + double m_SCB_YX_BOT_y1_array; + std::vector m_SCB_YX_BOT_x1_array; + std::vector m_SCB_YX_BOT_y2_array; + double m_SCB_YX_BOT_x2_array; + + double m_SCB_ZX_Up_z1_array ; + double m_SCB_ZX_Up_x1_array ; + double m_SCB_ZX_Up_z2_array ; + double m_SCB_ZX_Up_x2_array ; + + double m_SCB_ZX_Dw_z1_array; + std::vector m_SCB_ZX_Dw_x1_array; + std::vector m_SCB_ZX_Dw_z2_array; + double m_SCB_ZX_Dw_x2_array; + + int isInTPCActive(std::vector&); /* if point is in active TPC volume */ + int isInTPCActive(double cut,std::vector&); + double distToTPCActive(std::vector&vec); /* if point in active TPC, returns distance from point to closest TPC wall + * otherwise, returns -999 */ + + int isInSCB(std::vector&); /* if point is inside SCB */ + int isInSCB(double cut,std::vector&); + int distToSCB(double & dist, std::vector &vec); /* calc the minimum distance from point to the SC boundary,save to dist. + * return value (0, or 1) indicates whether the point is in SCB */ + int setTPCGeom(); + /* This function is wrong, and Not used */ + bool loadSCB_YX(std::vector&zpolygons); + + //---------------- MCTruths ---------------------------- + + /** + * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) + */ + void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); + + std::map is_delta_map; + + //---------------- EventWeight ---------------------------- + + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + + //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. + + + //---------------- Geant4 ---------------------------- + + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); + + + + + + /** + * @brief: given an event and a label, collect all the SimChannel with that label + * @ param: simChannelVector: a vector of SimChannel [to be filled] + */ + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + + /** + * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use + * @param: evt: event, label: given label + * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] + * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] + * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] + */ + void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + + //-------------- Slices/Pandora Metadata ---------------// + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + //void CreateMatchedSliceBranches(); + + + /** + * brief: analyze metadata of PFParticles, and fill in all these maps + * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap + * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby + */ + void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> & primaryPFPSliceIdVec, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap); + + // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumPFPsMap ); + + std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ + //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); + + /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ + int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + + int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); + //can also look at things like shower energy, conversion length, etc. + + + /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ + std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap ); + // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + // std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumShowersMap ); + + + /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ + std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap); + + /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info + * to determine how many eligible tracks and showers there are in the event + */ + void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap, + std::map, int>& PFPToSliceIdMap); + + + void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); + + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + //------- matched shower ------------------------------------- + + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + + //------------------ Delaunay triangle tools -----------// + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found + * and total area of these triangles, + * save to num_triangles & area */ + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ + + // given a MCParticle, get its corrected vertex + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + // given a particle, and input location calculate its corrected true position, so we can compare it to reco + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); + + //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 + std::vector> bad_channel_list_fixed_mcc9; + std::map bad_channel_map_fixed_mcc9; + + + /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ + bool IsEventInList(int run, int subrun, int event); + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + std::string m_badChannelLabel; + std::string m_badChannelProducer; + std::string m_mcTrackLabel; + std::string m_mcShowerLabel; + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer; + std::ofstream out_stream; + + double m_mass_pi0_mev; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); + detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + //double m_gain; + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + + int m_Cryostat; + int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + + bool bool_make_sss_plots; + + + //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + + + int m_reco_asso_showers; + + double m_reco_vertex_to_nearest_dead_wire_plane0; + double m_reco_vertex_to_nearest_dead_wire_plane1; + double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + int m_reco_num_templates; + std::vector m_reco_template; /* temp comment: does not seem to be used */ + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + + double m_CRT_dt; //time between flash and nearest CRT hit + + //------------ Track related Variables ------------- + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + // ---- corresponding variables on the best plane of reco track, which is defined as such------ + // if plane 2 have good hits, then plane 2 is the best-plane + // otherwise, which plane of plane 0 and 1 has more good hits will be best plane + // if none of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + + std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + std::vector m_reco_track_end_to_nearest_dead_wire_plane1; + std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + /* event origin types: + * kUnknown: ??? + * kBeamNeutrino: Beam neutrinos. + * kCosmicRay: Cosmic rays. + * kSuperNovaNeutrino: Supernova neutrinos. + * kSingleParticle: single particles thrown at the detector + */ + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + * if there is no shower hits, set to 999 + * if there is shower hits but no track hits, set to -999 + */ + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + * of each plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + * set to -999 if there is no unassociated hits or track hits on plane + */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + * on each plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + + /*-------------------------------------------------------------------------------------*/ + + //------------ Shower related Variables ------------- + + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + //end flash matching + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + + + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + + + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + * plane 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + + + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + + double m_mctruth_leading_exiting_proton_energy; + + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + + + int m_mctruth_num_reconstructable_protons; + + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + * close enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + + + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + + + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + double _time2cm;//value modeled from David's shower code + + // PID-related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + //Geant4 + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + + + + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ + bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ + }; + + DEFINE_ART_MODULE(SinglePhoton) + +} // namespace lar_pandora +#endif +//------------------------------------------------------------------------------------------------------------------------------------------ +// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/ref/TruncMean.h b/sbncode/SinglePhotonAnalysis/ref/TruncMean.h new file mode 100644 index 000000000..b8dbf1d09 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/TruncMean.h @@ -0,0 +1,260 @@ +/** + * \file TruncMean.h + * + * \ingroup 3DMichel + * + * \brief Class def header for a class TruncMean + * + * @author david caratelli [davidc@fnal.gov] + * Written 08/02/2018. + */ + +#ifndef TRUNCMEAN_H +#define TRUNCMEAN_H + +#include +#include +#include +#include +#include +#include + +/** + \class TruncMean + The truncated mean class allows to compute the following quantities + 1) the truncated mean profile of an ordered vector of values, such as + the charge profile along a particle's track. + To create such a profile use the function CalcTruncMeanProfile() + 2) Get the truncated mean value of a distribution. This function + iteratively hones in on the truncated mean of a distribution by + updating the mean and cutting the tails after each iteration. + For this functionality use CalcIterativeTruncMean() + doxygen documentation! +*/ + +static const double kINVALID_FLOAT = std::numeric_limits::max(); + +class TruncMean{ + + public: + + /// Default constructor + TruncMean(){} + + /// Default destructor + ~TruncMean(){} + + /** + @brief Given residual range and dq vectors return truncated local dq. + Input vectors are assumed to be match pair-wise (nth entry in rr_v + corresponds to nth entry in dq_v vector). + Input rr_v values are also assumed to be ordered: monotonically increasing + or decreasing. + For every dq value a truncated linear dq value is calculated as follows: + 0) all dq values within a rr range set by the class variable _rad are selected. + 1) the median and rms of these values is calculated. + 2) the subset of local dq values within the range [median-rms, median+rms] is selected. + 3) the resulting local truncated dq is the average of this truncated subset. + @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) + @input std::vector dq_v -> vector of measured values for which truncated profile is requested + (i.e. charge profile of a track) + @input std::vector dq_trunc_v -> passed by reference -> output stored here + @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation + */ + void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma = 1); + + /** + @brief Iteratively calculate the truncated mean of a distribution + @brief: mean is returned if vecter's size is too small, or reach the max iteration, or median has converged + @input std::vector v -> vector of values for which truncated mean is asked + @input size_t nmin -> minimum number of iterations to converge on truncated mean + @input size_t nmax -> maximum number of iterations to converge on truncated mean + @input size_t lmin -> minimum number of entries in vector before exiting and returning current value + @input size_t currentiteration -> current iteration + @input double convergencelimit -> fractional difference between successive iterations + under which the iteration is completed, provided nmin iterations have occurred. + @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. + */ + double CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed = kINVALID_FLOAT); + + /** + @brief Set the smearing radius over which to take hits for truncated mean computaton. + */ + void setRadius(const double& rad) { _rad = rad; } + + private: + + double Mean (const std::vector& v); + double Median(const std::vector& v); + double RMS (const std::vector& v); + + /** + Smearing radius over which charge from neighboring hits is scanned to calculate local + truncated mean + */ + double _rad; + +}; + +double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed) +{ + + auto const& mean = Mean(v); + auto const& med = Median(v); + auto const& rms = RMS(v); + + // if the vector length is below the lower limit -> return + if (v.size() < lmin) + return mean; + + // if we have passed the maximum number of iterations -> return + if (currentiteration >= nmax) + return mean; + + // if we passed the minimum number of iterations and the mean is close enough to the old value + double fracdiff = fabs(med-oldmed) / oldmed; + if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) + return mean; + + // if reached here it means we have to go on for another iteration + + // cutoff tails of distribution surrounding the mean + // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom + // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions + v.erase( std::remove_if( v.begin(), v.end(), + [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed + v.end()); + + return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); +} + +void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma) +{ + + // how many points to sample + int Nneighbor = (int)(_rad * 3 * 2); + + dq_trunc_v.clear(); + dq_trunc_v.reserve( rr_v.size() ); + + int Nmax = dq_v.size()-1; + + for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size + + // current residual range + double rr = rr_v.at(n); + + int nmin = n - Nneighbor; + int nmax = n + Nneighbor; + + if (nmin < 0) nmin = 0; + if (nmax > Nmax) nmax = Nmax; + + // vector for local dq values + std::vector dq_local_v; + + for (int i=nmin; i < nmax; i++) { + + double dr = rr - rr_v[i]; + if (dr < 0) dr *= -1; + + if (dr > _rad) continue; + + dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough + + }// for all ticks we want to scan + + if (dq_local_v.size() == 0 ) { + dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself + continue; + } + + // calculate median and rms + double median = Median(dq_local_v); + double rms = RMS(dq_local_v); + + double truncated_dq = 0.; + int npts = 0; + for (auto const& dq : dq_local_v) { + if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ + truncated_dq += dq; + npts += 1; + } + } + + dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma + + if(dq_trunc_v.back() != dq_trunc_v.back()){ + std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) +{ + + double mean = 0.; + for (auto const& n : v) mean += n; + mean /= v.size(); + + return mean; +} + +double TruncMean::Median(const std::vector& v) +{ + + if (v.size() == 1) return v[0]; + + std::vector vcpy = v; + + std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order + + double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice + + return median; +} + +double TruncMean::RMS(const std::vector& v) +{ + + if(v.size()==1) return v.front(); + + double avg = 0.; + for (auto const& val : v) avg += val; + avg /= v.size(); + double rms = 0.; + for (auto const& val : v) rms += (val-avg)*(val-avg); + rms = sqrt( rms / ( v.size() - 1 ) ); + + + if(rms!=rms){ + std::cout<<"ERROR || TruncMean::RMS || is returning nan."<Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); + eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); + eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); + eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); + eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); + eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); + eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); + eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); + eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"< > mcFluxHandle; + e.getByLabel("generator", mcFluxHandle); + if (!mcFluxHandle.isValid()) return; + std::vector< art::Ptr > mcFluxVec; + art::fill_ptr_vector(mcFluxVec, mcFluxHandle); + if (mcFluxVec.size() == 0){ + std::cout << ">> No MCFlux information" << std::endl; + return; + } + + art::Handle< std::vector > mcTruthHandle; + e.getByLabel("generator", mcTruthHandle); + if (!mcTruthHandle.isValid()) return; + std::vector< art::Ptr > mcTruthVec; + art::fill_ptr_vector(mcTruthVec, mcTruthHandle); + if (mcTruthVec.size() == 0){ + std::cout << ">> No MCTruth information" << std::endl; + return; + } + + art::Handle< std::vector< simb::GTruth > > gTruthHandle; + e.getByLabel("generator", gTruthHandle); + if (!gTruthHandle.isValid()) return; + std::vector< art::Ptr > gTruthVec; + art::fill_ptr_vector(gTruthVec, gTruthHandle); + if (gTruthVec.size() == 0){ + std::cout << ">> No GTruth information" << std::endl; + return; + } + + const art::Ptr mcFlux = mcFluxVec.at(0); + const art::Ptr mcTruth = mcTruthVec.at(0); + const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); + const art::Ptr gTruth = gTruthVec.at(0); + + m_run_number_eventweight = e.run(); + m_subrun_number_eventweight = e.subRun(); + m_event_number_eventweight = e.event(); + + // possibly the wrong variables, but let's see for now... + //m_mcflux_evtno = mcFlux->fevtno; + m_mcflux_nu_pos_x = nu.Vx(); + m_mcflux_nu_pos_y = nu.Vy(); + m_mcflux_nu_pos_z = nu.Vz(); + m_mcflux_nu_mom_x = nu.Px(); + m_mcflux_nu_mom_y = nu.Py(); + m_mcflux_nu_mom_z = nu.Pz(); + m_mcflux_nu_mom_E = nu.E(); + m_mcflux_ntype = mcFlux->fntype; + m_mcflux_ptype = mcFlux->fptype; + m_mcflux_nimpwt = mcFlux->fnimpwt; + m_mcflux_dk2gen = mcFlux->fdk2gen; + m_mcflux_nenergyn = mcFlux->fnenergyn; + m_mcflux_tpx = mcFlux->ftpx; + m_mcflux_tpy = mcFlux->ftpy; + m_mcflux_tpz = mcFlux->ftpz; + m_mcflux_tptype = mcFlux->ftptype; + m_mcflux_vx = mcFlux->fvx; + m_mcflux_vy = mcFlux->fvy; + m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for m_mctruth object + + m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < m_mctruth_nparticles; i++){ + + const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); + + m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + m_mctruth_particles_mother[i] = mcParticle.Mother(); + m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + + for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + + const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); + m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + + } + + m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + m_mctruth_particles_px0[i] = mcParticle.Px(0); + m_mctruth_particles_py0[i] = mcParticle.Py(0); + m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + m_mctruth_particles_e0[i] = mcParticle.E(0); + m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + } + + const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); + + m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + m_mctruth_neutrino_mode = mcNeutrino.Mode(); + m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + m_mctruth_neutrino_target = mcNeutrino.Target(); + m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + m_mctruth_neutrino_w = mcNeutrino.W(); + m_mctruth_neutrino_x = mcNeutrino.X(); + m_mctruth_neutrino_y = mcNeutrino.Y(); + m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + m_gtruth_tgt_pdg = gTruth->ftgtPDG; + m_gtruth_tgt_A = gTruth->ftgtA; + m_gtruth_tgt_Z = gTruth->ftgtZ; + m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); + m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); + m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); + m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); + + m_gtruth_weight = gTruth->fweight; + m_gtruth_probability = gTruth->fprobability; + m_gtruth_xsec = gTruth->fXsec; + m_gtruth_diff_xsec = gTruth->fDiffXsec; + m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + m_gtruth_vertex_x = gTruth->fVertex.X(); + m_gtruth_vertex_y = gTruth->fVertex.Y(); + m_gtruth_vertex_z = gTruth->fVertex.Z(); + m_gtruth_vertex_T = gTruth->fVertex.T(); + m_gtruth_gscatter = gTruth->fGscatter; + m_gtruth_gint = gTruth->fGint; + m_gtruth_res_num = gTruth->fResNum; + m_gtruth_num_piplus = gTruth->fNumPiPlus; + m_gtruth_num_pi0 = gTruth->fNumPi0; + m_gtruth_num_piminus = gTruth->fNumPiMinus; + m_gtruth_num_proton = gTruth->fNumProton; + m_gtruth_num_neutron = gTruth->fNumNeutron; + m_gtruth_is_charm = gTruth->fIsCharm; + m_gtruth_is_strange = gTruth->fIsStrange; + m_gtruth_decay_mode = gTruth->fDecayMode; + m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; + m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; + m_gtruth_gx = gTruth->fgX; + m_gtruth_gy = gTruth->fgY; + m_gtruth_gt = gTruth->fgT; + m_gtruth_gw = gTruth->fgW; + m_gtruth_gQ2 = gTruth->fgQ2; + m_gtruth_gq2 = gTruth->fgq2; + m_gtruth_probe_pdg = gTruth->fProbePDG; + m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; + m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + + //moved to inside singlphoontmodule.cc for filter reasons + //eventweight_tree->Fill(); + std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<Branch("geant4_pdg",&m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_geant4_px); + geant4_tree->Branch("geant4_py", &m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_geant4_process); + + + } + + void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< mcp = mcParticleVector[j]; + std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()); + m_geant4_trackid.push_back(mcp->TrackId()); + m_geant4_statuscode.push_back(mcp->StatusCode()); + m_geant4_mother.push_back(mcp->Mother()); + m_geant4_E.push_back(mcp->E()); + m_geant4_mass.push_back(mcp->Mass()); + m_geant4_px.push_back(mcp->Px()); + m_geant4_py.push_back(mcp->Py()); + m_geant4_pz.push_back(mcp->Pz()); + m_geant4_vx.push_back(mcp->Vx()); + m_geant4_vy.push_back(mcp->Vy()); + m_geant4_vz.push_back(mcp->Vz()); + m_geant4_end_process.push_back(mcp->EndProcess()); + m_geant4_process.push_back(mcp->Process()); + m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + + + + if(j>2)break; + + } + + + } +} diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h new file mode 100644 index 000000000..c15ef16b7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h @@ -0,0 +1,685 @@ +#include "SinglePhoton_module.h" + +namespace single_photon +{ + void SinglePhoton::ClearMCTruths(){ + m_mctruth_num = 0; + m_mctruth_origin = -99; + m_mctruth_mode = -99; + m_mctruth_interaction_type = -99; + m_mctruth_nu_vertex_x = -9999; + m_mctruth_nu_vertex_y = -9999; + m_mctruth_nu_vertex_z = -9999; + m_mctruth_reco_vertex_dist = -9999; + m_mctruth_ccnc = -99; + m_mctruth_qsqr = -99; + m_mctruth_nu_E = -99; + m_mctruth_nu_pdg = 0; + m_mctruth_lepton_pdg = 0; + m_mctruth_num_daughter_particles = -99; + m_mctruth_daughters_pdg.clear(); + m_mctruth_daughters_E.clear(); + + m_mctruth_daughters_status_code.clear(); + m_mctruth_daughters_trackID.clear(); + m_mctruth_daughters_mother_trackID.clear(); + m_mctruth_daughters_px.clear(); + m_mctruth_daughters_py.clear(); + m_mctruth_daughters_pz.clear(); + m_mctruth_daughters_startx.clear(); + m_mctruth_daughters_starty.clear(); + m_mctruth_daughters_startz.clear(); + m_mctruth_daughters_time.clear(); + m_mctruth_daughters_endx.clear(); + m_mctruth_daughters_endy.clear(); + m_mctruth_daughters_endz.clear(); + m_mctruth_daughters_endtime.clear(); + m_mctruth_daughters_process.clear(); + m_mctruth_daughters_end_process.clear(); + + + m_mctruth_is_delta_radiative = 0; + m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + m_mctruth_delta_photon_energy=-999; + m_mctruth_delta_proton_energy=-999; + m_mctruth_delta_neutron_energy=-999; + + m_mctruth_num_exiting_photons =0; + m_mctruth_num_exiting_protons =0; + m_mctruth_num_exiting_pi0 =0; + m_mctruth_num_exiting_pipm =0; + m_mctruth_num_exiting_neutrons=0; + m_mctruth_num_exiting_delta0=0; + m_mctruth_num_exiting_deltapm=0; + m_mctruth_num_exiting_deltapp=0; + + m_mctruth_num_reconstructable_protons = 0; + + m_mctruth_is_reconstructable_1g1p = 0; + m_mctruth_is_reconstructable_1g0p = 0; + + m_mctruth_leading_exiting_proton_energy = -9999; + + m_mctruth_exiting_pi0_E.clear(); + m_mctruth_exiting_pi0_mom.clear(); + m_mctruth_exiting_pi0_px.clear(); + m_mctruth_exiting_pi0_py.clear(); + m_mctruth_exiting_pi0_pz.clear(); + + m_mctruth_pi0_leading_photon_energy = -9999; + m_mctruth_pi0_subleading_photon_energy = -9999; + m_mctruth_pi0_leading_photon_end_process = "none"; + m_mctruth_pi0_subleading_photon_end_process = "none"; + m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_exiting_TPC = -999; + m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + m_mctruth_exiting_delta0_num_daughters.clear(); + + m_mctruth_exiting_photon_mother_trackID.clear(); + m_mctruth_exiting_photon_trackID.clear(); + m_mctruth_exiting_photon_from_delta_decay.clear(); + m_mctruth_exiting_photon_energy.clear(); + m_mctruth_exiting_photon_px.clear(); + m_mctruth_exiting_photon_py.clear(); + m_mctruth_exiting_photon_pz.clear(); + + m_mctruth_exiting_proton_mother_trackID.clear(); + m_mctruth_exiting_proton_trackID.clear(); + m_mctruth_exiting_proton_from_delta_decay.clear(); + m_mctruth_exiting_proton_energy.clear(); + m_mctruth_exiting_proton_px.clear(); + m_mctruth_exiting_proton_py.clear(); + m_mctruth_exiting_proton_pz.clear(); + + m_mctruth_exiting_neutron_mother_trackID.clear(); + m_mctruth_exiting_neutron_trackID.clear(); + m_mctruth_exiting_neutron_from_delta_decay.clear(); + m_mctruth_exiting_neutron_energy.clear(); + m_mctruth_exiting_neutron_px.clear(); + m_mctruth_exiting_neutron_py.clear(); + m_mctruth_exiting_neutron_pz.clear(); + + } + + void SinglePhoton::ResizeMCTruths(size_t size){ + m_mctruth_daughters_pdg.resize(size); + m_mctruth_daughters_E.resize(size); + m_mctruth_daughters_status_code.resize(size); + m_mctruth_daughters_trackID.resize(size); + m_mctruth_daughters_mother_trackID.resize(size); + m_mctruth_daughters_px.resize(size); + m_mctruth_daughters_py.resize(size); + m_mctruth_daughters_pz.resize(size); + m_mctruth_daughters_startx.resize(size); + m_mctruth_daughters_starty.resize(size); + m_mctruth_daughters_startz.resize(size); + m_mctruth_daughters_time.resize(size); + m_mctruth_daughters_endx.resize(size); + m_mctruth_daughters_endy.resize(size); + m_mctruth_daughters_endz.resize(size); + m_mctruth_daughters_endtime.resize(size); + m_mctruth_daughters_end_process.resize(size); + m_mctruth_daughters_process.resize(size); + + } + + //add into vertex tree? + void SinglePhoton::CreateMCTruthBranches(){ + vertex_tree->Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); + vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); + vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); + vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); + vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); + vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); + vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); + vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); + vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); + vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); + vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); + vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); + vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); + vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); + vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); + vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); + + + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); + vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); + vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); + vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); + vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); + + vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); + vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); + vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); + vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); + + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); + vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); + vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); + vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); + vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); + vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ + m_mctruth_num = mcTruthVector.size(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< truth = mcTruthVector[i]; + + + m_mctruth_origin = truth->Origin(); + if(m_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ + if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); + if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); + if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); + if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); + if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); + if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); + if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); + if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); + if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); + // get corrected lepton position + this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); + + m_mctruth_nu_vertex_x = corrected[0]; + m_mctruth_nu_vertex_y = corrected[1]; + m_mctruth_nu_vertex_z = corrected[2]; + m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); + + } + + + + if(m_is_verbose) std::cout<<"We are working with : "; + m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles + if(m_is_verbose) std::cout<ResizeMCTruths(m_mctruth_num_daughter_particles); + + + //some temp variables to see if its 1g1p or 1g1n + int tmp_n_photons_from_delta = 0; + int tmp_n_protons_from_delta = 0; + int tmp_n_neutrons_from_delta = 0; + + + m_mctruth_leading_exiting_proton_energy = -9999; + + for(int j=0; j< m_mctruth_num_daughter_particles; j++){ + + const simb::MCParticle par = truth->GetParticle(j); + m_mctruth_daughters_pdg[j] = par.PdgCode(); + m_mctruth_daughters_E[j] = par.E(); + + m_mctruth_daughters_status_code[j] = par.StatusCode(); + m_mctruth_daughters_trackID[j] = par.TrackId(); + m_mctruth_daughters_mother_trackID[j] = par.Mother(); + m_mctruth_daughters_px[j] = par.Px(); + m_mctruth_daughters_py[j] = par.Py(); + m_mctruth_daughters_pz[j] = par.Pz(); + m_mctruth_daughters_startx[j] = par.Vx(); + m_mctruth_daughters_starty[j] = par.Vy(); + m_mctruth_daughters_startz[j] = par.Vz(); + m_mctruth_daughters_time[j] = par.T(); + m_mctruth_daughters_endx[j] = par.EndX(); + m_mctruth_daughters_endy[j] = par.EndY(); + m_mctruth_daughters_endz[j] = par.EndZ(); + m_mctruth_daughters_endtime[j] = par.EndT(); + m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string + m_mctruth_daughters_end_process[j] = par.EndProcess(); + + if(m_is_textgen) continue; //quick hack, fix in files + + switch(m_mctruth_daughters_pdg[j]){ + case(22): // if it's a gamma + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_photons++; + m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); + m_mctruth_exiting_photon_energy.push_back(par.E()); + m_mctruth_exiting_photon_px.push_back(par.Px()); + m_mctruth_exiting_photon_py.push_back(par.Py()); + m_mctruth_exiting_photon_pz.push_back(par.Pz()); + } + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); + + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_photon_energy = par.E(); + tmp_n_photons_from_delta ++; + m_mctruth_is_delta_radiative++; + } + } + } + break; + case(111): // if it's a pi0 + { + // Make sure the pi0 actually exits the nucleus + if (par.StatusCode() == 1) { + m_mctruth_exiting_pi0_E.push_back(par.E()); + m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); + m_mctruth_exiting_pi0_px.push_back(par.Px()); + m_mctruth_exiting_pi0_py.push_back(par.Py()); + m_mctruth_exiting_pi0_pz.push_back(par.Pz()); + m_mctruth_num_exiting_pi0++; + } + break; + } + case(211): + case(-211): // it's pi+ or pi- + if (par.StatusCode() == 1) { + m_mctruth_num_exiting_pipm++; + } + break; + case(2212): // if it's a proton + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_protons++; + m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); + m_mctruth_exiting_proton_energy.push_back(par.E()); + m_mctruth_exiting_proton_px.push_back(par.Px()); + m_mctruth_exiting_proton_py.push_back(par.Py()); + m_mctruth_exiting_proton_pz.push_back(par.Pz()); + } + + + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_proton_energy = par.E(); + tmp_n_protons_from_delta ++; + } + } + + + break; + } + case(2112): // if it's a neutron + { + + m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it + m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); + m_mctruth_exiting_neutron_energy.push_back(par.E()); + m_mctruth_exiting_neutron_px.push_back(par.Px()); + m_mctruth_exiting_neutron_py.push_back(par.Py()); + m_mctruth_exiting_neutron_pz.push_back(par.Pz()); + + if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_neutron_energy = par.E(); + tmp_n_neutrons_from_delta ++; + } + } + } + + break; + case(-2224): + case(2224): + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } + break; + case(-2214): + case(2214): + case(-1114): + case(1114): // if it's delta-, or delta+ + if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } + break; + case(-2114): + case(2114): // if it's delta0 + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_delta0++; + m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ + m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + } + } + + + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t This event is "; + if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ + m_mctruth_delta_radiative_1g1p_or_1g1n = 1; + std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ + m_mctruth_num_reconstructable_protons++; + + }//if g above threshold + } + + //if it's a true delta radiative event, check the energies + + + + if (m_mctruth_is_delta_radiative==true){ + for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ + m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. + + }//if g above threshold + }//for all exiting g + for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ + if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ + //if it's already 1g1p then we've found a 1g2p which we aren't counting + // Guanqun: limit to only 1 reconstructable proton? + if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ + m_mctruth_is_reconstructable_1g1p = false; + } + //if there's a photon then it's actually a 1g1p + if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ + m_mctruth_is_reconstructable_1g1p = true; + m_mctruth_is_reconstructable_1g0p = false; + } + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); + + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); + + if(m_is_verbose){ + std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + mymap[mcp->TrackId()] = k; + } + + + //Just some VERY hacky pi^0 photon stuff + int npi0check = 0; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + + if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; + + // if it's a pi0, its mother trackID is 0 and it has two daughters + if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ + npi0check++; + // get its two daughters + const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; + const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; + + if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); + double e2 = dau2->E(); + + std::vector raw_1_End ={dau1->EndX(), dau1->EndY(), dau1->EndZ()}; + std::vector raw_1_Start ={dau1->Vx(), dau1->Vy(), dau1->Vz()}; + + std::vector raw_2_End ={dau2->EndX(), dau2->EndY(), dau2->EndZ()}; + std::vector raw_2_Start ={dau2->Vx(), dau2->Vy(), dau2->Vz()}; + + std::vector corrected_1_start(3), corrected_2_start(3); + std::vector corrected_1_end(3), corrected_2_end(3); + + this->spacecharge_correction(dau1, corrected_1_start, raw_1_Start); + this->spacecharge_correction(dau1, corrected_1_end, raw_1_End); + + this->spacecharge_correction(dau2, corrected_2_start, raw_2_Start); + this->spacecharge_correction(dau2, corrected_2_end, raw_2_End); + + for(int p1=0; p1NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; + std::cout<<"Post1 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau2->Daughter(p1)]]; + std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<isInTPCActive(corrected_1_end); + int exit2 = this->isInTPCActive(corrected_2_end); + + if(e2EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_1_start; + m_mctruth_pi0_leading_photon_end = corrected_1_end; + m_mctruth_pi0_subleading_photon_start = corrected_2_start; + m_mctruth_pi0_subleading_photon_end = corrected_2_end; + //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! + m_mctruth_pi0_leading_photon_exiting_TPC =exit1; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; + m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + }else{ + m_mctruth_pi0_leading_photon_energy = e2; + m_mctruth_pi0_subleading_photon_energy = e1; + m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_2_start; + m_mctruth_pi0_leading_photon_end = corrected_2_end; + m_mctruth_pi0_subleading_photon_start = corrected_1_start; + m_mctruth_pi0_subleading_photon_end = corrected_1_end; + m_mctruth_pi0_leading_photon_exiting_TPC = exit2; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; + m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + } + + } + } + + if(npi0check>1) std::cout<<"WARNING WARNING!!!! there are "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + } + + + void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ + + // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ + + + for(auto pair: crtvetoToFlashMap){ + std::cout<<"for flash at time "<< pair.first->Time()<<" has "<< pair.second.size() << " associated CRT hits "< 0){ + for (auto hit: pair.second){ + std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); + } + + } + m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits + } + + size_t flash_size = flashes.size(); + m_reco_num_flashes = flash_size; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; + + this->ResizeFlashes(flash_size); + + for(size_t i = 0; i < flash_size; ++i) { + + + art::Ptr const & flash = flashes[i]; + + m_reco_flash_total_pe[i]=(flash->TotalPE()); + m_reco_flash_time[i]=(flash->Time()); + m_reco_flash_time_width[i]=flash->TimeWidth(); + m_reco_flash_abs_time[i]=flash->AbsTime(); + m_reco_flash_frame[i]=flash->Frame(); + m_reco_flash_ycenter[i]=flash->YCenter(); + m_reco_flash_ywidth[i]=flash->YWidth(); + m_reco_flash_zcenter[i]=flash->ZCenter(); + m_reco_flash_zwidth[i]=flash->ZWidth(); + + // m_beamgate_flash_end/m_beamgate_flash_start are read from pset + if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ + m_reco_num_flashes_in_beamgate++; + m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); + m_reco_flash_time_in_beamgate[i]=(flash->Time()); + m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); + m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); + } + + + + } + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); + + double _dt_abs = 100000.0; + // double _within_resolution = 0; + double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? + + // Loop over the CRT hits. + for (int j = 0; j < _nCRThits_in_event; j++) + { + /* + if (verbose) + std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; + */ + double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); + + // Fill the vector variables. + m_CRT_hits_time.push_back(_crt_time_temp); + m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); + m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); + m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); + m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); + + if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) + { + _dt_abs = fabs(_beam_flash_time - _crt_time_temp); + m_CRT_dt = _beam_flash_time - _crt_time_temp; + m_CRT_min_hit_time = _crt_time_temp; + // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. + if (_dt_abs < m_Resolution) + { + //_within_resolution = 1; + // Set the position information and the intensity of the CRT hit. + m_CRT_min_hit_PE = crthit_h->at(j).peshit; + m_CRT_min_hit_x = crthit_h->at(j).x_pos; + m_CRT_min_hit_y = crthit_h->at(j).y_pos; + m_CRT_min_hit_z = crthit_h->at(j).z_pos; + + + // if (verbose) + // { + std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; + std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; + std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; + std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; + // } + break; + } + } // End of conditional for closest CRT hit time. + } // End of loop over CRT hits. + } //if there is 1 flash in beamgate + }//if runCRT + + + }//analyze flashes + + + } diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h new file mode 100644 index 000000000..9da6ec348 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h @@ -0,0 +1,1658 @@ +#include "SinglePhoton_module.h" +#include "reco_truth_matching.h" + +namespace single_photon +{ + void SinglePhoton::ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_SCB.clear(); + m_reco_shower_start_in_SCB.clear(); + m_reco_shower_end_dist_to_active_TPC.clear(); + m_reco_shower_end_dist_to_SCB.clear(); + + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + + m_reco_shower_reclustered_energy_plane0.clear(); + m_reco_shower_reclustered_energy_plane1.clear(); + m_reco_shower_reclustered_energy_plane2.clear(); + m_reco_shower_reclustered_energy_max.clear(); + + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + m_reco_shower_plane0_meanRMS.clear(); + m_reco_shower_plane1_meanRMS.clear(); + m_reco_shower_plane2_meanRMS.clear(); + + m_reco_shower_hit_tick.clear(); + m_reco_shower_hit_wire.clear(); + m_reco_shower_hit_plane.clear(); + m_reco_shower_spacepoint_x.clear(); + m_reco_shower_spacepoint_y.clear(); + m_reco_shower_spacepoint_z.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + + m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + m_reco_shower_pfparticle_pdg.clear(); + + } + + void SinglePhoton::ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower_reclustered_energy_plane0.resize(size); + m_reco_shower_reclustered_energy_plane1.resize(size); + m_reco_shower_reclustered_energy_plane2.resize(size); + m_reco_shower_reclustered_energy_max.resize(size); + + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_SCB.resize(size); + m_reco_shower_start_in_SCB.resize(size); + + m_reco_shower_end_dist_to_active_TPC.resize(size); + m_reco_shower_end_dist_to_SCB.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + m_reco_shower_plane0_meanRMS.resize(size); + m_reco_shower_plane1_meanRMS.resize(size); + m_reco_shower_plane2_meanRMS.resize(size); + + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + + m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + m_reco_shower_pfparticle_pdg.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + + + + + + } + + void SinglePhoton::CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); + vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); + vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); + + + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); + vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); + vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); + + vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); + vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); + vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); + vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); + + vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); + vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); + vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); + + vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); + vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); + vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void SinglePhoton::AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap, std::map, std::vector> > & pfParticleToClusterMap,std::map, std::vector> > & clusterToHitMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr>& PFPtoShowerReco3DMap + ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); + + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + + art::Ptr shower3d; + if(PFPtoShowerReco3DMap.count(pfp)==0){ + //std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; + const std::vector> clusters = pfParticleToClusterMap[pfp]; + + + //int m_shrid = shower->ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); + + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); + + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; + m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); + + m_reco_shower_dirx[i_shr] = shr_dir.X(); + m_reco_shower_diry[i_shr] = shr_dir.Y(); + m_reco_shower_dirz[i_shr] = shr_dir.Z(); + m_reco_shower_length[i_shr] = m_length; + m_reco_shower_openingangle[i_shr] = m_open_angle; + + m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + m_reco_shower3d_length[i_shr] = shower3d->Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + + double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); + m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + + + + m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); + m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + + m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); + m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + + + m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + std::vector t_num(3,0); // num of triangles on each plane + std::vector t_numhits(3,0); // num of hits on each plane + std::vector t_area(3,0.0); + + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); + + //auto finish = std::chrono::high_resolution_clock::now(); + //auto microseconds = std::chrono::duration_cast(finish-start); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + //const int shr3d_bestplane = shower3d->best_plane(); + + // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); + int wire = h->WireID().Wire; + int tick = h->PeakTime(); + + m_reco_shower_hit_tick.push_back(tick); + m_reco_shower_hit_plane.push_back(plane); + m_reco_shower_hit_wire.push_back(wire); + + + + + } + + } + + + + //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); //corresponding PFParticle + if(m_reco_shower_num_daughters[i_shr]>0){ + //currently just look at 1 daughter + m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + //------------and finally some slice info----------------- + + m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; + //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; + //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<PdgCode(); + } else{ + m_reco_shower_trackscore[i_shr] = -999; + m_reco_shower_pfparticle_pdg[i_shr] = -999; + } + + if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ + + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; + for(int plane =0; plane < 3; plane++){ + if (m_is_data == false && m_is_overlayed == false){ + gains[plane] = m_gain_mc[plane] ; + } if (m_is_data == true || m_is_overlayed == true){ + gains[plane] = m_gain_data[plane] ; + } + } + + + int i_shr=0; + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + const art::Ptr shower = *iter; + const art::Ptr pfp = showerToPFParticleMap[shower]; + std::vector> hitz = pfParticleToHitMap[pfp]; + + if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; + + if(kalmanTrackToCaloMap.count(kalman)==0){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; + + if(calo.size()!=3){ + std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; + if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? + + std::vector t_dEdx; //in XX cm only (4 for now) + std::vector t_res; + + + for(size_t ix=0; ixResidualRange().size(); ++ix){ + + double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; + if(rr <= res_range_lim){ + // Guanqun: why is here a gains[plane], it's not converting ADC to E? + t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); + //t_dQdx.push_back(*calo[p]->dQdx()[x]); + t_res.push_back(rr); + } + } + /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); + if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); + + switch(plane){ + case 0: + m_reco_shower_kalman_mean_dEdx_plane0[i_shr] = tmean ; + m_reco_shower_kalman_median_dEdx_plane0[i_shr] = tmedian ; + break; + case 1: + m_reco_shower_kalman_mean_dEdx_plane1[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane1[i_shr] = tmedian; + break; + case 2: + m_reco_shower_kalman_mean_dEdx_plane2[i_shr] = tmean; + m_reco_shower_kalman_median_dEdx_plane2[i_shr] = tmedian; + break; + default: + break; + } + + + const std::vector< anab::Point_t > kal_pts = calo[p]->XYZ(); + double circle = 1.0;//in cm + std::vector pts_within; + std::vector pts_x; + + for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); + + double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); + double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); + + //loop over all hits + for(auto &hit: hitz){ + if(plane != hit->View())continue; + double this_w = (double)hit->WireID().Wire; + double this_t = (double)hit->PeakTime(); + double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); + if(dist<=circle) pts_within.back()++; + } + //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ + TCanvas *c = new TCanvas(); + c->cd(); + + TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); + g->SetLineColor(kRed); + g->SetLineWidth(2); + g->Draw("alp"); + g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); + c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); + } + } + + + // some kalman averaging + double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; + double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; + double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; + double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); + double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); + double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); + + double thresh = 0.01; + + if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ + tmp_kal_2 = 0; + wei_2 = 0.0; + } + if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ + tmp_kal_1 = 0; + wei_1 = 0.0; + } + if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ + tmp_kal_0 = 0; + wei_0 = 0.0; + } + double kal_norm = wei_0+wei_1+wei_2; + + if(kal_norm!=0.0){ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); + }else{ + m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; + } + + + + + + + i_shr++; + } + return; + } + + + //----------------------------------------------------------------------------------------------------------------------------------------- + void SinglePhoton::RecoMCShowers(const std::vector>& showers, + std::map, art::Ptr> & showerToPFParticleMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector + ){ + //OBSOLETE OBSOLETE + + + if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; + m_sim_shower_matched[i_shr] = 0; + if(showerToMCParticleMap.count(shower) > 0){ + + + + const art::Ptr mcparticle = showerToMCParticleMap[shower]; + const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; + + std::vector corrected(3); + this->spacecharge_correction(mcparticle, corrected); + m_sim_shower_matched[i_shr] = 1; + m_sim_shower_energy[i_shr] = mcparticle->E(); + m_sim_shower_mass[i_shr] = mcparticle->Mass(); + m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); + m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); + m_sim_shower_process[i_shr] = mcparticle->Process(); + m_sim_shower_start_x[i_shr] = corrected[0]; + m_sim_shower_start_y[i_shr] = corrected[1]; + m_sim_shower_start_z[i_shr] =corrected[2]; + + m_sim_shower_origin[i_shr] = mctruth->Origin(); + //so this might be broken still due to mcparticle. must chcek + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_shower_parent_pdg[i_shr] = -999; + }else{ + m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + //OK is this photon matched to a delta? + + /* + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ + + nth_mother = crap_map[nth_mother->Mother()]; + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ + std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]< &shower) + { + + } + + double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ + double energy = 0.; + + //for each hit in the shower + for (auto &thishitptr : hits){ + //check the plane + int plane= thishitptr->View(); + + //skip invalid planes + if (plane != this_plane ) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy += E; + }//for each hit + + return energy; + + } + + double SinglePhoton::CalcEShower(const std::vector> &hits){ + double energy[3] = {0., 0., 0.}; + + //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); + + //skip invalid planes + if (plane > 2 || plane < 0) continue; + + //calc the energy of the hit + double E = QtoEConversionHit(thishitptr, plane); + + //add the energy to the plane + energy[plane] += E; + }//for each hiti + + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; + } + } + // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ + double gain; + //choose gain based on whether data/mc and by plane + if (m_is_data == false && m_is_overlayed == false){ + gain = m_gain_mc[plane] ; + //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; + return Q; + } + + double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ + return QtoEConversion(GetQHit(thishitptr, plane)); + + } + + double SinglePhoton::QtoEConversion(double Q){ + //return the energy value converted to MeV (the factor of 1e-6) + double E = Q* m_work_function *1e-6 /m_recombination_factor; + return E; + + } + + + std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ + int n = dqdx.size(); + std::vector dedx(n,0.0); + for (int i = 0; i < n; i++){ + //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane){ + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; + + //get the 3D shower direction + //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented + TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); + + //calculate the pitch for this plane + double pitch = getPitch(shower_dir, plane); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ + //keep only clusters on the plane + if(thiscluster->View() != plane) continue; + + //calculate the cluster direction + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + + //get the cluster start and and in CM + //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; + + //check that the cluster has non-zero length + double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + //resizes the branches that are filled for every slice int the event + void SinglePhoton::ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size); + m_reco_slice_num_pfps.resize(size); + m_reco_slice_num_showers.resize(size); + m_reco_slice_num_tracks.resize(size); + + } + + /* + //resize the branches that are filled for matched track and shower objects + void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ + m_reco_slice_shower_matched_sliceId.resize(size_shower); + m_reco_slice_track_matched_sliceId.resize( size_track); + m_reco_slice_shower_matched_energy.resize(size_shower); + m_reco_slice_track_matched_energy.resize( size_track); + m_reco_slice_shower_matched_conversion.resize(size_shower); + m_reco_slice_shower_matched_overlay_frac.resize(size_shower); + + } + */ + + + void SinglePhoton::CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + + } + + /* + void SinglePhoton::CreateMatchedSliceBranches(){ + vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); + vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); + vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); + vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); + vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); + vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); + } + */ + + //called once per event to get all the slice info + //fills a map between the neutrino score for the slice and the primary reco PFP + //loops over all PFP's to find the primary and then associate to a slice + void SinglePhoton::AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> &primaryPFPSliceIdVec, + std::map &sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap){ + + + //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index + // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score + std::vector> clearCosmicPFP; + std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + + std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event + std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event + //std::vector> primary_pfps; //store the primary PFP for each slice + // sliceIdToPFPMap.clear(); //clear between events + + /* + * Grabbed this info from Giuseppe: + * Here's the structure of these Metadata + * Primary PfParticles are either + * 1) IsClearCosmic = 1 (for unambiguous cosmics) + * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) + * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) + * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: + * 4) TrackScore = 0.671488 + * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata + */ + + + //for all PFP metadata in the event + for (auto pair: pfParticleToMetadataMap){ + std::vector> metadatalist= pair.second; //get the metadata + art::Ptr pfp = pair.first; //get the corresponding PFP + + //will be empty in circumstances outlined above, not every PFP has stored metadata + if (!metadatalist.empty()){ + + //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ + + //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); + + //get the metadata properties + std::map propertiesmap = data->GetPropertiesMap(); + //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; + PFPToTrackScoreMap[pfp] = it.second; + } + + }//for each item in properties map + + //if there is a neutrino score it's the primary PFP, so save the score+slice info + if(temp_score != -1.0){ + primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); + //primaryToSliceIdMap[pfp] = temp_ind; + sliceIdToNuScoreMap[temp_ind] = temp_score; + if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()< 0){ + //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + + //for all pfp's in the event + //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; + + //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ + for(auto item: pfParticleMap){ + art::Ptr start_pfp = item.second; + //no longer skipping pfp's that are clear cosmics + //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); + //if(iter != clearCosmicPFP.end()) continue; + + // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; + art::Ptr parent_pfp ; + + //if this is a primary particle, skip next part + if(!this_pfp->IsPrimary()){ + parent_pfp = pfParticleMap[this_pfp->Parent()]; + //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ + // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; + this_pfp = parent_pfp; + }//while not primary, iterate up chain + } else{ + parent_pfp = start_pfp; + } + + //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); + m_reco_slice_nuscore = nuscore_slices; + /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); + // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); + m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice + m_reco_slice_num_showers; //the subset of PFP's that are showers + m_reco_slice_num_tracks; + + */ + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; + //for(auto item: allPFPSliceIdVec){ + //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); + // } + } + + // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ + std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); + //return sliceIdToNumPFPsvec; + + //std::cout<<"starting to look at the PFP's per slice"<Self()<<" in slice "< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap){ + std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); + + /* + int max_pfp = -1; + for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { + int this_pfp = it->first->Self(); + if (this_pfp> max_pfp) { + max_pfp = this_pfp; + } + + } + std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; + + //check if this is a valid PFP + //if (pfp->self() > PFPToSliceIdMap.size()){ + // std::cout<<"ERROR, this pfp is out of bounds " + + // } + + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< pfp = pair.second; + //find slice corresponding to PFP + //have to check if it's in the map otherwise it returns 0 which is misleading + if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ + //get the slice id + + int slice_id = PFPToSliceIdMap[pfp]; + if (slice_id > -1){ + // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ + std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, + std::map,art::Ptr > & showerToPFParticleMap, + std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap){ + + std::vector matched_reco_slice_shower_overlay_fraction; + std::vector> matched_reco_slice_shower_MCP; + //std::vector matched_reco_slice_track_matched; + std::vector> matched_reco_slice_track_MCP; + + + //first check if in the event there's a match to a given signal + if(signal_def == "ncdelta"){ + //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; + // std::cout<<"found sim photon shower with track ID "< 0){ + //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); + matched_reco_slice_shower_MCP.push_back(mcp); + + //save the overlay fraction and whether it's matched + matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); + //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; + + if (m_sim_track_matched[k] > 0){ + if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ + + matched_reco_slice_track_MCP.push_back(mcp); + + // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); + + + std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ + //get the recob shower + art::Ptr this_shr; + for(auto pair: showerToMCParticleMap){ + if (pair.second == mcp){ + this_shr = pair.first; + } + } + art::Ptr this_pfp; + if(!this_shr.isNull()){ + this_pfp = showerToPFParticleMap[this_shr]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ + //get the recob track + art::Ptr this_trk; + for(auto pair: trackToMCParticleMap){ + if (pair.second == mcp){ + this_trk = pair.first; + } + } + art::Ptr this_pfp; + if(!this_trk.isNull()){ + this_pfp = trackToNuPFParticleMap[this_trk]; + } + + //get the slice + if(!this_pfp.isNull()){ + for(auto pair :allPFPSliceIdVec){ + art::Ptr pfp = pair.first; + if (this_pfp == pfp){ + if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); + } + } + } else{ + if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<Branch("reco_template",&m_reco_template); + } + + void SinglePhoton::AnalyzeTemplates(){ + m_reco_num_templates = 1; + this->ResizeTemplates(m_reco_num_templates); + + m_reco_template[0]=99; + + } +} diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h new file mode 100644 index 000000000..e377491f6 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h @@ -0,0 +1,1275 @@ +#include "SinglePhoton_module.h" +#include "TPrincipal.h" +#include "TVectorD.h" +#include "TruncMean.h" + + +namespace single_photon +{ + + + void SinglePhoton::ClearTracks(){ + m_reco_asso_tracks=0; + m_reco_track_length.clear(); + m_reco_track_num_daughters.clear(); + m_reco_track_daughter_trackscore.clear(); + m_reco_track_dirx.clear(); + m_reco_track_diry.clear(); + m_reco_track_dirz.clear(); + m_reco_track_startx.clear(); + m_reco_track_starty.clear(); + m_reco_track_startz.clear(); + m_reco_track_endx.clear(); + m_reco_track_endy.clear(); + m_reco_track_endz.clear(); + m_reco_track_end_dist_to_active_TPC.clear(); + m_reco_track_start_dist_to_active_TPC.clear(); + m_reco_track_end_dist_to_SCB.clear(); + m_reco_track_start_dist_to_SCB.clear(); + m_reco_track_end_in_SCB.clear(); + m_reco_track_start_in_SCB.clear(); + + m_reco_track_theta_yz.clear(); + m_reco_track_phi_yx.clear(); + + m_reco_track_calo_energy_plane0.clear(); + m_reco_track_calo_energy_plane1.clear(); + m_reco_track_calo_energy_plane2.clear(); + m_reco_track_calo_energy_max.clear(); + + m_reco_track_num_trajpoints.clear(); + m_reco_track_num_spacepoints.clear(); + m_reco_track_proton_kinetic_energy.clear(); + m_reco_track_ordered_energy_index.clear(); + m_reco_track_ordered_displacement_index.clear(); + + m_reco_track_spacepoint_principal0.clear(); + m_reco_track_spacepoint_principal1.clear(); + m_reco_track_spacepoint_principal2.clear(); + + m_reco_track_spacepoint_chi.clear(); + m_reco_track_spacepoint_max_dist.clear(); + + m_reco_track_best_calo_plane.clear(); + + m_reco_track_mean_dEdx_best_plane.clear(); + m_reco_track_mean_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_dEdx_end_half_best_plane.clear(); + m_reco_track_good_calo_best_plane.clear(); + m_reco_track_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + m_reco_track_trunc_PIDA_best_plane.clear(); + m_reco_track_resrange_best_plane.clear(); + m_reco_track_dEdx_best_plane.clear(); + + + m_reco_track_mean_dEdx_p0.clear(); + m_reco_track_mean_dEdx_start_half_p0.clear(); + m_reco_track_mean_dEdx_end_half_p0.clear(); + m_reco_track_good_calo_p0.clear(); + m_reco_track_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + m_reco_track_trunc_PIDA_p0.clear(); + m_reco_track_resrange_p0.clear(); + m_reco_track_dEdx_p0.clear(); + + m_reco_track_mean_dEdx_p1.clear(); + m_reco_track_mean_dEdx_start_half_p1.clear(); + m_reco_track_mean_dEdx_end_half_p1.clear(); + m_reco_track_good_calo_p1.clear(); + m_reco_track_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + m_reco_track_trunc_PIDA_p1.clear(); + m_reco_track_resrange_p1.clear(); + m_reco_track_dEdx_p1.clear(); + + m_reco_track_mean_dEdx_p2.clear(); + m_reco_track_mean_dEdx_start_half_p2.clear(); + m_reco_track_mean_dEdx_end_half_p2.clear(); + m_reco_track_good_calo_p2.clear(); + m_reco_track_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + m_reco_track_trunc_PIDA_p2.clear(); + m_reco_track_resrange_p2.clear(); + m_reco_track_dEdx_p2.clear(); + + m_reco_track_num_calo_hits_p1.clear(); + m_reco_track_num_calo_hits_p0.clear(); + m_reco_track_num_calo_hits_p2.clear(); + + m_sim_track_matched.clear(); + m_sim_track_overlay_fraction.clear(); + m_sim_track_energy.clear(); + m_sim_track_kinetic_energy.clear(); + m_sim_track_mass.clear(); + m_sim_track_pdg.clear(); + m_sim_track_origin.clear(); + m_sim_track_parent_pdg.clear(); + m_sim_track_process.clear(); + m_sim_track_startx.clear(); + m_sim_track_starty.clear(); + m_sim_track_startz.clear(); + m_sim_track_endx.clear(); + m_sim_track_endy.clear(); + m_sim_track_endz.clear(); + m_sim_track_length.clear(); + + m_sim_track_px.clear(); + m_sim_track_py.clear(); + m_sim_track_pz.clear(); + m_sim_track_trackID.clear(); + + // PID + m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + m_reco_track_pid_chi2_mu_plane0.clear(); + m_reco_track_pid_chi2_mu_plane1.clear(); + m_reco_track_pid_chi2_mu_plane2.clear(); + m_reco_track_pid_chi2_p_plane0.clear(); + m_reco_track_pid_chi2_p_plane1.clear(); + m_reco_track_pid_chi2_p_plane2.clear(); + m_reco_track_pid_pida_plane0.clear(); + m_reco_track_pid_pida_plane1.clear(); + m_reco_track_pid_pida_plane2.clear(); + m_reco_track_pid_three_plane_proton_pid.clear(); + + m_reco_track_end_to_nearest_dead_wire_plane0.clear(); + m_reco_track_end_to_nearest_dead_wire_plane1.clear(); + m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + m_reco_track_sliceId.clear(); + m_reco_track_nuscore.clear(); + m_reco_track_isclearcosmic.clear(); + m_reco_track_trackscore.clear(); + m_reco_track_pfparticle_pdg.clear(); + m_reco_track_is_nuslice.clear(); + + + + m_sim_track_sliceId.clear(); + m_sim_track_nuscore.clear(); + m_sim_track_isclearcosmic.clear(); + + + } + + void SinglePhoton::ResizeTracks(size_t size){ + m_reco_track_length.resize(size); + m_reco_track_dirx.resize(size); + m_reco_track_num_daughters.resize(size); + m_reco_track_daughter_trackscore.resize(size); + + m_reco_track_diry.resize(size); + m_reco_track_dirz.resize(size); + m_reco_track_endx.resize(size); + m_reco_track_endy.resize(size); + m_reco_track_endz.resize(size); + m_reco_track_end_dist_to_active_TPC.resize(size); + m_reco_track_start_dist_to_active_TPC.resize(size); + m_reco_track_end_dist_to_SCB.resize(size); + m_reco_track_start_dist_to_SCB.resize(size); + m_reco_track_end_in_SCB.resize(size); + m_reco_track_start_in_SCB.resize(size); + + m_reco_track_calo_energy_plane0.resize(size); + m_reco_track_calo_energy_plane1.resize(size); + m_reco_track_calo_energy_plane2.resize(size); + m_reco_track_calo_energy_max.resize(size); + + + + m_reco_track_startx.resize(size); + m_reco_track_starty.resize(size); + m_reco_track_startz.resize(size); + m_reco_track_num_trajpoints.resize(size); + m_reco_track_num_spacepoints.resize(size); + m_reco_track_proton_kinetic_energy.resize(size); + m_reco_track_ordered_energy_index.resize(size); + m_reco_track_ordered_displacement_index.resize(size); + + + m_reco_track_spacepoint_principal0.resize(size); + m_reco_track_spacepoint_principal1.resize(size); + m_reco_track_spacepoint_principal2.resize(size); + + m_reco_track_spacepoint_chi.resize(size); + m_reco_track_spacepoint_max_dist.resize(size); + + m_reco_track_theta_yz.resize(size); + m_reco_track_phi_yx.resize(size); + + m_reco_track_best_calo_plane.resize(size); + + m_reco_track_mean_dEdx_best_plane.resize(size); + m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + m_reco_track_good_calo_best_plane.resize(size); + m_reco_track_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + m_reco_track_trunc_PIDA_best_plane.resize(size); + m_reco_track_resrange_best_plane.resize(size); + m_reco_track_dEdx_best_plane.resize(size); + + + m_reco_track_mean_dEdx_p0.resize(size); + m_reco_track_mean_dEdx_start_half_p0.resize(size); + m_reco_track_mean_dEdx_end_half_p0.resize(size); + m_reco_track_good_calo_p0.resize(size); + m_reco_track_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + m_reco_track_trunc_PIDA_p0.resize(size); + m_reco_track_resrange_p0.resize(size); + m_reco_track_dEdx_p0.resize(size); + + m_reco_track_mean_dEdx_p1.resize(size); + m_reco_track_mean_dEdx_start_half_p1.resize(size); + m_reco_track_mean_dEdx_end_half_p1.resize(size); + m_reco_track_good_calo_p1.resize(size); + m_reco_track_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + m_reco_track_trunc_PIDA_p1.resize(size); + m_reco_track_resrange_p1.resize(size); + m_reco_track_dEdx_p1.resize(size); + + m_reco_track_mean_dEdx_p2.resize(size); + m_reco_track_mean_dEdx_start_half_p2.resize(size); + m_reco_track_mean_dEdx_end_half_p2.resize(size); + m_reco_track_good_calo_p2.resize(size); + m_reco_track_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + m_reco_track_trunc_PIDA_p2.resize(size); + m_reco_track_resrange_p2.resize(size); + m_reco_track_dEdx_p2.resize(size); + + m_reco_track_num_calo_hits_p1.resize(size); + m_reco_track_num_calo_hits_p0.resize(size); + m_reco_track_num_calo_hits_p2.resize(size); + + + + m_sim_track_matched.resize(size); + m_sim_track_energy.resize(size); + m_sim_track_mass.resize(size); + m_sim_track_kinetic_energy.resize(size); + m_sim_track_pdg.resize(size); + m_sim_track_parent_pdg.resize(size); + m_sim_track_origin.resize(size); + m_sim_track_process.resize(size); + m_sim_track_startx.resize(size); + m_sim_track_starty.resize(size); + m_sim_track_startz.resize(size); + m_sim_track_endx.resize(size); + m_sim_track_endy.resize(size); + m_sim_track_endz.resize(size); + m_sim_track_length.resize(size); + + m_sim_track_px.resize(size); + m_sim_track_py.resize(size); + m_sim_track_pz.resize(size); + m_sim_track_trackID.resize(size); + m_sim_track_overlay_fraction.resize(size); + + m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + m_reco_track_pid_chi2_mu_plane0.resize(size); + m_reco_track_pid_chi2_mu_plane1.resize(size); + m_reco_track_pid_chi2_mu_plane2.resize(size); + m_reco_track_pid_chi2_p_plane0.resize(size); + m_reco_track_pid_chi2_p_plane1.resize(size); + m_reco_track_pid_chi2_p_plane2.resize(size); + m_reco_track_pid_pida_plane0.resize(size); + m_reco_track_pid_pida_plane1.resize(size); + m_reco_track_pid_pida_plane2.resize(size); + m_reco_track_pid_three_plane_proton_pid.resize(size); + + m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + m_reco_track_sliceId.resize(size); + m_reco_track_nuscore.resize(size); + m_reco_track_isclearcosmic.resize(size); + m_reco_track_trackscore.resize(size); + m_reco_track_pfparticle_pdg.resize(size); + m_reco_track_is_nuslice.resize(size); + + m_sim_track_sliceId.resize(size); + m_sim_track_nuscore.resize(size); + m_sim_track_isclearcosmic.resize(size); + } + + void SinglePhoton::CreateTrackBranches(){ + vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); + vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); + vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); + vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); + vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); + + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); + vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); + vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); + vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + vertex_tree->Branch("sim_track_px",&m_sim_track_px); + vertex_tree->Branch("sim_track_py",&m_sim_track_py); + vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); + vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); + vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); + vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); + vertex_tree->Branch("sim_track_length",&m_sim_track_length); + + vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + + + } + + + + + + + void SinglePhoton::AnalyzeTracks(const std::vector>& tracks, + std::map, art::Ptr> & trackToNuPFParticleMap, + std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap, + std::map,bool> &PFPToClearCosmicMap, + std::map, int> &PFPToSliceIdMap, + std::map,double> &PFPToTrackScoreMap, + std::map,bool> &PFPToNuSliceMap, + PFParticleIdMap &pfParticleMap){ + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); + + //const double adc2eU(5.1e-3); + //const double adc2eV(5.2e-3); + // const double adc2eW(5.4e-3); + + + // const double tau(theDetector->ElectronLifetime()); + + + //loop over each recob::Track + for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) + { + + const art::Ptr track = *iter; + const art::Ptr pfp = trackToNuPFParticleMap[track]; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; + const std::vector> trk_hits = pfParticleToHitsMap[pfp]; + + int m_trkid = track->ID(); + double m_length = track->Length(); + auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector + //first: direction of first point, second: direction of the end of track + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); + m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); + m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); + m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); + + m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); + + + m_reco_track_startx[i_trk]= track->Start().X(); + m_reco_track_starty[i_trk]= track->Start().Y(); + m_reco_track_startz[i_trk]= track->Start().Z(); + + m_reco_track_length[i_trk] =m_length; + m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); + m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); + m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + + m_reco_track_endx[i_trk] = track->End().X(); + m_reco_track_endy[i_trk]= track->End().Y(); + m_reco_track_endz[i_trk]= track->End().Z(); + + std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + + m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); + m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + + m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); + m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + + + m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); + m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + + std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + double max_dist_from_line = -9999999; + + m_reco_track_spacepoint_chi[i_trk] = 0.0; + //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; + principal->AddRow(&tmp_spacepoints[0]); + + // distance between track direction and spacepoint + double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); + if(dist> max_dist_from_line) max_dist_from_line = dist; + m_reco_track_spacepoint_chi[i_trk] += dist*dist; + } + m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + + principal->MakePrincipals(); + TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); + + m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + + delete principal; + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<Self()<<" is: "<NumDaughters(); + if(m_reco_track_num_daughters[i_trk]>0){ + //currently just look at 1 daughter + m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + } + + + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); + } else{ + m_reco_track_trackscore[i_trk] = -999; + m_reco_track_pfparticle_pdg[i_trk] = -999; + } + + //A loop over the trajectory points + size_t const traj_size = track->CountValidPoints(); + m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + + for(unsigned int p = 0; p < traj_size; ++p) { + //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); + //recob::Track::Point_t const & pos = trajp.position; + //recob::Track::Vector_t const & mom = trajp.momentum; + + } + + + i_trk++; + + } // end of recob::Track loop + + //Lets sort and order the showers + m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); + m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, + std::map, art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::vector & vfrac + ){ + + + //if(m_is_verbose) + std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; + m_sim_track_matched[i_trk] = 0; + + if(trackToMCParticleMap.count(track)>0){ + + const art::Ptr mcparticle = trackToMCParticleMap[track]; + std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; + const art::Ptr pfp = trackToPFParticleMap[track]; + + std::vector correctedstart(3); + std::vector correctedend(3); + std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; + // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); + this->spacecharge_correction(mcparticle, correctedend, raw_End); + + //std::cout<<"the corrected end of this mcparticle is "<E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = correctedstart[0]; + m_sim_track_starty[i_trk] = correctedstart[1]; + m_sim_track_startz[i_trk] = correctedstart[2]; + + m_sim_track_endx[i_trk]= correctedend[0]; + m_sim_track_endy[i_trk]= correctedend[1]; + m_sim_track_endz[i_trk]= correctedend[2]; + + m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + + m_sim_track_px[i_trk]= mcparticle->Px(); + m_sim_track_py[i_trk]= mcparticle->Py(); + m_sim_track_pz[i_trk]= mcparticle->Pz(); + + + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + + m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; + + + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + + + } + i_trk++; + } + + return; + } + + + + + + void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::map,std::vector> > &trackToCaloMap) + { + + if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; + + if(trackToCaloMap[track].size()!=3){ + std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; + const art::Ptr calo_p1 = trackToCaloMap[track][1]; + const art::Ptr calo_p2 = trackToCaloMap[track][2]; + + + size_t calo_length_p0 = calo_p0->dEdx().size(); + size_t calo_length_p1 = calo_p1->dEdx().size(); + size_t calo_length_p2 = calo_p2->dEdx().size(); + + TruncMean tm_p0; + TruncMean tm_p1; + TruncMean tm_p2; + + std::vector trunc_dEdx_p0; + std::vector res_range_good_p0; + std::vector dEdx_good_p0; + + std::vector trunc_dEdx_p1; + std::vector res_range_good_p1; + std::vector dEdx_good_p1; + + std::vector trunc_dEdx_p2; + std::vector res_range_good_p2; + std::vector dEdx_good_p2; + + m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + + m_reco_track_best_calo_plane[i_trk]=-1; + + // guanqun: vectors have been clear and resized, so probably not need to reset their values? + m_reco_track_good_calo_p0[i_trk] = 0; + m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + m_reco_track_good_calo_p1[i_trk] = 0; + m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + m_reco_track_good_calo_p2[i_trk] = 0; + m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + + + + //First off look over ALL points + //--------------------------------- plane 0 ----------- Induction + for (size_t k = 0; k < calo_length_p0; ++k) { + double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track + double dEdx = calo_p0->dEdx()[k]; + + m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + if(k <= calo_length_p0/2){ + m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; // != has higher precedence than = + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ + res_range_good_p0.push_back(res_range); + dEdx_good_p0.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p0.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p0.setRadius(rad); + tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ + double dEdx = trunc_dEdx_p0[k]; + m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + if(k <= trunc_dEdx_p0.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p1->dEdx()[k]; + + m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + if(k <= calo_length_p1/2){ + m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ + res_range_good_p1.push_back(res_range); + dEdx_good_p1.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p1.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p1.setRadius(rad); + tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ + double dEdx = trunc_dEdx_p1[k]; + m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + if(k <= trunc_dEdx_p1.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p2->dEdx()[k]; + + m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + if(k <= calo_length_p2/2){ + m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ + res_range_good_p2.push_back(res_range); + dEdx_good_p2.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p2.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p2.setRadius(rad); + tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ + double dEdx = trunc_dEdx_p2[k]; + m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + if(k <= trunc_dEdx_p2.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ + m_reco_track_best_calo_plane[i_trk] = 0; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; + + + }else if(m_reco_track_good_calo_p1[i_trk]!=0){ + m_reco_track_best_calo_plane[i_trk] = 1; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + + + + }else{ + m_reco_track_best_calo_plane[i_trk] = -1; + } + + + } + } + + + + void SinglePhoton::CollectPID( std::vector> & tracks, + std::map< art::Ptr, art::Ptr> & trackToPIDMap){ + + for(size_t i_trk=0; i_trk track = tracks[i_trk]; + art::Ptr pid = trackToPIDMap[track]; + if (!pid) { + std::cout << "[analyze_Tracks] bad PID object" << std::endl; + continue; + } + + // For each PID object, create vector of PID scores for each algorithm + // Loop over this and get scores for algorithm of choice + // But first, prepare garbage values, just in case + std::vector AlgScoresVec = pid->ParticleIDAlgScores(); + double pidScore_BL_mu_plane0 = -999; + double pidScore_BL_mu_plane1 = -999; + double pidScore_BL_mu_plane2 = -999; + double pidScore_BL_p_plane0 = -999; + double pidScore_BL_p_plane1 = -999; + double pidScore_BL_p_plane2 = -999; + double pidScore_BL_mip_plane0 = -999; + double pidScore_BL_mip_plane1 = -999; + double pidScore_BL_mip_plane2 = -999; + double pidScore_PIDA_plane0 = -999; + double pidScore_PIDA_plane1 = -999; + double pidScore_PIDA_plane2 = -999; + double pidScore_chi2_mu_plane0 = -999; + double pidScore_chi2_mu_plane1 = -999; + double pidScore_chi2_mu_plane2 = -999; + double pidScore_chi2_p_plane0 = -999; + double pidScore_chi2_p_plane1 = -999; + double pidScore_chi2_p_plane2 = -999; + double pidScore_three_plane_proton = -999; + + //int planeid = 2; + for (size_t i_algscore=0; i_algscore&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + + return sqrt(d2); + + } + + + // minimum distance between point and dead wire + double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9 ){ + + double min_dist = 999999; + + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int channel = bad_channel_list_fixed_mcc9[i].first; + int is_ok = bad_channel_list_fixed_mcc9[i].second; + if(is_ok>1)continue; + + auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel + auto result = geom->WireEndPoints(wireids[0]); + + //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + std::vector end = {0.0,result.end().Y(),result.end().Z()}; + std::vector point = {0.0,Ypoint,Zpoint}; + double dist = dist_line_point(start,end,point); + min_dist = std::min(dist,min_dist); + } + + return min_dist; + + } + + + //Typenamed for recob::Track and recob::Shower + //Guanqun: this function didn't do anything? + template + int badChannelMatching(std::vector& badchannels, + std::vector& objects, + std::map< T, art::Ptr > & objectToPFParticleMap, + std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9){ + + + + + for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; + const std::vector> hits = pfParticleToHitsMap[pfp]; + + int min_dist_from_bad_channel = 99999; + + for(size_t h=0; h hit = hits[h]; + + + //int nch = (int)badchannels.size()/3; + //for(int i=0; i1)continue; + int dist =hit->Channel()-bc; + auto hs = geom->ChannelToWire(bc); + //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); + std::vector end(3); + auto result = geom->WireEndPoints(hs[0]); + + // std::cout<<"KNK: "< & vec){ + return isInTPCActive(0.0,vec); + } + + /* determine if point vec is inside TPC active volume, returns 1 - in TPC active, 0 - out of TPC active */ + int SinglePhoton::isInTPCActive(double cut,std::vector & vec){ + bool is_x = (vec[0] > m_tpc_active_x_low+cut && vec[0]< m_tpc_active_x_high-cut ); + bool is_y = (vec[1] > m_tpc_active_y_low+cut && vec[1]< m_tpc_active_y_high-cut); + bool is_z = (vec[2] > m_tpc_active_z_low+cut && vec[2]&vec){ + if(isInTPCActive(vec)==0) return -999; + double min_x = std::min( fabs(vec[0] - m_tpc_active_x_low) , fabs(vec[0] - m_tpc_active_x_high)); + double min_y = std::min( fabs(vec[1] - m_tpc_active_y_low) , fabs(vec[1] - m_tpc_active_y_high)); + double min_z = std::min( fabs(vec[2] - m_tpc_active_z_low) , fabs(vec[2] - m_tpc_active_z_high)); + + return ( (min_x& zpolygons){ + //TGeoManager *geom = new TGeoManager("save scb", "save scb"); + //cout << "size of " << zpolygons.size() << endl; + + //DEPRECIATED SHOULD NOT BE USED!!! + std::cout<<"ERROR ERROR ERROR DEPRECIATED DEPRECIATED. "<SetXY(ptX,ptY); + polyXY->FinishPolygon(); + zpolygons.push_back(polyXY); // Guanqun: not sure pushing pack pointers works as expect?? + } + + //cout << "size of " < & vec){ + return isInSCB(0.0,vec); + } + + int SinglePhoton::distToSCB(double & dist, std::vector &vec){ + //this one returns the distance to the boundary + bool ans = false; + double dist_yx = 999999; + + int iseg = 0; + if (!isInTPCActive(vec)){ + dist=-1; + return 0; // is it in active volume? + } + double cut = 0.0; + + TVector3 pt(&vec[0]); + + Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes + + Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); + polyXY->FinishPolygon(); + double testpt[2] = {pt.X(), pt.Y()}; + + //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; + + //polyXY->Draw(); + + Bool_t XY_contain = polyXY->Contains(testpt); + dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. + + if(0-116.5) y_idx = 0; //just the 0.5cm + if(y_idx<0 || y_idx>9) { + dist = -1; + delete polyXY; + return 0; + } + + Bool_t ZX_contain = false; + double arbit_out = 55555; + + double d_dist = -1; + + //upstream + if(z_idx==0){ + double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; + double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; + + TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); + polyXZ_Up->SetXY(ptX_Up,ptZ_Up); + polyXZ_Up->FinishPolygon(); + + double testpt_Up[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Up->Contains(testpt_Up); + d_dist = polyXZ_Up->Safety(testpt_Up,iseg); + delete polyXZ_Up; + + } + if (z_idx==10){ + double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; + double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; + + ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; + ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; + + TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); + polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); + polyXZ_Dw->FinishPolygon(); + + double testpt_Dw[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Dw->Contains(testpt_Dw); + d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); + delete polyXZ_Dw; + } + + delete polyXY; + + ans = XY_contain && ZX_contain; + ans ? dist = std::min(d_dist,min_y) : dist=-1; + + return (ans ? 1 : 0); + } + + + int SinglePhoton::isInSCB(double cut, std::vector &vec){ + + if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? + TVector3 pt(&vec[0]); + + Int_t z_idx = (Int_t)pt.Z()/100; + + Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); + polyXY->FinishPolygon(); + double testpt[2] = {pt.X(), pt.Y()}; + + //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; + + //polyXY->Draw(); + + Bool_t XY_contain = polyXY->Contains(testpt); + + if(0-116.5) y_idx = 0; //just the 0.5cm + + if(y_idx<0 || y_idx>9) { + delete polyXY; + return 0; + } + + Bool_t ZX_contain = false; + + if(z_idx==0){ + double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; + double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; + + TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); + polyXZ_Up->SetXY(ptX_Up,ptZ_Up); + polyXZ_Up->FinishPolygon(); + + double testpt_Up[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Up->Contains(testpt_Up); + delete polyXZ_Up; + } + + else if (z_idx==10){ + double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; + double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; + + ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; + ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; + + TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); + polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); + polyXZ_Dw->FinishPolygon(); + + double testpt_Dw[2] = {pt.X(), pt.Z()}; + ZX_contain = polyXZ_Dw->Contains(testpt_Dw); + delete polyXZ_Dw; + } + + delete polyXY; + return (XY_contain && ZX_contain); + + } + +} diff --git a/sbncode/SinglePhotonAnalysis/ref/isolation.h b/sbncode/SinglePhotonAnalysis/ref/isolation.h new file mode 100644 index 000000000..160b8db28 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/isolation.h @@ -0,0 +1,662 @@ +#include "SinglePhoton_module.h" +#include "TCanvas.h" +#include "TGraph.h" +#include "TFile.h" +#include "TAxis.h" +#include "TLine.h" +#include "TLatex.h" +#include "TLegend.h" +#include "TPrincipal.h" +#include "TVectorD.h" +#include "TMatrixD.h" +#include "TF1.h" +#include "TEllipse.h" + +#include "TH1.h" + +// override function of sorts for max_element function comparison +bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second < p2.second); +} + +// override function of sorts for min_element function comparison +bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second > p2.second); +} + +namespace single_photon{ + +void SinglePhoton::ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); +} + +void SinglePhoton::CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + +} + + +/* Arguments to Function IsolationStudy (all are const): + * 1. vector named tracks of art ptr to recob track + * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle + * 3. vector named showers of art ptr to recob showers + * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle + * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit + * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int + * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit +*/ +void SinglePhoton::IsolationStudy( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) +{ + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector< art::Ptr > associated_hits; + std::vector< art::Ptr > unassociated_hits; + std::vector< art::Ptr > unassociated_hits_plane0; + std::vector< art::Ptr > unassociated_hits_plane1; + std::vector< art::Ptr > unassociated_hits_plane2; + + std::vector< std::map >> > v_newClusterToHitsMap(3); + +// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + std::vector> slicehits = sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = pfParticleToHitsMap.at(pfp); + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id != -999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + + int sliceid = pfParticleToSliceIDMap.at(pfp); + + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + if(nu_slice_id != sliceid && nu_slice_id!=-999){ + std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ + std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); + + TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); + TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); + TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); + std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; + + +std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; +// saving wire and time coordinates + std::vector> pts_trk( tracks.size(), std::vector(3) ); + + art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); // peak time of track hits on 3 planes. + std::vector> t_vec_c(3); // wire number of track hits on 3 planes. + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + +std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; +std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; +std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + +std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance (in sh_dist) on each plane + std::vector< std::pair, double > > max_min_hit(3); + + art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + auto showerhits = pfParticleToHitsMap.at(pfp_s); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; //minimum distance between this shower hit and all track hits + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + + +//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower +std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; + + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); + + for(int plane = 0; plane < 3; plane++){ + minDist_tot[plane] = 999; + std::vector vec_t; + std::vector vec_c; + + for(auto &uh: unassociated_hits_all[plane]){ + + if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane + + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); + + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); + + if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } + + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; + + } // end looping unassociated_hits_all + + g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + } // end looping planes + + // place data into appropriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + } + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + } + + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + +/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ +/* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); +*/ + + delete histcan; + + +//PLOTTING NOW +//SET-UP + double plot_point_size = 0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + } + +// ******************************** DeadWireRegions ******************************************** + //plot dead wire + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + // std::cout<<"WIRE "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + l->SetLineColor(kGray+1); + l->Draw("same"); + } + } + + // plot track + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + // plot shower hits + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + // plot unassociated hits + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } + + + + +//******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + +// PLOTTING SHOWER? + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + +// PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"< Nieves CCQE default, 1 --> RPA off + NormCCMEC: 0.52 # GENIE knob setting, gives scaling factor of 1.26 + XSecShape_CCMEC: 0.22 # 0 --> Nieves CCMEC default, 1 --> GENIE empirical + } + + # Load calculator configurations + @table::microboone_eventweight_flux + @table::microboone_eventweight_genie + @table::microboone_eventweight_xs + @table::microboone_eventweight_reint + @table::microboone_eventweight_spline +} + +# All available weight functions +microboone_eventweight.weight_functions: [ + @sequence::microboone_eventweight.weight_functions_flux, + @sequence::microboone_eventweight.weight_functions_genie, + @sequence::microboone_eventweight.weight_functions_xs, + @sequence::microboone_eventweight.weight_functions_reint, + @sequence::microboone_eventweight.weight_functions_spline +] + +#event weighting for LEE +microboone_eventweight_LEE: { + module_type: "EventWeight" + + min_weight: -0.001 + max_weight: 100 + + genie_module_label: "generator" + @table::microboone_eventweight_eLEE + +} + +#just the eLEE weight function +microboone_eventweight_LEE.weight_functions: [ eLEE_Combined_Oct2018 ] + +#event weighting for switching between splines +microboone_eventweight_justSplines: { + module_type: "EventWeight" + + min_weight: 0.0 + max_weight: 100 + + genie_module_label: "generator" + @table::microboone_eventweight_spline +} + +#just the spline weight function +microboone_eventweight_justSplines.weight_functions: [ splines_general ] + +#event weighting for reinteraction +microboone_eventweight_justreint: { + module_type: "EventWeight" + + min_weight: 0.0 + max_weight: 100 + @table::microboone_eventweight_reint +} + +#just the reinteraction weight function +microboone_eventweight_justreint.weight_functions: [ reinteractions_piplus, reinteractions_piminus, reinteractions_proton ] + +END_PROLOG diff --git a/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl b/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl new file mode 100644 index 000000000..18065b731 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl @@ -0,0 +1,649 @@ +# Reweightable GENIE cross section model uncertainties +# Revised 18 March 2020 +# See supporting note (docDB #27018) for details +# +# Maintainer: Steven Gardiner +# Modified for gLEE to add some singleknobs (Mark Ross-Lonergan) +microboone_eventweight_genie: { + + weight_functions_genie: [ + RPA_CCQE, XSecShape_CCMEC, AxFFCCQEshape, + VecFFCCQEshape, DecayAngMEC, Theta_Delta2Npi, + ThetaDelta2NRad, RPA_CCQE_Reduced, NormCCCOH, + NormNCCOH, TunedCentralValue, All, RootinoFix, #end offical + MaCCQE, MaNCEL, EtaNCEL, NormNCMEC, FracPN_CCMEC, + FracDelta_CCMEC, MaCCRES, MvCCRES, MaNCRES, MvNCRES, + NonRESBGvpCC1pi, NonRESBGvpCC2pi, NonRESBGvpNC1pi, NonRESBGvpNC2pi, + NonRESBGvnCC1pi, NonRESBGvnCC2pi, NonRESBGvnNC1pi, NonRESBGvnNC2pi, + NonRESBGvbarpCC1pi, NonRESBGvbarpCC2pi, NonRESBGvbarpNC1pi, NonRESBGvbarpNC2pi, + NonRESBGvbarnCC1pi, NonRESBGvbarnCC2pi, NonRESBGvbarnNC1pi, + NonRESBGvbarnNC2pi, AhtBY, BhtBY, CV1uBY, CV2uBY, AGKYxF1pi, AGKYpT1pi, + MFP_pi, MFP_N, FrCEx_pi, FrInel_pi, FrAbs_pi, FrCEx_N, FrInel_N, FrAbs_N, + RDecBR1gamma, RDecBR1eta, FrPiProd_pi, FrPiProd_N, + CoulombCCQE + ] + + + # INDIVIDUAL WEIGHT CALCULATORS + # Thse use "minmax" mode and represent a variation between two extremes. The + # recommended uncertainty is the full spread between them. + RPA_CCQE: { + type: UBGenie + random_seed: 2 + parameter_list: [ "RPA_CCQE" ] + parameter_sigma: [ 0.4 ] + parameter_min: [ 0.0 ] + parameter_max: [ 0.8 ] + mode: minmax + number_of_multisims: 2 + } + + XSecShape_CCMEC: { + type: UBGenie + random_seed: 4 + parameter_list: [ "XSecShape_CCMEC" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + AxFFCCQEshape: { + type: UBGenie + random_seed: 5 + parameter_list: [ "AxFFCCQEshape" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + VecFFCCQEshape: { + type: UBGenie + random_seed: 6 + parameter_list: [ "VecFFCCQEshape" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + DecayAngMEC: { + type: UBGenie + random_seed: 7 + parameter_list: [ "DecayAngMEC" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + Theta_Delta2Npi: { + type: UBGenie + random_seed: 53 + parameter_list: [ "Theta_Delta2Npi" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + # New angular distribution variation for radiative Delta decays + ThetaDelta2NRad: { + type: UBGenie + random_seed: 54 + parameter_list: [ "ThetaDelta2Rad" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] + parameter_max: [ 1.0 ] + mode: minmax + number_of_multisims: 2 + } + + # 60% of the previous RPA uncertainty (see RPA_CCQE) + RPA_CCQE_Reduced: { + type: UBGenie + random_seed: 55 + parameter_list: [ "RPA_CCQE" ] + parameter_sigma: [ 0.24 ] + parameter_min: [ 0.16 ] + parameter_max: [ 0.64 ] + mode: minmax + number_of_multisims: 2 + } + + # Unisim variation of CC COH normalization (still finalizing approach) + NormCCCOH: { + type: UBGenie + random_seed: 56 + parameter_list: [ "NormCCCOH" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] # MCC9 nominal (Berger-Sehgal) + parameter_max: [ 1.0 ] # +100% normalization + mode: minmax + number_of_multisims: 2 + } + + # Unisim variation of NC COH normalization (still finalizing approach) + NormNCCOH: { + type: UBGenie + random_seed: 57 + parameter_list: [ "NormNCCOH" ] + parameter_sigma: [ 1 ] + parameter_min: [ 0.0 ] # MCC9 nominal (Berger-Sehgal) + parameter_max: [ 1.0 ] # +100% normalization + mode: minmax + number_of_multisims: 2 + } + + # Single function that applies all weights needed to obtain + # a new tuned central value + # NOTE: For samples generated with GENIE v3.0.4 splines, the + # spline weight to convert v3.0.4 --> v3.0.4a cross sections + # still needs to be applied as well. + TunedCentralValue: { + type: UBGenie + random_seed: 99 + parameter_list: [ "MaCCQE", "RPA_CCQE", "NormCCMEC", "XSecShape_CCMEC" ] + # Dummy sigmas (central values are specified in EventWeight module configuration + # to ensure consistency across all weight calculators) + parameter_sigma: [ 1, 1, 1, 1 ] + mode: central_value + number_of_multisims: 1 + } + + # ALL OTHER RECOMMENDED SYSTEMATIC VARIATIONS THROWN TOGETHER + All: { + type: UBGenie + random_seed: 100 + + parameter_list: [ + + # QE + "MaCCQE", "CoulombCCQE", "MaNCEL", "EtaNCEL", + + # MEC + "NormCCMEC", "NormNCMEC", "FracPN_CCMEC", "FracDelta_CCMEC", + + # RES + "MaCCRES", "MvCCRES", "MaNCRES", "MvNCRES", + + # Non-resonant background + "NonRESBGvpCC1pi", "NonRESBGvpCC2pi", "NonRESBGvpNC1pi", "NonRESBGvpNC2pi", + "NonRESBGvnCC1pi", "NonRESBGvnCC2pi", "NonRESBGvnNC1pi", "NonRESBGvnNC2pi", + "NonRESBGvbarpCC1pi", "NonRESBGvbarpCC2pi", "NonRESBGvbarpNC1pi", + "NonRESBGvbarpNC2pi", "NonRESBGvbarnCC1pi", "NonRESBGvbarnCC2pi", "NonRESBGvbarnNC1pi", + "NonRESBGvbarnNC2pi", "AhtBY", "BhtBY", "CV1uBY", "CV2uBY", + + # Hadronization + "AGKYxF1pi", "AGKYpT1pi", + + # FSI + "MFP_pi", "MFP_N", "FrCEx_pi", "FrInel_pi", "FrAbs_pi", + "FrCEx_N", "FrInel_N", "FrAbs_N", + + # eta, remove BR1gamma + "RDecBR1eta" + ] + parameter_sigma: [ + 4.16128, # MaCCQE uses +/-0.12 GeV about the tuned central value + 1.5, # CoulombCCQE uses +/- 30% + 1, 1, + 1.4, # NormCCMEC uses +/-70% + 2.0, # NormNCMEC uses +/-100% + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + ] + mode: multisim + number_of_multisims: 1000 + } + + # Special weight that zeros out events that suffer from the "RES ROOTino" bug + # See, e.g., docDB #27564 + RootinoFix: { + type: UBGenie + random_seed: 101 + parameter_list: [ "RESRootino" ] + # Dummy sigma provided here to keep the framework happy. + # The knob value associated with this calculator is not + # actually used. All affected events are assigned a weight of + # zero. All other events are assigned a weight of one. + parameter_sigma: [ 1 ] + mode: multisim + number_of_multisims: 1 + } + + + + + #-------------------- Below here individual Knobs ---------------------------------# + MaCCQE: { + type: UBGenie + random_seed: 1001 + parameter_list: [ "MaCCQE" ] + + # MaCCQE uses +/-0.12 GeV about the tuned central value + parameter_sigma: [ 4.16128 ] + mode: pm1sigma + number_of_multisims: 2 + } + + + NormCCMEC: { + type: UBGenie + random_seed: 1002 + parameter_list: [ "NormCCMEC" ] + + parameter_sigma: [ 1.4 ] # +/- 70% + mode: pm1sigma + number_of_multisims: 2 + } + + + MaNCEL: { + type: UBGenie + random_seed: 1003 + parameter_list: [ "MaNCEL" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + EtaNCEL: { + type: UBGenie + random_seed: 1004 + parameter_list: [ "EtaNCEL" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NormNCMEC: { + type: UBGenie + random_seed: 1005 + parameter_list: [ "NormNCMEC" ] + parameter_sigma: [ 2 ] # +/-100% + mode: pm1sigma + number_of_multisims: 2 + } + + FracPN_CCMEC: { + type: UBGenie + random_seed: 1006 + parameter_list: [ "FracPN_CCMEC" ] + parameter_sigma: [ 1 ] # +/-20% + mode: pm1sigma + number_of_multisims: 2 + } + + FracDelta_CCMEC: { + type: UBGenie + random_seed: 1007 + parameter_list: [ "FracDelta_CCMEC" ] + parameter_sigma: [ 1.5 ] # +/-30% + mode: pm1sigma + number_of_multisims: 2 + } + + MaCCRES: { + type: UBGenie + random_seed: 1008 + parameter_list: [ "MaCCRES" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + MvCCRES: { + type: UBGenie + random_seed: 1009 + parameter_list: [ "MvCCRES" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + MaNCRES: { + type: UBGenie + random_seed: 1010 + parameter_list: [ "MaNCRES" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + MvNCRES: { + type: UBGenie + random_seed: 1011 + parameter_list: [ "MvNCRES" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvpCC1pi: { + type: UBGenie + random_seed: 1012 + parameter_list: [ "NonRESBGvpCC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvpCC2pi: { + type: UBGenie + random_seed: 1013 + parameter_list: [ "NonRESBGvpCC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvpNC1pi: { + type: UBGenie + random_seed: 1014 + parameter_list: [ "NonRESBGvpNC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvpNC2pi: { + type: UBGenie + random_seed: 1015 + parameter_list: [ "NonRESBGvpNC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvnCC1pi: { + type: UBGenie + random_seed: 1016 + parameter_list: [ "NonRESBGvnCC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvnCC2pi: { + type: UBGenie + random_seed: 1017 + parameter_list: [ "NonRESBGvnCC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvnNC1pi: { + type: UBGenie + random_seed: 1018 + parameter_list: [ "NonRESBGvnNC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvnNC2pi: { + type: UBGenie + random_seed: 1019 + parameter_list: [ "NonRESBGvnNC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarpCC1pi: { + type: UBGenie + random_seed: 1020 + parameter_list: [ "NonRESBGvbarpCC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarpCC2pi: { + type: UBGenie + random_seed: 1021 + parameter_list: [ "NonRESBGvbarpCC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarpNC1pi: { + type: UBGenie + random_seed: 1022 + parameter_list: [ "NonRESBGvbarpNC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarpNC2pi: { + type: UBGenie + random_seed: 1023 + parameter_list: [ "NonRESBGvbarpNC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarnCC1pi: { + type: UBGenie + random_seed: 1024 + parameter_list: [ "NonRESBGvbarnCC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarnCC2pi: { + type: UBGenie + random_seed: 1025 + parameter_list: [ "NonRESBGvbarnCC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarnNC1pi: { + type: UBGenie + random_seed: 1026 + parameter_list: [ "NonRESBGvbarnNC1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + NonRESBGvbarnNC2pi: { + type: UBGenie + random_seed: 1027 + parameter_list: [ "NonRESBGvbarnNC2pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + AhtBY: { + type: UBGenie + random_seed: 1028 + parameter_list: [ "AhtBY" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + BhtBY: { + type: UBGenie + random_seed: 1029 + parameter_list: [ "BhtBY" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + CV1uBY: { + type: UBGenie + random_seed: 1030 + parameter_list: [ "CV1uBY" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + CV2uBY: { + type: UBGenie + random_seed: 1031 + parameter_list: [ "CV2uBY" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + AGKYxF1pi: { + type: UBGenie + random_seed: 1032 + parameter_list: [ "AGKYxF1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + AGKYpT1pi: { + type: UBGenie + random_seed: 1033 + parameter_list: [ "AGKYpT1pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + MFP_pi: { + type: UBGenie + random_seed: 1034 + parameter_list: [ "MFP_pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + MFP_N: { + type: UBGenie + random_seed: 1035 + parameter_list: [ "MFP_N" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrCEx_pi: { + type: UBGenie + random_seed: 1036 + parameter_list: [ "FrCEx_pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrInel_pi: { + type: UBGenie + random_seed: 1037 + parameter_list: [ "FrInel_pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrAbs_pi: { + type: UBGenie + random_seed: 1038 + parameter_list: [ "FrAbs_pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrCEx_N: { + type: UBGenie + random_seed: 1039 + parameter_list: [ "FrCEx_N" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrInel_N: { + type: UBGenie + random_seed: 1040 + parameter_list: [ "FrInel_N" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrAbs_N: { + type: UBGenie + random_seed: 1041 + parameter_list: [ "FrAbs_N" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + RDecBR1gamma: { + type: UBGenie + random_seed: 1042 + parameter_list: [ "RDecBR1gamma" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + RDecBR1eta: { + type: UBGenie + random_seed: 1043 + parameter_list: [ "RDecBR1eta" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrPiProd_pi: { + type: UBGenie + random_seed: 1044 + parameter_list: [ "FrPiProd_pi" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + FrPiProd_N: { + type: UBGenie + random_seed: 1045 + parameter_list: [ "FrPiProd_N" ] + parameter_sigma: [ 1 ] + mode: pm1sigma + number_of_multisims: 2 + } + + CoulombCCQE: { + type: UBGenie + random_seed: 1046 + parameter_list: [ "CoulombCCQE" ] + + # CoulombCCQE uses +/- 30% + parameter_sigma: [ 1.5 ] + mode: pm1sigma + number_of_multisims: 2 + } + + + + +} diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl new file mode 100644 index 000000000..cccb96750 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl @@ -0,0 +1,125 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" +#include "reco_uboone_mcc9_8.fcl" + +singlephoton_analyzer:{ + + module_type: SinglePhoton + PandoraLabel: "pandora" + TrackLabel: "pandora" + ShowerLabel: "pandora" + ParticleIDLabel:"pandoracalipidSCE" + CaloLabel: "pandoracaliSCE" + FlashLabel: "simpleFlashBeam" + POTLabel: "generator" + input_param: "optional" + + SEAviewHitThreshold: 25 + SEAviewDBSCANMinPts: 8 + SEAviewDBSCANEps: 4 + SEAviewPlotDistance: 80 + SEAviewMaxHitsLinFit: 20.0 + SEAviewMakePDF: false + + FillTrees: true + RunPi0Filter: false + FilterMode2g1p: false + FilterMode2g0p: false + + usePID: true + work_function: 23.6 + recombination_factor: 0.62 + gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 + gain_data: [230.3, 237.6, 243.7] #see above docdb + wire_spacing : 0.3 + width_box : 1. + length_box : 4. + + truthmatching_signaldef : "ncdelta" + runAllPFPs: "false" + exiting_photon_energy: 0.02 + exiting_proton_energy: 0.978 #40Mev + proton mass + + runCRT: "false" + DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + Resolution: 1.0 #same as above + DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + + } + +process_name : SinglePhoton #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + @table::microboone_services +} + +outputs: { + # optionalout: { module_type: RootOutput + # fileName: "output_file.root" + # fastCloning: false } +} + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + #pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + allShr: @local::microboone_pandoraShowerCreation + } + analyzers: {} + filters : { + singlephotonana: @local::singlephoton_analyzer #run in ana mode + } + pathana : [allShr, singlephotonana] #path for analysis + trigger_paths : [pathana] + end_paths: [ ] + +} +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.19 +physics.filters.singlephotonana.beamgateEndTime: 4.87 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl new file mode 100644 index 000000000..1c1dfb69f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl @@ -0,0 +1,133 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" +#include "reco_uboone_mcc9_8.fcl" + +singlephoton_analyzer:{ + + module_type: SinglePhoton + PandoraLabel: "pandora" + TrackLabel: "pandora" + ShowerLabel: "pandora" + ParticleIDLabel:"pandoracalipidSCE" + CaloLabel: "pandoracaliSCE" + FlashLabel: "simpleFlashBeam" + POTLabel: "generator" + input_param: "optional" + + SEAviewHitThreshold: 25 + SEAviewDBSCANMinPts: 8 + SEAviewDBSCANEps: 4 + SEAviewPlotDistance: 80 + SEAviewMaxHitsLinFit: 20.0 + SEAviewMakePDF: false + + FillTrees: true + RunPi0Filter: false + FilterMode2g1p: false + FilterMode2g0p: false + + usePID: true + work_function: 23.6 + recombination_factor: 0.62 + gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 + gain_data: [230.3, 237.6, 243.7] #see above docdb + wire_spacing : 0.3 + width_box : 1. + length_box : 4. + + truthmatching_signaldef : "ncdelta" + runAllPFPs: "false" + exiting_photon_energy: 0.02 + exiting_proton_energy: 0.978 #40Mev + proton mass + + runCRT: "false" + DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + Resolution: 1.0 #same as above + DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + + } + +process_name : SinglePhoton #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc + @table::microboone_services +} + + +outputs: { + # optionalout: { module_type: RootOutput + # fileName: "output_file.root" + # fastCloning: false } +} + +physics:{ + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + #pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + allShr: @local::microboone_pandoraShowerCreation + } + analyzers: { + } + filters : { + singlephotonana: @local::singlephoton_analyzer #run in ana mode + } + pathana : [allShr, singlephotonana] #path for analysis + trigger_paths : [pathana] + end_paths: [] + +} +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +microboone_tfile_metadata: { + GenerateTFileMetadata: true + JSONFileName: "vertexed_singlephoton_hist.root.json" + dataTier: "root-tuple" + fileFormat: "root" +} +physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.19 +physics.filters.singlephotonana.beamgateEndTime: 4.87 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl new file mode 100644 index 000000000..3cbd041d0 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl @@ -0,0 +1,147 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" + +singlephoton_analyzer:{ + + module_type: SinglePhoton + PandoraLabel: "pandora" + TrackLabel: "pandora" + ShowerLabel: "pandora" + #ShowerLabel: "showerreco3dpandora" + ParticleIDLabel:"pid" + CaloLabel: "pandoracaliSCE" + FlashLabel: "simpleFlashBeam" + POTLabel: "generator" + input_param: "optional" + + FillTrees: true + RunPi0Filter: false + FilterMode2g1p: false + FilterMode2g0p: false + + usePID: "true" + work_function: 23 + recombination_factor: 0.62 + #gain : 197 + gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 + gain_data: [230.3, 237.6, 243.7] #see above docdb + wire_spacing : 0.3 + width_box : 1. + length_box : 4. + truthmatching_signaldef : "ncdelta" + runAllPFPs: "false" + exiting_photon_energy: 0.02 + exiting_proton_energy: 0.978 #40Mev + proton mass + + runCRT: "false" + DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + Resolution: 1.0 #same as above + DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + + } + +singlephoton_filter: @local::singlephoton_analyzer +singlephoton_filter.FillTrees: false +singlephoton_filter.RunPi0Filter: true +singlephoton_filter.FilterMode2g1p: true +singlephoton_filter.FilterMode2g0p: false +singlephoton_filter.isData: true +singlephoton_filter.usePID: false + +singlephoton_filter_2g0p: @local::singlephoton_filter +singlephoton_filter_2g0p.FilterMode2g1p: false +singlephoton_filter_2g0p.FilterMode2g0p: true + +process_name : SinglePhotonFilter #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc + @table::microboone_services +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "%ifb_%tc_NCpi0filter.root" + SelectEvents: [ filtering ] + dataTier: "reconstructed" + compressionLevel: 1 + outputCommands: ["keep *_*_*_*"] + } +} + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + } + + analyzers: {} + filters : { + singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p + #singlephotonfil: @local::singlephoton_filter #run in 2g1p + #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode + } + + stream1: [ out1 ] + filtering: [pid, singlephotonfil ] + + trigger_paths: [ filtering ] + end_paths: [ stream1 ] + +} + + +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +# PID stuff +physics.producers.pid.ProducerLabels.TrackLabel: "pandora" +physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.65 +physics.filters.singlephotonfil.beamgateEndTime: 5.25 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl new file mode 100644 index 000000000..906e9fb39 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl @@ -0,0 +1,147 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" + +singlephoton_analyzer:{ + + module_type: SinglePhoton + PandoraLabel: "pandora" + TrackLabel: "pandora" + ShowerLabel: "pandora" + #ShowerLabel: "showerreco3dpandora" + ParticleIDLabel:"pid" + CaloLabel: "pandoracaliSCE" + FlashLabel: "simpleFlashBeam" + POTLabel: "generator" + input_param: "optional" + + FillTrees: true + RunPi0Filter: false + FilterMode2g1p: false + FilterMode2g0p: false + + usePID: "true" + work_function: 23 + recombination_factor: 0.62 + #gain : 197 + gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 + gain_data: [230.3, 237.6, 243.7] #see above docdb + wire_spacing : 0.3 + width_box : 1. + length_box : 4. + truthmatching_signaldef : "ncdelta" + runAllPFPs: "false" + exiting_photon_energy: 0.02 + exiting_proton_energy: 0.978 #40Mev + proton mass + + runCRT: "false" + DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + Resolution: 1.0 #same as above + DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + + } + +singlephoton_filter: @local::singlephoton_analyzer +singlephoton_filter.FillTrees: false +singlephoton_filter.RunPi0Filter: true +singlephoton_filter.FilterMode2g1p: true +singlephoton_filter.FilterMode2g0p: false +singlephoton_filter.isData: true +singlephoton_filter.usePID: false + +singlephoton_filter_2g0p: @local::singlephoton_filter +singlephoton_filter_2g0p.FilterMode2g1p: false +singlephoton_filter_2g0p.FilterMode2g0p: true + +process_name : SinglePhotonFilter #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc + @table::microboone_services +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "%ifb_%tc_NCpi0filter.root" + SelectEvents: [ filtering ] + dataTier: "reconstructed" + compressionLevel: 1 + outputCommands: ["keep *_*_*_*"] + } +} + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + } + + analyzers: {} + filters : { + singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p + #singlephotonfil: @local::singlephoton_filter #run in 2g1p + #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode + } + + stream1: [ out1 ] + filtering: [pid, singlephotonfil ] + + trigger_paths: [ filtering ] + end_paths: [ stream1 ] + +} + + +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +# PID stuff +physics.producers.pid.ProducerLabels.TrackLabel: "pandora" +physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.3 +physics.filters.singlephotonfil.beamgateEndTime: 4.9 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl b/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl new file mode 100644 index 000000000..7afed5812 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl @@ -0,0 +1,78 @@ +BEGIN_PROLOG + +singlephoton_analyzer:{ + + module_type: SinglePhoton + PandoraLabel: "pandora" + TrackLabel: "pandora" + ShowerLabel: "pandora" + ParticleIDLabel:"pandoracalipidSCE" + CaloLabel: "pandoracaliSCE" + FlashLabel: "simpleFlashBeam" + POTLabel: "generator" + input_param: "optional" + + Verbose: false + + runSEAviewShower: true + SEAviewShowerHitThreshold: 25 + SEAviewShowerDBSCANMinPts: 8 + SEAviewShowerDBSCANEps: 4 + SEAviewShowerPlotDistance: 80 + SEAviewShowerMaxHitsLinFit: 20.0 + SEAviewShowerMakePDF: false + SEAviewShowerNumRecoShower: 1 + SEAviewShowerNumRecoTrack: -1 + + runSEAviewStub: true + SEAviewStubHitThreshold: 25 + SEAviewStubDBSCANMinPts: 1 + SEAviewStubDBSCANEps: 1 + SEAviewStubPlotDistance: 80 + SEAviewStubMakePDF: false + SEAviewStubNumRecoShower: 1 + SEAviewStubNumRecoTrack: 0 + + FillTrees: true + RunPi0Filter: false + FilterMode2g1p: false + FilterMode2g0p: false + + SelectEvent: false + SelectEventList:"" + + usePID: true + work_function: 23.6 + recombination_factor: 0.62 + gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 + gain_data: [230.3, 237.6, 243.7] #see above docdb + wire_spacing : 0.3 + width_box : 1. + length_box : 4. + + truthmatching_signaldef : "ncdelta" + runAllPFPs: "false" + exiting_photon_energy: 0.02 + exiting_proton_energy: 0.978 #40Mev + proton mass + + runCRT: "false" + DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + Resolution: 1.0 #same as above + DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + + } + +singlephoton_filter: @local::singlephoton_analyzer +singlephoton_filter.FillTrees: false +singlephoton_filter.RunPi0Filter: true +singlephoton_filter.FilterMode2g1p: true +singlephoton_filter.FilterMode2g0p: false +singlephoton_filter.isData: true +singlephoton_filter.usePID: false +singlephoton_filter.work_function: 23 + +singlephoton_filter_2g0p: @local::singlephoton_filter +singlephoton_filter_2g0p.FilterMode2g1p: false +singlephoton_filter_2g0p.FilterMode2g0p: true + +END_PROLOG diff --git a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl new file mode 100644 index 000000000..cfadc32ce --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl @@ -0,0 +1,93 @@ +#include "services_microboone.fcl" +#include "genie_microboone_default+MEC.fcl" +#include "filters.fcl" + +process_name: GenieGenFiltered + +services: +{ + scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + # Load the service that manages root files for histograms. + TFileService: { fileName: "genie_hist.root" } + TimeTracker: {} + MemoryTracker: {} # default is one + RandomNumberGenerator: {} #ART native random number generator + FileCatalogMetadata: @local::art_file_catalog_mc + @table::microboone_gen_services +} + +#Start each new event with an empty event. +source: +{ + module_type: EmptyEvent + timestampPlugin: { plugin_type: "GeneratedEventTimestamp" } + maxEvents: 5000 # Number of events to create + firstRun: 1 # Run number to use for this file + firstEvent: 1 # number of first event in the file +} + +# Define and configure some modules to do work on each event. +# First modules are defined; they are scheduled later. +# Modules are grouped by type. +physics: +{ + + producers: + { + generator: @local::microboone_genie_simple + rns: { module_type: "RandomNumberSaver" } + } + + filters: + { + + NCDeltaRadFilter: + { + module_type: "NCDeltaRadiative" + } + + } + + #define the producer and filter modules for this path, order matters, + #filters reject all following items. see lines starting physics.producers below + simulate: [ rns, generator, NCDeltaRadFilter] + + #define the output stream, there could be more than one if using filters + stream1: [ out1 ] + + #trigger_paths is a keyword and contains the paths that modify the art::event, + #ie filters and producers + trigger_paths: [simulate] + + #end_paths is a keyword and contains the paths that do not modify the art::Event, + #ie analyzers and output streams. these all run simultaneously + end_paths: [stream1] +} + +#block to define where the output goes. if you defined a filter in the physics +#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} +#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "prodgenie_bnb_nu_filtered_NCDeltaRad_uboone_%tc_gen.root" + dataTier: "generated" + SelectEvents: [ simulate ] + compressionLevel: 1 + } +} + +outputs.out1.fileName: "prodgenie_bnb_nu_filtered_NCDeltaRad_uboone_%tc_gen.root" + +source.maxEvents: 100 + +physics.producers.generator: @local::microboone_genie_simple +physics.producers.generator.GlobalTimeOffset: 3125. +physics.producers.generator.RandomTimeOffset: 1600. +physics.producers.generator.TopVolume: "volTPC" +physics.producers.generator.BeamName: "booster" +physics.producers.generator.EventGeneratorList: "NCRES" +physics.producers.generator.GeomScan: "flux: 10000 1.3 1" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl new file mode 100644 index 000000000..4e6201eb2 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl @@ -0,0 +1,94 @@ +#include "services_microboone.fcl" +#include "genie_microboone_default+MEC.fcl" +#include "filters.fcl" + +process_name: GenieGenFiltered + +services: +{ + scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + # Load the service that manages root files for histograms. + TFileService: { fileName: "genie_hist.root" } + TimeTracker: {} + IFDH: {} + MemoryTracker: {} # default is one + RandomNumberGenerator: {} #ART native random number generator + FileCatalogMetadata: @local::art_file_catalog_mc + @table::microboone_gen_services +} + +#Start each new event with an empty event. +source: +{ + module_type: EmptyEvent + timestampPlugin: { plugin_type: "GeneratedEventTimestamp" } + maxEvents: 5000 # Number of events to create + firstRun: 1 # Run number to use for this file + firstEvent: 1 # number of first event in the file +} + +# Define and configure some modules to do work on each event. +# First modules are defined; they are scheduled later. +# Modules are grouped by type. +physics: +{ + + producers: + { + generator: @local::microboone_genie_simple + rns: { module_type: "RandomNumberSaver" } + } + + filters: + { + + NCRadResFilter: + { + module_type: "NCRadiativeResonant" + } + + } + + #define the producer and filter modules for this path, order matters, + #filters reject all following items. see lines starting physics.producers below + simulate: [ rns, generator, NCRadResFilter] + + #define the output stream, there could be more than one if using filters + stream1: [ out1 ] + + #trigger_paths is a keyword and contains the paths that modify the art::event, + #ie filters and producers + trigger_paths: [simulate] + + #end_paths is a keyword and contains the paths that do not modify the art::Event, + #ie analyzers and output streams. these all run simultaneously + end_paths: [stream1] +} + +#block to define where the output goes. if you defined a filter in the physics +#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} +#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "prodgenie_bnb_nu_filtered_NCRadRes_uboone_%tc_gen.root" + dataTier: "generated" + SelectEvents: [ simulate ] + compressionLevel: 1 + } +} + +outputs.out1.fileName: "prodgenie_bnb_nu_filtered_NCRadRes_uboone_%tc_gen.root" + +source.maxEvents: 100 + +physics.producers.generator: @local::microboone_genie_simple +physics.producers.generator.GlobalTimeOffset: 3125. +physics.producers.generator.RandomTimeOffset: 1600. +physics.producers.generator.TopVolume: "volTPCActive" +physics.producers.generator.BeamName: "booster" +physics.producers.generator.EventGeneratorList: "NCRES" +physics.producers.generator.GeomScan: "flux: 10000 1.3 1" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl new file mode 100644 index 000000000..d2694edd5 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl @@ -0,0 +1,77 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" +#include "reco_uboone_mcc9_8.fcl" +#include "microboone_singlephoton.fcl" + +process_name : SinglePhoton #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + @table::microboone_services +} + +outputs: { + # optionalout: { module_type: RootOutput + # fileName: "output_file.root" + # fastCloning: false } +} + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + #pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + allShr: @local::microboone_pandoraShowerCreation + } + analyzers: {} + filters : { + #singlephotonfil: @local::singlephoton_filter #run in filtering mode + singlephotonana: @local::singlephoton_analyzer #run in ana mode + } + pathana : [allShr, singlephotonana] #path for analysis + trigger_paths : [pathana] + end_paths: [ ] + +} +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl new file mode 100644 index 000000000..98a8eec35 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl new file mode 100644 index 000000000..b36e4e71f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl @@ -0,0 +1,8 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +physics.filters.singlephotonana.runCRT: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl new file mode 100644 index 000000000..f16341fc8 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.19 +physics.filters.singlephotonana.beamgateEndTime: 4.87 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl new file mode 100644 index 000000000..36acbbcee --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl @@ -0,0 +1,8 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.19 +physics.filters.singlephotonana.beamgateEndTime: 4.87 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +physics.filters.singlephotonana.runCRT: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl new file mode 100644 index 000000000..4a169c591 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl @@ -0,0 +1,10 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "beamdata" +physics.filters.singlephotonana.beamgateStartTime: 3.19 +physics.filters.singlephotonana.beamgateEndTime: 4.87 +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" + +physics.filters.singlephotonana.CaloLabel: "pandoracalo" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl new file mode 100644 index 000000000..99191dc06 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl @@ -0,0 +1,10 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl new file mode 100644 index 000000000..2f3ef6bf6 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl @@ -0,0 +1,12 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" +physics.filters.singlephotonana.runCRT: "true" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl new file mode 100644 index 000000000..d807f7562 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl @@ -0,0 +1,13 @@ +#include "run_SinglePhoton.fcl" + +physics.filters.singlephotonana.isData: "true" +physics.filters.singlephotonana.POTLabel: "generator" + +#No not data! use overlay +#physics.filters.singlephotonana.beamgateStartTime: 3.19 +#physics.filters.singlephotonana.beamgateEndTime: 4.87 + +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 + +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl new file mode 100644 index 000000000..4e7f978fe --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl @@ -0,0 +1,4 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.beamgateStartTime: 3.16 +physics.filters.singlephotonana.beamgateEndTime: 4.84 + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl new file mode 100644 index 000000000..96d1bbb68 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl @@ -0,0 +1,95 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" + +#include "microboone_singlephoton.fcl" + +process_name : SinglePhotonFilter #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc + @table::microboone_services +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "%ifb_%tc_NCpi0filter.root" + SelectEvents: [ filtering ] + dataTier: "reconstructed" + compressionLevel: 1 + outputCommands: ["keep *_*_*_*"] + } +} + + + + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + } + + analyzers: {} + filters : { + #singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p + singlephotonfil: @local::singlephoton_filter #run in 2g1p + #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode + } + + stream1: [ out1 ] + filtering: [pid, singlephotonfil ] + + trigger_paths: [ filtering ] + end_paths: [ stream1 ] + +} + + +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +# PID stuff +physics.producers.pid.ProducerLabels.TrackLabel: "pandora" +physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl new file mode 100644 index 000000000..d32f897cd --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl @@ -0,0 +1,95 @@ +#include "services_microboone.fcl" +#include "detectorclocks.fcl" +#include "detectorproperties.fcl" +#include "geometry.fcl" +#include "larproperties.fcl" +#include "services_microboone_basic.fcl" +#include "config_particle_identification.fcl" +#include "config_particle_identification_fiducialvolume.fcl" +#include "config_particle_identification_braggalgo.fcl" +#include "config_particle_identification_producerlabels.fcl" +#include "shrreco3d.fcl" + +#include "microboone_singlephoton.fcl" + +process_name : SinglePhotonFilter #The process name must NOT contain any underscores + +source : { + module_type : RootInput + maxEvents : -1 +} + +services : +{ + # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. + TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } + ExptGeoHelperInterface: @local::standard_geometry_helper + Geometry: @local::standard_geo + LArPropertiesService: @local::standard_properties + DetectorClocksService: @local::standard_detectorclocks + DetectorPropertiesService: @local::standard_detproperties + FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc + @table::microboone_services +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "%ifb_%tc_NCpi0filter.root" + SelectEvents: [ filtering ] + dataTier: "reconstructed" + compressionLevel: 1 + outputCommands: ["keep *_*_*_*"] + } +} + + + + +physics: { + + producers : { + # ParameterSets for zero or more producer modules + #pidcalibration: @local::microboone_calibrationdedx + #dedxcalibration: @local::simulation_calibration + pid: @local::particleidconfig + #pid: @local::producerlabels_mcc9 + #showerreco3dpandora : @local::ShrReco3DPandora + } + + analyzers: {} + filters : { + singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p + #singlephotonfil: @local::singlephoton_filter #run in 2g1p + #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode + } + + stream1: [ out1 ] + filtering: [pid, singlephotonfil ] + + trigger_paths: [ filtering ] + end_paths: [ stream1 ] + +} + + +#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" +#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC +#physics.producers.showerreco3dpandora.NeutrinoEvent: true + +services.SpaceCharge.EnableCorrSCE: true +services.SpaceCharge.EnableSimEfieldSCE: true +services.SpaceCharge.EnableSimSpatialSCE: true + +services.DetectorPropertiesService.NumberTimeSamples: 6400 +services.DetectorPropertiesService.ReadOutWindowSize: 6400 +services.DetectorClocksService.InheritClockConfig: false +services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 +services.DetectorClocksService.TrigModuleName: "daq" +services.DetectorClocksService.InheritClockConfig: false + +# PID stuff +physics.producers.pid.ProducerLabels.TrackLabel: "pandora" +physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl new file mode 100644 index 000000000..e2447ada7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.65 +physics.filters.singlephotonfil.beamgateEndTime: 5.25 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl new file mode 100644 index 000000000..59f2437ea --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.3 +physics.filters.singlephotonfil.beamgateEndTime: 4.9 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl new file mode 100644 index 000000000..c1ec3f595 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl @@ -0,0 +1,10 @@ +#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" +physics.filters.singlephotonfil.isData: "false" +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonfil.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonfil.isOverlayed: "true" +physics.filters.singlephotonfil.beamgateStartTime: 3.6 +physics.filters.singlephotonfil.beamgateEndTime: 5.2 +physics.filters.singlephotonfil.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl new file mode 100644 index 000000000..f6c6cf9b5 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton_NCpi0Filter.fcl" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.65 +physics.filters.singlephotonfil.beamgateEndTime: 5.25 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl new file mode 100644 index 000000000..5b0bb7038 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl @@ -0,0 +1,7 @@ +#include "run_SinglePhoton_NCpi0Filter.fcl" + +physics.filters.singlephotonfil.isData: "true" +physics.filters.singlephotonfil.POTLabel: "beamdata" +physics.filters.singlephotonfil.beamgateStartTime: 3.3 +physics.filters.singlephotonfil.beamgateEndTime: 4.9 +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl new file mode 100644 index 000000000..bc53152eb --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl @@ -0,0 +1,10 @@ +#include "run_SinglePhoton_NCpi0Filter.fcl" +physics.filters.singlephotonfil.isData: "false" +physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonfil.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonfil.isOverlayed: "true" +physics.filters.singlephotonfil.beamgateStartTime: 3.6 +physics.filters.singlephotonfil.beamgateEndTime: 5.2 +physics.filters.singlephotonfil.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl new file mode 100644 index 000000000..b5bdff4dd --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl @@ -0,0 +1,10 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl new file mode 100644 index 000000000..75c65176c --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl @@ -0,0 +1,13 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" + +physics.filters.singlephotonana.runCRT: "true" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl new file mode 100644 index 000000000..c0705254f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl @@ -0,0 +1,15 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" + +physics.filters.singlephotonana.RunTrueEventWeight: "true" +physics.filters.singlephotonana.true_eventweight_label: "eventweightglee" +physics.filters.singlephotonana.SplineCVLabel: "eventweightglee" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl new file mode 100644 index 000000000..c27870752 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl @@ -0,0 +1,3 @@ +#include "run_SinglePhoton_Overlay_FullSys.fcl" +physics.filters.singlephotonana.runCRT: "true" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl new file mode 100644 index 000000000..5d2113ab6 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl @@ -0,0 +1,11 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 + +physics.filters.singlephotonana.CaloLabel: "pandoracalo" + +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl new file mode 100644 index 000000000..7b7ef2758 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl @@ -0,0 +1,12 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" + +physics.filters.singlephotonana.RunPhotoNu: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl new file mode 100644 index 000000000..d56affe0a --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl @@ -0,0 +1,13 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.isData: "false" +physics.filters.singlephotonana.BadChannelProducer: "nfspl1" +#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" +physics.filters.singlephotonana.isOverlayed: "true" +physics.filters.singlephotonana.beamgateStartTime: 3.57 +physics.filters.singlephotonana.beamgateEndTime: 5.25 +physics.filters.singlephotonana.TruncMeanFraction: 10.0 +#This is needed in order to help with wierd offset (4049.969 us) +services.DetectorClocksService.TrigModuleName: "triggersim" + +physics.filters.singlephotonana.runCRT: "true" +physics.filters.singlephotonana.RunPhotoNu: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl new file mode 100644 index 000000000..a1f0712e7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl @@ -0,0 +1,6 @@ +#include "run_SinglePhoton.fcl" +physics.filters.singlephotonana.beamgateStartTime: 3.16 +physics.filters.singlephotonana.beamgateEndTime: 4.84 + +physics.filters.singlephotonana.isTextGen: "true" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl new file mode 100644 index 000000000..97ee64224 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl @@ -0,0 +1,3 @@ +#include "run_SinglePhoton_TextGen.fcl" +physics.filters.singlephotonana.runCRT: "true" + diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl new file mode 100644 index 000000000..b3f96f7f3 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl @@ -0,0 +1,45 @@ +#include "services_microboone.fcl" +#include "microboone_eventweight_service.fcl" +#include "seedservice_microboone.fcl" +#include "eventweight_microboone_gLEE_2022.fcl" + +process_name: EventWeight + +services: { + TimeTracker: {} + MemoryTracker: {} + RandomNumberGenerator: {} + FileCatalogMetadata: @local::art_file_catalog_mc + NuRandomService: @local::microboone_seedservice + UBEventWeight: @local::microboone_eventweight_service + TFileService: { fileName: "microboone_reint_hist.root" } + ExptGeoHelperInterface: @local::microboone_geometry_helper + Geometry: @local::microboone_geo +} + +source: { + module_type: RootInput +} + +physics: { + producers: { + eventweightglee: @local::microboone_eventweight + rns: { + module_type: "RandomNumberSaver" + } + } + + simulate: [ rns, eventweightglee ] + stream1: [ out1 ] + trigger_paths: [ simulate ] + end_paths: [ stream1 ] +} + +outputs: { + out1: { + module_type: RootOutput + fileName: "%ifb_%tc_eventweight.root" + dataTier: "detector-simulated" + compressionLevel: 1 + } +} diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl new file mode 100644 index 000000000..7cb74c8cd --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl @@ -0,0 +1,65 @@ +#include "services_microboone.fcl" +#include "microboone_eventweight_service.fcl" +#include "seedservice_microboone.fcl" +#include "eventweight_microboone.fcl" + +process_name: EventWeight4to4aFix + + +#event weighting for switching between splines as well as CV +microboone_eventweight_Splines_and_CV: { + module_type: "EventWeight" + + min_weight: 0.0 + max_weight: 100 + + genie_central_values: { + MaCCQE: 7.55 # GENIE knob setting, gives Ma = 1.18 GeV + RPA_CCQE: 0.4 # 0 --> Nieves CCQE default, 1 --> RPA off + NormCCMEC: 0.52 # GENIE knob setting, gives scaling factor of 1.26 + XSecShape_CCMEC: 0.22 # 0 --> Nieves CCMEC default, 1 --> GENIE empirical + } + + genie_module_label: "generator" + @table::microboone_eventweight_spline + @table::microboone_eventweight_genie +} +microboone_eventweight_Splines_and_CV.weight_functions: [ splines_general, TunedCentralValue ] + + +services: { + TimeTracker: {} + MemoryTracker: {} + RandomNumberGenerator: {} + FileCatalogMetadata: @local::art_file_catalog_mc + NuRandomService: @local::microboone_seedservice + UBEventWeight: @local::microboone_eventweight_service +} + +source: { + module_type: RootInput +} + +physics: { + producers: { + eventweight4to4aFix: @local::microboone_eventweight_Splines_and_CV + rns: { + module_type: "RandomNumberSaver" + } + } + + simulate: [ rns, eventweight4to4aFix ] + stream1: [ out1 ] + trigger_paths: [ simulate ] + end_paths: [ stream1 ] +} + +outputs: { + out1: { + module_type: RootOutput + fileName: "%ifb_%tc_eventweight.root" + dataTier: "simulated" + compressionLevel: 1 + } +} + diff --git a/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h b/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h new file mode 100644 index 000000000..ae9861a28 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h @@ -0,0 +1,868 @@ +#include "SinglePhoton_module.h" +#include +//#include + +namespace single_photon +{ + + //recoMCmatching but specifically for recob::showers + void SinglePhoton::showerRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap){ + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + if(reco_verbose) std::cout<<"Strting "< pfp = objectToPFParticleMap[object]; + + if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); + if (parentIterator == pfParticleIdMap.end()){ + std::cout<<"error: no parent but not primary"<second->PdgCode(); + std::cout<<"the parent pdg code is "<Daughters(); + //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; + // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); + //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + /** + * + * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower + * + **/ + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + + bool found_a_match = false; + + //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<View(); + + particle_vec.clear(); match_vec.clear(); //only store per hit + + //for the hit, fill the backtracker info + mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); + // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + + } // end loop over hits + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; // a vector of mother MCP + std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; // number of associated MCP that has mothers + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + //Guanqun: this line here doesn't really cosider other break cases than finding primary particle + if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + if(match->PdgCode()==22){ // if it's a gamma + std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; + this->spacecharge_correction(match, corrected_start, tmp ); + m_sim_shower_is_true_shower[i] = 1; + }else if(abs(match->PdgCode())==11){ // if it's e+/e- + this->spacecharge_correction(match, corrected_start); + m_sim_shower_is_true_shower[i] = 1; + }else{ + corrected_start = {-999,-999,-999}; + m_sim_shower_is_true_shower[i] = 0; + } + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + + if (match_mother.isNull()){ + m_sim_shower_parent_pdg[i] = -1; + m_sim_shower_parent_trackID[i] = -1; + + }else{ + m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + } + + + + m_sim_shower_matched[i] = 1; + m_sim_shower_energy[i] = match->E(); + m_sim_shower_mass[i] = match->Mass(); + m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + m_sim_shower_pdg[i] = match->PdgCode(); + m_sim_shower_trackID[i] = match->TrackId(); + m_sim_shower_process[i] = match->Process(); + m_sim_shower_end_process[i] = match->EndProcess(); + m_sim_shower_vertex_x[i] = corrected_vertex[0]; + m_sim_shower_vertex_y[i] = corrected_vertex[1]; + m_sim_shower_vertex_z[i] =corrected_vertex[2]; + + m_sim_shower_start_x[i] = corrected_start[0]; + m_sim_shower_start_y[i] = corrected_start[1]; + m_sim_shower_start_z[i] =corrected_start[2]; + + m_sim_shower_px[i] = match->Px(); + m_sim_shower_py[i] = match->Py(); + m_sim_shower_pz[i] = match->Pz(); + + // should've use 'best_mother_plane' here + m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; + + m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + + mcParticleVector.push_back(match); + objectToMCParticleMap[object] = mcParticleVector.back(); + + m_sim_shower_sliceId[i] = PFPToSliceIdMap[pfp]; + m_sim_shower_nuscore[i] = sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; + m_sim_shower_isclearcosmic[i] = PFPToClearCosmicMap[pfp]; + if (m_sim_shower_isclearcosmic[i]== false){ + std::cout<<"sim shower is matched to non-clear cosmic PFP "<Self()<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<> mother_contributing_MCP; //stores all the MCP's in the chain for all mothers-> this can probably be modified to only store ones which contribute to the reco shower + std::vector all_contributing_MCP; //all the MCP's in the chain for this mother + + //for each of the mother particles + for(auto pair: mother_MCP_map){ + all_contributing_MCP.clear(); + art::Ptr particle = pair.second;//get the mother MCP + all_contributing_MCP.push_back(pair.first);//save the MCP track id + int numDaughters = -1;//the number of daughters for the current generation + std::vector current_ids; //the track id's for the current generation + std::vector next_ids;//the track id's for the next generation (daughters of current generatiob) + + //std::cout<<"starting from mother particle at head of chain with pdg code "<PdgCode()<<" and track id "<NumberDaughters();//start with the number of daughters for the mother mother particle + + //std::cout<<"this particle has "<Daughter(i); //get the track id of the MCP + current_ids.push_back(id);//save the id to the list of the current generation + all_contributing_MCP.push_back(id);//save it to the list of all of the MCP's in the chain + } + + + //while there are more generations of daughter particles (not at the end of the chain) + while(numDaughters>0){ + //for each MCP in the current generation + for(int id:current_ids){ + //get the particle and check it's valid + art::Ptr particle = MCParticleToTrackIdMap[id]; + if (particle.isNull()) continue; + + //get the number of daughters + int n = particle->NumberDaughters(); + + //loop over the daughters + for (int i = 0; i < n; i++){ + int daughterId = particle->Daughter(i); + + //save daughters to list of all contributing mcps + all_contributing_MCP.push_back(daughterId); + + //add daughters to list for next gen + next_ids.push_back(daughterId); + + } + } + + numDaughters = current_ids.size(); //update the number of daughters in the next generation + + //std::cout<<"num daughters after this generation is "< count_vec(mother_contributing_MCP.size()); //stores the number of MCP's in the chain from each mother which match to the reco shower + std::vector energy_contributing_MCP(mother_contributing_MCP.size()); //the total energy of all the MCP's in the chain from the mother which contribute to the shower + //for each MCP from the chain of mother mother particle and daughters, check how much it overlaps with the MCP's that contribute to the shower + for (unsigned int i = 0; i< mother_contributing_MCP.size(); i++){ + std::vector mcp_vec = mother_contributing_MCP[i]; + int count = 0; + + std::cout<<"SinglePhoton::recoMC()\t||\t on mother_contributing_MCP: "<0){ + //check the total number of contributing MCP + std::cout<<"SinglePhoton::recoMC()\t||\t the number of MCP associated with the first mother mother particle that also deposit hits in the recob::shower is "< + std::vector recoMCmatching(std::vector& objectVector, + std::map>& objectToMCParticleMap, + std::map>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector){ + + std::vector trk_overlay_vec; + std::vector vec_fraction_matched; + bool reco_verbose = false; + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + bool found_a_match = false; + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; + found_a_match = true; + } + }//end loop over particles per hit + } + + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + trk_overlay_vec.push_back(fraction_num_hits_overlay); + if(n_associated_mcparticle_hits == 0){ + //This will only occur if the whole recob::PFParticle is associated with an overlay object + //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" + << " pdg=" << best_matched_mcparticle->PdgCode() + << " trkid=" << best_matched_mcparticle->TrackId() + << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; + } + + }//end vector loop. + //return vec_fraction_matched; + return trk_overlay_vec; + } + + + //Typenamed for simb::MCTrack and sim::MCShower + /* @brief: tranverse through mcParticleVector, for each mcParticle, if an mcObject is found with same track ID + * put the particle and object in the mcParticleToMCObjectMap as a pair + */ + template + void perfectRecoMatching( + std::vector>& mcParticleVector, + std::vector& mcObjectVector, + std::map,T>& mcParticleToMCObjectMap + ){ + + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); + std::cout<<"KRANK: "< particle = mcParticleVector[ip]; + int particle_trackID = particle->TrackId(); + + std::vector id_matches; + std::vector mother_id_matches; + std::vector ancestor_id_matches; + + for(size_t io=0; ioTrackID(); + int object_mother_trackID =object->MotherTrackID(); + int object_ancestor_trackID =object->AncestorTrackID(); + + if(object_trackID == particle_trackID ) id_matches.push_back(io); + if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); + if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); + } + + int num_id_matches=id_matches.size(); + int num_mother_id_matches=mother_id_matches.size(); + int num_ancestor_id_matches=ancestor_id_matches.size(); + + //So im not sure how this works but something like this + if(num_id_matches > 1){ + std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; + }else if(num_ancestor_id_matches == 1){ + //We have a mother match? I guess this is like Neutron->photon->e+e-" + //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; + }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ + std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector){ + + + for(auto &mcp: mcParticleVector){ + int pdg = mcp->PdgCode(); + std::string end_process = mcp->EndProcess(); + int status = mcp->StatusCode() ; + + + if(pdg==22){ + std::cout<<"PHOTO: "<>& mcParticleVector, const art::Event &evt){ + + std::map > crap_map; + for(size_t j=0;j< mcParticleVector.size();j++){ + const art::Ptr mcp = mcParticleVector[j]; +//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; +} +art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); +art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); + +std::vector> GenieMCTruth; +std::vector geninfo; + + + +for(size_t i=0; i< mcParticleVector.size();i++){ + + +art::Ptr nth_mother = mcParticleVector[i]; + +//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; + +std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother() != 0){ + +nth_mother = crap_map[nth_mother->Mother()]; +std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ +std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); +std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); + vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); + + + vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); + vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); + vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); + vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); + vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); + vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); + vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); + vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); + + vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); + vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); + vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); + vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); + vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); + vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); + vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); + vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); + + + vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); + vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); + vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); + vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); + vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); + vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); + + vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); + vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); + vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); + vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); + vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); + vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); + + vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); + vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); + vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); + vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); + vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); + vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + + } + + void SinglePhoton::CreateStubBranches(){ + + vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); + vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); + vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); + vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); + vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); + vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); + vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); + vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); + vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); + vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); + vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); + vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); + vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); + vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); + vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); + vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); + vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); + vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); + vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); + vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); + vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); + vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); + vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); + vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); + vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); + vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); + vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); + vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); + vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); + vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); + vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); + + + vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); + vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + + } + + + + void SinglePhoton::SecondShowerSearch( + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + + + + std::cout<<"ERROR! SecondShowerSearch has been made redundant by SEAview methodology. see SEAview/SEAview.h for details. This shouldnt be running at all"<> associated_hits; + std::vector> unassociated_hits; + std::vector> unassociated_hits_plane0; + std::vector> unassociated_hits_plane1; + std::vector> unassociated_hits_plane2; + + std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane + + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + art::Ptr pfp = trackToPFParticleMap[track]; + int sliceid = pfParticleToSliceIDMap.at(pfp); + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto trackhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"SinglePhoton::SSS\t||\ttrack "< shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + int sliceid = pfParticleToSliceIDMap.at(pfp); + auto slicehits = sliceIDToHitsMap.at(sliceid); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ + std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); + for(auto &h: slicehits){ + + bool is_associated = false; + for(auto &a: associated_hits){ + if(h==a){ + is_associated = true; + break; + } + } + + if(!is_associated){ + unassociated_hits.push_back(h); + auto plane_view = h->View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ + + //TFile *f = new TFile("t.root","recreate"); + //f->cd(); + + std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); + can->Divide(4,3,0,0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr pfp = showerToPFParticleMap.at(showers[s]); + auto showerhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: showerhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + //vec_c[(int)h->View()].push_back((double)h->Channel()); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_shr[s] = t_pts; + } + + + std::vector> pts_trk( tracks.size(), std::vector(3) ); + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); + auto trackhits = pfParticleToHitsMap.at(pfp); + + std::vector t_pts(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + + for(auto &h: trackhits){ + double wire = (double)h->WireID().Wire; + vec_c[(int)h->View()].push_back(wire); + vec_t[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + + pts_trk[t] = t_pts; + } + //Now the "Unassociated Hits" + + std::vector g_unass(3); + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + for(int i=0; i<3; i++){ + + std::vector vec_t; + std::vector vec_c; + + for(auto &h: unassociated_hits_all[i]){ + + double wire = (double)h->WireID().Wire; + vec_c.push_back(wire); + vec_t.push_back((double)h->PeakTime()); + + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //for reclustering + std::vector pt = {wire,vec_t.back()}; + pts_to_recluster[(int)h->View()].push_back(pt); + mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; + } + + g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + + + } + //Plotting now + double plot_point_size=0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + can->cd(i+5); + g_vertex[i]->Draw("ap"); + + can->cd(i+9); + g_vertex[i]->Draw("ap"); + + + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + //std::cout<<"KNK: "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); + l->SetLineColor(kGray+1); + l->Draw("same"); + can->cd(thisp+5); + l->Draw("same"); + can->cd(thisp+9); + l->Draw("same"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + for(int i=0; i<3; i++){ + can->cd(i+1); + + if(g_unass[i]->GetN()>0){ + g_unass[i]->Draw("p same"); + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + can->cd(i+5); + g_vertex[i]->Draw("p same"); + can->cd(i+9); + g_vertex[i]->Draw("p same"); + + double rad_cm = 12.0; + TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); + ell_p->SetLineColor(kRed); + ell_p->SetFillStyle(0); + ell_p->Draw("same"); + + } + + + + + + + //*****************************DBSCAN*********************************** + int min_pts = m_SEAviewDbscanMinPts; + double eps = m_SEAviewDbscanEps; + std::vector num_clusters(3,0); + + std::vector> g_clusters(3); + std::vector> cluster_labels(3); + + + std::vector vec_clusters; + + for(int i=0; i<3; i++){ + + std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; + std::vector> hitz; + for(size_t p=0; p< pts_to_recluster[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ + + pts.push_back(pts_to_recluster[i][p]); + hitz.push_back(mapPointIndexToHit[i].at(p)); + } + + } + if(hitz.size()!=0){ + vec_clusters.emplace_back(c,i,pts,hitz); + std::cout<<"SinglePhoton::SSS\t||\t Cluster "< h = mapPointIndexToHit[i].at(p);// Get the hit + size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise + + //std::cout<> t_hs= {h}; + v_newClusterToHitsMap[i][cluster_label] = t_hs; + }else{ + v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list + } + } + } + + + //for(size_t i=0; i<3; i++){ + // for(int c=0; c cluster_colors(max_n_clusters,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(int j=0; j< max_n_clusters; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + //Step next, loop over and make plots again + for(int i=0; i<3; i++){ + std::vector> vec_time(num_clusters[i]+1); + std::vector> vec_wire(num_clusters[i]+1); + std::vector tmp_g_clusters(num_clusters[i]+1); + + if(cluster_labels[i].size() != pts_to_recluster[i].size()){ + std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; + tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); + can->cd(i+5); + if( + tmp_g_clusters[c]->GetN()>0){ + tmp_g_clusters[c]->Draw("p same"); + tmp_g_clusters[c]->SetMarkerColor(tcol); + tmp_g_clusters[c]->SetFillColor(tcol); + tmp_g_clusters[c]->SetMarkerStyle(20); + tmp_g_clusters[c]->SetMarkerSize(plot_point_size); + } + } + g_clusters[i] = tmp_g_clusters; + c_offset += num_clusters[i]; + } + + //******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + //Clusters + + /* if(m_is_data==false){ + for(auto &c: vec_clusters){ + //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); + //c.setSSScore(ssscor); + + int thisid = m_sim_shower_trackID[0]; + + for(auto &h: c.getHits()){ + + + } + } + } + */ + + + can->cd(8); + for(int i=0; i<3; i++){ + TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); + + TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); + + for(int c=0; c< num_clusters[i]+1; c++){ + if(c==0)continue; + + int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); + auto hitz = v_newClusterToHitsMap[i][c]; + auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); + int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + double mean_summed_ADC = 0.0; + for(auto &h:hitz){ + mean_summed_ADC +=h->SummedADC(); + } + mean_summed_ADC = mean_summed_ADC/(double)num_hits_in_cluster; + + + + // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); + + std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; + l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); + + //Here we will only plot those that pass in bottom: + //We are also going to put a hard threshold of 70cm? + // + if(ssscorz.pass && is_in_shower ==-1 ){ + can->cd(i+9); + if(g_clusters[i][c]->GetN()>0){ + TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); + + int Npts =m_SEAviewMaxPtsLinFit; + TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + +// std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); + core->GetFunction("pol1")->SetLineWidth(1); + core->GetFunction("pol1")->SetLineStyle(3); + core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + } + //lets map (wire,tick) to a rudamentary (cm,cm); + //double slope2 = slope*25*0.3; + //double con2 = con*25; + + double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); + + //rudimentary! + for(double k=chan_min[i]; k< chan_max[i];k++){ + double y = slope*k+con; + double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); + impact_parameter = std::min(impact_parameter,dist); + } + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + + double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); + double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); + + std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; + double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); + double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); + double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); + //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); + m_sss_candidate_angle_to_shower.push_back(kinda_angle); + + + if(m_is_data){ + m_sss_candidate_matched.push_back(-1); + m_sss_candidate_pdg.push_back(-1); + m_sss_candidate_parent_pdg.push_back(-1); + m_sss_candidate_trackid.push_back(-1); + m_sss_candidate_overlay_fraction.push_back(-1); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); + m_sss_candidate_matched.push_back(ssmatched[0]); + m_sss_candidate_pdg.push_back(ssmatched[1]); + m_sss_candidate_parent_pdg.push_back(ssmatched[2]); + m_sss_candidate_trackid.push_back(ssmatched[3]); + m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); + m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[5]); + } + + + std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; + l_bot2->AddEntry(tmp,sname2.c_str(),"f"); + } + } + + } + + //Some time matching + + + //Closest neightor + for(int l=0; l< m_sss_num_candidates; l++){ + int this_p = m_sss_candidate_plane[l]; + double close = 1e10; + for(int m=0; m< m_sss_num_candidates;m++){ + if(this_p == m_sss_candidate_plane[m]) continue; + double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); + close = std::min(dup,close); + } + m_sss_candidate_closest_neighbour.push_back(close); + } + + for(int l=0; l< m_sss_num_candidates; l++){ + + std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; + + + //double score = sssVetov1->GetMvaValue(thisvars); + double score = -1; + m_sss_candidate_veto_score.push_back(score); + + } + + + can->cd(8); + l_bot->SetLineWidth(0); + l_bot->SetLineColor(kWhite); + l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); + l_bot->Draw("same"); + + can->cd(12); + l_bot2->SetLineWidth(0); + l_bot2->SetLineColor(kWhite); + l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); + l_bot2->Draw("same"); + + + + + + + + + } + //********** Some Error Checking ********************// + + /*for(int i=0; i<3; i++){ + + std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); + //can->Write(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + //f->Close(); + std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; // wire of all hits + std::vectorall_tick; + std::vectorall_dist; // distance to vertex of all hits + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + sss_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + // this can be moved to inclass initializer + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + //requires that hit in hits has to be on the same plane as vertex_wire. + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + + double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + std::vectorSinglePhoton::SecondShowerMatching( + std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr> & MCParticleToTrackIdMap + ){ + + + std::vector ans; //matched,pdg,parentpdg,trkid + + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + bool found_a_match = false; + + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < hitz.size(); ++i_h){ + int which_plane = (int)hitz[i_h]->View(); + particle_vec.clear(); match_vec.clear(); //only store per hit + //for the hit, fill the backtracker info + mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); + + //if there is an MCParticle associated to this hit + if(particle_vec.size()>0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + } // end loop over hit + if(found_a_match){ + std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP + + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; + } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; + } + + + num_bt_mothers++; + } else{ + if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + int par_pdg = -1; + if (match_mother.isNull()){ + par_pdg = -1; + + }else{ + par_pdg = match_mother->PdgCode(); + } + + ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; + + return ans; + }//end sss matching; + + + + + + + //************************************************ Shower Search Slice Second SSS3D ********** / + + void SinglePhoton::ClearSecondShowers3D(){ + + m_sss3d_num_showers = 0; + m_sss3d_shower_start_x.clear(); + m_sss3d_shower_start_y.clear(); + m_sss3d_shower_start_z.clear(); + m_sss3d_shower_dir_x.clear(); + m_sss3d_shower_dir_y.clear(); + m_sss3d_shower_dir_z.clear(); + m_sss3d_shower_length.clear(); + m_sss3d_shower_conversion_dist.clear(); + m_sss3d_shower_invariant_mass.clear(); + m_sss3d_shower_implied_invariant_mass.clear(); + m_sss3d_shower_impact_parameter.clear(); + m_sss3d_shower_energy_max.clear(); + m_sss3d_shower_score.clear(); + m_sss3d_slice_nu.clear(); + m_sss3d_slice_clear_cosmic.clear(); + m_sss3d_shower_ioc_ratio.clear(); + } + + + void SinglePhoton::CreateSecondShowerBranches3D(){ + vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); + + vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); + vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); + vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); + vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); + vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); + vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); + + vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); + vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); + vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); + vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); + vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); + vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); + vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); + vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); + //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); + //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + } + + + void SinglePhoton::SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ + + std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" + double max_conv_dist = 80.0; + + art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); + std::vector> allShowerVector; + art::fill_ptr_vector(allShowerVector,allShowerHandle); + std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, std::vector> > showerToHitsMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); + } + + art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, art::Ptr > showerToPFParticleMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); + } + + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); + std::vector> allPFParticleVector; + art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); + + //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); + //pfPartToMetadataAssoc.at(pfp.key()); + + size_t n_all_shr = allShowerVector.size(); + m_sss3d_num_showers = (int)n_all_shr-showers.size(); + + if(showers.size()==0) return; + + auto primary_shower = showers.front(); + + std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); + if(dist>max_conv_dist) continue; + + auto pfp = showerToPFParticleMap[shr]; + //for(auto &prr: allPFParticleVector){ + // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; + + /* + std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + + for (auto it:propertiesmap ){ + std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); + //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); + //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"<CalcEShower(showerToHitsMap[shr]); + double invar = implied_invar_mass(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, primary_shower, m_reco_shower_energy_max[0], shr, senergy); + double implied_invar = invar_mass(primary_shower, m_reco_shower_energy_max[0], shr, senergy) ; + double shr_score = 0.0; //need pfp and metadata to get score, and might give slice! (This will be harder..) but on reflection, kinda important. PCA spread might be a good rplacement. + int is_clear_cosmic_slice = 0 ; + int is_nu_slice = 0; + + + m_sss3d_shower_start_x.push_back(shr->ShowerStart().X()); + m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); + m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); + m_sss3d_shower_dir_x.push_back(shr->Direction().X()); + m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); + m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); + m_sss3d_shower_length.push_back(shr->Length()); + m_sss3d_shower_conversion_dist.push_back(dist); + m_sss3d_shower_invariant_mass.push_back(invar); + m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); + double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); + m_sss3d_shower_impact_parameter.push_back(imp); + + if(dist!=0) { + m_sss3d_shower_ioc_ratio.push_back(imp/dist); + }else{ + m_sss3d_shower_ioc_ratio.push_back(0); + + } + m_sss3d_shower_energy_max.push_back(senergy);// + m_sss3d_shower_score.push_back(shr_score); + m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); + m_sss3d_slice_nu.push_back(is_nu_slice); + } + + return; + } + + + + void SinglePhoton::SimpleSecondShowerCluster(){ + + std::string base = "sss3d_"; + std::vector mod = {"ioc_ranked","invar_ranked"}; + + m_sss3d_ioc_ranked_en = -9; + m_sss3d_ioc_ranked_conv = -9; + m_sss3d_ioc_ranked_invar = -9; + m_sss3d_ioc_ranked_implied_invar = -9; + m_sss3d_ioc_ranked_ioc = -9; + m_sss3d_ioc_ranked_opang = -9; + m_sss3d_ioc_ranked_implied_opang = -9; + m_sss3d_ioc_ranked_id = -9; + + m_sss3d_invar_ranked_en = -9; + m_sss3d_invar_ranked_conv = -9; + m_sss3d_invar_ranked_invar = -9; + m_sss3d_invar_ranked_implied_invar = -9; + m_sss3d_invar_ranked_ioc = -9; + m_sss3d_invar_ranked_opang = -9; + m_sss3d_invar_ranked_implied_opang = -9; + m_sss3d_invar_ranked_id = -9; + + + std::string base2d = "sss_"; + std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; + + m_sss2d_ioc_ranked_en = -9; + m_sss2d_ioc_ranked_conv = -9; + m_sss2d_ioc_ranked_ioc = -9; + m_sss2d_ioc_ranked_pca = -9; + m_sss2d_ioc_ranked_invar = -9; + m_sss2d_ioc_ranked_angle_to_shower = -9; + m_sss2d_ioc_ranked_num_planes = -9; + + m_sss2d_conv_ranked_en = -9; + m_sss2d_conv_ranked_conv = -9; + m_sss2d_conv_ranked_ioc = -9; + m_sss2d_conv_ranked_pca = -9; + m_sss2d_conv_ranked_invar = -9; + m_sss2d_conv_ranked_angle_to_shower = -9; + m_sss2d_conv_ranked_num_planes = -9; + + m_sss2d_invar_ranked_en = -9; + m_sss2d_invar_ranked_conv = -9; + m_sss2d_invar_ranked_ioc = -9; + m_sss2d_invar_ranked_pca = -9; + m_sss2d_invar_ranked_invar = -9; + m_sss2d_invar_ranked_angle_to_shower = -9; + m_sss2d_invar_ranked_num_planes = -9; + + //--------------------------------------- + //First off, the 3D showers + //First some 3D shower information + if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ + //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; + for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); + + std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); + std::vector ranked_invar = sort_indexes_rev((inv)); + std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); + std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); + + int to_consider = m_sss3d_shower_conversion_dist.size(); + + if(false){ + std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ + //std::cout<<"2D clusters: "< nplans(3,0); + std::vector> indexmap(3); + + + for(int i=0; i< m_sss_num_candidates; i++){ + //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; + + for(int i=0; i< m_sss_num_candidates; i++){ + int ip = m_sss_candidate_plane.at(i); + //int nhits = sss_candidate_num_hits.at(i); + nplans[ip]++; + indexmap[ip].push_back(i); + + //Two passes to build up all "Candidates" for 2 and 3 plane matches + for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; + if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; + // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + + //If this matches well with Either last candidate, include as a possibility + if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ + uniq_candidates[i].push_back(k); + } + + } + } + } + //Check which candidates have been used where + std::vector used_candidates(m_sss_num_candidates); + for(int i = 0; i< (int)uniq_candidates.size(); i++){ + for(auto &j: uniq_candidates[i]){ + used_candidates[j]++; + } + } + + //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own + for(int i = 0; i< (int)used_candidates.size(); i++){ + if(used_candidates[i]==0) uniq_candidates.push_back({i}); + } + + //Now lets delete any permutations + std::vector> uniq_candidates2; + uniq_candidates2.push_back(uniq_candidates.front()); + + for(int i = 1; i< (int)uniq_candidates.size(); i++){ + + bool perm = false; + for(int j = 0; j< (int)uniq_candidates2.size(); j++){ + perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); + if(perm) break; + } + if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); + } + + //Printing candidates (After perm check) + std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); + std::vector candidates_en(uniq_candidates2.size(),0); + std::vector candidates_ioc(uniq_candidates2.size(),0); + std::vector candidates_conv(uniq_candidates2.size(),0); + std::vector candidates_pca(uniq_candidates2.size(),0); + std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); + std::vector candidates_num_planes(uniq_candidates2.size(),0); + std::vector candidates_eff_invar(uniq_candidates2.size(),0); + std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); + + //rank by min_impat/max_min_dist and select + //rank by Energy energy + + for(int j=0; j<(int)uniq_candidates2.size();j++){ + int nt=uniq_candidates2[j].size(); + //std::cout<<"Candidate #: "< is_in_slice; + + for(int c=0; c< nt;++c){ + int ic = uniq_candidates2[j][c]; + + //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); + std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); + std::vector ranked_conv = sort_indexes_rev(candidates_conv); + + std::cout<<"========== Ranking ======== "<> SinglePhoton::clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + + size_t size = candidate_indices.size(); + if(size == 0){ + throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); + } + + // at most 3 cluster indices (for 3 planes) + std::vector planes; + std::vector max_ticks; + std::vector min_ticks; + std::vector tick_length; + + for(auto i : candidate_indices){ + planes.push_back(cluster_planes[i]); + + max_ticks.push_back(cluster_max_ticks[i]); + min_ticks.push_back(cluster_min_ticks[i]); + tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); + } + + + //if candidates are not on different planes + if( size == 2 && planes[0] == planes[1]) + return {false, std::vector(2, -1.0)}; + if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) + return {false, std::vector(3, -1.0)}; + + //calculate the overlapping tick-span + double tick_overlap = DBL_MAX; + + //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction + for(auto max_e : max_ticks) + for(auto min_e : min_ticks) + if(max_e - min_e < tick_overlap) + tick_overlap = max_e - min_e; + + // if tick overlap is negative, meaning these clusters are not overlapping + if(tick_overlap < 0) + return {false, std::vector(size, -1.0)}; + else{ + std::vector overlap_fraction; + for(auto l: tick_length){ + overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); + } + return {true, overlap_fraction}; + } + } + + + std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; + + int num_cluster_groups=0; // number of matched cluster groups in total + std::vector> grouped_cluster_indices; + std::vector cluster_group_timeoverlap_fraction; + if(num_clusters <= 1) + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + + for(int i = 0; i != num_clusters -1; ++i){ + for(int j = i+1; j != num_clusters; ++j){ + + //first, look at candidate pairs + auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if( pair_result.first){ + + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j}); + double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + + // if the pair is succefully grouped, look at possible trios + for(int k = j+1; k!= num_clusters; ++k){ + auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if(tri_result.first){ + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); + min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + } + } //k loop + } + }//j loop + }//i loop + + std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; + + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + } + +} From 7387fbf1e004a2ea6437e203225e3d3832f5df00 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 11 Mar 2022 20:27:36 -0600 Subject: [PATCH 10/54] clean up a some headers --- sbncode/CMakeLists.txt | 36 +- .../SinglePhotonAnalysis/Atlas_edi/Atlas.h | 393 - .../Atlas_edi/BobbyVertexBuilder.h | 959 - .../Atlas_edi/CMakeLists.txt | 92 - .../SinglePhotonAnalysis/Atlas_edi/DBSCAN.h | 142 - .../Atlas_edi/SinglePhoton_module.cc | 1656 - .../Atlas_edi/SinglePhoton_module.h | 1428 - .../Atlas_edi/TruncMean.h | 259 - .../Atlas_edi/VertexBuilder/DetectorObjects.h | 340 - .../VertexBuilder/ParticleAssociations.h | 698 - .../Atlas_edi/VertexBuilder/VertexBuilder.h | 1210 - .../Atlas_edi/analyze_EventWeight.h | 357 - .../Atlas_edi/analyze_MCTruth.h | 463 - .../Atlas_edi/analyze_OpFlashes.h | 177 - .../Atlas_edi/analyze_Showers.h | 1568 - .../Atlas_edi/analyze_Slice.h | 1005 - .../Atlas_edi/analyze_Template.h | 26 - .../Atlas_edi/analyze_Tracks.h | 1235 - .../Atlas_edi/bad_channel_matching.h | 124 - .../Atlas_edi/isolation.h | 658 - .../Atlas_edi/job/CMakeLists.txt | 5 - ...uboone_NCDeltaRadFiltered_volActiveTpc.fcl | 94 - .../Atlas_edi/job/run_SinglePhoton.fcl | 106 - .../Atlas_edi/job/run_SinglePhoton_BNBext.fcl | 7 - .../Atlas_edi/job/run_SinglePhoton_Data.fcl | 7 - .../job/run_SinglePhoton_Data_calo.fcl | 10 - .../Atlas_edi/job/run_SinglePhoton_Dirt.fcl | 10 - .../Atlas_edi/job/run_SinglePhoton_MC.fcl | 4 - .../job/run_SinglePhoton_Overlay.fcl | 10 - .../job/run_SinglePhoton_Overlay_calo.fcl | 11 - .../SinglePhotonAnalysis/Atlas_edi/leap.sh | 1 - .../SinglePhotonAnalysis/Atlas_edi/make.sh | 5 - .../Atlas_edi/reco_truth_matching.h | 709 - .../Atlas_edi/second_shower_search.h | 1379 - .../Atlas_edi/sssVeto_BDT.class.h | 85986 ---------------- .../SinglePhotonAnalysis/Libraries/Atlas.h | 47 +- .../Libraries/SinglePhoton_module.h | 3 +- .../Libraries/analyze_EventWeight.h | 2 - .../Libraries/analyze_Geant4.h | 2 - .../Libraries/analyze_MCTruth.h | 32 +- .../Libraries/analyze_OpFlashes.h | 2 - .../Libraries/analyze_Showers.h | 3 - .../Libraries/analyze_Slice.h | 426 +- .../Libraries/analyze_Tracks.h | 1 - .../Libraries/isolation.h | 16 - .../SinglePhoton_module.cc | 68 +- .../jobs/singlephoton_sbnd.fcl | 4 +- .../SinglePhotonAnalysis/ref/CMakeLists.txt | 85 - sbncode/SinglePhotonAnalysis/ref/DBSCAN.h | 149 - .../ref/NCRadiativeResonant_module.cc | 207 - .../ref/SEAview/CMakeLists.txt | 74 - .../ref/SEAview/SEAviewer.cc | 1299 - .../ref/SEAview/SEAviewer.h | 453 - .../ref/SEAview/seaDBSCAN.h | 159 - .../ref/SinglePhoton_module.cc | 2248 - .../ref/SinglePhoton_module.h | 1998 - sbncode/SinglePhotonAnalysis/ref/TruncMean.h | 260 - .../ref/analyze_EventWeight.h | 392 - .../SinglePhotonAnalysis/ref/analyze_Geant4.h | 94 - .../ref/analyze_MCTruth.h | 685 - .../ref/analyze_OpFlashes.h | 212 - .../ref/analyze_Showers.h | 1658 - .../SinglePhotonAnalysis/ref/analyze_Slice.h | 1010 - .../ref/analyze_Template.h | 26 - .../SinglePhotonAnalysis/ref/analyze_Tracks.h | 1275 - .../ref/bad_channel_matching.h | 129 - .../ref/fiducial_volume.h | 299 - sbncode/SinglePhotonAnalysis/ref/isolation.h | 662 - .../ref/job/CMakeLists.txt | 3 - .../job/eventweight_microboone_gLEE_2022.fcl | 88 - ..._microboone_genie_gLEE_2022_incl_knobs.fcl | 649 - ...SinglePhoton_1g1p_far_sideband_Data_v1.fcl | 125 - ...SinglePhoton_1g1p_far_sideband_Data_v2.fcl | 133 - ...Photon_NCpi0Filter_2g0p_BNBext_hist_v2.fcl | 147 - ...lePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl | 147 - .../ref/job/microboone_singlephoton.fcl | 78 - ...genie_common_uboone_NCDeltaRadFiltered.fcl | 93 - ...boone_NCRadiativeResonant_volActiveTPC.fcl | 94 - .../ref/job/run_SinglePhoton.fcl | 77 - .../ref/job/run_SinglePhoton_BNBext.fcl | 7 - .../ref/job/run_SinglePhoton_BNBext_CRT.fcl | 8 - .../ref/job/run_SinglePhoton_Data.fcl | 7 - .../ref/job/run_SinglePhoton_Data_CRT.fcl | 8 - .../ref/job/run_SinglePhoton_Data_calo.fcl | 10 - .../ref/job/run_SinglePhoton_Dirt.fcl | 10 - .../ref/job/run_SinglePhoton_Dirt_CRT.fcl | 12 - .../ref/job/run_SinglePhoton_FakeData.fcl | 13 - .../ref/job/run_SinglePhoton_MC.fcl | 4 - .../ref/job/run_SinglePhoton_NCpi0Filter.fcl | 95 - .../job/run_SinglePhoton_NCpi0Filter_2g0p.fcl | 95 - ...n_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl | 7 - ...run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl | 7 - ..._SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl | 10 - .../run_SinglePhoton_NCpi0Filter_BNBext.fcl | 7 - .../job/run_SinglePhoton_NCpi0Filter_Data.fcl | 7 - .../run_SinglePhoton_NCpi0Filter_Overlay.fcl | 10 - .../ref/job/run_SinglePhoton_Overlay.fcl | 10 - .../ref/job/run_SinglePhoton_Overlay_CRT.fcl | 13 - .../job/run_SinglePhoton_Overlay_FullSys.fcl | 15 - .../run_SinglePhoton_Overlay_FullSys_CRT.fcl | 3 - .../ref/job/run_SinglePhoton_Overlay_calo.fcl | 11 - .../ref/job/run_SinglePhoton_PhotoNu.fcl | 12 - .../ref/job/run_SinglePhoton_PhotoNu_CRT.fcl | 13 - .../ref/job/run_SinglePhoton_TextGen.fcl | 6 - .../ref/job/run_SinglePhoton_TextGen_CRT.fcl | 3 - .../run_eventweight_microboone_gLEE_2022.fcl | 45 - ...microboone_singlephoton_Splines_and_CV.fcl | 65 - .../ref/reco_truth_matching.h | 868 - .../ref/second_shower_search.h | 2168 - ups/product_deps | 2 +- 110 files changed, 312 insertions(+), 120023 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/BobbyVertexBuilder.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/DBSCAN.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/DetectorObjects.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_EventWeight.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_MCTruth.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_OpFlashes.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Slice.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Template.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/bad_channel_matching.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/isolation.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/prodgenie_common_uboone_NCDeltaRadFiltered_volActiveTpc.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_BNBext.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Data.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Data_calo.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Dirt.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_MC.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Overlay.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/job/run_SinglePhoton_Overlay_calo.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/leap.sh delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/make.sh delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/reco_truth_matching.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/second_shower_search.h delete mode 100644 sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/ref/DBSCAN.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.cc delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc delete mode 100644 sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/TruncMean.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_EventWeight.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Geant4.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_OpFlashes.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Slice.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Template.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/bad_channel_matching.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/fiducial_volume.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/isolation.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/CMakeLists.txt delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_gLEE_2022.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl delete mode 100644 sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h delete mode 100644 sbncode/SinglePhotonAnalysis/ref/second_shower_search.h diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 905287bfc..bb383951e 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -6,22 +6,22 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) -add_subdirectory(SBNEventWeight) -add_subdirectory(NuMuSelection) -add_subdirectory(OpDet) +#add_subdirectory(SBNEventWeight) +#add_subdirectory(NuMuSelection) +#add_subdirectory(OpDet) add_subdirectory(OpT0Finder) - -add_subdirectory(CAFMaker) -add_subdirectory(Metadata) - -add_subdirectory(Calibration) -add_subdirectory(FlashMatch) -add_subdirectory(LArRecoProducer) -add_subdirectory(TPCReco) - - -add_subdirectory(BeamSpillInfoRetriever) -add_subdirectory(FluxReader) -add_subdirectory(EventGenerator) -add_subdirectory(PID) -add_subdirectory(GeometryTools) +# +#add_subdirectory(CAFMaker) +#add_subdirectory(Metadata) +# +#add_subdirectory(Calibration) +#add_subdirectory(FlashMatch) +#add_subdirectory(LArRecoProducer) +#add_subdirectory(TPCReco) +# +# +#add_subdirectory(BeamSpillInfoRetriever) +#add_subdirectory(FluxReader) +#add_subdirectory(EventGenerator) +#add_subdirectory(PID) +#add_subdirectory(GeometryTools) diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h deleted file mode 100644 index 16ad3476f..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/Atlas.h +++ /dev/null @@ -1,393 +0,0 @@ -#ifndef __ATLAS_H__ -#define __ATLAS_H__ - -#include "larsim/MCCheater/BackTrackerService.h" -#include "larsim/MCCheater/ParticleInventoryService.h" -#include "SinglePhoton_module.h" - -/* - * Purpose of this header file, get the skeleton of all the maps and - * leave the contents to be filled inside the actual functions in - * other header files. - * - */ - -namespace single_photon -{ /*************** - * A class that designed for storing addresses for all associated (to an event) tracks, showers, - * and their cooresponding PFParticles. - * evt (input) - the event that we currently look at. - * *************/ - -// typedef std::vector< art::Ptr > PFParticleVector; -// typedef std::vector< art::Ptr > TrackVector; -// typedef std::vector< art::Ptr > ShowerVector; -// typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - class Atlas{//Initialize this with event address; - friend class SinglePhoton;//private as default - - public: - //Constructor - Atlas();//this might be useless; - //Overflow constructor 1; - Atlas( const art::Event &evt, - std::vector< std::string > labels, - bool is_data);//this initialize vectors and maps below - -// ~Atlas(){ -// MCParticleToTrackIdMap.clear(); -// }; -// //main stuffs that we feed into the vertex builder. - -/* - * The constructor takes care of the following basic recob objects. - * - */ - //the following recob objects are created through the overflow constructor 1 (see above); - std::vector< art::Ptr > particles;//this is loaded depends on the option m_run_all_pfps, configurable in the .fcl file. - std::vector< art::Ptr > all_pfparticles; - std::vector< art::Ptr > all_tracks; - std::vector< art::Ptr > all_showers; - std::vector< art::Ptr > all_hits; - std::vector< art::Ptr > all_opflashes; - //get the cluster handle for the dQ/dx calc - std::vector< art::Ptr > all_clusters; - std::vector> kalmanTrackVector; - std::vector> sliceVector; - - //MCTruth (only initialized when the sample is not data) - std::vector> mcTruthVector; - std::vector> matchedMCParticleVector; - -/* - * The overload constructor 1 takes care of the following maps. - * - */ - std::map< size_t, art::Ptr> IDToPFParticleMap; -// std::map< art::Ptr> PFParticleToIDMap;//This makse more consistant, but it needs works! - std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; - std::map< art::Ptr , std::vector> > PFParticleToMetadataMap;//old name pfParticleToMetadataMap; - std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; - std::map< art::Ptr , std::vector> > PFParticleToClustersMap; - std::map< art::Ptr , std::vector> > ClusterToHitsMap; - std::map, art::Ptr> PFParticlesToShowerReco3DMap; - std::map, art::Ptr> PFParticlesToShowerKalmanMap; - std::map,std::vector>> kalmanTrackToCaloMap; - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; - std::map< art::Ptr, std::vector> > sliceToHitsMap; - std::map> > sliceIDToPFParticlesMap; - std::map> > sliceIDToHitsMap; -/* - * Initially empty variables to be filled from other parts of the code. - * - */ -//The followings are taken care by the CollectTracksAndShowers_v2() in BobbyVertexBuilder.h - std::vector< art::Ptr > selected_tracks; - std::vector< art::Ptr > selected_showers; - std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. - std::vector< art::Ptr > more_showers; - //Maps for more pandora objects. - std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; - std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; - - std::map< art::Ptr , double > trackToDistMap; - std::map< art::Ptr , double > showerToDistMap; - -//The followings are taken care by the AnalyzeSlices() in analyze_Slice.h - std::map sliceIdToNuScoreMap; - //Pairs that connect PFParticle to sliceID. - std::vector,int>> primaryPFPSliceIdVec; - std::map< art::Ptr, int> PFPToSliceIdMap; - std::map< art::Ptr, bool> PFPToClearCosmicMap; - std::map< art::Ptr, bool> PFPToNuSliceMap; - std::map< art::Ptr, double> PFPToTrackScoreMap; - -//Maps for simb objects; for MC sample, not applied to data - - - //Filled in the CollectMCParticles_v2() in Singlephoton_module.cc - std::map> MCParticleToTrackIdMap; - std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; - std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; - std::map< art::Ptr, int> MCParticleToAncestorPdgMap; - - //Filled in the showerRecoMCmatching() in reco_truth_matching.h -// std::vector> matchedMCParticleVector; - std::map< art::Ptr, art::Ptr > showerToMCParticleMap; - - //Filled in the RecoMCTracks() in analyze_Tracks.h - std::map< art::Ptr, art::Ptr > trackToMCParticleMap; - - - //FindManyP's! - //specially for the number of coorresponding recob (pandora_objects) to a PFParticle; - // example: PFParticleIsATrack[particles.key()] gives the vector that containts all - // cooresponding tracks; - art::FindManyP< recob::Track >* PFParticleAsATrack; - art::FindManyP< recob::Shower >* PFParticleAsAShower; - -// art::FindManyP< recob::Track > PFParticleAsATrack(PFParticleHandle, evt, m_trackLabel); -// art::FindManyP< recob::Shower > PFParticleAsAShower(PFParticleHandle, evt, m_showerLabel); - - private: - /*********************** - * - * Wigets for constructing the different types of varaibels.in this class - * 1. HandleToVector; - * - * **********************/ - //1. Scratch from Handle, and return a equivalently useful vector. - //sample usage: - // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; - // recob::Hit dummy_hit;//This is to specify the template; - // std::vector> hitVector = HandleToVector(dummy_hit, evt, m_hitfinderLabel); - template //A helper template that allows you to make compliated types. - struct temporary_types{ - using type1 = std::vector>; - using type2 = art::ValidHandle>; - using type3 = std::vector; - }; - template //ref_type is only used to identify the temporary_types late. - typename temporary_types::type1 HandleToVector(recob_object ref_type, const art::Event &evt, std::string &label){ - - typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); - typename temporary_types::type1 Vector; - art::fill_ptr_vector(Vector,Handle); - return Vector; - } - - //2. Wiget 2 comes here.. - - }; - - -//sth similar to class DetectorObjects - -//create struct for Track and Shower to add more detail to them, i.e. the geoalgo class; - -//struct Track -//struct Shower - - - - - - - - -//THE HEADER FILE IS THE ABOVE - - - - //Constructor - Atlas::Atlas (){} - //Overloaded Constructor 1, initialize the essential variables - Atlas::Atlas ( const art::Event &evt, - std::vector labels, - bool is_data){ - - //PREPARE some recob objects; - //vector labels = {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel,m_generatorLabel, m_geantModuleLabel} - recob::PFParticle dummy_PFParticle; - all_pfparticles = HandleToVector(dummy_PFParticle, evt, labels[4]); - recob::Track dummy_track;//This is to specify the template; - all_tracks = HandleToVector(dummy_track, evt, labels[0]);//m_trackLabel - kalmanTrackVector = HandleToVector(dummy_track,evt,labels[6]);//m_showerKalmanLabel - - recob::Shower dummy_shower;//This is to specify the template; - all_showers = HandleToVector(dummy_shower, evt, labels[1]);//m_showerLabel - recob::Hit dummy_hit; - all_hits = HandleToVector(dummy_hit, evt, labels[2]);//m_hitfinderLabel - - recob::OpFlash dummy_opflash; - all_opflashes = HandleToVector(dummy_opflash, evt, labels[3]);//m_flashLabel - - recob::Cluster dummy_cluster; - all_clusters = HandleToVector(dummy_cluster, evt, labels[4]);//m_pandoraLabel - - recob::Slice dummy_slice; - sliceVector = HandleToVector(dummy_slice, evt, labels[4]); - - if(!is_data){ - //MCTruth Handle - simb::MCTruth dummy_geant; //for Geant info. - mcTruthVector = HandleToVector(dummy_geant, evt, labels[8]); - - simb::MCParticle dummy_genie; //for Genie info. - matchedMCParticleVector = HandleToVector(dummy_genie, evt, labels[9]); - } - //CREATE maps! - //Ingredient 1: Handles; I temporary define it here for mapping purpose; - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(labels[4]);//This is useful for FindManyP< reco::Track/Shower> - art::ValidHandle> const & clusterHandle = evt.getValidHandle>(labels[4]); - art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(labels[6]); - art::ValidHandle> const & sliceHandle = evt.getValidHandle>(labels[4]); - //a cross check - if (!pfParticleHandle.isValid()) - { - mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; - return; - } - - - //Ingredient 2: FindManyPs; these will be gone when construction finished - art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, labels[4]); - art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP spacePoints_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP hits_per_cluster(clusterHandle, evt, labels[4]); - art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, labels[5]); - art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, labels[6]); - art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, labels[7]); - art::FindManyP pfparticles_per_slice(sliceHandle, evt, labels[4]); - art::FindManyP hits_per_slice(sliceHandle, evt, labels[4]); - - //make maps here; - for(size_t i=0; i< all_pfparticles.size(); ++i){ - const art::Ptr pfp = all_pfparticles[i]; - PFParticlesToVerticesMap[pfp] = vertices_per_pfparticle.at(pfp.key());//old name: pfParticlesToVerticesMap; - - PFParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); - IDToPFParticleMap[pfp->Self()] = pfp; - PFParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); - PFParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - - //3D Showers - if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ - PFParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); - } - //---------Kalman Track Showers - if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ - PFParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); - } - } - //other maps not on pfParticles; - for(size_t i=0; i< all_clusters.size(); ++i){ - auto cluster = all_clusters[i]; - ClusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); - } - - //----- kalmon Cali - for(size_t i=0; i< kalmanTrackVector.size(); ++i){ - auto trk = kalmanTrackVector[i]; - if(cali_per_kalmantrack.at(trk.key()).size()!=0){ - kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); - } - } - - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; - sliceToPFParticlesMap[slice] = pfparticles_per_slice.at(slice.key()); - sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); - sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); - sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); - } - -//------- trackToMCParticleMap -------- -// if(!is_data){ -// //Fill in trackToMCParticleMap; -// //https://indico.fnal.gov/event/20453/session/6/contribution/4/material/slides/0.pdf -// //BackTrackerService and ParticleInventoryService -// art::ServiceHandle bt_serv; -// art::ServiceHandle pi_serv; -// //Get tracks -// art::Handle< std::vector > trackListHandle; -// std::vector > tracklist; -// if (evt.getByLabel(labels[0],trackListHandle)) art::fill_ptr_vector(tracklist, trackListHandle); -// //Get hit-track association -// art::FindManyP fmth(trackListHandle, evt, labels[0]); -// //Loop over all tracks -// for(size_t i=0; i > allHits = fmth.at(i); -// std::map trkide; -// cout<<"Size of hits "< hit = allHits[h]; -// //TrackIDE saves the energy deposition for each Geant particle ID -// std::vector TrackIDs = bt_serv->HitToEveTrackIDEs(hit); -// cout<<"Size of TrackIDs "<::iterator ii = trkide.begin(); ii!=trkide.end(); ++ii){ -// cout<<"Possible IDs "<first<second; -// if ((ii->second)>maxe){ -// TrackID = ii->first; //TrackID maxe = ii->second; //Energy -// } } -// // Now have trackID, so get PdG code. -// -// // const simb::MCParticle *particle = pi_serv->TrackIdToParticle_P(TrackID); -// -// cout<<"Ptr::MCP CHECK "< mcp : matchedMCParticleVector){ -// //cout<<"Match ID "<TrackId()<TrackId() == TrackID){ cout<<"Yes"< //Use LINES and COLS to get the dimensions of the screen - -using namespace std; - -namespace single_photon -{ - //Printout Gadgets - void verbose_check( bool fverbose, bool debug_message ){ - - std::cout<<" Verbose output is "; - if(fverbose){ - std::cout<<"on;"; - }else{ - std::cout<<"off;"; - } - std::cout<<" Debug message is "; - if(debug_message){ - std::cout<<"on."; - }else{ - std::cout<<"off."; - } - std::cout< > candidate_particles(package.particles);//CHECK, always vertex the most nu-like slice. - - //we dont need the run_all_particle boolean, because it is considered under package.particles; - if(candidate_particles.size() == 0){ - mf::LogDebug("SinglePhoton") << " No PFParticles can be considered for vertexing.\n"; - } - - for(const art::Ptr &pParticle : candidate_particles){ //candidate_particles are determined in above if-else statement. - const std::vector< art::Ptr > ToBeAddedTracks((package.PFParticleAsATrack)->at(pParticle.key())); - const std::vector< art::Ptr > ToBeAddedShowers((package.PFParticleAsAShower)->at(pParticle.key())); - - const unsigned int nTracks(ToBeAddedTracks.size()); - const unsigned int nShowers(ToBeAddedShowers.size()); - - if( nTracks + nShowers == 0 ){//Um... the PFParticle is not identified as track or shower; - mf::LogDebug("SinglePhoton") << " No tracks or showers were associated to PFParticle " << pParticle->Self() << "\n"; - }else if( nTracks + nShowers > 1 ){ - //Check, do I need throw?? - throw cet::exception("SinglePhoton") << " There were " << nTracks << " tracks and " << nShowers << " showers associated with PFParticle " << pParticle->Self(); - //Ok, if going through the below if-elses, it means we have a shower/ a track! - - }else if( nTracks == 1 ){ //Add a Track - if(package.PFPToNuSliceMap[pParticle]){//add the package.selected nu_slice particle; - (package.selected_tracks).push_back(ToBeAddedTracks.front()); - (package.trackToNuPFParticleMap)[(package.selected_tracks).back()]= pParticle; - - }else{//add other nu-like PFParticle; - (package.more_tracks).push_back(ToBeAddedTracks.front()); - (package.trackToNuPFParticleMap)[(package.more_tracks).back()]= pParticle; - } - - if(fverbose){ - std::cout<<"SinglePhoton::CollectTracksAndShowers_v2() \t||\t"; - std::cout<<"adding to trackToNuPFParticleMap this track with id "<< ToBeAddedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<& map, vector target_pdg, int loops){ - int current_pdg = (particle).PdgCode(); - int mother_id = (particle).Mother(); - simb::MCParticle mother_particle = map[mother_id]; - bool match_targetpdg = false; - - for(int& i :target_pdg){ - if(current_pdg == i){ - match_targetpdg = true; - break; - } - } - loops--; - if(loops < 0 || (current_pdg != mother_particle.PdgCode() && match_targetpdg) || mother_id < 0){//stop searching mother; - return particle; - } - - return TraceMothers(mother_particle, map, target_pdg,loops); - } - - art::Ptr< simb::MCParticle > TraceMothers( art::Ptr< simb::MCParticle > particle, std::map >& map, vector target_pdg, int loops){ - int current_pdg = particle->PdgCode(); - int mother_id = particle->Mother(); - art::Ptr< simb::MCParticle > mother_particle = map[mother_id]; - bool match_targetpdg = false; - - for(int& i :target_pdg){ - if(current_pdg == i){ - match_targetpdg = true; - break; - } - } - loops--; - if(loops < 0 || (current_pdg != mother_particle->PdgCode() && match_targetpdg) || mother_id < 0){//stop searching mother; - return particle; - } - - return TraceMothers(mother_particle, map, target_pdg,loops); - } - - - void SinglePhoton::CollectMCParticles_v2( - const art::Event &evt, - class Atlas & package){ - - int screen_width = 86; - bool debug_message = true; - bool fverbose = m_is_verbose; - - std::cout<<"SinglePhoton::CollectMCParticles_v2() \t||\t"; - verbose_check( fverbose, debug_message); - - art::Handle< std::vector< simb::MCParticle> > theParticles; - evt.getByLabel(m_geantModuleLabel, theParticles); - - if (!theParticles.isValid()){ - mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; - return; - } else { - mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; - } - - art::FindOneP theTruthAssns(theParticles, evt, m_geantModuleLabel); - package.MCParticleToTrackIdMap.clear(); - - // Strategy: ----------------------- - // 1. Prepare store_MCTruths, which contain MCParticles from MCTruths - // that could be possibly mapped to the MCParticles from Geant; - // 2. Examine all MCParticles at Geant level, and find their ancestor Pdg, - // i.e. Pdg obtained from MCParticles from Genie; - // fill in MCParticleToAncestorPdgMap; - - //doing 1. Prepare store_MCTruths. - std::map < int, simb::MCParticle > MCT_trackIdToDaughterMap;//MCTruth that can be mapped by Geant MCP; - std::map < int, simb::MCParticle > MCT_trackIdToMCParticleMap; //MCTruth that can provide ancestor Pdg to MCPmother; - vector looking_for_mothers = {111, 1114, 2114, 2214, 2224, -111, -1114, -2114, -2214, -2224}; - - for(size_t i = 0; iNParticles(); j++){ - //collect MCTruth candidate; - simb::MCParticle check_mct = package.mcTruthVector[i]->GetParticle(j); - MCT_trackIdToMCParticleMap[ check_mct.TrackId()] = check_mct; - - if(debug_message){ - std::cout<<" \n MCTruth Track Id:"< store_InvisibleMCTruths;//MCTruth that can be mapped to MCPmother; -// std::vector< simb::MCParticle> store_VisibleMCTruths;//MCTruth that can be mapped to MCPmother; - - std::map < int, int > MCP_trackIdToPi0PdgMap; //Record trackId of ancestor Pi0 from MCPrticle; - - if(false){ - cout<<"This is a preview"<size(); i < iEnd; ++i){//theParticles are pointers to all MCParticles. - const art::Ptr particle(theParticles, i); - if(debug_message){ - std::cout<<"\n MCParticle Track Id:"<TrackId(); //gives the id of the MCParticle - std::cout<<" Mother ID:"<Mother(); - std::cout<<" Pdg Code:"<PdgCode(); - std::cout<<" Status Code:"<StatusCode(); - cout<<"; energy: "<E(); - } - } - cout<<"End of Previse"<size(); i < iEnd; ++i){//theParticles are pointers to all MCParticles. - //theTruthAssns are MCTruth with geantModuleLabel - const art::Ptr particle(theParticles, i); - const art::Ptr truth(theTruthAssns.at(i)); - - package.MCTruthToMCParticlesMap[truth].push_back(particle); - package.MCParticleToMCTruthMap[particle] = truth;//truth ->GetParticles() will give a bunch of particles that has not been linked. - package.MCParticleToTrackIdMap[particle->TrackId()] = particle; - - //---------- Find out MCParticles that would be mapped to MCTruth Pdg, i.e. particles produced by Genie - int mother_track = particle->Mother(); - int ancestor_pdg = particle->PdgCode();//itself pdg by default - //pdg==22 is for pi0 search; Mother() is for both pi0 and Delta; -// cout<<"\n # of daughter is left: "<first<<", "; -// } - if(false){ - std::cout<<"\n MCParticle Track Id:"<TrackId(); //gives the id of the MCParticle - std::cout<<" Mother ID:"<Mother(); - std::cout<<" Pdg Code:"<PdgCode(); - std::cout<<" Status Code:"<StatusCode(); - cout<<"; energy: "<E(); - } - - //true, fill the MCParticleToAncestorPdgMap with ancestor pdg; - //false, fill with self pdg; - - if(particle->Mother() == 0){//the goal is to change ancestor_pdg, and erase an element in MCT_trackIdToDaughterMap. - for(auto const & [a,b] : MCT_trackIdToDaughterMap){//map the ancestor pdg to each MCParticle - bool match_pdg = ( b.PdgCode() == ancestor_pdg ); - bool match_energy = ( b.E() - particle->E() < 0.0005); - if(match_pdg && match_energy){//woo, match to the MCTruth! now look for ancestor! - -// cout<<"\n Trace (candidate MCTruth daughter) TrackId "<TrackId()<PdgCode()); - cout<<"this pgd is "<TrackId(), particle->PdgCode()); - if(debug_message) cout<<" Mark down pi0 Track Id "<TrackId()<TrackId()<< " Pdg: "<PdgCode(); - // art::Ptr< simb::MCParticle > mother_mcp = TraceMothers(particle, package.MCParticleToTrackIdMap, {111, -111} , 1); - // cout<<" Found mother, TrackId "<TrackId()<<" with Pdg "<PdgCode()<<" energy: "<E(); - // int mother_pdg = mother_mcp->PdgCode(); - // for(auto iterator = MCT_trackIdToPi0AncestorMap.begin(); iterator != MCT_trackIdToPi0AncestorMap.end(); ++iterator){ - // bool match_pdg = ( (iterator->second).PdgCode() == mother_pdg ); - // bool match_energy = ( (iterator->second).E() - mother_mcp->E() < 0.0005); - // if(match_pdg && match_energy){//woo, match to the MCTruth! this photon is from MCTruth pi0! - // ancestor_pdg = mother_pdg; - // break; - // } - // } - } - - package.MCParticleToAncestorPdgMap.emplace(particle, ancestor_pdg); - }//End of looping all MCparticles; store_MCPcandidates are prepared. - - //--- - //Below is to check the result; - //--- - - if(fverbose){ - std::cout<<"\nSinglePhoton::CollectMCParticles_v2() \t||\t "; - std::cout<<"the number of all MCParticles (not necessarily in use) in the event is "<size()<TrackId(); - cout<<" "<PdgCode(); - cout<<" "<Mother()<<" | "; - cout< temp_max_value) temp_max_value = it.second; - // } - // for (auto it:package.showerToDistMap){ - // if(it.second > temp_max_value) temp_max_value = it.second; - // }//ok, now find the furthest distance; - - - //Declear two classes to kick off vertexing - VertexBuilder vbuilder;//it was named vb - ParticleAssociations_all candidates;// it was named pas - - //Initialize creteria for reconstruction. - vbuilder.SetParameters({start_prox, shower_prox, cpoa_vert_prox, cpoa_trackend_prox}); - - // if(fvbuildert.ftree) vbuilder.SetVBT(&fvbuildert); - //prepare parameters for pre-check # of tracks and showers; - std::vector< art::Ptr > use_tracks(package.selected_tracks);//CHECK all tracks - std::vector< art::Ptr > use_showers(package.selected_showers); - - - auto trackmap = package.trackToDistMap; - auto showermap = package.showerToDistMap; - //-- Get a preview of # of tracks and showers first - std::vector tem_bobbyshowersv; - std::vector tem_bobbytracksv; -// double temp_max_value = 200;//objects that is too far away from the Pandora Reco... - bool successful_vertex = false;//true, do them all together; false, do them by step; - bool one_for_all = false;//true, means load more_tracks/showers all at once; sucessful_vertex has to be true to make it work; - // std::vector< int > target_topo = {1,1};//{1,2}<->1s2t signal; - bool reset_bobbyvertex = true; - // int loop_tracker = 1; - // int max_loops = 4;//consider all objects within temp_max_value distance after the 4th loop. - - //update objects? - if(more_objects && one_for_all) { - for (auto object : package.more_tracks){ - use_tracks.push_back(object); - } - for (auto object : package.more_showers){ - use_showers.push_back(object); - } - } - //sort out values of both maps first - vector all_dist; - for (auto it:trackmap){ - if(it.second > nearby_vertex_dist){ - trackmap.erase(it.first); - } else{ - all_dist.push_back(it.second); - } - } - for (auto it:showermap){ - if(it.second > nearby_vertex_dist){ - showermap.erase(it.first); - } else{ - all_dist.push_back(it.second); - } - }//ok, now find the furthest distance; - std::sort(all_dist.begin(), all_dist.end());// distance from low to high; - - if(debug_message){ - cout<<"\nPreview Bobby Reco. Preformance"<0){ - ParticleAssociations_all candidates_copy(candidates); - candidates_copy.SetVerbose(false); - vbuilder.SetVerbose(false); - //CHECK control what tracks and showers to look at - if(more_objects){ - //nearby_vertex_dist = all_dist[(all_dist.size()-1)*loop_tracker/max_loops] + 0.01; -// nearby_vertex_dist = 80;//all_dist[(all_dist.size()-1)*loop_tracker/max_loops] + 0.01; - cout<<"within the distance: "<= target_topo[0] && temp_num_tracks >= target_topo[1])||all_dist.size()<1) successful_vertex = true; - - if(fverbose){//Over view of the inputs - cout< max_loops){ - break; - } - */ - }//end loop of testing diff. inputs for vertexing. - - candidates.SetVerbose(debug_message); - vbuilder.SetVerbose(debug_message); - //Looks good, then proceed to really fill in trees; - - // cout< tem_bobbyvertex_pos_xv; - std::vector tem_bobbyvertex_pos_yv; - std::vector tem_bobbyvertex_pos_zv; - std::vector tem_bobbyphotonshowerv; - std::vector tem_bobbypi0daughterv; - std::vector tem_bobbydeltaradppdaughterv; - std::vector tem_bobbydeltaradmdaughterv; - std::vector tem_bobbydeltaradpdaughterv; - std::vector tem_bobbydeltarad0daughterv; - std::vector tem_bobbyotherdaughterv; - std::vector tem_bobbyoverlayv; - std::vector tem_bobbyprotontrackv; - std::vector tem_same_slicev; - - std::vector> tem_track_daughter_pdgv; - std::vector> tem_shower_daughter_pdgv; - double min_bobbyvertexradius = 999; - size_t min_index = 0; - size_t temp_counter = 0; - - if(debug_message){ - cout<<"-- Check the reco-MC track Map (x-position - TrackId):"<Start().X()<<" "<TrackId()<ShowerStart().X()<<" "<TrackId()< get_a_track_daughter_pdg; - std::vector get_a_shower_daughter_pdg; - bool find_MC = true; - - for(size_t const n : particle_associated.GetObjectIndices()) { - int index; - art::Ptr temp_mcp; - - m_bobbyvertexradius = particle_associated.GetGoodness(); - //mark down the smallest radius; - if(m_bobbyvertexradius < min_bobbyvertexradius && m_bobbyvertexradius > 0){ - min_bobbyvertexradius = m_bobbyvertexradius; - min_index = temp_counter; - } - - if(detos.GetRecoType(n) == detos.ftrack_reco_type) {//it is a track - ++temp_num_tracks; - index = detos.GetTrackIndexFromObjectIndex(n); - if(debug_message)cout<<"A track "<< n <<" feed-in order "< tempp = package.trackToNuPFParticleMap.find(use_tracks[index])->second; - for(auto const &[a,b]:package.sliceIDToPFParticlesMap){ - if(std::find(b.begin(),b.end(),tempp)!=b.end() ) { - if(debug_message) cout<<"SLICE ID "<second;//CHECK THIS - get_a_track_daughter_pdg.push_back(temp_mcp->PdgCode()); - } - } - - if(detos.GetRecoType(n) == detos.fshower_reco_type) {//it is a shower - - ++temp_num_showers; - index = detos.GetShowerIndexFromObjectIndex(n); - if(debug_message) cout<<"A shower index "<< n <<" feed-in order "< tempp = package.showerToNuPFParticleMap.find(use_showers[index])->second; - for(auto const &[a,b]:package.sliceIDToPFParticlesMap){ - if(std::find(b.begin(),b.end(),tempp)!=b.end() ) { - // cout<<"SLICE ID "<second; - get_a_shower_daughter_pdg.push_back(temp_mcp->PdgCode()); - } - } - //identify shower/track MCTruth info. - if(debug_message) cout<<" TrackId "<TrackId()<<" PdgCode "<PdgCode(); - switch (temp_mcp->PdgCode()){ - case 2212: - get_a_proton++; - break; - case 22: - get_a_photon++; - break; - default: - break; - } - //identify the ancestor! -// art::Ptr temp_mcpmother= package.MCParticleToAncestorMap.find(temp_mcp)->second; - -// if(debug_message) cout<<" Ancestor PdgCode "<second; - switch( package.MCParticleToAncestorPdgMap.find(temp_mcp)->second){ -// switch(111){ - //second+ generation MCParticles lose connection to the ancestor, because I didnt trace all the way up in the AncestorToPdgMap; - case 2224://delta++ - if(debug_message) cout<<" from delta++"< - // tem_track_daughter_pdgv.push_back(get_a_track_daughter_pdg); - tem_shower_daughter_pdgv.push_back(get_a_shower_daughter_pdg); - - m_bobbyvertexradiusv.push_back(m_bobbyvertexradius); - } - - - //Finalize Bobby info. and pick a vertex set. - m_bobbysameslicev = tem_same_slicev; - m_bobbyvertex_pos_xv = tem_bobbyvertex_pos_xv; - m_bobbyvertex_pos_yv = tem_bobbyvertex_pos_yv; - m_bobbyvertex_pos_zv = tem_bobbyvertex_pos_zv; - m_bobbyprotontrackv = tem_bobbyprotontrackv; - m_bobbyphotonshowerv = tem_bobbyphotonshowerv; - m_bobbypi0daughterv = tem_bobbypi0daughterv; - m_bobbydeltaradppdaughterv = tem_bobbydeltaradppdaughterv; - m_bobbydeltaradmdaughterv = tem_bobbydeltaradmdaughterv; - m_bobbydeltaradpdaughterv = tem_bobbydeltaradpdaughterv; - m_bobbydeltarad0daughterv = tem_bobbydeltarad0daughterv; - m_bobbyotherdaughterv = tem_bobbyotherdaughterv; - m_bobbyoverlayv = tem_bobbyoverlayv; - m_bobbytracksv = tem_bobbytracksv; - m_bobbyshowersv= tem_bobbyshowersv; - - // for( size_t index = 0; index< m_bobbyvertex_pos_xv.size() ; index++){//loop over bobbyvertex - //metric for vertex: - //Topology: - //VertexSize/doogness: - - // if(temp_dist < best_vertex_dist){}//update when find a closer vertex to the pandora vertex. - if(true){//maybe pick the smallest vertex radius (for now), - // best_vertex_dist = temp_dist; - m_bobbyvertex_pos_x = m_bobbyvertex_pos_xv[min_index]; - m_bobbyvertex_pos_y = m_bobbyvertex_pos_yv[min_index]; - m_bobbyvertex_pos_z = m_bobbyvertex_pos_zv[min_index]; - m_bobbytracks = m_bobbytracksv[min_index]; - m_bobbyshowers = m_bobbyshowersv[min_index]; - m_bobbyphotonshower = m_bobbyphotonshowerv[min_index]; - m_bobbypi0daughter = m_bobbypi0daughterv[min_index]; - m_bobbydeltaradppdaughter = m_bobbydeltaradppdaughterv[min_index]; - m_bobbydeltaradmdaughter = m_bobbydeltaradmdaughterv[min_index]; - m_bobbydeltaradpdaughter = m_bobbydeltaradpdaughterv[min_index]; - m_bobbydeltarad0daughter = m_bobbydeltarad0daughterv[min_index]; - m_bobbyotherdaughter = m_bobbyotherdaughterv[min_index]; - m_bobbyoverlay = m_bobbyoverlayv[min_index]; - m_bobbyprotontrack = m_bobbyprotontrackv[min_index]; - // m_bobbytrackdaughter_pdg = tem_track_daughter_pdgv[min_index]; - // m_bobbyshowerdaughter_pdg = tem_shower_daughter_pdgv[min_index]; - //CHECK add shower/track daughter here; - } - // } - - //if( m_run_all_pfps && m_bobbyvertexing_more &&m_bobbytracks + m_bobbyshowers < 2&& run_count < 2 ){//repeat with 0,1 - // run_count++; - // cout<<"Need more objects. Now run the "< -#include -#include -#include -#include -#include - - -class DBSCAN{ - - public: - double m_eps; - int m_minpts; - - /// Default constructor - DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - - /// Default destructor - ~DBSCAN(){} - - std::vector Scan2D(std::vector> &pts); - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - int UnionSets(std::vector> &seed, std::vector> &pts); -}; - -std::vector DBSCAN::Scan2D(std::vector> &pts){ - - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - this->UnionSets(seed_set, new_neighbours); - } - } - } - return label; - -} - - - -std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; - - //VERY simple, will update soon to a DB - - - for(size_t ip=0; ip p = pts[ip]; - - double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); - - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - - } - } - return neighbours; -} - -int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - - //VERY simple, will update soon if it works - for(auto &p:pts){ - - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } - - } - - - - return 0; -} - - -#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc deleted file mode 100644 index e77935b29..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.cc +++ /dev/null @@ -1,1656 +0,0 @@ -#include "SinglePhoton_module.h" -#include "analyze_OpFlashes.h" -#include "analyze_Tracks.h" -#include "analyze_Showers.h" -#include "analyze_Template.h" -#include "analyze_MCTruth.h" -#include "analyze_EventWeight.h" -#include "analyze_Slice.h" -#include "second_shower_search.h" -#include "isolation.h" -#include "BobbyVertexBuilder.h" -#include "Atlas.h" - -using namespace std; - -namespace single_photon -{ - //constructor - SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDAnalyzer(pset) - { - this->reconfigure(pset); - theDetector = lar::providerFrom(); - detClocks = lar::providerFrom(); - SCE = lar::providerFrom(); - geom = lar::providerFrom(); - - } - - void SinglePhoton::reconfigure(fhicl::ParameterSet const &pset) - { - // cout<<"\n\n\n\n\n\n Reconfigure!"<("PrintOut", true); - m_is_verbose = pset.get("Verbose",false); - m_use_PID_algorithms = pset.get("usePID",false); - m_use_delaunay = pset.get("useDelaunay",false); - m_is_data = pset.get("isData",false); - m_is_overlayed = pset.get("isOverlayed",false); - - m_pandoraLabel = pset.get("PandoraLabel"); - m_trackLabel = pset.get("TrackLabel"); - m_sliceLabel = pset.get("SliceLabel","pandora"); - m_showerLabel = pset.get("ShowerLabel"); - m_caloLabel = pset.get("CaloLabel"); - m_flashLabel = pset.get("FlashLabel"); - m_potLabel = pset.get("POTLabel"); - m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change - m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); - m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); - m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); - // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); - m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); - m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); - m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); - - m_generatorLabel = pset.get("GeneratorLabel","generator"); - m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); - m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); - m_geantModuleLabel = pset.get("GeantModule","largeant"); - m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); - m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); - - - m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); - m_runCRT = pset.get("runCRT",false); - m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); - - m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); - - //Some track calorimetry parameters - m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); - m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); - m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? - m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); - - //Some shower calorimetry parameters - m_work_function = pset.get("work_function"); - m_recombination_factor =pset.get("recombination_factor"); - //m_gain =pset.get("gain"); - m_gain_mc =pset.get>("gain_mc"); - m_gain_data =pset.get>("gain_data"); - m_wire_spacing = pset.get("wire_spacing"); - m_width_dqdx_box = pset.get("width_box"); - m_length_dqdx_box = pset.get("length_box"); - m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); - m_pidLabel = pset.get("ParticleIDLabel","particleid"); - m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); - - m_run_all_pfps = pset.get("runAllPFPs",false); //See .fcl file! - m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); - m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); - - //------------ BobbyVertexBuilder --------------- - m_bobbyvertexing_more = pset.get("BobbyVertex_more_object", false); - //------------ BobbyVertexBuilder --------------- - - rangen = new TRandom3(22); - bool_make_sss_plots = true; - - std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; - std::vector delta_pdg_list = {2224,2214,1114,2114}; - for(size_t i=0; i< delta_pdg_list.size(); ++i){ - is_delta_map[delta_pdg_list[i]] = delta_names[i]; - is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; - } - - //output text file of events can be set to true - //initialize outfile - //io stream to write to .txt file for EVD - // std::ofstream out_stream; - - if (m_print_out_event && false){ - - out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); - if (!out_stream.is_open()){ - std::cout<<"ERROR output file not open"< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; - sssVetov1 = new ReadBDT(inputVars); - - - } - - //------------------------------------------------------------------------------------------------------------------------------------------ - - void SinglePhoton::analyze(const art::Event &evt) - {//analyzing one event per run! - - m_is_verbose = true; - std::cout<<"---------------------------------------------------------------------------------"<SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc - - this->ClearVertex(); - - //******************************Setup*******************************************************/ - //******************************************************************************************/ - // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. - // Make sure under the hood you understand this! - // ------------------------ - // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g - // tracks->pfparticles->hits - // tracks->pfparticles->spacepoints ..etc.. - // - // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. - - - //BadChannels - art::Handle > badChannelHandle; - evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle); - std::vector badChannelVector = *(badChannelHandle); - - - - //And some verticies. - art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> vertexVector; - art::fill_ptr_vector(vertexVector,vertexHandle); - - - //HERE COMES THE Atlas!!! - Atlas object_container(evt, {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel, m_generatorLabel, m_geantModuleLabel}, m_is_data); - - //still need these handls for now; - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel);//This is useful for FindManyP< reco::Track/Shower> - art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; - art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); - std::vector> flashVector = object_container.all_opflashes; - - //add new FindManyP - art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); - - //Get back to original structure; - //typedef std::map< size_t, art::Ptr> PFParticleIdMap; - std::vector> pfParticleVector = object_container.all_pfparticles; - std::vector> hitVector = object_container.all_hits; - std::vector< art::Ptr > clusterVector = object_container.all_clusters; - std::vector> sliceVector = object_container.sliceVector; - - - PFParticleIdMap pfParticleMap = object_container.IDToPFParticleMap; - std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap = object_container.PFParticlesToVerticesMap; - std::map, std::vector> > pfParticleToMetadataMap = object_container.PFParticleToMetadataMap; -// std::map, art::Ptr> pfParticlesToShowerReco3DMap = object_container.PFParticlesToShowerReco3DMap; - std::map, art::Ptr> pfParticlesToShowerKalmanMap = object_container.PFParticlesToShowerKalmanMap; - std::map,std::vector>> kalmanTrackToCaloMap = object_container.kalmanTrackToCaloMap; - std::map, std::vector> > pfParticleToSpacePointsMap = object_container.PFParticleToSpacePointsMap; - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap = object_container.sliceToPFParticlesMap; - std::map< art::Ptr, std::vector> > sliceToHitsMap = object_container.sliceToHitsMap; - std::map> > sliceIDToPFParticlesMap = object_container.sliceIDToPFParticlesMap; - std::map> > sliceIDToHitsMap = object_container.sliceIDToHitsMap; - std::map, std::vector> > pfParticleToClustersMap = object_container.PFParticleToClustersMap; -// std::map, std::vector> > clusterToHitsMap = object_container.ClusterToHitsMap; - - - //Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: - //-------------------------------- - // Produce two PFParticle vectors containing final-state particles: - // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis - // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis - std::vector< art::Ptr > crParticles; - std::vector< art::Ptr > nuParticles; - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); - - //if not running over neutrino slice only, use all pfp's in event - if (m_run_all_pfps){ - nuParticles = pfParticleVector; - } - - - //taking out the Larpandora helper functions here because they don't match to non-neutrino slice hits for some reason - - //OK Here we build two IMPORTANT maps for the analysis, (a) given a PFParticle get a vector of hits.. - //and (b) given a single hit, get the PFParticle it is in (MARK: is it only one? always? RE-MARK: Yes) - std::map, std::vector> > pfParticleToHitsMap; - // std::map, art::Ptr> hitToPFParticleMap; - //Using a pandora helper here, but to be honest we should probably just build using normal associations so keep independant if pssoble - // lar_pandora::LArPandoraHelper::BuildPFParticleHitMaps(evt, m_pandoraLabel, pfParticleToHitsMap, hitToPFParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters); - - //use pfp->cluster and cluster->hit to build pfp->hit map - //for each PFP - for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; - - //make empty vector to store hits - std::vector> hits_for_pfp = {}; - - //for each cluster, get the associated hits - for (art::Ptr cluster: clusters_vec){ - std::vector> hits_vec = object_container.ClusterToHitsMap[cluster]; - - //insert hits into vector - hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); - } - - //fill the map - pfParticleToHitsMap[pfp] = hits_for_pfp; - - }//for each pfp - - // Test ground for some slice stuff - std::cout<<"SliceTest: there are "< nu_scores; - bool isSelectedSlice = false; - int primaries = 0; - int primary_pdg = 0; - - for(auto &pfp: pfps){ - std::vector> metadatas = pfParticleToMetadataMap[pfp]; - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - //for each of the things in the list - if(propertiesmap.count("NuScore")==1){ - nu_scores.push_back(propertiesmap["NuScore"]); - } - if(propertiesmap.count("IsNeutrino")==1){ - isSelectedSlice = true; - } - } - - if (pfp->IsPrimary()) { - primaries++; - primary_pdg = (pfp->PdgCode()); - } - /*if (!pfp->IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - if(isNeutrino){ - isSelectedSlice = true; - }*/ - } - - if(nu_scores.size()>0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. - //tracks is a vector of recob::Tracks and same for showers. - //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. - - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind -// std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score -// std::map, bool> object_container.PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise -// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's -// std::map,bool> PFPToNuSliceMap; -// std::map,double> PFPToTrackScoreMap; -// std::map sliceIdToNumPFPsMap; - //above are all filled in analyze slice - - //Need the following to identify a PFParticle is a track or a shower; - //Keng is going to pack these FindManyP up to a function using the pfParticleHandle; - - -// cout<<"CHECK! create object\n\n\n\n"< pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); - art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); - object_container.PFParticleAsATrack = &pfPartToTrackAssoc; - object_container.PFParticleAsAShower = &pfPartToShowerAssoc; - //Oooohu, here we go! - -// int run_count = 0; -//redo_event: - this->AnalyzeSlices( - object_container.PFParticleToMetadataMap, - object_container.IDToPFParticleMap, - object_container.primaryPFPSliceIdVec, - object_container.sliceIdToNuScoreMap, - object_container.PFPToClearCosmicMap, - object_container.PFPToSliceIdMap, - object_container.PFPToNuSliceMap, - object_container.PFPToTrackScoreMap); - - this->CollectTracksAndShowers_v2(evt, object_container); //This tells what showers and tracks to use. - std::vector< art::Ptr > tracks; - tracks.reserve( object_container.selected_tracks.size() + object_container.more_tracks.size() ); - tracks.insert( tracks.end(), object_container.selected_tracks.begin(), object_container.selected_tracks.end() ); - tracks.insert( tracks.end(), object_container.more_tracks.begin(), object_container.more_tracks.end() ); - - std::vector< art::Ptr > showers; - showers.reserve( object_container.selected_showers.size() + object_container.more_showers.size() ); - showers.insert( showers.end(), object_container.selected_showers.begin(), object_container.selected_showers.end() ); - showers.insert( showers.end(), object_container.more_showers.begin(), object_container.more_showers.end() ); - - - - // std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap = object_container.trackToNuPFParticleMap; //give access to the PFParticle via track/shower - // std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap = object_container.showerToNuPFParticleMap; - - // std::map> MCParticleToTrackIdMap = object_container.MCParticleToTrackIdMap; - - //m_vertex_pos_x / y/ z are ready to be used now; - - - geoalgo::Point_t pvertex(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z); - //use object_container.trackToDistMap/showerToDistMap; - m_is_verbose = false; - this->AnalyzeTracks( - object_container, - pvertex, - tracks, - object_container.trackToNuPFParticleMap, - pfParticleToSpacePointsMap, - object_container.MCParticleToTrackIdMap,//disabled - object_container.sliceIdToNuScoreMap, - object_container.PFPToClearCosmicMap, - object_container.PFPToSliceIdMap, - object_container.PFPToTrackScoreMap, - object_container.PFPToNuSliceMap, - pfParticleMap); - - this->AnalyzeShowers( - object_container, - pvertex, - showers, - object_container.showerToNuPFParticleMap, - pfParticleToHitsMap, - pfParticleToClustersMap, - object_container.ClusterToHitsMap, - object_container.sliceIdToNuScoreMap, - object_container.PFPToClearCosmicMap, - object_container.PFPToSliceIdMap, - object_container.PFPToNuSliceMap, - object_container.PFPToTrackScoreMap, - pfParticleMap, - object_container.PFParticlesToShowerReco3DMap); - m_is_verbose = true; - - if(!m_is_data){ - //Borrow the following from MCTruth - art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); - - - //mcc9 march miniretreat fix - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - m_test_matched_hits = 0; - - for(size_t j=0; j hit = hitVector[j]; - - particle_vec.clear(); match_vec.clear(); //only store per hit - - mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); - - if(particle_vec.size() > 0){ - m_test_matched_hits++; - } - - } - this->CollectMCParticles_v2(evt, object_container); -// this->CollectMCParticles( -// evt, -// m_geantModuleLabel, -// object_container.MCTruthToMCParticlesMap, -// object_container.MCParticleToMCTruthMap, -// object_container.MCParticleToTrackIdMap);//created here; - - this->ResizeShowers(showers.size()); - this->ResizeTracks(tracks.size()); - - this->showerRecoMCmatching(//Shower MCTruth here? - showers, - object_container.showerToMCParticleMap, //created here - object_container.showerToNuPFParticleMap, - pfParticleToHitsMap, - mcparticles_per_hit, //see above - object_container.matchedMCParticleVector, //created here - pfParticleMap, - object_container.MCParticleToTrackIdMap, //input - object_container.sliceIdToNuScoreMap, - object_container.PFPToClearCosmicMap, - object_container.PFPToSliceIdMap, - object_container.PFPToNuSliceMap); - - std::vector trk_overlay_vec = recoMCmatching>( - tracks, - object_container.trackToMCParticleMap, //created here - object_container.trackToNuPFParticleMap, - pfParticleToHitsMap, - mcparticles_per_hit, - object_container.matchedMCParticleVector); - - this->RecoMCTracks(//Find Track MCTruth here? - tracks, - object_container, - object_container.trackToNuPFParticleMap, - object_container.trackToMCParticleMap, - object_container.MCParticleToMCTruthMap, - object_container.matchedMCParticleVector, - //mcParticleVector, - object_container.MCParticleToTrackIdMap, - object_container.sliceIdToNuScoreMap, - object_container.PFPToClearCosmicMap, - object_container.PFPToSliceIdMap, - trk_overlay_vec); - } - //------------------------------- - - - //---------- VertexBuilder-------------- - //use the new the new class for variables and vertexing. - // ParticleAssociations_all const & bobby_particle_associations = BobbyVertexBuilder_ext(object_container, m_bobbyvertexing_more ); - BobbyVertexBuilder(object_container, m_bobbyvertexing_more ); - //introduce a for loop for all particle associations identified by Bobby's VertexBuilder - -/*CHECK - -std::cout<<"Filling in Bobby's Vertex info. with "< temp_MCtrack = object_container.trackToMCParticleMap.find(tracks[trackindex])->second; - if(temp_MCtrack->PdgCode()==2212){ - get_a_proton++; - } - } - if(detos.GetRecoType(n) == detos.fshower_reco_type) { - - ++temp_num_showers; - int showerindex = detos.GetShowerIndexFromObjectIndex(n);//CHECK - art::Ptr temp_MCshower = object_container.showerToMCParticleMap.find(showers[showerindex])->second; - if(temp_MCshower->PdgCode()==22){ - get_a_photon++; - } - art::Ptr amother = object_container.MCParticleToTrackIdMap[temp_MCshower->Mother()]; - if(amother){//sometime Mother is unknown.. - if(amother->PdgCode() == 111){ - get_a_pi0daughter++; - } - } - } - } - cout<<"# of showers: "< 0 && m_bobbytracksv[index] > 0)|| index == 0){ - // best_vertex_dist = temp_dist; - - m_bobbyvertex_pos_x = m_bobbyvertex_pos_xv[index]; - m_bobbyvertex_pos_y = m_bobbyvertex_pos_yv[index]; - m_bobbyvertex_pos_z = m_bobbyvertex_pos_zv[index]; - m_bobbytracks = m_bobbytracksv[index]; - m_bobbyshowers = m_bobbyshowersv[index]; - break; - } - } - -// if( m_run_all_pfps && m_bobbyvertexing_more &&m_bobbytracks + m_bobbyshowers < 2&& run_count < 2 ){//repeat with 0,1 -// run_count++; -// cout<<"Need more objects. Now run the "< calo_per_track(trackHandle, evt, m_caloLabel); - std::map, std::vector> > trackToCalorimetryMap; - //So a cross check - if (!calo_per_track.isValid()) - { - mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; - return; - } - for(size_t i=0; i< tracks.size(); ++i){ - if(calo_per_track.at(tracks[i].key()).size() ==0){ - std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."<PlaneID()< pid_per_track(trackHandle, evt, m_pidLabel); - std::map, art::Ptr > trackToPIDMap; - - if(m_use_PID_algorithms){ - // Build a map to get PID from PFParticles, then call PID collection function - for(size_t i=0; i< tracks.size(); ++i){ - art::Ptr track = tracks[i]; - trackToPIDMap[track] = pid_per_track.at(track.key()); - } - } - - //------------------------------------- - - //CRT - /* - if(m_has_CRT){ - art::ValidHandle> const & crtHandle = evt.getValidHandle>(m_CRTTzeroLabel); - std::vector> crtVector; - art::fill_ptr_vector(crtVector,crtHandle); - } - */ - - - //**********************************************************************************************/ - //**********************************************************************************************/ - //---------------------------------- MC TRUTH Data Only--------------------------- - //**********************************************************************************************/ - //**********************************************************************************************/ - - //Get the MCtruth handles and vectors - std::vector> mcTruthVector; -// std::vector> mcParticleVector; - - //Then build a map from MCparticles to Hits and vice versa - std::map< art::Ptr, std::vector > > mcParticleToHitsMap; - std::map< art::Ptr, art::Ptr > hitToMCParticleMap; - - //Apparrently a MCParticle doesn't know its origin (thanks Andy!) - //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa - //Note which map is which! //First is one-to-many. //Second is one-to-one -// std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; -// std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; - - -// std::vector> matchedMCParticleVector; -// std::map, art::Ptr > trackToMCParticleMap; -// std::map, art::Ptr > showerToMCParticleMap; - - //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower - std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; - std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; - - - //**********************************************************************************************/ - //**********************************************************************************************/ - //Some event based properties - - m_number_of_events++; - - m_run_number = evt.run(); - m_subrun_number = evt.subRun(); - m_event_number = evt.id().event(); - - if(vertexVector.size()>0){ - m_number_of_vertices++; - } - - - //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). - - badChannelMatching>(badChannelVector, tracks, object_container.trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); - - if(m_is_verbose){ - std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; - } - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap, object_container.PFPToTrackScoreMap); - //std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<Self()<> pfp_vec = pair.second; - int slice_id = pair.first; - //if (slice_vec[0]->Slice() != object_container.PFPToSliceIdMap[pfp] ) - for(auto pfp: pfp_vec){ - if (slice_id != object_container.PFPToSliceIdMap[pfp] && object_container.PFPToSliceIdMap[pfp]>=0){ - std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but object_container.PFPToSliceIdMap[pfp] = "<< object_container.PFPToSliceIdMap[pfp]<> crthit_h; //only filled when there are hits, otherwise empty - art::Handle rawHandle_DAQHeader; - double evt_timeGPS_nsec = -999 ; - if(m_runCRT){ - evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); - - evt.getByLabel(m_CRTHitProducer, crthit_h); - raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); - art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); - evt_timeGPS_nsec = evtTimeGPS.timeLow(); - - std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec); - // this->AnalyzeFlashes(flashVector, crthit_h); - -// std::cout<<"start track"<AnalyzeTracks(tracks, object_container.trackToNuPFParticleMap, pfParticleToSpacePointsMap, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToTrackScoreMap, object_container.PFPToNuSliceMap,pfParticleMap); -// this->AnalyzeShowers(showers,object_container.showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap, object_container.PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); - this->AnalyzeKalmanShowers(showers,object_container.showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); - - - this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); - - if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); - // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. - // MCShower and MCTrack come from energy depositions in GEANT4 - if(!m_is_data){ - - art::ValidHandle> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); - art::fill_ptr_vector(mcTruthVector,mcTruthHandle); - - art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); -// art::fill_ptr_vector(mcParticleVector,mcParticleHandle); - art::fill_ptr_vector(object_container.matchedMCParticleVector,mcParticleHandle); - - - - //Get the MCParticles (move to do this ourselves later) -// this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, object_container.MCParticleToTrackIdMap); - - //OK lets get all set up with sim::MCTrack and sim::MCShower . - - // art::ValidHandle> const & mcTrackHandle = evt.getValidHandle>(m_mcTrackLabel); - // art::ValidHandle> const & mcShowerHandle = evt.getValidHandle>(m_mcShowerLabel); - // art::fill_ptr_vector(mcTrackVector,mcTrackHandle); - // art::fill_ptr_vector(mcShowerVector,mcShowerHandle); - -/*CHECK: move this to abvoe - art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); - - - //mcc9 march miniretreat fix - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - m_test_matched_hits = 0; - - for(size_t j=0; j hit = hitVector[j]; - - particle_vec.clear(); match_vec.clear(); //only store per hit - - mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); - - if(particle_vec.size() > 0){ - m_test_matched_hits++; - } - - } -*/ - - this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, object_container.MCParticleToTrackIdMap); - - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, object_container.trackToMCParticleMap, object_container.trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, object_container.matchedMCParticleVector); - - - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap, object_container.PFPToNuSliceMap); - - - //showerRecoMCmatching( showers, showerToMCParticleMap, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); - - //looking at metadata - //std::map, double > pfParticleToNuScoreMap;//is filled during analyze slices - /*std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::cout<<"SinglePhoton\t||\t Analyze Metadata"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec); - std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ - std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], object_container.showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap); - - for(auto & track: tracks){ - std::cout<<"CHECKTRACK 0: "<>(matchedMCParticleVector, mcTrackVector, MCParticleToMCTrackMap); - // perfectRecoMatching>(matchedMCParticleVector, mcShowerVector, MCParticleToMCShowerMap); - //OK a really wierd bug in which by accessing the map here in line 355, everything breaks.. but commenting it out is OK - - - //for(auto & shower: showers){ - // auto mp = showerToMCParticleMap[shower]; - // std::cout<<"CHECKSHOWER: count trackmap: "<RecoMCTracks(tracks, object_container.trackToNuPFParticleMap, trackToMCParticleMap, object_container.MCParticleToMCTruthMap,mcParticleVector, object_container.MCParticleToTrackIdMap, object_container.sliceIdToNuScoreMap, object_container.PFPToClearCosmicMap, object_container.PFPToSliceIdMap,trk_overlay_vec); - - - - //Obsolete function - //this->RecoMCShowers(showers, object_container.showerToNuPFParticleMap, showerToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector); -// this->AnalyzeMCTruths(mcTruthVector, mcParticleVector); - this->AnalyzeMCTruths(mcTruthVector, object_container.matchedMCParticleVector); - this->AnalyzeEventWeight(evt); - - //added since last time? - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - //this one was for testing, leaving out for now - // this->FindSignalSlice( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap, object_container.showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, object_container.trackToNuPFParticleMap, trackToMCParticleMap); - if(m_is_verbose)std::cout<<"Starting SecondShowerSearch"<SecondShowerSearch(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, object_container.matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); - - std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, object_container.MCParticleToTrackIdMap, object_container.showerToNuPFParticleMap , allPFPSliceIdVec, object_container.showerToMCParticleMap, object_container.trackToNuPFParticleMap, object_container.trackToMCParticleMap, object_container.PFPToSliceIdMap); - - if (m_print_out_event){ - if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ - out_stream <<"run subrunevent "<> ev_evw ; - if( evt.getByLabel("eventweightSplines",ev_evw)){ - - std::map> const & weight_map = ev_evw->front().fWeight; - if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; - //m_genie_spline_weight=weight_map; - for (auto const& x : weight_map){ - std::cout << x.first // string (key) - << ':' - << x.second.size() << std::endl ; - if(x.second.size()==1){ - m_genie_spline_weight = x.second.front(); - } - } - - }else{ - std::cout<<"No data producet called eventweightSplines"< * tmp_mcparticles_per_hit = NULL; - std::vector> tmp_matchedMCParticleVector; - -// this->SecondShowerSearch(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap,*tmp_mcparticles_per_hit, tmp_matchedMCParticleVector, pfParticleMap, object_container.MCParticleToTrackIdMap); - - - } - - //Second Shower Search-Pandora style - if(!m_run_all_pfps){ - //Isolation - this-> IsolationStudy(tracks, object_container.trackToNuPFParticleMap, showers, object_container.showerToNuPFParticleMap, pfParticleToHitsMap, object_container.PFPToSliceIdMap, sliceIDToHitsMap); - } - - - //This is a quick check - - size_t n_neutrino_slice=0; - size_t n_neutrino_candidate_pfp_id=0; - - for(size_t s=0; s< sliceVector.size(); s++){ - auto slice = sliceVector[s]; - std::vector> pfps = sliceToPFParticlesMap[slice]; - - int primaries=0; - int n_dau=0; - int found = 0; - //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - primaries++; - // If it is, lets get the vertex position - if(isNeutrino){ - found++; - //Ok this is neutrino candidate. - - std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); - for (const size_t daughterId : pfp->Daughters()){ - n_dau++; - auto dau = pfParticleMap[daughterId]; - std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ - while(tmp->NumDaughters()>0 && n_gen < 4){ - for(int k=0; k< n_gen; k++){ - std::cout<<"---> "; - } - auto grandau = pfParticleMap[granDaughterId]; - std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; - } - - } - std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ - std::cout<<"We're Missing Something!."<1){ - throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "<Fill(); - ncdelta_slice_tree->Fill(); - - std::cout<<"---------------------------------------------------------------------------------"<Fill(); - } - - //------------------------------------------------------------------------------------------- - - - void SinglePhoton::beginJob() - { - mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; - - art::ServiceHandle tfs; - - vertex_tree = tfs->make("vertex_tree", "vertex_tree"); - pot_tree = tfs->make("pot_tree", "pot_tree"); - eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); - ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); - - - // --------------------- POT Releated variables ----------------- - m_number_of_events = 0; - m_number_of_vertices = 0; - m_pot_count=0; - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); - - // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); - - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - - - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); - // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - //---------------------- BobbyVertexBuilder ----------------- - vertex_tree->Branch("reco_bobbyvertex_x", &m_bobbyvertex_pos_x); - vertex_tree->Branch("reco_bobbyvertex_y", &m_bobbyvertex_pos_y); - vertex_tree->Branch("reco_bobbyvertex_z", &m_bobbyvertex_pos_z); - vertex_tree->Branch("reco_bobbyshowers", &m_bobbyshowers); - vertex_tree->Branch("reco_bobbytracks", &m_bobbytracks); - //vector - - vertex_tree->Branch("reco_bobbyvertex_xv", &m_bobbyvertex_pos_xv); - vertex_tree->Branch("reco_bobbyvertex_yv", &m_bobbyvertex_pos_yv); - vertex_tree->Branch("reco_bobbyvertex_zv", &m_bobbyvertex_pos_zv); - vertex_tree->Branch("reco_bobbytracksv", &m_bobbytracksv); - vertex_tree->Branch("reco_bobbyshowersv", &m_bobbyshowersv); - vertex_tree->Branch("reco_bobbyvertexradiusv", &m_bobbyvertexradiusv); - vertex_tree->Branch("reco_bobbyvertexradius", &m_bobbyvertexradius); - //MCTruth Matrching; - vertex_tree->Branch("mctruth_bobbysameslicev", &m_bobbysameslicev); - vertex_tree->Branch("mctruth_bobbyprotontrackv", &m_bobbyprotontrackv); - vertex_tree->Branch("mctruth_bobbyphotonshowerv", &m_bobbyphotonshowerv); - vertex_tree->Branch("mctruth_bobbypi0daughterv", &m_bobbypi0daughterv); - vertex_tree->Branch("mctruth_bobbydeltaradppdaughterv", &m_bobbydeltaradppdaughterv); - vertex_tree->Branch("mctruth_bobbydeltaradmdaughterv", &m_bobbydeltaradmdaughterv); - vertex_tree->Branch("mctruth_bobbydeltaradpdaughterv", &m_bobbydeltaradpdaughterv); - vertex_tree->Branch("mctruth_bobbydeltarad0daughterv", &m_bobbydeltarad0daughterv); - vertex_tree->Branch("mctruth_bobbyotherdaughterv", &m_bobbyotherdaughterv); - vertex_tree->Branch("mctruth_bobbyoverlayv", &m_bobbyoverlayv); -// vertex_tree->Branch("mctruth_bobbytrackdaughter_pdg", & m_bobbytrackdaughter_pdg); -// vertex_tree->Branch("mctruth_bobbyshowerdaughter_pdg", & m_bobbyshowerdaughter_pdg); - - vertex_tree->Branch("mctruth_bobbyprotontrack", &m_bobbyprotontrack); - vertex_tree->Branch("mctruth_bobbyphotonshower", &m_bobbyphotonshower); - vertex_tree->Branch("mctruth_bobbypi0daughter", &m_bobbypi0daughter); - vertex_tree->Branch("mctruth_bobbyotherdaughter", &m_bobbyotherdaughter); - vertex_tree->Branch("mctruth_bobbyoverlay", &m_bobbyoverlay); - vertex_tree->Branch("mctruth_bobbydeltaradppdaughter", &m_bobbydeltaradppdaughter); - vertex_tree->Branch("mctruth_bobbydeltaradpdaughter", &m_bobbydeltaradpdaughter); - vertex_tree->Branch("mctruth_bobbydeltaradmdaughter", &m_bobbydeltaradmdaughter); - vertex_tree->Branch("mctruth_bobbydeltarad0daughter", &m_bobbydeltarad0daughter); - - vertex_tree->Branch("parameter_dist_tt",&m_dist_tt); - vertex_tree->Branch("parameter_dist_sx",&m_dist_sx); - vertex_tree->Branch("parameter_dist_st",&m_dist_st); - vertex_tree->Branch("parameter_dist_sst",&m_dist_sst); - //----------------------------------------------------------- - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - this->CreateIsolationBranches(); - - this->CreateSecondShowerBranches(); - // --------------------- Flash Related Variables ---------------------- - this->CreateFlashBranches(); - - // --------------------- Track Related variables ------------ - this->CreateTrackBranches(); - - std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; - - - //Get the info for length->energy conversion from PSTAR database. - TFile *fileconv; - struct stat buffer; - - if(stat("proton_conversion.root", &buffer) == 0){ - fileconv = new TFile("proton_conversion.root", "read"); - }else{ - fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); - } - - proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); - proton_length2energy_tgraph.GetMean(); - fileconv->Close(); - - // --------------------- Shower Related variables ------------ - this->CreateShowerBranches(); - - - //Metadata Branches - this->CreateSliceBranches(); - //this->CreateMatchedSliceBranches(); - - - // ---------------------- MCTruth Related Variables ---------- - this->CreateMCTruthBranches(); - - // ---------------------- Eventweight CTruth Related Variables --------- - this->CreateEventWeightBranches(); - - - //std::string bad_channel_file = "/pnfs/uboone/resilient/users/markross/tars/MCC9_channel_list.txt"; - - std::string bad_channel_file = "MCC9_channel_list.txt"; - - if(stat(bad_channel_file.c_str(), &buffer) != 0){ - bad_channel_file = gpvm_location+bad_channel_file; - } - - std::ifstream bc_file(bad_channel_file); - - if (bc_file.is_open()) - { - std::string line; - while ( getline (bc_file,line) ) - { - std::vector res; - std::istringstream iss(line); - for(std::string s; iss >> s; ) - res.push_back( std::stof(s)); - - std::pair t(res[0],res[1]); - bad_channel_list_fixed_mcc9.push_back(t); - } - bc_file.close(); - } - - - std::cout<<"SinglePhoton \t||\t beginJob() is complete"<ClearIsolation(); - - this->ClearSecondShowers(); - //------------- Flash related Variables ------------------ - this->ClearFlashes(); - - //------------- Track Related Variables ----------------- - this->ClearTracks(); - - //------------- Track Related Variables ----------------- - this->ClearShowers(); - this->ClearMCTruths(); - - //------------- EventWeight Related Variables ----------------- - this->ClearEventWeightBranches(); - - - - //MetaData Related Varibles - this->ClearSlices(); - - - } - - - void SinglePhoton::beginSubRun(art::SubRun const & sr) { - - if(m_potLabel != ""){ - if(m_potLabel == "generator"){ - double this_pot = sr.getValidHandle(m_potLabel)->totgoodpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; - if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ - m_pot_count += potSummaryHandlebnbETOR875->totpot; - } - } - } - - } - - - - - - - - - - //----------------------------------------------------------------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------------------------------------------------------------- - - void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; - int n_vert =0; - - //std::cout<<"There are "<second; - if (!vertexVector.empty()) - { - if (vertexVector.size() !=1) - std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; - - const art::Ptr vertex = *(vertexVector.begin()); - double xyz[3] = {0.0, 0.0, 0.0} ; - vertex->XYZ(xyz); - - n_vert++; - //std::cout<<"Vertex!"<<"\t "<size()<size(); ++i) - { - const art::Ptr pParticle(pfParticleHandle, i); - // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) - { - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - } - - - /*********************** - * - * GetFinalStatePFParticleVectors() - fill in crParticles and nuParticles. - * m_reco_vertex_size (filled) - the size of neutrino vertex is determined here. - * *********************/ - void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) - { - - int found = 0; - int primaries = 0; - int full = 0; - //everything from the pfParticleMap, and look inside the element one by one. - for (PFParticleIdMap::const_iterator it = pfParticleMap.begin(); it != pfParticleMap.end(); ++it) - { - const art::Ptr pParticle(it->second); - - full++; - // Only look for primary particles - if (!pParticle->IsPrimary()) continue; - - // Check if this particle is identified as the neutrino - const int pdg(pParticle->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - - - primaries++; - // If it is, lets get the vertex position - if(isNeutrino){ - found++; - this->GetVertex(pfParticlesToVerticesMap, pParticle ); - - } else{ // All non-neutrino primary particles are reconstructed under the cosmic hypothesis - crParticles.push_back(pParticle); - continue; - } - - // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. - // If this is not the case please handle accordingly - if (!nuParticles.empty()) - { - throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; - } - - // Add the daughters of the neutrino PFParticle to the nuPFParticles vector - for (const size_t daughterId : pParticle->Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - nuParticles.push_back(pfParticleMap.at(daughterId)); - } - } - std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< z(n,0.0); - - TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); - TGraphDelaunay delan(g); - delan.SetMarginBinsContent(0); - delan.ComputeZ(0,0); - delan.FindAllTriangles(); - (*num_triangles)=delan.GetNdt(); - - //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays - Int_t *MT = delan.GetMTried(); - Int_t *NT = delan.GetNTried(); - Int_t *PT = delan.GetPTried(); - - (*area)=0.0; - for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ - - int n = hits.size(); - std::vector C0,T0; - std::vector C1,T1; - std::vector C2,T2; - size_t n_0=0; - size_t n_1=0; - size_t n_2=0; - - for(int i=0;i hit = hits[i]; - switch(hit->View()){ - case 0: - C0.push_back((double)hit->Channel()); - T0.push_back(hit->PeakTime()); - n_0++; - break; - case 1: - C1.push_back((double)hit->Channel()); - T1.push_back(hit->PeakTime()); - n_1++; - break; - case 2: - C2.push_back((double)hit->Channel()); - T2.push_back(hit->PeakTime()); - n_2++; - break; - default: - break; - } - } - if(m_use_delaunay){ - if(n_0>0) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); - if(n_1>0) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); - if(n_2>0) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); - } - num_hits[0] = n_0; - num_hits[1] = n_1; - num_hits[2] = n_2; - - //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ - corrected.resize(3); - - double kx = input[0]; - double ky = input[1]; - double kz = input[2]; - - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - -// double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); - - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & mcparticle, std::vector & corrected){ - corrected.resize(3); - - double kx = mcparticle->Vx(); - double ky = mcparticle->Vy(); - double kz = mcparticle->Vz(); - - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - //double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); - - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & corrected){ - corrected.resize(3); - //Space Charge Effect! functionize this soon. - double kx = mcparticle.Vx(); - double ky = mcparticle.Vy(); - double kz = mcparticle.Vz(); - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; - corrected[1]=ky + scecorr.Y(); - corrected[2]=kz + scecorr.Z(); - return 0; - } - - void SinglePhoton::CollectMCParticles( - const art::Event &evt, - const std::string &label, //m_geantModuleLabel - std::map< art::Ptr, std::vector>> &truthToParticles, - std::map< art::Ptr, art::Ptr> &particlesToTruth, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ - - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; - - art::Handle< std::vector< simb::MCParticle> > theParticles; - evt.getByLabel(label, theParticles); - - if (!theParticles.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; - } - - art::FindOneP theTruthAssns(theParticles, evt, label); - - for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) - {//theParticles are pointers to all MCParticles. - //theTruthAssns are MCTruth with geantModuleLabel - const art::Ptr particle(theParticles, i); - const art::Ptr truth(theTruthAssns.at(i)); - - truthToParticles[truth].push_back(particle); - particlesToTruth[particle] = truth; - MCParticleToTrackIdMap[particle->TrackId()] = particle; - } - - std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) - { - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; - - art::Handle< std::vector > theSimChannels; - evt.getByLabel(label, theSimChannels); - - if (!theSimChannels.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; - } - - for (unsigned int i = 0; i < theSimChannels->size(); ++i) - { - const art::Ptr channel(theSimChannels, i); - simChannelVector.push_back(channel); - } - } - - - void SinglePhoton::BuildMCParticleHitMaps( - const art::Event &evt, - const std::string &label, - const std::vector> &hitVector, - std::map< art::Ptr, std::vector > > &particlesToHits, - std::map< art::Ptr, art::Ptr > &hitsToParticles, - const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, - std::map< int, art::Ptr > & MCParticleToTrackIdMap) - { - std::vector< art::Ptr > simChannelVector; - std::map< art::Ptr, std::vector> > truthToParticles; - std::map< art::Ptr, art::Ptr > particlesToTruth; - std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; - - this->CollectSimChannels(evt, label, simChannelVector); - this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); - - - } - - -} //namespace diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h deleted file mode 100644 index b52ff16e4..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/SinglePhoton_module.h +++ /dev/null @@ -1,1428 +0,0 @@ -#ifndef SINGLE_PHOTON_ANALYSIS -#define SINGLE_PHOTON_ANALYSIS - -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Optional/TFileService.h" -#include "art/Framework/Services/Optional/TFileDirectory.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/OpFlash.h" -#include "ubobj/CRT/CRTHit.hh" -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/MCBase/MCShower.h" -#include "lardataobj/AnalysisBase/Calorimetry.h" -#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" -#include "lardataobj/AnalysisBase/ParticleID.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/GeneratedParticleInfo.h" - -#include "larsim/EventWeight/Base/MCEventWeight.h" - -#include "larevt/SpaceChargeServices/SpaceChargeService.h" - -#include "larcoreobj/SummaryData/POTSummary.h" - -#include "nusimdata/SimulationBase/MCParticle.h" -#include "nusimdata/SimulationBase/MCTruth.h" -#include "nusimdata/SimulationBase/simb.h" -#include "nusimdata/SimulationBase/MCFlux.h" -#include "nusimdata/SimulationBase/GTruth.h" -#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" - -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" - -#include "larcore/Geometry/Geometry.h" - -#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" - -#include "canvas/Utilities/ensurePointer.h" -#include "canvas/Persistency/Common/FindManyP.h" -#include "canvas/Persistency/Common/FindMany.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "canvas/Persistency/Common/FindOne.h" - -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" -#include "cetlib_except/exception.h" - -// Helper function for PID stuff -#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" - -#include "TCanvas.h" -#include "TTree.h" -#include "TFile.h" -#include "TGraph.h" -#include "TGraph2D.h" -#include "TGraphDelaunay.h" -#include "TRandom3.h" - -#include "Pandora/PdgTable.h" -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "bad_channel_matching.h" -#include "sssVeto_BDT.class.h" -#include "DBSCAN.h" -#include "VertexBuilder/ParticleAssociations.h" - -//------------------------------------------------------------------------------------------------------------------------------------------ - -namespace single_photon -{ - - template - std::vector sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - - return idx; - } - - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } - - - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ - double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } - - - struct sss_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; - int n_ticks; - - bool pass; - - sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; - - class cluster { - public: - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - f_npts = f_pts.size(); - if(pts.size() != hits.size()){ - std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts,&wires[0],&ticks[0]); - f_graph = af_graph; - - }; - - int getID() {return f_ID;} - int getN() {return f_npts;} - int getPlane(){ return f_plane;} - TGraph * getGraph(){ return &f_graph;} - std::vector> getHits(){return f_hits;} - int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} - sss_score * getSSScore(){return f_SSScore;} - private: - - int f_ID; - int f_npts; - int f_plane; - std::vector> f_pts; - std::vector> f_hits; - TGraph f_graph; - sss_score *f_SSScore; - }; - - - - - /** - * @brief SinglePhoton class - */ - class SinglePhoton : public art::EDAnalyzer - { - //----- VertexBuilder------- - //set limit here, refered to the internal note; - friend class Atlas; - //--------------------------- - - public: - typedef art::ValidHandle< std::vector > PFParticleHandle; - typedef std::vector< art::Ptr > PFParticleVector; - typedef std::vector< art::Ptr > TrackVector; - typedef std::vector< art::Ptr > ShowerVector; - typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - /** - * @brief Constructor - * - * @param pset the set of input fhicl parameters - */ - SinglePhoton(fhicl::ParameterSet const &pset); - - /** - * @brief Configure memeber variables using FHiCL parameters - * - * @param pset the set of input fhicl parameters - */ - void reconfigure(fhicl::ParameterSet const &pset); - - /** - * @brief Analyze an event! - * - * @param evt the art event to analyze - */ - void analyze(const art::Event &evt); - - /** - * @brief Begin the job, setting up ! - * - */ - void beginJob(); - - /** - * @brief End the job, setting down ! - * - */ - void endJob(); - - - void beginSubRun(art::SubRun const & sr); - - protected: //allow inheritance class to use following variables. - void ClearVertex(); - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleHandle the handle for the PFParticle collection - * @param pfParticleMap the mapping from ID to PFParticle - */ - void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); - - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ - void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; - - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleMap the mapping from ID to PFParticle - * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis - * @param nuParticles a vector to hold the final-states of the reconstruced neutrino - */ - void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); - - /** - * @brief Collect associated tracks and showers to particles in an input particle vector - * - * @param particles a vector holding PFParticles from which to find the associated tracks and showers - * @param pfParticleHandle the handle for the PFParticle collection - * @param evt the art event to analyze - * @param tracks a vector to hold the associated tracks - * @param showers a vector to hold the associated showers - */ - - - //---------------- BobbyVertexBuilder ------------------------ - - /************************* - * CollectTrackAndShowrs_v2 - go through pandora_object inside - * an event, and filter out proper tracks/showers for - * vertexing. - * - *Atlas (input/modified) contains maps and - * collections of pandora_objejcts that need to be modified. - * ***********************/ - - void CollectTracksAndShowers_v2(const art::Event &evt, class Atlas &package); - void CollectMCParticles_v2(const art::Event &evt, class Atlas & package); - //-------------------------------------------------- - - - void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); - - void CollectCalo(const art::Event &evt,const art::Ptr &shower); - - - /* - *@brief Calculated the shower energy by looping over all the hits and summing the charge - *@param hits - an art pointer of all the hits in a shower - * - * - * */ - double CalcEShower(const std::vector> &hits); - - double CalcEShowerPlane(const std::vector>& hits, int plane); - - int getNHitsPlane(std::vector> hits, int this_plane); - - - /** - *@brief Takes a hit and multiplies the charge by the gain - *@param thishitptr art pointer to a hit - *@param plane the plane the hit is on - **/ - double GetQHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV for a given hit - * @param thishit - an individual hit - * - * - * */ - double QtoEConversionHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV from a given Q value - * @param q - the charge value - * - * */ - double QtoEConversion(double q); - - - /** - *@brief Takes a vector of dQ/dx values and converts to dE/dx - *@param dqdx - vector of dqdx points - * - * */ - std::vector CalcdEdxFromdQdx(std::vector dqdx); - - /** - * - *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane - *@param shower - a Pandora shower - *@param clusters - all of the clusters in the shower - *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster - *@param plane - a single plane - * * */ - - std::vector CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane); - /** - *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) - *@param shower_dir - the 3D shower direction - *@param plane - a single plane - * */ - double getPitch(TVector3 shower_dir, int plane); - TVector3 getWireVec(int plane); - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); - double getAnglewrtWires(TVector3 shower_dir, int plane); - - double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); - int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); - double degToRad(double deg); - double radToDeg(double rad); - /** - *@brief Calculates the four corners of a box of given length and width around a cluster given the start point and axis direction - *@param cluster_start - the start position of a cluster in CM - *@param cluster_axis - calculated from the cluster end minus the cluster start - *@param width - typically ~1cm - *@param length - typically a few cm - * - * */ - std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); - - /** - *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle - *@param thishit_pos - 2d location of a hit in cm - *@param rectangle - vector of the positions of the four corners of the rectangle - * - * */ - bool insideBox(std::vector thishit_pos, std::vector> rectangle); - - /** - * - *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary - *uses triangle area check - * - * */ - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - - double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); - - /*** - *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 - *@param thisvector - vector of doubles - * - * */ - double getMedian(std::vector thisvector); - - - //---------------- Templatees ---------------------------- - void AnalyzeTemplates(); - void ClearTemplates(); - void ResizeTemplates(size_t); - void CreateTemplateBranches(); - - - //---------------- SecondShower---- - void ClearSecondShowers(); - void ResizeSecondShowers(size_t size); - - void CreateSecondShowerBranches(); - - void SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - std::vectorSecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - - - sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); - TGraph* GetNearestNpts(int,int,std::vector>&,double,double,int); - int CompareToShowers(int,int,std::vector>&,double,double, - const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); - //---------------- Isolation ----------------- - - void ClearIsolation(); - void CreateIsolationBranches(); - void IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); - - - - //---------------- Flashes ---------------------------- - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec); - - // void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h); - void ClearFlashes(); - void ResizeFlashes(size_t); - void CreateFlashBranches(); - - //---------------- Tracks ---------------------------- - void AnalyzeTracks( - Atlas& package, - geoalgo::Point_t pvertex, - const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap - ); - - void ClearTracks(); - void ResizeTracks(size_t); - void CreateTrackBranches(); - void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); - void RecoMCTracks( - const std::vector>& tracks, - Atlas &package, - std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector& vec); - - void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); - TGraph proton_length2energy_tgraph; - - //---------------- Showers ---------------------------- - - void AnalyzeShowers( - Atlas &package, - geoalgo::Point_t pvertex, - const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap - ); - void ClearShowers(); - void ResizeShowers(size_t); - void CreateShowerBranches(); - void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, - std::map,art::Ptr> & pfptotrkmap, - std::map,std::vector>> & trktocalomap, - std::map, std::vector>> & pfParticleToHitMap - ); - - void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector); - - std::vector showerRecoMCmatching(std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap); - - - - - //---------------- MCTruths ---------------------------- - - void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); - void ClearMCTruths(); - void ResizeMCTruths(size_t); - void CreateMCTruthBranches(); - - std::map is_delta_map; - - //---------------- EventWeight ---------------------------- - - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); - void CreateEventWeightBranches(); - - //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. - - - - - void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); - void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); - void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); - - - //-------------- Slices/Pandora Metadata ---------------// - void ClearSlices(); - void ResizeSlices(size_t size); - //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); - void CreateSliceBranches(); - //void CreateMatchedSliceBranches(); - void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> & primaryPFPSliceIdVec, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap); - - // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumPFPsMap ); - std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); - //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); - - int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - - int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - //can also look at things like shower energy, conversion length, etc. - - std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap ); - // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - // std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumShowersMap ); - - - std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap); - - void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap, - std::map, int>& PFPToSliceIdMap); - - - void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); - - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; - std::vector m_matched_signal_shower_nuscore; - std::vector m_matched_signal_shower_sliceId; - std::vector m_matched_signal_shower_is_clearcosmic; - int m_matched_signal_shower_num = 0; - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; - std::vector m_matched_signal_shower_showers_in_slice; - - - std::vector m_matched_signal_track_true_E; - std::vector m_matched_signal_track_nuscore; - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; - - //int m_matched_signal_total_num_slices; - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; - bool m_multiple_matched_tracks; - - - - //------------------ Delaunay triangle tools -----------// - - double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); - int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); - int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); - - - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); - int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); - - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); - - //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 - std::vector> bad_channel_list_fixed_mcc9; - std::map bad_channel_map_fixed_mcc9; - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - std::string m_badChannelLabel; - std::string m_badChannelProducer; - std::string m_mcTrackLabel; - std::string m_mcShowerLabel; - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - bool m_use_PID_algorithms; - bool m_use_delaunay; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; - bool m_is_overlayed; - bool m_run_all_pfps; - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer; - - std::ofstream out_stream; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); - detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); - spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; - double m_recombination_factor; - //double m_gain; - std::vector m_gain_mc; - std::vector m_gain_data; - double m_wire_spacing; - - int m_Cryostat; - int m_TPC; - - double m_width_dqdx_box; - double m_length_dqdx_box; - - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - //------------ POT related variables -------------- - int m_number_of_events; - double m_pot_count; - int m_number_of_vertices; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - - int m_test_matched_hits; - int m_reco_slice_objects; - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; - int m_sss_num_associated_hits; - - int m_sss_num_candidates; - - ReadBDT * sssVetov1; - - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_matched; - std::vector m_sss_candidate_pdg; - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; - std::vector m_sss_candidate_overlay_fraction; - - bool bool_make_sss_plots; - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - - int m_reco_asso_showers; - double m_reco_vertex_to_nearest_dead_wire_plane0; - double m_reco_vertex_to_nearest_dead_wire_plane1; - double m_reco_vertex_to_nearest_dead_wire_plane2; - - //------------ VertexBuilder ------------- - double m_bobbyvertex_pos_x; - double m_bobbyvertex_pos_y; - double m_bobbyvertex_pos_z; - std::vector m_bobbyvertex_pos_xv; - std::vector m_bobbyvertex_pos_yv; - std::vector m_bobbyvertex_pos_zv; - int m_bobbyshowers; - int m_bobbytracks; - std::vector m_bobbyshowersv; - std::vector m_bobbytracksv; - std::vector m_bobbyvertexradiusv; - double m_bobbyvertexradius; - - int m_bobbyphotonshower; - int m_bobbypi0daughter; - int m_bobbydeltaradppdaughter; - int m_bobbydeltaradmdaughter; - int m_bobbydeltaradpdaughter; - int m_bobbydeltarad0daughter; - int m_bobbyotherdaughter; - int m_bobbyoverlay; - int m_bobbyprotontrack; - std::vector m_bobbysameslicev; - std::vector m_bobbyphotonshowerv; - std::vector m_bobbypi0daughterv; - std::vector m_bobbydeltaradppdaughterv; - std::vector m_bobbydeltaradpdaughterv; - std::vector m_bobbydeltaradmdaughterv; - std::vector m_bobbydeltarad0daughterv; - std::vector m_bobbyotherdaughterv; - std::vector m_bobbyoverlayv; - std::vector m_bobbyprotontrackv; - std::vector m_bobbytrackdaughter_pdg; - std::vector m_bobbyshowerdaughter_pdg; - - bool m_bobbyvertexing_more; - - - vector m_dist_tt;//track&track, start_prox - vector m_dist_sx;//shower&anything, shower_prox - vector m_dist_st;//shower&track, cpoa_vert_prox - vector m_dist_sst;//shower&shower&track, cpoa_trackend_prox - - void BobbyVertexBuilder(class Atlas &package, bool more_objects); - //--------------------------------------------------- - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - int m_reco_num_templates; - std::vector m_reco_template; - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - //----------- CRT related variables ----------------- - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - - double m_CRT_dt; //time between flash and nearest CRT hit - - //------------ Track related Variables ------------- - int m_reco_asso_tracks; - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; - std::vector m_reco_track_length; - std::vector m_reco_track_dirx; - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_theta_yz; - std::vector m_reco_track_phi_yx; - - - std::vector m_reco_track_num_trajpoints; - std::vector m_reco_track_num_spacepoints; - std::vector m_reco_track_proton_kinetic_energy; - std::vector m_reco_track_ordered_energy_index; - std::vector m_reco_track_ordered_displacement_index; - std::vector m_reco_track_spacepoint_principal0; - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; - std::vector m_reco_track_spacepoint_max_dist; - - std::vector m_reco_track_best_calo_plane; - - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - - - std::vector m_reco_track_mean_dEdx_p0; - std::vector m_reco_track_mean_dEdx_start_half_p0; - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; - std::vector> m_reco_track_resrange_p0; - std::vector> m_reco_track_dEdx_p0; - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - - std::vector m_reco_track_num_calo_hits_p0; - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - - std::vector m_reco_track_end_to_nearest_dead_wire_plane0; - std::vector m_reco_track_end_to_nearest_dead_wire_plane1; - std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; - std::vector m_reco_track_is_nuslice; - - - std::vector m_sim_track_matched; - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - std::vector m_sim_track_origin; - std::vector m_sim_track_process; - std::vector m_sim_track_startx; - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_trackID; - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - std::vector m_isolation_min_dist_trk_shr; - std::vector m_isolation_min_dist_trk_unassoc; - - std::vector m_isolation_num_shr_hits_win_1cm_trk; - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - std::vector m_isolation_nearest_shr_hit_to_trk_wire; - std::vector m_isolation_nearest_shr_hit_to_trk_time; - - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire; - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; - - /*-------------------------------------------------------------------------------------*/ - - //------------ Shower related Variables ------------- - - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; - std::vector m_reco_shower3d_implied_dirx; - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_dirx; - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; - - std::vector m_reco_shower_impact_parameter; - std::vector m_reco_shower_implied_dirx; - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - - std::vector m_reco_shower_start_to_nearest_dead_wire_plane0; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - //end flash matching - std::vector m_reco_shower_num_hits_plane0; - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - - - std::vector m_reco_shower_delaunay_area_plane0; - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - - std::vector m_reco_shower_kalman_exists; - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - std::vector m_sim_shower_start_x; - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - - - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; - - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - - double m_mctruth_leading_exiting_proton_energy; - - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - - int m_mctruth_num_reconstructable_protons; - - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - double m_mctruth_pi0_subleading_photon_energy; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums - std::vector m_reco_shower_energy_plane0; - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - - std::vector m_reco_shower_plane0_nhits; - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - - - std::vector m_reco_shower_ordered_energy_index; - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - - std::vector m_reco_shower_dEdx_plane0_mean; - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median; - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - - std::vector m_reco_shower_angle_wrt_wires_plane0; - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - - std::vector m_reco_shower_dQdx_plane0_median; - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - - std::vector m_reco_shower_dEdx_plane0_nhits; - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - - double _time2cm;//value modeled from David's shower code - - // PID-related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - double m_genie_spline_weight; - - }; - - DEFINE_ART_MODULE(SinglePhoton) -} // namespace lar_pandora -#endif -//------------------------------------------------------------------------------------------------------------------------------------------ -// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h deleted file mode 100644 index 4640e836a..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/TruncMean.h +++ /dev/null @@ -1,259 +0,0 @@ -/** - * \file TruncMean.h - * - * \ingroup 3DMichel - * - * \brief Class def header for a class TruncMean - * - * @author david caratelli [davidc@fnal.gov] - * Written 08/02/2018. - */ - -#ifndef TRUNCMEAN_H -#define TRUNCMEAN_H - -#include -#include -#include -#include -#include -#include - -/** - \class TruncMean - The truncated mean class allows to compute the following quantities - 1) the truncated mean profile of an ordered vector of values, such as - the charge profile along a particle's track. - To create such a profile use the function CalcTruncMeanProfile() - 2) Get the truncated mean value of a distribution. This function - iteratively hones in on the truncated mean of a distribution by - updating the mean and cutting the tails after each iteration. - For this functionality use CalcIterativeTruncMean() - doxygen documentation! -*/ - -static const double kINVALID_FLOAT = std::numeric_limits::max(); - -class TruncMean{ - - public: - - /// Default constructor - TruncMean(){} - - /// Default destructor - ~TruncMean(){} - - /** - @brief Given residual range and dq vectors return truncated local dq. - Input vectors are assumed to be match pair-wise (nth entry in rr_v - corresponds to nth entry in dq_v vector). - Input rr_v values are also assumed to be ordered: monotonically increasing - or decreasing. - For every dq value a truncated linear dq value is calculated as follows: - 0) all dq values within a rr range set by the class variable _rad are selected. - 1) the median and rms of these values is calculated. - 2) the subset of local dq values within the range [median-rms, median+rms] is selected. - 3) the resulting local truncated dq is the average of this truncated subset. - @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) - @input std::vector dq_v -> vector of measured values for which truncated profile is requested - (i.e. charge profile of a track) - @input std::vector dq_trunc_v -> passed by reference -> output stored here - @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation - */ - void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma = 1); - - /** - @brief Iteratively calculate the truncated mean of a distribution - @input std::vector v -> vector of values for which truncated mean is asked - @input size_t nmin -> minimum number of iterations to converge on truncated mean - @input size_t nmax -> maximum number of iterations to converge on truncated mean - @input size_t lmin -> minimum number of entries in vector before exiting and returning current value - @input size_t currentiteration -> current iteration - @input double convergencelimit -> fractional difference between successive iterations - under which the iteration is completed, provided nmin iterations have occurred. - @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. - */ - double CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed = kINVALID_FLOAT); - - /** - @brief Set the smearing radius over which to take hits for truncated mean computaton. - */ - void setRadius(const double& rad) { _rad = rad; } - - private: - - double Mean (const std::vector& v); - double Median(const std::vector& v); - double RMS (const std::vector& v); - - /** - Smearing radius over which charge from neighboring hits is scanned to calculate local - truncated mean - */ - double _rad; - -}; - -double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed) -{ - - auto const& mean = Mean(v); - auto const& med = Median(v); - auto const& rms = RMS(v); - - // if the vector length is below the lower limit -> return - if (v.size() < lmin) - return mean; - - // if we have passed the maximum number of iterations -> return - if (currentiteration >= nmax) - return mean; - - // if we passed the minimum number of iterations and the mean is close enough to the old value - double fracdiff = fabs(med-oldmed) / oldmed; - if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) - return mean; - - // if reached here it means we have to go on for another iteration - - // cutoff tails of distribution surrounding the mean - // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom - // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions - v.erase( std::remove_if( v.begin(), v.end(), - [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed - v.end()); - - return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); -} - -void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma) -{ - - // how many points to sample - int Nneighbor = (int)(_rad * 3 * 2); - - dq_trunc_v.clear(); - dq_trunc_v.reserve( rr_v.size() ); - - int Nmax = dq_v.size()-1; - - for (size_t n=0; n < dq_v.size(); n++) { - - // current residual range - double rr = rr_v.at(n); - - int nmin = n - Nneighbor; - int nmax = n + Nneighbor; - - if (nmin < 0) nmin = 0; - if (nmax > Nmax) nmax = Nmax; - - // vector for local dq values - std::vector dq_local_v; - - for (int i=nmin; i < nmax; i++) { - - double dr = rr - rr_v[i]; - if (dr < 0) dr *= -1; - - if (dr > _rad) continue; - - dq_local_v.push_back( dq_v[i] ); - - }// for all ticks we want to scan - - if (dq_local_v.size() == 0 ) { - dq_trunc_v.push_back( dq_v.at(n) ); - continue; - } - - // calculate median and rms - double median = Median(dq_local_v); - double rms = RMS(dq_local_v); - - double truncated_dq = 0.; - int npts = 0; - for (auto const& dq : dq_local_v) { - if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ - truncated_dq += dq; - npts += 1; - } - } - - dq_trunc_v.push_back( truncated_dq / npts ); - - if(dq_trunc_v.back() != dq_trunc_v.back()){ - std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) -{ - - double mean = 0.; - for (auto const& n : v) mean += n; - mean /= v.size(); - - return mean; -} - -double TruncMean::Median(const std::vector& v) -{ - - if (v.size() == 1) return v[0]; - - std::vector vcpy = v; - - std::sort(vcpy.begin(), vcpy.end()); - - double median = vcpy[ vcpy.size() / 2 ]; - - return median; -} - -double TruncMean::RMS(const std::vector& v) -{ - - if(v.size()==1) return v.front(); - - double avg = 0.; - for (auto const& val : v) avg += val; - avg /= v.size(); - double rms = 0.; - for (auto const& val : v) rms += (val-avg)*(val-avg); - rms = sqrt( rms / ( v.size() - 1 ) ); - - - if(rms!=rms){ - std::cout<<"ERROR || TruncMean::RMS || is returning nan."< - -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Track.h" - -#include "art/Framework/Principal/Handle.h" - -#include "ubcore/LLBasicTool/GeoAlgo/GeoVector.h" -#include "ubcore/LLBasicTool/GeoAlgo/GeoSphere.h" -#include "ubcore/LLBasicTool/GeoAlgo/GeoTrajectory.h" -#include "ubcore/LLBasicTool/GeoAlgo/GeoCone.h" -#include "ubcore/LLBasicTool/GeoAlgo/GeoAlgo.h" -#include "ubcore/LLBasicTool/GeoAlgo/GeoAABox.h" - -#include "../SinglePhoton_module.h" - -namespace single_photon{ -//DetectorObject is a container for labeling tracks and showers with IDs, and for each track/shower, the corresponding details are also stored. -struct DetectorObject { - - size_t const fid;//track/shower IDs - size_t const foriginal_index;//PFParticle IDs, IDToPFParticleMap[fid].first?; - int const freco_type; - bool fis_associated;//true when an object is associated. - - DetectorObject(size_t const id, size_t const original_index, int const reco_type) : - fid(id), - foriginal_index(original_index), - freco_type(reco_type), - fis_associated(false) {} - - virtual ~DetectorObject(){} - -}; - - -struct Track : public DetectorObject { - - geoalgo::Trajectory ftrajectory; - - Track(size_t const id, size_t const original_index, int const reco_type, recob::Track const & t) : - DetectorObject(id, original_index, reco_type) { - for(size_t i = 0; i < t.NumberTrajectoryPoints(); ++i) - ftrajectory.push_back(t.LocationAtPoint(i)); - } - -}; - - -struct Shower : public DetectorObject { - - geoalgo::Cone fcone; - - Shower(size_t const id, size_t const original_index, int const reco_type, recob::Shower const & s) : - DetectorObject(id, original_index, reco_type) { - fcone = geoalgo::Cone(s.ShowerStart(), - s.Direction(), - s.Length(), - 0); - } - -}; - -//collectinos of the DetectorObject?? -class DetectorObjects_all { - - friend class SinglePhoton; - std::map fobject_m;//index , DetectorObject - std::vector ftrack_index_v; - std::vector fshower_index_v; - size_t fobject_id;//global index of input objects, combined with tracks and showers, i.e. {tracks,showers} - - std::map foriginal_track_index_m;//first is index for {tracks}, second is for the mix from {tracks,showers} - std::map foriginal_shower_index_m; - -public: - - int const ftrack_reco_type;//default value as 1 - int const fshower_reco_type;//default value as 2 - - DetectorObjects_all(); - - ~DetectorObjects_all() { - for(std::pair const & p : fobject_m) delete p.second; - } - -// void AddTracks(art::ValidHandle> const & ev_t, bool const track_original_indices = false); -// void AddShowers(art::ValidHandle> const & ev_s, bool const track_original_indices = false); - void AddTracks(std::vector> const & ev_t, bool const track_original_indices = true); - void AddShowers(std::vector> const & ev_s, bool const track_original_indices = true); - - void SetAssociated(size_t const i); - - /******* - * - * Return the freco_type of an fobject_m whose index is i. - * - * fobject_m is a map - * freco_type - 2 for track, and 1 for shower; - * - * - * ******/ - int GetRecoType(size_t const i) const; - std::vector const & GetTrackIndices() const {return ftrack_index_v;} - std::vector const & GetShowerIndices() const {return fshower_index_v;} - - DetectorObject const & GetDetectorObject(size_t const i) const; - - Track & GetTrack(size_t const i); - Track const & GetTrack(size_t const i) const; - - Shower & GetShower(size_t const i); - Shower const & GetShower(size_t const i) const; - - size_t GetTrackIndexFromObjectIndex(size_t const i) const; - size_t GetShowerIndexFromObjectIndex(size_t const i) const; -}; - - - - - - - - - - - -//THE HEADER FILE IS THE ABOVE - - - - - - - - -DetectorObjects_all::DetectorObjects_all() : - fobject_id(0), - ftrack_reco_type(2), - fshower_reco_type(1){} - - -//void DetectorObjects_all::AddTracks(art::ValidHandle> const & ev_t, -//DetectorObjects_all::AddTracks(std::vector> const & ev_t, -// bool const track_original_indices) { -void DetectorObjects_all::AddTracks( - std::vector> const & ev_t, - bool const track_original_indices){ - for(size_t i = 0; i < ev_t.size(); ++i) { - recob::Track const & t = *(ev_t.at(i)); - fobject_m.emplace(fobject_id, new Track(fobject_id, i, ftrack_reco_type, t)); - ftrack_index_v.push_back(fobject_id); - if(track_original_indices) foriginal_track_index_m.emplace(i, fobject_id); - ++fobject_id; - } -} - -//void DetectorObjects_all::AddShowers(art::ValidHandle> const & ev_s, -void DetectorObjects_all::AddShowers(std::vector> const & ev_s, bool const track_original_indices) { - for(size_t i = 0; i < ev_s.size(); ++i) { - recob::Shower const & s = *(ev_s.at(i)); - fobject_m.emplace(fobject_id, new Shower(fobject_id, i, fshower_reco_type, s)); - fshower_index_v.push_back(fobject_id); - if(track_original_indices) foriginal_shower_index_m.emplace(i, fobject_id); - ++fobject_id; - } -} - - -void DetectorObjects_all::SetAssociated(size_t const i) { - - auto om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - om_it->second->fis_associated = true; - -} - - -int DetectorObjects_all::GetRecoType(size_t const i) const { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - return om_it->second->freco_type; - -} - - -DetectorObject const & DetectorObjects_all::GetDetectorObject(size_t const i) const { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - return *om_it->second; - -} - - -Track & DetectorObjects_all::GetTrack(size_t const i) { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - Track * t = dynamic_cast(fobject_m.find(i)->second); - - if(!t) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not convert: " << i << std::endl; - exit(1); - } - - return *t; - -} - - -Track const & DetectorObjects_all::GetTrack(size_t const i) const { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - Track * t = dynamic_cast(fobject_m.find(i)->second); - - if(!t) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not convert: " << i << std::endl; - exit(1); - } - - return *t; - -} - - -Shower & DetectorObjects_all::GetShower(size_t const i) { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - Shower * s = dynamic_cast(fobject_m.find(i)->second); - - if(!s) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find convert: " << i << std::endl; - exit(1); - } - - return *s; - -} - - -Shower const & DetectorObjects_all::GetShower(size_t const i) const { - - auto const om_it = fobject_m.find(i); - - if(om_it == fobject_m.end()) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object: " << i << std::endl; - exit(1); - } - - Shower * s = dynamic_cast(fobject_m.find(i)->second); - - if(!s) { - std::cout << __PRETTY_FUNCTION__ << "\nCould not find convert: " << i << std::endl; - exit(1); - } - - return *s; - -} - - -size_t DetectorObjects_all::GetTrackIndexFromObjectIndex(size_t const i) const { - -// auto om_it = foriginal_track_index_m.find(i); -// -// if(om_it == foriginal_track_index_m.end()) { -// std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; -// exit(1); -// } -// -// return om_it->second; - for(auto it = foriginal_track_index_m.begin(); it != foriginal_track_index_m.end(); ++ it){ - if(it->second == i) return it->first; - } - return foriginal_track_index_m.begin()->first; - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; - exit(1); - -} - - -size_t DetectorObjects_all::GetShowerIndexFromObjectIndex(size_t const i) const { - -// auto om_it = foriginal_shower_index_m.find(i); - -// if(om_it == foriginal_shower_index_m.end()) { -// std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; -// exit(1); -// } -// -// return om_it->second; - for(auto it = foriginal_shower_index_m.begin(); it != foriginal_shower_index_m.end(); ++ it){ - if(it->second == i) return it->first; - } - return foriginal_shower_index_m.begin()->first; - std::cout << __PRETTY_FUNCTION__ << "\nCould not find object associated to original index: " << i << std::endl; - exit(1); - - -} -} -#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h deleted file mode 100644 index 0a3e928dd..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/ParticleAssociations.h +++ /dev/null @@ -1,698 +0,0 @@ - - -#ifndef PARTICLEASSOCIATIONS_H -#define PARTICLEASSOCIATIONS_H - -#include "../SinglePhoton_module.h" -#include "DetectorObjects.h" -#include //read and write txt file. - -using namespace std; - -//what does f in fxxxx mean ???? - -namespace single_photon{ -class ParticleAssociations_all; - -//This is for a single candidate vertex. -class ParticleAssociation{//Yes, it is with and without s! - //private - friend ParticleAssociations_all; - - // this is a collection of indices and vertices, - // appended in the AddShower1() function in this class. - // Their elements come from AddShower() function in the class ParticleAssociations_all - std::vector findices; - std::vector fvertices; - - - geoalgo::Point_t fvertex; - double fgoodness; - - std::multimap fconnected_associations; - -public: -//Constructor, for internal used only, I guess. -// indices (input) - to label - ParticleAssociation(std::vector const & indices, - std::vector const & vertices, - geoalgo::Point_t const & vertex, - double const goodness); - - void AddConnection(size_t const i, size_t const n) { - fconnected_associations.emplace(i, n); - } - //Note: this is not for adding pandora_object.. - //this adds the vertex candidates; - // 2-argument function; - void AddShower1(size_t const n, geoalgo::Point_t const & vert) { - findices.push_back(n); - fvertices.push_back(vert); - } - - std::vector const & GetObjectIndices() const { - return findices; - } - - std::vector const & GetVertices() const { - return fvertices; - } - - geoalgo::Point_t const & GetVertexFromNode(size_t const n) const { - - auto const nv_itb = findices.begin(); - auto const nv_ite = findices.end(); - - return fvertices.at(std::find(nv_itb, nv_ite, n) - nv_itb); - - } - - geoalgo::Point_t const & GetRecoVertex() const { - return fvertex; - } - - double GetGoodness() const { - return fgoodness; - } - - std::multimap const & GetConnections() const { - return fconnected_associations; - } - - /************ - * - * Print out association indices, vertex, and goodness, and connections? - * - * *********/ - void PrintAssociation() const; - -}; - - -//This is the final collection that we want. -class ParticleAssociations_all{ - - friend class SinglePhoton;//OK~ now SinglePhoton can use things in this class! - DetectorObjects_all fdetos;//here introduces the DetectorObjects.h - - std::vector fassociations; - std::vector fobject_index_v;//indices for pandora_objects? - std::vector fassociation_index_vec;//0,1,2,3... to indicates candidate vertices; - std::vector fignore_association_vec; - std::vector fselected_associations;//Indices of selected associations (candidate vertice). Done under GetShowerAssociations() - - bool fverbose; - -public: - - ParticleAssociations_all(); - - DetectorObjects_all & GetDetectorObjects() {return fdetos;}//gives out the DetectorObjects_all. - DetectorObjects_all const & GetDetectorObjects() const {return fdetos;} - - void Reset(); - - /************* - * - * AddAssociation() - evaluate all end points of tracks and identify - * those are close to each others; form a bounding sphere that - * includes those end points. The last two arguments are to save the - * info. of that bounding sphere. - * - * nodes - Track IDs. - * vertices - end points of tracks. - * vertex - center of the bounding sphere that includes all - * track end points as indicated in the vertices. - * goodness - the radius of the bounding sphere. (0 for this function?) - * - * ************/ - - void AddAssociation( - std::vector const & nodes, - std::vector const & vertices, - geoalgo::Point_t const & vertex, - double const goodness = 0); - - - /************************* - * - * AddShower() - - * index - this is only for the fassociation_index_vec; - * I guess, this is to append the nth association. - * n - this coud be the index (ID) for a pandora_object. - * vert - a pandora vertex. - * - * ***********************/ - void AddShower(size_t const index, - size_t const n, - geoalgo::Point_t const & vert);//used - - std::vector const & GetAssociations() const { - return fassociations; - } - - std::vector const & GetObjectIndices() const { - return fobject_index_v; - } - - std::vector const & GetAssociationIndices() const { - return fassociation_index_vec; - } - -/* - * - * GetAssociationIndicesFromObject() - gives all iterators, who can locate - * the element in fobject_index_v that gives the value n. This gives - * the collection of iterators that can be used to locate object with - * ID, n, among the particle associations. - * - */ - std::vector GetAssociationIndicesFromObject(size_t const n); - - void IgnoreAssociation(size_t const n) {//CHECK, when do we use IgnoreAssociation?? - cout<<"\n\n\n\n CHECK Here is where I use the IgnoreAssociation"< const & previously_considered); - void IgnoreThis(size_t const to_ignore, size_t const connected_index, std::vector & previously_considered); - - - /********************* - * - * ******************************/ - void IgnoreAssociationsConnectedTo(size_t const i); - - void ClearIgnored() { - fignore_association_vec.clear(); - } - - - - //Some utility functions are listed below. They are not the cores of the code. - - - /****************** - * - * Print out each associations, further detail is taken care in PrintAssociation(); - * - * ****************/ - void PrintAssociations_all() const; - - /****************** - * - * Print out particular (the nth) associations, further detail is taken care in PrintAssociation(); - * - * ****************/ - void PrintAssociations(std::vector const & associations_to_print) const; - - void PrintNodes() const; - - void Test() const; - - void NodeCheck(); - - /*************** - * - * GetShowerAssociations() - the main contribution - * is to determine the vector fselected_associations. - * - * ************/ - void GetShowerAssociations(); - - std::vector & GetSelectedAssociations() {return fselected_associations;} - std::vector const & GetSelectedAssociations() const {return fselected_associations;} - - //void DeleteAssociation(size_t const s); - - void SetVerbose(bool const verbose = true) {fverbose = verbose;} - -}; - - - - - - -//THE HEADER FILE IS THE ABOVE - - - - - - - - - - -ParticleAssociation::ParticleAssociation(std::vector const & indices, - std::vector const & vertices, - geoalgo::Point_t const & vertex, - Double_t const goodness) : - findices(indices), - fvertices(vertices), - fvertex(vertex), - fgoodness(goodness){} - - -void ParticleAssociation::PrintAssociation() const { - - for(size_t i = 0; i < findices.size(); ++i){ - std::cout << "Object index: " << findices.at(i) << std::endl; - } - - std::cout << "\nVertex: " << fvertex << ", goodness: "; - std::cout << fgoodness << std::endl; - - std::cout << "\nConnections:\n"; - for(std::pair const & pair : fconnected_associations){ - std::cout << "Association index: " << pair.first << " object index: " << pair.second << std::endl; - } -} - - - - -ParticleAssociations_all::ParticleAssociations_all() : - fverbose(false){}//DAMN, : fverbose(false) was misunderstood as the constructor in SinglePhoton.. - - -void ParticleAssociations_all::Reset() { - - fassociations.clear(); - fobject_index_v.clear(); - fassociation_index_vec.clear(); - -} - - -void ParticleAssociations_all::AddAssociation( - std::vector const & nodes, - std::vector const & vertices, - geoalgo::Point_t const & vertex, - Double_t const goodness) { - - fassociations.push_back(ParticleAssociation(nodes, vertices, vertex, goodness)); - - size_t const pos = fassociations.size() - 1; - - for(size_t const n : nodes) { - - auto const nv_itb = fobject_index_v.begin(); - auto const nv_ite = fobject_index_v.end(); - - for(auto nv_it = nv_itb; nv_it != nv_ite; ++nv_it) { - - nv_it = std::find(nv_it, nv_ite, n); - - if(nv_it != nv_ite) { - - size_t const index = fassociation_index_vec.at(nv_it - nv_itb); - - fassociations.at(index).AddConnection(pos, n); - fassociations.at(pos).AddConnection(index, n); - - } else{ - break; - } - - } - - fobject_index_v.push_back(n); - fassociation_index_vec.push_back(pos); - - } - - for(size_t const i : nodes) { - fdetos.SetAssociated(i); - } - - -} - - -void ParticleAssociations_all::AddShower(size_t const index, - size_t const n, - geoalgo::Point_t const & vert) { - - if(index > fassociations.size() - 1) { - std::cout << "No association with index: " << index << std::endl; - return; - } - - //Dont know why consruct a ParticleAssociation here.. - ParticleAssociation & association = fassociations.at(index); - std::vector const & group = association.GetObjectIndices(); - - if(std::find(group.begin(), group.end(), n) != group.end()) { -// std::cout << "Object ID: " << n << " already added\n"; - return; - } - - fassociation_index_vec.push_back(index); - - fobject_index_v.push_back(n); - - association.AddShower1(n, vert);//this is for single association; Only Here, the 2nd and 3rd argument from the AddShower(); - - fdetos.SetAssociated(n); - -} - - -std::vector ParticleAssociations_all::GetAssociationIndicesFromObject(size_t const n) { - - auto const nv_itb = fobject_index_v.begin(); - auto const nv_ite = fobject_index_v.end(); - auto nv_it = nv_itb; - - std::vector indices; - - while(nv_it != nv_ite) { - - nv_it = std::find(nv_it, nv_ite, n); - - if(nv_it != nv_ite) { - indices.push_back(nv_it - nv_itb); - ++nv_it; - } - - } - - return indices; - -} - -/*CHECK -bool ParticleAssociations_all::Ignore(size_t const i) const { - auto const sk_it = - std::find(fignore_association_vec.begin(), fignore_association_vec.end(), i);//return the iterator who points to the number i. - if(sk_it == fignore_association_vec.end()) { - cout<<" Ok.. Ignore() is going to return false CHECK)"< const & previously_considered) { - - if(fverbose) std::cout << "Handle loop\n"; - - size_t delete_association = SIZE_MAX; - double largest_sphere = -1; - for(size_t const s : previously_considered) { - ParticleAssociation const & pa = fassociations.at(s); - if(pa.GetObjectIndices().size() == 2 && pa.GetConnections().size() == 2 && pa.GetGoodness() > largest_sphere) { - delete_association = s; - largest_sphere = pa.GetGoodness(); - } - } - - if(delete_association == SIZE_MAX) return false; - DeleteAssociation(delete_association); - return true; - -} -*/ - - -void ParticleAssociations_all::IgnoreThis(size_t const to_ignore, size_t const connected_index, std::vector & previously_considered) { - - if(std::find(previously_considered.begin(), previously_considered.end(), to_ignore) != previously_considered.end()) return; - - previously_considered.push_back(to_ignore); - ParticleAssociation const & pa = fassociations.at(to_ignore); - fignore_association_vec.push_back(to_ignore); - - for(std::pair const & p : pa.GetConnections()) { - if(p.first == connected_index) continue; - IgnoreThis(p.first, to_ignore, previously_considered); - } - -} - - - -void ParticleAssociations_all::IgnoreAssociationsConnectedTo(size_t const i) { - - ParticleAssociation const & pa = fassociations.at(i); - - for(std::pair const & p : pa.GetConnections()) { - std::vector previously_considered; - IgnoreThis(p.first, i, previously_considered); - } - -} - - -void ParticleAssociations_all::PrintAssociations_all() const { - - std::cout << "\n\n--------------Report all the Particle Association Result--------------------------\n\n"; - - for(size_t i = 0; i < fassociations.size(); ++i) { - - std::cout << "Association: " << i << std::endl; - - fassociations.at(i).PrintAssociation(); - - std::cout << std::endl; - - } - - std::cout << std::endl; - -} - - -void ParticleAssociations_all::PrintAssociations(std::vector const & associations_to_print) const { - - std::cout << "----------------------------------------\n\n"; - - for(size_t i = 0; i < fassociations.size(); ++i) { - - if(std::find(associations_to_print.begin(), associations_to_print.end(), i) == associations_to_print.end()) continue; - - std::cout << "Association: " << i << std::endl; - - fassociations.at(i).PrintAssociation(); - - std::cout << std::endl; - - } - - std::cout << std::endl; - -} - - -void ParticleAssociations_all::PrintNodes() const { - - std::cout << "Nodes:\n"; - - for(size_t i = 0; i < fobject_index_v.size(); ++i) - std::cout << "Nodes: " << fobject_index_v.at(i) << " Index: " - << fassociation_index_vec.at(i) << std::endl; - -} - - -void ParticleAssociations_all::Test() const { - - for(ParticleAssociation const & pae : fassociations) { - - for(std::pair const & pair : pae.GetConnections()) { - - size_t const i = pair.first; - - std::vector const & c = fassociations.at(i).GetObjectIndices(); - auto c_itb = c.begin(); - auto c_ite = c.end(); - - auto c_it = c_ite; - - for(size_t const n : pae.GetObjectIndices()) { - - c_it = std::find(c_itb, c_ite, n); - - if(c_it != c_ite) break; - - } - - if(c_it == c_ite) std::cout << "Complain\n"; - - } - - } - -} - - -void ParticleAssociations_all::NodeCheck() { - - std::vector nodes; - - for(size_t const n : fobject_index_v) { - if(nodes.size() < n+1) nodes.resize(n+1, 0); - ++nodes.at(n); - } - - for(size_t i = 0; i < nodes.size(); ++i) { - - size_t const s = nodes.at(i); - if(s == 0) continue; - - DetectorObject const & deto = fdetos.GetDetectorObject(i);//Singuar used once; - if(fverbose){ - if(deto.freco_type == fdetos.ftrack_reco_type && s > 2) - std::cout << "track > 2 entries: " << s << std::endl; - if(deto.freco_type == fdetos.fshower_reco_type && s > 1) - std::cout << "shower > 1 entries: " << s << std::endl; - } - - } - -} - - -void ParticleAssociations_all::GetShowerAssociations() { -// if(fverbose) std::cout << "GetShowerAssociations\n"; - - int screen_width = 86; - std::multimap pa_map;//Partical Association Map; it maps vertex index to the vertex's z-coordinate respectiely. - - - if(fverbose&&fassociations.size()>0) { - std::cout << "Number of particle associations (candidate vertices): " << fassociations.size() << "\n\n"; - - //Print the title - cout<0){//Shower ID - string temp_showeroutput = showerids+"(take this)"; - cout< const & p : pa_map) { - //p is a pair - -// if(fverbose) std::cout << "\tAssociation: " << p.second << " " << "z-position (of a shower): " << p.first << "\n"; - -// auto const sk_it = std::find(fignore_association_vec.begin(), fignore_association_vec.end(), p.second);//return the iterator who points to the number i. -// if( sk_it != fignore_association_vec.end() ){ //Ignore(the association index), initially empty, which NULL can pass through; -// cout<<"Ignore(p.second) is true"< considered_connected_associations; - for(std::pair const & p : fassociations.at(s).GetConnections()) { - if(std::find(considered_connected_associations.begin(), considered_connected_associations.end(), p.first) != considered_connected_associations.end()) continue; - std::multimap & connections = fassociations.at(p.first).fconnected_associations; - auto c_it = connections.find(s); - if(c_it == connections.end()) { - std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nNo connections found\n"; - exit(1); - } - while(c_it != connections.end()) { - connections.erase(c_it); - c_it = connections.find(s); - } - considered_connected_associations.push_back(p.first); - } - - if(fverbose) std::cout << "Delete association in ParticleAssociations_all vector\n"; - - fassociations.erase(fassociations.begin()+s); - - if(fverbose) std::cout << "Delete ParticleAssociations_all bookeeping of association and object indices\n"; - - auto av_it = std::find(fassociation_index_vec.begin(), fassociation_index_vec.end(), s); - while(av_it != fassociation_index_vec.end()) { - fobject_index_v.erase(fobject_index_v.begin()+size_t(av_it-fassociation_index_vec.begin())); - fassociation_index_vec.erase(av_it); - } - - if(fverbose) { - std::cout << "End delete association\n"; - } - -} -*/ -} - - -#endif diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h deleted file mode 100644 index aaf18e4a8..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/VertexBuilder/VertexBuilder.h +++ /dev/null @@ -1,1210 +0,0 @@ -#ifndef VERTEXBUILDER_H -#define VERTEXBUILDER_H - -#include "ParticleAssociations.h" - -#include "art/Framework/Services/Optional/TFileService.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Optional/TFileDirectory.h" - -#include "TTree.h" -#include //read and write txt file. - -/********************** - *stuct VertexBuilderTree: it store values of variables extracted - from the artObjects? (values from the raw root file) - * - *class VertexBuilder: it contains functions for determining the vertex of objects - assigned by the class ParticleAssociations_all. - * - *********************/ - -using namespace std; - -namespace single_photon{ - struct VertexBuilderTree { - - TTree * ftree; - int frun_number; - int fsubrun_number; - int fevent_number; - int ftrack_number; - int fshower_number; - // int fassociation_track_number; //CHECK,number of track associations; - // int fassociation_shower_number; //CHECK,number of shower associations; - int fassociation_final_number; //number of total associations; - - VertexBuilderTree() : - ftree(nullptr){} - /********************************************************************* - * Setup() - Obtain the addresses of event variables - * (indices for particular events, showers, and tracks). - *********************************************************************/ - void Setup() { - art::ServiceHandle< art::TFileService > tfs; - ftree = tfs->make("VertexBuilder", ""); - ftree->Branch("run_number", &frun_number, "run_number/I"); - ftree->Branch("subrun_number", &fsubrun_number, "subrun_number/I"); - ftree->Branch("event_number", &fevent_number, "event_number/I"); - ftree->Branch("track_number", &ftrack_number, "track_number/I"); - ftree->Branch("shower_number", &fshower_number, "shower_number/I"); - // ftree->Branch("association_track_number", &fassociation_track_number, "association_track_number/I"); - // ftree->Branch("association_shower_number", &fassociation_shower_number, "association_shower_number/I"); - ftree->Branch("association_final_number", &fassociation_final_number, "association_final_number/I"); - } - - }; - - - class VertexBuilder { - - geoalgo::GeoAlgo const falgo; - - size_t fobject_id; - - double fstart_prox;//the maximum track proximity threshold (in cm) - double fshower_prox;//the maximum shower proximity threshold (in cm) - double fcpoa_vert_prox;//the maximum distance btw shower start to a track end point(in cm); - double fcpoa_trackend_prox;//the maximum distance btw mid point of impact parameter of shower to the vertex (in cm); - - DetectorObjects_all const * fdetos; - - VertexBuilderTree * fvbt; - - bool fverbose; - - void CheckSetVariables();// exit if the criteria are not set. - - void Erase(std::multimap & pn, - std::multimap::iterator const best_it, - geoalgo::Point_t const & sv); - - /***************************** - * - * AssociateTracks() - this associates tracks to either end points of other tracks - * whose are nearby. - * - * ***************************/ - void AssociateTracks(ParticleAssociations_all & pas); - - /* - * FindClosestApproach() - find the center points of two points along - * the backward projection that give minimum impact parameter; this - * also returns the distance of two of such points. - *shr1, shr2 - two showers with start points and direction - *vtx - a vertex to be updated. - */ - double FindClosestApproach(const geoalgo::HalfLine_t & shr1, - const geoalgo::HalfLine_t & shr2, - geoalgo::Point_t & vtx) const; - - /***************************** - * - * AssociateShowers() - Run after AssociateTracks(); - * this associates showers to either end points of a track - * that is considered to be from the same vertex. - * - * ***************************/ - void AssociateShowers(ParticleAssociations_all & pas); - - - void AddLoneTracks(ParticleAssociations_all & pas); - void AddLoneShowers(ParticleAssociations_all & pas); - - - /***************************** - * - * AssociateShowers() - Run after AssociateTracks(); - * this associates showers to either end points of a track - * that is considered to be from the same vertex. - * - * ***************************/ - void FillVBT(ParticleAssociations_all & pas); - - void dist_marker ( vector & dist_field, double input) { - if(dist_field[0] == 999) { - dist_field[0] = input; - }else { - dist_field.push_back(input); - } - cout<<"Mark a distance."< f_dist_tt;//track&track, start_prox - vector f_dist_sx;//shower&anything, shower_prox - vector f_dist_st;//shower&track, cpoa_vert_prox - vector f_dist_sst;//shower&shower&track, cpoa_trackend_prox - - - VertexBuilder(); - - void SetVerbose(bool const verbose = true) {//allow output info. to the terminal - fverbose = verbose; - } - - void SetParameters (std::vector< double > p){ - - fstart_prox = p[0]; - fshower_prox = p[1]; - fcpoa_vert_prox = p[2]; - fcpoa_trackend_prox = p[3]; - - f_dist_tt.push_back(999);//track&track, start_prox - f_dist_sx.push_back(999);//shower&anything, shower_prox - f_dist_st.push_back(999);//shower&track, cpoa_vert_prox - f_dist_sst.push_back(999);//shower&shower&track, cpoa_trackend_prox - - if(fverbose){ - cout<> const & ev_t); - // void AddShowers(art::ValidHandle> const & ev_s); - // void AddTracks(std::vector> const & ev_t); - // void AddShowers(std::vector> const & ev_t); - - // The main code is here; it calls up all the necessary process. - void Run(ParticleAssociations_all & pas); - - }; - - - - - - - - - - - - - - - - //HEADER FILE ARE ABOVE - - - - - - - - - - - - - - - VertexBuilder::VertexBuilder() : - fobject_id(0), - fstart_prox(-1), - fshower_prox(-1), - fcpoa_vert_prox(-1), - fcpoa_trackend_prox(-1), - fdetos(nullptr), - fvbt(nullptr), - fverbose(true) {} - - - void VertexBuilder::CheckSetVariables() { //this was initialized - - if(fstart_prox == -1) {//It start_prox was not previously defined, exit. - std::cout << "fstart_prox, the maximum track proximity threshold, is not set\n"; - exit(1); - } - - if(fshower_prox == -1) { - std::cout << "fshower_prox, the maximum shower proximity threshold, is not set\n"; - exit(1); - } - - if(fcpoa_vert_prox == -1) { - std::cout << "fcpoa_vert_prox, the maximum distance btw shower start to the cloest approach, is not set\n"; - exit(1); - } - - if(fcpoa_trackend_prox == -1) { - std::cout << "fcpoa_trackend_prox, the maximum distance btw mid point of impact parameter of shower to the vertex, is not set\n"; - exit(1); - } - - } - - - void VertexBuilder::Erase(std::multimap & pn, - std::multimap::iterator const best_it, - geoalgo::Point_t const & sv) {//Remove candidates that have been analyzed. - - size_t const index = best_it->first; - pn.erase(best_it); - - if(fdetos->GetRecoType(index) == fdetos->ftrack_reco_type) { - auto const pn_it = pn.find(index); - if(fdetos->GetTrack(index).ftrajectory.Length() < fstart_prox || - (pn_it != pn.end() && pn_it->second->Dist(sv) < fstart_prox)) { - pn.erase(pn_it); - } - } - - } - - - void VertexBuilder::AssociateTracks(ParticleAssociations_all & pas) {//Group tracks - - //Ingredients: Key for tracks, Point coordinates along the track (recob:: Trajectory) - int screen_width = 86; - - std::multimap pn;//This maps an # to a pointer to the track start/end points - /* Structure of pn: - * Iterator Key Value - * 0 Key[0] point1 - * 1 Key[0] point2 - * 2 Key[1] pointa - * 3 Key[1] pointb - * . - * example of calling first row: - * pn.begin(), pn[0].first, pn[0].second - */ - - //#1 load up tracks to pn: 1 id for 2 end points; - for(size_t const i : fdetos->GetTrackIndices()) { - - Track const & t = fdetos->GetTrack(i); - geoalgo::Vector ref_point(1,1,1);//use this to pick valid end points; i.e. kill (-999,-999,-999) - - if(t.ftrajectory.front().Dot(ref_point) > -2996){ - pn.emplace(t.fid, &t.ftrajectory.front());//track ID and point; - } - if(t.ftrajectory.back().Dot(ref_point) > -2996){ - pn.emplace(t.fid, &t.ftrajectory.back()); - } - /* appended map of one of this loop: - * < track_id, {track beginning point, track ending point}> - */ - } - - if(fverbose) { - std::cout << "STEP I: Load " << pn.size() << " track end points to be evaluated.\n\n"; - - if(pn.size()) {//Print the title - std::stringstream output_buf; - output_buf<GetTrack(p.first).ftrajectory.Length();//Track Length - //ftrajectory is the obejct in art library - cout<<"| "<<*p.second< 1) {//while there are tracks to be evaluated, loop them and try to make candidate vertex. - - auto best_match = pn.end(); //best match (iterator) is assumed to be the iterator of the last track; - auto best_candidate = best_match; //best candidate; - - double best_dist = fstart_prox;//Max. track proximity threshold (t_max) - if(fverbose) - std::cout << "\tRemain "<< pn.size() <<" track end points for evaluation," << std::endl; - - for(auto match_this = pn.begin(); match_this != pn.end(); ++match_this) {//iterator to indicate the point we are evaluating - - if(std::next(match_this) == pn.end()) break;//stop when there is only one track end point left; - if(fverbose) - std::cout << "\t\tEnd point from the track (ID: " << match_this->first <<"):"<< std::endl; - - double temp_save_this_dist = 999; - for(auto compare_this = std::next(match_this); compare_this != pn.end(); ++compare_this) { - if(fverbose) - std::cout << "\t\t\tCompare to a end point from a track (ID: " << compare_this->first<<"); "; - if(match_this->first == compare_this->first){//if two end points from the same track, skip this round. - if(fverbose) std::cout<<"\t\t\t\tSame track, skip!"<second->Dist(*match_this->second);//distance between match_this point to compare_this point; - - - if(fverbose) std::cout << "distance btw them: " << dist << ", the shortest: "<< best_dist << std::endl; - // if(dist==0) std::cout<<" Reject this point."<>Take this track end point as a better candidate vertex!\n\n"; - best_match = match_this; - best_candidate = compare_this; - best_dist = dist; - } - if(temp_save_this_dist>dist) temp_save_this_dist = dist; - } - dist_marker(f_dist_tt, temp_save_this_dist); - } - - if(best_match == pn.end() || pn.size()<2) { - if(fverbose) - std::cout << "\tNah, tracks are all single. No vertex candidate for tracks.\n"; - return; - } - //at this moment, we have: - // best_match - the iterator of an end-point of one track - // best_candidate - the iterator of an end-point of another track - // best_dist - the cloest distance between these two points - - std::vector track_IDs; - track_IDs.push_back(best_match->first); - track_IDs.push_back(best_candidate->first); - - std::vector points; - points.push_back(*best_match->second); - points.push_back(*best_candidate->second); - - geoalgo::Sphere sphere(falgo.boundingSphere(points));//falgo is an GeoAlgo object, this sets the mid point of two track endpoints as new candidate verex. - - Erase(pn, best_match, sphere.Center());//remove the points that has been added as candidate vertex. - Erase(pn, best_candidate, sphere.Center()); - - //#3 add more tracks around the vertex candidate - if(fverbose){ - std::cout << "\n\nSTEP III: Add tracks around the vertex candidate. "; - std::cout << "ID: "<< best_match->first<<" at ("; - cout<second->Dist(sphere_center); - if(fverbose){ - std::cout << "\t\tTrack (ID: " << this_iterator->first<< ") end point "; - std::cout << "is at distant: " << dist << " maximum allowed distance: " << sbest_dist << std::endl; - } - - if(std::find(track_IDs.begin(), track_IDs.end(), this_iterator->first) != track_IDs.end()) { - if(fverbose) - std::cout << " This is not the last track?(CHECK) Skip\n"; - continue; - } - - if(dist < sbest_dist) {//when find a close track end point, attch it to the candidate vertex. - if(fverbose) - std::cout << "\t\t\tTake this track. Update the shortest distance!\n"; - best_o = this_iterator; - sbest_dist = dist; - } - } - - if(best_o == pn.end()) {//exit the loop only when - if(fverbose) - std::cout << "\tNo more tracks can be added.\n"; - break; - } - - track_IDs.push_back(best_o->first); - points.push_back(*best_o->second); - - Erase(pn, best_o, *best_o->second); - - //s = algo.boundingSphere(points); - - } while(true);//if false, then it only loops once; - //points - point objects that contains positions; - //boundingSphere(points) is a minimum sphere that contains points. - pas.AddAssociation(track_IDs, points, sphere.Center(), falgo.boundingSphere(points).Radius()); - - if(fverbose){//no worry, the code would not run this part is there were no candidate vertex. - cout<<"\nSummary: add "< next shower_i - // - int screen_width = 86; - - std::map shower_map; - - //#1 load showers - for(size_t const i : fdetos->GetShowerIndices()) { - shower_map.emplace(i, &pas.GetDetectorObjects().GetShower(i)); - } - - std::vector const & associations = pas.GetAssociations();//Load vertex candidates, that contains vertices, radius of the vertex (bounding phere) - - while(shower_map.size()>0) { - if(fverbose) { - std::cout << "STEP I: Load " << shower_map.size() << " showers for evaluation.\n\n"; - - if(shower_map.size()) { - //Print the title - std::stringstream output_buf; - output_buf<fcone.Start();//Shower Coordinates - cout<<" | "<fcone.Dir()<first <<")"<< std::endl; - std::cout << "\t\t\t Compare to other showers:"<second->fcone.Start(); - geoalgo::Vector_t const & c_dir = this_iterator->second->fcone.Dir(); - - for(auto that_iterator = std::next(this_iterator); that_iterator != shower_map.end(); ++ that_iterator) {//look at each shower candidate, - - if(fverbose) std::cout << "\t\t\t Shower (ID: " << that_iterator->first <<") "; - - if( that_iterator->first == this_iterator->first) { - if(fverbose) std::cout << "is the same shower, skip (CHECK)\n"; - continue; - } - geoalgo::Point_t temp_vert; - - double dist = FindClosestApproach( that_iterator->second->fcone, this_iterator->second->fcone, temp_vert);//minimum impact parameter - //this is the shortest distance between two backward projection in 3D. - //update temp_vert as the mid point of these two points that gives the shortest distance. - - if(fverbose) - std::cout << "has bkw-projection distant to the current shower's bkw-projection, " << dist << ", and the shortest-dist so far is " - << best_dist << ".\n"; - - double temp_dist = best_dist;//fshower_prox now is temp_dist - - if(dist < temp_dist) {//min. impact parameter < max shower proximity threshold - - if(fverbose) std::cout << "\t\t\t\t>>Take their mid point as the candidate vertex and update the shortest-dist!\n"; - - best_shower_id = this_iterator->first; - best_other_id = that_iterator->first; - best_vert = temp_vert; - best_dist = dist; - index = SIZE_MAX; - AddShowerToVertex = false; - } - } - - // if(fverbose) std::cout << "\t\t >>Finish comparing showers to the shower with ID: "<first<GetTrackIndices()) {//compare tracks - - if(fverbose) - std::cout << "\t\t\t Track (ID: " << i <<") "; - Track const & t = fdetos->GetTrack(i); - - geoalgo::Point_t dont_care; - geoalgo::Point_t temp_vert; - - Double_t dist = - sqrt(falgo.SqDist(t.ftrajectory, - geoalgo::HalfLine(c_start, - c_dir*-1), - temp_vert,//this point will be changed along the track; id does not matter what value it is; - dont_care));//this is along the backward projection - //CHECK, temp_vert will becomes the first point of the ftrajectory, if parallel? this happens ! - - if(fverbose) - std::cout << "is distant to the bkw point, " - << dist << ", and the shortest_dist so far is " << best_dist << ".\n"; - - if(dist < best_dist) { - - if(fverbose) std::cout << "\t\t\t\t>>Take the bkw point ("<first; - best_other_id = i; - best_vert = temp_vert; - best_dist = dist; - index = SIZE_MAX; - AddShowerToVertex = false; - } - } - - - //if(fverbose) std::cout << "\t\t >>Finish comparing tracks to the shower with ID: "<first<>Take this candidate vertex as the precandidate vertex and update the shortest-dist!\n"; - - best_shower_id = this_iterator->first; - best_other_id = SIZE_MAX;//shower matches no shower nor track. - best_vert = falgo.ClosestPt(pa.GetRecoVertex(), this_iterator->second->fcone);//c.second->fcone is a Trajectory_t - best_dist = dist; - index = i;//the ith association - AddShowerToVertex = true; - } - } - - - if(fverbose) std::cout << "\t\t\t Finish comparison between shower and candidate vertex; \n"<>Finish looking at all showers with other showers, tracks, and vertex candidates. - //it normally ends up with a shower with a small distance to another shower/track/vertex candidate - - - dist_marker(f_dist_sx, best_dist); - //#3 precandidate vertex promotion - if(fverbose){ - cout << "STEP III: Try to promote the above precandidate vertex."<= fshower_prox) {//ds>=s_{max} - if(fverbose) std::cout << "\t larger than "<GetRecoType(best_other_id) ){ - case 1://#3.2.1 shower that gives the precandidate vertex; if no candidate vertex is found nearby, create one - { - size_t association_index = SIZE_MAX;//a large number; - double best_association_dist = fcpoa_vert_prox;//dist between precandidate vertex and candidate vertex - bool found_candidate_vertex = false; - - if(fverbose) { - std::cout << "A shower bkw point;"<>Find a nearby candidate vertex, update the shortest_dist.\n"; - - association_index = i;//get the index of association that gives the best association distance. - best_association_dist = dist; - found_candidate_vertex = true; - } - } - - - if(fverbose) std::cout << "\t\t\t Finish candidate vertex search.\n"<= fcpoa_vert_prox){} //this is a yes when the precandidate vertex is close to a candidate vertex - if(found_candidate_vertex){//candidate vertex is nearby - - if(fverbose) { - std::cout << "\t\t\t\t>>Find a candidate vertex (ID: "<< association_index; - std::cout<<") near the bkw point, so add both showers (ID: "; - std::cout<GetTrackIndices()) {//look at all tracks; - - geoalgo::Trajectory const & t = fdetos->GetTrack(i).ftrajectory; - //look at two end points of a track, and see if one of them is close to the precandidate vertex - double const trackend_dist = t.back().Dist(best_vert); - if(fverbose){ - std::cout << "\t\t\tStart point from the track (ID: " << i <<"): "; - std::cout << "distance btw them: " << trackend_dist << ", the shortest: "<< best_showerp_dist << std::endl; - } - if(trackend_dist < best_showerp_dist) { - best_track = i; - best_tp = &t.back(); - best_other_tp = &t.front(); - best_showerp_dist = trackend_dist; - promote_the_precandidate = true; - if(fverbose) std::cout << "\t\t\t\t>>Take this track end point as the closest!\n\n"; - } - - double const trackstart_dist = t.front().Dist(best_vert); - - if(fverbose){ - std::cout << "\t\t\tEnd point from the track (ID: " << i <<"): "; - std::cout << "distance btw them: " << trackstart_dist << ", the shortest: "<< best_showerp_dist << std::endl; - } - if(trackstart_dist < best_showerp_dist) { - best_track = i; - best_tp = &t.front(); - best_other_tp = &t.back(); - best_showerp_dist = trackstart_dist; - promote_the_precandidate = true; - if(fverbose) std::cout << "\t\t\t\t>>Take this track end point as the closest!\n\n"; - } - } - - dist_marker(f_dist_st, best_dist);//distance between shower&shower to a track end point, if updated. - if(fverbose){ - if(promote_the_precandidate){ - std::cout << "\t\t\t A nearby track end point is used as a candidate vertex."< const & index_positions = - pas.GetAssociationIndicesFromObject(best_track);//iterator that gives the best_track inside pas; - switch(index_positions.size()){ - case 0://no track end point is found from the candidate vertices; - { - if(fverbose) { - std::cout << "\t\t\t\t>>This is a new track! Create a candidate vertex from "; - std::cout<<" the mid point btw the bkw point and track end point.\n"; - if(best_tp == nullptr) std::cout << "The track-end point does not exist!\n";//tp = track point - } - - std::vector objects; - objects.push_back(best_shower_id);//a shower - objects.push_back(best_other_id);//other shower - objects.push_back(best_track);//the new track - std::vector verts(2, best_vert);//best_vert is the bkw point (of 2 showers); - - verts.push_back(*best_tp); - pas.AddAssociation(objects, - verts, - geoalgo::Sphere(*best_tp, best_dist).Center(),//bounding sphere - best_dist);//"goodness" - } - break; - case 1://1 end point is found from the candidate vertices; - { - size_t const index = - pas.GetAssociationIndices().at(index_positions.front()); - - geoalgo::Point_t const & added_point = - associations.at(index).GetVertexFromNode(best_track);//add the vertex candidate (obtained from two track end points) from pas; - - double const point_dist = added_point.Dist(*best_tp);//bounding sphere radius, distance btw track end point and vertex candidate; - double const otherpoint_dist = added_point.Dist(*best_other_tp);//same as above, but with the other track end point; - - if(otherpoint_dist < point_dist) {//another end point is cloeser than the chosen one; - - if(associations.at(index).GetRecoVertex(). - Dist(*best_tp) < fstart_prox) {//mid point of both showers, track end point, and candidate are nearby. - //if the vertex candidate is close enough to the track end point, - // then we add both showers (the track was already associated) to this candidate vertex; - pas.AddShower(index, best_shower_id, best_vert); - pas.AddShower(index, best_other_id, best_vert); - - } else {//the candidate vertex is far away from the track end point, - // then make a new candidate vertex for these 2 showers and the track; - if(fverbose) { - std::cout << "\t\t\t\t>>This is a new track! Create a candidate vertex from "; - std::cout<<" the mid point btw the bkw point and track end point.\n"; - if(best_tp == nullptr) std::cout << "The track-end point does not exist!\n";//tp = track point - } - - std::vector showers; - showers.push_back(best_shower_id); - showers.push_back(best_other_id); - showers.push_back(best_track); - std::vector verts(2, best_vert); - verts.push_back(*best_tp); - pas.AddAssociation(showers, - verts, - geoalgo::Sphere(*best_tp, best_dist).Center(), - best_dist); - } - } else {//this is cloesd enought; associate both showers to the candidate vertex - pas.AddShower(index, best_shower_id, best_vert); - pas.AddShower(index, best_other_id, best_vert); - } - } - break; - case 2://2 end points are found from the candidate vertices; - {//for the track end point that is closer to the candidate vertex, - // add associate both showers respecting to that end point to the candidate vertex. - size_t const indexa = - pas.GetAssociationIndices().at(index_positions.front()); - double dista = - associations.at(indexa).GetRecoVertex().Dist(best_vert); - - size_t const indexb = - pas.GetAssociationIndices().at(index_positions.back()); - double distb = - associations.at(indexb).GetRecoVertex().Dist(best_vert); - - if(dista < distb) { - pas.AddShower(indexa, best_shower_id, best_vert); - pas.AddShower(indexa, best_other_id, best_vert); - } else { - pas.AddShower(indexb, best_shower_id, best_vert); - pas.AddShower(indexb, best_other_id, best_vert); - } - } - break; - default: { - cout<<"WARNING, if you see this line, it means you find more than two end points on a track."<>promote the precandidate connecting two showers as a vertex candidate: "; - - std::vector showers; - showers.push_back(best_shower_id); - showers.push_back(best_other_id); - std::vector verts(2, best_vert); - geoalgo::Point_t temp_vert2 = geoalgo::Sphere(best_vert, best_dist).Center(); - pas.AddAssociation(showers, - verts, - //geoalgo::Sphere(best_vert, best_dist).Center(), - temp_vert2, - best_dist); - - if(fverbose) { - std::cout << "\t\t\t\t>>No candidate vertex or track end points near the bkw point,"<>Finish comparing to the shower with ID: " << best_other_id << std::endl; - shower_map.erase(best_other_id);//When a shower is analyzed, eliminate it; - } - break; - - case 2: - {//#3.2.2 track that gives the precandidate vertex; if the track end point is not a candidate vertex, create one; - //best_vert is the shower start. - if(fverbose) std::cout << "A track end point with ID "<GetTrack(best_other_id).ftrajectory; - - double best_trackend_dist = t.front().Dist(best_vert);//dist btw track end point and precandidate vertex; - geoalgo::Point_t const * point = &t.front();//precandidate vertex, i.e. track end point; - geoalgo::Point_t const * otherpoint = &t.back();//another end of the track; - - double const trackend_dist = t.back().Dist(best_vert); - - if(trackend_dist != 0 && trackend_dist < best_trackend_dist) {//compare edges of q track to best_vert point non-zero distance - if(fverbose) std::cout<<"\t\t\tanother end of the track is closer to the bkw point, so take this."< const index_positions = - pas.GetAssociationIndicesFromObject(best_other_id); - //this helps to find the object with best_other_id as value - // in the pas. - - if(fverbose) - std::cout << "\t\t\tAdding shower to the existing candidate vertex, " - << "# of track end points as the candidate vertex: " - << index_positions.size() << std::endl; - - std::vector objects; - std::vector verts; - - switch(index_positions.size()){ - case 0://the track has no end points as cnadidate vertex; - { - if(fverbose) - std::cout << "\t\t\t\tPromote the bkw point as the candidate vertex\n"; - - objects.push_back(best_shower_id); - objects.push_back(best_other_id); - verts.push_back(best_vert); - verts.push_back(*point); - pas.AddAssociation(objects, - verts, - geoalgo::Sphere(*point, best_dist).Center(), - best_dist); - } - break; - case 1://the track has 1 end point as candidate vertex - { - if(fverbose) - std::cout << "\t\t\t\tAdd shower to the candidate vertex or create a new candidate vertex with the track end point\n"; - - size_t const index = - pas.GetAssociationIndices().at(index_positions.front());//get the end point as candidate vertex - - geoalgo::Point_t const & added_point = - associations.at(index).GetVertexFromNode(best_other_id); - - double const point_dist = added_point.Dist(*point);//point is the close track end point - double const otherpoint_dist = added_point.Dist(*otherpoint);//other point is the far track end point, introduced because of the candidate vertex; - - if(fverbose) - std::cout << "\t\t\t\tdist of the candidate to related track end point: "<< otherpoint_dist - <<" or the other end of that track: "<< point_dist << "\n"; - - if(otherpoint_dist < point_dist) { - - if(fverbose) - std::cout << "\t\t\t\t\tanother end is closer\n" - << "\t\t\t\t\tdistance between candidate vertex and the track end point (as used to find the candidate vetex): " - << associations.at(index).GetRecoVertex().Dist(*point) - << " < track-track distance: " << fstart_prox << " ?\n"; - - if(associations.at(index).GetRecoVertex(). - Dist(*point) < fstart_prox) { - if(fverbose) std::cout << "\t\t\t\t\t\tYes, add the shower to the candidate vertex\n"; - pas.AddShower(index, best_shower_id, best_vert);//Add Shower to the candidate vertex - } else { - - if(fverbose) std::cout << "\t\t\t\t\t\tNo, add the shower and the other track end point as candidate vertex."< verts; - verts.push_back(best_vert); - verts.push_back(*point); - pas.AddAssociation(objects, - verts, - geoalgo::Sphere(*point, best_dist).Center(), - best_dist);//make a bounding sphere by merging different vertices - } - } else{ - - if(fverbose) - std::cout << "\t\t\t\t\tthe candidate vertex is indeed closer\n" - << "\t\t\t\t\tAdd the shower with ID: " << best_shower_id<GetTrackIndices()) { - //goes over recob::track index, gn - - //Track is a struct defined in DetectorObjects.h - Track const & t = fdetos->GetTrack(gn);//t is track - - if(t.fis_associated) continue;//this will jump to the end of the loop and goes with next gn; triger this when the track is associated. - - geoalgo::Point_t const * track_end = nullptr; - double zmin = 2000;//the unit .. 2000 cm??? it doesnt matter though; it changes after first if-else - - geoalgo::Point_t const & front = t.ftrajectory.front();//first point along the trajectory. - if(front.at(2) < zmin) {//first point's z coordinate compared to zmin - track_end = &front; - zmin = front.at(2); - } - - geoalgo::Point_t const & back = t.ftrajectory.back(); - if(back.at(2) < zmin) { - track_end = &back; - zmin = back.at(2); - } - - if(track_end) { - - pas.AddAssociation(std::vector(1, gn), - std::vector(1, *track_end), - geoalgo::Sphere(*track_end, 0).Center(), - 0); - - } else{ - std::cout << "Warning: No track end pointer\n"; - } - } - - } - - - void VertexBuilder::AddLoneShowers(ParticleAssociations_all & pas) { - - for(size_t const gn : fdetos->GetShowerIndices()) { - - Shower const & s = fdetos->GetShower(gn); - - if(s.fis_associated) continue; - - geoalgo::Point_t const p = s.fcone.Start(); - - pas.AddAssociation(std::vector(1, gn), - std::vector(1, p), - geoalgo::Sphere(p, 0).Center(), - 0); - - } - - } - - // Fill the TTree with vertex info. - void VertexBuilder::FillVBT(ParticleAssociations_all & pas) { - - fvbt->ftrack_number = fdetos->GetTrackIndices().size(); - fvbt->fshower_number = fdetos->GetShowerIndices().size(); - fvbt->ftree->Fill(); - - } - - - void VertexBuilder::Run(ParticleAssociations_all & pas) {//Analysis the tracks & showers objects. -// int screen_width = 86; - - CheckSetVariables();//Variables are set in SinglePhoton_module.cc. - - fdetos = &pas.GetDetectorObjects();//initialize an empty object; - - //Make two associations, for tracks and showers. - if(fverbose) print_gadget(">>>>> Associate tracks","="); - - AssociateTracks(pas);//Gives candidate vertex from tracks. - - //fvbt is the object, it means.. if the object is not empty, do something. - // if(fvbt) fvbt->fassociation_track_number = pas.GetAssociations().size(); - - - if(fverbose) print_gadget(">>>> Associate showers","="); - - AssociateShowers(pas);//select associated candidates for showers - - //if(fvbt) fvbt->fassociation_shower_number = pas.GetAssociations().size(); - - //CHECK, repeat for long objects? Add them into consideration even if they are not associated to a vertex? - if(fverbose) print_gadget(">>>> Add lone tracks","="); - AddLoneTracks(pas); - - if(fverbose) print_gadget(">>>> Add lone showers","="); - AddLoneShowers(pas); - - if(fverbose) print_gadget(">>>> Get shower associations","="); - pas.GetShowerAssociations();//CHECK - - if(fvbt) fvbt->fassociation_final_number = pas.GetSelectedAssociations().size(); - if(fverbose)cout<<"\n\n # of Vertex found: "<Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); - //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); - //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); - - //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); - std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"< > mcFluxHandle; - e.getByLabel("generator", mcFluxHandle); - if (!mcFluxHandle.isValid()) return; - std::vector< art::Ptr > mcFluxVec; - art::fill_ptr_vector(mcFluxVec, mcFluxHandle); - if (mcFluxVec.size() == 0){ - std::cout << ">> No MCFlux information" << std::endl; - return; - } - - art::Handle< std::vector > mcTruthHandle; - e.getByLabel("generator", mcTruthHandle); - if (!mcTruthHandle.isValid()) return; - std::vector< art::Ptr > mcTruthVec; - art::fill_ptr_vector(mcTruthVec, mcTruthHandle); - if (mcTruthVec.size() == 0){ - std::cout << ">> No MCTruth information" << std::endl; - return; - } - - art::Handle< std::vector< simb::GTruth > > gTruthHandle; - e.getByLabel("generator", gTruthHandle); - if (!gTruthHandle.isValid()) return; - std::vector< art::Ptr > gTruthVec; - art::fill_ptr_vector(gTruthVec, gTruthHandle); - if (gTruthVec.size() == 0){ - std::cout << ">> No GTruth information" << std::endl; - return; - } - - const art::Ptr mcFlux = mcFluxVec.at(0); - const art::Ptr mcTruth = mcTruthVec.at(0); - const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); - const art::Ptr gTruth = gTruthVec.at(0); - - m_run_number_eventweight = e.run(); - m_subrun_number_eventweight = e.subRun(); - m_event_number_eventweight = e.event(); - - // possibly the wrong variables, but let's see for now... - //m_mcflux_evtno = mcFlux->fevtno; - m_mcflux_nu_pos_x = nu.Vx(); - m_mcflux_nu_pos_y = nu.Vy(); - m_mcflux_nu_pos_z = nu.Vz(); - m_mcflux_nu_mom_x = nu.Px(); - m_mcflux_nu_mom_y = nu.Py(); - m_mcflux_nu_mom_z = nu.Pz(); - m_mcflux_nu_mom_E = nu.E(); - m_mcflux_ntype = mcFlux->fntype; - m_mcflux_ptype = mcFlux->fptype; - m_mcflux_nimpwt = mcFlux->fnimpwt; - m_mcflux_dk2gen = mcFlux->fdk2gen; - m_mcflux_nenergyn = mcFlux->fnenergyn; - m_mcflux_tpx = mcFlux->ftpx; - m_mcflux_tpy = mcFlux->ftpy; - m_mcflux_tpz = mcFlux->ftpz; - m_mcflux_tptype = mcFlux->ftptype; - m_mcflux_vx = mcFlux->fvx; - m_mcflux_vy = mcFlux->fvy; - m_mcflux_vz = mcFlux->fvz; - - // loop MCParticle info for m_mctruth object - - m_mctruth_nparticles = mcTruth->NParticles(); - - for (int i = 0; i < m_mctruth_nparticles; i++){ - - const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); - - m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); - m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); - m_mctruth_particles_mother[i] = mcParticle.Mother(); - m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); - m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); - - for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ - - const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); - m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); - - } - - m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); - m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); - m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); - m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); - m_mctruth_particles_px0[i] = mcParticle.Px(0); - m_mctruth_particles_py0[i] = mcParticle.Py(0); - m_mctruth_particles_pz0[i] = mcParticle.Pz(0); - m_mctruth_particles_e0[i] = mcParticle.E(0); - m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); - m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); - m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); - m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); - } - - const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); - - m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); - m_mctruth_neutrino_mode = mcNeutrino.Mode(); - m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); - m_mctruth_neutrino_target = mcNeutrino.Target(); - m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); - m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); - m_mctruth_neutrino_w = mcNeutrino.W(); - m_mctruth_neutrino_x = mcNeutrino.X(); - m_mctruth_neutrino_y = mcNeutrino.Y(); - m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); - - m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; - m_gtruth_tgt_pdg = gTruth->ftgtPDG; - m_gtruth_weight = gTruth->fweight; - m_gtruth_probability = gTruth->fprobability; - m_gtruth_xsec = gTruth->fXsec; - m_gtruth_diff_xsec = gTruth->fDiffXsec; - m_gtruth_gphase_space = gTruth->fGPhaseSpace; - - m_gtruth_vertex_x = gTruth->fVertex.X(); - m_gtruth_vertex_y = gTruth->fVertex.Y(); - m_gtruth_vertex_z = gTruth->fVertex.Z(); - m_gtruth_vertex_T = gTruth->fVertex.T(); - m_gtruth_gscatter = gTruth->fGscatter; - m_gtruth_gint = gTruth->fGint; - m_gtruth_res_num = gTruth->fResNum; - m_gtruth_num_piplus = gTruth->fNumPiPlus; - m_gtruth_num_pi0 = gTruth->fNumPi0; - m_gtruth_num_piminus = gTruth->fNumPiMinus; - m_gtruth_num_proton = gTruth->fNumProton; - m_gtruth_num_neutron = gTruth->fNumNeutron; - m_gtruth_is_charm = gTruth->fIsCharm; - m_gtruth_gx = gTruth->fgX; - m_gtruth_gy = gTruth->fgY; - m_gtruth_gt = gTruth->fgT; - m_gtruth_gw = gTruth->fgW; - m_gtruth_gQ2 = gTruth->fgQ2; - m_gtruth_gq2 = gTruth->fgq2; - m_gtruth_probe_pdg = gTruth->fProbePDG; - m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); - m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); - m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); - m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); - m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); - m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); - m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); - m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); - m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); - m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); - m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); - m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); - - eventweight_tree->Fill(); - std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); - } - - void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ - m_mctruth_num = mcTruthVector.size(); - this->ResizeMCTruths(m_mctruth_num); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< truth = mcTruthVector[i]; - - m_mctruth_origin = truth->Origin(); - m_mctruth_ccnc = truth->GetNeutrino().CCNC(); - m_mctruth_mode = truth->GetNeutrino().Mode(); - m_mctruth_interaction_type = truth->GetNeutrino().InteractionType(); - m_mctruth_qsqr = truth->GetNeutrino().QSqr(); - m_mctruth_nu_pdg = truth->GetNeutrino().Nu().PdgCode(); - m_mctruth_nu_E = truth->GetNeutrino().Nu().E(); - m_mctruth_lepton_pdg = truth->GetNeutrino().Lepton().PdgCode(); - m_mctruth_lepton_E = truth->GetNeutrino().Lepton().E(); - - std::vector corrected(3); - this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); - - m_mctruth_nu_vertex_x = corrected[0]; - m_mctruth_nu_vertex_y = corrected[1]; - m_mctruth_nu_vertex_z = corrected[2]; - - - m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles - this->ResizeMCTruths(m_mctruth_num_daughter_particles); - - - //some temp variables to see if its 1g1p or 1g1n - int tmp_n_photons_from_delta = 0; - int tmp_n_protons_from_delta = 0; - int tmp_n_neutrons_from_delta = 0; - - - m_mctruth_leading_exiting_proton_energy = -9999; - - for(int j=0; j< m_mctruth_num_daughter_particles; j++){ - - const simb::MCParticle par = truth->GetParticle(j); - m_mctruth_daughters_pdg[j] = par.PdgCode(); - m_mctruth_daughters_E[j] = par.E(); - - - - switch(m_mctruth_daughters_pdg[j]){ - case(22): - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_photons++; - m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); - m_mctruth_exiting_photon_energy.push_back(par.E()); - - } - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); - if((par.StatusCode()==1 || par.StatusCode()==14 ) && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_photon_energy = par.E(); - tmp_n_photons_from_delta ++; - m_mctruth_is_delta_radiative++; - } - } - break; - case(111): - { - // Make sure the pi0 actually exits the nucleus - if (par.StatusCode() == 1) { - m_mctruth_exiting_pi0_E.push_back(par.E()); - m_mctruth_exiting_pi0_px.push_back(par.Px()); - m_mctruth_exiting_pi0_py.push_back(par.Py()); - m_mctruth_exiting_pi0_pz.push_back(par.Pz()); - m_mctruth_num_exiting_pi0++; - } - break; - } - case(211): - case(-211): - if (par.StatusCode() == 1) { - m_mctruth_num_exiting_pipm++; - } - break; - case(2212): - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_protons++; - m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); - m_mctruth_exiting_proton_energy.push_back(par.E()); - } - - - if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); - if(par.StatusCode()==14 && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_proton_energy = par.E(); - tmp_n_protons_from_delta ++; - } - - - break; - } - case(2112): - { - - m_mctruth_num_exiting_neutrons++; - if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); - if(par.StatusCode()==14 && is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_neutron_energy = par.E(); - tmp_n_neutrons_from_delta ++; - } - } - - break; - case(-2224): - case(2224): - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } - break; - case(-2214): - case(2214): - case(-1114): - case(1114): - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } - break; - case(-2114): - case(2114): - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_delta0++; - m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ - m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; - } - } - - - - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t This event is "; - if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ - m_mctruth_delta_radiative_1g1p_or_1g1n = 1; - std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ - m_mctruth_num_reconstructable_protons++; - - }//if g above threshold - } - - //if it's a true delta radiative event, check the energies - - - - if (m_mctruth_is_delta_radiative==true){ - for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ - m_mctruth_is_reconstructable_1g0p = true; - - }//if g above threshold - }//for all exiting g - for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ - if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ - //if it's already 1g1p then we've found a 1g2p which we aren't counting - if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ - m_mctruth_is_reconstructable_1g1p = false; - } - //if there's a photon then it's actually a 1g1p - if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ - m_mctruth_is_reconstructable_1g1p = true; - m_mctruth_is_reconstructable_1g0p = false; - } - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); - - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); - - if(m_is_verbose){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; - mymap[mcp->TrackId()] = k; - } - - - //Just some VERY hacky pi^0 photon stuff - int npi0check = 0; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; - - if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; - - - if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ - npi0check++; - const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; - const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; - - if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); - double e2 = dau2->E(); - if(e21) std::cout<<"WARNING WARNING!!!! there are "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); - - } - - - void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec){ - - // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ - - size_t flash_size = flashes.size(); - m_reco_num_flashes = flash_size; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; - - this->ResizeFlashes(flash_size); - - for(size_t i = 0; i < flash_size; ++i) { - - - art::Ptr const & flash = flashes[i]; - - m_reco_flash_total_pe[i]=(flash->TotalPE()); - m_reco_flash_time[i]=(flash->Time()); - m_reco_flash_time_width[i]=flash->TimeWidth(); - m_reco_flash_abs_time[i]=flash->AbsTime(); - m_reco_flash_frame[i]=flash->Frame(); - m_reco_flash_ycenter[i]=flash->YCenter(); - m_reco_flash_ywidth[i]=flash->YWidth(); - m_reco_flash_zcenter[i]=flash->ZCenter(); - m_reco_flash_zwidth[i]=flash->ZWidth(); - - if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ - m_reco_num_flashes_in_beamgate++; - m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); - m_reco_flash_time_in_beamgate[i]=(flash->Time()); - m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); - m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); - } - - - - } - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); - - double _dt_abs = 100000.0; - // double _within_resolution = 0; - double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; - - // Loop over the CRT hits. - for (int j = 0; j < _nCRThits_in_event; j++) - { - /* - if (verbose) - std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; - */ - double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); - - // Fill the vector variables. - m_CRT_hits_time.push_back(_crt_time_temp); - m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); - m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); - m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); - m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); - - if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) - { - _dt_abs = fabs(_beam_flash_time - _crt_time_temp); - m_CRT_dt = _beam_flash_time - _crt_time_temp; - m_CRT_min_hit_time = _crt_time_temp; - // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. - if (_dt_abs < m_Resolution) - { - //_within_resolution = 1; - // Set the position information and the intensity of the CRT hit. - m_CRT_min_hit_PE = crthit_h->at(j).peshit; - m_CRT_min_hit_x = crthit_h->at(j).x_pos; - m_CRT_min_hit_y = crthit_h->at(j).y_pos; - m_CRT_min_hit_z = crthit_h->at(j).z_pos; - - - // if (verbose) - // { - std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; - std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; - std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; - std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; - // } - break; - } - } // End of conditional for closest CRT hit time. - } // End of loop over CRT hits. - } //if there are hits - }//if there is 1 flash in beamgate - - - }//analyze flashes - - - } diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h deleted file mode 100644 index c8efe171d..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Showers.h +++ /dev/null @@ -1,1568 +0,0 @@ -#include "SinglePhoton_module.h" -#include "reco_truth_matching.h" - -//BUG: m_reco_asso_showers limit the size of vectors under analyzeTracks(); -//Solution: m_reco_asso_showers -> showers.size() - -namespace single_photon -{ - void SinglePhoton::ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_startz.clear(); - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - - m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - - } - - void SinglePhoton::ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - - m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); - - - - - - } - - void SinglePhoton::CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); - //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); - } - - void SinglePhoton::AnalyzeShowers( - Atlas& package, - geoalgo::Point_t pvertex, - const std::vector>& showers, - std::map,art::Ptr> & showerToPFParticleMap, - std::map, std::vector>> & pfParticleToHitMap, - std::map, std::vector> > & pfParticleToClusterMap, - std::map, std::vector> > & clusterToHitMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap - ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); - this->ResizeShowers(showers.size()); - - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - - const art::Ptr shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; - art::Ptr shower3d; - if(PFPtoShowerReco3DMap.count(pfp) == 0){ - if(false){//Keng, CHECK, has turn this off. - std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; - const std::vector> clusters = pfParticleToClusterMap[pfp]; - - - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); - - TVector3 shr_start = shower->ShowerStart(); - TVector3 shr_dir = shower->Direction(); - - TVector3 shr3d_start = shower3d->ShowerStart(); - TVector3 shr3d_dir = shower3d->Direction(); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - // - - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); - - //pandroa shower - std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; - std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; - - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; - - //now 3D shower - std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; - std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - - - - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); - - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); - - - m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - - - std::vector t_num(3,0); - std::vector t_numhits(3,0); - std::vector t_area(3,0.0); - - //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - - auto finish = std::chrono::high_resolution_clock::now(); - auto microseconds = std::chrono::duration_cast(finish-start); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); - const std::vector< double > shr3d_dEdx = shower3d->dEdx(); - const int shr3d_bestplane = shower3d->best_plane(); - - std::cout<<"SHOWER3D_ENERGY: best plane: "< zmax) std::swap(zmin, zmax); - - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; - if(ymin > ymax) std::swap(ymin, ymax); - - //Code property of Gray Yarbrough (all rights reserved) - //int optical_flash_in_beamgate_counter=0; - double shortest_dist_to_flash_z=DBL_MAX; - double shortest_dist_to_flash_y=DBL_MAX; - double shortest_dist_to_flash_yz=DBL_MAX; - //-999 my nonsenese int can change - int shortest_dist_to_flash_index_z=-999; - int shortest_dist_to_flash_index_y=-999; - int shortest_dist_to_flash_index_yz=-999; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { - dist_z = zcenter - zmax; - } - else { - dist_z = 0; - } - if(dist_z < shortest_dist_to_flash_z){ - shortest_dist_to_flash_z = dist_z; - shortest_dist_to_flash_index_z=i_flash; - } - - - //y plane - - double dist_y=DBL_MAX; - if(ycenter < ymin) { - dist_y = ymin - ycenter; - } - else if(ycenter > ymax) { - dist_y = ycenter - ymax; - } - else { - dist_y= 0; - } - if(dist_y < shortest_dist_to_flash_y){ - shortest_dist_to_flash_y = dist_y; - shortest_dist_to_flash_index_y=i_flash; - } - - double dist_yz=DBL_MAX; - dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); - if(dist_yzNumDaughters(); - if(m_reco_shower_num_daughters[i_shr]>0){ - //currently just look at 1 daughter - m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - } - - - //------------and finally some slice info----------------- - - m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; - //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; - - //BobbyVertexBuilder - int shower_to_nuslice_dist = 9999; - if(!m_reco_shower_is_nuslice[i_shr]){ - geoalgo::Point_t sh(m_reco_shower_startx[i_shr], - m_reco_shower_starty[i_shr], - m_reco_shower_startz[i_shr]);//start point of shower - shower_to_nuslice_dist = pvertex.Dist(sh); - } - package.showerToDistMap.emplace(shower,shower_to_nuslice_dist); - - //--------- End of BB - - - - //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ - - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; - for(int plane =0; plane < 3; plane++){ - if (m_is_data == false && m_is_overlayed == false){ - gains[plane] = m_gain_mc[plane] ; - } if (m_is_data == true || m_is_overlayed == true){ - gains[plane] = m_gain_data[plane] ; - } - } - - - int i_shr=0; - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - const art::Ptr shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; - std::vector> hitz = pfParticleToHitMap[pfp]; - - if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ - if(m_is_verbose){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; - - if(kalmanTrackToCaloMap.count(kalman)==0){ - if(m_is_verbose){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; - - if(calo.size()!=3){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; - if(plane<0 || plane > 3) continue; - - std::vector t_dEdx; //in XX cm only (4 for now) - std::vector t_res; - - - for(size_t ix=0; ixResidualRange().size(); ++ix){ - - double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; - if(rr <= res_range_lim){ - t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); - //t_dQdx.push_back(*calo[p]->dQdx()[x]); - t_res.push_back(rr); - } - } - /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); - if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); - - switch(plane){ - case 0: - m_reco_shower_kalman_mean_dEdx_plane0[i_shr] = tmean ; - m_reco_shower_kalman_median_dEdx_plane0[i_shr] = tmedian ; - break; - case 1: - m_reco_shower_kalman_mean_dEdx_plane1[i_shr] = tmean; - m_reco_shower_kalman_median_dEdx_plane1[i_shr] = tmedian; - break; - case 2: - m_reco_shower_kalman_mean_dEdx_plane2[i_shr] = tmean; - m_reco_shower_kalman_median_dEdx_plane2[i_shr] = tmedian; - break; - default: - break; - } - - - const std::vector< anab::Point_t > kal_pts = calo[p]->XYZ(); - double circle = 1.0;//in cm - std::vector pts_within; - std::vector pts_x; - - for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); - - double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); - double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); - - //loop over all hits - for(auto &hit: hitz){ - if(plane != hit->View())continue; - double this_w = (double)hit->WireID().Wire; - double this_t = (double)hit->PeakTime(); - double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); - if(dist<=circle) pts_within.back()++; - } - //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ - TCanvas *c = new TCanvas(); - c->cd(); - - TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); - g->SetLineColor(kRed); - g->SetLineWidth(2); - g->Draw("alp"); - g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); - c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); - } - } - - - // some kalman averaging - double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; - double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; - double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; - double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); - double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); - double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); - - double thresh = 0.01; - - if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ - tmp_kal_2 = 0; - wei_2 = 0.0; - } - if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ - tmp_kal_1 = 0; - wei_1 = 0.0; - } - if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ - tmp_kal_0 = 0; - wei_0 = 0.0; - } - double kal_norm = wei_0+wei_1+wei_2; - - if(kal_norm!=0.0){ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); - }else{ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; - } - - - i_shr++; - } - return; - } - - - //----------------------------------------------------------------------------------------------------------------------------------------- - void SinglePhoton::RecoMCShowers(const std::vector>& showers, - std::map, art::Ptr> & showerToPFParticleMap, - std::map, art::Ptr > & showerToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector - ){ - //OBSOLETE OBSOLETE - - - if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; - m_sim_shower_matched[i_shr] = 0; - if(showerToMCParticleMap.count(shower) > 0){ - - - const art::Ptr mcparticle = showerToMCParticleMap[shower]; - const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; - - std::vector corrected(3); - this->spacecharge_correction(mcparticle, corrected); - m_sim_shower_matched[i_shr] = 1; - m_sim_shower_energy[i_shr] = mcparticle->E(); - m_sim_shower_mass[i_shr] = mcparticle->Mass(); - m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); - m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); - m_sim_shower_process[i_shr] = mcparticle->Process(); - m_sim_shower_start_x[i_shr] = corrected[0]; - m_sim_shower_start_y[i_shr] = corrected[1]; - m_sim_shower_start_z[i_shr] =corrected[2]; - - m_sim_shower_origin[i_shr] = mctruth->Origin(); - //so this might be broken still due to mcparticle. must chcek - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_shower_parent_pdg[i_shr] = -999; - }else{ - m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } - - //OK is this photon matched to a delta? - - /* - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ - - nth_mother = crap_map[nth_mother->Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]< &shower) - { - - } - - double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ - double energy = 0.; - - //for each hit in the shower - for (auto &thishitptr : hits){ - //check the plane - int plane= thishitptr->View(); - - //skip invalid planes - if (plane != this_plane ) continue; - - //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - - //add the energy to the plane - energy += E; - }//for each hit - - return energy; - - } - - double SinglePhoton::CalcEShower(const std::vector> &hits){ - double energy[3] = {0., 0., 0.}; - - //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ - double gain; - //choose gain based on whether data/mc and by plane - if (m_is_data == false && m_is_overlayed == false){ - gain = m_gain_mc[plane] ; - //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; - return Q; - } - - double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ - return QtoEConversion(GetQHit(thishitptr, plane)); - - } - - double SinglePhoton::QtoEConversion(double Q){ - //return the energy value converted to MeV (the factor of 1e-6) - double E = Q* m_work_function *1e-6 /m_recombination_factor; - return E; - - } - - - std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ - int n = dqdx.size(); - std::vector dedx(n,0.0); - for (int i = 0; i < n; i++){ - //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane){ - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; - - //get the 3D shower direction - //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented - TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); - - //calculate the pitch for this plane - double pitch = getPitch(shower_dir, plane); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ - //keep only clusters on the plane - if(thiscluster->View() != plane) continue; - - //calculate the cluster direction - std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; - - //get the cluster start and and in CM - //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; - std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; - - //check that the cluster has non-zero length - double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; - - - //int m_matched_signal_total_num_slices; - - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); - */ - } - - //resizes the branches that are filled for every slice int the event - void SinglePhoton::ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size); - m_reco_slice_num_pfps.resize(size); - m_reco_slice_num_showers.resize(size); - m_reco_slice_num_tracks.resize(size); - - } - - /* - //resize the branches that are filled for matched track and shower objects - void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ - m_reco_slice_shower_matched_sliceId.resize(size_shower); - m_reco_slice_track_matched_sliceId.resize( size_track); - m_reco_slice_shower_matched_energy.resize(size_shower); - m_reco_slice_track_matched_energy.resize( size_track); - m_reco_slice_shower_matched_conversion.resize(size_shower); - m_reco_slice_shower_matched_overlay_frac.resize(size_shower); - - } - */ - - - void SinglePhoton::CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); - - - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); - - } - - /* - void SinglePhoton::CreateMatchedSliceBranches(){ - vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); - vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); - vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); - vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); - vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); - vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); - } - */ - - //called once per event to get all the slice info - //fills a map between the neutrino score for the slice and the primary reco PFP - //loops over all PFP's to find the primary and then associate to a slice - void SinglePhoton::AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> &primaryPFPSliceIdVec, - std::map &sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap){ - - - //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index - // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score - std::vector> clearCosmicPFP; - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - - std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event - std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event - //std::vector> primary_pfps; //store the primary PFP for each slice - // sliceIdToPFPMap.clear(); //clear between events - - /* - * Grabbed this info from Giuseppe: - * Here's the structure of these Metadata - * Primary PfParticles are either - * 1) IsClearCosmic = 1 (for unambiguous cosmics) - * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) - * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) - * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: - * 4) TrackScore = 0.671488 - * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata - */ - - - //for all PFP metadata in the event - for (auto pair: pfParticleToMetadataMap){ - std::vector> metadatalist= pair.second; //get the metadata - art::Ptr pfp = pair.first; //get the corresponding PFP - - //will be empty in circumstances outlined above, not every PFP has stored metadata - if (!metadatalist.empty()){ - - //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ - - //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); - - //get the metadata properties - std::map propertiesmap = data->GetPropertiesMap(); - //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; - PFPToTrackScoreMap[pfp] = it.second; - } - - }//for each item in properties map - - //if there is a neutrino score it's the primary PFP, so save the score+slice info - if(temp_score != -1.0){ - primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); - //primaryToSliceIdMap[pfp] = temp_ind; - sliceIdToNuScoreMap[temp_ind] = temp_score; - if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()< 0){ - //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - //for all pfp's in the event - //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; - - //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ - for(auto item: pfParticleMap){ - art::Ptr start_pfp = item.second; - //no longer skipping pfp's that are clear cosmics - //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); - //if(iter != clearCosmicPFP.end()) continue; - - // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; - art::Ptr parent_pfp ; - - //if this is a primary particle, skip next part - if(!this_pfp->IsPrimary()){ - parent_pfp = pfParticleMap[this_pfp->Parent()]; - //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ - // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; - this_pfp = parent_pfp; - }//while not primary, iterate up chain - } else{ - parent_pfp = start_pfp; - } - - //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); - m_reco_slice_nuscore = nuscore_slices; - /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); - // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); - m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice - m_reco_slice_num_showers; //the subset of PFP's that are showers - m_reco_slice_num_tracks; - */ - - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; - //for(auto item: allPFPSliceIdVec){ - //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); - // } - } - - // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ - std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); - //return sliceIdToNumPFPsvec; - - //std::cout<<"starting to look at the PFP's per slice"<Self()<<" in slice "< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); - - /* - int max_pfp = -1; - for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { - int this_pfp = it->first->Self(); - if (this_pfp> max_pfp) { - max_pfp = this_pfp; - } - - } - std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; - - //check if this is a valid PFP - //if (pfp->self() > PFPToSliceIdMap.size()){ - // std::cout<<"ERROR, this pfp is out of bounds " - - // } - - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< pfp = pair.second; - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ - std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap){ - - std::vector matched_reco_slice_shower_overlay_fraction; - std::vector> matched_reco_slice_shower_MCP; - //std::vector matched_reco_slice_track_matched; - std::vector> matched_reco_slice_track_MCP; - - - //first check if in the event there's a match to a given signal - if(signal_def == "ncdelta"){ - //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; - // std::cout<<"found sim photon shower with track ID "< 0){ - //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); - matched_reco_slice_shower_MCP.push_back(mcp); - - //save the overlay fraction and whether it's matched - matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); - //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; - - if (m_sim_track_matched[k] > 0){ - if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ - - matched_reco_slice_track_MCP.push_back(mcp); - - // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); - - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ - //get the recob shower - art::Ptr this_shr; - for(auto pair: showerToMCParticleMap){ - if (pair.second == mcp){ - this_shr = pair.first; - } - } - art::Ptr this_pfp; - if(!this_shr.isNull()){ - this_pfp = showerToPFParticleMap[this_shr]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ - //get the recob track - art::Ptr this_trk; - for(auto pair: trackToMCParticleMap){ - if (pair.second == mcp){ - this_trk = pair.first; - } - } - art::Ptr this_pfp; - if(!this_trk.isNull()){ - this_pfp = trackToNuPFParticleMap[this_trk]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<Branch("reco_template",&m_reco_template); - } - - void SinglePhoton::AnalyzeTemplates(){ - m_reco_num_templates = 1; - this->ResizeTemplates(m_reco_num_templates); - - m_reco_template[0]=99; - - } -} diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h deleted file mode 100644 index 879d90b27..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/analyze_Tracks.h +++ /dev/null @@ -1,1235 +0,0 @@ -#include "SinglePhoton_module.h" -#include "TPrincipal.h" -#include "TVectorD.h" -#include "TruncMean.h" -#include "Atlas.h" -//BUG: m_reco_asso_tracks limit the size of vectors under analyzeTracks(); -//Solution: m_reco_asso_tracks -> tracks.size() - - -namespace single_photon -{ - void SinglePhoton::ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_trackID.clear(); - - // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - - m_reco_track_end_to_nearest_dead_wire_plane0.clear(); - m_reco_track_end_to_nearest_dead_wire_plane1.clear(); - m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_is_nuslice.clear(); - - - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); - } - - void SinglePhoton::ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - - m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); - } - - void SinglePhoton::CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); - - - } - - - - - - - void SinglePhoton::AnalyzeTracks( - Atlas& package, - geoalgo::Point_t pvertex, - const std::vector>& tracks, - std::map, art::Ptr> & trackToNuPFParticleMap, - std::map, std::vector>> & pfParticleToSpacePointsMap, - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int> &PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap){ - - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); -//KENG, Yes! DONT USE m_reco_asso_track, because we are going to fill in more than that! - this->ResizeTracks(tracks.size()); - - //const double adc2eU(5.1e-3); - //const double adc2eV(5.2e-3); - // const double adc2eW(5.4e-3); - - // const double tau(theDetector->ElectronLifetime()); - - - for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) - { - - const art::Ptr track = *iter; - const art::Ptr pfp = trackToNuPFParticleMap[track]; - const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; - - - int m_trkid = track->ID(); - double m_length = track->Length(); - auto m_trk_dir = track->Direction(); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<Start().X(); - m_reco_track_starty[i_trk]= track->Start().Y(); - m_reco_track_startz[i_trk]= track->Start().Z(); - - m_reco_track_length[i_trk] =m_length; - m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); - m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); - m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); - - m_reco_track_endx[i_trk] = track->End().X(); - m_reco_track_endy[i_trk]= track->End().Y(); - m_reco_track_endz[i_trk]= track->End().Z(); - - m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); - m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); - - std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - double max_dist_from_line = -9999999; - - m_reco_track_spacepoint_chi[i_trk] = 0.0; - //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; - principal->AddRow(&tmp_spacepoints[0]); - - double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); - if(dist> max_dist_from_line) max_dist_from_line = dist; - m_reco_track_spacepoint_chi[i_trk] += dist*dist; - } - m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; - - principal->MakePrincipals(); - TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); - - m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); - m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); - m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); - - delete principal; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<Self()<<" is: "<NumDaughters(); - if(m_reco_track_num_daughters[i_trk]>0){ - //currently just look at 1 daughter - m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - } - - - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - } else{ - m_reco_track_trackscore[i_trk] = -999; - } - - //A loop over the trajectory points - size_t const traj_size = track->CountValidPoints(); - m_reco_track_num_trajpoints[i_trk] = (int)traj_size; - - for(unsigned int p = 0; p < traj_size; ++p) { - //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); - //recob::Track::Point_t const & pos = trajp.position; - //recob::Track::Vector_t const & mom = trajp.momentum; - - } - - - i_trk++; - - } - - //Lets sort and order the showers - m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); - m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); - - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, - Atlas &package,//fill in the MCParticleToAncestorMap Here; - std::map, art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector & vfrac - ){ - - if(m_is_verbose){ std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite"<second->PdgCode(); -// if(package.matchedMCParticleVector[i]->Mother()==0){ -// std::cout<<" TrackId: "<TrackId(); -// std::cout<<" Pdg: "<PdgCode(); -// std::cout<<" Mother: "<Mother(); -// std::cout<<" Energy: "<E(); -// std::cout<<" Status: "<StatusCode()<NParticles(); j++){ -// std::cout<<"MCTruth->GetParticle's PdgCode: "<GetParticle(j).PdgCode(); -// std::cout<<" Energy: "<GetParticle(j).E()< track = *iter; - const art::Ptr track = tracks[k]; - m_sim_track_matched[i_trk] = 0; - - if(trackToMCParticleMap.count(track)>0){ - const art::Ptr mcparticle = trackToMCParticleMap[track]; -// std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - const art::Ptr pfp = trackToPFParticleMap[track]; - - std::vector corrected(3); - this->spacecharge_correction(mcparticle, corrected); - - m_sim_track_matched[i_trk] = 1; - m_sim_track_energy[i_trk] = mcparticle->E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = corrected[0]; - m_sim_track_starty[i_trk] = corrected[1]; - m_sim_track_startz[i_trk] = corrected[2]; - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; - - m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; - - // if(mcparticle->TrackId() != 0){ - // } - //std::cout<<"looking for mother with track id "<Mother()<Mother()>=(int)mcParticleVector.size()){ - //if (MCParticleToTrackIdMap[mcparticle->Mother()].isNull()){} - m_sim_track_parent_pdg[i_trk] = -1; - }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - // m_sim_track_parent_pdg[i_trk] = MCParticleToTrackIdMap[mcparticle->Mother()]->PdgCode(); - } - -// //---- Request by BobbyVertexBuilder ----- -// -// art::Ptr temp_mc = mcparticle; -// while(false){//search for ancestor; initial state - 0; other state - 1; https://internal.dunescience.org/doxygen/namespacegenie.html#a05cd2ccc34b3e3a9e88bdd335f990118 -// std::cout<<"Mother ID:"<Mother()<TrackId()<StatusCode()<Mother()]; -//// temp_mc = package.MCParticleToTrackIdMap.find(temp_mc->Mother())->second; -// } -////CHECK std::cout<<"Ancestor PdgCode: "<PdgCode()<NParticles()<GetParticle[0] == temp_mc){ -//// std::cout<<"Match the ancestor to MCTruth!"<GetParticle[0]->PdgCode()<Mother() <> &tracks, std::map,std::vector> > &trackToCaloMap) - { - - if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; - - if(trackToCaloMap[track].size()!=3){ - std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; - const art::Ptr calo_p1 = trackToCaloMap[track][1]; - const art::Ptr calo_p2 = trackToCaloMap[track][2]; - - - size_t calo_length_p0 = calo_p0->dEdx().size(); - size_t calo_length_p1 = calo_p1->dEdx().size(); - size_t calo_length_p2 = calo_p2->dEdx().size(); - - TruncMean tm_p0; - TruncMean tm_p1; - TruncMean tm_p2; - - std::vector trunc_dEdx_p0; - std::vector res_range_good_p0; - std::vector dEdx_good_p0; - - std::vector trunc_dEdx_p1; - std::vector res_range_good_p1; - std::vector dEdx_good_p1; - - std::vector trunc_dEdx_p2; - std::vector res_range_good_p2; - std::vector dEdx_good_p2; - - m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; - m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; - m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; - - m_reco_track_best_calo_plane[i_trk]=-1; - - m_reco_track_good_calo_p0[i_trk] = 0; - m_reco_track_mean_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; - - m_reco_track_good_calo_p1[i_trk] = 0; - m_reco_track_mean_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; - - m_reco_track_good_calo_p2[i_trk] = 0; - m_reco_track_mean_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; - - - - //First off look over ALL points - //--------------------------------- plane 0 ----------- Induction - for (size_t k = 0; k < calo_length_p0; ++k) { - double res_range = calo_p0->ResidualRange()[k]; - double dEdx = calo_p0->dEdx()[k]; - - m_reco_track_mean_dEdx_p0[i_trk] += dEdx; - if(k <= calo_length_p0/2){ - m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ - res_range_good_p0.push_back(res_range); - dEdx_good_p0.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p0.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p0.setRadius(rad); - tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ - double dEdx = trunc_dEdx_p0[k]; - m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; - if(k <= trunc_dEdx_p0.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p1->dEdx()[k]; - - m_reco_track_mean_dEdx_p1[i_trk] += dEdx; - if(k <= calo_length_p1/2){ - m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ - res_range_good_p1.push_back(res_range); - dEdx_good_p1.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p1.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p1.setRadius(rad); - tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ - double dEdx = trunc_dEdx_p1[k]; - m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; - if(k <= trunc_dEdx_p1.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p2->dEdx()[k]; - - m_reco_track_mean_dEdx_p2[i_trk] += dEdx; - if(k <= calo_length_p2/2){ - m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ - res_range_good_p2.push_back(res_range); - dEdx_good_p2.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p2.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p2.setRadius(rad); - tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ - double dEdx = trunc_dEdx_p2[k]; - m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; - if(k <= trunc_dEdx_p2.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ - m_reco_track_best_calo_plane[i_trk] = 0; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; - - - }else if(m_reco_track_good_calo_p1[i_trk]!=0){ - m_reco_track_best_calo_plane[i_trk] = 1; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; - - - - }else{ - m_reco_track_best_calo_plane[i_trk] = -1; - } - - - } - } - - - - void SinglePhoton::CollectPID( std::vector> & tracks, - std::map< art::Ptr, art::Ptr> & trackToPIDMap){ - - for(size_t i_trk=0; i_trk track = tracks[i_trk]; - art::Ptr pid = trackToPIDMap[track]; - if (!pid) { - std::cout << "[analyze_Tracks] bad PID object" << std::endl; - continue; - } - - // For each PID object, create vector of PID scores for each algorithm - // Loop over this and get scores for algorithm of choice - // But first, prepare garbage values, just in case - std::vector AlgScoresVec = pid->ParticleIDAlgScores(); - double pidScore_BL_mu_plane0 = -999; - double pidScore_BL_mu_plane1 = -999; - double pidScore_BL_mu_plane2 = -999; - double pidScore_BL_p_plane0 = -999; - double pidScore_BL_p_plane1 = -999; - double pidScore_BL_p_plane2 = -999; - double pidScore_BL_mip_plane0 = -999; - double pidScore_BL_mip_plane1 = -999; - double pidScore_BL_mip_plane2 = -999; - double pidScore_PIDA_plane0 = -999; - double pidScore_PIDA_plane1 = -999; - double pidScore_PIDA_plane2 = -999; - double pidScore_chi2_mu_plane0 = -999; - double pidScore_chi2_mu_plane1 = -999; - double pidScore_chi2_mu_plane2 = -999; - double pidScore_chi2_p_plane0 = -999; - double pidScore_chi2_p_plane1 = -999; - double pidScore_chi2_p_plane2 = -999; - double pidScore_three_plane_proton = -999; - - //int planeid = 2; - for (size_t i_algscore=0; i_algscore&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; - - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; - - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - - - return sqrt(d2); - - } - - double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9 ){ - - double min_dist = 999999; - - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int channel = bad_channel_list_fixed_mcc9[i].first; - int is_ok = bad_channel_list_fixed_mcc9[i].second; - if(is_ok>1)continue; - - auto wireids = geom->ChannelToWire(channel); - auto result = geom->WireEndPoints(wireids[0]); - - //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - std::vector end = {0.0,result.end().Y(),result.end().Z()}; - std::vector point = {0.0,Ypoint,Zpoint}; - double dist = dist_line_point(start,end,point); - min_dist = std::min(dist,min_dist); - } - - return min_dist; - - } - - - //Typenamed for recob::Track and recob::Shower - template - int badChannelMatching(std::vector& badchannels, - std::vector& objects, - std::map< T, art::Ptr > & objectToPFParticleMap, - std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9){ - - - - - for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; - const std::vector> hits = pfParticleToHitsMap[pfp]; - - int min_dist_from_bad_channel = 99999; - - for(size_t h=0; h hit = hits[h]; - - - //int nch = (int)badchannels.size()/3; - //for(int i=0; i1)continue; - int dist =hit->Channel()-bc; - auto hs = geom->ChannelToWire(bc); - //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); - std::vector end(3); - auto result = geom->WireEndPoints(hs[0]); - - // std::cout<<"KNK: "<,double> p1, const std::pair, double> p2){ - return (p1.second < p2.second); -} - -// override function of sorts for min_element function comparison -bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second > p2.second); -} - -namespace single_photon{ - -void SinglePhoton::ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); - - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); - - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); - - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); -} - -void SinglePhoton::CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); - - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); - - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); - - - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); - - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); - -} - - -/* Arguments to Function IsolationStudy (all are const): - * 1. vector named tracks of art ptr to recob track - * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle - * 3. vector named showers of art ptr to recob showers - * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle - * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit - * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int - * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit -*/ -void SinglePhoton::IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) -{ - - int total_track_hits =0; - int total_shower_hits =0; - int nu_slice_id = -999; - - std::vector< art::Ptr > associated_hits; - std::vector< art::Ptr > unassociated_hits; - std::vector< art::Ptr > unassociated_hits_plane0; - std::vector< art::Ptr > unassociated_hits_plane1; - std::vector< art::Ptr > unassociated_hits_plane2; - - std::vector< std::map >> > v_newClusterToHitsMap(3); - -// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - - int sliceid = pfParticleToSliceIDMap.at(pfp); - - std::vector> slicehits = sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = pfParticleToHitsMap.at(pfp); - - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; - total_track_hits += trackhits.size(); - - if(nu_slice_id != sliceid && nu_slice_id != -999){ - std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - - int sliceid = pfParticleToSliceIDMap.at(pfp); - - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; - total_shower_hits+=showerhits.size(); - - if(nu_slice_id != sliceid && nu_slice_id!=-999){ - std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ - std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); - for(auto &h: slicehits){ - - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - // Creation of canvas and histograms to hold hit distance data - TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); - histcan->Divide(3, 2, 0.005, 0.1); - - TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); - TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); - TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); - std::vector s_hists = {s_hist0, s_hist1, s_hist2}; - - TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); - TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); - TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); - std::vector u_hists = {u_hist0, u_hist1, u_hist2}; - - -std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; -// saving wire and time coordinates - std::vector> pts_trk( tracks.size(), std::vector(3) ); - - art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); - auto trackhits = pfParticleToHitsMap.at(pfpt); - - std::vector t_pts(3); - std::vector> t_vec_t(3); - std::vector> t_vec_c(3); - - for(auto &th: trackhits){ - double wire = (double)th->WireID().Wire; - t_vec_c[(int)th->View()].push_back(wire); - - double time = (double)th->PeakTime(); - t_vec_t[(int)th->View()].push_back(time); - - tick_max = std::max(tick_max, time); - tick_min = std::min(tick_min, time); - chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); - chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); - - } - - t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); - t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); - t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); - pts_trk[0] = t_pts; - -std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; -std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; -std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; - - -std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - // map shower hits to distance to the closest track hit - std::vector, double >> sh_dist(3); - // vector to save hit with largest minimum distance on each plane - std::vector< std::pair, double > > max_min_hit(3); - - art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); - auto showerhits = pfParticleToHitsMap.at(pfp_s); - - std::vector t_pts_s(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - std::vector num_shr_hits(3); - - for(auto &sh: showerhits){ - int plane = (int)sh->View(); - num_shr_hits[plane] += 1; - - double minDist = 999.9; - double dist; - // only do if there are track hits on this plane with which to compare - if (t_vec_c[(int)sh->View()].size() != 0){ - double wire = (double)sh->WireID().Wire; - vec_c[(int)sh->View()].push_back(wire); - double time = (double)sh->PeakTime(); - vec_t[(int)sh->View()].push_back(time); - - for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); - if (dist < minDist) { - minDist = dist; - } - - } // end of track hits for - s_hists[(int)sh->View()]->Fill(minDist); - - // keep track of 10 smallest distances and their corresponding hits - if (sh_dist[plane].size() < 10){ - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } - else{ if (minDist < max_min_hit[plane].second){ - sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } } - - // finds the necessary plot boundaries to fit the shower - tick_max = std::max(tick_max, (double)sh->PeakTime()); - tick_min = std::min(tick_min, (double)sh->PeakTime()); - chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); - chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); - } // end if stmnt t_vec_c - } // end looping shower hits - - // create graphs from newly compiled shower coordinates - t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - // save new graphs for this shower into vector containing all showers - pts_shr[0] = t_pts_s; - - // place data into approriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); - } - else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance - auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); - } - else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); - } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); - } - - /* DRAW SHOWER HISTOGRAM */ - histcan->cd(1); - s_hists[0]->Draw(); - s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(2); - s_hists[1]->Draw(); - s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(3); - s_hists[2]->Draw(); - s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - - -//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower -std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - - // create vector of three layers for unassoc hits - std::vector g_unass(3); - - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - std::vector minDist_tot(3); - std::vector minWire(3); - std::vector minTime(3); - - for(int plane = 0; plane < 3; plane++){ - minDist_tot[plane] = 999; - std::vector vec_t; - std::vector vec_c; - - for(auto &uh: unassociated_hits_all[plane]){ - - if (t_vec_c[plane].size() == 0) break; - - double wire = (double)uh->WireID().Wire; - vec_c.push_back(wire); - double time = (double)uh->PeakTime(); - vec_t.push_back(time); - - double minDist = 999.9; - double dist; - for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); - if (dist < minDist) { minDist = dist; } - } - u_hists[(int)uh->View()]->Fill(minDist); - - if (minDist < minDist_tot[plane]) { - minDist_tot[plane] = minDist; - minWire[plane] = wire; - minTime[plane] = time; - } - - // for reclustering - std::vector pt = {wire, vec_t.back()}; - pts_to_recluster[(int)uh->View()].push_back(pt); - mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - - } // end looping unassociated_hits_all - - g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - } // end looping planes - - // place data into appropriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); - } - else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); - } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); - } - - /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ - histcan->cd(4); - u_hists[0]->Draw(); - u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(5); - u_hists[1]->Draw(); - u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(6); - u_hists[2]->Draw(); - u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - -/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ -/* histcan->Update(); - histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); -*/ - - delete histcan; - - -//PLOTTING NOW -//SET-UP - double plot_point_size = 0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - - } - -// ******************************** DeadWireRegions ******************************************** - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - // std::cout<<"WIRE "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); - l->SetLineColor(kGray+1); - l->Draw("same"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - for(int i=0; i<3; i++){ - can->cd(i+1); - if (g_unass[i]->GetN() > 0){ - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - } - - - - -//******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - -// PLOTTING SHOWER? - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - -// PLOTTING - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - can->Update(); - // can->SaveAs((print_name+".pdf").c_str(),"pdf"); - std::cout<<"*PRINTING"< -//#include - -namespace single_photon -{ - - //recoMCmatching but specifically for recob::showers - std::vector SinglePhoton::showerRecoMCmatching( - std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap){ - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - - //for each recob::track/shower in the event - for(size_t i=0; i pfp = objectToPFParticleMap[object]; - - if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); - if (parentIterator == pfParticleIdMap.end()){ - std::cout<<"error: no parent but not primary"<second->PdgCode(); - std::cout<<"the parent pdg code is "<Daughters(); - //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; - // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); - //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - - /** - * - * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower - * - **/ - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - - bool found_a_match = false; - - //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<View(); - - particle_vec.clear(); match_vec.clear(); //only store per hit - - //for the hit, fill the backtracker info - mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); - // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - - } - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; - std::map, std::vector> marks_mother_energy_fraction_map; - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } - - } - - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - if(match->PdgCode()==22){ - std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; - this->spacecharge_correction(match, corrected_start, tmp ); - m_sim_shower_is_true_shower[i] = 1; - }else if(abs(match->PdgCode())==11){ - this->spacecharge_correction(match, corrected_start); - m_sim_shower_is_true_shower[i] = 1; - }else{ - corrected_start = {-999,-999,-999}; - m_sim_shower_is_true_shower[i] = 0; - } - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - - if (match_mother.isNull()){ - m_sim_shower_parent_pdg[i] = -1; - m_sim_shower_parent_trackID[i] = -1; - - }else{ - m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); - m_sim_shower_parent_trackID[i] = match_mother->TrackId(); - } - - - m_sim_shower_matched[i] = 1; - m_sim_shower_energy[i] = match->E(); - m_sim_shower_mass[i] = match->Mass(); - m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); - m_sim_shower_pdg[i] = match->PdgCode(); - m_sim_shower_trackID[i] = match->TrackId(); - m_sim_shower_process[i] = match->Process(); - m_sim_shower_end_process[i] = match->EndProcess(); - m_sim_shower_vertex_x[i] = corrected_vertex[0]; - m_sim_shower_vertex_y[i] = corrected_vertex[1]; - m_sim_shower_vertex_z[i] =corrected_vertex[2]; - - m_sim_shower_start_x[i] = corrected_start[0]; - m_sim_shower_start_y[i] = corrected_start[1]; - m_sim_shower_start_z[i] =corrected_start[2]; - - m_sim_shower_px[i] = match->Px(); - m_sim_shower_py[i] = match->Py(); - m_sim_shower_pz[i] = match->Pz(); - - m_sim_shower_best_matched_plane[i] = best_mother_index; - m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; - m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; - m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - - m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; - - mcParticleVector.push_back(match); - cout<<"Mapped shower to MC "<ID()<<" to "<TrackId()<Self()<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< - std::vector recoMCmatching(std::vector& objectVector, - std::map>& objectToMCParticleMap, - std::map>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector){ - - std::vector trk_overlay_vec; - std::vector vec_fraction_matched; - bool reco_verbose = false; - //for each recob::track/shower in the event - for(size_t i=0; i pfp = objectToPFParticleMap[object]; - - // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - bool found_a_match = false; - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; - found_a_match = true; - } - }//end loop over particles per hit - } - - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - trk_overlay_vec.push_back(fraction_num_hits_overlay); - if(n_associated_mcparticle_hits == 0){ - //This will only occur if the whole recob::PFParticle is associated with an overlay object - //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" - << " pdg=" << best_matched_mcparticle->PdgCode() - << " trkid=" << best_matched_mcparticle->TrackId() - << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; - } - - }//end vector loop. - //return vec_fraction_matched; - return trk_overlay_vec; - } - - - //Typenamed for simb::MCTrack and sim::MCShower - template - void perfectRecoMatching( - std::vector>& mcParticleVector, - std::vector& mcObjectVector, - std::map,T>& mcParticleToMCObjectMap - ){ - - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); - std::cout<<"KRANK: "< particle = mcParticleVector[ip]; - int particle_trackID = particle->TrackId(); - - std::vector id_matches; - std::vector mother_id_matches; - std::vector ancestor_id_matches; - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - - if(object_trackID == particle_trackID ) id_matches.push_back(io); - if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); - if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); - } - - int num_id_matches=id_matches.size(); - int num_mother_id_matches=mother_id_matches.size(); - int num_ancestor_id_matches=ancestor_id_matches.size(); - - //So im not sure how this works but something like this - if(num_id_matches > 1){ - std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; - }else if(num_ancestor_id_matches == 1){ - //We have a mother match? I guess this is like Neutron->photon->e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; - }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ - std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector, const art::Event &evt){ - - std::map > crap_map; - for(size_t j=0;j< mcParticleVector.size();j++){ - const art::Ptr mcp = mcParticleVector[j]; -//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; -} -art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); -art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); - -std::vector> GenieMCTruth; -std::vector geninfo; - - - -for(size_t i=0; i< mcParticleVector.size();i++){ - - -art::Ptr nth_mother = mcParticleVector[i]; - -//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; - -std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother() != 0){ - -nth_mother = crap_map[nth_mother->Mother()]; -std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ -std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); -std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - - - } - - void SinglePhoton::SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ - - - - int total_track_hits =0; - int total_shower_hits =0; - int nu_slice_id = -999; - - std::vector> associated_hits; - std::vector> unassociated_hits; - std::vector> unassociated_hits_plane0; - std::vector> unassociated_hits_plane1; - std::vector> unassociated_hits_plane2; - - std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane - - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - int sliceid = pfParticleToSliceIDMap.at(pfp); - std::cout<<"CHECK1! in second_shower_search.h"< shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - int sliceid = pfParticleToSliceIDMap.at(pfp); - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto showerhits = pfParticleToHitsMap.at(pfp); - - - - std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ - std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); - for(auto &h: slicehits){ - - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ - - //TFile *f = new TFile("t.root","recreate"); - //f->cd(); - - std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); - can->Divide(4,3,0,0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr pfp = showerToPFParticleMap.at(showers[s]); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: showerhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - //vec_c[(int)h->View()].push_back((double)h->Channel()); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_shr[s] = t_pts; - } - - - std::vector> pts_trk( tracks.size(), std::vector(3) ); - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); - auto trackhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: trackhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_trk[t] = t_pts; - } - //Now the "Unassociated Hits" - - std::vector g_unass(3); - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - for(int i=0; i<3; i++){ - - std::vector vec_t; - std::vector vec_c; - - for(auto &h: unassociated_hits_all[i]){ - - double wire = (double)h->WireID().Wire; - vec_c.push_back(wire); - vec_t.push_back((double)h->PeakTime()); - - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - //for reclustering - std::vector pt = {wire,vec_t.back()}; - pts_to_recluster[(int)h->View()].push_back(pt); - mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; - } - - g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - - - } - //Plotting now - double plot_point_size=0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - - can->cd(i+5); - g_vertex[i]->Draw("ap"); - - can->cd(i+9); - g_vertex[i]->Draw("ap"); - - - } - - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - //std::cout<<"KNK: "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); - l->SetLineColor(kGray+1); - l->Draw("same"); - can->cd(thisp+5); - l->Draw("same"); - can->cd(thisp+9); - l->Draw("same"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - for(int i=0; i<3; i++){ - can->cd(i+1); - - if(g_unass[i]->GetN()>0){ - g_unass[i]->Draw("p same"); - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - can->cd(i+5); - g_vertex[i]->Draw("p same"); - can->cd(i+9); - g_vertex[i]->Draw("p same"); - - double rad_cm = 12.0; - TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); - ell_p->SetLineColor(kRed); - ell_p->SetFillStyle(0); - ell_p->Draw("same"); - - } - - - - - - - //*****************************DBSCAN*********************************** - int min_pts = 10; - double eps = 5.0; - std::vector num_clusters(3,0); - - std::vector> g_clusters(3); - std::vector> cluster_labels(3); - - - std::vector vec_clusters; - - for(int i=0; i<3; i++){ - - std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; - std::vector> hitz; - for(size_t p=0; p< pts_to_recluster[i].size(); p++){ - if(cluster_labels[i][p] == 0) continue;//noise - if(cluster_labels[i][p] == c){ - - pts.push_back(pts_to_recluster[i][p]); - hitz.push_back(mapPointIndexToHit[i].at(p)); - } - - } - vec_clusters.emplace_back(c,i,pts,hitz); - } - } - - - - //Create final maps; - for(size_t i=0; i<3; i++){ - for(size_t p=0; p h = mapPointIndexToHit[i].at(p);// Get the hit - size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise - - //std::cout<> t_hs= {h}; - v_newClusterToHitsMap[i][cluster_label] = t_hs; - }else{ - v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list - } - } - } - - - //for(size_t i=0; i<3; i++){ - // for(int c=0; c cluster_colors(max_n_clusters,0); - std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; - - for(int j=0; j< max_n_clusters; j++){ - int b = (int)rangen->Uniform(0,11); - int mod = (int)rangen->Uniform(-10,+3); - - cluster_colors[j] = base_col[b]+mod; - } - int c_offset = 0; - - //Step next, loop over and make plots again - for(int i=0; i<3; i++){ - std::vector> vec_time(num_clusters[i]+1); - std::vector> vec_wire(num_clusters[i]+1); - std::vector tmp_g_clusters(num_clusters[i]+1); - - if(cluster_labels[i].size() != pts_to_recluster[i].size()){ - std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; - tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); - can->cd(i+5); - if( - tmp_g_clusters[c]->GetN()>0){ - tmp_g_clusters[c]->Draw("p same"); - tmp_g_clusters[c]->SetMarkerColor(tcol); - tmp_g_clusters[c]->SetFillColor(tcol); - tmp_g_clusters[c]->SetMarkerStyle(20); - tmp_g_clusters[c]->SetMarkerSize(plot_point_size); - } - } - g_clusters[i] = tmp_g_clusters; - c_offset += num_clusters[i]; - } - - //******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - //Clusters - - /* if(m_is_data==false){ - for(auto &c: vec_clusters){ - //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); - //c.setSSScore(ssscor); - - int thisid = m_sim_shower_trackID[0]; - - for(auto &h: c.getHits()){ - - - } - } - } - */ - - - can->cd(8); - for(int i=0; i<3; i++){ - TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); - - TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); - - for(int c=0; c< num_clusters[i]+1; c++){ - if(c==0)continue; - - int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); - auto hitz = v_newClusterToHitsMap[i][c]; - auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); - int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - - // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); - - std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; - l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); - - //Here we will only plot those that pass in bottom: - //We are also going to put a hard threshold of 70cm? - // - if(ssscorz.pass && is_in_shower ==-1 ){ - can->cd(i+9); - if(g_clusters[i][c]->GetN()>0){ - TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); - - int Npts = 20; - TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); - - core->Draw("p same"); - tmp->Draw("p same"); - - double fmax = -999; - double fmin = 99999; - for(int b=0; bGetN(); b++){ - double ttx=0; - double tty=0; - core->GetPoint(b,ttx,tty); - fmax = std::max(fmax, ttx); - fmin = std::min(fmin,ttx); - } - - std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); - core->GetFunction("pol1")->SetLineWidth(1); - core->GetFunction("pol1")->SetLineStyle(3); - core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); - con = core->GetFunction("pol1")->GetParameter(0); - slope = core->GetFunction("pol1")->GetParameter(1); - - } - //lets map (wire,tick) to a rudamentary (cm,cm); - //double slope2 = slope*25*0.3; - //double con2 = con*25; - - double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); - - //rudimentary! - for(double k=chan_min[i]; k< chan_max[i];k++){ - double y = slope*k+con; - double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); - impact_parameter = std::min(impact_parameter,dist); - } - - - //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower - //vertex_wire[i] vertex_tick[i] (already calcuated) - //cluster closest point )ssscorz.close_wire and close_tick - //recob::Shower start point, convered to wire tick. - - double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); - double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); - - std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; - std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; - double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); - double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); - double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); - //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); - m_sss_candidate_angle_to_shower.push_back(kinda_angle); - - - if(m_is_data){ - m_sss_candidate_matched.push_back(-1); - m_sss_candidate_pdg.push_back(-1); - m_sss_candidate_parent_pdg.push_back(-1); - m_sss_candidate_trackid.push_back(-1); - m_sss_candidate_overlay_fraction.push_back(-1); - - }else{ - auto ssmatched = this->SecondShowerMatching( hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); - m_sss_candidate_matched.push_back(ssmatched[0]); - m_sss_candidate_pdg.push_back(ssmatched[1]); - m_sss_candidate_parent_pdg.push_back(ssmatched[2]); - m_sss_candidate_trackid.push_back(ssmatched[3]); - m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); - - - } - - - std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; - l_bot2->AddEntry(tmp,sname2.c_str(),"f"); - } - } - - } - - //Some time matching - - //Closest neightor - - for(int l=0; l< m_sss_num_candidates; l++){ - int this_p = m_sss_candidate_plane[l]; - double close = 1e10; - for(int m=0; m< m_sss_num_candidates;m++){ - if(this_p == m_sss_candidate_plane[m]) continue; - - double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); - - close = std::min(dup,close); - - } - - m_sss_candidate_closest_neighbour.push_back(close); - - } - - - - for(int l=0; l< m_sss_num_candidates; l++){ - - std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; - - - double score = sssVetov1->GetMvaValue(thisvars); - m_sss_candidate_veto_score.push_back(score); - - } - - - can->cd(8); - l_bot->SetLineWidth(0); - l_bot->SetLineColor(kWhite); - l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); - l_bot->Draw("same"); - - can->cd(12); - l_bot2->SetLineWidth(0); - l_bot2->SetLineColor(kWhite); - l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); - l_bot2->Draw("same"); - - - - - - - - - } - //********** Some Error Checking ********************// - - /*for(int i=0; i<3; i++){ - - std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); - //can->Write(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); - //f->Close(); - std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ - - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; - - std::vectorall_wire; - std::vectorall_tick; - std::vectorall_dist; - - - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - std::vector sorted_in = sort_indexes(all_dist); - size_t max_e = std::min((size_t)Npts,hitz.size()); - - for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - sss_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; - - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; - - score.pass = true; - - // ************* Some simple metrics relative to study point (usually vertex) *************** - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; - - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; - - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; - - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; - - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; - - score.n_wires = 0; - score.n_ticks = 0; - - score.impact_parameter = -99; - - score.close_tick = -99; - score.close_wire = -99; - - std::map wire_count; - std::map tick_count; - - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - score.mean_wire += h_wire; - score.mean_tick += h_tick; - - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); - - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); - - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); - - //wierd dits - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } - - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); - - - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); - - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - - } - - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; - - score.mean_dist = score.mean_dist/(double)score.n_hits; - - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA - - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; - - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); - - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); - - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } - - - - - delete principal; - - return score; - } - - int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - std::vector> showerhits = pfParticleToHitsMap.at(pfp); - - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - - for(auto &sh: showerhits){ - - if(sh->View() != hit->View()) continue; - - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); - - - double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); - - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } - - } - - } - - if(in_primary_shower){ - return (int)s; - } - } - - - return -1; - } - - - - std::vectorSinglePhoton::SecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ - - - std::vector ans; //matched,pdg,parentpdg,trkid - - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - bool found_a_match = false; - - //loop only over hits associated to this reco PFP - for(size_t i_h=0; i_h < hitz.size(); ++i_h){ - int which_plane = (int)hitz[i_h]->View(); - particle_vec.clear(); match_vec.clear(); //only store per hit - //for the hit, fill the backtracker info - mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); - - //if there is an MCParticle associated to this hit - if(particle_vec.size()>0) n_associated_mcparticle_hits++; - if(particle_vec.size()==0) n_not_associated_hits++; - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - - } - if(found_a_match){ - std::cout<<"!"<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; - std::map, std::vector> marks_mother_energy_fraction_map; - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP - - bool is_old = false; - - for(size_t k=0; k< marks_mother_vector.size(); k++){ - //if its in it before, just run with it - if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ - marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; - is_old = true; - break; - } - } - if(is_old==false){ - marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); - marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; - marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; - } - - - num_bt_mothers++; - } else{ - if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } - - } - - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - int par_pdg = -1; - if (match_mother.isNull()){ - par_pdg = -1; - - }else{ - par_pdg = match_mother->PdgCode(); - } - - ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(),fraction_num_hits_overlay}; - - return ans; - }//end sss matching; - -} diff --git a/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h b/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h deleted file mode 100644 index eb86cd866..000000000 --- a/sbncode/SinglePhotonAnalysis/Atlas_edi/sssVeto_BDT.class.h +++ /dev/null @@ -1,85986 +0,0 @@ -// Class: ReadBDT -// Automatically generated by MethodBase::MakeClass -// - -/* configuration options ===================================================== - -#GEN -*-*-*-*-*-*-*-*-*-*-*- general info -*-*-*-*-*-*-*-*-*-*-*- - -Method : BDT::BDT -TMVA Release : 4.2.1 [262657] -ROOT Release : 6.10/02 [395778] -Creator : mark -Date : Thu Sep 12 13:57:16 2019 -Host : Linux SFT-ubuntu-2 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux -Dir : /home/mark/work/uBooNE/HIVE2.0/hellstroms_hive/hive/build/bin/SSSveto_V3 -Training events: 41200 -Analysis type : [Classification] - - -#OPT -*-*-*-*-*-*-*-*-*-*-*-*- options -*-*-*-*-*-*-*-*-*-*-*-*- - -# Set by User: -V: "False" [Verbose output (short form of "VerbosityLevel" below - overrides the latter one)] -H: "False" [Print method-specific help message] -NTrees: "1250" [Number of trees in the forest] -MaxDepth: "5" [Max depth of the decision tree allowed] -MinNodeSize: "2.5%" [Minimum percentage of training events required in a leaf node (default: Classification: 5%, Regression: 0.2%)] -nCuts: "-1" [Number of grid points in variable range used in finding optimal cut in node splitting] -BoostType: "AdaBoost" [Boosting type for the trees in the forest (note: AdaCost is still experimental)] -UseBaggedBoost: "True" [Use only a random subsample of all events for growing the trees in each boost iteration.] -AdaBoostBeta: "1.000000e-01" [Learning rate for AdaBoost algorithm] -BaggedSampleFraction: "5.000000e-01" [Relative size of bagged event sample to original size of the data sample (used whenever bagging is used (i.e. UseBaggedBoost, Bagging,)] -SeparationType: "giniindex" [Separation criterion for node splitting] -# Default: -VerbosityLevel: "Default" [Verbosity level] -VarTransform: "None" [List of variable transformations performed before training, e.g., "D_Background,P_Signal,G,N_AllClasses" for: "Decorrelation, PCA-transformation, Gaussianisation, Normalisation, each for the given class of events ('AllClasses' denotes all events of all classes, if no class indication is given, 'All' is assumed)"] -CreateMVAPdfs: "False" [Create PDFs for classifier outputs (signal and background)] -IgnoreNegWeightsInTraining: "False" [Events with negative weights are ignored in the training (but are included for testing and performance evaluation)] -AdaBoostR2Loss: "quadratic" [Type of Loss function in AdaBoostR2] -Shrinkage: "1.000000e+00" [Learning rate for GradBoost algorithm] -UseRandomisedTrees: "False" [Determine at each node splitting the cut variable only as the best out of a random subset of variables (like in RandomForests)] -UseNvars: "4" [Size of the subset of variables used with RandomisedTree option] -UsePoissonNvars: "True" [Interpret "UseNvars" not as fixed number but as mean of a Poisson distribution in each split with RandomisedTree option] -UseYesNoLeaf: "False" [Use Sig or Bkg categories, or the purity=S/(S+B) as classification of the leaf node -> Real-AdaBoost] -NegWeightTreatment: "inverseboostnegweights" [How to treat events with negative weights in the BDT training (particular the boosting) : IgnoreInTraining; Boost With inverse boostweight; Pair events with negative and positive weights in training sample and *annihilate* them (experimental!)] -Css: "1.000000e+00" [AdaCost: cost of true signal selected signal] -Cts_sb: "1.000000e+00" [AdaCost: cost of true signal selected bkg] -Ctb_ss: "1.000000e+00" [AdaCost: cost of true bkg selected signal] -Cbb: "1.000000e+00" [AdaCost: cost of true bkg selected bkg ] -NodePurityLimit: "5.000000e-01" [In boosting/pruning, nodes with purity > NodePurityLimit are signal; background otherwise.] -RegressionLossFunctionBDTG: "huber" [Loss function for BDTG regression.] -HuberQuantile: "7.000000e-01" [In the Huber loss function this is the quantile that separates the core from the tails in the residuals distribution.] -DoBoostMonitor: "False" [Create control plot with ROC integral vs tree number] -UseFisherCuts: "False" [Use multivariate splits using the Fisher criterion] -MinLinCorrForFisher: "8.000000e-01" [The minimum linear correlation between two variables demanded for use in Fisher criterion in node splitting] -UseExclusiveVars: "False" [Variables already used in fisher criterion are not anymore analysed individually for node splitting] -DoPreselection: "False" [and and apply automatic pre-selection for 100% efficient signal (bkg) cuts prior to training] -SigToBkgFraction: "1.000000e+00" [Sig to Bkg ratio used in Training (similar to NodePurityLimit, which cannot be used in real adaboost] -PruneMethod: "nopruning" [Note: for BDTs use small trees (e.g.MaxDepth=3) and NoPruning: Pruning: Method used for pruning (removal) of statistically insignificant branches ] -PruneStrength: "0.000000e+00" [Pruning strength] -PruningValFraction: "5.000000e-01" [Fraction of events to use for optimizing automatic pruning.] -SkipNormalization: "False" [Skip normalization at initialization, to keep expectation value of BDT output according to the fraction of events] -nEventsMin: "0" [deprecated: Use MinNodeSize (in % of training events) instead] -UseBaggedGrad: "False" [deprecated: Use *UseBaggedBoost* instead: Use only a random subsample of all events for growing the trees in each iteration.] -GradBaggingFraction: "5.000000e-01" [deprecated: Use *BaggedSampleFraction* instead: Defines the fraction of events to be used in each iteration, e.g. when UseBaggedGrad=kTRUE. ] -UseNTrainEvents: "0" [deprecated: Use *BaggedSampleFraction* instead: Number of randomly picked training events used in randomised (and bagged) trees] -new BDTNodeodesMax: "0" [deprecated: Use MaxDepth instead to limit the tree size] -## - - -#VAR -*-*-*-*-*-*-*-*-*-*-*-* variables *-*-*-*-*-*-*-*-*-*-*-*- - -NVar 17 -sss_candidate_num_hits sss_candidate_num_hits sss_candidate_num_hits sss_candidate_num_hits 'F' [6,2308] -sss_candidate_num_wires sss_candidate_num_wires sss_candidate_num_wires sss_candidate_num_wires 'F' [3,892] -sss_candidate_num_ticks sss_candidate_num_ticks sss_candidate_num_ticks sss_candidate_num_ticks 'F' [4,912] -sss_candidate_PCA sss_candidate_PCA sss_candidate_PCA sss_candidate_PCA 'F' [0.503382563591,0.999899983406] -log10(sss_candidate_impact_parameter) log10_sss_candidate_impact_parameter_ log10(sss_candidate_impact_parameter) log10(sss_candidate_impact_parameter) 'F' [-4.8894276619,2.93567156792] -log10(sss_candidate_min_dist) log10_sss_candidate_min_dist_ log10(sss_candidate_min_dist) log10(sss_candidate_min_dist) 'F' [-2.06597232819,3.01287841797] -sss_candidate_impact_parameter/sss_candidate_min_dist sss_candidate_impact_parameter_D_sss_candidate_min_dist sss_candidate_impact_parameter/sss_candidate_min_dist sss_candidate_impact_parameter/sss_candidate_min_dist 'F' [4.03130507038e-05,73.829750061] -sss_candidate_energy*0.001 sss_candidate_energy_T_0.001 sss_candidate_energy*0.001 sss_candidate_energy*0.001 'F' [0.0018127351068,8.83777236938] -cos(sss_candidate_angle_to_shower) cos_sss_candidate_angle_to_shower_ cos(sss_candidate_angle_to_shower) cos(sss_candidate_angle_to_shower) 'F' [-1,1] -sss_candidate_fit_slope sss_candidate_fit_slope sss_candidate_fit_slope sss_candidate_fit_slope 'F' [-191.521224976,274.796813965] -sss_candidate_fit_constant sss_candidate_fit_constant sss_candidate_fit_constant sss_candidate_fit_constant 'F' [-354820.3125,249320.1875] -sss_candidate_plane sss_candidate_plane sss_candidate_plane sss_candidate_plane 'F' [0,2] -sss_reco_shower_energy*0.001 sss_reco_shower_energy_T_0.001 sss_reco_shower_energy*0.001 sss_reco_shower_energy*0.001 'F' [0.00124094926286,3.19415283203] -2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 2_T_0.001_T_0.001_T_sss_reco_shower_energy_T_sss_candidate_energy_T__1_M_cos_sss_candidate_angle_to_shower__ 2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)) 'F' [1.30417530074e-12,7.39190769196] -log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) log10_2_T_0.001_T_0.001_T_sss_reco_shower_energy_T_sss_candidate_energy_T__1_M_cos_sss_candidate_angle_to_shower___ log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))) 'F' [-11.8846635818,0.868756532669] -sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) sss_candidate_energy_T_0.001_D__sss_reco_shower_energy_T_0.001_ sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001) 'F' [0.00421480834484,273.713531494] -sss_candidate_closest_neighbour sss_candidate_closest_neighbour sss_candidate_closest_neighbour sss_candidate_closest_neighbour 'F' [0.00144542346243,10000000000] -NSpec 0 - - -============================================================================ */ - -#include -#include -#include -#include - -//#define new BDTNode new BDTNode - -#ifndef BDTNode__def -#define BDTNode__def - -class BDTNode { - -public: - - // constructor of an essentially "empty" node floating in space - BDTNode ( BDTNode* left,BDTNode* right, - int selector, double cutValue, bool cutType, - int nodeType, double purity, double response ) : - fLeft ( left ), - fRight ( right ), - fSelector ( selector ), - fCutValue ( cutValue ), - fCutType ( cutType ), - fNodeType ( nodeType ), - fPurity ( purity ), - fResponse ( response ){ - } - - virtual ~BDTNode(); - - // test event if it descends the tree at this node to the right - virtual bool GoesRight( const std::vector& inputValues ) const; - BDTNode* GetRight( void ) {return fRight; }; - - // test event if it descends the tree at this node to the left - virtual bool GoesLeft ( const std::vector& inputValues ) const; - BDTNode* GetLeft( void ) { return fLeft; }; - - // return S/(S+B) (purity) at this node (from training) - - double GetPurity( void ) const { return fPurity; } - // return the node type - int GetNodeType( void ) const { return fNodeType; } - double GetResponse(void) const {return fResponse;} - -private: - - BDTNode* fLeft; // pointer to the left daughter node - BDTNode* fRight; // pointer to the right daughter node - int fSelector; // index of variable used in node selection (decision tree) - double fCutValue; // cut value applied on this node to discriminate bkg against sig - bool fCutType; // true: if event variable > cutValue ==> signal , false otherwise - int fNodeType; // Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal - double fPurity; // Purity of node from training - double fResponse; // Regression response value of node -}; - -//_______________________________________________________________________ - BDTNode::~BDTNode() -{ - if (fLeft != NULL) delete fLeft; - if (fRight != NULL) delete fRight; -} - -//_______________________________________________________________________ -bool BDTNode::GoesRight( const std::vector& inputValues ) const -{ - // test event if it descends the tree at this node to the right - bool result; - result = (inputValues[fSelector] > fCutValue ); - if (fCutType == true) return result; //the cuts are selecting Signal ; - else return !result; -} - -//_______________________________________________________________________ -bool BDTNode::GoesLeft( const std::vector& inputValues ) const -{ - // test event if it descends the tree at this node to the left - if (!this->GoesRight(inputValues)) return true; - else return false; -} - -#endif - -#ifndef IClassifierReader__def -#define IClassifierReader__def - -class IClassifierReader { - - public: - - // constructor - IClassifierReader() : fStatusIsClean( true ) {} - virtual ~IClassifierReader() {} - - // return classifier response - virtual double GetMvaValue( const std::vector& inputValues ) const = 0; - - // returns classifier status - bool IsStatusClean() const { return fStatusIsClean; } - - protected: - - bool fStatusIsClean; -}; - -#endif - -class ReadBDT : public IClassifierReader { - - public: - - // constructor - ReadBDT( std::vector& theInputVars ) - : IClassifierReader(), - fClassName( "ReadBDT" ), - fNvars( 17 ), - fIsNormalised( false ) - { - // the training input variables - const char* inputVars[] = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; - - // sanity checks - if (theInputVars.size() <= 0) { - std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; - fStatusIsClean = false; - } - - if (theInputVars.size() != fNvars) { - std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " - << theInputVars.size() << " != " << fNvars << std::endl; - fStatusIsClean = false; - } - - // validate input variables - for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { - if (theInputVars[ivar] != inputVars[ivar]) { - std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl - << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; - fStatusIsClean = false; - } - } - - // initialize min and max vectors (for normalisation) - fVmin[0] = 0; - fVmax[0] = 0; - fVmin[1] = 0; - fVmax[1] = 0; - fVmin[2] = 0; - fVmax[2] = 0; - fVmin[3] = 0; - fVmax[3] = 0; - fVmin[4] = 0; - fVmax[4] = 0; - fVmin[5] = 0; - fVmax[5] = 0; - fVmin[6] = 0; - fVmax[6] = 0; - fVmin[7] = 0; - fVmax[7] = 0; - fVmin[8] = 0; - fVmax[8] = 0; - fVmin[9] = 0; - fVmax[9] = 0; - fVmin[10] = 0; - fVmax[10] = 0; - fVmin[11] = 0; - fVmax[11] = 0; - fVmin[12] = 0; - fVmax[12] = 0; - fVmin[13] = 0; - fVmax[13] = 0; - fVmin[14] = 0; - fVmax[14] = 0; - fVmin[15] = 0; - fVmax[15] = 0; - fVmin[16] = 0; - fVmax[16] = 0; - - // initialize input variable types - fType[0] = 'F'; - fType[1] = 'F'; - fType[2] = 'F'; - fType[3] = 'F'; - fType[4] = 'F'; - fType[5] = 'F'; - fType[6] = 'F'; - fType[7] = 'F'; - fType[8] = 'F'; - fType[9] = 'F'; - fType[10] = 'F'; - fType[11] = 'F'; - fType[12] = 'F'; - fType[13] = 'F'; - fType[14] = 'F'; - fType[15] = 'F'; - fType[16] = 'F'; - - // initialize constants - Initialize(); - - } - - // destructor - virtual ~ReadBDT() { - Clear(); // method-specific - } - - // the classifier response - // "inputValues" is a vector of input values in the same order as the - // variables given to the constructor - double GetMvaValue( const std::vector& inputValues ) const; - - private: - - // method-specific destructor - void Clear(); - - // common member variables - const char* fClassName; - - const size_t fNvars; - size_t GetNvar() const { return fNvars; } - char GetType( int ivar ) const { return fType[ivar]; } - - // normalisation of input variables - const bool fIsNormalised; - bool IsNormalised() const { return fIsNormalised; } - double fVmin[17]; - double fVmax[17]; - double NormVariable( double x, double xmin, double xmax ) const { - // normalise to output range: [-1, 1] - return 2*(x - xmin)/(xmax - xmin) - 1.0; - } - - // type of input variable: 'F' or 'I' - char fType[17]; - - // initialize internal variables - void Initialize(); - double GetMvaValue__( const std::vector& inputValues ) const; - - // private members (method specific) - std::vector fForest; // i.e. root nodes of decision trees - std::vector fBoostWeights; // the weights applied in the individual boosts -}; - -double ReadBDT::GetMvaValue__( const std::vector& inputValues ) const -{ - double myMVA = 0; - double norm = 0; - for (unsigned int itree=0; itreeGetNodeType() == 0) { //intermediate node - if (current->GoesRight(inputValues)) current=(BDTNode*)current->GetRight(); - else current=(BDTNode*)current->GetLeft(); - } - myMVA += fBoostWeights[itree] * current->GetPurity(); - norm += fBoostWeights[itree]; - } - return myMVA /= norm; -} - -void ReadBDT::Initialize() -{ - // itree = 0 - fBoostWeights.push_back(0.0745915405423782); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.837229,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571407,-99) , -13, 0.0282819, 1, 0, 0.811165,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709201,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502298,-99) , -15, 0.0578796, 0, 0, 0.662456,-99) , -2, 13.5, 0, 0, 0.766499,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299986,-99) , -14, -4.60358, 0, 0, 0.397266,-99) , -14, -3.80449, 0, 0, 0.726273,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441219,-99) , -12, 0.1387, 1, 0, 0.624975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401465,-99) , -8, 0.890219, 1, 0, 0.55675,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268104,-99) , -13, 0.00824681, 1, 0, 0.484653,-99) , -4, 1.29379, 1, 0, 0.665711,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585241,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174435,-99) , -4, 1.82271, 1, 0, 0.33328,-99) , -11, 1.5, 0, 0, 0.416579,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18022,-99) , -1, 14.5, 0, 0, 0.263886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0181621,-99) , -8, 0.948152, 0, 0, 0.155793,-99) , -5, 2.0905, 1, 0, 0.286943,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241036,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.061845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00376438,-99) , -12, 0.378727, 0, 0, 0.0114352,-99) , -5, 1.90765, 1, 0, 0.0271837,-99) , -4, 1.27318, 1, 0, 0.0585892,-99) , -13, 0.00242414, 1, 0, 0.184513,-99) , -5, 1.82475, 1, 0, 0.501173,-99) ); - // itree = 1 - fBoostWeights.push_back(0.0713472); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.851856,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687096,-99) , -2, 13.5, 0, 0, 0.797321,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596442,-99) , -13, 0.0201532, 1, 0, 0.773438,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280718,-99) , -14, -4.94994, 0, 0, 0.436523,-99) , -14, -3.5853, 0, 0, 0.728737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478465,-99) , -13, 0.000481802, 0, 0, 0.611506,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298394,-99) , -4, 1.53591, 1, 0, 0.409185,-99) , -12, 0.115253, 1, 0, 0.507757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116557,-99) , -7, 0.0823002, 1, 0, 0.466916,-99) , -4, 1.29893, 1, 0, 0.667002,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321125,-99) , -5, 2.05835, 1, 0, 0.511876,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201881,-99) , -5, 2.03693, 1, 0, 0.339743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.106433,-99) , -13, 0.00231824, 1, 0, 0.250461,-99) , -11, 1.5, 0, 0, 0.33921,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157193,-99) , -5, 2.12039, 1, 0, 0.243289,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0790497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00473175,-99) , -14, -2.81152, 1, 0, 0.0180981,-99) , -5, 1.98494, 1, 0, 0.0402129,-99) , -13, 0.000553379, 1, 0, 0.102724,-99) , -4, 1.71348, 1, 0, 0.205392,-99) , -5, 1.82092, 1, 0, 0.507087,-99) ); - // itree = 2 - fBoostWeights.push_back(0.067578); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.824922,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693121,-99) , -2, 15.5, 0, 0, 0.768018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483362,-99) , -13, 0.0299384, 1, 0, 0.749555,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463583,-99) , -15, 0.10666, 0, 0, 0.573696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224143,-99) , -7, 0.0384498, 1, 0, 0.48444,-99) , -4, 1.38442, 1, 0, 0.708277,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361939,-99) , -16, 400.196, 1, 0, 0.415123,-99) , -14, -3.70907, 0, 0, 0.67116,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320774,-99) , -13, 0.00331019, 1, 0, 0.476906,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220387,-99) , -16, 551.656, 1, 0, 0.341649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0990692,-99) , -8, 0.658517, 0, 0, 0.239985,-99) , -5, 1.93022, 1, 0, 0.347878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158797,-99) , -9, -2.40205, 1, 0, 0.235914,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.139761,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0860764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0103796,-99) , -13, 0.00122891, 1, 0, 0.02054,-99) , -5, 1.9432, 1, 0, 0.0467044,-99) , -13, 0.000550244, 1, 0, 0.104982,-99) , -4, 1.69358, 1, 0, 0.210152,-99) , -5, 1.76647, 1, 0, 0.49681,-99) ); - // itree = 3 - fBoostWeights.push_back(0.0674446); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.828288,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66095,-99) , -2, 12.5, 0, 0, 0.776465,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450492,-99) , -5, 1.18758, 1, 0, 0.580105,-99) , -13, 0.0180652, 1, 0, 0.75044,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530627,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3585,-99) , -14, -4.45948, 0, 0, 0.456466,-99) , -14, -3.53395, 0, 0, 0.707984,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359497,-99) , -12, 0.123655, 1, 0, 0.480836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131854,-99) , -13, 0.0095218, 1, 0, 0.405438,-99) , -4, 1.46491, 1, 0, 0.671503,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328817,-99) , -5, 2.05178, 1, 0, 0.479459,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180339,-99) , -13, 0.00225473, 1, 0, 0.324556,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277746,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0963173,-99) , -8, 0.962653, 0, 0, 0.145575,-99) , -5, 1.9401, 1, 0, 0.22329,-99) , -11, 1.5, 0, 0, 0.307574,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25113,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0883093,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0337582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00270881,-99) , -6, 0.99905, 0, 0, 0.00752363,-99) , -14, -2.84499, 1, 0, 0.0241964,-99) , -13, 0.000316055, 1, 0, 0.0805211,-99) , -4, 1.8492, 1, 0, 0.212074,-99) , -5, 1.7859, 1, 0, 0.50878,-99) ); - // itree = 4 - fBoostWeights.push_back(0.0636568); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.852124,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651265,-99) , -14, -1.74306, 1, 0, 0.815329,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.779711,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615999,-99) , -16, 398.028, 1, 0, 0.676192,-99) , -2, 14.5, 0, 0, 0.769031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419445,-99) , -14, -3.71069, 0, 0, 0.728749,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.729654,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501966,-99) , -4, 1.49487, 1, 0, 0.665886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380839,-99) , -13, 0.000155363, 0, 0, 0.612737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370971,-99) , -3, 0.981811, 0, 0, 0.472376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242888,-99) , -7, 0.0314999, 1, 0, 0.4137,-99) , -12, 0.125645, 1, 0, 0.515502,-99) , -4, 1.1334, 1, 0, 0.652245,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38374,-99) , -16, 1102.23, 1, 0, 0.47084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264148,-99) , -1, 9.5, 0, 0, 0.420295,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0234134,-99) , -8, 0.959782, 0, 0, 0.200887,-99) , -5, 2.1528, 1, 0, 0.337063,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363013,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16961,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0187052,-99) , -12, 0.383918, 0, 0, 0.0320706,-99) , -5, 1.90289, 1, 0, 0.0518664,-99) , -4, 1.26191, 1, 0, 0.100175,-99) , -14, -2.81407, 1, 0, 0.218577,-99) , -5, 1.8186, 1, 0, 0.50541,-99) ); - // itree = 5 - fBoostWeights.push_back(0.0621644); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.778573,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571498,-99) , -15, 0.0581551, 0, 0, 0.75677,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574686,-99) , -13, 0.0232915, 1, 0, 0.737961,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412408,-99) , -12, 0.128901, 1, 0, 0.537537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255065,-99) , -13, 0.00955582, 1, 0, 0.458592,-99) , -4, 1.38781, 1, 0, 0.696037,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553407,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361084,-99) , -16, 986.032, 1, 0, 0.457315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235102,-99) , -14, -5.16738, 0, 0, 0.404703,-99) , -13, 0.000192309, 0, 0, 0.659668,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558592,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200432,-99) , -4, 1.43467, 1, 0, 0.354368,-99) , -12, 0.113902, 1, 0, 0.446302,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0721936,-99) , -8, 0.745382, 0, 0, 0.224211,-99) , -5, 2.00618, 1, 0, 0.353468,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151678,-99) , -5, 2.0314, 1, 0, 0.23991,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0744784,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0644854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00287411,-99) , -14, -2.68917, 1, 0, 0.0129103,-99) , -5, 1.98335, 1, 0, 0.0296566,-99) , -13, 0.000995655, 1, 0, 0.108384,-99) , -4, 1.73888, 1, 0, 0.229423,-99) , -5, 1.76048, 1, 0, 0.499793,-99) ); - // itree = 6 - fBoostWeights.push_back(0.0604747); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.84046,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703776,-99) , -2, 16.5, 0, 0, 0.778568,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59865,-99) , -13, 0.0191261, 1, 0, 0.753168,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.694663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451199,-99) , -15, 0.0925199, 0, 0, 0.633182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35333,-99) , -13, 0.0103947, 1, 0, 0.564905,-99) , -4, 1.19158, 1, 0, 0.701264,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334506,-99) , -3, 0.988495, 1, 0, 0.412785,-99) , -13, 0.000288414, 0, 0, 0.662161,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607463,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503703,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348775,-99) , -6, 0.472545, 1, 0, 0.426806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131929,-99) , -13, 0.00314569, 1, 0, 0.309282,-99) , -11, 1.5, 0, 0, 0.404533,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432173,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131003,-99) , -8, 0.994663, 0, 0, 0.187449,-99) , -16, 418.361, 1, 0, 0.289547,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181015,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0133387,-99) , -12, 0.0685713, 1, 0, 0.0316011,-99) , -4, 1.543, 1, 0, 0.0649864,-99) , -14, -3.05058, 1, 0, 0.162276,-99) , -5, 1.93572, 1, 0, 0.246632,-99) , -5, 1.73723, 1, 0, 0.501725,-99) ); - // itree = 7 - fBoostWeights.push_back(0.0547821); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.793674,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658519,-99) , -2, 16.5, 0, 0, 0.726672,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502065,-99) , -13, 0.0236086, 1, 0, 0.704462,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476607,-99) , -7, 0.0164727, 0, 0, 0.561278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173045,-99) , -13, 0.00853202, 1, 0, 0.451968,-99) , -4, 1.46048, 1, 0, 0.665094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522888,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352031,-99) , -6, 0.601232, 1, 0, 0.457499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288275,-99) , -14, -4.61612, 0, 0, 0.391534,-99) , -14, -3.64191, 0, 0, 0.626992,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587168,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234513,-99) , -12, 0.121676, 1, 0, 0.338832,-99) , -16, 237.638, 1, 0, 0.42616,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414394,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0513555,-99) , -11, 1.5, 0, 0, 0.113808,-99) , -14, -4.18717, 1, 0, 0.225951,-99) , -5, 2.05278, 1, 0, 0.316745,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313153,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0972913,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0164453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -6, 0.529822, 1, 0, 0.00272663,-99) , -4, 1.822, 1, 0, 0.0255536,-99) , -4, 1.5669, 1, 0, 0.105923,-99) , -13, 0.00244616, 1, 0, 0.227635,-99) , -5, 1.82985, 1, 0, 0.496005,-99) ); - // itree = 8 - fBoostWeights.push_back(0.0562181); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.778165,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607209,-99) , -15, 0.0584507, 0, 0, 0.762267,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567886,-99) , -8, -0.944135, 0, 0, 0.742087,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31076,-99) , -15, 0.293412, 1, 0, 0.405064,-99) , -14, -3.71083, 0, 0, 0.70336,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671562,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325655,-99) , -4, 1.65522, 1, 0, 0.484541,-99) , -11, 1.5, 0, 0, 0.543223,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232486,-99) , -13, 0.0169047, 1, 0, 0.505512,-99) , -4, 1.18572, 1, 0, 0.636691,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565107,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250914,-99) , -12, 0.117967, 1, 0, 0.329933,-99) , -11, 1.5, 0, 0, 0.410174,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0385829,-99) , -14, -3.8121, 1, 0, 0.178995,-99) , -5, 2.1176, 1, 0, 0.301759,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258114,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135112,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0700079,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00330301,-99) , -12, 0.095052, 1, 0, 0.013454,-99) , -6, 0.172507, 1, 0, 0.0356399,-99) , -5, 1.94277, 1, 0, 0.0744067,-99) , -14, -2.60356, 1, 0, 0.206534,-99) , -5, 1.86022, 1, 0, 0.507786,-99) ); - // itree = 9 - fBoostWeights.push_back(0.0542605); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.779102,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614233,-99) , -2, 12.5, 0, 0, 0.722991,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414777,-99) , -5, 1.24996, 1, 0, 0.527603,-99) , -13, 0.019193, 1, 0, 0.697948,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376442,-99) , -16, 1508.51, 1, 0, 0.517422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0920599,-99) , -7, 0.0561678, 1, 0, 0.437998,-99) , -4, 1.46046, 1, 0, 0.65974,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403187,-99) , -15, 0.494658, 1, 0, 0.486479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309182,-99) , -1, 13.5, 0, 0, 0.402644,-99) , -14, -3.60321, 0, 0, 0.62199,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552294,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366221,-99) , -3, 0.985945, 1, 0, 0.485754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207133,-99) , -5, 2.06642, 1, 0, 0.38439,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248754,-99) , -12, 0.143087, 1, 0, 0.321527,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175257,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0739211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0135194,-99) , -13, 0.00122442, 1, 0, 0.0271739,-99) , -5, 1.96447, 1, 0, 0.0609055,-99) , -8, 0.94643, 0, 0, 0.139977,-99) , -4, 1.56742, 1, 0, 0.223583,-99) , -5, 1.82091, 1, 0, 0.493012,-99) ); - // itree = 10 - fBoostWeights.push_back(0.0525683); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.792819,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635658,-99) , -2, 14.5, 0, 0, 0.728898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426242,-99) , -13, 0.0235413, 1, 0, 0.699852,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258228,-99) , -12, 0.0799388, 0, 0, 0.394791,-99) , -14, -4.12026, 0, 0, 0.449544,-99) , -13, 0.000293654, 0, 0, 0.659725,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627147,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342539,-99) , -12, 0.11317, 1, 0, 0.417776,-99) , -16, 237.803, 1, 0, 0.483031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12123,-99) , -7, 0.0856495, 1, 0, 0.444065,-99) , -4, 1.40072, 1, 0, 0.61657,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224654,-99) , -4, 1.47048, 1, 0, 0.298736,-99) , -11, 1.5, 0, 0, 0.388443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151815,-99) , -5, 2.24529, 1, 0, 0.320341,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238071,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124648,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0198965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -16, 91.4346, 1, 0, 0.00336316,-99) , -10, 261.135, 1, 0, 0.0390878,-99) , -4, 1.57971, 1, 0, 0.0964805,-99) , -14, -2.81166, 1, 0, 0.212077,-99) , -5, 1.86241, 1, 0, 0.498266,-99) ); - // itree = 11 - fBoostWeights.push_back(0.0517742); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.789717,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644527,-99) , -2, 14.5, 0, 0, 0.730376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554645,-99) , -13, 0.0202634, 1, 0, 0.708369,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480265,-99) , -12, 0.129271, 1, 0, 0.563728,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231251,-99) , -13, 0.00957266, 1, 0, 0.484722,-99) , -4, 1.38474, 1, 0, 0.672139,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317061,-99) , -14, -4.3455, 0, 0, 0.390797,-99) , -14, -3.71348, 0, 0, 0.637455,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364601,-99) , -14, -4.13486, 0, 0, 0.510785,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227173,-99) , -14, -4.0632, 1, 0, 0.319456,-99) , -5, 1.99708, 1, 0, 0.438406,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354411,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0763085,-99) , -5, 1.90155, 1, 0, 0.206248,-99) , -13, 0.00316451, 1, 0, 0.362943,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168655,-99) , -9, -2.95016, 1, 0, 0.252709,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0830362,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0237083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -10, 9749.94, 0, 0, 0.00417004,-99) , -11, 1.5, 0, 0, 0.0238709,-99) , -13, 0.0010789, 1, 0, 0.115925,-99) , -4, 1.81507, 1, 0, 0.262061,-99) , -5, 1.75514, 1, 0, 0.497293,-99) ); - // itree = 12 - fBoostWeights.push_back(0.0533803); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.792717,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60064,-99) , -14, -1.74306, 1, 0, 0.758582,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651965,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52413,-99) , -12, 0.217876, 1, 0, 0.617448,-99) , -0, 15.5, 0, 0, 0.718087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388691,-99) , -14, -3.97529, 0, 0, 0.688032,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656888,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366351,-99) , -14, -3.65628, 0, 0, 0.494535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214732,-99) , -13, 0.00824527, 1, 0, 0.424733,-99) , -11, 1.5, 0, 0, 0.494044,-99) , -4, 1.18791, 1, 0, 0.625237,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368715,-99) , -10, 3810.77, 1, 0, 0.509764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271986,-99) , -6, 0.766152, 1, 0, 0.453339,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140734,-99) , -15, 0.0922561, 0, 0, 0.331847,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0713617,-99) , -14, -3.61673, 1, 0, 0.213087,-99) , -5, 2.06697, 1, 0, 0.334732,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317195,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136661,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0367275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -12, 0.149446, 1, 0, 0.0113314,-99) , -5, 1.92598, 1, 0, 0.0351565,-99) , -4, 1.37221, 1, 0, 0.0941445,-99) , -14, -2.6219, 1, 0, 0.235998,-99) , -5, 1.81839, 1, 0, 0.499111,-99) ); - // itree = 13 - fBoostWeights.push_back(0.0489255); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.784991,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678869,-99) , -2, 13.5, 0, 0, 0.750531,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683343,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514836,-99) , -3, 0.989787, 1, 0, 0.619382,-99) , -8, -0.847365, 0, 0, 0.724828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400053,-99) , -16, 3957.88, 1, 0, 0.4837,-99) , -13, 0.000352388, 0, 0, 0.688583,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490526,-99) , -8, 0.828717, 1, 0, 0.582259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375081,-99) , -12, 0.187617, 1, 0, 0.530011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218041,-99) , -13, 0.0162256, 1, 0, 0.487459,-99) , -4, 1.29854, 1, 0, 0.647471,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441124,-99) , -16, 425.961, 1, 0, 0.565735,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281315,-99) , -13, 0.00491856, 1, 0, 0.383795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177998,-99) , -5, 2.03865, 1, 0, 0.316259,-99) , -11, 1.5, 0, 0, 0.404406,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1616,-99) , -5, 2.0881, 1, 0, 0.278845,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133176,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0276214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.95909, 1, 0, 0.00505912,-99) , -4, 1.90405, 1, 0, 0.0563784,-99) , -14, -2.81167, 1, 0, 0.159769,-99) , -4, 1.69966, 1, 0, 0.278039,-99) , -5, 1.73796, 1, 0, 0.50794,-99) ); - // itree = 14 - fBoostWeights.push_back(0.0474942); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.735806,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510946,-99) , -15, 0.0581938, 0, 0, 0.71117,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502836,-99) , -13, 0.0246864, 1, 0, 0.690279,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585249,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439586,-99) , -3, 0.985254, 1, 0, 0.515351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284893,-99) , -12, 0.0400446, 0, 0, 0.466084,-99) , -14, -3.41578, 0, 0, 0.651824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383949,-99) , -7, 0.0164757, 0, 0, 0.488303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16991,-99) , -13, 0.00953595, 1, 0, 0.422222,-99) , -4, 1.46596, 1, 0, 0.619783,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333137,-99) , -5, 2.15003, 1, 0, 0.501821,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227978,-99) , -5, 2.06302, 1, 0, 0.304703,-99) , -11, 1.5, 0, 0, 0.376262,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196975,-99) , -13, 0.00887811, 1, 0, 0.38374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107607,-99) , -5, 2.05672, 1, 0, 0.282747,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0987776,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0606437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00400397,-99) , -13, 0.00196834, 1, 0, 0.0128386,-99) , -4, 1.85357, 1, 0, 0.0278238,-99) , -4, 1.76866, 1, 0, 0.1448,-99) , -13, 0.000847488, 1, 0, 0.251443,-99) , -5, 1.80994, 1, 0, 0.49834,-99) ); - // itree = 15 - fBoostWeights.push_back(0.0447176); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.775441,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586435,-99) , -7, 0.0125044, 0, 0, 0.749719,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568308,-99) , -13, 0.0194254, 1, 0, 0.724704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453506,-99) , -14, -3.87289, 0, 0, 0.694577,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435113,-99) , -8, 0.93526, 1, 0, 0.576017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221658,-99) , -13, 0.00397381, 1, 0, 0.407903,-99) , -4, 1.54905, 1, 0, 0.534817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233663,-99) , -13, 0.0213252, 1, 0, 0.506922,-99) , -4, 0.97329, 1, 0, 0.601998,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.190344,-99) , -7, 0.0150363, 0, 0, 0.28123,-99) , -11, 1.5, 0, 0, 0.357302,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103204,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0424398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -11, 0.5, 1, 0, 0.0121628,-99) , -4, 1.69628, 1, 0, 0.0386916,-99) , -5, 1.97621, 1, 0, 0.0976189,-99) , -13, 0.00099258, 1, 0, 0.222061,-99) , -5, 1.88954, 1, 0, 0.500622,-99) ); - // itree = 16 - fBoostWeights.push_back(0.0448515); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.74819,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555324,-99) , -4, 1.44092, 1, 0, 0.728771,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437639,-99) , -7, 0.0109833, 0, 0, 0.547618,-99) , -15, 0.0886172, 0, 0, 0.688357,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283344,-99) , -5, 1.38983, 1, 0, 0.478729,-99) , -13, 0.0202622, 1, 0, 0.659975,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542041,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365572,-99) , -4, 1.01135, 1, 0, 0.410185,-99) , -16, 1091.24, 1, 0, 0.473401,-99) , -14, -3.43842, 0, 0, 0.628279,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598251,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287653,-99) , -8, 0.600997, 0, 0, 0.380741,-99) , -11, 1.5, 0, 0, 0.456603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225545,-99) , -5, 2.09725, 1, 0, 0.400641,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496164,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282624,-99) , -4, 1.93151, 1, 0, 0.384563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156202,-99) , -7, 0.0134616, 0, 0, 0.310668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136376,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0384105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00524027,-99) , -4, 1.92636, 1, 0, 0.013881,-99) , -4, 1.81704, 1, 0, 0.0434521,-99) , -14, -3.05756, 1, 0, 0.154387,-99) , -4, 1.69959, 1, 0, 0.27888,-99) , -5, 1.74172, 1, 0, 0.497239,-99) ); - // itree = 17 - fBoostWeights.push_back(0.0450658); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.757032,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521123,-99) , -12, 0.0286175, 0, 0, 0.730205,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666329,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51374,-99) , -4, 0.98817, 1, 0, 0.600788,-99) , -12, 0.128737, 1, 0, 0.67103,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166714,-99) , -14, -2.02273, 1, 0, 0.405836,-99) , -4, 1.51717, 1, 0, 0.642198,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234922,-99) , -12, 0.0695726, 0, 0, 0.349714,-99) , -14, -4.12141, 0, 0, 0.617261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521365,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226152,-99) , -12, 0.0471144, 0, 0, 0.374657,-99) , -11, 1.5, 0, 0, 0.425725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184051,-99) , -5, 2.3089, 1, 0, 0.381821,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12113,-99) , -6, 0.493915, 1, 0, 0.309856,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0965546,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.023948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -6, 0.537346, 1, 0, 0.00445717,-99) , -4, 1.89695, 1, 0, 0.0453451,-99) , -5, 1.99846, 1, 0, 0.14185,-99) , -14, -2.95494, 1, 0, 0.260373,-99) , -5, 1.82475, 1, 0, 0.505164,-99) ); - // itree = 18 - fBoostWeights.push_back(0.0419738); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.768601,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678756,-99) , -14, -2.77773, 0, 0, 0.745672,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664462,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516236,-99) , -2, 12.5, 0, 0, 0.618127,-99) , -11, 1.5, 0, 0, 0.662576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38934,-99) , -14, -4.12975, 0, 0, 0.638451,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349883,-99) , -14, -3.89675, 0, 0, 0.533707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310237,-99) , -4, 1.72247, 1, 0, 0.507768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155508,-99) , -13, 0.0162298, 1, 0, 0.466169,-99) , -4, 1.31691, 1, 0, 0.591902,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220829,-99) , -12, 0.130725, 1, 0, 0.333105,-99) , -11, 1.5, 0, 0, 0.406052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158473,-99) , -5, 2.21941, 1, 0, 0.332853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305995,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127755,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0500035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00492463,-99) , -4, 1.75336, 1, 0, 0.017189,-99) , -11, 1.5, 0, 0, 0.0452522,-99) , -4, 1.22889, 1, 0, 0.0837135,-99) , -14, -2.76283, 1, 0, 0.224039,-99) , -5, 1.86715, 1, 0, 0.490484,-99) ); - // itree = 19 - fBoostWeights.push_back(0.0432111); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.763188,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616825,-99) , -2, 12.5, 0, 0, 0.717423,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51342,-99) , -13, 0.0219516, 1, 0, 0.692764,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381873,-99) , -3, 0.990015, 1, 0, 0.514311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298975,-99) , -14, -4.81378, 0, 0, 0.463408,-99) , -13, 0.000531406, 0, 0, 0.647878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479457,-99) , -2, 13.5, 0, 0, 0.563287,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334591,-99) , -4, 1.51238, 1, 0, 0.415777,-99) , -12, 0.126915, 1, 0, 0.490674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142039,-99) , -7, 0.10555, 1, 0, 0.466763,-99) , -4, 1.22794, 1, 0, 0.589152,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208615,-99) , -7, 0.0114633, 0, 0, 0.34684,-99) , -11, 1.5, 0, 0, 0.433536,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0358686,-99) , -8, 0.950335, 0, 0, 0.182831,-99) , -5, 2.15804, 1, 0, 0.335808,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111177,-99) , -5, 2.03841, 1, 0, 0.226988,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0663975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -9, 3.01294, 0, 0, 0.0197937,-99) , -4, 1.81131, 1, 0, 0.111971,-99) , -14, -2.68414, 1, 0, 0.241248,-99) , -5, 1.87236, 1, 0, 0.492338,-99) ); - // itree = 20 - fBoostWeights.push_back(0.0393636); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.760021,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573461,-99) , -15, 0.0798847, 0, 0, 0.730647,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655509,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504178,-99) , -12, 0.127005, 1, 0, 0.585052,-99) , -6, 0.449621, 1, 0, 0.65078,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320529,-99) , -6, 0.499478, 0, 0, 0.425783,-99) , -14, -3.94225, 0, 0, 0.628445,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334959,-99) , -14, -4.67948, 0, 0, 0.527331,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292129,-99) , -5, 2.13322, 1, 0, 0.494728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.085274,-99) , -5, 2.03897, 1, 0, 0.281987,-99) , -13, 0.00474838, 1, 0, 0.441393,-99) , -5, 1.65206, 1, 0, 0.56961,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483703,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263588,-99) , -5, 2.25793, 1, 0, 0.416628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124704,-99) , -7, 0.0113563, 0, 0, 0.349832,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0419695,-99) , -13, 0.0061342, 1, 0, 0.151095,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0281265,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00772316,-99) , -4, 1.92597, 1, 0, 0.0122328,-99) , -5, 2.08107, 1, 0, 0.0802484,-99) , -13, 0.000777656, 1, 0, 0.187237,-99) , -4, 1.69669, 1, 0, 0.496151,-99) ); - // itree = 21 - fBoostWeights.push_back(0.0437412); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.791601,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648974,-99) , -6, 0.298691, 1, 0, 0.698897,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261817,-99) , -5, 1.30366, 1, 0, 0.474116,-99) , -13, 0.0202542, 1, 0, 0.670271,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367237,-99) , -16, 421.661, 1, 0, 0.452827,-99) , -14, -3.41603, 0, 0, 0.636733,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60965,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349125,-99) , -12, 0.125936, 1, 0, 0.439597,-99) , -11, 1.5, 0, 0, 0.497054,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151198,-99) , -13, 0.00016586, 1, 0, 0.294779,-99) , -5, 2.01118, 1, 0, 0.443601,-99) , -5, 1.6519, 1, 0, 0.577886,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407995,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140447,-99) , -11, 1.5, 0, 0, 0.212917,-99) , -5, 2.00916, 1, 0, 0.279155,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249536,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110362,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0686143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00463791,-99) , -10, -4047.69, 1, 0, 0.0152002,-99) , -12, 0.0738714, 1, 0, 0.0284617,-99) , -5, 1.85212, 1, 0, 0.0743943,-99) , -13, 0.00102355, 1, 0, 0.162423,-99) , -4, 1.67649, 1, 0, 0.497939,-99) ); - // itree = 22 - fBoostWeights.push_back(0.0385536); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.790402,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697866,-99) , -6, 0.286854, 1, 0, 0.736892,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406972,-99) , -7, 0.00999516, 0, 0, 0.608519,-99) , -11, 1.5, 0, 0, 0.651481,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489566,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329313,-99) , -7, 0.0171949, 0, 0, 0.423797,-99) , -14, -3.8252, 0, 0, 0.622016,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580377,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263904,-99) , -0, 19.5, 1, 0, 0.398759,-99) , -12, 0.0701168, 1, 0, 0.459651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0789529,-99) , -13, 0.0162196, 1, 0, 0.405572,-99) , -4, 1.52563, 1, 0, 0.584329,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219691,-99) , -2, 11.5, 0, 0, 0.433779,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0797755,-99) , -5, 2.15673, 1, 0, 0.247468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16387,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0790889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -12, 0.0964313, 1, 0, 0.0162354,-99) , -14, -3.21818, 1, 0, 0.0415593,-99) , -4, 1.81154, 1, 0, 0.130156,-99) , -14, -3.79648, 1, 0, 0.22083,-99) , -5, 1.98268, 1, 0, 0.510836,-99) ); - // itree = 23 - fBoostWeights.push_back(0.0374297); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.781359,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600851,-99) , -0, 14.5, 0, 0, 0.73831,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695674,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55411,-99) , -12, 0.101324, 1, 0, 0.615472,-99) , -6, 0.403412, 1, 0, 0.66341,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334794,-99) , -12, 0.0767493, 0, 0, 0.431797,-99) , -14, -3.59155, 0, 0, 0.634639,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624407,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475188,-99) , -16, 688.775, 1, 0, 0.57264,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385672,-99) , -12, 0.0749224, 1, 0, 0.441263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232982,-99) , -5, 2.04348, 1, 0, 0.403134,-99) , -11, 1.5, 0, 0, 0.459477,-99) , -5, 1.58153, 1, 0, 0.572179,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409877,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144174,-99) , -8, 0.994236, 0, 0, 0.226874,-99) , -5, 2.00078, 1, 0, 0.300039,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284919,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0878584,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0829818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -8, 0.484325, 0, 0, 0.0183447,-99) , -16, 102.736, 1, 0, 0.0320354,-99) , -5, 1.8518, 1, 0, 0.0970012,-99) , -14, -2.67242, 1, 0, 0.2063,-99) , -4, 1.63735, 1, 0, 0.490848,-99) ); - // itree = 24 - fBoostWeights.push_back(0.0386488); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406166,-99) , -7, 0.00922191, 0, 0, 0.677814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412481,-99) , -13, 0.0344147, 1, 0, 0.660937,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460331,-99) , -8, 0.977424, 1, 0, 0.511622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289242,-99) , -7, 0.0135833, 0, 0, 0.466862,-99) , -8, 0.918761, 1, 0, 0.626318,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1962,-99) , -13, 0.00491602, 1, 0, 0.391316,-99) , -4, 1.52803, 1, 0, 0.600235,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550845,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401106,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252146,-99) , -5, 2.18928, 1, 0, 0.366033,-99) , -11, 1.5, 0, 0, 0.43551,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232431,-99) , -4, 1.94722, 1, 0, 0.385195,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218863,-99) , -16, 1084.58, 1, 0, 0.339425,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152285,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.050104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00854418,-99) , -4, 1.98886, 1, 0, 0.0253511,-99) , -5, 2.01182, 1, 0, 0.06548,-99) , -4, 1.56132, 1, 0, 0.15575,-99) , -14, -3.03701, 1, 0, 0.265974,-99) , -5, 1.83191, 1, 0, 0.500292,-99) ); - // itree = 25 - fBoostWeights.push_back(0.0375519); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.730422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53301,-99) , -13, 0.0257545, 1, 0, 0.705956,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558051,-99) , -2, 10.5, 0, 0, 0.680487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560847,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397585,-99) , -0, 19.5, 0, 0, 0.495545,-99) , -8, 0.935231, 1, 0, 0.65179,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47626,-99) , -12, 0.13013, 1, 0, 0.559056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325559,-99) , -14, -4.10292, 0, 0, 0.536282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176719,-99) , -7, 0.094932, 1, 0, 0.511898,-99) , -4, 1.12659, 1, 0, 0.600885,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618445,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272132,-99) , -5, 2.06361, 1, 0, 0.419371,-99) , -2, 17.5, 0, 0, 0.487675,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326545,-99) , -8, 0.92893, 1, 0, 0.390638,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112642,-99) , -8, 0.993819, 0, 0, 0.192471,-99) , -5, 1.98988, 1, 0, 0.274041,-99) , -16, 487.18, 1, 0, 0.361272,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398413,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241566,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00607733,-99) , -16, 28.2935, 1, 0, 0.025305,-99) , -5, 1.95691, 1, 0, 0.0919654,-99) , -4, 1.22958, 1, 0, 0.149843,-99) , -13, 0.0034274, 1, 0, 0.289016,-99) , -5, 1.79038, 1, 0, 0.498775,-99) ); - // itree = 26 - fBoostWeights.push_back(0.0353799); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482088,-99) , -12, 0.0286101, 0, 0, 0.67636,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417137,-99) , -5, 1.50919, 1, 0, 0.480367,-99) , -15, 0.061829, 0, 0, 0.650602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328242,-99) , -5, 1.33, 1, 0, 0.478532,-99) , -13, 0.0160726, 1, 0, 0.622392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33633,-99) , -10, 2930.5, 1, 0, 0.42166,-99) , -14, -3.93593, 0, 0, 0.600561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610063,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326935,-99) , -10, 998.344, 1, 0, 0.388394,-99) , -11, 1.5, 0, 0, 0.46828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0957016,-99) , -13, 0.000194075, 1, 0, 0.234812,-99) , -5, 2.12469, 1, 0, 0.390323,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326427,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133789,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0127384,-99) , -4, 1.7386, 1, 0, 0.0635217,-99) , -11, 1.5, 0, 0, 0.138788,-99) , -13, 0.00316845, 1, 0, 0.30802,-99) , -5, 1.75962, 1, 0, 0.497501,-99) ); - // itree = 27 - fBoostWeights.push_back(0.0376825); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723441,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566923,-99) , -13, 0.0216571, 1, 0, 0.699949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495708,-99) , -2, 9.5, 0, 0, 0.678087,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630133,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513799,-99) , -12, 0.172903, 1, 0, 0.579432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321232,-99) , -7, 0.0395643, 1, 0, 0.520369,-99) , -4, 1.29796, 1, 0, 0.648649,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574331,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319841,-99) , -3, 0.988278, 1, 0, 0.412742,-99) , -16, 1153.74, 1, 0, 0.496377,-99) , -14, -3.30127, 0, 0, 0.619067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400399,-99) , -12, 0.135895, 1, 0, 0.521897,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342174,-99) , -12, 0.278828, 0, 0, 0.379535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126099,-99) , -14, -2.27221, 1, 0, 0.315453,-99) , -16, 486.388, 1, 0, 0.397045,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32694,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110178,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0259334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0085437,-99) , -4, 1.92635, 1, 0, 0.0129815,-99) , -14, -2.81171, 1, 0, 0.0352528,-99) , -14, -3.32455, 1, 0, 0.140943,-99) , -4, 1.82205, 1, 0, 0.313978,-99) , -5, 1.6928, 1, 0, 0.496441,-99) ); - // itree = 28 - fBoostWeights.push_back(0.0361976); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.694619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49533,-99) , -7, 0.105708, 1, 0, 0.677552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431791,-99) , -7, 0.00984178, 0, 0, 0.661861,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349629,-99) , -14, -4.87864, 0, 0, 0.442223,-99) , -14, -3.76504, 0, 0, 0.637087,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587797,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327446,-99) , -12, 0.135443, 1, 0, 0.431159,-99) , -11, 1.5, 0, 0, 0.484525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195037,-99) , -5, 2.24212, 1, 0, 0.460601,-99) , -5, 1.67719, 1, 0, 0.59514,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526634,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455202,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250302,-99) , -5, 1.83306, 1, 0, 0.345921,-99) , -16, 1089.99, 1, 0, 0.431332,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0349515,-99) , -8, 0.945826, 0, 0, 0.207787,-99) , -5, 2.09048, 1, 0, 0.347661,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101942,-99) , -8, -0.385725, 0, 0, 0.225263,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0979539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 1.97476, 1, 0, 0.0210789,-99) , -4, 1.81716, 1, 0, 0.122775,-99) , -13, 0.0033732, 1, 0, 0.264585,-99) , -4, 1.52401, 1, 0, 0.506055,-99) ); - // itree = 29 - fBoostWeights.push_back(0.0372032); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.821784,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68285,-99) , -6, 0.209186, 1, 0, 0.722358,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430775,-99) , -15, 0.0468327, 0, 0, 0.578405,-99) , -2, 13.5, 0, 0, 0.666399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231911,-99) , -4, 1.08822, 1, 0, 0.477838,-99) , -13, 0.0180583, 1, 0, 0.639142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381335,-99) , -9, 0.335425, 0, 0, 0.448156,-99) , -14, -3.9141, 0, 0, 0.618247,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640163,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534638,-99) , -16, 379.15, 1, 0, 0.596759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370531,-99) , -5, 2.04575, 1, 0, 0.542726,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319895,-99) , -12, 0.113868, 1, 0, 0.392671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151619,-99) , -13, 0.00569886, 1, 0, 0.333615,-99) , -11, 1.5, 0, 0, 0.402428,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222943,-99) , -5, 2.085, 1, 0, 0.315705,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.080749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -11, 1.5, 0, 0, 0.0199379,-99) , -13, 0.00128532, 1, 0, 0.167135,-99) , -4, 1.82984, 1, 0, 0.33001,-99) , -5, 1.67685, 1, 0, 0.499255,-99) ); - // itree = 30 - fBoostWeights.push_back(0.034702); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.726625,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554276,-99) , -5, 1.60302, 1, 0, 0.697528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348591,-99) , -7, 0.00866978, 0, 0, 0.561585,-99) , -2, 16.5, 0, 0, 0.625451,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195668,-99) , -5, 1.42151, 1, 0, 0.39452,-99) , -13, 0.025244, 1, 0, 0.60576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343864,-99) , -14, -4.33732, 0, 0, 0.586791,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530934,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258367,-99) , -0, 17.5, 1, 0, 0.370392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17587,-99) , -8, 0.40999, 0, 0, 0.302881,-99) , -11, 1.5, 0, 0, 0.384845,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159605,-99) , -5, 2.16193, 1, 0, 0.277406,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256798,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0147483,-99) , -5, 1.92336, 1, 0, 0.0359668,-99) , -12, 0.0792227, 1, 0, 0.0703616,-99) , -13, 0.00143261, 1, 0, 0.176264,-99) , -4, 1.69066, 1, 0, 0.274917,-99) , -5, 1.80936, 1, 0, 0.489028,-99) ); - // itree = 31 - fBoostWeights.push_back(0.0347783); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.776022,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638568,-99) , -6, 0.297455, 1, 0, 0.720737,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6497,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535671,-99) , -8, -0.477019, 0, 0, 0.609199,-99) , -1, 14.5, 0, 0, 0.674592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478141,-99) , -14, -3.9723, 0, 0, 0.65274,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32901,-99) , -15, 0.0473968, 0, 0, 0.580512,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306334,-99) , -8, 0.990511, 1, 0, 0.394689,-99) , -8, 0.930135, 1, 0, 0.539166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288309,-99) , -14, -1.79844, 1, 0, 0.510283,-99) , -4, 0.986027, 1, 0, 0.581433,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399482,-99) , -12, 0.0573251, 0, 0, 0.50598,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198381,-99) , -5, 2.09949, 1, 0, 0.293827,-99) , -15, 0.158963, 0, 0, 0.40914,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102727,-99) , -5, 2.12462, 1, 0, 0.272545,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108291,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0469572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -10, 10337.8, 0, 0, 0.00770754,-99) , -11, 1.5, 0, 0, 0.0342467,-99) , -4, 1.76839, 1, 0, 0.138535,-99) , -13, 0.000595985, 1, 0, 0.260783,-99) , -5, 1.90444, 1, 0, 0.503686,-99) ); - // itree = 32 - fBoostWeights.push_back(0.0332765); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.770082,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677347,-99) , -8, -0.708534, 0, 0, 0.74216,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679049,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535023,-99) , -12, 0.146918, 1, 0, 0.6158,-99) , -11, 1.5, 0, 0, 0.658557,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379731,-99) , -3, 0.996711, 1, 0, 0.525743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314948,-99) , -12, 0.0312161, 0, 0, 0.49178,-99) , -13, 0.0008071, 0, 0, 0.617537,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482573,-99) , -12, 0.0778186, 1, 0, 0.535625,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349804,-99) , -7, 0.0112081, 0, 0, 0.497714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205417,-99) , -13, 0.00846683, 1, 0, 0.438816,-99) , -4, 1.38131, 1, 0, 0.575695,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391472,-99) , -16, 541.141, 1, 0, 0.48032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179283,-99) , -1, 9.5, 0, 0, 0.419631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207846,-99) , -5, 2.23566, 1, 0, 0.348316,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149505,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00657071,-99) , -11, 1.5, 0, 0, 0.0473447,-99) , -4, 1.68392, 1, 0, 0.138531,-99) , -8, 0.746796, 0, 0, 0.249435,-99) , -5, 1.93002, 1, 0, 0.505592,-99) ); - // itree = 33 - fBoostWeights.push_back(0.0331268); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453746,-99) , -13, 0.0235143, 1, 0, 0.670428,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367911,-99) , -15, 0.774741, 1, 0, 0.498803,-99) , -13, 0.000769694, 0, 0, 0.636072,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567498,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356904,-99) , -12, 0.132285, 1, 0, 0.423415,-99) , -16, 530.952, 1, 0, 0.475121,-99) , -2, 10.5, 0, 0, 0.605203,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430344,-99) , -15, 0.429841, 1, 0, 0.541237,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492873,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13275,-99) , -3, 0.996141, 1, 0, 0.312391,-99) , -11, 1.5, 0, 0, 0.368556,-99) , -12, 0.113902, 1, 0, 0.441597,-99) , -5, 1.66901, 1, 0, 0.557176,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19568,-99) , -5, 2.09046, 1, 0, 0.296149,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183577,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0871656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -9, 1.1859, 0, 0, 0.0342509,-99) , -5, 1.84495, 1, 0, 0.0620903,-99) , -13, 0.00212254, 1, 0, 0.191544,-99) , -4, 1.69232, 1, 0, 0.491896,-99) ); - // itree = 34 - fBoostWeights.push_back(0.0333393); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.748168,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61524,-99) , -2, 16.5, 0, 0, 0.67938,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507678,-99) , -7, 0.0856984, 1, 0, 0.658913,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362393,-99) , -15, 0.262794, 1, 0, 0.422031,-99) , -14, -3.71113, 0, 0, 0.629133,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4906,-99) , -13, 0.00846155, 1, 0, 0.622885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466508,-99) , -8, 0.925366, 1, 0, 0.586571,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268204,-99) , -3, 0.908605, 0, 0, 0.45065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222541,-99) , -13, 0.0175883, 1, 0, 0.423196,-99) , -16, 761.478, 1, 0, 0.49124,-99) , -4, 1.1048, 1, 0, 0.570873,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568199,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205822,-99) , -12, 0.125395, 1, 0, 0.308848,-99) , -11, 1.5, 0, 0, 0.415269,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272603,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0145623,-99) , -12, 0.0740041, 1, 0, 0.0419747,-99) , -16, 19.1475, 1, 0, 0.077932,-99) , -4, 1.41606, 1, 0, 0.139432,-99) , -8, 0.909286, 0, 0, 0.260007,-99) , -5, 1.90507, 1, 0, 0.496922,-99) ); - // itree = 35 - fBoostWeights.push_back(0.0348521); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.754377,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641901,-99) , -2, 11.5, 0, 0, 0.726133,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596658,-99) , -8, -0.774041, 0, 0, 0.701584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440659,-99) , -14, -3.89773, 0, 0, 0.670303,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463436,-99) , -14, -3.28199, 0, 0, 0.606951,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422025,-99) , -12, 0.339764, 0, 0, 0.487583,-99) , -12, 0.192675, 1, 0, 0.571915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348752,-99) , -12, 0.112045, 1, 0, 0.435563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141578,-99) , -13, 0.00653399, 1, 0, 0.367738,-99) , -5, 1.67422, 1, 0, 0.532376,-99) , -11, 1.5, 0, 0, 0.578189,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439145,-99) , -16, 365.061, 1, 0, 0.549379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256128,-99) , -5, 2.12675, 1, 0, 0.431948,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171203,-99) , -5, 2.09492, 1, 0, 0.296293,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305953,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0110524,-99) , -5, 1.9346, 1, 0, 0.035261,-99) , -4, 1.41127, 1, 0, 0.103065,-99) , -14, -3.05045, 1, 0, 0.189232,-99) , -11, 1.5, 0, 0, 0.271818,-99) , -5, 1.85768, 1, 0, 0.495608,-99) ); - // itree = 36 - fBoostWeights.push_back(0.0356456); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.795351,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645461,-99) , -1, 14.5, 0, 0, 0.733399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.689155,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541447,-99) , -11, 1.5, 0, 0, 0.586776,-99) , -6, 0.400676, 1, 0, 0.64874,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42991,-99) , -1, 14.5, 0, 0, 0.524447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37177,-99) , -12, 0.0742905, 0, 0, 0.475845,-99) , -8, 0.902937, 1, 0, 0.618324,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444243,-99) , -16, 351.217, 1, 0, 0.578044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349242,-99) , -10, 959.304, 1, 0, 0.414678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0769336,-99) , -5, 2.16126, 1, 0, 0.376788,-99) , -11, 1.5, 0, 0, 0.449292,-99) , -5, 1.67752, 1, 0, 0.577497,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442345,-99) , -9, -1.71523, 1, 0, 0.502666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298352,-99) , -3, 0.954032, 0, 0, 0.456292,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42514,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0565164,-99) , -12, 0.0980976, 1, 0, 0.138932,-99) , -14, -4.17383, 1, 0, 0.229512,-99) , -4, 1.82193, 1, 0, 0.34365,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225931,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0131737,-99) , -5, 1.98049, 1, 0, 0.0593977,-99) , -12, 0.0777467, 1, 0, 0.102746,-99) , -8, 0.245217, 0, 0, 0.263915,-99) , -4, 1.57568, 1, 0, 0.501621,-99) ); - // itree = 37 - fBoostWeights.push_back(0.0315965); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490684,-99) , -7, 0.0993547, 1, 0, 0.675321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475461,-99) , -8, -0.935557, 0, 0, 0.648096,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482555,-99) , -16, 977.988, 1, 0, 0.537044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374443,-99) , -15, 0.824077, 1, 0, 0.506226,-99) , -14, -2.93117, 0, 0, 0.607939,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576807,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383478,-99) , -16, 1561.72, 1, 0, 0.447794,-99) , -12, 0.0951437, 1, 0, 0.499399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147878,-99) , -7, 0.0628699, 1, 0, 0.456967,-99) , -4, 1.36034, 1, 0, 0.572963,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593127,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257582,-99) , -14, -4.2251, 1, 0, 0.403793,-99) , -11, 1.5, 0, 0, 0.481311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233996,-99) , -1, 9.5, 0, 0, 0.425326,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358133,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0223261,-99) , -4, 1.92627, 1, 0, 0.0597485,-99) , -5, 1.96885, 1, 0, 0.102774,-99) , -4, 1.42072, 1, 0, 0.171139,-99) , -13, 0.00055962, 1, 0, 0.28662,-99) , -5, 1.85719, 1, 0, 0.49515,-99) ); - // itree = 38 - fBoostWeights.push_back(0.0302645); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.70999,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557382,-99) , -8, -0.91214, 0, 0, 0.684537,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669181,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521985,-99) , -11, 1.5, 0, 0, 0.56749,-99) , -6, 0.617881, 1, 0, 0.62971,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407221,-99) , -0, 15.5, 0, 0, 0.507299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30505,-99) , -14, -4.96212, 0, 0, 0.461711,-99) , -14, -3.41548, 0, 0, 0.60249,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459021,-99) , -11, 1.5, 0, 0, 0.504726,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316353,-99) , -14, -2.22444, 1, 0, 0.466529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0889202,-99) , -5, 2.32359, 1, 0, 0.44728,-99) , -5, 1.65199, 1, 0, 0.553768,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348635,-99) , -16, 961.506, 1, 0, 0.465159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158959,-99) , -7, 0.0140971, 0, 0, 0.365535,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0937735,-99) , -10, 259.413, 1, 0, 0.174326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00955339,-99) , -4, 1.96546, 1, 0, 0.10574,-99) , -14, -3.04495, 1, 0, 0.223457,-99) , -4, 1.69356, 1, 0, 0.495015,-99) ); - // itree = 39 - fBoostWeights.push_back(0.0323286); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720381,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579921,-99) , -0, 15.5, 0, 0, 0.677894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49227,-99) , -5, 0.443518, 0, 0, 0.658358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389879,-99) , -14, -4.01294, 0, 0, 0.635736,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469508,-99) , -12, 0.129512, 1, 0, 0.543127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265872,-99) , -14, -4.64881, 0, 0, 0.524538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277327,-99) , -7, 0.0633162, 1, 0, 0.496365,-99) , -4, 1.01642, 1, 0, 0.571069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424254,-99) , -1, 11.5, 0, 0, 0.538069,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480103,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.074311,-99) , -3, 0.968647, 0, 0, 0.238666,-99) , -5, 1.99184, 1, 0, 0.330013,-99) , -11, 1.5, 0, 0, 0.412183,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338005,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0188512,-99) , -5, 2.08107, 1, 0, 0.0618442,-99) , -4, 1.52155, 1, 0, 0.147318,-99) , -13, 0.000989644, 1, 0, 0.287008,-99) , -5, 1.84421, 1, 0, 0.493798,-99) ); - // itree = 40 - fBoostWeights.push_back(0.0287217); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.739387,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62291,-99) , -2, 16.5, 0, 0, 0.685904,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526101,-99) , -3, 0.998177, 1, 0, 0.659299,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384483,-99) , -1, 13.5, 0, 0, 0.469078,-99) , -13, 0.000274863, 0, 0, 0.632041,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668822,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515807,-99) , -14, -3.23615, 0, 0, 0.61295,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414226,-99) , -12, 0.115322, 1, 0, 0.47688,-99) , -11, 1.5, 0, 0, 0.519239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23564,-99) , -13, 0.0166835, 1, 0, 0.489084,-99) , -4, 1.04774, 1, 0, 0.565566,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546532,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491697,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311854,-99) , -11, 1.5, 0, 0, 0.381502,-99) , -9, -2.64803, 1, 0, 0.426781,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167454,-99) , -11, 1.5, 0, 0, 0.246283,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0142657,-99) , -5, 2.081, 1, 0, 0.0405279,-99) , -4, 1.92627, 1, 0, 0.158537,-99) , -14, -3.34942, 1, 0, 0.273909,-99) , -5, 1.92999, 1, 0, 0.501819,-99) ); - // itree = 41 - fBoostWeights.push_back(0.0315979); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.71962,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543795,-99) , -7, 0.0147098, 0, 0, 0.681901,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346569,-99) , -3, 0.996483, 1, 0, 0.515554,-99) , -13, 0.0144008, 1, 0, 0.639929,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57841,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29761,-99) , -13, 0.000174539, 0, 0, 0.413339,-99) , -16, 1091.51, 1, 0, 0.498455,-99) , -13, 0.00130485, 0, 0, 0.60264,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267554,-99) , -5, 2.24292, 1, 0, 0.524962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157479,-99) , -7, 0.00792742, 0, 0, 0.503779,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146707,-99) , -15, 0.118879, 1, 0, 0.260957,-99) , -13, 0.00857754, 1, 0, 0.465255,-99) , -5, 1.55971, 1, 0, 0.54528,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192932,-99) , -1, 11.5, 0, 0, 0.338036,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267187,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.96557, 1, 0, 0.0585659,-99) , -5, 1.88145, 1, 0, 0.10283,-99) , -13, 0.000621572, 1, 0, 0.198709,-99) , -4, 1.71697, 1, 0, 0.488818,-99) ); - // itree = 42 - fBoostWeights.push_back(0.0292152); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697675,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462341,-99) , -12, 0.0311747, 0, 0, 0.661749,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269134,-99) , -7, 0.00922191, 0, 0, 0.539507,-99) , -12, 0.113389, 1, 0, 0.597198,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279012,-99) , -15, 0.292839, 1, 0, 0.37481,-99) , -14, -4.36895, 0, 0, 0.580716,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329537,-99) , -5, 2.10215, 1, 0, 0.416217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164887,-99) , -13, 0.00247729, 1, 0, 0.33969,-99) , -5, 1.9381, 1, 0, 0.556951,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231018,-99) , -5, 2.22792, 1, 0, 0.452635,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360502,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169793,-99) , -9, -1.12401, 1, 0, 0.250014,-99) , -12, 0.118289, 1, 0, 0.362211,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0213189,-99) , -4, 1.89705, 1, 0, 0.0974134,-99) , -13, 0.00205364, 1, 0, 0.250426,-99) , -4, 1.64684, 1, 0, 0.496755,-99) ); - // itree = 43 - fBoostWeights.push_back(0.031313); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484511,-99) , -12, 0.0335924, 0, 0, 0.669792,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662968,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50233,-99) , -11, 1.5, 0, 0, 0.551556,-99) , -12, 0.124949, 1, 0, 0.609532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162463,-99) , -5, 2.11246, 1, 0, 0.597585,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472039,-99) , -10, 1660.87, 1, 0, 0.525733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364174,-99) , -7, 0.0133367, 0, 0, 0.47719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258105,-99) , -12, 0.0288384, 0, 0, 0.44604,-99) , -14, -3.45215, 0, 0, 0.565835,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400852,-99) , -12, 0.0703609, 1, 0, 0.462322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151421,-99) , -4, 2.07396, 1, 0, 0.410515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177072,-99) , -7, 0.0112538, 0, 0, 0.359914,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268715,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00899061,-99) , -16, 102.736, 1, 0, 0.0320742,-99) , -5, 1.84558, 1, 0, 0.116451,-99) , -14, -2.58709, 1, 0, 0.26299,-99) , -4, 1.55375, 1, 0, 0.491906,-99) ); - // itree = 44 - fBoostWeights.push_back(0.0272856); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468154,-99) , -13, 0.0187889, 1, 0, 0.615318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410962,-99) , -7, 0.0095269, 0, 0, 0.599623,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137999,-99) , -5, 2.16126, 1, 0, 0.589791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519966,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289765,-99) , -7, 0.0235593, 0, 0, 0.34648,-99) , -12, 0.206869, 0, 0, 0.399555,-99) , -8, 0.977907, 1, 0, 0.566079,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433963,-99) , -16, 602.01, 1, 0, 0.491815,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152215,-99) , -5, 2.18044, 1, 0, 0.269706,-99) , -4, 1.81424, 1, 0, 0.389042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0174465,-99) , -4, 1.80593, 1, 0, 0.0498869,-99) , -5, 1.88145, 1, 0, 0.147038,-99) , -13, 0.00167957, 1, 0, 0.282807,-99) , -4, 1.55367, 1, 0, 0.495663,-99) ); - // itree = 45 - fBoostWeights.push_back(0.031413); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.769106,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668753,-99) , -6, 0.457396, 1, 0, 0.71849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483846,-99) , -5, 1.49714, 1, 0, 0.582405,-99) , -11, 1.5, 0, 0, 0.626464,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214055,-99) , -5, 1.46976, 1, 0, 0.404681,-99) , -13, 0.0191099, 1, 0, 0.595355,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490083,-99) , -2, 16.5, 1, 0, 0.534316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389291,-99) , -2, 11.5, 0, 0, 0.482831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252893,-99) , -12, 0.0305692, 0, 0, 0.446708,-99) , -14, -3.36034, 0, 0, 0.565126,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592988,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384376,-99) , -11, 0.5, 1, 0, 0.442426,-99) , -16, 381.569, 1, 0, 0.50014,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175809,-99) , -8, 0.995386, 0, 0, 0.331599,-99) , -5, 2.1156, 1, 0, 0.428643,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0963405,-99) , -5, 2.15733, 1, 0, 0.35666,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16717,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0398563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -16, 117.887, 1, 0, 0.00588903,-99) , -11, 1.5, 0, 0, 0.0510159,-99) , -4, 1.59254, 1, 0, 0.172852,-99) , -13, 0.00102316, 1, 0, 0.309784,-99) , -5, 1.8461, 1, 0, 0.494956,-99) ); - // itree = 46 - fBoostWeights.push_back(0.0271348); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.755298,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676052,-99) , -4, 0.677318, 1, 0, 0.715739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667606,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553414,-99) , -12, 0.113283, 1, 0, 0.606036,-99) , -16, 382.407, 1, 0, 0.647597,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376006,-99) , -5, 1.57279, 1, 0, 0.562026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337216,-99) , -3, 0.998601, 1, 0, 0.530027,-99) , -6, 0.81305, 1, 0, 0.608067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34447,-99) , -4, 0.92551, 1, 0, 0.446824,-99) , -8, 0.940847, 1, 0, 0.583724,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387693,-99) , -7, 0.0133333, 0, 0, 0.483703,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213223,-99) , -5, 2.23814, 1, 0, 0.456571,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114332,-99) , -14, -3.83272, 1, 0, 0.262582,-99) , -4, 1.82183, 1, 0, 0.396139,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0418005,-99) , -4, 1.43283, 1, 0, 0.102644,-99) , -11, 1.5, 0, 0, 0.17395,-99) , -13, 0.00573721, 1, 0, 0.341917,-99) , -5, 1.7382, 1, 0, 0.497378,-99) ); - // itree = 47 - fBoostWeights.push_back(0.0284051); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676625,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512529,-99) , -15, 0.0582831, 0, 0, 0.65864,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501206,-99) , -8, -0.931784, 0, 0, 0.637399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356186,-99) , -16, 2977.95, 1, 0, 0.452563,-99) , -8, 0.926902, 1, 0, 0.606984,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422462,-99) , -13, 0.000170576, 0, 0, 0.568774,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528185,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359043,-99) , -16, 446.635, 1, 0, 0.411995,-99) , -12, 0.124247, 1, 0, 0.491894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0783419,-99) , -7, 0.108093, 1, 0, 0.466787,-99) , -4, 1.27081, 1, 0, 0.564484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410637,-99) , -5, 2.2885, 1, 0, 0.543125,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499497,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0908135,-99) , -5, 2.21122, 1, 0, 0.27946,-99) , -8, 0.995493, 0, 0, 0.332855,-99) , -11, 1.5, 0, 0, 0.412848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24284,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0124153,-99) , -4, 1.39297, 1, 0, 0.0411994,-99) , -11, 1.5, 0, 0, 0.0975158,-99) , -13, 0.00266559, 1, 0, 0.312054,-99) , -5, 1.89494, 1, 0, 0.503651,-99) ); - // itree = 48 - fBoostWeights.push_back(0.0305425); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.758156,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643097,-99) , -6, 0.490274, 1, 0, 0.698257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495205,-99) , -8, 0.914008, 1, 0, 0.66227,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661734,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489704,-99) , -6, 0.86429, 1, 0, 0.611397,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377982,-99) , -2, 11.5, 0, 0, 0.476232,-99) , -16, 2627.03, 1, 0, 0.542766,-99) , -12, 0.124493, 1, 0, 0.603307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35699,-99) , -12, 0.025797, 0, 0, 0.589044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586647,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361023,-99) , -16, 647.888, 1, 0, 0.421118,-99) , -10, 1274.7, 1, 0, 0.476973,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168775,-99) , -7, 0.0122109, 0, 0, 0.420622,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0757543,-99) , -4, 1.81269, 1, 0, 0.174809,-99) , -14, -3.31419, 1, 0, 0.318499,-99) , -4, 1.69358, 1, 0, 0.411802,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202014,-99) , -16, 1030.27, 1, 0, 0.312062,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00921431,-99) , -12, 0.371731, 0, 0, 0.0537555,-99) , -5, 1.95211, 1, 0, 0.186198,-99) , -13, 0.00472431, 1, 0, 0.350456,-99) , -5, 1.67981, 1, 0, 0.491446,-99) ); - // itree = 49 - fBoostWeights.push_back(0.0270556); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686402,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567786,-99) , -4, 1.09141, 1, 0, 0.658323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497027,-99) , -7, 0.108387, 1, 0, 0.638353,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63005,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515746,-99) , -16, 4037.48, 1, 0, 0.573554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419891,-99) , -8, 0.895592, 1, 0, 0.545806,-99) , -1, 14.5, 0, 0, 0.593592,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612692,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528267,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114316,-99) , -8, -0.309737, 0, 0, 0.293048,-99) , -10, 1447.91, 1, 0, 0.375441,-99) , -11, 1.5, 0, 0, 0.465373,-99) , -5, 1.7364, 1, 0, 0.567828,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558645,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269706,-99) , -12, 0.143961, 1, 0, 0.353132,-99) , -1, 14.5, 0, 0, 0.428305,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521945,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0410112,-99) , -13, 0.0151329, 1, 0, 0.225813,-99) , -11, 1.5, 0, 0, 0.312877,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0852445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0187472,-99) , -4, 1.95607, 1, 0, 0.0323243,-99) , -4, 1.8995, 1, 0, 0.218747,-99) , -13, 0.000391896, 1, 0, 0.29614,-99) , -4, 1.54491, 1, 0, 0.498926,-99) ); - // itree = 50 - fBoostWeights.push_back(0.0256655); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.722223,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56986,-99) , -7, 0.0879615, 1, 0, 0.688747,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622041,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506495,-99) , -12, 0.190387, 1, 0, 0.583472,-99) , -2, 16.5, 0, 0, 0.643511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415442,-99) , -14, -4.13351, 0, 0, 0.621658,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436543,-99) , -13, 0.000256698, 0, 0, 0.597764,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313088,-99) , -4, 1.65724, 1, 0, 0.470864,-99) , -11, 1.5, 0, 0, 0.510876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118674,-99) , -7, 0.136909, 1, 0, 0.493592,-99) , -4, 0.918498, 1, 0, 0.549002,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406743,-99) , -16, 524.08, 1, 0, 0.485854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265471,-99) , -5, 2.2122, 1, 0, 0.395854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221867,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0781936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0133065,-99) , -4, 1.80593, 1, 0, 0.0396066,-99) , -5, 2.06778, 1, 0, 0.0862201,-99) , -8, 0.746693, 0, 0, 0.270249,-99) , -5, 1.99005, 1, 0, 0.498849,-99) ); - // itree = 51 - fBoostWeights.push_back(0.0233812); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555599,-99) , -2, 16.5, 0, 0, 0.599517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359748,-99) , -7, 0.108413, 1, 0, 0.584186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236445,-99) , -4, 1.2208, 0, 0, 0.354124,-99) , -5, 1.39473, 1, 0, 0.418143,-99) , -14, -4.13982, 0, 0, 0.565881,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168727,-99) , -8, 0.965158, 0, 0, 0.321564,-99) , -5, 2.05176, 1, 0, 0.549839,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284388,-99) , -12, 0.121249, 1, 0, 0.430114,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258244,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170566,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0111468,-99) , -16, 224.953, 1, 0, 0.0532525,-99) , -4, 1.89719, 1, 0, 0.139468,-99) , -8, 0.953192, 0, 0, 0.243112,-99) , -4, 1.74732, 1, 0, 0.505171,-99) ); - // itree = 52 - fBoostWeights.push_back(0.026627); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483911,-99) , -8, -0.926324, 0, 0, 0.627933,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348278,-99) , -12, 0.0598963, 0, 0, 0.431685,-99) , -14, -3.87185, 0, 0, 0.604667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364796,-99) , -7, 0.00922146, 0, 0, 0.587013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354076,-99) , -7, 0.108683, 1, 0, 0.571328,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539771,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373174,-99) , -4, 1.45915, 1, 0, 0.420388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21648,-99) , -4, 1.9862, 1, 0, 0.3787,-99) , -2, 23.5, 0, 0, 0.410298,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37665,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0151338,-99) , -16, 19.824, 1, 0, 0.0318152,-99) , -4, 1.75653, 1, 0, 0.064841,-99) , -4, 1.41633, 1, 0, 0.153958,-99) , -14, -3.06807, 1, 0, 0.290781,-99) , -5, 1.85715, 1, 0, 0.500115,-99) ); - // itree = 53 - fBoostWeights.push_back(0.0275234); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.673748,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515885,-99) , -15, 0.0841748, 0, 0, 0.640582,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330811,-99) , -3, 0.996808, 1, 0, 0.491078,-99) , -13, 0.0152116, 1, 0, 0.613231,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377739,-99) , -12, 0.0673967, 0, 0, 0.458184,-99) , -14, -3.55118, 0, 0, 0.589365,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565733,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464627,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295921,-99) , -5, 2.07612, 1, 0, 0.420679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183309,-99) , -13, 0.00442013, 1, 0, 0.363712,-99) , -11, 1.5, 0, 0, 0.439956,-99) , -5, 1.77876, 1, 0, 0.564116,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564786,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328076,-99) , -14, -3.86391, 0, 0, 0.482879,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112627,-99) , -14, -3.6174, 1, 0, 0.300705,-99) , -5, 2.07823, 1, 0, 0.408673,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353357,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0130403,-99) , -5, 1.98723, 1, 0, 0.0469538,-99) , -5, 1.8297, 1, 0, 0.154197,-99) , -14, -2.83676, 1, 0, 0.294962,-99) , -4, 1.56679, 1, 0, 0.500055,-99) ); - // itree = 54 - fBoostWeights.push_back(0.0251527); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.732046,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619816,-99) , -5, 1.50465, 1, 0, 0.68762,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631815,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504515,-99) , -12, 0.115667, 1, 0, 0.58028,-99) , -6, 0.662753, 1, 0, 0.648644,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410129,-99) , -7, 0.00998347, 0, 0, 0.566525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331715,-99) , -7, 0.105872, 1, 0, 0.551701,-99) , -16, 505.846, 1, 0, 0.589319,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318806,-99) , -14, -4.32033, 0, 0, 0.50408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21116,-99) , -5, 2.23845, 1, 0, 0.469559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246002,-99) , -13, 0.00447651, 1, 0, 0.419272,-99) , -5, 1.79643, 1, 0, 0.559592,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194516,-99) , -7, 0.0126489, 0, 0, 0.395816,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285459,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0103513,-99) , -12, 0.0962657, 1, 0, 0.0306071,-99) , -5, 1.98513, 1, 0, 0.139467,-99) , -14, -3.31511, 1, 0, 0.24163,-99) , -4, 1.69653, 1, 0, 0.508873,-99) ); - // itree = 55 - fBoostWeights.push_back(0.0236414); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681185,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51005,-99) , -12, 0.0310829, 0, 0, 0.652268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497457,-99) , -11, 1.5, 0, 0, 0.541238,-99) , -12, 0.113452, 1, 0, 0.590286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15673,-99) , -5, 2.15677, 1, 0, 0.581172,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601237,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313182,-99) , -14, -4.94606, 0, 0, 0.427349,-99) , -0, 26.5, 0, 0, 0.478605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327357,-99) , -12, 0.0323259, 0, 0, 0.453738,-99) , -14, -3.52396, 0, 0, 0.556304,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388463,-99) , -12, 0.12516, 1, 0, 0.501642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294817,-99) , -1, 9.5, 0, 0, 0.449453,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21776,-99) , -0, 13.5, 1, 0, 0.294022,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234517,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0997169,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0141162,-99) , -15, 0.0591771, 1, 0, 0.0393685,-99) , -12, 0.0782687, 1, 0, 0.0705559,-99) , -5, 1.95682, 1, 0, 0.18175,-99) , -13, 0.000902971, 1, 0, 0.314151,-99) , -4, 1.56681, 1, 0, 0.498782,-99) ); - // itree = 56 - fBoostWeights.push_back(0.0242952); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.718702,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571787,-99) , -13, 0.0193176, 1, 0, 0.688584,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664929,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52399,-99) , -16, 298.972, 1, 0, 0.570248,-99) , -2, 16.5, 0, 0, 0.634024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402111,-99) , -12, 0.0311515, 0, 0, 0.61413,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417555,-99) , -12, 0.0257976, 0, 0, 0.579659,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164359,-99) , -4, 1.82178, 1, 0, 0.443282,-99) , -12, 0.108733, 1, 0, 0.506148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194566,-99) , -7, 0.115978, 1, 0, 0.489384,-99) , -4, 0.976502, 1, 0, 0.545756,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291807,-99) , -7, 0.0149193, 0, 0, 0.426662,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300805,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.69233, 1, 0, 0.0454731,-99) , -5, 2.11403, 1, 0, 0.119793,-99) , -8, 0.94826, 0, 0, 0.247831,-99) , -5, 2.02886, 1, 0, 0.502288,-99) ); - // itree = 57 - fBoostWeights.push_back(0.0248277); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663633,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534617,-99) , -2, 13.5, 0, 0, 0.608625,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374276,-99) , -7, 0.103115, 1, 0, 0.593171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185295,-99) , -5, 2.12368, 1, 0, 0.583236,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550244,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358951,-99) , -6, 0.162141, 0, 0, 0.438392,-99) , -11, 1.5, 0, 0, 0.480024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325536,-99) , -3, 0.996635, 1, 0, 0.451358,-99) , -8, 0.91562, 1, 0, 0.554602,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584643,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312082,-99) , -2, 11.5, 0, 0, 0.396297,-99) , -16, 423.549, 1, 0, 0.465462,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112108,-99) , -4, 1.76106, 1, 0, 0.227842,-99) , -13, 0.00306646, 1, 0, 0.374023,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373472,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0275369,-99) , -4, 1.76368, 1, 0, 0.0440129,-99) , -8, 0.973451, 0, 0, 0.150403,-99) , -5, 2.06698, 1, 0, 0.285885,-99) , -4, 1.5737, 1, 0, 0.494694,-99) ); - // itree = 58 - fBoostWeights.push_back(0.0266032); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.76339,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615729,-99) , -6, 0.30753, 1, 0, 0.661753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434965,-99) , -8, -0.925402, 0, 0, 0.629388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39082,-99) , -16, 574.985, 1, 0, 0.4681,-99) , -14, -3.1252, 0, 0, 0.59854,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298986,-99) , -14, -4.72778, 0, 0, 0.513435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181518,-99) , -5, 2.23816, 1, 0, 0.499404,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252104,-99) , -16, 429.112, 1, 0, 0.308398,-99) , -13, 0.00860505, 1, 0, 0.466363,-99) , -5, 1.47131, 1, 0, 0.534268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322704,-99) , -12, 0.115057, 1, 0, 0.446237,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351222,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.139014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0202097,-99) , -5, 2.06081, 1, 0, 0.0659942,-99) , -5, 1.85212, 1, 0, 0.128843,-99) , -8, 0.951119, 0, 0, 0.24641,-99) , -4, 1.70936, 1, 0, 0.48858,-99) ); - // itree = 59 - fBoostWeights.push_back(0.0255394); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.73186,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616208,-99) , -16, 959.183, 1, 0, 0.671835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497848,-99) , -8, -0.869447, 0, 0, 0.636548,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514607,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326869,-99) , -6, 0.111566, 0, 0, 0.447564,-99) , -11, 1.5, 0, 0, 0.495704,-99) , -13, 0.000748338, 0, 0, 0.602564,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653001,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536515,-99) , -16, 610.85, 1, 0, 0.588745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389455,-99) , -14, -4.38385, 0, 0, 0.561107,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577447,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214329,-99) , -5, 1.91937, 1, 0, 0.401013,-99) , -12, 0.386901, 0, 0, 0.432663,-99) , -12, 0.129512, 1, 0, 0.497663,-99) , -4, 1.01463, 1, 0, 0.555162,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588937,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343651,-99) , -9, 2.88313, 0, 0, 0.414687,-99) , -9, -2.46122, 1, 0, 0.47487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.11744,-99) , -9, -2.41613, 1, 0, 0.23636,-99) , -5, 2.09039, 1, 0, 0.383671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.013315,-99) , -4, 1.81725, 1, 0, 0.120936,-99) , -13, 0.00324737, 1, 0, 0.295184,-99) , -4, 1.58763, 1, 0, 0.497927,-99) ); - // itree = 60 - fBoostWeights.push_back(0.0215798); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411085,-99) , -14, -4.34418, 0, 0, 0.63224,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538368,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261568,-99) , -7, 0.0290013, 1, 0, 0.519226,-99) , -2, 15.5, 0, 0, 0.571569,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165037,-99) , -1, 37.5, 0, 0, 0.356785,-99) , -7, 0.10458, 1, 0, 0.557218,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212403,-99) , -8, 0.945943, 0, 0, 0.343922,-99) , -5, 2.03862, 1, 0, 0.542429,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316361,-99) , -9, -2.40241, 1, 0, 0.431424,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -11, 1.5, 0, 0, 0.0778473,-99) , -5, 1.88178, 1, 0, 0.13856,-99) , -13, 0.0010789, 1, 0, 0.291787,-99) , -4, 1.73888, 1, 0, 0.505447,-99) ); - // itree = 61 - fBoostWeights.push_back(0.0233748); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681888,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540303,-99) , -8, -0.777294, 0, 0, 0.650257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471196,-99) , -5, 0.538452, 0, 0, 0.631171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408258,-99) , -14, -4.12065, 0, 0, 0.610954,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451457,-99) , -13, 0.000157358, 0, 0, 0.593501,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377083,-99) , -15, 0.144384, 0, 0, 0.456697,-99) , -16, 499.989, 1, 0, 0.50782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225299,-99) , -13, 0.0222109, 1, 0, 0.48615,-99) , -4, 0.999425, 1, 0, 0.546086,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496258,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441306,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204968,-99) , -8, 0.993551, 0, 0, 0.286583,-99) , -16, 528.194, 1, 0, 0.380397,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246684,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0359809,-99) , -6, 0.249935, 1, 0, 0.111849,-99) , -8, 0.658546, 0, 0, 0.280143,-99) , -5, 1.983, 1, 0, 0.499465,-99) ); - // itree = 62 - fBoostWeights.push_back(0.024833); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.753924,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670538,-99) , -2, 15.5, 0, 0, 0.719845,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621827,-99) , -8, -0.481229, 0, 0, 0.68625,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501456,-99) , -14, -3.23253, 0, 0, 0.641146,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723208,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603418,-99) , -1, 15.5, 0, 0, 0.668018,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348116,-99) , -8, 0.88953, 1, 0, 0.526737,-99) , -6, 0.298768, 1, 0, 0.571928,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395713,-99) , -15, 0.0797293, 0, 0, 0.502998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126527,-99) , -4, 1.50182, 1, 0, 0.301064,-99) , -14, -2.33533, 1, 0, 0.442447,-99) , -5, 1.49636, 1, 0, 0.517893,-99) , -11, 1.5, 0, 0, 0.557304,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536625,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307305,-99) , -5, 2.10167, 1, 0, 0.395829,-99) , -15, 0.238221, 0, 0, 0.454473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261609,-99) , -4, 2.0025, 1, 0, 0.412647,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328353,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0286746,-99) , -4, 1.3918, 1, 0, 0.078309,-99) , -11, 1.5, 0, 0, 0.156881,-99) , -14, -2.81152, 1, 0, 0.315307,-99) , -5, 1.88533, 1, 0, 0.500234,-99) ); - // itree = 63 - fBoostWeights.push_back(0.0215087); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677766,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516969,-99) , -5, 0.64806, 0, 0, 0.652854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481103,-99) , -8, -0.896129, 0, 0, 0.625748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402657,-99) , -14, -3.95112, 0, 0, 0.601422,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456799,-99) , -14, -4.08772, 0, 0, 0.584289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370861,-99) , -12, 0.0296092, 0, 0, 0.545393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24734,-99) , -7, 0.0839584, 1, 0, 0.44398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182522,-99) , -5, 2.21234, 1, 0, 0.431461,-99) , -12, 0.105418, 1, 0, 0.480697,-99) , -4, 0.915785, 1, 0, 0.533577,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377166,-99) , -12, 0.14326, 1, 0, 0.458317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22653,-99) , -4, 2.10569, 1, 0, 0.4087,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0440483,-99) , -4, 1.89321, 1, 0, 0.157423,-99) , -8, 0.891008, 0, 0, 0.268509,-99) , -4, 1.69046, 1, 0, 0.488655,-99) ); - // itree = 64 - fBoostWeights.push_back(0.0233025); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708444,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601817,-99) , -8, -0.64033, 0, 0, 0.678491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476118,-99) , -13, 0.000294678, 0, 0, 0.650394,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457367,-99) , -7, 0.108623, 1, 0, 0.627572,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618862,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534845,-99) , -2, 10.5, 0, 0, 0.571461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422603,-99) , -8, -0.855214, 0, 0, 0.534728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336933,-99) , -6, 0.543599, 1, 0, 0.383709,-99) , -8, 0.737879, 1, 0, 0.493573,-99) , -2, 13.5, 0, 0, 0.579212,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496771,-99) , -13, 0.000179404, 0, 0, 0.596255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424618,-99) , -8, 0.525838, 0, 0, 0.543033,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169919,-99) , -7, 0.00793017, 0, 0, 0.405799,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19551,-99) , -13, 0.008338, 1, 0, 0.369031,-99) , -16, 183.223, 1, 0, 0.423425,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0523762,-99) , -8, 0.946132, 0, 0, 0.190592,-99) , -4, 1.92378, 1, 0, 0.379341,-99) , -5, 1.67567, 1, 0, 0.498017,-99) ); - // itree = 65 - fBoostWeights.push_back(0.0226709); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496319,-99) , -13, 0.000185139, 0, 0, 0.632761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438276,-99) , -12, 0.0305839, 0, 0, 0.611024,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419511,-99) , -15, 0.192827, 1, 0, 0.543237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373591,-99) , -7, 0.0131059, 0, 0, 0.50971,-99) , -12, 0.189273, 1, 0, 0.582796,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275559,-99) , -14, -4.70256, 0, 0, 0.495042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243317,-99) , -5, 2.2429, 1, 0, 0.4762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157583,-99) , -7, 0.0802735, 1, 0, 0.460312,-99) , -5, 1.65, 1, 0, 0.541528,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266779,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0485167,-99) , -4, 2.06274, 1, 0, 0.20244,-99) , -1, 14.5, 0, 0, 0.292588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0350555,-99) , -4, 1.81881, 1, 0, 0.0750295,-99) , -14, -2.6219, 1, 0, 0.20806,-99) , -4, 1.74926, 1, 0, 0.497374,-99) ); - // itree = 66 - fBoostWeights.push_back(0.0219912); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676484,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563332,-99) , -12, 0.132618, 1, 0, 0.624579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429809,-99) , -8, -0.975754, 0, 0, 0.609261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420803,-99) , -7, 0.0168353, 0, 0, 0.488199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301638,-99) , -12, 0.0469587, 0, 0, 0.438857,-99) , -13, 0.000284187, 0, 0, 0.582252,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450533,-99) , -3, 0.960995, 0, 0, 0.556343,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535498,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361451,-99) , -16, 1043.75, 1, 0, 0.427973,-99) , -12, 0.131246, 1, 0, 0.495085,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251943,-99) , -7, 0.0652854, 1, 0, 0.467657,-99) , -4, 1.29252, 1, 0, 0.544806,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336322,-99) , -12, 0.113398, 1, 0, 0.437459,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409452,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296013,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00733889,-99) , -12, 0.0963073, 1, 0, 0.0583465,-99) , -4, 1.34095, 1, 0, 0.103818,-99) , -16, 10.9866, 1, 0, 0.148578,-99) , -8, 0.945183, 0, 0, 0.276015,-99) , -5, 2.01196, 1, 0, 0.504487,-99) ); - // itree = 67 - fBoostWeights.push_back(0.0203564); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450694,-99) , -8, 0.967657, 1, 0, 0.618629,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282857,-99) , -7, 0.00922087, 0, 0, 0.511198,-99) , -12, 0.129352, 1, 0, 0.567508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318976,-99) , -12, 0.0227027, 0, 0, 0.556832,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291894,-99) , -7, 0.0253064, 1, 0, 0.438991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126632,-99) , -1, 9.5, 0, 0, 0.385089,-99) , -5, 1.93931, 1, 0, 0.540767,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552856,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158625,-99) , -5, 2.2735, 1, 0, 0.409322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244887,-99) , -10, 2935.42, 1, 0, 0.3528,-99) , -9, -4.37187, 1, 0, 0.399444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0539428,-99) , -5, 1.95211, 1, 0, 0.142817,-99) , -13, 0.00211814, 1, 0, 0.301481,-99) , -4, 1.63365, 1, 0, 0.494107,-99) ); - // itree = 68 - fBoostWeights.push_back(0.0219207); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.767392,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65748,-99) , -6, 0.168248, 1, 0, 0.694654,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583044,-99) , -0, 13.5, 0, 0, 0.662877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461851,-99) , -8, 0.978106, 1, 0, 0.633512,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396122,-99) , -14, -3.96818, 0, 0, 0.569839,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322146,-99) , -8, -0.708609, 0, 0, 0.452094,-99) , -12, 0.136482, 1, 0, 0.517971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25042,-99) , -5, 2.03271, 1, 0, 0.503984,-99) , -11, 1.5, 0, 0, 0.547672,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558973,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277892,-99) , -13, 0.000628409, 1, 0, 0.399975,-99) , -16, 242.516, 1, 0, 0.450718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132313,-99) , -5, 2.40754, 1, 0, 0.4185,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0559361,-99) , -5, 1.90281, 1, 0, 0.146699,-99) , -13, 0.00268027, 1, 0, 0.321393,-99) , -4, 1.57703, 1, 0, 0.496683,-99) ); - // itree = 69 - fBoostWeights.push_back(0.0239258); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.750659,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630168,-99) , -2, 16.5, 0, 0, 0.692871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427122,-99) , -14, -3.59677, 0, 0, 0.647047,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4591,-99) , -7, 0.0124242, 0, 0, 0.559596,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253082,-99) , -13, 0.00552516, 1, 0, 0.409958,-99) , -4, 1.48236, 1, 0, 0.536706,-99) , -11, 1.5, 0, 0, 0.572491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305283,-99) , -13, 0.0377774, 1, 0, 0.559663,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422288,-99) , -6, 0.520464, 1, 0, 0.544708,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367456,-99) , -3, 0.97612, 1, 0, 0.445113,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0964509,-99) , -4, 1.8059, 1, 0, 0.221437,-99) , -13, 0.000773854, 1, 0, 0.330554,-99) , -11, 1.5, 0, 0, 0.403244,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0370777,-99) , -12, 0.363228, 0, 0, 0.0727432,-99) , -14, -4.04397, 1, 0, 0.19082,-99) , -5, 2.15512, 1, 0, 0.331775,-99) , -5, 1.85513, 1, 0, 0.502899,-99) ); - // itree = 70 - fBoostWeights.push_back(0.0212522); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.714299,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555999,-99) , -1, 42.5, 1, 0, 0.680715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471991,-99) , -8, 0.963349, 1, 0, 0.651198,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626678,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400541,-99) , -13, 0.000602628, 0, 0, 0.4807,-99) , -11, 1.5, 0, 0, 0.524612,-99) , -1, 14.5, 0, 0, 0.597665,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545085,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432686,-99) , -7, 0.0147765, 0, 0, 0.507089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209998,-99) , -5, 2.2428, 1, 0, 0.497303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168898,-99) , -7, 0.119328, 1, 0, 0.484147,-99) , -4, 0.925977, 1, 0, 0.535537,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531002,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22678,-99) , -16, 1969.99, 1, 0, 0.326604,-99) , -12, 0.0680178, 1, 0, 0.402003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169009,-99) , -4, 1.99381, 1, 0, 0.327722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0466136,-99) , -13, 0.00670639, 1, 0, 0.264301,-99) , -4, 1.69475, 1, 0, 0.49179,-99) ); - // itree = 71 - fBoostWeights.push_back(0.0227664); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488902,-99) , -4, 1.48914, 1, 0, 0.64361,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36752,-99) , -7, 0.026908, 1, 0, 0.548775,-99) , -2, 16.5, 0, 0, 0.589118,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0273495,-99) , -4, 1.51555, 1, 0, 0.369845,-99) , -13, 0.0245695, 1, 0, 0.569947,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232254,-99) , -15, 0.312959, 1, 0, 0.354775,-99) , -14, -4.371, 0, 0, 0.553755,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55496,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321901,-99) , -8, 0.994736, 0, 0, 0.400696,-99) , -11, 1.5, 0, 0, 0.465689,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438965,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344754,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.062222,-99) , -8, 0.755518, 0, 0, 0.109277,-99) , -16, 9.28393, 1, 0, 0.137505,-99) , -4, 1.16197, 1, 0, 0.186426,-99) , -8, 0.950394, 0, 0, 0.305742,-99) , -5, 1.9302, 1, 0, 0.503419,-99) ); - // itree = 72 - fBoostWeights.push_back(0.0225889); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443289,-99) , -14, -4.12187, 0, 0, 0.627997,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454317,-99) , -4, 1.09025, 1, 0, 0.524294,-99) , -12, 0.123327, 1, 0, 0.575378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30264,-99) , -12, 0.0227284, 0, 0, 0.564393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347436,-99) , -16, 338.057, 1, 0, 0.44897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188487,-99) , -3, 0.991764, 1, 0, 0.38838,-99) , -5, 1.90862, 1, 0, 0.5463,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414379,-99) , -6, 0.611781, 0, 0, 0.490114,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0294056,-99) , -7, 0.0121323, 0, 0, 0.264036,-99) , -4, 1.81424, 1, 0, 0.369082,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.011524,-99) , -5, 2.01328, 1, 0, 0.110548,-99) , -14, -2.61219, 1, 0, 0.274796,-99) , -4, 1.64388, 1, 0, 0.497004,-99) ); - // itree = 73 - fBoostWeights.push_back(0.0218413); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.707436,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53608,-99) , -13, 0.0164113, 1, 0, 0.66146,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442951,-99) , -16, 1908.54, 1, 0, 0.522958,-99) , -13, 0.00145922, 0, 0, 0.621873,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393392,-99) , -9, -0.545333, 1, 0, 0.466139,-99) , -7, 0.0139931, 0, 0, 0.5925,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661167,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522678,-99) , -2, 12.5, 0, 0, 0.60578,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464443,-99) , -14, -3.69354, 0, 0, 0.569544,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42667,-99) , -15, 0.239397, 0, 0, 0.470816,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267298,-99) , -13, 0.0138997, 1, 0, 0.443761,-99) , -11, 1.5, 0, 0, 0.483768,-99) , -4, 0.987282, 1, 0, 0.537921,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407859,-99) , -12, 0.0976878, 1, 0, 0.487392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222327,-99) , -4, 2.06942, 1, 0, 0.429092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151424,-99) , -7, 0.0105196, 0, 0, 0.382843,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249751,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0403413,-99) , -5, 1.86991, 1, 0, 0.0966568,-99) , -13, 0.00212902, 1, 0, 0.2776,-99) , -4, 1.69109, 1, 0, 0.496915,-99) ); - // itree = 74 - fBoostWeights.push_back(0.0215971); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.763239,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65115,-99) , -6, 0.159641, 1, 0, 0.68367,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569913,-99) , -2, 10.5, 0, 0, 0.660968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497056,-99) , -13, 0.000254168, 0, 0, 0.627105,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346116,-99) , -12, 0.0263839, 0, 0, 0.56505,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353014,-99) , -7, 0.012644, 0, 0, 0.431769,-99) , -15, 0.0936994, 0, 0, 0.526599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28367,-99) , -7, 0.119704, 1, 0, 0.513017,-99) , -11, 1.5, 0, 0, 0.55175,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398306,-99) , -3, 0.973254, 0, 0, 0.530633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345072,-99) , -6, 0.961713, 1, 0, 0.492615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271474,-99) , -5, 2.24514, 1, 0, 0.443819,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0875744,-99) , -13, 0.0124065, 1, 0, 0.289048,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.89715, 1, 0, 0.190217,-99) , -14, -2.90597, 1, 0, 0.330325,-99) , -4, 1.58764, 1, 0, 0.503483,-99) ); - // itree = 75 - fBoostWeights.push_back(0.0224234); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696202,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563943,-99) , -13, 0.00192076, 0, 0, 0.659428,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351231,-99) , -13, 0.013987, 1, 0, 0.547285,-99) , -5, 1.37388, 1, 0, 0.604812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420467,-99) , -7, 0.104661, 1, 0, 0.586078,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572947,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3854,-99) , -4, 0.973116, 1, 0, 0.44121,-99) , -16, 250.639, 1, 0, 0.482644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21025,-99) , -5, 2.08632, 1, 0, 0.467326,-99) , -2, 11.5, 0, 0, 0.550936,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550357,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246196,-99) , -5, 1.97365, 1, 0, 0.368605,-99) , -11, 1.5, 0, 0, 0.437288,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282966,-99) , -4, 1.74621, 0, 0, 0.366323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0347522,-99) , -13, 0.0173783, 1, 0, 0.312129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0237512,-99) , -4, 1.83992, 1, 0, 0.196199,-99) , -14, -3.0013, 1, 0, 0.32242,-99) , -4, 1.56984, 1, 0, 0.499448,-99) ); - // itree = 76 - fBoostWeights.push_back(0.0185131); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643444,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524328,-99) , -15, 0.100836, 0, 0, 0.614334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460501,-99) , -8, 0.98314, 1, 0, 0.594767,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420258,-99) , -4, 1.33604, 1, 0, 0.542746,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23062,-99) , -5, 2.02901, 1, 0, 0.420097,-99) , -2, 13.5, 0, 0, 0.485639,-99) , -16, 1262.16, 1, 0, 0.537396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249542,-99) , -7, 0.145312, 1, 0, 0.527005,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343945,-99) , -8, 0.98629, 0, 0, 0.43653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238159,-99) , -15, 0.0905475, 0, 0, 0.382671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0157315,-99) , -5, 2.01344, 1, 0, 0.130483,-99) , -13, 0.00159686, 1, 0, 0.277867,-99) , -4, 1.69353, 1, 0, 0.487723,-99) ); - // itree = 77 - fBoostWeights.push_back(0.0215507); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679973,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555981,-99) , -16, 967.007, 1, 0, 0.613884,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342418,-99) , -8, -0.908916, 0, 0, 0.495307,-99) , -2, 12.5, 0, 0, 0.569175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220405,-99) , -7, 0.173236, 1, 0, 0.559285,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260747,-99) , -12, 0.0182039, 0, 0, 0.352168,-99) , -12, 0.028597, 0, 0, 0.544105,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47019,-99) , -5, 2.11092, 0, 0, 0.520019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34818,-99) , -5, 2.30349, 1, 0, 0.474273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198669,-99) , -8, 0.948328, 0, 0, 0.432404,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268011,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.54237, 1, 0, 0.0517729,-99) , -5, 2.0682, 1, 0, 0.123112,-99) , -13, 0.000484406, 1, 0, 0.280723,-99) , -5, 1.96498, 1, 0, 0.499686,-99) ); - // itree = 78 - fBoostWeights.push_back(0.0218992); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.719875,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625568,-99) , -7, 0.0436696, 1, 0, 0.685199,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553665,-99) , -0, 13.5, 0, 0, 0.651528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463642,-99) , -14, -3.59586, 0, 0, 0.616179,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603249,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451501,-99) , -13, 0.00121684, 0, 0, 0.564033,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241231,-99) , -13, 0.00764016, 1, 0, 0.442203,-99) , -5, 1.54378, 1, 0, 0.513222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259737,-99) , -7, 0.109404, 1, 0, 0.49698,-99) , -11, 1.5, 0, 0, 0.535302,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379608,-99) , -16, 203.95, 1, 0, 0.448281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314956,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0180061,-99) , -4, 1.76213, 1, 0, 0.0740663,-99) , -5, 2.0769, 1, 0, 0.152346,-99) , -8, 0.954656, 0, 0, 0.279152,-99) , -5, 1.98511, 1, 0, 0.492711,-99) ); - // itree = 79 - fBoostWeights.push_back(0.0198513); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66377,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560244,-99) , -2, 13.5, 0, 0, 0.623305,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310904,-99) , -13, 0.00505628, 1, 0, 0.464843,-99) , -4, 1.46152, 1, 0, 0.604367,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254748,-99) , -15, 0.502709, 1, 0, 0.417759,-99) , -13, 0.025245, 1, 0, 0.584049,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485694,-99) , -14, -4.38597, 0, 0, 0.544775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35649,-99) , -7, 0.012495, 0, 0, 0.49934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323767,-99) , -12, 0.0409619, 0, 0, 0.459193,-99) , -14, -3.3469, 0, 0, 0.559204,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435007,-99) , -0, 13.5, 0, 0, 0.542322,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332491,-99) , -11, 0.5, 1, 0, 0.417349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123089,-99) , -5, 2.34541, 1, 0, 0.387483,-99) , -11, 1.5, 0, 0, 0.446648,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0868001,-99) , -5, 2.01328, 1, 0, 0.222591,-99) , -14, -2.60364, 1, 0, 0.376009,-99) , -5, 1.79696, 1, 0, 0.504514,-99) ); - // itree = 80 - fBoostWeights.push_back(0.0215163); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.749352,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660099,-99) , -10, 3018.48, 1, 0, 0.705945,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587517,-99) , -0, 14.5, 0, 0, 0.671188,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508925,-99) , -14, -3.43915, 0, 0, 0.637564,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683539,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536908,-99) , -6, 0.592671, 1, 0, 0.619057,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445235,-99) , -1, 14.5, 0, 0, 0.49875,-99) , -16, 512.434, 1, 0, 0.532651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216884,-99) , -13, 0.0465902, 1, 0, 0.520474,-99) , -11, 1.5, 0, 0, 0.55775,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402049,-99) , -0, 14.5, 0, 0, 0.545833,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273783,-99) , -4, 2.01802, 1, 0, 0.421859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242504,-99) , -7, 0.0119823, 0, 0, 0.367709,-99) , -11, 1.5, 0, 0, 0.435968,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41592,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291434,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0218743,-99) , -4, 1.74775, 1, 0, 0.066201,-99) , -16, 23.3207, 1, 0, 0.102398,-99) , -6, 0.177204, 1, 0, 0.192153,-99) , -14, -2.6877, 1, 0, 0.353719,-99) , -5, 1.82087, 1, 0, 0.502848,-99) ); - // itree = 81 - fBoostWeights.push_back(0.0197411); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720387,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647468,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553496,-99) , -15, 0.508718, 1, 0, 0.623229,-99) , -6, 0.154819, 1, 0, 0.644322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397958,-99) , -14, -4.38991, 0, 0, 0.618645,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408611,-99) , -13, 0.0234095, 1, 0, 0.54483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371262,-99) , -7, 0.00922436, 0, 0, 0.529907,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35753,-99) , -5, 1.85229, 1, 0, 0.459378,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1382,-99) , -1, 18.5, 0, 0, 0.222259,-99) , -13, 0.00395529, 1, 0, 0.381719,-99) , -4, 1.4166, 1, 0, 0.489939,-99) , -11, 1.5, 0, 0, 0.532488,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443398,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0566638,-99) , -5, 2.21221, 1, 0, 0.154204,-99) , -14, -3.89334, 1, 0, 0.255388,-99) , -5, 2.06808, 1, 0, 0.499361,-99) ); - // itree = 82 - fBoostWeights.push_back(0.0220562); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497794,-99) , -14, -3.53248, 0, 0, 0.610134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452942,-99) , -8, -0.895615, 0, 0, 0.589856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307937,-99) , -12, 0.0248079, 0, 0, 0.574698,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611076,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475536,-99) , -13, 0.000249867, 0, 0, 0.572565,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268466,-99) , -7, 0.0113505, 0, 0, 0.41937,-99) , -16, 1097.91, 1, 0, 0.489781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212565,-99) , -13, 0.0114318, 1, 0, 0.451094,-99) , -4, 1.30681, 1, 0, 0.535835,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310893,-99) , -15, 0.100274, 0, 0, 0.497029,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48461,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0531792,-99) , -5, 2.13247, 1, 0, 0.127314,-99) , -12, 0.402474, 0, 0, 0.176677,-99) , -14, -3.79799, 1, 0, 0.299424,-99) , -5, 1.99674, 1, 0, 0.498026,-99) ); - // itree = 83 - fBoostWeights.push_back(0.021869); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697723,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581589,-99) , -2, 17.5, 0, 0, 0.637765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413725,-99) , -5, 0.565929, 0, 0, 0.613838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332839,-99) , -14, -4.36668, 0, 0, 0.593642,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464181,-99) , -15, 0.828835, 1, 0, 0.589334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365603,-99) , -8, 0.980027, 1, 0, 0.562237,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533091,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180214,-99) , -13, 0.0255579, 1, 0, 0.358534,-99) , -11, 1.5, 0, 0, 0.40823,-99) , -12, 0.124534, 1, 0, 0.484905,-99) , -4, 1.01361, 1, 0, 0.539589,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243082,-99) , -16, 622.819, 1, 0, 0.493019,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137091,-99) , -6, 0.795857, 1, 0, 0.333293,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0808185,-99) , -8, 0.803102, 0, 0, 0.223681,-99) , -11, 1.5, 0, 0, 0.327849,-99) , -5, 1.98518, 1, 0, 0.503747,-99) ); - // itree = 84 - fBoostWeights.push_back(0.0184658); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.698545,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688428,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590763,-99) , -10, -246.877, 1, 0, 0.620925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463617,-99) , -14, -3.82112, 0, 0, 0.594183,-99) , -3, 0.953186, 1, 0, 0.62146,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46263,-99) , -3, 0.996537, 1, 0, 0.576639,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385911,-99) , -6, 0.13098, 0, 0, 0.453187,-99) , -7, 0.0151495, 0, 0, 0.547119,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419478,-99) , -15, 0.681633, 1, 0, 0.525484,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239803,-99) , -15, 0.219535, 1, 0, 0.401835,-99) , -12, 0.113168, 1, 0, 0.45552,-99) , -4, 0.968162, 1, 0, 0.502045,-99) , -11, 1.5, 0, 0, 0.542002,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579679,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259299,-99) , -12, 0.131688, 1, 0, 0.382337,-99) , -9, -2.4095, 1, 0, 0.45769,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36583,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0355838,-99) , -11, 1.5, 0, 0, 0.0752519,-99) , -12, 0.0740975, 1, 0, 0.109506,-99) , -5, 1.87302, 1, 0, 0.222385,-99) , -13, 0.000926403, 1, 0, 0.344905,-99) , -4, 1.56479, 1, 0, 0.497185,-99) ); - // itree = 85 - fBoostWeights.push_back(0.0195176); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437941,-99) , -14, -3.80135, 0, 0, 0.626969,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300471,-99) , -7, 0.0287391, 1, 0, 0.511421,-99) , -2, 16.5, 0, 0, 0.560762,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194941,-99) , -3, 0.995683, 1, 0, 0.371722,-99) , -7, 0.105856, 1, 0, 0.548636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275883,-99) , -5, 2.13255, 1, 0, 0.538192,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41108,-99) , -9, -0.85321, 1, 0, 0.511479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259897,-99) , -6, 0.914763, 1, 0, 0.45382,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0381116,-99) , -5, 1.99574, 1, 0, 0.168935,-99) , -14, -3.25671, 1, 0, 0.303023,-99) , -4, 1.69361, 1, 0, 0.501687,-99) ); - // itree = 86 - fBoostWeights.push_back(0.0195095); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.735314,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597083,-99) , -2, 25.5, 0, 0, 0.639434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457296,-99) , -5, 0.550482, 0, 0, 0.616908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38139,-99) , -14, -4.03503, 0, 0, 0.593345,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608046,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460287,-99) , -13, 0.00026218, 0, 0, 0.572321,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397757,-99) , -12, 0.124339, 1, 0, 0.459799,-99) , -11, 1.5, 0, 0, 0.495304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126388,-99) , -7, 0.135456, 1, 0, 0.482534,-99) , -4, 0.915104, 1, 0, 0.530653,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372009,-99) , -16, 352.102, 1, 0, 0.446795,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0342077,-99) , -4, 1.9275, 1, 0, 0.149937,-99) , -8, 0.946439, 0, 0, 0.290781,-99) , -5, 2.00674, 1, 0, 0.493516,-99) ); - // itree = 87 - fBoostWeights.push_back(0.0199932); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652097,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511172,-99) , -8, -0.877079, 0, 0, 0.629489,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44781,-99) , -1, 15.5, 0, 0, 0.512542,-99) , -8, 0.943904, 1, 0, 0.608415,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337937,-99) , -1, 12.5, 0, 0, 0.462326,-99) , -5, 1.90255, 1, 0, 0.591813,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427719,-99) , -13, 0.0140578, 1, 0, 0.568078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397014,-99) , -14, -3.39694, 0, 0, 0.541941,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296217,-99) , -7, 0.00953774, 0, 0, 0.449009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244741,-99) , -7, 0.0343321, 1, 0, 0.416293,-99) , -5, 1.52856, 1, 0, 0.491007,-99) , -16, 3087.95, 1, 0, 0.545226,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633216,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488462,-99) , -16, 1928.82, 1, 0, 0.571353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216599,-99) , -7, 0.0112556, 0, 0, 0.498673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273155,-99) , -5, 2.09923, 1, 0, 0.410328,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.045488,-99) , -5, 1.94292, 1, 0, 0.137345,-99) , -13, 0.00239201, 1, 0, 0.315272,-99) , -4, 1.63934, 1, 0, 0.503842,-99) ); - // itree = 88 - fBoostWeights.push_back(0.0181326); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682884,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606881,-99) , -13, 0.00202912, 0, 0, 0.6507,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506211,-99) , -8, -0.875543, 0, 0, 0.631128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401042,-99) , -8, 0.98728, 1, 0, 0.602268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624526,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428609,-99) , -13, 0.000704504, 0, 0, 0.583458,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117724,-99) , -7, 0.0289324, 1, 0, 0.470875,-99) , -2, 16.5, 0, 0, 0.515172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267747,-99) , -7, 0.105856, 1, 0, 0.499112,-99) , -11, 1.5, 0, 0, 0.533049,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2363,-99) , -15, 0.122563, 0, 0, 0.407454,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0212207,-99) , -4, 1.9888, 1, 0, 0.190347,-99) , -13, 0.000847252, 1, 0, 0.299347,-99) , -4, 1.74795, 1, 0, 0.501908,-99) ); - // itree = 89 - fBoostWeights.push_back(0.0217758); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685166,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613348,-99) , -13, 0.0023881, 0, 0, 0.649832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477026,-99) , -8, -0.879733, 0, 0, 0.627932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445831,-99) , -14, -4.47461, 0, 0, 0.609878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663281,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541282,-99) , -6, 0.418006, 1, 0, 0.586639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362363,-99) , -13, 0.000419416, 0, 0, 0.555986,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265795,-99) , -7, 0.00860076, 0, 0, 0.484757,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0501687,-99) , -4, 1.58661, 1, 0, 0.244468,-99) , -13, 0.00509737, 1, 0, 0.425054,-99) , -5, 1.54659, 1, 0, 0.500464,-99) , -11, 1.5, 0, 0, 0.536283,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282139,-99) , -5, 2.087, 1, 0, 0.385313,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.00710106,-99) , -11, 1.5, 0, 0, 0.106093,-99) , -13, 0.000845293, 1, 0, 0.253606,-99) , -4, 1.76778, 1, 0, 0.502807,-99) ); - // itree = 90 - fBoostWeights.push_back(0.0189157); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655831,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52887,-99) , -5, 1.54305, 1, 0, 0.621527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376133,-99) , -7, 0.133535, 1, 0, 0.603773,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489595,-99) , -16, 285.864, 1, 0, 0.527024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306467,-99) , -7, 0.0262918, 1, 0, 0.506499,-99) , -2, 14.5, 0, 0, 0.558809,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31376,-99) , -5, 1.44608, 0, 0, 0.367496,-99) , -12, 0.0305869, 0, 0, 0.542943,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463365,-99) , -3, 0.989666, 0, 0, 0.554536,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310623,-99) , -14, -3.13362, 1, 0, 0.38611,-99) , -11, 1.5, 0, 0, 0.440371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0851119,-99) , -13, 8.33823e-05, 1, 0, 0.221029,-99) , -5, 2.15959, 1, 0, 0.38728,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0791392,-99) , -13, 0.0162192, 1, 0, 0.354963,-99) , -4, 1.5161, 1, 0, 0.495291,-99) ); - // itree = 91 - fBoostWeights.push_back(0.0198124); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356263,-99) , -3, 0.999372, 1, 0, 0.583594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179231,-99) , -5, 2.16118, 1, 0, 0.576352,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300844,-99) , -12, 0.0758187, 0, 0, 0.391553,-99) , -14, -4.1307, 0, 0, 0.557203,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259258,-99) , -15, 0.0470278, 0, 0, 0.350276,-99) , -7, 0.00921753, 0, 0, 0.543307,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476593,-99) , -16, 529.748, 1, 0, 0.544914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244957,-99) , -7, 0.0102629, 0, 0, 0.49737,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501174,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1444,-99) , -14, -4.18852, 1, 0, 0.296073,-99) , -5, 2.08167, 1, 0, 0.429539,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0684445,-99) , -11, 1.5, 0, 0, 0.16502,-99) , -13, 0.00447542, 1, 0, 0.359975,-99) , -4, 1.5491, 1, 0, 0.500643,-99) ); - // itree = 92 - fBoostWeights.push_back(0.0217123); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.746102,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619563,-99) , -16, 1563.47, 1, 0, 0.689308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488639,-99) , -8, 0.914247, 1, 0, 0.648303,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437194,-99) , -8, -0.822758, 0, 0, 0.569386,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296399,-99) , -6, 0.15232, 0, 0, 0.419406,-99) , -7, 0.0129444, 0, 0, 0.539206,-99) , -12, 0.108266, 1, 0, 0.583507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386041,-99) , -12, 0.0312035, 0, 0, 0.567581,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630697,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511005,-99) , -16, 372.662, 1, 0, 0.557852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348474,-99) , -0, 44.5, 1, 0, 0.531875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311269,-99) , -5, 2.0752, 1, 0, 0.490461,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339294,-99) , -2, 14.5, 0, 0, 0.449785,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412579,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270498,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0670345,-99) , -5, 1.83611, 1, 0, 0.181081,-99) , -8, 0.965985, 0, 0, 0.239314,-99) , -11, 1.5, 0, 0, 0.303645,-99) , -12, 0.125377, 1, 0, 0.393837,-99) , -4, 1.2844, 1, 0, 0.497382,-99) ); - // itree = 93 - fBoostWeights.push_back(0.0171173); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650712,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510379,-99) , -14, -3.88689, 0, 0, 0.620568,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470638,-99) , -4, 0.838426, 1, 0, 0.519939,-99) , -12, 0.104401, 1, 0, 0.561227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325194,-99) , -12, 0.0220001, 0, 0, 0.551619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334797,-99) , -8, -0.979986, 0, 0, 0.540476,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52018,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0914222,-99) , -4, 2.06944, 1, 0, 0.296996,-99) , -9, -2.38794, 1, 0, 0.384462,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0198921,-99) , -4, 1.90411, 1, 0, 0.128439,-99) , -14, -2.81166, 1, 0, 0.282166,-99) , -4, 1.69232, 1, 0, 0.502351,-99) ); - // itree = 94 - fBoostWeights.push_back(0.0162405); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645518,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52533,-99) , -2, 11.5, 0, 0, 0.607583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3929,-99) , -14, -4.74664, 0, 0, 0.592424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413644,-99) , -7, 0.0891079, 1, 0, 0.576592,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495184,-99) , -2, 15.5, 0, 0, 0.576034,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432381,-99) , -4, 0.787688, 1, 0, 0.468376,-99) , -9, 3.6084, 0, 0, 0.490284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184335,-99) , -5, 2.13255, 1, 0, 0.480696,-99) , -16, 1980.28, 1, 0, 0.529748,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414981,-99) , -9, -0.797148, 1, 0, 0.492767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211702,-99) , -7, 0.0113747, 0, 0, 0.439833,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225022,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0629665,-99) , -5, 2.01186, 1, 0, 0.139284,-99) , -14, -3.01927, 1, 0, 0.304391,-99) , -4, 1.6916, 1, 0, 0.495957,-99) ); - // itree = 95 - fBoostWeights.push_back(0.0173433); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.721454,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603806,-99) , -6, 0.458611, 1, 0, 0.676877,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5421,-99) , -8, -0.760795, 0, 0, 0.646811,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526129,-99) , -13, 0.000251551, 0, 0, 0.622859,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422125,-99) , -12, 0.0314081, 0, 0, 0.589662,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415836,-99) , -2, 11.5, 0, 0, 0.493436,-99) , -12, 0.111582, 1, 0, 0.537133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247406,-99) , -5, 2.11342, 1, 0, 0.529212,-99) , -11, 1.5, 0, 0, 0.560756,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401436,-99) , -3, 0.955413, 0, 0, 0.552706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34222,-99) , -4, 1.99623, 1, 0, 0.526213,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576988,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24916,-99) , -5, 1.96314, 1, 0, 0.338803,-99) , -12, 0.363931, 0, 0, 0.382304,-99) , -12, 0.114438, 1, 0, 0.456541,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0890325,-99) , -5, 1.7904, 1, 0, 0.213708,-99) , -13, 0.0060939, 1, 0, 0.402039,-99) , -4, 1.38451, 1, 0, 0.506723,-99) ); - // itree = 96 - fBoostWeights.push_back(0.0160424); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654035,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528062,-99) , -14, -3.92827, 0, 0, 0.63509,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493656,-99) , -1, 9.5, 0, 0, 0.609637,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411212,-99) , -7, 0.0888007, 1, 0, 0.589267,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467379,-99) , -14, -2.67991, 0, 0, 0.566951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387252,-99) , -13, 0.0216506, 1, 0, 0.545866,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425664,-99) , -2, 15.5, 0, 0, 0.463024,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0766566,-99) , -15, 0.289983, 1, 0, 0.301962,-99) , -14, -2.08403, 1, 0, 0.432964,-99) , -5, 1.46768, 1, 0, 0.486918,-99) , -16, 471.403, 1, 0, 0.526502,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458703,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0890269,-99) , -12, 0.0962158, 1, 0, 0.144083,-99) , -13, 0.000329268, 1, 0, 0.276415,-99) , -4, 1.82197, 1, 0, 0.501752,-99) ); - // itree = 97 - fBoostWeights.push_back(0.019755); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644618,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531286,-99) , -5, 1.65148, 1, 0, 0.610881,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233949,-99) , -5, 1.46692, 1, 0, 0.43724,-99) , -13, 0.0183607, 1, 0, 0.584509,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320165,-99) , -12, 0.0227143, 0, 0, 0.571883,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412931,-99) , -8, 0.932608, 1, 0, 0.540293,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28121,-99) , -7, 0.00930478, 0, 0, 0.410289,-99) , -15, 0.0832199, 0, 0, 0.478983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.190441,-99) , -7, 0.02356, 1, 0, 0.455446,-99) , -2, 11.5, 0, 0, 0.535561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527364,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303058,-99) , -9, -2.44251, 1, 0, 0.392284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0814674,-99) , -14, -2.81152, 1, 0, 0.275354,-99) , -4, 1.77237, 1, 0, 0.505214,-99) ); - // itree = 98 - fBoostWeights.push_back(0.0198324); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.711808,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569767,-99) , -6, 0.669809, 1, 0, 0.654908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452613,-99) , -8, -0.900614, 0, 0, 0.623429,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377429,-99) , -14, -4.46857, 0, 0, 0.476886,-99) , -8, 0.900938, 1, 0, 0.589431,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458797,-99) , -14, -2.69185, 0, 0, 0.570563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356879,-99) , -13, 0.0191652, 1, 0, 0.542613,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342591,-99) , -4, 1.69358, 1, 0, 0.45004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259645,-99) , -13, 0.00804718, 1, 0, 0.413867,-99) , -5, 1.55239, 1, 0, 0.486499,-99) , -16, 471.539, 1, 0, 0.52559,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535082,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498516,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0450939,-99) , -5, 2.24249, 1, 0, 0.1381,-99) , -12, 0.39079, 0, 0, 0.193007,-99) , -14, -4.15247, 1, 0, 0.30408,-99) , -5, 2.06085, 1, 0, 0.497093,-99) ); - // itree = 99 - fBoostWeights.push_back(0.0191279); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652718,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520459,-99) , -13, 0.0202425, 1, 0, 0.630106,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42619,-99) , -6, 0.445486, 1, 0, 0.47874,-99) , -2, 11.5, 0, 0, 0.593788,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595425,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459958,-99) , -12, 0.11373, 1, 0, 0.52676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289776,-99) , -14, -1.97542, 1, 0, 0.491538,-99) , -5, 1.44028, 1, 0, 0.54727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298455,-99) , -12, 0.0227284, 0, 0, 0.536976,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376003,-99) , -16, 790.948, 1, 0, 0.556978,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364194,-99) , -9, -0.936751, 1, 0, 0.428258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200589,-99) , -5, 2.23605, 1, 0, 0.374721,-99) , -11, 1.5, 0, 0, 0.44559,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0429874,-99) , -4, 1.73263, 1, 0, 0.154488,-99) , -13, 0.00304861, 1, 0, 0.367804,-99) , -5, 1.8689, 1, 0, 0.496297,-99) ); - // itree = 100 - fBoostWeights.push_back(0.0181301); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.760842,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642259,-99) , -6, 0.370789, 1, 0, 0.698429,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504858,-99) , -13, 0.00117437, 0, 0, 0.653199,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469121,-99) , -8, -0.844299, 0, 0, 0.579339,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364368,-99) , -15, 0.0582672, 0, 0, 0.482981,-99) , -16, 452.392, 1, 0, 0.519068,-99) , -2, 26.5, 0, 0, 0.545575,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220202,-99) , -5, 1.31259, 1, 0, 0.381051,-99) , -7, 0.0997213, 1, 0, 0.533458,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376426,-99) , -7, 0.0150006, 0, 0, 0.557568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306365,-99) , -5, 2.16551, 1, 0, 0.480452,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280348,-99) , -3, 0.973423, 0, 0, 0.423117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0973455,-99) , -0, 57.5, 1, 0, 0.382697,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.190442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0804575,-99) , -4, 1.8969, 1, 0, 0.119781,-99) , -5, 1.96488, 1, 0, 0.268752,-99) , -14, -3.47533, 1, 0, 0.350469,-99) , -4, 1.57362, 1, 0, 0.493827,-99) ); - // itree = 101 - fBoostWeights.push_back(0.0191759); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468547,-99) , -8, -0.925494, 0, 0, 0.595616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375673,-99) , -14, -4.61716, 0, 0, 0.580497,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232181,-99) , -3, 0.996398, 1, 0, 0.394669,-99) , -7, 0.0996536, 1, 0, 0.564542,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48043,-99) , -10, 2514.31, 1, 0, 0.543067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249584,-99) , -5, 1.85189, 1, 0, 0.437997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259821,-99) , -6, 0.532423, 1, 0, 0.379212,-99) , -12, 0.118693, 1, 0, 0.456888,-99) , -7, 0.0131437, 0, 0, 0.54213,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561594,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477289,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117216,-99) , -5, 2.16631, 1, 0, 0.254237,-99) , -16, 352.171, 1, 0, 0.336813,-99) , -9, -3.18989, 1, 0, 0.407552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0796022,-99) , -14, -2.40037, 1, 0, 0.323834,-99) , -4, 1.63664, 1, 0, 0.503143,-99) ); - // itree = 102 - fBoostWeights.push_back(0.0177732); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.705068,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562521,-99) , -13, 0.00117823, 0, 0, 0.672572,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520661,-99) , -0, 14.5, 0, 0, 0.632394,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640656,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529591,-99) , -8, 0.932324, 1, 0, 0.603778,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344419,-99) , -13, 0.00628121, 1, 0, 0.469057,-99) , -11, 1.5, 0, 0, 0.516334,-99) , -5, 1.44014, 1, 0, 0.568364,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438469,-99) , -2, 13.5, 0, 0, 0.501719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351963,-99) , -8, -0.769856, 0, 0, 0.478374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154197,-99) , -7, 0.156808, 1, 0, 0.460954,-99) , -6, 0.711306, 1, 0, 0.528891,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401046,-99) , -16, 390.18, 1, 0, 0.498293,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.079665,-99) , -13, 0.00397035, 1, 0, 0.176124,-99) , -8, 0.946499, 0, 0, 0.3334,-99) , -5, 1.98508, 1, 0, 0.496615,-99) ); - // itree = 103 - fBoostWeights.push_back(0.0151375); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477256,-99) , -14, -3.6516, 0, 0, 0.574503,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292273,-99) , -15, 0.099248, 0, 0, 0.441979,-99) , -8, -0.902173, 0, 0, 0.559079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158855,-99) , -5, 1.41138, 1, 0, 0.381442,-99) , -7, 0.0996953, 1, 0, 0.54732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250451,-99) , -5, 2.22389, 1, 0, 0.540402,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526826,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381695,-99) , -12, 0.14297, 1, 0, 0.458033,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205828,-99) , -11, 1.5, 0, 0, 0.315629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0253792,-99) , -4, 1.98886, 1, 0, 0.233064,-99) , -8, 0.898296, 0, 0, 0.339312,-99) , -4, 1.69349, 1, 0, 0.509614,-99) ); - // itree = 104 - fBoostWeights.push_back(0.018548); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440166,-99) , -14, -4.37487, 0, 0, 0.627361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469746,-99) , -8, -0.801852, 0, 0, 0.60465,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598533,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421771,-99) , -14, -4.01512, 0, 0, 0.571728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210647,-99) , -4, 1.66864, 1, 0, 0.447341,-99) , -12, 0.113974, 1, 0, 0.50126,-99) , -11, 1.5, 0, 0, 0.534223,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28815,-99) , -12, 0.0236222, 0, 0, 0.521942,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568158,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0330045,-99) , -5, 2.26441, 1, 0, 0.101114,-99) , -14, -3.91485, 1, 0, 0.298633,-99) , -5, 2.08853, 1, 0, 0.496843,-99) ); - // itree = 105 - fBoostWeights.push_back(0.0164415); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43174,-99) , -14, -4.36894, 0, 0, 0.615379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39345,-99) , -7, 0.133596, 1, 0, 0.600483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412142,-99) , -12, 0.0313859, 0, 0, 0.583012,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456126,-99) , -6, 0.477871, 1, 0, 0.52274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366795,-99) , -5, 1.90366, 1, 0, 0.503113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303964,-99) , -7, 0.0234991, 1, 0, 0.483371,-99) , -2, 12.5, 0, 0, 0.547407,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403354,-99) , -16, 134.248, 1, 0, 0.503869,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24068,-99) , -4, 1.776, 1, 0, 0.357527,-99) , -11, 1.5, 0, 0, 0.403855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0888063,-99) , -7, 0.105502, 1, 0, 0.383619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134656,-99) , -4, 2.07381, 1, 0, 0.349213,-99) , -4, 1.53231, 1, 0, 0.50098,-99) ); - // itree = 106 - fBoostWeights.push_back(0.0173628); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444318,-99) , -8, -0.915358, 0, 0, 0.619802,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412296,-99) , -12, 0.0897527, 0, 0, 0.488964,-99) , -8, 0.93901, 1, 0, 0.59435,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393147,-99) , -2, 9.5, 0, 0, 0.532798,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260328,-99) , -13, 0.0060508, 1, 0, 0.414049,-99) , -4, 1.31227, 1, 0, 0.497793,-99) , -16, 1042.88, 1, 0, 0.541777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234544,-99) , -13, 0.0591673, 1, 0, 0.533359,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612033,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450122,-99) , -12, 0.0939697, 1, 0, 0.531951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319804,-99) , -2, 11.5, 0, 0, 0.450036,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0286337,-99) , -4, 1.92618, 1, 0, 0.173508,-99) , -13, 0.000830698, 1, 0, 0.334803,-99) , -5, 1.92921, 1, 0, 0.496111,-99) ); - // itree = 107 - fBoostWeights.push_back(0.0153943); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.730616,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628183,-99) , -3, 0.983521, 1, 0, 0.676266,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596659,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491593,-99) , -13, 0.00927753, 1, 0, 0.577106,-99) , -0, 29.5, 0, 0, 0.611943,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595979,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50216,-99) , -2, 18.5, 0, 0, 0.539488,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388554,-99) , -14, -4.17783, 0, 0, 0.524321,-99) , -16, 2443.56, 1, 0, 0.570209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353136,-99) , -12, 0.0227741, 0, 0, 0.560118,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620762,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523606,-99) , -13, 0.00107439, 1, 0, 0.578148,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397287,-99) , -10, -1141.62, 1, 0, 0.4364,-99) , -16, 69.7789, 1, 0, 0.469841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218122,-99) , -13, 0.0173618, 1, 0, 0.446254,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107636,-99) , -13, 0.000472355, 1, 0, 0.257482,-99) , -4, 1.83319, 1, 0, 0.401272,-99) , -4, 1.29379, 1, 0, 0.499008,-99) ); - // itree = 108 - fBoostWeights.push_back(0.0172027); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693935,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573547,-99) , -6, 0.149822, 1, 0, 0.599276,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297671,-99) , -7, 0.0263038, 1, 0, 0.500592,-99) , -2, 13.5, 0, 0, 0.55544,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317684,-99) , -10, 2494.45, 1, 0, 0.390599,-99) , -14, -4.22198, 0, 0, 0.539355,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0114776,-99) , -1, 24.5, 0, 0, 0.36371,-99) , -7, 0.107797, 1, 0, 0.527843,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367154,-99) , -11, 1.5, 0, 0, 0.465817,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374527,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0227128,-99) , -4, 1.96531, 1, 0, 0.0747481,-99) , -4, 1.49896, 1, 0, 0.173892,-99) , -8, 0.909885, 0, 0, 0.329946,-99) , -5, 1.98133, 1, 0, 0.496059,-99) ); - // itree = 109 - fBoostWeights.push_back(0.0174708); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.705973,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576747,-99) , -1, 15.5, 0, 0, 0.648226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440835,-99) , -14, -4.03771, 0, 0, 0.626571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433207,-99) , -5, 0.459309, 0, 0, 0.59903,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489416,-99) , -13, 0.0167301, 1, 0, 0.597731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271917,-99) , -7, 0.0337499, 1, 0, 0.489893,-99) , -2, 20.5, 0, 0, 0.517958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237449,-99) , -7, 0.119436, 1, 0, 0.505953,-99) , -4, 0.769586, 1, 0, 0.53823,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409249,-99) , -16, 527.004, 1, 0, 0.482602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.010112,-99) , -6, 0.480851, 1, 0, 0.156555,-99) , -8, 0.946439, 0, 0, 0.317641,-99) , -5, 1.98498, 1, 0, 0.503382,-99) ); - // itree = 110 - fBoostWeights.push_back(0.0153964); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353267,-99) , -14, -4.97388, 0, 0, 0.56653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235476,-99) , -7, 0.0890556, 1, 0, 0.370777,-99) , -13, 0.0252094, 1, 0, 0.552224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295822,-99) , -12, 0.0222372, 0, 0, 0.541111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323087,-99) , -5, 2.05525, 1, 0, 0.529784,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577472,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364007,-99) , -1, 14.5, 0, 0, 0.435658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180309,-99) , -7, 0.0124203, 0, 0, 0.364283,-99) , -9, -3.23215, 1, 0, 0.434464,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0953487,-99) , -15, 0.0591385, 1, 0, 0.164852,-99) , -13, 0.0021407, 1, 0, 0.340871,-99) , -4, 1.6645, 1, 0, 0.498092,-99) ); - // itree = 111 - fBoostWeights.push_back(0.013655); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391826,-99) , -14, -4.99106, 0, 0, 0.567201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275116,-99) , -5, 2.23562, 1, 0, 0.561731,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365998,-99) , -3, 0.999378, 1, 0, 0.550572,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294447,-99) , -9, 0.655043, 0, 0, 0.381073,-99) , -7, 0.00941114, 0, 0, 0.536841,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533033,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283036,-99) , -7, 0.0151611, 0, 0, 0.443117,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258073,-99) , -0, 11.5, 1, 0, 0.320777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0581204,-99) , -7, 0.0888295, 1, 0, 0.280577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0367632,-99) , -5, 2.22326, 1, 0, 0.231698,-99) , -14, -3.25692, 1, 0, 0.331608,-99) , -4, 1.66909, 1, 0, 0.503224,-99) ); - // itree = 112 - fBoostWeights.push_back(0.0185634); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697365,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600336,-99) , -2, 26.5, 0, 0, 0.628152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482028,-99) , -8, 0.983158, 1, 0, 0.609987,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369937,-99) , -3, 0.989785, 1, 0, 0.434839,-99) , -12, 0.0312411, 0, 0, 0.578632,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485443,-99) , -16, 2723.31, 1, 0, 0.542373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324244,-99) , -7, 0.0910291, 1, 0, 0.522903,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265677,-99) , -6, 0.271209, 0, 0, 0.37492,-99) , -2, 9.5, 0, 0, 0.497607,-99) , -12, 0.128764, 1, 0, 0.54035,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291852,-99) , -7, 0.0135637, 0, 0, 0.521769,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310215,-99) , -11, 1.5, 0, 0, 0.40967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.016953,-99) , -4, 1.96796, 1, 0, 0.336134,-99) , -8, 0.946397, 0, 0, 0.407558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0600783,-99) , -7, 0.0661625, 1, 0, 0.368487,-99) , -4, 1.57866, 1, 0, 0.504046,-99) ); - // itree = 113 - fBoostWeights.push_back(0.0190903); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647801,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50021,-99) , -5, 0.641559, 0, 0, 0.626501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421359,-99) , -8, 0.981987, 1, 0, 0.604414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451363,-99) , -8, -0.896424, 0, 0, 0.582889,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481788,-99) , -2, 11.5, 0, 0, 0.558942,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324443,-99) , -12, 0.27408, 0, 0, 0.404474,-99) , -15, 0.0875556, 0, 0, 0.518034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324766,-99) , -13, 0.0162256, 1, 0, 0.496988,-99) , -4, 1.0143, 1, 0, 0.543343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452895,-99) , -9, -1.87333, 1, 0, 0.511775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335675,-99) , -2, 11.5, 0, 0, 0.44448,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250588,-99) , -1, 12.5, 0, 0, 0.436093,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482603,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0326517,-99) , -1, 16.5, 0, 0, 0.10472,-99) , -16, 10.6621, 1, 0, 0.163607,-99) , -4, 1.55309, 1, 0, 0.285009,-99) , -14, -3.25001, 1, 0, 0.362374,-99) , -5, 1.82087, 1, 0, 0.49521,-99) ); - // itree = 114 - fBoostWeights.push_back(0.015976); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68934,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5689,-99) , -16, 5e+09, 1, 0, 0.633611,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381489,-99) , -2, 9.5, 0, 0, 0.514894,-99) , -6, 0.398492, 1, 0, 0.562322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365717,-99) , -14, -4.11747, 0, 0, 0.546601,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329339,-99) , -12, 0.0287451, 0, 0, 0.483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269976,-99) , -7, 0.00763958, 0, 0, 0.470296,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130156,-99) , -15, 0.218817, 1, 0, 0.304887,-99) , -14, -2.06928, 1, 0, 0.443916,-99) , -5, 1.65143, 1, 0, 0.510495,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453155,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0159765,-99) , -12, 0.149436, 1, 0, 0.12495,-99) , -14, -4.23912, 1, 0, 0.208338,-99) , -4, 1.84914, 1, 0, 0.486455,-99) ); - // itree = 115 - fBoostWeights.push_back(0.0153155); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494684,-99) , -8, 0.947027, 1, 0, 0.587425,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416095,-99) , -12, 0.0312085, 0, 0, 0.569194,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599734,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502956,-99) , -11, 1.5, 0, 0, 0.553818,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212984,-99) , -5, 2.12682, 1, 0, 0.433477,-99) , -16, 206.275, 1, 0, 0.468681,-99) , -2, 13.5, 0, 0, 0.523859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303237,-99) , -13, 0.0335201, 1, 0, 0.512574,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1795,-99) , -7, 0.0135769, 0, 0, 0.398287,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0672758,-99) , -16, 60.6075, 1, 0, 0.124102,-99) , -14, -3.32465, 1, 0, 0.252068,-99) , -4, 1.77352, 1, 0, 0.484119,-99) ); - // itree = 116 - fBoostWeights.push_back(0.015469); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613969,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386598,-99) , -14, -4.70047, 0, 0, 0.594319,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44189,-99) , -4, 0.996379, 1, 0, 0.503083,-99) , -12, 0.126969, 1, 0, 0.551206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284334,-99) , -12, 0.0197206, 0, 0, 0.541516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298434,-99) , -13, 0.0405199, 1, 0, 0.531318,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451073,-99) , -4, 1.79711, 1, 0, 0.532371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372717,-99) , -5, 2.35607, 1, 0, 0.498313,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201677,-99) , -12, 0.0963566, 1, 0, 0.307378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0333309,-99) , -5, 2.2278, 1, 0, 0.216307,-99) , -8, 0.946429, 0, 0, 0.348404,-99) , -5, 1.99354, 1, 0, 0.502784,-99) ); - // itree = 117 - fBoostWeights.push_back(0.0139219); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696594,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583361,-99) , -0, 16.5, 0, 0, 0.663567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613941,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512617,-99) , -11, 1.5, 0, 0, 0.564574,-99) , -4, 0.963236, 1, 0, 0.615764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4512,-99) , -8, 0.982659, 1, 0, 0.596192,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494443,-99) , -2, 27.5, 0, 0, 0.517281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292328,-99) , -7, 0.0989954, 1, 0, 0.504903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16921,-99) , -5, 2.18196, 1, 0, 0.496815,-99) , -16, 489.002, 1, 0, 0.534865,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397206,-99) , -8, 0.982771, 0, 0, 0.450615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164256,-99) , -3, 0.892951, 0, 0, 0.42451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0662242,-99) , -3, 0.999232, 1, 0, 0.403596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0977059,-99) , -13, 0.00975845, 1, 0, 0.357482,-99) , -4, 1.64383, 1, 0, 0.503982,-99) ); - // itree = 118 - fBoostWeights.push_back(0.0164642); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446563,-99) , -12, 0.0310822, 0, 0, 0.640664,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455792,-99) , -11, 1.5, 0, 0, 0.503351,-99) , -12, 0.123408, 1, 0, 0.565583,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411153,-99) , -7, 0.0171295, 0, 0, 0.466646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3219,-99) , -15, 1.05816, 1, 0, 0.448931,-99) , -14, -3.54045, 0, 0, 0.537453,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501777,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218442,-99) , -13, 0.0138407, 1, 0, 0.329796,-99) , -16, 309.2, 1, 0, 0.392368,-99) , -8, -0.894523, 0, 0, 0.520051,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488137,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0391746,-99) , -14, -2.6219, 1, 0, 0.113736,-99) , -13, 0.000280906, 1, 0, 0.28322,-99) , -4, 1.82193, 1, 0, 0.498087,-99) ); - // itree = 119 - fBoostWeights.push_back(0.0175939); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654691,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552895,-99) , -2, 16.5, 0, 0, 0.603689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392508,-99) , -5, 0.505772, 0, 0, 0.584766,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37123,-99) , -14, -4.23652, 0, 0, 0.567788,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491849,-99) , -2, 19.5, 0, 0, 0.51595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319285,-99) , -3, 0.886912, 0, 0, 0.49794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263445,-99) , -7, 0.0769993, 1, 0, 0.47717,-99) , -4, 1.13353, 1, 0, 0.530834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578913,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302169,-99) , -5, 2.10321, 1, 0, 0.395456,-99) , -9, -3.05457, 1, 0, 0.445439,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335083,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274215,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0436747,-99) , -4, 1.265, 1, 0, 0.0963384,-99) , -11, 1.5, 0, 0, 0.1771,-99) , -14, -3.29056, 1, 0, 0.317519,-99) , -5, 1.93008, 1, 0, 0.491847,-99) ); - // itree = 120 - fBoostWeights.push_back(0.0125149); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436411,-99) , -14, -4.36716, 0, 0, 0.557738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303986,-99) , -5, 2.23291, 1, 0, 0.550817,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540503,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395834,-99) , -2, 26.5, 0, 0, 0.4751,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161318,-99) , -4, 1.28014, 1, 0, 0.397111,-99) , -13, 0.0188521, 1, 0, 0.533715,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264549,-99) , -16, 1066.19, 1, 0, 0.337943,-99) , -7, 0.00910354, 0, 0, 0.519902,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101684,-99) , -14, -3.32041, 1, 0, 0.252803,-99) , -4, 1.90974, 1, 0, 0.502262,-99) ); - // itree = 121 - fBoostWeights.push_back(0.0157846); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646133,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541418,-99) , -2, 11.5, 0, 0, 0.617654,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437872,-99) , -3, 0.981142, 1, 0, 0.501919,-99) , -14, -3.79983, 0, 0, 0.596482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431468,-99) , -8, -0.924901, 0, 0, 0.580584,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439197,-99) , -15, 0.822559, 1, 0, 0.535978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423003,-99) , -7, 0.0106964, 0, 0, 0.519322,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279228,-99) , -3, 0.992378, 1, 0, 0.398946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203462,-99) , -5, 2.18774, 1, 0, 0.373245,-99) , -5, 1.76074, 1, 0, 0.493107,-99) , -16, 1292.3, 1, 0, 0.534724,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102549,-99) , -13, 0.00833957, 1, 0, 0.344878,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0932334,-99) , -12, 0.0740975, 1, 0, 0.135824,-99) , -4, 1.83113, 1, 0, 0.240522,-99) , -14, -4.20791, 1, 0, 0.343241,-99) , -4, 1.63857, 1, 0, 0.501627,-99) ); - // itree = 122 - fBoostWeights.push_back(0.0140503); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704298,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555065,-99) , -13, 0.00111487, 0, 0, 0.651639,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46531,-99) , -4, 0.39941, 0, 0, 0.537879,-99) , -1, 14.5, 0, 0, 0.601902,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472792,-99) , -13, 0.0123293, 1, 0, 0.575236,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453618,-99) , -14, -3.83844, 0, 0, 0.560397,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47721,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333608,-99) , -8, -0.827154, 0, 0, 0.458706,-99) , -16, 232.817, 1, 0, 0.490141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220991,-99) , -7, 0.117609, 1, 0, 0.477845,-99) , -4, 0.879825, 1, 0, 0.515776,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374489,-99) , -8, 0.995326, 0, 0, 0.486166,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0509425,-99) , -5, 2.20653, 1, 0, 0.154033,-99) , -8, 0.950408, 0, 0, 0.316991,-99) , -5, 2.06808, 1, 0, 0.492964,-99) ); - // itree = 123 - fBoostWeights.push_back(0.0135396); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6983,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545935,-99) , -3, 0.996609, 1, 0, 0.653678,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632574,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523894,-99) , -7, 0.0208045, 0, 0, 0.559247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439374,-99) , -7, 0.0341851, 1, 0, 0.542519,-99) , -2, 25.5, 0, 0, 0.577913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359284,-99) , -12, 0.0311044, 0, 0, 0.560092,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648734,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546093,-99) , -0, 17.5, 0, 0, 0.595181,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236847,-99) , -5, 2.00492, 1, 0, 0.47594,-99) , -16, 950.849, 1, 0, 0.560105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289378,-99) , -5, 2.47021, 1, 0, 0.546069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361923,-99) , -3, 0.971401, 0, 0, 0.444071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.091386,-99) , -13, 0.0394779, 1, 0, 0.430396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208622,-99) , -4, 1.87398, 1, 0, 0.400432,-99) , -11, 1.5, 0, 0, 0.448806,-99) , -4, 1.0454, 1, 0, 0.499568,-99) ); - // itree = 124 - fBoostWeights.push_back(0.0151088); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669661,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513656,-99) , -13, 0.000774387, 0, 0, 0.638882,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405548,-99) , -8, 0.864954, 0, 0, 0.502648,-99) , -5, 1.63665, 1, 0, 0.603776,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452529,-99) , -7, 0.013592, 0, 0, 0.506692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226771,-99) , -7, 0.0331112, 1, 0, 0.49005,-99) , -2, 17.5, 0, 0, 0.534084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297349,-99) , -7, 0.138535, 1, 0, 0.525061,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0957862,-99) , -13, 0.000477953, 1, 0, 0.27825,-99) , -4, 1.82018, 1, 0, 0.502827,-99) ); - // itree = 125 - fBoostWeights.push_back(0.014507); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444597,-99) , -13, 0.0188935, 1, 0, 0.562307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40229,-99) , -12, 0.028597, 0, 0, 0.550118,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273763,-99) , -15, 0.0467625, 0, 0, 0.380309,-99) , -7, 0.0094035, 0, 0, 0.537048,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25696,-99) , -7, 0.172661, 1, 0, 0.529824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605409,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454751,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2648,-99) , -5, 2.40674, 1, 0, 0.431258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.119783,-99) , -7, 0.0395947, 1, 0, 0.403736,-99) , -1, 23.5, 0, 0, 0.450438,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0430486,-99) , -4, 1.87159, 1, 0, 0.171342,-99) , -8, 0.736085, 0, 0, 0.349819,-99) , -5, 1.89419, 1, 0, 0.492133,-99) ); - // itree = 126 - fBoostWeights.push_back(0.0139887); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667378,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631246,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551449,-99) , -11, 1.5, 0, 0, 0.591421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482249,-99) , -6, 0.152798, 0, 0, 0.576847,-99) , -4, 0.421574, 1, 0, 0.596358,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326126,-99) , -12, 0.0298482, 0, 0, 0.523876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283695,-99) , -0, 92.5, 1, 0, 0.512883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327817,-99) , -7, 0.00930642, 0, 0, 0.496568,-99) , -16, 474.304, 1, 0, 0.534908,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160952,-99) , -4, 1.89949, 1, 0, 0.296603,-99) , -16, 286.211, 1, 0, 0.382007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128602,-99) , -13, 0.00342871, 1, 0, 0.309532,-99) , -4, 1.66881, 1, 0, 0.500865,-99) ); - // itree = 127 - fBoostWeights.push_back(0.0157063); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632462,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512842,-99) , -8, 0.897127, 1, 0, 0.602803,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397898,-99) , -3, 0.993406, 1, 0, 0.475513,-99) , -13, 0.0137931, 1, 0, 0.579062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391964,-99) , -12, 0.0258567, 0, 0, 0.567667,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471361,-99) , -16, 1084.38, 1, 0, 0.514333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354619,-99) , -3, 0.909103, 0, 0, 0.494348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102938,-99) , -7, 0.114794, 1, 0, 0.477951,-99) , -4, 1.24526, 1, 0, 0.53803,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652169,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264425,-99) , -7, 0.011647, 0, 0, 0.443411,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18385,-99) , -5, 2.33287, 1, 0, 0.401373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128163,-99) , -14, -2.51393, 1, 0, 0.332131,-99) , -12, 0.437594, 0, 0, 0.36646,-99) , -5, 1.9082, 1, 0, 0.503512,-99) ); - // itree = 128 - fBoostWeights.push_back(0.0131241); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602533,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522421,-99) , -16, 471.542, 1, 0, 0.552748,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33253,-99) , -12, 0.129568, 1, 0, 0.432392,-99) , -8, -0.895154, 0, 0, 0.537871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2851,-99) , -14, -5.52083, 0, 0, 0.531098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179299,-99) , -5, 2.23285, 1, 0, 0.524513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210217,-99) , -9, -0.0814008, 0, 0, 0.387866,-99) , -9, -3.15285, 1, 0, 0.448111,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209765,-99) , -10, 891.521, 1, 0, 0.288896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0509321,-99) , -4, 1.94694, 1, 0, 0.210777,-99) , -13, 0.000689269, 1, 0, 0.332537,-99) , -4, 1.66454, 1, 0, 0.493566,-99) ); - // itree = 129 - fBoostWeights.push_back(0.0146623); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464881,-99) , -8, -0.932694, 0, 0, 0.571079,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343849,-99) , -7, 0.135187, 1, 0, 0.560828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370168,-99) , -12, 0.0286182, 0, 0, 0.547259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327928,-99) , -7, 0.00888538, 0, 0, 0.536433,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450612,-99) , -8, 0.979024, 1, 0, 0.570907,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361004,-99) , -10, 390.169, 1, 0, 0.425485,-99) , -16, 1133.11, 1, 0, 0.497492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338657,-99) , -5, 2.2428, 1, 0, 0.467927,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192201,-99) , -4, 1.56693, 1, 0, 0.325243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0328437,-99) , -5, 2.05554, 1, 0, 0.230593,-99) , -13, 0.00338348, 1, 0, 0.405584,-99) , -5, 1.7564, 1, 0, 0.494708,-99) ); - // itree = 130 - fBoostWeights.push_back(0.0169777); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681528,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565848,-99) , -2, 17.5, 0, 0, 0.622146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497715,-99) , -3, 0.998125, 1, 0, 0.60027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372472,-99) , -12, 0.0312534, 0, 0, 0.582509,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622402,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536856,-99) , -11, 1.5, 0, 0, 0.583503,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308813,-99) , -3, 0.89242, 0, 0, 0.473355,-99) , -16, 150.786, 1, 0, 0.503228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273681,-99) , -7, 0.0799865, 1, 0, 0.483745,-99) , -4, 0.997943, 1, 0, 0.533509,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597111,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335038,-99) , -16, 722.062, 1, 0, 0.45575,-99) , -11, 0.5, 1, 0, 0.504809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322888,-99) , -12, 0.036912, 0, 0, 0.476258,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229456,-99) , -12, 0.0874864, 1, 0, 0.350329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0636605,-99) , -5, 2.13002, 1, 0, 0.237015,-99) , -14, -3.29032, 1, 0, 0.363934,-99) , -5, 1.90787, 1, 0, 0.499529,-99) ); - // itree = 131 - fBoostWeights.push_back(0.0189489); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648853,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514826,-99) , -8, -0.880572, 0, 0, 0.621163,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355354,-99) , -15, 0.517758, 1, 0, 0.485324,-99) , -14, -2.91933, 0, 0, 0.581166,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337753,-99) , -13, 6.47795e-05, 0, 0, 0.549142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378821,-99) , -11, 1.5, 0, 0, 0.420887,-99) , -12, 0.125377, 1, 0, 0.488196,-99) , -4, 1.07235, 1, 0, 0.538391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227278,-99) , -3, 0.999634, 1, 0, 0.529813,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634125,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200682,-99) , -15, 0.630496, 1, 0, 0.438823,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.019119,-99) , -8, 0.659095, 0, 0, 0.149784,-99) , -12, 0.111363, 1, 0, 0.279624,-99) , -12, 0.418008, 0, 0, 0.324603,-99) , -5, 1.98511, 1, 0, 0.498918,-99) ); - // itree = 132 - fBoostWeights.push_back(0.0133253); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646734,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546133,-99) , -6, 0.70272, 1, 0, 0.611538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4965,-99) , -8, 0.988099, 1, 0, 0.599527,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457527,-99) , -13, 0.00188452, 0, 0, 0.540747,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322485,-99) , -13, 0.00445736, 1, 0, 0.44245,-99) , -5, 1.57279, 1, 0, 0.499684,-99) , -16, 237.681, 1, 0, 0.531797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173747,-99) , -7, 0.230256, 1, 0, 0.525382,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321303,-99) , -11, 1.5, 0, 0, 0.414845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0826445,-99) , -8, 0.76785, 0, 0, 0.301924,-99) , -5, 2.09046, 1, 0, 0.502502,-99) ); - // itree = 133 - fBoostWeights.push_back(0.0168646); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677572,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583774,-99) , -2, 11.5, 0, 0, 0.653316,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512949,-99) , -8, -0.875849, 0, 0, 0.629245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477846,-99) , -14, -3.59777, 0, 0, 0.59709,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422373,-99) , -15, 1.67878, 1, 0, 0.562667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305214,-99) , -14, -4.60313, 0, 0, 0.540646,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317887,-99) , -7, 0.0133061, 0, 0, 0.449571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189834,-99) , -7, 0.0842329, 1, 0, 0.429047,-99) , -12, 0.136085, 1, 0, 0.489652,-99) , -11, 1.5, 0, 0, 0.525521,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429822,-99) , -12, 0.113207, 1, 0, 0.521573,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156526,-99) , -9, 3.41704, 1, 0, 0.357377,-99) , -2, 15.5, 0, 0, 0.422384,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.077113,-99) , -7, 0.107159, 1, 0, 0.398741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102846,-99) , -8, -0.142523, 0, 0, 0.34119,-99) , -4, 1.63907, 1, 0, 0.493658,-99) ); - // itree = 134 - fBoostWeights.push_back(0.0159086); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672584,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592166,-99) , -8, -0.299824, 0, 0, 0.645285,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.67208,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517108,-99) , -9, 4.24451, 0, 0, 0.544891,-99) , -16, 491.766, 1, 0, 0.585134,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263837,-99) , -12, 0.0983299, 0, 0, 0.384911,-99) , -8, 0.983338, 1, 0, 0.561509,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626066,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530607,-99) , -6, 0.981178, 1, 0, 0.574454,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266603,-99) , -3, 0.907147, 0, 0, 0.438836,-99) , -2, 23.5, 0, 0, 0.478271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250399,-99) , -7, 0.144208, 1, 0, 0.465147,-99) , -6, 0.619087, 1, 0, 0.521135,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636335,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541297,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358098,-99) , -12, 0.143905, 1, 0, 0.4544,-99) , -9, 2.82211, 0, 0, 0.506874,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0991603,-99) , -5, 2.06805, 1, 0, 0.174324,-99) , -8, 0.917924, 0, 0, 0.357383,-99) , -5, 1.9814, 1, 0, 0.49513,-99) ); - // itree = 135 - fBoostWeights.push_back(0.0167302); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.714536,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646783,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544297,-99) , -13, 0.00846343, 1, 0, 0.615174,-99) , -9, 3.60814, 0, 0, 0.638364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410416,-99) , -9, 0.260803, 0, 0, 0.49504,-99) , -8, 0.937853, 1, 0, 0.606438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41221,-99) , -8, 0.902717, 1, 0, 0.538882,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328282,-99) , -13, 0.00489623, 1, 0, 0.441818,-99) , -5, 1.65086, 1, 0, 0.502892,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0344325,-99) , -1, 20.5, 0, 0, 0.304314,-99) , -7, 0.0845891, 1, 0, 0.485714,-99) , -11, 1.5, 0, 0, 0.525972,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.091047,-99) , -14, -3.92259, 1, 0, 0.238109,-99) , -5, 2.13169, 1, 0, 0.502946,-99) ); - // itree = 136 - fBoostWeights.push_back(0.0149265); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687769,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573609,-99) , -4, 0.361946, 1, 0, 0.609647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424374,-99) , -13, 7.50012e-05, 0, 0, 0.591111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407611,-99) , -5, 0.461375, 0, 0, 0.57384,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620698,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525647,-99) , -7, 0.0252062, 1, 0, 0.588111,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321122,-99) , -12, 0.0339459, 0, 0, 0.462571,-99) , -16, 76.5589, 1, 0, 0.491701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154796,-99) , -7, 0.133596, 1, 0, 0.479563,-99) , -4, 1.01358, 1, 0, 0.526215,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559435,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268824,-99) , -16, 2324.84, 1, 0, 0.401787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130249,-99) , -13, 0.00394515, 1, 0, 0.321471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.058068,-99) , -5, 2.30864, 1, 0, 0.254801,-99) , -14, -4.18864, 1, 0, 0.355032,-99) , -5, 2.0134, 1, 0, 0.501471,-99) ); - // itree = 137 - fBoostWeights.push_back(0.0149004); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661701,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56552,-99) , -7, 0.0588452, 1, 0, 0.634359,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574666,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503392,-99) , -6, 0.544683, 1, 0, 0.543807,-99) , -0, 14.5, 0, 0, 0.605405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42918,-99) , -14, -4.37953, 0, 0, 0.587378,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31908,-99) , -14, -4.67678, 0, 0, 0.523557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353298,-99) , -13, 0.0235301, 1, 0, 0.50879,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0432421,-99) , -13, 0.00823035, 1, 0, 0.290132,-99) , -4, 1.69328, 1, 0, 0.490329,-99) , -11, 1.5, 0, 0, 0.521866,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0331988,-99) , -5, 2.38848, 1, 0, 0.328387,-99) , -8, 0.996005, 0, 0, 0.410483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0790012,-99) , -8, 0.688155, 0, 0, 0.308291,-99) , -5, 2.06804, 1, 0, 0.497442,-99) ); - // itree = 138 - fBoostWeights.push_back(0.0135497); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692116,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514882,-99) , -13, 0.000812304, 0, 0, 0.652303,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516121,-99) , -5, 0.57074, 0, 0, 0.625858,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436341,-99) , -8, -0.478777, 0, 0, 0.538756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406606,-99) , -8, 0.863942, 1, 0, 0.508013,-99) , -1, 13.5, 0, 0, 0.586344,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408531,-99) , -14, -3.98888, 0, 0, 0.515444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274164,-99) , -6, 0.107617, 0, 0, 0.50788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309329,-99) , -7, 0.0890621, 1, 0, 0.495827,-99) , -4, 0.842281, 1, 0, 0.532301,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471074,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326509,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0940535,-99) , -13, 0.00122437, 1, 0, 0.224088,-99) , -11, 1.5, 0, 0, 0.312932,-99) , -4, 1.69961, 1, 0, 0.503303,-99) ); - // itree = 139 - fBoostWeights.push_back(0.0127109); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643601,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505196,-99) , -7, 0.0911859, 1, 0, 0.622834,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45616,-99) , -8, 0.462397, 1, 0, 0.511677,-99) , -2, 11.5, 0, 0, 0.595761,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634047,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502879,-99) , -2, 26.5, 0, 0, 0.518632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330519,-99) , -7, 0.0795652, 1, 0, 0.504815,-99) , -4, 0.91767, 1, 0, 0.542041,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194936,-99) , -4, 1.33106, 1, 0, 0.35427,-99) , -8, -0.949338, 0, 0, 0.52716,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186057,-99) , -5, 2.33343, 1, 0, 0.448099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114929,-99) , -8, 0.891008, 0, 0, 0.298521,-99) , -4, 1.82183, 1, 0, 0.506222,-99) ); - // itree = 140 - fBoostWeights.push_back(0.0166432); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686031,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588993,-99) , -7, 0.0412543, 1, 0, 0.650769,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472406,-99) , -16, 462.852, 1, 0, 0.530982,-99) , -0, 14.5, 0, 0, 0.610986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364135,-99) , -14, -4.4426, 0, 0, 0.58993,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393381,-99) , -14, -3.87262, 0, 0, 0.520523,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211192,-99) , -15, 0.0468697, 0, 0, 0.355375,-99) , -7, 0.00922634, 0, 0, 0.503123,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0393457,-99) , -4, 1.34122, 1, 0, 0.337303,-99) , -13, 0.0166741, 1, 0, 0.48152,-99) , -11, 1.5, 0, 0, 0.516636,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371176,-99) , -4, 2.06315, 1, 0, 0.510991,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0617869,-99) , -5, 2.19664, 1, 0, 0.130854,-99) , -8, 0.95111, 0, 0, 0.329834,-99) , -5, 2.06782, 1, 0, 0.495477,-99) ); - // itree = 141 - fBoostWeights.push_back(0.0143548); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636905,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556932,-99) , -1, 15.5, 0, 0, 0.59243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359642,-99) , -8, 0.991936, 1, 0, 0.573531,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277988,-99) , -7, 0.00887948, 0, 0, 0.484336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231371,-99) , -0, 91.5, 1, 0, 0.471914,-99) , -12, 0.125982, 1, 0, 0.522698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300579,-99) , -12, 0.0227069, 0, 0, 0.512919,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603117,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26102,-99) , -5, 2.23309, 1, 0, 0.392026,-99) , -9, -3.35111, 1, 0, 0.451875,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0566826,-99) , -4, 1.54332, 1, 0, 0.189752,-99) , -8, 0.820166, 0, 0, 0.349477,-99) , -5, 1.97653, 1, 0, 0.487226,-99) ); - // itree = 142 - fBoostWeights.push_back(0.0154962); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632789,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505901,-99) , -13, 0.00901021, 1, 0, 0.616268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428818,-99) , -8, 0.988572, 1, 0, 0.599354,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402088,-99) , -8, -0.78296, 0, 0, 0.539634,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20581,-99) , -7, 0.0768742, 1, 0, 0.44756,-99) , -5, 1.46899, 1, 0, 0.495567,-99) , -12, 0.113503, 1, 0, 0.543343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343536,-99) , -12, 0.0227243, 0, 0, 0.534566,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438191,-99) , -16, 625.252, 1, 0, 0.539792,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335369,-99) , -8, 0.994446, 0, 0, 0.394689,-99) , -11, 1.5, 0, 0, 0.45092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114687,-99) , -6, 0.954649, 1, 0, 0.430555,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0540955,-99) , -11, 1.5, 0, 0, 0.15407,-99) , -13, 0.00306936, 1, 0, 0.361797,-99) , -5, 1.89495, 1, 0, 0.498495,-99) ); - // itree = 143 - fBoostWeights.push_back(0.0197341); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709133,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612444,-99) , -6, 0.169962, 1, 0, 0.636508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419868,-99) , -14, -4.36238, 0, 0, 0.612681,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258696,-99) , -13, 0.00037852, 0, 0, 0.398275,-99) , -12, 0.0312599, 0, 0, 0.57289,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473352,-99) , -7, 0.0600443, 1, 0, 0.58933,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421589,-99) , -11, 1.5, 0, 0, 0.466008,-99) , -2, 15.5, 0, 0, 0.527992,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584122,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0556539,-99) , -13, 0.0186096, 1, 0, 0.355624,-99) , -12, 0.386671, 0, 0, 0.395222,-99) , -4, 1.26806, 1, 0, 0.484638,-99) , -12, 0.113932, 1, 0, 0.525548,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269245,-99) , -15, 0.0893292, 0, 0, 0.488768,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174947,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0487017,-99) , -4, 1.87131, 1, 0, 0.0926467,-99) , -13, 0.000483759, 1, 0, 0.304889,-99) , -4, 1.76363, 1, 0, 0.501316,-99) ); - // itree = 144 - fBoostWeights.push_back(0.0132276); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444387,-99) , -13, 0.0164039, 1, 0, 0.555448,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328971,-99) , -12, 0.0216527, 0, 0, 0.546488,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303818,-99) , -6, 0.466324, 1, 0, 0.410917,-99) , -7, 0.0100097, 0, 0, 0.533708,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360663,-99) , -4, 1.45074, 0, 0, 0.44405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16389,-99) , -8, 0.424263, 0, 0, 0.373281,-99) , -5, 1.9829, 1, 0, 0.520432,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468203,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416463,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0740102,-99) , -12, 0.0674815, 1, 0, 0.124549,-99) , -16, 138.749, 1, 0, 0.205007,-99) , -14, -3.69527, 1, 0, 0.302031,-99) , -4, 1.74785, 1, 0, 0.496104,-99) ); - // itree = 145 - fBoostWeights.push_back(0.0165001); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475279,-99) , -13, 0.0177522, 1, 0, 0.606793,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298558,-99) , -8, -0.727581, 0, 0, 0.4924,-99) , -15, 0.0939955, 0, 0, 0.577029,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535753,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303648,-99) , -14, -4.81793, 0, 0, 0.418142,-99) , -3, 0.970041, 1, 0, 0.46001,-99) , -13, 0.000511448, 0, 0, 0.550891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366989,-99) , -7, 0.109439, 1, 0, 0.539975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595572,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340278,-99) , -4, 1.81563, 1, 0, 0.449653,-99) , -12, 0.111202, 1, 0, 0.509645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276034,-99) , -12, 0.0320097, 0, 0, 0.477837,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.037771,-99) , -16, 103.687, 1, 0, 0.143535,-99) , -4, 1.54371, 1, 0, 0.253814,-99) , -13, 0.000829106, 1, 0, 0.386412,-99) , -5, 1.83703, 1, 0, 0.50119,-99) ); - // itree = 146 - fBoostWeights.push_back(0.0159576); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.698323,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60456,-99) , -13, 0.0111677, 1, 0, 0.672533,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578847,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483866,-99) , -16, 504.821, 1, 0, 0.539737,-99) , -0, 15.5, 0, 0, 0.625558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397622,-99) , -13, 6.03918e-05, 0, 0, 0.60363,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393015,-99) , -7, 0.00922837, 0, 0, 0.533853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210895,-99) , -13, 0.00244501, 1, 0, 0.389211,-99) , -4, 1.54895, 1, 0, 0.513927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250631,-99) , -7, 0.135521, 1, 0, 0.503113,-99) , -11, 1.5, 0, 0, 0.535133,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317981,-99) , -2, 11.5, 0, 0, 0.469528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392194,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0690278,-99) , -4, 1.3187, 1, 0, 0.132101,-99) , -12, 0.0757197, 1, 0, 0.212378,-99) , -8, 0.946505, 0, 0, 0.334963,-99) , -5, 1.97952, 1, 0, 0.505084,-99) ); - // itree = 147 - fBoostWeights.push_back(0.0135061); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659461,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554877,-99) , -7, 0.0358182, 1, 0, 0.6303,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54295,-99) , -6, 0.916086, 1, 0, 0.612557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314333,-99) , -14, -4.52697, 0, 0, 0.589506,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34543,-99) , -12, 0.0298482, 0, 0, 0.507927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264223,-99) , -13, 0.0564834, 1, 0, 0.49972,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323547,-99) , -12, 0.117424, 1, 0, 0.400624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169456,-99) , -8, -0.119453, 0, 0, 0.345787,-99) , -5, 1.86431, 1, 0, 0.481289,-99) , -11, 1.5, 0, 0, 0.517206,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332207,-99) , -2, 11.5, 0, 0, 0.465283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137409,-99) , -8, 0.909094, 0, 0, 0.325998,-99) , -5, 2.06081, 1, 0, 0.495635,-99) ); - // itree = 148 - fBoostWeights.push_back(0.0124783); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646147,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52646,-99) , -14, -2.91951, 0, 0, 0.595924,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284672,-99) , -7, 0.118801, 1, 0, 0.496435,-99) , -11, 1.5, 0, 0, 0.529108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280504,-99) , -3, 0.999547, 1, 0, 0.519538,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235966,-99) , -4, 1.04299, 1, 0, 0.348696,-99) , -8, -0.946931, 0, 0, 0.505148,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25967,-99) , -3, 0.993835, 1, 0, 0.449348,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118811,-99) , -12, 0.343219, 0, 0, 0.182728,-99) , -8, 0.946607, 0, 0, 0.317523,-99) , -5, 2.08854, 1, 0, 0.485468,-99) ); - // itree = 149 - fBoostWeights.push_back(0.0107588); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601945,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521838,-99) , -4, 0.86071, 1, 0, 0.552143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377429,-99) , -14, -4.98623, 0, 0, 0.54141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300047,-99) , -7, 0.00750416, 0, 0, 0.534217,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331108,-99) , -9, -3.34844, 1, 0, 0.473758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15551,-99) , -13, 0.00122627, 1, 0, 0.37544,-99) , -4, 1.82192, 1, 0, 0.518826,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327381,-99) , -1, 13.5, 0, 0, 0.400141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 1.97501, 1, 0, 0.363621,-99) , -8, -0.901933, 0, 0, 0.502571,-99) ); - // itree = 150 - fBoostWeights.push_back(0.0156264); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682672,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538993,-99) , -8, -0.682435, 0, 0, 0.642338,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508225,-99) , -6, 0.733193, 1, 0, 0.616555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472886,-99) , -14, -3.55464, 0, 0, 0.595569,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622742,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404814,-99) , -13, 0.000303743, 0, 0, 0.496087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304244,-99) , -7, 0.0983796, 1, 0, 0.483936,-99) , -9, -5.55281, 1, 0, 0.503308,-99) , -4, 0.85995, 1, 0, 0.544424,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621358,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533891,-99) , -15, 0.216617, 0, 0, 0.583924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418829,-99) , -0, 12.5, 0, 0, 0.537165,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386128,-99) , -11, 0.5, 1, 0, 0.475043,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0340406,-99) , -5, 2.16105, 1, 0, 0.308061,-99) , -8, 0.964415, 0, 0, 0.389081,-99) , -11, 1.5, 0, 0, 0.441854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12091,-99) , -5, 1.94292, 1, 0, 0.22213,-99) , -14, -2.48781, 1, 0, 0.383217,-99) , -5, 1.76128, 1, 0, 0.496331,-99) ); - // itree = 151 - fBoostWeights.push_back(0.0144692); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.67925,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637526,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558372,-99) , -9, -0.459985, 1, 0, 0.59567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483931,-99) , -16, 1504.55, 1, 0, 0.570174,-99) , -6, 0.174499, 1, 0, 0.596459,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635909,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516108,-99) , -13, 0.0019004, 0, 0, 0.591615,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390362,-99) , -3, 0.964689, 0, 0, 0.477931,-99) , -4, 0.719541, 1, 0, 0.514871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290533,-99) , -7, 0.105766, 1, 0, 0.500317,-99) , -11, 1.5, 0, 0, 0.531465,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60558,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273288,-99) , -12, 0.0586573, 0, 0, 0.43328,-99) , -11, 1.5, 0, 0, 0.499966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235366,-99) , -5, 2.44853, 1, 0, 0.472825,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0849047,-99) , -4, 1.76855, 1, 0, 0.305907,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0350304,-99) , -5, 2.22325, 1, 0, 0.231917,-99) , -13, 0.000989693, 1, 0, 0.379654,-99) , -5, 1.93025, 1, 0, 0.50368,-99) ); - // itree = 152 - fBoostWeights.push_back(0.0150389); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499504,-99) , -8, -0.892795, 0, 0, 0.605609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461544,-99) , -12, 0.0311647, 0, 0, 0.582239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379459,-99) , -3, 0.98632, 1, 0, 0.429986,-99) , -8, 0.970442, 1, 0, 0.560449,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44698,-99) , -7, 0.0224802, 0, 0, 0.573592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395947,-99) , -1, 43.5, 1, 0, 0.538306,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231572,-99) , -5, 2.0453, 1, 0, 0.45311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271829,-99) , -7, 0.032287, 1, 0, 0.433142,-99) , -1, 15.5, 0, 0, 0.476235,-99) , -12, 0.130705, 1, 0, 0.52084,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448835,-99) , -8, 0.969487, 1, 0, 0.518842,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314151,-99) , -7, 0.0118659, 0, 0, 0.470539,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238003,-99) , -0, 15.5, 1, 0, 0.384375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0577837,-99) , -5, 1.98723, 1, 0, 0.274407,-99) , -14, -3.12161, 1, 0, 0.373783,-99) , -4, 1.57543, 1, 0, 0.490749,-99) ); - // itree = 153 - fBoostWeights.push_back(0.0158773); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.702068,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541262,-99) , -13, 0.0180335, 1, 0, 0.667074,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442606,-99) , -1, 21.5, 0, 0, 0.519036,-99) , -13, 0.00192464, 0, 0, 0.617498,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385554,-99) , -7, 0.0091066, 0, 0, 0.53432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284989,-99) , -7, 0.0308982, 1, 0, 0.514264,-99) , -2, 17.5, 0, 0, 0.556207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380457,-99) , -7, 0.103163, 1, 0, 0.544007,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554955,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384634,-99) , -8, 0.979182, 1, 0, 0.4948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347063,-99) , -9, -0.489209, 1, 0, 0.440525,-99) , -10, 485.844, 1, 0, 0.474584,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493131,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126902,-99) , -5, 2.00669, 1, 0, 0.285456,-99) , -16, 372.442, 1, 0, 0.364177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0339363,-99) , -4, 1.92646, 1, 0, 0.306799,-99) , -13, 0.000994166, 1, 0, 0.404211,-99) , -5, 1.78587, 1, 0, 0.504412,-99) ); - // itree = 154 - fBoostWeights.push_back(0.0133608); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665621,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541334,-99) , -10, 870.344, 1, 0, 0.584288,-99) , -6, 0.159635, 1, 0, 0.613524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475473,-99) , -8, 0.988083, 1, 0, 0.596809,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470446,-99) , -13, 0.00100687, 0, 0, 0.581731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292913,-99) , -7, 0.0285372, 1, 0, 0.483743,-99) , -2, 19.5, 0, 0, 0.516987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316304,-99) , -13, 0.0405675, 1, 0, 0.508285,-99) , -11, 1.5, 0, 0, 0.537214,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486818,-99) , -2, 19.5, 0, 0, 0.538767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363972,-99) , -14, -3.12195, 1, 0, 0.49142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284276,-99) , -7, 0.0115706, 0, 0, 0.442683,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289458,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0538108,-99) , -4, 1.84899, 1, 0, 0.212856,-99) , -13, 0.00342599, 1, 0, 0.377199,-99) , -4, 1.54538, 1, 0, 0.50241,-99) ); - // itree = 155 - fBoostWeights.push_back(0.0143328); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639524,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51545,-99) , -8, 0.914147, 1, 0, 0.607253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415166,-99) , -12, 0.030531, 0, 0, 0.586852,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370436,-99) , -13, 0.000657769, 0, 0, 0.534078,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362557,-99) , -12, 0.114682, 1, 0, 0.430524,-99) , -5, 1.60457, 1, 0, 0.489846,-99) , -16, 453.036, 1, 0, 0.525954,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189731,-99) , -4, 1.12452, 1, 0, 0.366271,-99) , -13, 0.0202507, 1, 0, 0.510282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140659,-99) , -8, 0.992212, 0, 0, 0.246984,-99) , -5, 2.1806, 1, 0, 0.493123,-99) ); - // itree = 156 - fBoostWeights.push_back(0.0110587); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629971,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501485,-99) , -14, -3.29575, 0, 0, 0.602585,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418879,-99) , -1, 9.5, 0, 0, 0.502796,-99) , -11, 1.5, 0, 0, 0.534989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334771,-99) , -14, -4.81428, 0, 0, 0.524247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223606,-99) , -7, 0.172228, 1, 0, 0.516907,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450114,-99) , -16, 528.194, 1, 0, 0.515361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320987,-99) , -1, 9.5, 0, 0, 0.474148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148131,-99) , -8, 0.641288, 0, 0, 0.381505,-99) , -5, 1.9972, 1, 0, 0.496265,-99) ); - // itree = 157 - fBoostWeights.push_back(0.0155902); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708437,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66445,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551524,-99) , -6, 0.463152, 1, 0, 0.604855,-99) , -0, 30.5, 0, 0, 0.638393,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428654,-99) , -6, 0.431469, 1, 0, 0.499115,-99) , -13, 0.000804829, 0, 0, 0.598319,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496368,-99) , -6, 0.915266, 1, 0, 0.600098,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240583,-99) , -7, 0.0358221, 1, 0, 0.481203,-99) , -2, 22.5, 0, 0, 0.512864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301744,-99) , -7, 0.103031, 1, 0, 0.497901,-99) , -11, 1.5, 0, 0, 0.530123,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445599,-99) , -11, 1.5, 0, 0, 0.51138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279368,-99) , -5, 2.4213, 1, 0, 0.484531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18633,-99) , -3, 0.998803, 1, 0, 0.458786,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0673998,-99) , -5, 2.08097, 1, 0, 0.187006,-99) , -8, 0.695056, 0, 0, 0.369978,-99) , -5, 1.90866, 1, 0, 0.499383,-99) ); - // itree = 158 - fBoostWeights.push_back(0.0124832); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365458,-99) , -12, 0.0229527, 0, 0, 0.554435,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403801,-99) , -9, 1.25899, 0, 0, 0.447389,-99) , -2, 9.5, 0, 0, 0.536137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303571,-99) , -3, 0.999594, 1, 0, 0.528137,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113931,-99) , -5, 1.5943, 1, 0, 0.285597,-99) , -12, 0.095188, 1, 0, 0.378966,-99) , -8, -0.88572, 0, 0, 0.509957,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348369,-99) , -9, -3.14409, 1, 0, 0.452634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.06107,-99) , -13, 0.0012283, 1, 0, 0.321823,-99) , -4, 1.82018, 1, 0, 0.492559,-99) ); - // itree = 159 - fBoostWeights.push_back(0.010688); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665231,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570663,-99) , -2, 26.5, 0, 0, 0.597057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371466,-99) , -8, 0.991929, 1, 0, 0.577122,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451899,-99) , -5, 1.39642, 1, 0, 0.496853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223536,-99) , -7, 0.119483, 1, 0, 0.485281,-99) , -12, 0.113669, 1, 0, 0.526207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331192,-99) , -12, 0.0227741, 0, 0, 0.517966,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214723,-99) , -3, 0.97397, 0, 0, 0.420577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160401,-99) , -13, 0.00142855, 1, 0, 0.332389,-99) , -4, 1.8177, 1, 0, 0.500681,-99) ); - // itree = 160 - fBoostWeights.push_back(0.0108291); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633388,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500998,-99) , -8, 0.982626, 1, 0, 0.612599,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459182,-99) , -16, 211.962, 0, 0, 0.524521,-99) , -6, 0.688578, 1, 0, 0.582546,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679366,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4046,-99) , -4, 1.28623, 1, 0, 0.481046,-99) , -12, 0.476058, 0, 0, 0.496225,-99) , -12, 0.113663, 1, 0, 0.534761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274757,-99) , -12, 0.018167, 0, 0, 0.527613,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149276,-99) , -13, 0.000393066, 1, 0, 0.334218,-99) , -4, 1.81784, 1, 0, 0.509856,-99) ); - // itree = 161 - fBoostWeights.push_back(0.0123818); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603634,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520252,-99) , -12, 0.119798, 1, 0, 0.556404,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305215,-99) , -5, 1.73171, 1, 0, 0.446531,-99) , -8, -0.859043, 0, 0, 0.541201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318558,-99) , -3, 0.99959, 1, 0, 0.533625,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258279,-99) , -8, 0.474426, 1, 0, 0.362825,-99) , -12, 0.0286175, 0, 0, 0.522098,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280487,-99) , -7, 0.0150676, 0, 0, 0.490902,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.072076,-99) , -4, 1.82189, 1, 0, 0.187624,-99) , -14, -3.42733, 1, 0, 0.331295,-99) , -4, 1.71403, 1, 0, 0.49788,-99) ); - // itree = 162 - fBoostWeights.push_back(0.0127834); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606736,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513046,-99) , -16, 977.789, 1, 0, 0.554991,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318805,-99) , -12, 0.144181, 1, 0, 0.414897,-99) , -8, -0.906508, 0, 0, 0.538417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289601,-99) , -7, 0.14676, 1, 0, 0.529194,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251991,-99) , -14, -5.52187, 0, 0, 0.521654,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384485,-99) , -11, 1.5, 0, 0, 0.465048,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248607,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0114921,-99) , -8, 0.284682, 0, 0, 0.142226,-99) , -8, 0.946291, 0, 0, 0.31275,-99) , -5, 2.05529, 1, 0, 0.498366,-99) ); - // itree = 163 - fBoostWeights.push_back(0.0138462); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666239,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572595,-99) , -12, 0.125491, 1, 0, 0.620348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488604,-99) , -8, -0.864728, 0, 0, 0.599414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487985,-99) , -14, -3.8218, 0, 0, 0.57814,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472441,-99) , -5, 1.51677, 1, 0, 0.572914,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219813,-99) , -7, 0.0313003, 1, 0, 0.462502,-99) , -2, 18.5, 0, 0, 0.501075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238926,-99) , -7, 0.119698, 1, 0, 0.489433,-99) , -11, 1.5, 0, 0, 0.518999,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332275,-99) , -6, 0.635384, 0, 0, 0.506513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111673,-99) , -8, 0.897552, 0, 0, 0.336954,-99) , -4, 1.761, 1, 0, 0.498761,-99) ); - // itree = 164 - fBoostWeights.push_back(0.0152963); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663814,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564794,-99) , -6, 0.510151, 1, 0, 0.613243,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437923,-99) , -12, 0.0742125, 0, 0, 0.482642,-99) , -8, 0.927167, 1, 0, 0.587178,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293988,-99) , -7, 0.109401, 1, 0, 0.504474,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2991,-99) , -2, 8.5, 0, 0, 0.486771,-99) , -12, 0.132151, 1, 0, 0.538467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369713,-99) , -12, 0.0289857, 0, 0, 0.526645,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46777,-99) , -14, -3.99175, 1, 0, 0.56705,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359263,-99) , -12, 0.280477, 0, 0, 0.412973,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155951,-99) , -7, 0.0298256, 1, 0, 0.382098,-99) , -1, 14.5, 0, 0, 0.464974,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392109,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0972539,-99) , -4, 1.24154, 1, 0, 0.173039,-99) , -8, 0.623981, 0, 0, 0.378329,-99) , -5, 1.87871, 1, 0, 0.494524,-99) ); - // itree = 165 - fBoostWeights.push_back(0.0149507); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650363,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509035,-99) , -8, -0.891036, 0, 0, 0.625714,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460883,-99) , -4, 1.03481, 0, 0, 0.522935,-99) , -8, 0.912129, 1, 0, 0.602239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342458,-99) , -8, 0.457887, 1, 0, 0.407515,-99) , -12, 0.0312261, 0, 0, 0.571312,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607961,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507893,-99) , -0, 15.5, 0, 0, 0.566165,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378449,-99) , -7, 0.0134093, 0, 0, 0.477452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225811,-99) , -7, 0.0825238, 1, 0, 0.456625,-99) , -11, 1.5, 0, 0, 0.490846,-99) , -12, 0.129425, 1, 0, 0.533819,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369971,-99) , -7, 0.012004, 0, 0, 0.513253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248266,-99) , -12, 0.0314081, 0, 0, 0.480806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183756,-99) , -2, 8.5, 0, 0, 0.449419,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323017,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0656021,-99) , -4, 1.81958, 1, 0, 0.233261,-99) , -13, 0.00243647, 1, 0, 0.379644,-99) , -4, 1.55252, 1, 0, 0.501049,-99) ); - // itree = 166 - fBoostWeights.push_back(0.0134408); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411534,-99) , -8, 0.990337, 1, 0, 0.602852,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549109,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401702,-99) , -7, 0.0139207, 0, 0, 0.509895,-99) , -12, 0.101389, 1, 0, 0.547813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321577,-99) , -12, 0.0227284, 0, 0, 0.538366,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316291,-99) , -7, 0.145249, 1, 0, 0.530358,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637201,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287293,-99) , -2, 11.5, 0, 0, 0.41131,-99) , -9, -2.00582, 1, 0, 0.495893,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116715,-99) , -4, 1.5431, 1, 0, 0.225763,-99) , -14, -3.33098, 1, 0, 0.376575,-99) , -5, 1.96925, 1, 0, 0.505462,-99) ); - // itree = 167 - fBoostWeights.push_back(0.0115481); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466462,-99) , -12, 0.0335996, 0, 0, 0.60184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346587,-99) , -1, 11.5, 0, 0, 0.583751,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379735,-99) , -7, 0.00911161, 0, 0, 0.490937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13769,-99) , -7, 0.0445431, 1, 0, 0.479168,-99) , -2, 21.5, 0, 0, 0.512291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195873,-99) , -7, 0.194842, 1, 0, 0.505552,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.080736,-99) , -8, 0.954653, 0, 0, 0.245451,-99) , -5, 2.23656, 1, 0, 0.492052,-99) ); - // itree = 168 - fBoostWeights.push_back(0.0121293); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599507,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503311,-99) , -2, 16.5, 0, 0, 0.559389,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0755838,-99) , -13, 0.0245912, 1, 0, 0.467835,-99) , -5, 1.46914, 1, 0, 0.515309,-99) , -12, 0.459551, 0, 0, 0.524822,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221274,-99) , -12, 0.164807, 1, 0, 0.369567,-99) , -7, 0.00920802, 0, 0, 0.513136,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579785,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0979502,-99) , -3, 0.971154, 0, 0, 0.349298,-99) , -1, 18.5, 0, 0, 0.408002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1216,-99) , -13, 0.00342827, 1, 0, 0.335622,-99) , -4, 1.76854, 1, 0, 0.493925,-99) ); - // itree = 169 - fBoostWeights.push_back(0.0111712); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287686,-99) , -5, 2.1455, 1, 0, 0.580355,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39005,-99) , -4, 1.23663, 0, 0, 0.443077,-99) , -8, 0.977333, 1, 0, 0.559814,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411344,-99) , -7, 0.0131206, 0, 0, 0.527525,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462637,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260277,-99) , -8, 0.158149, 0, 0, 0.408072,-99) , -5, 1.57351, 1, 0, 0.472511,-99) , -12, 0.125579, 1, 0, 0.515564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215373,-99) , -12, 0.0165396, 0, 0, 0.508766,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208912,-99) , -4, 1.97334, 1, 0, 0.495239,-99) ); - // itree = 170 - fBoostWeights.push_back(0.0108877); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57725,-99) , -12, 0.0551099, 1, 0, 0.595772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405913,-99) , -12, 0.0313859, 0, 0, 0.576031,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380627,-99) , -3, 0.999003, 1, 0, 0.50902,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265138,-99) , -3, 0.943024, 0, 0, 0.416417,-99) , -7, 0.0132502, 0, 0, 0.485073,-99) , -16, 507.261, 1, 0, 0.519537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249381,-99) , -7, 0.164989, 1, 0, 0.511625,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134845,-99) , -8, 0.953135, 0, 0, 0.303322,-99) , -5, 2.12061, 1, 0, 0.493895,-99) ); - // itree = 171 - fBoostWeights.push_back(0.0112532); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667876,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562604,-99) , -6, 0.350059, 1, 0, 0.60755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456597,-99) , -13, 0.0176598, 1, 0, 0.592369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414049,-99) , -14, -4.83167, 0, 0, 0.577726,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527366,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326538,-99) , -0, 96.5, 1, 0, 0.51561,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248758,-99) , -7, 0.0240993, 1, 0, 0.410221,-99) , -1, 9.5, 0, 0, 0.493061,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156382,-99) , -13, 0.00158128, 1, 0, 0.308571,-99) , -4, 1.71054, 1, 0, 0.473047,-99) , -11, 1.5, 0, 0, 0.506288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169792,-99) , -5, 2.31033, 1, 0, 0.495202,-99) ); - // itree = 172 - fBoostWeights.push_back(0.0112882); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648043,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530225,-99) , -15, 0.728536, 1, 0, 0.625823,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443133,-99) , -7, 0.018196, 0, 0, 0.498531,-99) , -14, -3.3541, 0, 0, 0.587197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384391,-99) , -8, -0.924842, 0, 0, 0.569436,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492249,-99) , -2, 16.5, 0, 0, 0.558576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381515,-99) , -14, -3.29553, 0, 0, 0.531683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353468,-99) , -8, -0.265928, 0, 0, 0.446165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173118,-99) , -7, 0.0795153, 1, 0, 0.429074,-99) , -5, 1.47382, 1, 0, 0.474583,-99) , -16, 241.362, 1, 0, 0.504427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165578,-99) , -4, 2.06952, 1, 0, 0.494748,-99) ); - // itree = 173 - fBoostWeights.push_back(0.0131952); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677248,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608852,-99) , -4, 0.820404, 1, 0, 0.639938,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507229,-99) , -8, -0.821012, 0, 0, 0.614071,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430497,-99) , -9, -0.124306, 0, 0, 0.503521,-99) , -8, 0.911037, 1, 0, 0.585582,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59488,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501661,-99) , -5, 1.47113, 1, 0, 0.547079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34093,-99) , -0, 51.5, 1, 0, 0.471167,-99) , -6, 0.505443, 1, 0, 0.513414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33585,-99) , -5, 1.93684, 1, 0, 0.500085,-99) , -11, 1.5, 0, 0, 0.528649,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617087,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325705,-99) , -9, -0.781137, 1, 0, 0.450637,-99) , -9, 2.93328, 0, 0, 0.506893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275211,-99) , -7, 0.0117715, 0, 0, 0.457849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459939,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0409391,-99) , -5, 1.83561, 1, 0, 0.181466,-99) , -11, 1.5, 0, 0, 0.26746,-99) , -14, -2.98952, 1, 0, 0.373268,-99) , -4, 1.57379, 1, 0, 0.497729,-99) ); - // itree = 174 - fBoostWeights.push_back(0.0120504); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62081,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527229,-99) , -6, 0.614028, 1, 0, 0.596371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385207,-99) , -3, 0.983454, 1, 0, 0.454932,-99) , -8, -0.843787, 0, 0, 0.571436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374582,-99) , -14, -4.57788, 0, 0, 0.558926,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463339,-99) , -13, 0.00498856, 1, 0, 0.569019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411924,-99) , -12, 0.029614, 0, 0, 0.541367,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334108,-99) , -4, 1.58803, 1, 0, 0.419985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122093,-99) , -3, 0.999335, 1, 0, 0.402841,-99) , -12, 0.114452, 1, 0, 0.467633,-99) , -4, 1.17296, 1, 0, 0.519608,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206827,-99) , -8, 0.993714, 0, 0, 0.3095,-99) , -5, 2.17257, 1, 0, 0.504693,-99) ); - // itree = 175 - fBoostWeights.push_back(0.0122089); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273023,-99) , -5, 2.1966, 1, 0, 0.569825,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241366,-99) , -12, 0.152683, 1, 0, 0.433146,-99) , -7, 0.0798015, 1, 0, 0.554169,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297439,-99) , -15, 0.0464605, 0, 0, 0.389363,-99) , -7, 0.00953217, 0, 0, 0.54151,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300664,-99) , -15, 0.3711, 1, 0, 0.372938,-99) , -14, -4.57821, 0, 0, 0.528563,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620427,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531766,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237857,-99) , -14, -3.70577, 1, 0, 0.346516,-99) , -9, -3.15769, 1, 0, 0.397459,-99) , -2, 19.5, 0, 0, 0.469082,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189394,-99) , -13, 0.00240977, 1, 0, 0.386005,-99) , -4, 1.63892, 1, 0, 0.505175,-99) ); - // itree = 176 - fBoostWeights.push_back(0.0136589); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630079,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552781,-99) , -16, 1289.82, 1, 0, 0.592361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410721,-99) , -14, -4.37989, 0, 0, 0.572121,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626351,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426383,-99) , -5, 1.34288, 1, 0, 0.474338,-99) , -12, 0.414383, 0, 0, 0.493186,-99) , -12, 0.130668, 1, 0, 0.533288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349267,-99) , -12, 0.0236086, 0, 0, 0.524752,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696983,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503175,-99) , -12, 0.117083, 1, 0, 0.590111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409556,-99) , -12, 0.0416047, 0, 0, 0.55482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2498,-99) , -7, 0.011266, 0, 0, 0.496872,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314698,-99) , -6, 0.972387, 0, 0, 0.40355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0944661,-99) , -13, 0.0217237, 1, 0, 0.360274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0830371,-99) , -5, 1.98719, 1, 0, 0.267055,-99) , -14, -3.00121, 1, 0, 0.397848,-99) , -4, 1.56692, 1, 0, 0.498268,-99) ); - // itree = 177 - fBoostWeights.push_back(0.0104956); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601869,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514078,-99) , -11, 1.5, 0, 0, 0.543355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339678,-99) , -12, 0.0216896, 0, 0, 0.535107,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267402,-99) , -12, 0.157199, 1, 0, 0.387235,-99) , -8, -0.926298, 0, 0, 0.520451,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.143638,-99) , -4, 1.80998, 1, 0, 0.275511,-99) , -8, 0.95168, 0, 0, 0.38152,-99) , -4, 1.69348, 1, 0, 0.505268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228327,-99) , -5, 2.2429, 1, 0, 0.492014,-99) ); - // itree = 178 - fBoostWeights.push_back(0.0118505); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.694855,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555756,-99) , -3, 0.996106, 1, 0, 0.649389,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428664,-99) , -6, 0.603132, 1, 0, 0.510592,-99) , -9, -1.06372, 1, 0, 0.562488,-99) , -2, 18.5, 0, 0, 0.604026,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661978,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482628,-99) , -10, 6090.87, 0, 0, 0.51428,-99) , -9, 4.18462, 0, 0, 0.544013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398188,-99) , -13, 0.000464882, 0, 0, 0.519178,-99) , -16, 1573.45, 1, 0, 0.56109,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354261,-99) , -7, 0.00820626, 0, 0, 0.514019,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303908,-99) , -11, 1.5, 0, 0, 0.3889,-99) , -13, 0.00373898, 1, 0, 0.481606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15875,-99) , -3, 0.999375, 1, 0, 0.469317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258517,-99) , -4, 1.97616, 1, 0, 0.447231,-99) , -5, 1.63895, 1, 0, 0.513355,-99) ); - // itree = 179 - fBoostWeights.push_back(0.0149947); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687088,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547224,-99) , -8, -0.665765, 0, 0, 0.647485,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542912,-99) , -13, 0.00118259, 0, 0, 0.620346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402672,-99) , -7, 0.13551, 1, 0, 0.592709,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37196,-99) , -8, -0.973597, 0, 0, 0.517346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356487,-99) , -5, 1.97848, 1, 0, 0.505247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213947,-99) , -7, 0.0442919, 1, 0, 0.49187,-99) , -2, 23.5, 0, 0, 0.521299,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618047,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466799,-99) , -15, 0.262498, 0, 0, 0.560065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27088,-99) , -12, 0.0296092, 0, 0, 0.505338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280386,-99) , -15, 0.120438, 0, 0, 0.430538,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305509,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0620549,-99) , -4, 1.77232, 1, 0, 0.195197,-99) , -14, -2.61687, 1, 0, 0.35617,-99) , -4, 1.57456, 1, 0, 0.488364,-99) ); - // itree = 180 - fBoostWeights.push_back(0.012136); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709562,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477667,-99) , -12, 0.203423, 1, 0, 0.567006,-99) , -2, 21.5, 0, 0, 0.626081,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389088,-99) , -3, 0.979998, 1, 0, 0.479603,-99) , -14, -3.17219, 0, 0, 0.589929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397775,-99) , -5, 0.447829, 0, 0, 0.567761,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464323,-99) , -7, 0.0201454, 1, 0, 0.563571,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23024,-99) , -3, 0.820472, 0, 0, 0.459603,-99) , -16, 92.861, 1, 0, 0.485367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277157,-99) , -13, 0.0222444, 1, 0, 0.470955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244983,-99) , -5, 2.23313, 1, 0, 0.454527,-99) , -4, 0.861093, 1, 0, 0.494831,-99) ); - // itree = 181 - fBoostWeights.push_back(0.00982272); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675265,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57599,-99) , -6, 0.0979778, 1, 0, 0.591769,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460513,-99) , -11, 1.5, 0, 0, 0.497624,-99) , -12, 0.113663, 1, 0, 0.539397,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356113,-99) , -12, 0.0227642, 0, 0, 0.531435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321426,-99) , -3, 0.999598, 1, 0, 0.52449,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41066,-99) , -9, -2.64803, 1, 0, 0.465792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141665,-99) , -13, 0.000859735, 1, 0, 0.339881,-99) , -4, 1.76956, 1, 0, 0.505628,-99) ); - // itree = 182 - fBoostWeights.push_back(0.0108269); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6426,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547734,-99) , -2, 19.5, 0, 0, 0.582435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404779,-99) , -12, 0.0263673, 0, 0, 0.570268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344542,-99) , -7, 0.16572, 1, 0, 0.561992,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646547,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552495,-99) , -2, 28.5, 0, 0, 0.576262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3549,-99) , -12, 0.0310954, 0, 0, 0.536769,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446143,-99) , -7, 0.0352151, 1, 0, 0.519043,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133353,-99) , -13, 0.024051, 1, 0, 0.362127,-99) , -5, 1.38433, 1, 0, 0.423927,-99) , -12, 0.104223, 1, 0, 0.469398,-99) , -16, 1007.58, 1, 0, 0.511286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272212,-99) , -5, 2.2453, 1, 0, 0.499878,-99) ); - // itree = 183 - fBoostWeights.push_back(0.00936981); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640877,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532394,-99) , -2, 12.5, 0, 0, 0.599004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464253,-99) , -15, 1.17547, 1, 0, 0.582836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434175,-99) , -8, -0.916369, 0, 0, 0.567603,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467858,-99) , -2, 33.5, 0, 0, 0.484503,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25452,-99) , -7, 0.0992904, 1, 0, 0.471627,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220428,-99) , -5, 2.17988, 1, 0, 0.461212,-99) , -16, 514.545, 1, 0, 0.502441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185011,-99) , -4, 2.07717, 1, 0, 0.493992,-99) ); - // itree = 184 - fBoostWeights.push_back(0.00979886); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684354,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47814,-99) , -8, 0.704915, 1, 0, 0.52706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269372,-99) , -15, 0.0701514, 0, 0, 0.371092,-99) , -7, 0.00923195, 0, 0, 0.514837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285352,-99) , -13, 0.0377886, 1, 0, 0.507268,-99) , -12, 0.450031, 0, 0, 0.517281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124019,-99) , -13, 0.000391896, 1, 0, 0.310067,-99) , -4, 1.83287, 1, 0, 0.500527,-99) ); - // itree = 185 - fBoostWeights.push_back(0.0134819); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685836,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566884,-99) , -8, -0.349614, 0, 0, 0.636709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497436,-99) , -8, 0.912921, 1, 0, 0.609539,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644642,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500163,-99) , -12, 0.351744, 0, 0, 0.523861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332395,-99) , -7, 0.0100047, 0, 0, 0.5082,-99) , -12, 0.101709, 1, 0, 0.548221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393096,-99) , -12, 0.0286387, 0, 0, 0.536452,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675015,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562995,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338502,-99) , -5, 1.94386, 1, 0, 0.437308,-99) , -12, 0.100567, 1, 0, 0.497734,-99) , -12, 0.321241, 0, 0, 0.532033,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298325,-99) , -6, 0.850289, 1, 0, 0.482945,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150612,-99) , -5, 2.11852, 1, 0, 0.328438,-99) , -11, 0.5, 1, 0, 0.406287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168093,-99) , -14, -2.08403, 1, 0, 0.369487,-99) , -11, 1.5, 0, 0, 0.42887,-99) , -5, 1.67897, 1, 0, 0.495399,-99) ); - // itree = 186 - fBoostWeights.push_back(0.0110628); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695194,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404913,-99) , -12, 0.0286387, 0, 0, 0.553409,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426352,-99) , -5, 1.44839, 1, 0, 0.47687,-99) , -12, 0.11833, 1, 0, 0.5157,-99) , -12, 0.466219, 0, 0, 0.52393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323632,-99) , -7, 0.132187, 1, 0, 0.515134,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398665,-99) , -12, 0.304205, 0, 0, 0.464081,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0760592,-99) , -3, 0.997415, 1, 0, 0.411443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0419585,-99) , -8, 0.284682, 0, 0, 0.334907,-99) , -5, 2.08852, 1, 0, 0.497634,-99) ); - // itree = 187 - fBoostWeights.push_back(0.0114906); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584332,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501629,-99) , -5, 1.43678, 1, 0, 0.545701,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360224,-99) , -6, 0.413406, 1, 0, 0.41411,-99) , -12, 0.0312064, 0, 0, 0.533849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204786,-99) , -5, 2.23641, 1, 0, 0.529117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358971,-99) , -8, -0.9709, 0, 0, 0.517939,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621437,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31891,-99) , -15, 0.448464, 1, 0, 0.46159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0937737,-99) , -5, 2.39889, 1, 0, 0.430225,-99) , -1, 19.5, 0, 0, 0.474374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0905462,-99) , -5, 1.86688, 1, 0, 0.230051,-99) , -13, 0.00166483, 1, 0, 0.385079,-99) , -4, 1.56754, 1, 0, 0.49087,-99) ); - // itree = 188 - fBoostWeights.push_back(0.012475); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.707769,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599977,-99) , -4, 0.49547, 1, 0, 0.622802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440222,-99) , -8, -0.897773, 0, 0, 0.600794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0543762,-99) , -5, 2.3841, 1, 0, 0.588238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405842,-99) , -8, 0.989144, 1, 0, 0.567054,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154825,-99) , -5, 2.22178, 1, 0, 0.493038,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39675,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245718,-99) , -15, 0.0479877, 0, 0, 0.330189,-99) , -7, 0.00902533, 0, 0, 0.478183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233387,-99) , -13, 0.0404155, 1, 0, 0.468818,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0675675,-99) , -13, 0.00088722, 1, 0, 0.25253,-99) , -4, 1.82191, 1, 0, 0.450924,-99) , -11, 1.5, 0, 0, 0.490069,-99) ); - // itree = 189 - fBoostWeights.push_back(0.0139086); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666756,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546271,-99) , -2, 24.5, 0, 0, 0.607358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418661,-99) , -12, 0.0311958, 0, 0, 0.58465,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349432,-99) , -8, -0.917575, 0, 0, 0.497892,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232822,-99) , -7, 0.0444423, 1, 0, 0.486958,-99) , -1, 15.5, 0, 0, 0.526993,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529614,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131535,-99) , -5, 1.4338, 1, 0, 0.298923,-99) , -15, 0.145929, 1, 0, 0.379472,-99) , -13, 0.0195069, 1, 0, 0.512322,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50092,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113998,-99) , -12, 0.367527, 0, 0, 0.175597,-99) , -14, -4.04441, 1, 0, 0.303909,-99) , -5, 2.08846, 1, 0, 0.492855,-99) ); - // itree = 190 - fBoostWeights.push_back(0.0146103); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497892,-99) , -12, 0.0312313, 0, 0, 0.608252,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411224,-99) , -7, 0.0134259, 0, 0, 0.469141,-99) , -15, 0.102291, 0, 0, 0.572627,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424333,-99) , -3, 0.99336, 1, 0, 0.52569,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484907,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347509,-99) , -3, 0.993818, 0, 0, 0.41072,-99) , -6, 0.620055, 1, 0, 0.4811,-99) , -8, 0.70045, 1, 0, 0.53908,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315794,-99) , -7, 0.0986927, 1, 0, 0.413981,-99) , -13, 0.0188551, 1, 0, 0.524492,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646225,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272347,-99) , -3, 0.891724, 0, 0, 0.437997,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0498811,-99) , -8, 0.919468, 0, 0, 0.302942,-99) , -5, 2.12368, 1, 0, 0.402037,-99) , -12, 0.449192, 0, 0, 0.423086,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136928,-99) , -7, 0.0675423, 1, 0, 0.399367,-99) , -5, 1.76188, 1, 0, 0.486735,-99) ); - // itree = 191 - fBoostWeights.push_back(0.0123538); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539708,-99) , -1, 14.5, 0, 0, 0.591959,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353812,-99) , -13, 0.00813286, 1, 0, 0.478687,-99) , -3, 0.997839, 1, 0, 0.571307,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480985,-99) , -2, 30.5, 0, 0, 0.501168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329652,-99) , -7, 0.105872, 1, 0, 0.491126,-99) , -16, 3855.58, 1, 0, 0.53334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315624,-99) , -12, 0.0229545, 0, 0, 0.524314,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461363,-99) , -12, 0.0639516, 1, 0, 0.563744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397498,-99) , -12, 0.037161, 0, 0, 0.507251,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546824,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.25709, 1, 0, 0.315483,-99) , -8, 0.996052, 0, 0, 0.383372,-99) , -12, 0.113369, 1, 0, 0.443707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19254,-99) , -14, -2.40133, 1, 0, 0.391224,-99) , -5, 1.87351, 1, 0, 0.495965,-99) ); - // itree = 192 - fBoostWeights.push_back(0.0109714); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659585,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561082,-99) , -4, 0.371588, 1, 0, 0.586392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323967,-99) , -15, 1.65882, 1, 0, 0.496862,-99) , -6, 0.669981, 1, 0, 0.549146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365142,-99) , -14, -4.69824, 0, 0, 0.53762,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285468,-99) , -12, 0.129582, 1, 0, 0.405538,-99) , -8, -0.924607, 0, 0, 0.523804,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478714,-99) , -2, 22.5, 0, 0, 0.521243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264368,-99) , -4, 2.1745, 1, 0, 0.497865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273384,-99) , -7, 0.012179, 0, 0, 0.444745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193387,-99) , -13, 0.00286656, 1, 0, 0.385539,-99) , -5, 1.92377, 1, 0, 0.49877,-99) ); - // itree = 193 - fBoostWeights.push_back(0.0132437); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663945,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531198,-99) , -8, 0.921462, 1, 0, 0.638661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437762,-99) , -3, 0.998017, 1, 0, 0.599242,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46845,-99) , -7, 0.0139102, 0, 0, 0.526454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313234,-99) , -7, 0.027171, 1, 0, 0.503831,-99) , -2, 16.5, 0, 0, 0.549181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383418,-99) , -12, 0.0327201, 0, 0, 0.533919,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435521,-99) , -7, 0.0349496, 1, 0, 0.568881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453263,-99) , -3, 0.97455, 0, 0, 0.53402,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310918,-99) , -4, 2.01639, 1, 0, 0.516266,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600735,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336693,-99) , -8, 0.995697, 0, 0, 0.362824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122401,-99) , -13, 0.0203951, 1, 0, 0.339368,-99) , -12, 0.418008, 0, 0, 0.372861,-99) , -12, 0.100704, 1, 0, 0.431655,-99) , -4, 1.29096, 1, 0, 0.493681,-99) ); - // itree = 194 - fBoostWeights.push_back(0.0148644); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.70729,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609883,-99) , -6, 0.168682, 1, 0, 0.648085,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481957,-99) , -2, 18.5, 0, 0, 0.535667,-99) , -16, 3736.39, 1, 0, 0.597556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378694,-99) , -14, -4.38705, 0, 0, 0.580898,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442095,-99) , -1, 14.5, 0, 0, 0.545076,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419713,-99) , -10, -57.7756, 1, 0, 0.459574,-99) , -2, 16.5, 0, 0, 0.505791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371665,-99) , -3, 0.930751, 0, 0, 0.488638,-99) , -6, 0.572855, 1, 0, 0.536363,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631395,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484961,-99) , -8, 0.982656, 1, 0, 0.587079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390004,-99) , -15, 0.0327296, 1, 0, 0.438763,-99) , -12, 0.115337, 1, 0, 0.510805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276192,-99) , -12, 0.0232558, 0, 0, 0.494495,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490662,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0452268,-99) , -8, -0.897366, 0, 0, 0.263533,-99) , -11, 1.5, 0, 0, 0.34066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.053831,-99) , -4, 1.92631, 1, 0, 0.30341,-99) , -13, 0.00242163, 1, 0, 0.434657,-99) , -5, 1.67752, 1, 0, 0.497824,-99) ); - // itree = 195 - fBoostWeights.push_back(0.0116313); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44234,-99) , -14, -4.32614, 0, 0, 0.60091,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434949,-99) , -8, -0.637283, 0, 0, 0.512564,-99) , -11, 1.5, 0, 0, 0.54262,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267245,-99) , -5, 1.85536, 1, 0, 0.472116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0995655,-99) , -7, 0.0309219, 1, 0, 0.43734,-99) , -1, 9.5, 0, 0, 0.52193,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25563,-99) , -3, 0.999633, 1, 0, 0.514561,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0925939,-99) , -13, 0.00081729, 1, 0, 0.30862,-99) , -4, 1.85368, 1, 0, 0.499364,-99) ); - // itree = 196 - fBoostWeights.push_back(0.0104037); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429948,-99) , -8, -0.883648, 0, 0, 0.533773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128003,-99) , -5, 2.31011, 1, 0, 0.528673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359102,-99) , -14, -4.87886, 0, 0, 0.518654,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252723,-99) , -7, 0.032716, 1, 0, 0.359235,-99) , -3, 0.999134, 1, 0, 0.506788,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368383,-99) , -16, 527.447, 1, 0, 0.478227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112642,-99) , -2, 9.5, 0, 0, 0.422317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0646027,-99) , -13, 0.00238597, 1, 0, 0.327738,-99) , -4, 1.82197, 1, 0, 0.491675,-99) ); - // itree = 197 - fBoostWeights.push_back(0.0135077); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476969,-99) , -12, 0.0315268, 0, 0, 0.605535,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443286,-99) , -4, 0.864777, 1, 0, 0.50331,-99) , -12, 0.113362, 1, 0, 0.549374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553594,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180492,-99) , -13, 0.0346559, 1, 0, 0.410421,-99) , -11, 1.5, 0, 0, 0.449609,-99) , -6, 0.851645, 1, 0, 0.521777,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207675,-99) , -6, 0.333112, 0, 0, 0.34831,-99) , -14, -4.64989, 0, 0, 0.510353,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425918,-99) , -12, 0.143307, 1, 0, 0.506703,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0652955,-99) , -4, 1.69225, 1, 0, 0.168553,-99) , -8, 0.946379, 0, 0, 0.351684,-99) , -5, 2.03504, 1, 0, 0.491172,-99) ); - // itree = 198 - fBoostWeights.push_back(0.0113121); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685842,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57751,-99) , -6, 0.23571, 1, 0, 0.620868,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507419,-99) , -3, 0.996174, 1, 0, 0.596759,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487157,-99) , -16, 43.1734, 0, 0, 0.547743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354753,-99) , -13, 0.00654394, 1, 0, 0.513077,-99) , -1, 12.5, 0, 0, 0.564284,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509608,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399277,-99) , -13, 0.000137708, 0, 0, 0.490913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286178,-99) , -15, 1.84508, 1, 0, 0.481069,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218125,-99) , -12, 0.138108, 1, 0, 0.358175,-99) , -8, -0.894008, 0, 0, 0.467078,-99) , -16, 450.772, 1, 0, 0.503504,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125022,-99) , -14, -3.71353, 1, 0, 0.286343,-99) , -4, 1.83989, 1, 0, 0.48746,-99) ); - // itree = 199 - fBoostWeights.push_back(0.0147689); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579481,-99) , -7, 0.0385096, 1, 0, 0.643866,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500546,-99) , -8, -0.760943, 0, 0, 0.617341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398989,-99) , -8, 0.983999, 1, 0, 0.593186,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629251,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527372,-99) , -14, -2.39847, 0, 0, 0.583766,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47469,-99) , -5, 1.41703, 1, 0, 0.555046,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365027,-99) , -3, 0.945586, 0, 0, 0.491952,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188084,-99) , -15, 0.187782, 1, 0, 0.334694,-99) , -13, 0.0103136, 1, 0, 0.463759,-99) , -4, 0.969945, 1, 0, 0.508924,-99) , -11, 1.5, 0, 0, 0.535258,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468978,-99) , -16, 402.091, 1, 0, 0.548759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353849,-99) , -8, 0.910293, 0, 0, 0.506122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211352,-99) , -5, 2.46049, 1, 0, 0.482842,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0399567,-99) , -4, 1.8657, 1, 0, 0.197938,-99) , -14, -2.81171, 1, 0, 0.39786,-99) , -5, 1.89106, 1, 0, 0.507498,-99) ); - // itree = 200 - fBoostWeights.push_back(0.0141002); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666442,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606104,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511842,-99) , -16, 365.554, 1, 0, 0.566262,-99) , -4, 0.493659, 1, 0, 0.589815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36572,-99) , -14, -4.55848, 0, 0, 0.56896,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550519,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393559,-99) , -8, -0.946158, 0, 0, 0.535129,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29627,-99) , -6, 0.888561, 1, 0, 0.425942,-99) , -1, 9.5, 0, 0, 0.512304,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336056,-99) , -8, 0.428901, 0, 0, 0.432507,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193724,-99) , -16, 182.184, 1, 0, 0.295632,-99) , -11, 0.5, 1, 0, 0.362538,-99) , -5, 1.73591, 1, 0, 0.473912,-99) , -11, 1.5, 0, 0, 0.504939,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0735797,-99) , -8, 0.980791, 0, 0, 0.228169,-99) , -4, 1.91933, 1, 0, 0.490087,-99) ); - // itree = 201 - fBoostWeights.push_back(0.00901541); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650487,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58028,-99) , -4, 0.846637, 1, 0, 0.610291,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457879,-99) , -16, 176.013, 1, 0, 0.506163,-99) , -14, -3.64097, 0, 0, 0.583063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437904,-99) , -8, -0.880203, 0, 0, 0.56545,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569407,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4712,-99) , -13, 0.00200888, 0, 0, 0.533485,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361996,-99) , -13, 0.0073312, 1, 0, 0.44807,-99) , -4, 0.84819, 1, 0, 0.47896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.106838,-99) , -7, 0.251859, 1, 0, 0.473122,-99) , -11, 1.5, 0, 0, 0.503852,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183322,-99) , -13, 0.000120849, 1, 0, 0.317339,-99) , -5, 2.15512, 1, 0, 0.490396,-99) ); - // itree = 202 - fBoostWeights.push_back(0.0124908); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672315,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541292,-99) , -2, 19.5, 0, 0, 0.593833,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415774,-99) , -5, 0.538452, 0, 0, 0.57219,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335847,-99) , -14, -4.56343, 0, 0, 0.502195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22031,-99) , -13, 0.0363416, 1, 0, 0.492237,-99) , -4, 0.91767, 1, 0, 0.526675,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306057,-99) , -3, 0.99965, 1, 0, 0.519747,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581961,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357964,-99) , -15, 0.173664, 0, 0, 0.478012,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566098,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.22793, 1, 0, 0.16529,-99) , -12, 0.375458, 0, 0, 0.229831,-99) , -8, 0.917782, 0, 0, 0.366175,-99) , -5, 1.98072, 1, 0, 0.497525,-99) ); - // itree = 203 - fBoostWeights.push_back(0.0108256); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610404,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502433,-99) , -6, 0.851059, 1, 0, 0.579361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151707,-99) , -5, 2.30917, 1, 0, 0.571921,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515402,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339934,-99) , -9, 0.156051, 0, 0, 0.434538,-99) , -14, -4.37941, 0, 0, 0.551844,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469548,-99) , -12, 0.466533, 0, 0, 0.485134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256843,-99) , -7, 0.0990909, 1, 0, 0.472506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246501,-99) , -4, 1.81763, 1, 0, 0.452806,-99) , -12, 0.113398, 1, 0, 0.496461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166428,-99) , -12, 0.01821, 0, 0, 0.488174,-99) ); - // itree = 204 - fBoostWeights.push_back(0.0117557); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669278,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600691,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493925,-99) , -2, 16.5, 0, 0, 0.556987,-99) , -6, 0.4858, 1, 0, 0.606103,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440954,-99) , -3, 0.997089, 1, 0, 0.549493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500164,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380953,-99) , -9, -0.254691, 1, 0, 0.43874,-99) , -2, 11.5, 0, 0, 0.51818,-99) , -12, 0.101709, 1, 0, 0.552981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37252,-99) , -12, 0.0310262, 0, 0, 0.538933,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664233,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295563,-99) , -15, 0.0524539, 0, 0, 0.460943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23171,-99) , -13, 0.0110708, 1, 0, 0.440671,-99) , -12, 0.446102, 0, 0, 0.45745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.139145,-99) , -7, 0.0948526, 1, 0, 0.441194,-99) , -5, 1.54796, 1, 0, 0.491401,-99) ); - // itree = 205 - fBoostWeights.push_back(0.00904645); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605765,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500674,-99) , -8, 0.91263, 1, 0, 0.582265,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416505,-99) , -12, 0.0324206, 0, 0, 0.567639,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512294,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253845,-99) , -7, 0.00744544, 0, 0, 0.503182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341944,-99) , -7, 0.0669166, 1, 0, 0.48949,-99) , -4, 0.918392, 1, 0, 0.521897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30025,-99) , -3, 0.999637, 1, 0, 0.515393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312694,-99) , -5, 2.08696, 1, 0, 0.39078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0424442,-99) , -14, -2.6219, 1, 0, 0.303007,-99) , -4, 1.87224, 1, 0, 0.500538,-99) ); - // itree = 206 - fBoostWeights.push_back(0.0129615); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681275,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522271,-99) , -13, 0.0186785, 1, 0, 0.637042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399483,-99) , -7, 0.0326128, 1, 0, 0.550104,-99) , -2, 24.5, 0, 0, 0.581206,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451111,-99) , -14, -2.23457, 1, 0, 0.576601,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147599,-99) , -5, 2.18787, 1, 0, 0.4506,-99) , -16, 416.816, 1, 0, 0.499077,-99) , -5, 1.44143, 1, 0, 0.540477,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298867,-99) , -9, 0.131644, 0, 0, 0.370292,-99) , -12, 0.029614, 0, 0, 0.527839,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573002,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296706,-99) , -9, -2.41119, 1, 0, 0.373383,-99) , -2, 17.5, 0, 0, 0.442142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0841377,-99) , -4, 1.81706, 1, 0, 0.21958,-99) , -14, -2.61847, 1, 0, 0.373708,-99) , -4, 1.63744, 1, 0, 0.502687,-99) ); - // itree = 207 - fBoostWeights.push_back(0.0113749); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453901,-99) , -8, -0.949125, 0, 0, 0.578526,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325813,-99) , -4, 1.15124, 0, 0, 0.411863,-99) , -14, -4.29333, 0, 0, 0.556678,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66324,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527352,-99) , -8, 0.262342, 0, 0, 0.618044,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380317,-99) , -5, 1.37778, 1, 0, 0.441715,-99) , -12, 0.387543, 0, 0, 0.473086,-99) , -12, 0.138609, 1, 0, 0.518489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237678,-99) , -12, 0.0168462, 0, 0, 0.512144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179884,-99) , -4, 1.99486, 1, 0, 0.500274,-99) ); - // itree = 208 - fBoostWeights.push_back(0.0111007); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438546,-99) , -7, 0.0303074, 1, 0, 0.567447,-99) , -0, 32.5, 0, 0, 0.593979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451313,-99) , -14, -4.06764, 0, 0, 0.570954,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646621,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534093,-99) , -2, 21.5, 0, 0, 0.580546,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418849,-99) , -7, 0.052965, 1, 0, 0.49108,-99) , -6, 0.578432, 1, 0, 0.532363,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373693,-99) , -5, 1.97956, 1, 0, 0.470979,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10202,-99) , -5, 1.76441, 1, 0, 0.269118,-99) , -13, 0.00764111, 1, 0, 0.433157,-99) , -5, 1.37722, 1, 0, 0.471718,-99) , -11, 1.5, 0, 0, 0.504208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221887,-99) , -4, 1.98902, 1, 0, 0.493206,-99) ); - // itree = 209 - fBoostWeights.push_back(0.00973806); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.690066,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589054,-99) , -6, 0.140023, 1, 0, 0.61053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469489,-99) , -8, -0.888098, 0, 0, 0.593108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44358,-99) , -8, 0.991182, 1, 0, 0.576269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381273,-99) , -5, 2.24541, 1, 0, 0.564731,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406475,-99) , -8, 0.990323, 1, 0, 0.549858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320458,-99) , -12, 0.0216784, 0, 0, 0.529683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237524,-99) , -7, 0.0877419, 1, 0, 0.442332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189078,-99) , -4, 1.82602, 1, 0, 0.426472,-99) , -12, 0.113663, 1, 0, 0.473094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162874,-99) , -5, 2.31708, 1, 0, 0.464919,-99) , -11, 1.5, 0, 0, 0.497725,-99) ); - // itree = 210 - fBoostWeights.push_back(0.014271); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636423,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500824,-99) , -13, 0.0104457, 1, 0, 0.620119,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329466,-99) , -4, 1.97678, 1, 0, 0.61141,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584781,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483331,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328755,-99) , -4, 1.44247, 1, 0, 0.443899,-99) , -16, 373.655, 1, 0, 0.495158,-99) , -15, 0.216824, 0, 0, 0.58095,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311574,-99) , -8, 0.719682, 1, 0, 0.44839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164459,-99) , -4, 1.71388, 1, 0, 0.412444,-99) , -12, 0.0312599, 0, 0, 0.549789,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606848,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501856,-99) , -6, 0.755882, 1, 0, 0.570599,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461888,-99) , -2, 22.5, 0, 0, 0.528978,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336863,-99) , -11, 0.5, 1, 0, 0.416709,-99) , -1, 14.5, 0, 0, 0.466892,-99) , -16, 968, 1, 0, 0.509007,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628404,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149265,-99) , -7, 0.0596755, 1, 0, 0.380254,-99) , -12, 0.418065, 0, 0, 0.418612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148703,-99) , -8, -0.416956, 0, 0, 0.374217,-99) , -5, 1.68543, 1, 0, 0.457055,-99) , -12, 0.113986, 1, 0, 0.500412,-99) ); - // itree = 211 - fBoostWeights.push_back(0.01246); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.741084,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633128,-99) , -6, 0.504459, 1, 0, 0.685542,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432081,-99) , -7, 0.0964787, 1, 0, 0.538559,-99) , -13, 0.00766149, 1, 0, 0.607383,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449261,-99) , -9, -0.674609, 1, 0, 0.491651,-99) , -2, 13.5, 0, 0, 0.570618,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473033,-99) , -16, 5e+09, 1, 0, 0.534138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408444,-99) , -5, 1.25546, 0, 0, 0.482347,-99) , -13, 0.00123938, 0, 0, 0.546373,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658225,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511775,-99) , -13, 0.00459302, 1, 0, 0.620372,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301536,-99) , -7, 0.0179131, 1, 0, 0.47502,-99) , -0, 16.5, 0, 0, 0.547242,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390716,-99) , -12, 0.118246, 1, 0, 0.444536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167514,-99) , -5, 2.25696, 1, 0, 0.422937,-99) , -11, 1.5, 0, 0, 0.466822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171041,-99) , -7, 0.0935386, 1, 0, 0.451592,-99) , -5, 1.56185, 1, 0, 0.501405,-99) ); - // itree = 212 - fBoostWeights.push_back(0.0129098); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.73795,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589033,-99) , -16, 1918.55, 1, 0, 0.666824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495464,-99) , -8, 0.909504, 1, 0, 0.624557,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466997,-99) , -13, 0.0177141, 1, 0, 0.571328,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4323,-99) , -16, 377.958, 1, 0, 0.47218,-99) , -8, 0.510771, 1, 0, 0.529652,-99) , -6, 0.290994, 1, 0, 0.558497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40891,-99) , -8, -0.92549, 0, 0, 0.541644,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461836,-99) , -15, 0.227791, 0, 0, 0.501192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317493,-99) , -7, 0.00794889, 0, 0, 0.4878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236866,-99) , -4, 2.09865, 1, 0, 0.473467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507102,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.047723,-99) , -4, 1.57456, 1, 0, 0.17011,-99) , -10, -652.417, 1, 0, 0.274189,-99) , -13, 0.00503479, 1, 0, 0.432104,-99) , -5, 1.66215, 1, 0, 0.499816,-99) ); - // itree = 213 - fBoostWeights.push_back(0.0106066); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653133,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526286,-99) , -6, 0.134436, 1, 0, 0.549832,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295162,-99) , -0, 12.5, 1, 0, 0.435721,-99) , -2, 9.5, 0, 0, 0.530877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278125,-99) , -14, -5.64102, 0, 0, 0.523668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206904,-99) , -4, 1.10648, 1, 0, 0.380051,-99) , -13, 0.02186, 1, 0, 0.5111,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0818274,-99) , -8, 0.91942, 0, 0, 0.298619,-99) , -5, 2.15915, 1, 0, 0.49604,-99) ); - // itree = 214 - fBoostWeights.push_back(0.0127332); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697822,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613796,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537912,-99) , -5, 1.16797, 0, 0, 0.57164,-99) , -6, 0.250395, 1, 0, 0.608644,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419653,-99) , -7, 0.0469098, 1, 0, 0.478941,-99) , -3, 0.997018, 1, 0, 0.576052,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376766,-99) , -13, 0.00157278, 0, 0, 0.458977,-99) , -2, 11.5, 0, 0, 0.548839,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599266,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503458,-99) , -11, 1.5, 0, 0, 0.540883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369722,-99) , -12, 0.0319445, 0, 0, 0.523044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383176,-99) , -16, 500.346, 1, 0, 0.44123,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221563,-99) , -4, 1.73717, 1, 0, 0.402891,-99) , -7, 0.0133776, 0, 0, 0.484954,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147294,-99) , -12, 0.408132, 0, 0, 0.240614,-99) , -13, 0.0121275, 1, 0, 0.458711,-99) , -5, 1.4428, 1, 0, 0.497314,-99) ); - // itree = 215 - fBoostWeights.push_back(0.0115741); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657022,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443174,-99) , -9, 1.62945, 1, 0, 0.55925,-99) , -9, 3.84001, 0, 0, 0.580939,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483245,-99) , -16, 528.634, 1, 0, 0.517118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248188,-99) , -7, 0.0311303, 1, 0, 0.497115,-99) , -2, 18.5, 0, 0, 0.526809,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0713355,-99) , -1, 22.5, 0, 0, 0.346011,-99) , -7, 0.109217, 1, 0, 0.516632,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173049,-99) , -14, -3.70949, 1, 0, 0.343464,-99) , -5, 2.08836, 1, 0, 0.500093,-99) ); - // itree = 216 - fBoostWeights.push_back(0.00962481); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676008,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435053,-99) , -5, 1.99312, 1, 0, 0.559556,-99) , -3, 0.913914, 1, 0, 0.579303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400808,-99) , -14, -4.56123, 0, 0, 0.56261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455478,-99) , -6, 0.915652, 1, 0, 0.528468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468888,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296179,-99) , -14, -2.12584, 1, 0, 0.436582,-99) , -5, 1.42584, 1, 0, 0.476749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0565536,-99) , -7, 0.23763, 1, 0, 0.470159,-99) , -11, 1.5, 0, 0, 0.50023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226393,-99) , -4, 1.97331, 1, 0, 0.48887,-99) ); - // itree = 217 - fBoostWeights.push_back(0.0131171); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622977,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557139,-99) , -16, 841.132, 1, 0, 0.58867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451134,-99) , -15, 0.141207, 0, 0, 0.57189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360601,-99) , -12, 0.0228655, 0, 0, 0.553202,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431659,-99) , -15, 0.273909, 1, 0, 0.547252,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384263,-99) , -6, 0.40116, 1, 0, 0.451331,-99) , -2, 12.5, 0, 0, 0.510862,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345675,-99) , -9, 2.28796, 0, 0, 0.411436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129517,-99) , -7, 0.06533, 1, 0, 0.383469,-99) , -4, 1.29042, 1, 0, 0.467899,-99) , -12, 0.130716, 1, 0, 0.513992,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384202,-99) , -11, 1.5, 0, 0, 0.470638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0898482,-99) , -8, 0.897676, 0, 0, 0.331639,-99) , -5, 2.08702, 1, 0, 0.497071,-99) ); - // itree = 218 - fBoostWeights.push_back(0.00995832); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595665,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516757,-99) , -2, 14.5, 0, 0, 0.559484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414991,-99) , -12, 0.0314467, 0, 0, 0.54706,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420748,-99) , -3, 0.932287, 0, 0, 0.51531,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297446,-99) , -11, 1.5, 0, 0, 0.374203,-99) , -14, -2.39687, 1, 0, 0.475958,-99) , -4, 1.23692, 1, 0, 0.520152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262316,-99) , -7, 0.146564, 1, 0, 0.511167,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148717,-99) , -8, 0.946292, 0, 0, 0.310762,-99) , -5, 2.13012, 1, 0, 0.495944,-99) ); - // itree = 219 - fBoostWeights.push_back(0.0140001); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.729136,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647213,-99) , -7, 0.0430468, 1, 0, 0.693301,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41007,-99) , -5, 1.38179, 1, 0, 0.53479,-99) , -12, 0.127032, 1, 0, 0.603358,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423718,-99) , -5, 1.25949, 0, 0, 0.468326,-99) , -8, -0.854462, 0, 0, 0.570103,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403735,-99) , -2, 11.5, 1, 0, 0.433773,-99) , -16, 1561.23, 1, 0, 0.483326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364686,-99) , -12, 0.0313859, 0, 0, 0.463117,-99) , -14, -2.67841, 0, 0, 0.53162,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651135,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518013,-99) , -12, 0.109235, 1, 0, 0.5824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399431,-99) , -8, 0.984921, 1, 0, 0.546749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320003,-99) , -5, 2.43947, 1, 0, 0.53372,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457461,-99) , -3, 0.995954, 1, 0, 0.55903,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235318,-99) , -3, 0.994844, 1, 0, 0.406602,-99) , -9, 3.08374, 0, 0, 0.442668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135919,-99) , -4, 1.64466, 1, 0, 0.23456,-99) , -13, 0.00444813, 1, 0, 0.391873,-99) , -11, 1.5, 0, 0, 0.442431,-99) , -5, 1.59966, 1, 0, 0.491837,-99) ); - // itree = 220 - fBoostWeights.push_back(0.01022); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380474,-99) , -14, -4.87945, 0, 0, 0.547605,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34776,-99) , -2, 17.5, 1, 0, 0.4035,-99) , -12, 0.0312788, 0, 0, 0.534322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303408,-99) , -3, 0.999595, 1, 0, 0.526351,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267595,-99) , -15, 0.0503587, 0, 0, 0.360174,-99) , -7, 0.00889001, 0, 0, 0.516036,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410953,-99) , -16, 643.203, 1, 0, 0.491087,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0511015,-99) , -4, 1.96531, 1, 0, 0.209756,-99) , -8, 0.950196, 0, 0, 0.356876,-99) , -5, 1.98298, 1, 0, 0.493753,-99) ); - // itree = 221 - fBoostWeights.push_back(0.01271); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.712817,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58642,-99) , -6, 0.85867, 1, 0, 0.663177,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55266,-99) , -13, 0.00235548, 0, 0, 0.630881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461454,-99) , -3, 0.998406, 1, 0, 0.601686,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56166,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542691,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476172,-99) , -2, 11.5, 1, 0, 0.507538,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345612,-99) , -2, 11.5, 0, 0, 0.424396,-99) , -6, 0.617164, 1, 0, 0.468376,-99) , -16, 268.792, 1, 0, 0.49674,-99) , -2, 19.5, 0, 0, 0.54526,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339932,-99) , -12, 0.0236211, 0, 0, 0.522409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115255,-99) , -13, 0.0217071, 1, 0, 0.514027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.44869, 1, 0, 0.502848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638141,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323999,-99) , -16, 456.134, 1, 0, 0.385739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220053,-99) , -4, 1.6675, 1, 0, 0.33958,-99) , -12, 0.500162, 0, 0, 0.37652,-99) , -12, 0.17812, 1, 0, 0.457243,-99) , -5, 1.4974, 1, 0, 0.498297,-99) ); - // itree = 222 - fBoostWeights.push_back(0.00964955); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674632,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662214,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54933,-99) , -6, 0.131699, 1, 0, 0.575072,-99) , -9, 4.4213, 0, 0, 0.591806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422944,-99) , -14, -4.56003, 0, 0, 0.576337,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46501,-99) , -12, 0.113663, 1, 0, 0.505287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264454,-99) , -3, 0.999558, 1, 0, 0.496706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103979,-99) , -5, 2.24307, 1, 0, 0.490174,-99) , -11, 1.5, 0, 0, 0.518975,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102083,-99) , -13, 0.00102316, 1, 0, 0.279111,-99) , -4, 1.83989, 1, 0, 0.502162,-99) ); - // itree = 223 - fBoostWeights.push_back(0.0116713); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.694473,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577361,-99) , -4, 0.448763, 1, 0, 0.627834,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50281,-99) , -8, -0.736699, 0, 0, 0.596896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445964,-99) , -14, -4.03499, 0, 0, 0.577669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382933,-99) , -5, 0.427916, 0, 0, 0.557514,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475626,-99) , -10, 3206.23, 1, 0, 0.542062,-99) , -10, 10989.1, 0, 0, 0.562908,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281813,-99) , -6, 0.795745, 1, 0, 0.364683,-99) , -12, 0.0328176, 0, 0, 0.523079,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576102,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282437,-99) , -5, 1.94205, 1, 0, 0.416173,-99) , -8, 0.992328, 0, 0, 0.437644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115315,-99) , -7, 0.103296, 1, 0, 0.420826,-99) , -12, 0.113389, 1, 0, 0.467788,-99) , -4, 0.917339, 1, 0, 0.502453,-99) ); - // itree = 224 - fBoostWeights.push_back(0.0113999); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654997,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449665,-99) , -8, -0.843582, 0, 0, 0.569885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462048,-99) , -8, 0.914359, 1, 0, 0.547195,-99) , -3, 0.945379, 1, 0, 0.574468,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471018,-99) , -13, 0.000680991, 0, 0, 0.527318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40095,-99) , -3, 0.998809, 1, 0, 0.512199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356439,-99) , -2, 8.5, 0, 0, 0.499252,-99) , -16, 969.995, 1, 0, 0.533345,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356874,-99) , -14, -4.01871, 0, 0, 0.490882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293682,-99) , -13, 0.0350375, 1, 0, 0.480255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270923,-99) , -3, 0.910229, 0, 0, 0.455887,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33785,-99) , -9, -3.05112, 1, 0, 0.41563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0806247,-99) , -8, 0.777482, 0, 0, 0.310443,-99) , -5, 1.97586, 1, 0, 0.404525,-99) , -4, 1.42187, 1, 0, 0.496763,-99) ); - // itree = 225 - fBoostWeights.push_back(0.00952468); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411342,-99) , -5, 0.571796, 0, 0, 0.554486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345738,-99) , -14, -4.72524, 0, 0, 0.542846,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453719,-99) , -9, 6.346, 0, 0, 0.475577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0854927,-99) , -13, 0.0402082, 1, 0, 0.464705,-99) , -4, 1.23694, 1, 0, 0.512928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255525,-99) , -3, 0.999635, 1, 0, 0.505329,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167083,-99) , -8, 0.946431, 0, 0, 0.334885,-99) , -5, 2.12194, 1, 0, 0.491367,-99) ); - // itree = 226 - fBoostWeights.push_back(0.0114052); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489331,-99) , -3, 0.998466, 1, 0, 0.591712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485137,-99) , -2, 10.5, 0, 0, 0.568785,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37565,-99) , -7, 0.094732, 1, 0, 0.53937,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142442,-99) , -7, 0.0331112, 1, 0, 0.451321,-99) , -2, 17.5, 0, 0, 0.486935,-99) , -11, 1.5, 0, 0, 0.514121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0882533,-99) , -7, 0.252395, 1, 0, 0.509042,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338921,-99) , -14, -3.98494, 1, 0, 0.45171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0745011,-99) , -8, 0.74611, 0, 0, 0.34438,-99) , -5, 2.08835, 1, 0, 0.493259,-99) ); - // itree = 227 - fBoostWeights.push_back(0.00961008); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649236,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651627,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521669,-99) , -9, -2.94188, 1, 0, 0.565946,-99) , -10, 1576.94, 1, 0, 0.597533,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492804,-99) , -3, 0.998197, 1, 0, 0.582633,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493357,-99) , -12, 0.110485, 1, 0, 0.529739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343908,-99) , -14, -4.5876, 0, 0, 0.517932,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236988,-99) , -3, 0.871151, 0, 0, 0.43224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123109,-99) , -13, 0.0168468, 1, 0, 0.406446,-99) , -4, 1.2925, 1, 0, 0.478228,-99) , -16, 73.1364, 1, 0, 0.502908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269307,-99) , -5, 2.23833, 1, 0, 0.491609,-99) ); - // itree = 228 - fBoostWeights.push_back(0.0115076); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661151,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589378,-99) , -6, 0.151125, 1, 0, 0.60685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488661,-99) , -0, 11.5, 0, 0, 0.58913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413158,-99) , -14, -4.35757, 0, 0, 0.569407,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49688,-99) , -2, 33.5, 0, 0, 0.512262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336713,-99) , -0, 75.5, 1, 0, 0.499754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267596,-99) , -3, 0.770545, 0, 0, 0.490341,-99) , -11, 1.5, 0, 0, 0.516357,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492809,-99) , -8, 0.978772, 1, 0, 0.566753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244466,-99) , -4, 2.09885, 1, 0, 0.511814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230199,-99) , -7, 0.0119887, 0, 0, 0.455921,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100019,-99) , -11, 1.5, 0, 0, 0.203487,-99) , -14, -3.04484, 1, 0, 0.355284,-99) , -4, 1.69232, 1, 0, 0.495217,-99) ); - // itree = 229 - fBoostWeights.push_back(0.00834938); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421372,-99) , -14, -4.07274, 0, 0, 0.551202,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416422,-99) , -4, 1.18733, 1, 0, 0.477692,-99) , -12, 0.125377, 1, 0, 0.514008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282109,-99) , -12, 0.0176003, 0, 0, 0.508069,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200584,-99) , -14, -3.98494, 1, 0, 0.353585,-99) , -5, 2.15977, 1, 0, 0.497022,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112745,-99) , -7, 0.253137, 1, 0, 0.492453,-99) ); - // itree = 230 - fBoostWeights.push_back(0.0111693); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4969,-99) , -5, 1.6586, 1, 0, 0.602319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442015,-99) , -14, -3.62497, 0, 0, 0.578029,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362409,-99) , -7, 0.0285335, 1, 0, 0.504739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237115,-99) , -0, 24.5, 1, 0, 0.49328,-99) , -2, 18.5, 0, 0, 0.521889,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0165803,-99) , -1, 17.5, 0, 0, 0.352359,-99) , -7, 0.102151, 1, 0, 0.510911,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.153323,-99) , -3, 0.997454, 1, 0, 0.421162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -8, 0.285182, 0, 0, 0.33878,-99) , -5, 2.15693, 1, 0, 0.498901,-99) ); - // itree = 231 - fBoostWeights.push_back(0.00712819); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444291,-99) , -5, 0.555502, 0, 0, 0.57529,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307268,-99) , -8, -0.946901, 0, 0, 0.498429,-99) , -4, 0.916442, 1, 0, 0.527478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245128,-99) , -7, 0.00711607, 0, 0, 0.5218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0603727,-99) , -7, 0.291498, 1, 0, 0.51772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306258,-99) , -12, 0.0235392, 0, 0, 0.507722,-99) ); - // itree = 232 - fBoostWeights.push_back(0.0124768); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.742621,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627786,-99) , -5, 1.77262, 0, 0, 0.664591,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47692,-99) , -14, -3.09339, 0, 0, 0.582705,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151867,-99) , -8, -0.599021, 0, 0, 0.42965,-99) , -4, 1.32426, 1, 0, 0.542444,-99) , -9, 2.86394, 0, 0, 0.571898,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276864,-99) , -13, 0.0074137, 1, 0, 0.398956,-99) , -1, 52.5, 1, 0, 0.550965,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459048,-99) , -8, 0.747396, 1, 0, 0.512528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332744,-99) , -8, -0.9199, 0, 0, 0.494443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29328,-99) , -5, 2.12019, 1, 0, 0.477516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140335,-99) , -7, 0.051013, 1, 0, 0.459382,-99) , -1, 14.5, 0, 0, 0.501225,-99) ); - // itree = 233 - fBoostWeights.push_back(0.0102142); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678177,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643002,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525445,-99) , -12, 0.10127, 1, 0, 0.56901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273501,-99) , -5, 2.4212, 1, 0, 0.559449,-99) , -0, 32.5, 0, 0, 0.588377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402377,-99) , -12, 0.0300278, 0, 0, 0.572818,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431617,-99) , -8, 0.914548, 1, 0, 0.53276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404278,-99) , -13, 0.0231073, 1, 0, 0.519623,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416563,-99) , -10, 7010.56, 0, 0, 0.453631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257641,-99) , -0, 35.5, 1, 0, 0.429112,-99) , -5, 1.58812, 1, 0, 0.485234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236585,-99) , -4, 1.82192, 1, 0, 0.466887,-99) , -11, 1.5, 0, 0, 0.50145,-99) ); - // itree = 234 - fBoostWeights.push_back(0.0145813); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602145,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513864,-99) , -7, 0.0154727, 0, 0, 0.571984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435966,-99) , -12, 0.0311549, 0, 0, 0.557961,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431897,-99) , -8, -0.741471, 0, 0, 0.512757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312869,-99) , -5, 1.34317, 1, 0, 0.458386,-99) , -13, 0.0109823, 1, 0, 0.535967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330318,-99) , -14, -4.95437, 0, 0, 0.526506,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674893,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503095,-99) , -5, 1.92143, 0, 0, 0.606459,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.057972,-99) , -4, 1.87256, 1, 0, 0.47169,-99) , -8, 0.901155, 0, 0, 0.529024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236577,-99) , -3, 0.99906, 1, 0, 0.506981,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625126,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328217,-99) , -16, 462.444, 1, 0, 0.383452,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0219451,-99) , -3, 0.980215, 0, 0, 0.184496,-99) , -4, 1.66875, 1, 0, 0.312336,-99) , -12, 0.479045, 0, 0, 0.352556,-99) , -12, 0.145146, 1, 0, 0.438452,-99) , -4, 1.28688, 1, 0, 0.492788,-99) ); - // itree = 235 - fBoostWeights.push_back(0.0093554); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675018,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43595,-99) , -14, -3.9419, 0, 0, 0.515498,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320939,-99) , -7, 0.146019, 1, 0, 0.509358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131654,-99) , -5, 2.28888, 1, 0, 0.505047,-99) , -12, 0.449338, 0, 0, 0.51404,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618335,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42268,-99) , -16, 1309.1, 1, 0, 0.535771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212392,-99) , -1, 9.5, 0, 0, 0.460825,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176667,-99) , -14, -2.91141, 1, 0, 0.360096,-99) , -4, 1.69475, 1, 0, 0.494122,-99) ); - // itree = 236 - fBoostWeights.push_back(0.0100918); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6372,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52374,-99) , -13, 0.0142938, 1, 0, 0.61532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492955,-99) , -12, 0.0457552, 0, 0, 0.59427,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534395,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400864,-99) , -7, 0.0133751, 1, 0, 0.46987,-99) , -0, 13.5, 0, 0, 0.561091,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44253,-99) , -5, 1.49886, 1, 0, 0.484987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236147,-99) , -3, 0.745136, 0, 0, 0.47657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141801,-99) , -7, 0.209058, 1, 0, 0.470055,-99) , -11, 1.5, 0, 0, 0.499834,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.086906,-99) , -8, 0.953172, 0, 0, 0.2767,-99) , -5, 2.15694, 1, 0, 0.485261,-99) ); - // itree = 237 - fBoostWeights.push_back(0.00675708); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693098,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618105,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528893,-99) , -12, 0.101432, 1, 0, 0.568807,-99) , -12, 0.340934, 0, 0, 0.583208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450026,-99) , -12, 0.0307841, 0, 0, 0.567881,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458636,-99) , -12, 0.125713, 1, 0, 0.498253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288984,-99) , -8, -0.982452, 0, 0, 0.489431,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201046,-99) , -5, 2.24285, 1, 0, 0.482793,-99) , -16, 471.711, 1, 0, 0.515075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292992,-99) , -4, 1.97103, 1, 0, 0.505715,-99) ); - // itree = 238 - fBoostWeights.push_back(0.0101417); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649717,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528637,-99) , -2, 14.5, 0, 0, 0.590335,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467104,-99) , -4, 1.01616, 1, 0, 0.509395,-99) , -11, 1.5, 0, 0, 0.536157,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335711,-99) , -8, -0.80841, 0, 0, 0.442472,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0575696,-99) , -4, 1.56357, 1, 0, 0.400245,-99) , -13, 0.0175754, 1, 0, 0.519829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248003,-99) , -8, 0.411506, 1, 0, 0.342594,-99) , -12, 0.0258567, 0, 0, 0.509553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194391,-99) , -5, 2.27977, 1, 0, 0.498851,-99) ); - // itree = 239 - fBoostWeights.push_back(0.00918664); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667636,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563545,-99) , -2, 15.5, 0, 0, 0.623718,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468572,-99) , -12, 0.101036, 1, 0, 0.508866,-99) , -8, -0.499012, 0, 0, 0.582121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425623,-99) , -5, 0.592296, 0, 0, 0.561002,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314261,-99) , -12, 0.0908772, 0, 0, 0.438691,-99) , -14, -3.5849, 0, 0, 0.541504,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610394,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642688,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452725,-99) , -15, 0.026953, 1, 0, 0.463856,-99) , -16, 5.60887, 1, 0, 0.477697,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124332,-99) , -4, 1.56649, 1, 0, 0.335364,-99) , -8, -0.836451, 0, 0, 0.461705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142168,-99) , -7, 0.162612, 1, 0, 0.453121,-99) , -4, 0.925897, 1, 0, 0.488069,-99) ); - // itree = 240 - fBoostWeights.push_back(0.00892826); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.734184,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300302,-99) , -3, 0.999643, 1, 0, 0.510945,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270861,-99) , -2, 6.5, 0, 0, 0.505465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183644,-99) , -13, 0.0583189, 1, 0, 0.499263,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.105438,-99) , -13, 9.40422e-05, 1, 0, 0.289443,-99) , -5, 2.16636, 1, 0, 0.486324,-99) , -12, 0.53413, 0, 0, 0.495307,-99) ); - // itree = 241 - fBoostWeights.push_back(0.0135388); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.710445,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602649,-99) , -15, 0.186208, 0, 0, 0.664136,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495313,-99) , -6, 0.54329, 0, 0, 0.554033,-99) , -13, 0.00756965, 1, 0, 0.609497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194172,-99) , -4, 1.94677, 1, 0, 0.599709,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624642,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50386,-99) , -7, 0.0170554, 1, 0, 0.557422,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325146,-99) , -0, 13.5, 0, 0, 0.464327,-99) , -16, 173.209, 1, 0, 0.511883,-99) , -13, 0.00206774, 0, 0, 0.55652,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491516,-99) , -6, 0.598411, 1, 0, 0.56287,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415044,-99) , -9, -1.29804, 1, 0, 0.459005,-99) , -8, -0.530108, 0, 0, 0.524963,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357927,-99) , -12, 0.129036, 0, 0, 0.42313,-99) , -14, -3.32002, 0, 0, 0.503482,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390129,-99) , -1, 9.5, 0, 0, 0.480295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248607,-99) , -7, 0.00821357, 0, 0, 0.460488,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241705,-99) , -6, 0.914905, 1, 0, 0.358401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0734829,-99) , -5, 1.81312, 1, 0, 0.264911,-99) , -14, -2.67246, 1, 0, 0.387782,-99) , -4, 1.29076, 1, 0, 0.459306,-99) , -11, 1.5, 0, 0, 0.491751,-99) ); - // itree = 242 - fBoostWeights.push_back(0.0113042); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458938,-99) , -13, 0.0109816, 1, 0, 0.565346,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398391,-99) , -8, 0.932393, 1, 0, 0.473964,-99) , -2, 11.5, 0, 0, 0.536694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293326,-99) , -12, 0.0227642, 0, 0, 0.526756,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465627,-99) , -4, 0.993087, 1, 0, 0.502276,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269385,-99) , -4, 1.10643, 1, 0, 0.352328,-99) , -12, 0.131258, 1, 0, 0.438315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101133,-99) , -5, 1.93372, 1, 0, 0.419995,-99) , -8, -0.774574, 0, 0, 0.508487,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232605,-99) , -3, 0.969191, 0, 0, 0.443157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.105749,-99) , -13, 0.00102362, 1, 0, 0.325003,-99) , -4, 1.77596, 1, 0, 0.491502,-99) ); - // itree = 243 - fBoostWeights.push_back(0.0122886); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401793,-99) , -13, 0.000159397, 0, 0, 0.591927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423098,-99) , -5, 0.56512, 0, 0, 0.561317,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612689,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518978,-99) , -1, 11.5, 0, 0, 0.567672,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425136,-99) , -9, -0.779522, 1, 0, 0.469543,-99) , -10, -1171.04, 1, 0, 0.490227,-99) , -4, 0.72387, 1, 0, 0.513279,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203157,-99) , -15, 0.115314, 0, 0, 0.372041,-99) , -8, -0.946133, 0, 0, 0.500622,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5233,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322221,-99) , -2, 11.5, 0, 0, 0.459451,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50496,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0256105,-99) , -5, 2.14288, 1, 0, 0.168279,-99) , -16, 10.539, 1, 0, 0.21563,-99) , -8, 0.95315, 0, 0, 0.318769,-99) , -4, 1.69361, 1, 0, 0.477556,-99) ); - // itree = 244 - fBoostWeights.push_back(0.0109273); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674467,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475458,-99) , -8, 0.930725, 1, 0, 0.557512,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327067,-99) , -9, 0.157573, 0, 0, 0.417653,-99) , -12, 0.0312849, 0, 0, 0.535163,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535618,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340793,-99) , -7, 0.0672187, 1, 0, 0.498129,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212221,-99) , -13, 0.0113426, 1, 0, 0.374025,-99) , -2, 12.5, 0, 0, 0.447537,-99) , -12, 0.141693, 1, 0, 0.499386,-99) , -12, 0.498177, 0, 0, 0.506655,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293077,-99) , -4, 1.96402, 0, 0, 0.462055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0951964,-99) , -14, -3.05049, 1, 0, 0.338373,-99) , -4, 1.83993, 1, 0, 0.49398,-99) ); - // itree = 245 - fBoostWeights.push_back(0.00999161); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443182,-99) , -8, -0.886183, 0, 0, 0.536541,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25161,-99) , -6, 0.773063, 1, 0, 0.403456,-99) , -7, 0.00940296, 0, 0, 0.525324,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292173,-99) , -12, 0.100363, 0, 0, 0.390414,-99) , -14, -4.66406, 0, 0, 0.514996,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0362199,-99) , -1, 25.5, 0, 0, 0.33821,-99) , -7, 0.105856, 1, 0, 0.504247,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481202,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111464,-99) , -8, 0.934593, 0, 0, 0.334206,-99) , -5, 2.11562, 1, 0, 0.490585,-99) ); - // itree = 246 - fBoostWeights.push_back(0.00990921); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696989,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623467,-99) , -1, 22.5, 0, 0, 0.658589,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572573,-99) , -16, 612.528, 1, 0, 0.631074,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524682,-99) , -3, 0.99798, 1, 0, 0.613728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598141,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368856,-99) , -16, 81.3616, 1, 0, 0.428733,-99) , -6, 0.312619, 1, 0, 0.494631,-99) , -0, 15.5, 0, 0, 0.567999,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401949,-99) , -3, 0.902802, 0, 0, 0.541983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33421,-99) , -14, -4.7865, 0, 0, 0.527134,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336764,-99) , -3, 0.997006, 1, 0, 0.450226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23325,-99) , -7, 0.00870674, 0, 0, 0.431062,-99) , -12, 0.17782, 1, 0, 0.49404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253924,-99) , -4, 1.83285, 1, 0, 0.47748,-99) , -11, 1.5, 0, 0, 0.507346,-99) ); - // itree = 247 - fBoostWeights.push_back(0.0104567); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639369,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539742,-99) , -4, 0.536154, 1, 0, 0.568637,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307649,-99) , -3, 0.934278, 0, 0, 0.47147,-99) , -6, 0.806557, 1, 0, 0.538152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29168,-99) , -15, 0.132915, 0, 0, 0.399581,-99) , -8, -0.945809, 0, 0, 0.523809,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298591,-99) , -4, 1.26447, 0, 0, 0.363764,-99) , -14, -4.5053, 0, 0, 0.511261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59112,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287694,-99) , -4, 1.88228, 1, 0, 0.398646,-99) , -7, 0.0244209, 0, 0, 0.47044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175026,-99) , -13, 0.000889361, 1, 0, 0.368463,-99) , -5, 2.01328, 1, 0, 0.492941,-99) ); - // itree = 248 - fBoostWeights.push_back(0.00866343); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488988,-99) , -5, 1.46909, 1, 0, 0.523884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372789,-99) , -5, 0.437096, 0, 0, 0.516846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281782,-99) , -12, 0.01821, 0, 0, 0.51063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170513,-99) , -7, 0.22995, 1, 0, 0.505689,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0809588,-99) , -8, 0.948486, 0, 0, 0.284745,-99) , -5, 2.12194, 1, 0, 0.488782,-99) ); - // itree = 249 - fBoostWeights.push_back(0.0118493); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631262,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526464,-99) , -2, 20.5, 0, 0, 0.556731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272391,-99) , -3, 0.996573, 1, 0, 0.433469,-99) , -13, 0.0187466, 1, 0, 0.538616,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446093,-99) , -7, 0.0346963, 0, 0, 0.505598,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318501,-99) , -7, 0.014349, 1, 0, 0.397242,-99) , -1, 14.5, 0, 0, 0.449431,-99) , -8, 0.932994, 1, 0, 0.521752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330005,-99) , -12, 0.0227284, 0, 0, 0.51341,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404443,-99) , -14, -4.70385, 0, 0, 0.502668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493275,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433384,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10145,-99) , -12, 0.401427, 0, 0, 0.160054,-99) , -12, 0.0712054, 1, 0, 0.224462,-99) , -16, 18.0679, 1, 0, 0.280091,-99) , -14, -3.8424, 1, 0, 0.37304,-99) , -5, 1.96497, 1, 0, 0.492076,-99) ); - // itree = 250 - fBoostWeights.push_back(0.00781202); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657677,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506847,-99) , -13, 0.000833813, 0, 0, 0.6143,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35547,-99) , -7, 0.032771, 1, 0, 0.529632,-99) , -1, 15.5, 0, 0, 0.567677,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452006,-99) , -12, 0.130585, 1, 0, 0.496593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178212,-99) , -5, 2.25704, 1, 0, 0.489713,-99) , -16, 487.659, 1, 0, 0.519264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258609,-99) , -3, 0.999689, 1, 0, 0.513245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231878,-99) , -4, 2.01487, 1, 0, 0.504348,-99) ); - // itree = 251 - fBoostWeights.push_back(0.00936352); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484836,-99) , -8, 0.885788, 1, 0, 0.54606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39754,-99) , -5, 0.482353, 0, 0, 0.5369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344923,-99) , -7, 0.00848361, 0, 0, 0.528135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309784,-99) , -12, 0.0216784, 0, 0, 0.520449,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435346,-99) , -8, 0.888058, 0, 0, 0.512196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243089,-99) , -5, 2.41145, 1, 0, 0.493945,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313689,-99) , -1, 8.5, 0, 0, 0.460951,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156199,-99) , -12, 0.0999914, 1, 0, 0.231258,-99) , -13, 0.00397553, 1, 0, 0.406089,-99) , -4, 1.52695, 1, 0, 0.49521,-99) ); - // itree = 252 - fBoostWeights.push_back(0.0126066); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69329,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589965,-99) , -13, 0.00630675, 1, 0, 0.651879,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462821,-99) , -13, 8.02228e-05, 0, 0, 0.564816,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333901,-99) , -5, 2.33339, 1, 0, 0.554342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387148,-99) , -7, 0.0338165, 1, 0, 0.533379,-99) , -0, 31.5, 0, 0, 0.563941,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490574,-99) , -13, 0.00183828, 0, 0, 0.539916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33815,-99) , -7, 0.0933173, 1, 0, 0.520859,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320834,-99) , -15, 0.0464417, 0, 0, 0.452636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272241,-99) , -8, 0.870616, 1, 0, 0.408716,-99) , -7, 0.0134327, 0, 0, 0.49376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353099,-99) , -9, -1.74313, 1, 0, 0.425357,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0353751,-99) , -5, 1.90281, 1, 0, 0.227061,-99) , -13, 0.00129914, 1, 0, 0.340459,-99) , -4, 1.52376, 1, 0, 0.460255,-99) , -11, 1.5, 0, 0, 0.495855,-99) ); - // itree = 253 - fBoostWeights.push_back(0.010597); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679833,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558971,-99) , -12, 0.113075, 1, 0, 0.606413,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365346,-99) , -12, 0.15267, 1, 0, 0.454905,-99) , -8, -0.862055, 0, 0, 0.573849,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473799,-99) , -2, 12.5, 0, 0, 0.525498,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309112,-99) , -5, 1.32936, 0, 0, 0.40663,-99) , -15, 0.280743, 1, 0, 0.478273,-99) , -14, -2.91967, 0, 0, 0.541644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385263,-99) , -5, 0.517628, 0, 0, 0.530047,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509803,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312739,-99) , -4, 2.07374, 1, 0, 0.49855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265684,-99) , -3, 0.835467, 0, 0, 0.485081,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262416,-99) , -12, 0.327118, 0, 0, 0.344118,-99) , -13, 0.0081865, 1, 0, 0.464008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.197497,-99) , -7, 0.086597, 1, 0, 0.446443,-99) , -4, 1.26258, 1, 0, 0.496338,-99) ); - // itree = 254 - fBoostWeights.push_back(0.0118203); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635572,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524768,-99) , -13, 0.0155784, 1, 0, 0.620126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467631,-99) , -5, 1.53764, 1, 0, 0.514397,-99) , -8, 0.913953, 1, 0, 0.590255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408159,-99) , -8, -0.921509, 0, 0, 0.572236,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467311,-99) , -13, 0.00124387, 0, 0, 0.54984,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366061,-99) , -5, 1.89456, 1, 0, 0.458862,-99) , -4, 0.800333, 1, 0, 0.492946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279774,-99) , -2, 7.5, 0, 0, 0.483204,-99) , -16, 659.113, 1, 0, 0.520502,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333885,-99) , -2, 11.5, 0, 0, 0.514868,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0557945,-99) , -4, 1.87131, 1, 0, 0.239483,-99) , -14, -3.59794, 1, 0, 0.362014,-99) , -4, 1.69708, 1, 0, 0.500381,-99) ); - // itree = 255 - fBoostWeights.push_back(0.00923595); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633134,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549788,-99) , -11, 1.5, 0, 0, 0.594054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477538,-99) , -12, 0.0366717, 0, 0, 0.57686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284012,-99) , -4, 2.07574, 1, 0, 0.569637,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397319,-99) , -13, 0.0191837, 1, 0, 0.528832,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279123,-99) , -13, 0.00397606, 1, 0, 0.420227,-99) , -4, 1.39201, 1, 0, 0.496711,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162763,-99) , -5, 2.02629, 1, 0, 0.298813,-99) , -7, 0.00914698, 0, 0, 0.479741,-99) , -16, 457.286, 1, 0, 0.513421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196159,-99) , -3, 0.999696, 1, 0, 0.506759,-99) ); - // itree = 256 - fBoostWeights.push_back(0.00972178); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602571,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527396,-99) , -2, 24.5, 0, 0, 0.550823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402239,-99) , -12, 0.028597, 0, 0, 0.539487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576833,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227877,-99) , -3, 0.893446, 0, 0, 0.39343,-99) , -12, 0.0612761, 1, 0, 0.438637,-99) , -7, 0.0121144, 0, 0, 0.521479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308754,-99) , -3, 0.999612, 1, 0, 0.515148,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599587,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0860779,-99) , -5, 2.08116, 1, 0, 0.243003,-99) , -8, 0.98732, 0, 0, 0.361274,-99) , -4, 1.75898, 1, 0, 0.499489,-99) ); - // itree = 257 - fBoostWeights.push_back(0.00832256); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608154,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525598,-99) , -16, 264.126, 1, 0, 0.551429,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358979,-99) , -8, 0.457887, 1, 0, 0.41413,-99) , -12, 0.0295905, 0, 0, 0.541448,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107138,-99) , -1, 22.5, 0, 0, 0.384499,-99) , -7, 0.103168, 1, 0, 0.531343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265371,-99) , -2, 6.5, 0, 0, 0.525941,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146202,-99) , -13, 0.000847541, 1, 0, 0.334085,-99) , -4, 1.82611, 1, 0, 0.511618,-99) ); - // itree = 258 - fBoostWeights.push_back(0.0110386); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704244,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578699,-99) , -15, 0.522143, 1, 0, 0.642624,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562169,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428741,-99) , -7, 0.0987509, 1, 0, 0.542496,-99) , -4, 0.755054, 1, 0, 0.586561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376491,-99) , -3, 0.999335, 1, 0, 0.56854,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649803,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37424,-99) , -15, 0.0479771, 0, 0, 0.495592,-99) , -12, 0.40651, 0, 0, 0.50748,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18197,-99) , -5, 1.51175, 1, 0, 0.307551,-99) , -7, 0.0282163, 1, 0, 0.485487,-99) , -2, 18.5, 0, 0, 0.51842,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192966,-99) , -7, 0.0128637, 0, 0, 0.470914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208515,-99) , -13, 0.000886846, 1, 0, 0.374179,-99) , -4, 1.77228, 1, 0, 0.504219,-99) ); - // itree = 259 - fBoostWeights.push_back(0.00890066); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499379,-99) , -14, -3.15093, 0, 0, 0.566032,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42199,-99) , -12, 0.189188, 1, 0, 0.496154,-99) , -16, 900.89, 1, 0, 0.527198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282257,-99) , -3, 0.999661, 1, 0, 0.520265,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24912,-99) , -14, -5.66159, 0, 0, 0.514183,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454693,-99) , -1, 11.5, 0, 0, 0.555427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385969,-99) , -14, -3.82666, 1, 0, 0.498522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160922,-99) , -8, 0.823585, 0, 0, 0.388465,-99) , -5, 2.02881, 1, 0, 0.499237,-99) ); - // itree = 260 - fBoostWeights.push_back(0.00797074); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.738168,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306868,-99) , -12, 0.0181796, 0, 0, 0.52333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350356,-99) , -7, 0.0121368, 0, 0, 0.407648,-99) , -15, 0.0568173, 0, 0, 0.508464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264338,-99) , -13, 0.0375542, 1, 0, 0.499761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228287,-99) , -5, 2.25776, 1, 0, 0.489331,-99) , -12, 0.534864, 0, 0, 0.498417,-99) ); - // itree = 261 - fBoostWeights.push_back(0.00902826); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43173,-99) , -14, -4.67212, 0, 0, 0.567867,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507339,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315422,-99) , -8, 0.164423, 1, 0, 0.408447,-99) , -12, 0.0296092, 0, 0, 0.53985,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492858,-99) , -6, 0.438389, 1, 0, 0.534367,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439368,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191109,-99) , -13, 0.0189814, 1, 0, 0.417586,-99) , -5, 1.51563, 1, 0, 0.473144,-99) , -12, 0.110599, 1, 0, 0.503783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113929,-99) , -7, 0.329084, 1, 0, 0.500824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0452605,-99) , -5, 2.48979, 1, 0, 0.49626,-99) ); - // itree = 262 - fBoostWeights.push_back(0.00784507); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620404,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519328,-99) , -6, 0.218934, 1, 0, 0.546074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245493,-99) , -5, 2.15674, 1, 0, 0.540121,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323087,-99) , -3, 0.998035, 1, 0, 0.447788,-99) , -4, 1.66004, 0, 0, 0.466859,-99) , -8, 0.835869, 1, 0, 0.51803,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287921,-99) , -12, 0.0182006, 0, 0, 0.511973,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293405,-99) , -6, 0.718457, 0, 0, 0.440154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140193,-99) , -13, 0.00143029, 1, 0, 0.349326,-99) , -4, 1.81964, 1, 0, 0.498819,-99) ); - // itree = 263 - fBoostWeights.push_back(0.0102613); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681565,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577367,-99) , -4, 1.18857, 1, 0, 0.638682,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451282,-99) , -7, 0.0154727, 0, 0, 0.522564,-99) , -12, 0.339381, 0, 0, 0.536016,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263925,-99) , -3, 0.999617, 1, 0, 0.528629,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400244,-99) , -8, 0.763294, 1, 0, 0.51143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235132,-99) , -5, 1.85648, 1, 0, 0.462426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0812296,-99) , -7, 0.0312761, 1, 0, 0.424009,-99) , -1, 9.5, 0, 0, 0.507637,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262157,-99) , -4, 2.00249, 1, 0, 0.4991,-99) ); - // itree = 264 - fBoostWeights.push_back(0.0103239); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659424,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577934,-99) , -7, 0.0261162, 1, 0, 0.610323,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430724,-99) , -4, 1.31656, 1, 0, 0.490682,-99) , -0, 13.5, 0, 0, 0.578263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442517,-99) , -13, 0.000111047, 0, 0, 0.557406,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528514,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392881,-99) , -12, 0.0344222, 0, 0, 0.515846,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177871,-99) , -13, 0.0119986, 1, 0, 0.424689,-99) , -5, 1.65006, 1, 0, 0.484774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228368,-99) , -3, 0.999568, 1, 0, 0.476012,-99) , -11, 1.5, 0, 0, 0.503001,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0703273,-99) , -8, 0.955238, 0, 0, 0.309759,-99) , -5, 2.15914, 1, 0, 0.490346,-99) ); - // itree = 265 - fBoostWeights.push_back(0.0092249); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481,-99) , -14, -4.11808, 0, 0, 0.59916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459461,-99) , -3, 0.998089, 1, 0, 0.572942,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294836,-99) , -7, 0.00711225, 0, 0, 0.509411,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351279,-99) , -7, 0.0330482, 1, 0, 0.497216,-99) , -2, 19.5, 0, 0, 0.522165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299088,-99) , -7, 0.145948, 1, 0, 0.51528,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181026,-99) , -2, 12.5, 0, 0, 0.40322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.074099,-99) , -14, -2.6219, 1, 0, 0.324485,-99) , -4, 1.822, 1, 0, 0.500572,-99) ); - // itree = 266 - fBoostWeights.push_back(0.0120911); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.705302,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57738,-99) , -3, 0.952398, 1, 0, 0.606114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340667,-99) , -5, 2.22773, 1, 0, 0.596794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46209,-99) , -14, -4.20393, 0, 0, 0.578413,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286081,-99) , -16, 1098.64, 1, 0, 0.472761,-99) , -2, 10.5, 0, 0, 0.555798,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431664,-99) , -14, -3.37979, 0, 0, 0.529473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330177,-99) , -2, 8.5, 0, 0, 0.513481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318551,-99) , -15, 1.84275, 1, 0, 0.499812,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447918,-99) , -8, 0.986405, 0, 0, 0.509885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380404,-99) , -7, 0.0181641, 1, 0, 0.464936,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275547,-99) , -0, 13.5, 1, 0, 0.342449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0341683,-99) , -4, 1.81964, 1, 0, 0.290655,-99) , -13, 0.000959314, 1, 0, 0.384734,-99) , -5, 1.6796, 1, 0, 0.459008,-99) , -11, 1.5, 0, 0, 0.49169,-99) ); - // itree = 267 - fBoostWeights.push_back(0.00847068); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.690277,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582697,-99) , -10, 2721.52, 1, 0, 0.634485,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349338,-99) , -4, 1.87189, 1, 0, 0.537205,-99) , -0, 25.5, 0, 0, 0.569207,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335777,-99) , -7, 0.0081862, 0, 0, 0.511517,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305756,-99) , -12, 0.110613, 1, 0, 0.399242,-99) , -4, 1.52392, 1, 0, 0.486606,-99) , -11, 1.5, 0, 0, 0.513261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270851,-99) , -12, 0.01821, 0, 0, 0.506498,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222851,-99) , -3, 0.99965, 1, 0, 0.498578,-99) ); - // itree = 268 - fBoostWeights.push_back(0.0104039); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628892,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526965,-99) , -6, 0.839719, 1, 0, 0.593331,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276,-99) , -7, 0.0454055, 1, 0, 0.492142,-99) , -2, 25.5, 0, 0, 0.512559,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0225538,-99) , -1, 22.5, 0, 0, 0.356559,-99) , -7, 0.10772, 1, 0, 0.503003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21369,-99) , -2, 6.5, 0, 0, 0.497513,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142854,-99) , -14, -4.23178, 1, 0, 0.322638,-99) , -5, 2.16532, 1, 0, 0.486129,-99) ); - // itree = 269 - fBoostWeights.push_back(0.00890232); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41893,-99) , -12, 0.029786, 0, 0, 0.5377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341602,-99) , -3, 0.999616, 1, 0, 0.531052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360046,-99) , -2, 7.5, 0, 0, 0.523238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333068,-99) , -14, -4.77513, 0, 0, 0.512929,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604799,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431133,-99) , -2, 17.5, 0, 0, 0.503564,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108172,-99) , -5, 2.07331, 1, 0, 0.185122,-99) , -8, 0.909314, 0, 0, 0.381097,-99) , -5, 1.98988, 1, 0, 0.494654,-99) ); - // itree = 270 - fBoostWeights.push_back(0.0127451); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723454,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482902,-99) , -3, 0.996103, 1, 0, 0.585433,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292254,-99) , -1, 42.5, 1, 0, 0.469521,-99) , -4, 0.964201, 1, 0, 0.534044,-99) , -9, 4.81129, 0, 0, 0.556583,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641406,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513044,-99) , -4, 1.43681, 0, 0, 0.5573,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488106,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329952,-99) , -7, 0.00793804, 0, 0, 0.474718,-99) , -16, 276.17, 1, 0, 0.49935,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0911316,-99) , -7, 0.0571202, 1, 0, 0.482159,-99) , -1, 14.5, 0, 0, 0.516516,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37958,-99) , -3, 0.980604, 1, 0, 0.497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155121,-99) , -8, 0.951015, 0, 0, 0.348582,-99) , -5, 2.08843, 1, 0, 0.50139,-99) ); - // itree = 271 - fBoostWeights.push_back(0.0106005); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474826,-99) , -7, 0.013911, 0, 0, 0.579096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442544,-99) , -8, -0.896129, 0, 0, 0.558887,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638635,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509193,-99) , -3, 0.996866, 0, 0, 0.546466,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400295,-99) , -12, 0.113302, 1, 0, 0.450613,-99) , -11, 1.5, 0, 0, 0.480356,-99) , -4, 0.911776, 1, 0, 0.512396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268243,-99) , -12, 0.0190151, 0, 0, 0.50544,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537424,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126555,-99) , -12, 0.377599, 0, 0, 0.206827,-99) , -8, 0.994041, 0, 0, 0.306527,-99) , -5, 2.11562, 1, 0, 0.490438,-99) ); - // itree = 272 - fBoostWeights.push_back(0.0105912); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600514,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528433,-99) , -4, 0.810925, 1, 0, 0.55614,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399668,-99) , -10, 1537.06, 1, 0, 0.448007,-99) , -2, 9.5, 0, 0, 0.537065,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364802,-99) , -5, 1.5382, 0, 0, 0.421763,-99) , -12, 0.0313393, 0, 0, 0.525393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360147,-99) , -5, 1.39262, 1, 0, 0.468676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209425,-99) , -3, 0.996781, 1, 0, 0.402869,-99) , -13, 0.0191706, 1, 0, 0.513031,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429636,-99) , -8, 0.995318, 0, 0, 0.495929,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.038571,-99) , -5, 1.97482, 1, 0, 0.201293,-99) , -13, 0.000623751, 1, 0, 0.367881,-99) , -4, 1.69358, 1, 0, 0.494757,-99) ); - // itree = 273 - fBoostWeights.push_back(0.00943143); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69295,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550132,-99) , -8, 0.492333, 1, 0, 0.639075,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435318,-99) , -3, 0.998919, 1, 0, 0.539477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429684,-99) , -2, 8.5, 0, 0, 0.529885,-99) , -12, 0.0582512, 1, 0, 0.547279,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364954,-99) , -12, 0.0311044, 0, 0, 0.533707,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428834,-99) , -1, 10.5, 0, 0, 0.550279,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271833,-99) , -4, 1.89811, 1, 0, 0.444794,-99) , -2, 11.5, 0, 0, 0.50874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213776,-99) , -3, 0.832642, 0, 0, 0.491904,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25346,-99) , -8, -0.319923, 0, 0, 0.347195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0816975,-99) , -4, 1.92627, 1, 0, 0.315317,-99) , -13, 0.00395766, 1, 0, 0.444097,-99) , -4, 1.38454, 1, 0, 0.505148,-99) ); - // itree = 274 - fBoostWeights.push_back(0.0104933); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445104,-99) , -13, 0.00119943, 0, 0, 0.578065,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220658,-99) , -13, 0.0263262, 1, 0, 0.489183,-99) , -5, 1.46888, 1, 0, 0.538215,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535194,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438164,-99) , -15, 0.110906, 0, 0, 0.481295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174447,-99) , -7, 0.0263231, 1, 0, 0.461981,-99) , -2, 12.5, 0, 0, 0.50913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281794,-99) , -3, 0.99963, 1, 0, 0.502377,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122077,-99) , -13, 0.000621529, 1, 0, 0.329278,-99) , -4, 1.83995, 1, 0, 0.489889,-99) ); - // itree = 275 - fBoostWeights.push_back(0.0102489); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679766,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566813,-99) , -2, 14.5, 0, 0, 0.608061,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521672,-99) , -7, 0.0408911, 1, 0, 0.584757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478817,-99) , -14, -4.24117, 0, 0, 0.571289,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320442,-99) , -1, 55.5, 1, 0, 0.504669,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310644,-99) , -0, 11.5, 1, 0, 0.39781,-99) , -1, 8.5, 0, 0, 0.489635,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193987,-99) , -13, 0.0656268, 1, 0, 0.482895,-99) , -11, 1.5, 0, 0, 0.512064,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288252,-99) , -6, 0.627633, 0, 0, 0.484668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0840382,-99) , -13, 0.00084359, 1, 0, 0.346602,-99) , -4, 1.7759, 1, 0, 0.496609,-99) ); - // itree = 276 - fBoostWeights.push_back(0.0112032); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.736827,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558223,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441201,-99) , -8, -0.900949, 0, 0, 0.540389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213054,-99) , -5, 2.12431, 1, 0, 0.535067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415762,-99) , -10, 3201.47, 1, 0, 0.492195,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239924,-99) , -1, 11.5, 0, 0, 0.340224,-99) , -3, 0.992359, 1, 0, 0.442941,-99) , -8, 0.900368, 1, 0, 0.513278,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342224,-99) , -6, 0.914724, 1, 0, 0.442951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180465,-99) , -5, 2.41088, 1, 0, 0.423393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149648,-99) , -13, 0.00447545, 1, 0, 0.367627,-99) , -4, 1.59019, 1, 0, 0.487608,-99) , -12, 0.509824, 0, 0, 0.498046,-99) ); - // itree = 277 - fBoostWeights.push_back(0.00694777); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648265,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558501,-99) , -10, 467.326, 1, 0, 0.584303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432928,-99) , -3, 0.998848, 1, 0, 0.570738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355103,-99) , -5, 2.3102, 1, 0, 0.562619,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458068,-99) , -2, 13.5, 0, 0, 0.502088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32558,-99) , -13, 0.0252534, 1, 0, 0.488257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305314,-99) , -5, 2.13161, 1, 0, 0.475381,-99) , -16, 259.356, 1, 0, 0.503525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24158,-99) , -12, 0.01821, 0, 0, 0.496897,-99) ); - // itree = 278 - fBoostWeights.push_back(0.0101283); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485371,-99) , -13, 0.00936582, 1, 0, 0.5425,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348182,-99) , -6, 0.533574, 0, 0, 0.429187,-99) , -14, -4.1175, 0, 0, 0.531213,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307505,-99) , -12, 0.162462, 1, 0, 0.388317,-99) , -2, 8.5, 0, 0, 0.519783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250124,-99) , -7, 0.179264, 1, 0, 0.513687,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595462,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294077,-99) , -2, 10.5, 0, 0, 0.463431,-99) , -16, 161.686, 1, 0, 0.509134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316384,-99) , -1, 9.5, 0, 0, 0.470998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0775358,-99) , -5, 2.01339, 1, 0, 0.259291,-99) , -8, 0.688203, 0, 0, 0.402734,-99) , -5, 1.87049, 1, 0, 0.490853,-99) ); - // itree = 279 - fBoostWeights.push_back(0.00953216); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392976,-99) , -14, -4.30339, 0, 0, 0.577353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415326,-99) , -5, 0.536936, 0, 0, 0.559765,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463762,-99) , -2, 17.5, 0, 0, 0.494161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32206,-99) , -7, 0.0788238, 1, 0, 0.482493,-99) , -4, 0.969945, 1, 0, 0.517997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294739,-99) , -3, 0.999616, 1, 0, 0.511683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264479,-99) , -7, 0.0119887, 0, 0, 0.491021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180943,-99) , -13, 0.00047423, 1, 0, 0.351589,-99) , -4, 1.75879, 1, 0, 0.495847,-99) ); - // itree = 280 - fBoostWeights.push_back(0.0104588); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642316,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.711798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487016,-99) , -15, 0.166193, 0, 0, 0.620266,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384499,-99) , -8, 0.950059, 1, 0, 0.517019,-99) , -5, 1.94131, 0, 0, 0.538069,-99) , -4, 0.496114, 1, 0, 0.562654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2994,-99) , -4, 1.9963, 1, 0, 0.553985,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424509,-99) , -5, 1.65047, 1, 0, 0.561088,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314161,-99) , -7, 0.0287055, 1, 0, 0.476115,-99) , -2, 18.5, 0, 0, 0.504872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332536,-99) , -7, 0.0978938, 1, 0, 0.494549,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356459,-99) , -6, 0.687064, 0, 0, 0.438201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167991,-99) , -14, -2.81329, 1, 0, 0.351768,-99) , -5, 1.89711, 1, 0, 0.468558,-99) , -16, 488.874, 1, 0, 0.501794,-99) ); - // itree = 281 - fBoostWeights.push_back(0.0062166); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58725,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515416,-99) , -2, 14.5, 0, 0, 0.553007,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436608,-99) , -5, 1.49507, 1, 0, 0.479517,-99) , -16, 535.375, 1, 0, 0.508462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271807,-99) , -3, 0.99965, 1, 0, 0.502262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122279,-99) , -7, 0.253137, 1, 0, 0.497922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124067,-99) , -5, 2.45783, 1, 0, 0.49293,-99) ); - // itree = 282 - fBoostWeights.push_back(0.0100772); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628805,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535241,-99) , -13, 0.0016685, 0, 0, 0.583194,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358004,-99) , -4, 1.2241, 0, 0, 0.441541,-99) , -12, 0.0305522, 0, 0, 0.556802,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612501,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395176,-99) , -4, 1.29133, 1, 0, 0.468297,-99) , -12, 0.414272, 0, 0, 0.483657,-99) , -12, 0.113336, 1, 0, 0.518543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178562,-99) , -7, 0.240247, 1, 0, 0.514314,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374342,-99) , -9, -0.795038, 1, 0, 0.470142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -3, 0.997585, 1, 0, 0.415759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0365464,-99) , -8, 0.283543, 0, 0, 0.346226,-99) , -5, 2.15507, 1, 0, 0.502663,-99) ); - // itree = 283 - fBoostWeights.push_back(0.00684019); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574752,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510999,-99) , -2, 18.5, 0, 0, 0.539521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376601,-99) , -14, -5.19174, 0, 0, 0.53192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340663,-99) , -3, 0.999367, 1, 0, 0.522872,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366835,-99) , -8, 0.926929, 1, 0, 0.475788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189689,-99) , -5, 2.10056, 1, 0, 0.462549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130559,-99) , -7, 0.038503, 1, 0, 0.439163,-99) , -1, 9.5, 0, 0, 0.505632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282387,-99) , -4, 1.9534, 1, 0, 0.496036,-99) ); - // itree = 284 - fBoostWeights.push_back(0.00748934); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.673946,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568787,-99) , -1, 12.5, 0, 0, 0.626683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599753,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505201,-99) , -6, 0.31105, 1, 0, 0.546452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420514,-99) , -3, 0.997728, 1, 0, 0.529657,-99) , -10, 105.942, 1, 0, 0.556733,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343674,-99) , -14, -4.84729, 0, 0, 0.488507,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421279,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222968,-99) , -13, 0.0020523, 1, 0, 0.362689,-99) , -7, 0.00936597, 0, 0, 0.476101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306221,-99) , -7, 0.0991061, 1, 0, 0.465732,-99) , -16, 258.507, 1, 0, 0.496187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230289,-99) , -4, 1.97329, 1, 0, 0.486426,-99) ); - // itree = 285 - fBoostWeights.push_back(0.0075645); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66299,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654856,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535529,-99) , -10, 9690.98, 0, 0, 0.557785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413693,-99) , -7, 0.0362416, 1, 0, 0.540979,-99) , -2, 29.5, 0, 0, 0.568104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489875,-99) , -2, 24.5, 0, 0, 0.510556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326547,-99) , -2, 7.5, 0, 0, 0.500481,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213006,-99) , -4, 0.996044, 1, 0, 0.335268,-99) , -13, 0.0190761, 1, 0, 0.483745,-99) , -11, 1.5, 0, 0, 0.512103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293499,-99) , -12, 0.0227741, 0, 0, 0.503225,-99) ); - // itree = 286 - fBoostWeights.push_back(0.0101089); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.702576,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584296,-99) , -7, 0.080108, 1, 0, 0.648962,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632643,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437798,-99) , -8, 0.970748, 1, 0, 0.52041,-99) , -15, 0.0636413, 1, 0, 0.541629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335554,-99) , -5, 2.11426, 1, 0, 0.521982,-99) , -2, 27.5, 0, 0, 0.553336,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314433,-99) , -1, 53.5, 1, 0, 0.509245,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277319,-99) , -5, 1.61798, 1, 0, 0.389193,-99) , -1, 8.5, 0, 0, 0.491964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272224,-99) , -3, 0.773319, 0, 0, 0.482987,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562607,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357047,-99) , -8, 0.984241, 0, 0, 0.454066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117601,-99) , -13, 0.00153785, 1, 0, 0.339019,-99) , -4, 1.70237, 1, 0, 0.465155,-99) , -11, 1.5, 0, 0, 0.494928,-99) ); - // itree = 287 - fBoostWeights.push_back(0.0099704); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678369,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592137,-99) , -13, 0.00953101, 1, 0, 0.645196,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522307,-99) , -15, 1.34338, 1, 0, 0.616318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442035,-99) , -3, 0.998018, 1, 0, 0.581141,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625311,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450198,-99) , -2, 10.5, 0, 0, 0.512129,-99) , -16, 95.3163, 1, 0, 0.541727,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529893,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331833,-99) , -5, 1.60984, 1, 0, 0.422912,-99) , -4, 0.541281, 1, 0, 0.455394,-99) , -10, 2644.58, 1, 0, 0.496465,-99) , -2, 21.5, 0, 0, 0.526313,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480545,-99) , -2, 24.5, 0, 0, 0.507463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188968,-99) , -3, 0.999275, 1, 0, 0.492232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302551,-99) , -3, 0.902953, 0, 0, 0.470848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193831,-99) , -7, 0.0800174, 1, 0, 0.450386,-99) , -4, 1.2938, 1, 0, 0.498026,-99) ); - // itree = 288 - fBoostWeights.push_back(0.00735033); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678948,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41767,-99) , -8, 0.984932, 1, 0, 0.523505,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403328,-99) , -9, 4.41444, 0, 0, 0.435638,-99) , -15, 0.0879128, 0, 0, 0.502239,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122605,-99) , -5, 1.54657, 1, 0, 0.350048,-99) , -13, 0.0234581, 1, 0, 0.491656,-99) , -12, 0.507915, 0, 0, 0.498511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209732,-99) , -4, 2.07376, 1, 0, 0.491772,-99) ); - // itree = 289 - fBoostWeights.push_back(0.00817694); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668699,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475096,-99) , -5, 1.52006, 1, 0, 0.52444,-99) , -9, 5.63832, 0, 0, 0.543735,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305087,-99) , -7, 0.00738126, 0, 0, 0.486443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177113,-99) , -7, 0.0280932, 1, 0, 0.467462,-99) , -2, 13.5, 0, 0, 0.50881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215215,-99) , -4, 2.10615, 1, 0, 0.503502,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259114,-99) , -7, 0.143618, 1, 0, 0.494931,-99) ); - // itree = 290 - fBoostWeights.push_back(0.00945323); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.721244,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608921,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511355,-99) , -9, 4.44201, 0, 0, 0.528062,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347569,-99) , -6, 0.362579, 0, 0, 0.417212,-99) , -14, -4.14349, 0, 0, 0.514502,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0783805,-99) , -5, 1.43667, 1, 0, 0.363671,-99) , -13, 0.0251451, 1, 0, 0.504561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445965,-99) , -10, 4748.73, 0, 0, 0.534465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325428,-99) , -7, 0.012124, 0, 0, 0.487636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202623,-99) , -13, 0.000621572, 1, 0, 0.3821,-99) , -5, 2.02593, 1, 0, 0.490202,-99) , -12, 0.526826, 0, 0, 0.498339,-99) ); - // itree = 291 - fBoostWeights.push_back(0.0102388); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445259,-99) , -3, 0.998905, 1, 0, 0.571584,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441213,-99) , -5, 1.42045, 1, 0, 0.495193,-99) , -16, 1923.13, 1, 0, 0.534548,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370536,-99) , -13, 0.0098479, 1, 0, 0.426095,-99) , -8, -0.894173, 0, 0, 0.521367,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676849,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542123,-99) , -4, 1.92593, 0, 0, 0.592764,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225734,-99) , -7, 0.0115499, 0, 0, 0.427185,-99) , -9, -1.62512, 1, 0, 0.497145,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132452,-99) , -4, 1.68391, 1, 0, 0.258934,-99) , -14, -2.67019, 1, 0, 0.424007,-99) , -4, 1.54538, 1, 0, 0.502089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0763588,-99) , -5, 2.48296, 1, 0, 0.497287,-99) ); - // itree = 292 - fBoostWeights.push_back(0.00714364); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392261,-99) , -5, 1.92881, 1, 0, 0.53295,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406207,-99) , -5, 2.00966, 0, 0, 0.431962,-99) , -14, -3.72889, 0, 0, 0.514399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254662,-99) , -2, 6.5, 0, 0, 0.508579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263185,-99) , -3, 0.999646, 1, 0, 0.502171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254423,-99) , -4, 1.91927, 1, 0, 0.490195,-99) ); - // itree = 293 - fBoostWeights.push_back(0.00946927); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.718305,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49484,-99) , -14, -3.11047, 0, 0, 0.552445,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172331,-99) , -7, 0.026758, 1, 0, 0.471833,-99) , -2, 13.5, 0, 0, 0.515082,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365057,-99) , -6, 0.765854, 0, 0, 0.427391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14212,-99) , -5, 1.58261, 1, 0, 0.364034,-99) , -13, 0.0178794, 1, 0, 0.500214,-99) , -12, 0.50597, 0, 0, 0.508817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246086,-99) , -5, 2.25085, 1, 0, 0.498671,-99) ); - // itree = 294 - fBoostWeights.push_back(0.00795267); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60645,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515249,-99) , -10, 15.2853, 1, 0, 0.53752,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135782,-99) , -7, 0.0306926, 1, 0, 0.442894,-99) , -1, 9.5, 0, 0, 0.516779,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238232,-99) , -2, 6.5, 0, 0, 0.510826,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268885,-99) , -7, 0.137261, 1, 0, 0.502343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315347,-99) , -9, 0.288488, 0, 0, 0.393466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266566,-99) , -3, 0.994822, 1, 0, 0.352819,-99) , -12, 0.0312838, 0, 0, 0.489577,-99) ); - // itree = 295 - fBoostWeights.push_back(0.0100087); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614528,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50518,-99) , -13, 0.0101609, 1, 0, 0.589042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42067,-99) , -16, 179.997, 1, 0, 0.480221,-99) , -2, 11.5, 0, 0, 0.55665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164972,-99) , -5, 2.43961, 1, 0, 0.548435,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41789,-99) , -8, -0.904218, 0, 0, 0.538915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370143,-99) , -14, -3.51668, 0, 0, 0.520204,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450435,-99) , -8, 0.0535785, 1, 0, 0.469327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.76107, 1, 0, 0.329649,-99) , -14, -2.4829, 1, 0, 0.424676,-99) , -5, 1.47614, 1, 0, 0.468562,-99) , -11, 1.5, 0, 0, 0.494614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254242,-99) , -12, 0.01821, 0, 0, 0.48811,-99) ); - // itree = 296 - fBoostWeights.push_back(0.00651093); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233294,-99) , -5, 2.54964, 1, 0, 0.532819,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329588,-99) , -1, 12.5, 0, 0, 0.410747,-99) , -8, -0.935908, 0, 0, 0.521456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311396,-99) , -14, -5.73771, 0, 0, 0.515735,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338248,-99) , -5, 1.49994, 1, 0, 0.47143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0286752,-99) , -1, 19.5, 0, 0, 0.379241,-99) , -7, 0.0992014, 1, 0, 0.506296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251112,-99) , -2, 6.5, 0, 0, 0.501274,-99) ); - // itree = 297 - fBoostWeights.push_back(0.00785674); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598188,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483017,-99) , -8, -0.893179, 0, 0, 0.583731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42289,-99) , -2, 16.5, 0, 0, 0.497136,-99) , -6, 0.820669, 1, 0, 0.558185,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316058,-99) , -7, 0.00888959, 0, 0, 0.487528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251423,-99) , -4, 1.83116, 1, 0, 0.474288,-99) , -12, 0.111253, 1, 0, 0.512736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28707,-99) , -12, 0.01821, 0, 0, 0.506765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159714,-99) , -5, 2.35099, 1, 0, 0.49908,-99) ); - // itree = 298 - fBoostWeights.push_back(0.00792567); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678651,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572134,-99) , -2, 24.5, 0, 0, 0.59714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478232,-99) , -12, 0.0347354, 0, 0, 0.581051,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344595,-99) , -1, 47.5, 1, 0, 0.534916,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141907,-99) , -7, 0.0283975, 1, 0, 0.449235,-99) , -2, 13.5, 0, 0, 0.495688,-99) , -16, 220.959, 1, 0, 0.522531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233842,-99) , -5, 2.44702, 1, 0, 0.517747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241864,-99) , -7, 0.16191, 1, 0, 0.510328,-99) ); - // itree = 299 - fBoostWeights.push_back(0.00860653); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723622,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472823,-99) , -12, 0.186916, 1, 0, 0.533029,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309764,-99) , -6, 0.50932, 0, 0, 0.406057,-99) , -14, -4.58836, 0, 0, 0.523576,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206128,-99) , -5, 2.48281, 1, 0, 0.47143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0991068,-99) , -13, 0.00267865, 1, 0, 0.399412,-99) , -5, 2.01196, 1, 0, 0.508046,-99) , -12, 0.53396, 0, 0, 0.515815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270097,-99) , -3, 0.999638, 1, 0, 0.508865,-99) ); - // itree = 300 - fBoostWeights.push_back(0.00844245); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433102,-99) , -7, 0.0126556, 0, 0, 0.551182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366705,-99) , -12, 0.0216798, 0, 0, 0.542642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340507,-99) , -3, 0.999435, 1, 0, 0.534003,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403129,-99) , -7, 0.00902712, 0, 0, 0.495231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278064,-99) , -5, 2.03675, 1, 0, 0.472611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.059363,-99) , -7, 0.0461125, 1, 0, 0.455304,-99) , -1, 11.5, 0, 0, 0.504104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212986,-99) , -13, 0.0588589, 1, 0, 0.497792,-99) ); - // itree = 301 - fBoostWeights.push_back(0.00805224); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632275,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542316,-99) , -4, 0.911761, 1, 0, 0.581372,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377068,-99) , -3, 0.999081, 1, 0, 0.50358,-99) , -16, 1913.41, 1, 0, 0.543003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323528,-99) , -12, 0.0224522, 0, 0, 0.535544,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427641,-99) , -4, 0.936866, 1, 0, 0.479968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357596,-99) , -1, 12.5, 0, 0, 0.429174,-99) , -8, -0.895033, 0, 0, 0.521842,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39171,-99) , -1, 14.5, 0, 0, 0.491382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22596,-99) , -8, 0.777559, 0, 0, 0.391429,-99) , -4, 1.69664, 1, 0, 0.505816,-99) ); - // itree = 302 - fBoostWeights.push_back(0.0103835); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642255,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245635,-99) , -7, 0.148212, 1, 0, 0.521176,-99) , -4, 0.228013, 1, 0, 0.53568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342715,-99) , -5, 0.565929, 0, 0, 0.525104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356864,-99) , -14, -4.63991, 0, 0, 0.514817,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410588,-99) , -4, 1.65979, 0, 0, 0.56714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429475,-99) , -14, -3.97971, 1, 0, 0.508698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245244,-99) , -3, 0.998839, 1, 0, 0.485851,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128492,-99) , -11, 1.5, 0, 0, 0.246877,-99) , -8, 0.7469, 0, 0, 0.408223,-99) , -5, 1.9082, 1, 0, 0.495135,-99) ); - // itree = 303 - fBoostWeights.push_back(0.0093419); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646912,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431329,-99) , -7, 0.0327157, 1, 0, 0.556738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274033,-99) , -5, 2.30831, 1, 0, 0.545398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374682,-99) , -14, -4.52096, 0, 0, 0.526813,-99) , -0, 36.5, 0, 0, 0.55333,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340203,-99) , -7, 0.00867705, 0, 0, 0.503731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254987,-99) , -8, 0.424081, 0, 0, 0.408374,-99) , -5, 1.74326, 1, 0, 0.476647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100674,-99) , -7, 0.250772, 1, 0, 0.471377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0990592,-99) , -5, 2.34539, 1, 0, 0.464071,-99) , -11, 1.5, 0, 0, 0.494716,-99) ); - // itree = 304 - fBoostWeights.push_back(0.00864541); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594464,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519192,-99) , -6, 0.839155, 1, 0, 0.573838,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354282,-99) , -4, 1.12614, 0, 0, 0.42599,-99) , -8, 0.982758, 1, 0, 0.555478,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441256,-99) , -4, 1.19068, 1, 0, 0.500744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321074,-99) , -8, -0.882606, 0, 0, 0.48225,-99) , -12, 0.125943, 1, 0, 0.51786,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328105,-99) , -12, 0.0227069, 0, 0, 0.510402,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384619,-99) , -8, 0.994561, 0, 0, 0.485332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181358,-99) , -14, -3.26425, 1, 0, 0.360378,-99) , -4, 1.78478, 1, 0, 0.497194,-99) ); - // itree = 305 - fBoostWeights.push_back(0.00808215); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59085,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397281,-99) , -5, 2.08868, 1, 0, 0.581429,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356983,-99) , -7, 0.0211354, 0, 0, 0.452788,-99) , -8, 0.987387, 1, 0, 0.565795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344446,-99) , -12, 0.0216868, 0, 0, 0.548643,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644728,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501397,-99) , -9, 3.29452, 0, 0, 0.532087,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386024,-99) , -9, -1.13349, 1, 0, 0.436176,-99) , -16, 1260.69, 1, 0, 0.478958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181241,-99) , -4, 2.1314, 1, 0, 0.473723,-99) , -12, 0.125925, 1, 0, 0.512173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26753,-99) , -3, 0.999694, 1, 0, 0.506108,-99) ); - // itree = 306 - fBoostWeights.push_back(0.00696937); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692728,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53659,-99) , -4, 1.56562, 1, 0, 0.657716,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41243,-99) , -12, 0.0286175, 0, 0, 0.545061,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396441,-99) , -4, 1.29757, 1, 0, 0.467853,-99) , -12, 0.113729, 1, 0, 0.506793,-99) , -12, 0.414466, 0, 0, 0.51695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267389,-99) , -7, 0.177994, 1, 0, 0.510998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202312,-99) , -5, 2.44862, 1, 0, 0.506267,-99) ); - // itree = 307 - fBoostWeights.push_back(0.0055902); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582438,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516528,-99) , -5, 1.28713, 1, 0, 0.536766,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357212,-99) , -12, 0.0216528, 0, 0, 0.530145,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397768,-99) , -9, -0.198957, 0, 0, 0.45925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179011,-99) , -5, 1.73862, 1, 0, 0.414239,-99) , -8, -0.914904, 0, 0, 0.518296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179972,-99) , -7, 0.253137, 1, 0, 0.514579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262852,-99) , -4, 2.07713, 1, 0, 0.508708,-99) ); - // itree = 308 - fBoostWeights.push_back(0.00850126); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649632,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545432,-99) , -8, -0.67209, 0, 0, 0.623764,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451415,-99) , -7, 0.0163129, 1, 0, 0.530233,-99) , -2, 13.5, 0, 0, 0.589182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415479,-99) , -13, 0.000105832, 0, 0, 0.568195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410267,-99) , -5, 0.447458, 0, 0, 0.551051,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470067,-99) , -16, 471.582, 1, 0, 0.499227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364217,-99) , -8, -0.894827, 0, 0, 0.485653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496096,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258445,-99) , -12, 0.114386, 1, 0, 0.31388,-99) , -16, 90.0649, 1, 0, 0.360204,-99) , -3, 0.922895, 0, 0, 0.465639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20166,-99) , -7, 0.133116, 1, 0, 0.456611,-99) , -4, 0.91767, 1, 0, 0.494029,-99) ); - // itree = 309 - fBoostWeights.push_back(0.00813293); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401908,-99) , -8, 0.996268, 1, 0, 0.554882,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467479,-99) , -12, 0.474146, 0, 0, 0.483092,-99) , -12, 0.124192, 1, 0, 0.518376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336898,-99) , -12, 0.0216969, 0, 0, 0.511142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148522,-99) , -7, 0.252977, 1, 0, 0.507131,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0672517,-99) , -8, 0.950252, 0, 0, 0.319028,-99) , -5, 2.16629, 1, 0, 0.495201,-99) ); - // itree = 310 - fBoostWeights.push_back(0.0107175); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.710691,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448309,-99) , -13, 0.0082111, 1, 0, 0.560854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425985,-99) , -14, -4.88047, 0, 0, 0.548584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340722,-99) , -12, 0.0233643, 0, 0, 0.527627,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652256,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507112,-99) , -15, 0.247576, 1, 0, 0.583607,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428701,-99) , -16, 3819.99, 1, 0, 0.474032,-99) , -2, 17.5, 0, 0, 0.525364,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229025,-99) , -7, 0.00915005, 0, 0, 0.420429,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0841861,-99) , -15, 0.205747, 1, 0, 0.259849,-99) , -13, 0.0106272, 1, 0, 0.388513,-99) , -5, 1.44017, 1, 0, 0.445387,-99) , -12, 0.113578, 1, 0, 0.484976,-99) , -12, 0.521669, 0, 0, 0.49346,-99) ); - // itree = 311 - fBoostWeights.push_back(0.00984891); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654938,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553347,-99) , -2, 24.5, 0, 0, 0.576469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476613,-99) , -15, 1.6135, 1, 0, 0.564434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426011,-99) , -8, -0.921702, 0, 0, 0.550066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390139,-99) , -12, 0.0216896, 0, 0, 0.534435,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.689932,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365982,-99) , -8, -0.932414, 0, 0, 0.491205,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286251,-99) , -10, 3124.97, 1, 0, 0.376844,-99) , -8, 0.928972, 1, 0, 0.468324,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0631581,-99) , -3, 0.925281, 0, 0, 0.361836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.088761,-99) , -13, 0.00946541, 1, 0, 0.312358,-99) , -4, 1.59619, 1, 0, 0.440664,-99) , -12, 0.522829, 0, 0, 0.456296,-99) , -12, 0.111498, 1, 0, 0.492991,-99) ); - // itree = 312 - fBoostWeights.push_back(0.00872939); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448677,-99) , -7, 0.010373, 0, 0, 0.596066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426132,-99) , -8, 0.989923, 1, 0, 0.577527,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374622,-99) , -7, 0.0213137, 1, 0, 0.431529,-99) , -12, 0.0313038, 0, 0, 0.558139,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620211,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170418,-99) , -7, 0.0510563, 1, 0, 0.462697,-99) , -2, 33.5, 0, 0, 0.479681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263478,-99) , -7, 0.101834, 1, 0, 0.467703,-99) , -12, 0.101422, 1, 0, 0.504271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278425,-99) , -12, 0.0198681, 0, 0, 0.497249,-99) ); - // itree = 313 - fBoostWeights.push_back(0.00997412); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684838,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637778,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53064,-99) , -6, 0.268839, 1, 0, 0.565603,-99) , -5, 1.77898, 0, 0, 0.588504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420794,-99) , -14, -3.86327, 0, 0, 0.562064,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653324,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525377,-99) , -16, 2349.06, 1, 0, 0.574393,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457994,-99) , -10, -1104.62, 1, 0, 0.478729,-99) , -5, 1.36723, 1, 0, 0.515328,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340241,-99) , -7, 0.0118804, 0, 0, 0.439946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24723,-99) , -13, 0.0375649, 1, 0, 0.427769,-99) , -6, 0.664749, 1, 0, 0.479926,-99) , -11, 1.5, 0, 0, 0.506364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537783,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181594,-99) , -11, 1.5, 0, 0, 0.278604,-99) , -14, -4.08325, 1, 0, 0.375643,-99) , -5, 1.99792, 1, 0, 0.489616,-99) ); - // itree = 314 - fBoostWeights.push_back(0.00553907); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534381,-99) , -2, 36.5, 0, 0, 0.55201,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457009,-99) , -4, 0.832538, 1, 0, 0.482922,-99) , -16, 512.434, 1, 0, 0.509317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198857,-99) , -7, 0.251646, 1, 0, 0.505473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175676,-99) , -4, 2.13145, 1, 0, 0.500278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144777,-99) , -7, 0.00660336, 0, 0, 0.495517,-99) ); - // itree = 315 - fBoostWeights.push_back(0.0123102); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.706805,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555778,-99) , -6, 0.714363, 1, 0, 0.639542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491761,-99) , -13, 0.019532, 1, 0, 0.603739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385464,-99) , -8, -0.478495, 0, 0, 0.448004,-99) , -6, 0.47223, 1, 0, 0.494502,-99) , -2, 15.5, 0, 0, 0.560235,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387298,-99) , -15, 0.290156, 1, 0, 0.460387,-99) , -13, 0.00119603, 0, 0, 0.534019,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649818,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567983,-99) , -7, 0.042885, 1, 0, 0.614548,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591216,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3894,-99) , -8, 0.850401, 1, 0, 0.518621,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346204,-99) , -5, 2.0551, 1, 0, 0.480318,-99) , -0, 20.5, 0, 0, 0.531736,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341719,-99) , -6, 0.132252, 0, 0, 0.462301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0732019,-99) , -4, 2.15954, 1, 0, 0.453003,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20958,-99) , -15, 0.123876, 1, 0, 0.299118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0599609,-99) , -4, 1.81763, 1, 0, 0.268657,-99) , -13, 0.00466297, 1, 0, 0.408295,-99) , -11, 1.5, 0, 0, 0.450963,-99) , -5, 1.53034, 1, 0, 0.492868,-99) ); - // itree = 316 - fBoostWeights.push_back(0.00978985); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628414,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521596,-99) , -6, 0.916307, 1, 0, 0.59186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300908,-99) , -7, 0.061936, 1, 0, 0.481788,-99) , -5, 1.46847, 1, 0, 0.548833,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475677,-99) , -16, 10.9612, 1, 0, 0.490189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255283,-99) , -7, 0.0332306, 1, 0, 0.478654,-99) , -2, 16.5, 0, 0, 0.50935,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171813,-99) , -14, -3.71174, 1, 0, 0.357593,-99) , -5, 2.13012, 1, 0, 0.497931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228459,-99) , -3, 0.99965, 1, 0, 0.490533,-99) ); - // itree = 317 - fBoostWeights.push_back(0.010988); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.706113,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676841,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545127,-99) , -6, 0.254164, 1, 0, 0.576497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407809,-99) , -8, -0.947199, 0, 0, 0.554059,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421185,-99) , -16, 2760.51, 1, 0, 0.480468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302157,-99) , -12, 0.0728796, 0, 0, 0.37604,-99) , -6, 0.620742, 1, 0, 0.435972,-99) , -14, -2.77726, 0, 0, 0.517052,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328865,-99) , -3, 0.99894, 1, 0, 0.481325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220604,-99) , -7, 0.00716579, 0, 0, 0.471901,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233912,-99) , -7, 0.0353941, 1, 0, 0.362713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0475249,-99) , -5, 2.00668, 1, 0, 0.301983,-99) , -13, 0.00511667, 1, 0, 0.437273,-99) , -5, 1.57335, 1, 0, 0.480518,-99) , -12, 0.528197, 0, 0, 0.488161,-99) ); - // itree = 318 - fBoostWeights.push_back(0.00859045); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.716583,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272264,-99) , -12, 0.018167, 0, 0, 0.531394,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202435,-99) , -5, 1.38754, 1, 0, 0.372932,-99) , -13, 0.0201938, 1, 0, 0.516727,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397113,-99) , -16, 69.7444, 1, 0, 0.426787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178045,-99) , -15, 0.0308553, 0, 0, 0.403329,-99) , -2, 9.5, 0, 0, 0.498722,-99) , -12, 0.526678, 0, 0, 0.506436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202566,-99) , -3, 0.999683, 1, 0, 0.499905,-99) ); - // itree = 319 - fBoostWeights.push_back(0.00936589); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621651,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503859,-99) , -14, -2.9126, 0, 0, 0.573814,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458899,-99) , -4, 0.653476, 1, 0, 0.494182,-99) , -12, 0.129353, 1, 0, 0.534701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359269,-99) , -12, 0.0226393, 0, 0, 0.526844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36362,-99) , -5, 0.401992, 0, 0, 0.518167,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599964,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175671,-99) , -4, 2.06964, 1, 0, 0.446901,-99) , -9, -4.33738, 1, 0, 0.487317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178899,-99) , -3, 0.889798, 0, 0, 0.460995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239626,-99) , -14, -2.4018, 1, 0, 0.409453,-99) , -4, 1.56679, 1, 0, 0.497779,-99) ); - // itree = 320 - fBoostWeights.push_back(0.00734744); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688263,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584427,-99) , -12, 0.318744, 0, 0, 0.598127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438207,-99) , -14, -4.82892, 0, 0, 0.583376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453088,-99) , -8, -0.897634, 0, 0, 0.56969,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433175,-99) , -5, 1.79087, 1, 0, 0.508281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222181,-99) , -3, 0.730154, 0, 0, 0.500115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302547,-99) , -7, 0.0949946, 1, 0, 0.487099,-99) , -11, 1.5, 0, 0, 0.514009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205233,-99) , -3, 0.999646, 1, 0, 0.506984,-99) ); - // itree = 321 - fBoostWeights.push_back(0.00782074); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273838,-99) , -4, 1.96766, 1, 0, 0.581899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419924,-99) , -14, -4.67536, 0, 0, 0.563849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684997,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425849,-99) , -4, 0.849013, 1, 0, 0.462852,-99) , -12, 0.511969, 0, 0, 0.477575,-99) , -12, 0.111457, 1, 0, 0.515491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314113,-99) , -12, 0.0217817, 0, 0, 0.507166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115688,-99) , -7, 0.240142, 1, 0, 0.502739,-99) ); - // itree = 322 - fBoostWeights.push_back(0.0111555); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682119,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576367,-99) , -3, 0.98929, 1, 0, 0.63094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629009,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538359,-99) , -7, 0.0212173, 0, 0, 0.592465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458446,-99) , -9, -0.646645, 1, 0, 0.550358,-99) , -10, 1414.35, 1, 0, 0.581352,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400484,-99) , -4, 1.3118, 1, 0, 0.497599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236397,-99) , -4, 1.84909, 1, 0, 0.480545,-99) , -16, 950.953, 1, 0, 0.552722,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608267,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502985,-99) , -8, 0.726429, 1, 0, 0.575063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412374,-99) , -12, 0.03128, 0, 0, 0.545697,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431613,-99) , -5, 1.31836, 1, 0, 0.483036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267623,-99) , -7, 0.0893844, 1, 0, 0.467056,-99) , -12, 0.108655, 1, 0, 0.503582,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357491,-99) , -14, -3.41482, 1, 0, 0.458991,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216214,-99) , -8, 0.623781, 0, 0, 0.339945,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124741,-99) , -5, 2.12905, 1, 0, 0.290173,-99) , -11, 0.5, 1, 0, 0.374153,-99) , -5, 1.76626, 1, 0, 0.468566,-99) , -11, 1.5, 0, 0, 0.496164,-99) ); - // itree = 323 - fBoostWeights.push_back(0.0102313); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66413,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621361,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510704,-99) , -2, 15.5, 0, 0, 0.579814,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42708,-99) , -5, 1.59201, 0, 0, 0.478052,-99) , -14, -2.91365, 0, 0, 0.534816,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316368,-99) , -3, 0.999003, 1, 0, 0.492091,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174218,-99) , -5, 1.54232, 1, 0, 0.350991,-99) , -8, -0.774762, 0, 0, 0.46919,-99) , -12, 0.12333, 1, 0, 0.504148,-99) , -12, 0.469657, 0, 0, 0.511289,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370818,-99) , -12, 0.113166, 1, 0, 0.463654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16045,-99) , -8, 0.920383, 0, 0, 0.343941,-99) , -5, 2.03873, 1, 0, 0.493909,-99) ); - // itree = 324 - fBoostWeights.push_back(0.00579837); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695816,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262119,-99) , -7, 0.179104, 1, 0, 0.514698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286925,-99) , -12, 0.0186433, 0, 0, 0.507866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32043,-99) , -15, 0.0377339, 0, 0, 0.499086,-99) , -12, 0.512772, 0, 0, 0.507007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211273,-99) , -4, 2.07717, 1, 0, 0.501054,-99) ); - // itree = 325 - fBoostWeights.push_back(0.00967037); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404494,-99) , -7, 0.0163466, 0, 0, 0.568998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183164,-99) , -1, 17.5, 0, 0, 0.460157,-99) , -7, 0.0561471, 1, 0, 0.538044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282212,-99) , -3, 0.791412, 0, 0, 0.469866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175772,-99) , -7, 0.0308553, 1, 0, 0.455656,-99) , -2, 13.5, 0, 0, 0.500895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269532,-99) , -3, 0.99965, 1, 0, 0.494266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252923,-99) , -4, 1.99493, 1, 0, 0.48605,-99) ); - // itree = 326 - fBoostWeights.push_back(0.00853193); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655629,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465276,-99) , -8, 0.971292, 1, 0, 0.545778,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404511,-99) , -9, 1.51336, 0, 0, 0.447,-99) , -15, 0.0835304, 0, 0, 0.526853,-99) , -12, 0.387227, 0, 0, 0.536779,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365015,-99) , -8, 0.726402, 1, 0, 0.475371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296769,-99) , -15, 0.728912, 1, 0, 0.437801,-99) , -3, 0.998037, 1, 0, 0.520243,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194062,-99) , -3, 0.999344, 1, 0, 0.485074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291206,-99) , -7, 0.0100725, 0, 0, 0.459958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0385012,-99) , -13, 0.0350465, 1, 0, 0.446297,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108849,-99) , -3, 0.835754, 0, 0, 0.42794,-99) , -4, 1.52401, 1, 0, 0.499555,-99) ); - // itree = 327 - fBoostWeights.push_back(0.00847907); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648398,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535815,-99) , -8, -0.638013, 0, 0, 0.618043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354892,-99) , -5, 2.1467, 1, 0, 0.608567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470963,-99) , -5, 1.87777, 0, 0, 0.517874,-99) , -13, 0.000962469, 0, 0, 0.576987,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454616,-99) , -8, 0.4106, 1, 0, 0.514075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37218,-99) , -6, 0.596339, 1, 0, 0.462984,-99) , -2, 11.5, 0, 0, 0.542683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527675,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457538,-99) , -12, 0.110533, 1, 0, 0.489644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0937981,-99) , -7, 0.251046, 1, 0, 0.484188,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24133,-99) , -3, 0.771555, 0, 0, 0.474704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241701,-99) , -5, 2.10428, 1, 0, 0.458355,-99) , -11, 1.5, 0, 0, 0.48658,-99) ); - // itree = 328 - fBoostWeights.push_back(0.00818971); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416193,-99) , -13, 0.0455279, 1, 0, 0.588462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247904,-99) , -1, 11.5, 0, 0, 0.569596,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202661,-99) , -0, 36.5, 1, 0, 0.493441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0425598,-99) , -7, 0.070528, 1, 0, 0.486356,-99) , -2, 25.5, 0, 0, 0.507313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218879,-99) , -7, 0.00714217, 0, 0, 0.501408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257676,-99) , -3, 0.999614, 1, 0, 0.494004,-99) ); - // itree = 329 - fBoostWeights.push_back(0.00884666); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670344,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577701,-99) , -12, 0.127393, 1, 0, 0.614236,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577139,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465644,-99) , -0, 37.5, 0, 0, 0.526191,-99) , -15, 0.491176, 1, 0, 0.582615,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482685,-99) , -16, 240.465, 1, 0, 0.546381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381435,-99) , -10, 5633.33, 1, 0, 0.502037,-99) , -0, 13.5, 0, 0, 0.558034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327921,-99) , -2, 7.5, 0, 0, 0.510116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337276,-99) , -7, 0.098297, 1, 0, 0.49851,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567636,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0646171,-99) , -5, 2.31026, 1, 0, 0.296729,-99) , -8, 0.994699, 0, 0, 0.365279,-99) , -5, 1.92358, 1, 0, 0.478459,-99) , -11, 1.5, 0, 0, 0.504685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0461507,-99) , -4, 2.17926, 1, 0, 0.500069,-99) ); - // itree = 330 - fBoostWeights.push_back(0.00695015); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486377,-99) , -12, 0.038431, 0, 0, 0.56089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420586,-99) , -8, 0.99144, 1, 0, 0.545956,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445731,-99) , -1, 11.5, 0, 0, 0.548588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131629,-99) , -7, 0.143679, 1, 0, 0.437912,-99) , -4, 0.783835, 1, 0, 0.474015,-99) , -12, 0.101127, 1, 0, 0.503202,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277161,-99) , -12, 0.01821, 0, 0, 0.497144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279705,-99) , -5, 2.31033, 1, 0, 0.490268,-99) ); - // itree = 331 - fBoostWeights.push_back(0.0101114); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.696105,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622684,-99) , -4, 0.315592, 1, 0, 0.656956,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543469,-99) , -2, 12.5, 0, 0, 0.62223,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470998,-99) , -14, -3.7921, 0, 0, 0.601961,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585531,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460768,-99) , -6, 1.01149, 0, 0, 0.500873,-99) , -9, -1.35221, 1, 0, 0.5317,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388092,-99) , -10, 2926.43, 1, 0, 0.439455,-99) , -13, 0.00208297, 0, 0, 0.502117,-99) , -6, 0.425633, 1, 0, 0.543371,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636074,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505028,-99) , -9, -4.5124, 1, 0, 0.52555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308936,-99) , -3, 0.999114, 1, 0, 0.513278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253967,-99) , -7, 0.00750582, 0, 0, 0.501925,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602331,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517185,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309567,-99) , -16, 64.4827, 1, 0, 0.361523,-99) , -10, -1991.97, 1, 0, 0.406805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0686183,-99) , -4, 1.95603, 1, 0, 0.384887,-99) , -13, 0.00244804, 1, 0, 0.463932,-99) , -5, 1.56945, 1, 0, 0.506641,-99) ); - // itree = 332 - fBoostWeights.push_back(0.00575145); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430982,-99) , -2, 8.5, 0, 0, 0.531966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309127,-99) , -3, 0.999662, 1, 0, 0.526034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33646,-99) , -3, 0.990456, 1, 0, 0.403658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0869947,-99) , -4, 1.63748, 1, 0, 0.385742,-99) , -8, -0.94609, 0, 0, 0.514414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249658,-99) , -7, 0.00714366, 0, 0, 0.508899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170036,-99) , -4, 2.13145, 1, 0, 0.503891,-99) ); - // itree = 333 - fBoostWeights.push_back(0.010546); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709228,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614645,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540185,-99) , -2, 24.5, 0, 0, 0.562217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183215,-99) , -5, 2.47716, 1, 0, 0.556576,-99) , -12, 0.386756, 0, 0, 0.568147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312367,-99) , -13, 0.0520423, 1, 0, 0.561623,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377133,-99) , -13, 0.0191261, 1, 0, 0.521162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336625,-99) , -14, -4.38846, 0, 0, 0.506679,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291827,-99) , -7, 0.021688, 0, 0, 0.405414,-99) , -6, 0.916373, 1, 0, 0.482527,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325435,-99) , -9, 0.543671, 0, 0, 0.403769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0687352,-99) , -4, 2.10625, 1, 0, 0.381906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18891,-99) , -13, 0.00395077, 1, 0, 0.338964,-99) , -5, 1.81711, 1, 0, 0.448612,-99) , -16, 1042.97, 1, 0, 0.502186,-99) ); - // itree = 334 - fBoostWeights.push_back(0.00743099); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.712134,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421234,-99) , -8, 0.990321, 1, 0, 0.538297,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366492,-99) , -4, 1.35847, 1, 0, 0.455448,-99) , -12, 0.125389, 1, 0, 0.497667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223107,-99) , -12, 0.0174509, 0, 0, 0.491044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100462,-99) , -5, 2.48281, 1, 0, 0.486926,-99) , -12, 0.52475, 0, 0, 0.495613,-99) ); - // itree = 335 - fBoostWeights.push_back(0.00873588); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703749,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585164,-99) , -12, 0.111668, 1, 0, 0.627499,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413726,-99) , -15, 0.262851, 1, 0, 0.484334,-99) , -14, -2.58637, 0, 0, 0.57061,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374808,-99) , -13, 0.0139745, 1, 0, 0.49998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202537,-99) , -7, 0.00711772, 0, 0, 0.492785,-99) , -5, 1.31382, 1, 0, 0.516738,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0612807,-99) , -1, 22.5, 0, 0, 0.376753,-99) , -7, 0.0992917, 1, 0, 0.50698,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302172,-99) , -16, 1504.19, 0, 0, 0.384455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146435,-99) , -4, 1.5876, 1, 0, 0.362369,-99) , -8, -0.935465, 0, 0, 0.494581,-99) ); - // itree = 336 - fBoostWeights.push_back(0.00907096); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723403,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485251,-99) , -13, 0.00182866, 0, 0, 0.559487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181135,-99) , -7, 0.0406064, 1, 0, 0.486086,-99) , -2, 21.5, 0, 0, 0.508522,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346259,-99) , -7, 0.0169253, 0, 0, 0.490081,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112623,-99) , -4, 1.92627, 1, 0, 0.282849,-99) , -14, -3.26403, 1, 0, 0.396068,-99) , -4, 1.69959, 1, 0, 0.494937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200351,-99) , -13, 0.0567924, 1, 0, 0.489562,-99) , -12, 0.521216, 0, 0, 0.497701,-99) ); - // itree = 337 - fBoostWeights.push_back(0.00616872); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668267,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448429,-99) , -4, 1.60196, 1, 0, 0.550651,-99) , -15, 0.056194, 1, 0, 0.567406,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471057,-99) , -12, 0.0804196, 1, 0, 0.494993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273552,-99) , -4, 1.98895, 1, 0, 0.487949,-99) , -16, 254.766, 1, 0, 0.51312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260761,-99) , -12, 0.0191568, 0, 0, 0.505399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23244,-99) , -7, 0.170523, 1, 0, 0.498761,-99) ); - // itree = 338 - fBoostWeights.push_back(0.00977914); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635074,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539831,-99) , -6, 0.16039, 1, 0, 0.558152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454356,-99) , -12, 0.283794, 0, 0, 0.482377,-99) , -8, 0.912505, 1, 0, 0.538499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333745,-99) , -3, 0.999645, 1, 0, 0.532371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300971,-99) , -12, 0.13892, 1, 0, 0.397938,-99) , -8, -0.934024, 0, 0, 0.520168,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59086,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170145,-99) , -16, 515.717, 1, 0, 0.309305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0342474,-99) , -5, 2.31708, 1, 0, 0.245366,-99) , -14, -4.15247, 1, 0, 0.381651,-99) , -5, 2.03621, 1, 0, 0.50501,-99) ); - // itree = 339 - fBoostWeights.push_back(0.00774266); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62874,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535369,-99) , -4, 0.555794, 1, 0, 0.562126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416233,-99) , -5, 0.508055, 0, 0, 0.548488,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400509,-99) , -12, 0.0326848, 0, 0, 0.535106,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449278,-99) , -3, 0.975895, 0, 0, 0.522719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337281,-99) , -7, 0.0134377, 0, 0, 0.426796,-99) , -12, 0.112224, 1, 0, 0.469656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132752,-99) , -7, 0.121133, 1, 0, 0.458513,-99) , -5, 1.544, 1, 0, 0.498805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222007,-99) , -2, 6.5, 0, 0, 0.493351,-99) ); - // itree = 340 - fBoostWeights.push_back(0.00983225); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701454,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456795,-99) , -8, -0.853518, 0, 0, 0.561624,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303234,-99) , -3, 0.996533, 1, 0, 0.433453,-99) , -14, -2.91366, 0, 0, 0.526039,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391846,-99) , -15, 0.562938, 1, 0, 0.504669,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287992,-99) , -13, 0.00297705, 1, 0, 0.377327,-99) , -12, 0.135779, 1, 0, 0.44882,-99) , -5, 1.57771, 1, 0, 0.490936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192949,-99) , -13, 0.0488656, 1, 0, 0.483997,-99) , -12, 0.526395, 0, 0, 0.492095,-99) ); - // itree = 341 - fBoostWeights.push_back(0.0103017); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476532,-99) , -3, 0.998037, 1, 0, 0.583156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458685,-99) , -15, 0.200855, 0, 0, 0.564035,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493238,-99) , -12, 0.384218, 0, 0, 0.517763,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150662,-99) , -13, 0.00102513, 1, 0, 0.341012,-99) , -4, 1.54474, 1, 0, 0.485929,-99) , -12, 0.125292, 1, 0, 0.526073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34084,-99) , -12, 0.0216986, 0, 0, 0.518189,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422308,-99) , -14, -3.42772, 0, 0, 0.484441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352211,-99) , -8, -0.868152, 0, 0, 0.468781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118188,-99) , -4, 2.12995, 1, 0, 0.462839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129048,-99) , -7, 0.0372856, 1, 0, 0.436796,-99) , -1, 10.5, 0, 0, 0.493427,-99) ); - // itree = 342 - fBoostWeights.push_back(0.0107442); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639423,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526928,-99) , -4, 0.763022, 1, 0, 0.563502,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56081,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432537,-99) , -12, 0.283794, 0, 0, 0.459249,-99) , -8, 0.914152, 1, 0, 0.534154,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390841,-99) , -1, 11.5, 0, 0, 0.459077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17219,-99) , -5, 1.81655, 1, 0, 0.433056,-99) , -8, -0.852039, 0, 0, 0.519193,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347953,-99) , -5, 0.462568, 0, 0, 0.511126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669724,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307678,-99) , -1, 10.5, 0, 0, 0.477283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184905,-99) , -15, 0.107045, 0, 0, 0.404014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170107,-99) , -14, -2.6219, 1, 0, 0.339589,-99) , -12, 0.421363, 0, 0, 0.376318,-99) , -4, 1.69228, 1, 0, 0.494351,-99) ); - // itree = 343 - fBoostWeights.push_back(0.00816283); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464357,-99) , -8, -0.897557, 0, 0, 0.578471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430293,-99) , -8, 0.989501, 1, 0, 0.563391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381603,-99) , -15, 1.77727, 1, 0, 0.548935,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610402,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500767,-99) , -2, 29.5, 0, 0, 0.541067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0629184,-99) , -7, 0.0592578, 1, 0, 0.445119,-99) , -1, 14.5, 0, 0, 0.483904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224822,-99) , -1, 63.5, 1, 0, 0.476663,-99) , -16, 470.952, 1, 0, 0.504294,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256159,-99) , -5, 2.31649, 1, 0, 0.497659,-99) ); - // itree = 344 - fBoostWeights.push_back(0.0101676); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682937,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583087,-99) , -10, 5357.92, 1, 0, 0.618019,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453624,-99) , -10, 1432.12, 1, 0, 0.538922,-99) , -9, -0.471382, 1, 0, 0.575388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614334,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322635,-99) , -7, 0.00940841, 0, 0, 0.484167,-99) , -9, 4.79081, 0, 0, 0.49914,-99) , -16, 507.199, 1, 0, 0.529035,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425127,-99) , -5, 1.83018, 1, 0, 0.570776,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283813,-99) , -5, 1.92902, 1, 0, 0.406955,-99) , -3, 0.997313, 0, 0, 0.462655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127409,-99) , -7, 0.0312477, 1, 0, 0.433195,-99) , -1, 9.5, 0, 0, 0.508468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0349903,-99) , -1, 25.5, 0, 0, 0.331632,-99) , -7, 0.105915, 1, 0, 0.498183,-99) ); - // itree = 345 - fBoostWeights.push_back(0.0118114); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679544,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546117,-99) , -5, 1.37983, 1, 0, 0.622881,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321705,-99) , -7, 0.0335586, 1, 0, 0.521371,-99) , -2, 21.5, 0, 0, 0.553026,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447158,-99) , -11, 1.5, 0, 0, 0.482694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.190981,-99) , -7, 0.143729, 1, 0, 0.465815,-99) , -6, 0.840211, 1, 0, 0.525336,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516949,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487645,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26111,-99) , -4, 0.912143, 1, 0, 0.326253,-99) , -4, 1.40805, 0, 0, 0.384475,-99) , -3, 0.946944, 1, 0, 0.42093,-99) , -14, -3.59018, 0, 0, 0.507438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573379,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274155,-99) , -11, 0.5, 1, 0, 0.389876,-99) , -11, 1.5, 0, 0, 0.469559,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196064,-99) , -12, 0.401427, 0, 0, 0.248229,-99) , -13, 0.000927095, 1, 0, 0.390347,-99) , -5, 1.93579, 1, 0, 0.488914,-99) ); - // itree = 346 - fBoostWeights.push_back(0.00954714); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681868,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571639,-99) , -6, 0.150282, 1, 0, 0.595041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490318,-99) , -13, 0.0116732, 1, 0, 0.576622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146942,-99) , -5, 2.41215, 1, 0, 0.569004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432221,-99) , -8, 0.984734, 1, 0, 0.549306,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418342,-99) , -5, 1.49778, 1, 0, 0.553712,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31864,-99) , -7, 0.0352945, 1, 0, 0.475007,-99) , -2, 26.5, 0, 0, 0.492811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302749,-99) , -13, 0.0566751, 1, 0, 0.486897,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561059,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379863,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15744,-99) , -0, 23.5, 1, 0, 0.318415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0390306,-99) , -5, 2.25676, 1, 0, 0.27187,-99) , -14, -4.14002, 1, 0, 0.373758,-99) , -5, 1.90809, 1, 0, 0.467251,-99) , -11, 1.5, 0, 0, 0.493989,-99) ); - // itree = 347 - fBoostWeights.push_back(0.00548899); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.712471,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314344,-99) , -3, 0.999649, 1, 0, 0.508721,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264056,-99) , -7, 0.00704536, 0, 0, 0.503386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28135,-99) , -12, 0.0175239, 0, 0, 0.497511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279106,-99) , -14, -1.52731, 1, 0, 0.488079,-99) , -12, 0.526395, 0, 0, 0.49605,-99) ); - // itree = 348 - fBoostWeights.push_back(0.00812735); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685383,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600713,-99) , -8, 0.469598, 1, 0, 0.629715,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534958,-99) , -13, 0.0114919, 1, 0, 0.608913,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499191,-99) , -7, 0.0138045, 1, 0, 0.568027,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278731,-99) , -16, 258.731, 1, 0, 0.402279,-99) , -6, 0.410952, 1, 0, 0.488995,-99) , -0, 16.5, 0, 0, 0.557824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228336,-99) , -13, 0.0720324, 1, 0, 0.497997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22313,-99) , -3, 0.730515, 0, 0, 0.490432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195894,-99) , -5, 2.30878, 1, 0, 0.483562,-99) , -11, 1.5, 0, 0, 0.507747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269779,-99) , -3, 0.999624, 1, 0, 0.500297,-99) ); - // itree = 349 - fBoostWeights.push_back(0.00974434); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670225,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590781,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49663,-99) , -0, 13.5, 0, 0, 0.567343,-99) , -15, 0.0507766, 1, 0, 0.579489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307927,-99) , -4, 2.07527, 1, 0, 0.574082,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386154,-99) , -14, -4.51631, 0, 0, 0.554473,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392447,-99) , -1, 15.5, 0, 0, 0.555504,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49566,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286679,-99) , -7, 0.0324381, 1, 0, 0.479387,-99) , -2, 21.5, 0, 0, 0.502974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310988,-99) , -13, 0.0375953, 1, 0, 0.494908,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452519,-99) , -14, -4.08377, 1, 0, 0.539443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123315,-99) , -0, 35.5, 1, 0, 0.4864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138572,-99) , -8, 0.803303, 0, 0, 0.376857,-99) , -5, 1.96499, 1, 0, 0.478583,-99) , -11, 1.5, 0, 0, 0.503175,-99) ); - // itree = 350 - fBoostWeights.push_back(0.00799095); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665077,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435643,-99) , -6, 0.788244, 1, 0, 0.55515,-99) , -1, 13.5, 0, 0, 0.597832,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678658,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568005,-99) , -3, 0.95763, 1, 0, 0.615874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461207,-99) , -0, 15.5, 0, 0, 0.568548,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483826,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134631,-99) , -7, 0.150431, 1, 0, 0.478962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31447,-99) , -1, 49.5, 1, 0, 0.470002,-99) , -6, 0.135152, 1, 0, 0.489018,-99) , -9, 5.76266, 0, 0, 0.502057,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -8, 0.747084, 0, 0, 0.361202,-99) , -5, 2.1726, 1, 0, 0.493515,-99) ); - // itree = 351 - fBoostWeights.push_back(0.00675455); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663452,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572109,-99) , -2, 26.5, 0, 0, 0.594363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419561,-99) , -14, -4.72785, 0, 0, 0.578788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423156,-99) , -8, -0.881418, 0, 0, 0.561964,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449797,-99) , -5, 1.54379, 1, 0, 0.49282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282435,-99) , -3, 0.748231, 0, 0, 0.485655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111828,-99) , -7, 0.229019, 1, 0, 0.480609,-99) , -11, 1.5, 0, 0, 0.507743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260532,-99) , -4, 1.9732, 1, 0, 0.498851,-99) ); - // itree = 352 - fBoostWeights.push_back(0.00883988); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580143,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511077,-99) , -6, 0.313052, 1, 0, 0.535458,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398613,-99) , -8, -0.974112, 0, 0, 0.527045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344967,-99) , -2, 7.5, 0, 0, 0.519173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324283,-99) , -14, -4.78972, 0, 0, 0.508905,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556568,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236435,-99) , -11, 0.5, 1, 0, 0.374599,-99) , -11, 1.5, 0, 0, 0.452737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0946274,-99) , -8, 0.641201, 0, 0, 0.366122,-99) , -5, 2.0105, 1, 0, 0.492182,-99) ); - // itree = 353 - fBoostWeights.push_back(0.00941956); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478122,-99) , -14, -4.67914, 0, 0, 0.57705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441289,-99) , -8, -0.955058, 0, 0, 0.566729,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389235,-99) , -6, 0.732951, 1, 0, 0.477803,-99) , -12, 0.0336111, 0, 0, 0.55208,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410994,-99) , -8, -0.91618, 0, 0, 0.537303,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338218,-99) , -13, 0.00214644, 1, 0, 0.398999,-99) , -7, 0.0140063, 0, 0, 0.503711,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354107,-99) , -8, 0.963698, 0, 0, 0.399029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.121126, 1, 0, 0.383216,-99) , -4, 1.29137, 1, 0, 0.458018,-99) , -12, 0.113767, 1, 0, 0.502168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216377,-99) , -12, 0.01821, 0, 0, 0.494734,-99) ); - // itree = 354 - fBoostWeights.push_back(0.00831724); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583907,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50107,-99) , -8, 0.822834, 1, 0, 0.556074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393999,-99) , -7, 0.00863321, 0, 0, 0.547678,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316526,-99) , -3, 0.992102, 1, 0, 0.428487,-99) , -8, -0.900949, 0, 0, 0.533739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314365,-99) , -8, 0.31277, 1, 0, 0.409556,-99) , -12, 0.0313859, 0, 0, 0.523533,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607345,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379759,-99) , -3, 0.973906, 0, 0, 0.551348,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179818,-99) , -13, 0.0242211, 1, 0, 0.446182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276343,-99) , -1, 9.5, 0, 0, 0.399014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142372,-99) , -3, 0.89292, 0, 0, 0.373647,-99) , -16, 87.5678, 1, 0, 0.41976,-99) , -4, 1.54939, 1, 0, 0.502414,-99) ); - // itree = 355 - fBoostWeights.push_back(0.00512597); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442036,-99) , -7, 0.0654816, 1, 0, 0.520917,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470339,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311363,-99) , -0, 14.5, 0, 0, 0.419464,-99) , -8, -0.89567, 0, 0, 0.508654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287769,-99) , -14, -5.65188, 0, 0, 0.503456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348005,-99) , -5, 2.24273, 1, 0, 0.49652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215974,-99) , -3, 0.999659, 1, 0, 0.489729,-99) ); - // itree = 356 - fBoostWeights.push_back(0.00617634); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470746,-99) , -12, 0.125377, 1, 0, 0.512698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265833,-99) , -12, 0.0165253, 0, 0, 0.506942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233745,-99) , -2, 6.5, 0, 0, 0.50159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154254,-99) , -7, 0.248758, 1, 0, 0.497779,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24497,-99) , -5, 2.27982, 1, 0, 0.489223,-99) ); - // itree = 357 - fBoostWeights.push_back(0.00805642); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666953,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637733,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387091,-99) , -12, 0.0312472, 0, 0, 0.502522,-99) , -9, -7.78178, 1, 0, 0.511509,-99) , -12, 0.436798, 0, 0, 0.520719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481485,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295433,-99) , -1, 12.5, 0, 0, 0.358708,-99) , -16, 396.825, 1, 0, 0.405352,-99) , -8, -0.934967, 0, 0, 0.509186,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335728,-99) , -1, 11.5, 0, 0, 0.475347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0549583,-99) , -13, 0.00238926, 1, 0, 0.382852,-99) , -4, 1.74052, 1, 0, 0.496188,-99) ); - // itree = 358 - fBoostWeights.push_back(0.00703398); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.72072,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175551,-99) , -7, 0.2509, 1, 0, 0.506809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260384,-99) , -14, -5.50747, 0, 0, 0.499734,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185682,-99) , -2, 6.5, 0, 0, 0.493708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255848,-99) , -5, 2.23572, 1, 0, 0.483927,-99) , -12, 0.527172, 0, 0, 0.493357,-99) ); - // itree = 359 - fBoostWeights.push_back(0.00706152); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624128,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516569,-99) , -13, 0.01114, 1, 0, 0.598499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473941,-99) , -14, -4.36273, 0, 0, 0.58402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401445,-99) , -6, 0.325858, 0, 0, 0.476861,-99) , -0, 12.5, 0, 0, 0.559471,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547803,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414888,-99) , -14, -3.21315, 0, 0, 0.523467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351438,-99) , -13, 0.00529254, 1, 0, 0.43763,-99) , -5, 1.49904, 1, 0, 0.479699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206538,-99) , -7, 0.173317, 1, 0, 0.473153,-99) , -11, 1.5, 0, 0, 0.501977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231503,-99) , -4, 2.06754, 1, 0, 0.496038,-99) ); - // itree = 360 - fBoostWeights.push_back(0.00717538); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680983,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402651,-99) , -14, -4.69621, 0, 0, 0.51707,-99) , -12, 0.475957, 0, 0, 0.524432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306162,-99) , -3, 0.999634, 1, 0, 0.517828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216846,-99) , -14, -4.18897, 1, 0, 0.369356,-99) , -5, 2.11756, 1, 0, 0.506447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187844,-99) , -7, 0.00714512, 0, 0, 0.500205,-99) ); - // itree = 361 - fBoostWeights.push_back(0.00779643); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457346,-99) , -8, 0.99143, 1, 0, 0.58833,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430042,-99) , -12, 0.0320097, 0, 0, 0.572099,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246903,-99) , -4, 1.95985, 1, 0, 0.538112,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371129,-99) , -4, 1.53844, 1, 0, 0.456883,-99) , -2, 13.5, 0, 0, 0.49982,-99) , -16, 290.203, 1, 0, 0.524119,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287382,-99) , -5, 2.31658, 1, 0, 0.517074,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371548,-99) , -15, 0.169207, 1, 0, 0.438808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0727937,-99) , -3, 0.998241, 1, 0, 0.365476,-99) , -13, 0.0221938, 1, 0, 0.505314,-99) ); - // itree = 362 - fBoostWeights.push_back(0.0101484); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666734,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621958,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564123,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431948,-99) , -16, 659.003, 1, 0, 0.519546,-99) , -6, 0.898569, 0, 0, 0.553272,-99) , -6, 0.153379, 1, 0, 0.58386,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5879,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405901,-99) , -16, 353.248, 1, 0, 0.471208,-99) , -3, 0.995069, 0, 0, 0.514234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225709,-99) , -5, 2.24503, 1, 0, 0.498816,-99) , -0, 14.5, 0, 0, 0.553522,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467146,-99) , -12, 0.177815, 1, 0, 0.545651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407665,-99) , -13, 0.000695105, 0, 0, 0.520182,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430436,-99) , -12, 0.061204, 1, 0, 0.466052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214985,-99) , -7, 0.0465963, 1, 0, 0.436105,-99) , -5, 1.49557, 1, 0, 0.477456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0972812,-99) , -5, 2.31642, 1, 0, 0.469459,-99) , -11, 1.5, 0, 0, 0.497673,-99) ); - // itree = 363 - fBoostWeights.push_back(0.00832815); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668522,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631069,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540811,-99) , -16, 38.9497, 1, 0, 0.585029,-99) , -1, 13.5, 1, 0, 0.607763,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438116,-99) , -3, 0.980677, 1, 0, 0.531955,-99) , -2, 11.5, 0, 0, 0.584588,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438309,-99) , -12, 0.171618, 1, 0, 0.519875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116657,-99) , -4, 1.69343, 1, 0, 0.483653,-99) , -16, 965.643, 1, 0, 0.556527,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651539,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530034,-99) , -4, 1.30929, 0, 0, 0.580844,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448271,-99) , -2, 26.5, 0, 0, 0.474245,-99) , -9, 3.87065, 0, 0, 0.494062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27505,-99) , -3, 0.999564, 1, 0, 0.486078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281131,-99) , -4, 1.84792, 1, 0, 0.473312,-99) , -11, 1.5, 0, 0, 0.501092,-99) ); - // itree = 364 - fBoostWeights.push_back(0.00665086); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623141,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52578,-99) , -4, 0.376106, 1, 0, 0.548203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404131,-99) , -13, 0.0221179, 1, 0, 0.537481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376817,-99) , -14, -4.9526, 0, 0, 0.527457,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331302,-99) , -3, 0.892138, 0, 0, 0.480103,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0914092,-99) , -4, 1.65249, 1, 0, 0.342021,-99) , -8, -0.727181, 0, 0, 0.458668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.097643,-99) , -7, 0.250645, 1, 0, 0.451193,-99) , -6, 0.701503, 1, 0, 0.499974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302576,-99) , -5, 2.24526, 1, 0, 0.492285,-99) ); - // itree = 365 - fBoostWeights.push_back(0.00994068); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695269,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605269,-99) , -16, 1200.95, 1, 0, 0.649131,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661178,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555939,-99) , -15, 0.21889, 1, 0, 0.603221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457438,-99) , -8, -0.637948, 0, 0, 0.555735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434329,-99) , -13, 0.0011943, 0, 0, 0.524948,-99) , -3, 0.959339, 1, 0, 0.563011,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628554,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523097,-99) , -6, 0.839036, 1, 0, 0.596843,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183164,-99) , -4, 2.06728, 1, 0, 0.473787,-99) , -12, 0.125597, 1, 0, 0.535778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376558,-99) , -12, 0.0273396, 0, 0, 0.521536,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394389,-99) , -3, 0.998018, 1, 0, 0.480614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330189,-99) , -3, 0.889724, 0, 0, 0.466165,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333996,-99) , -7, 0.0127825, 0, 0, 0.455264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207391,-99) , -14, -3.4148, 1, 0, 0.335917,-99) , -5, 1.88571, 1, 0, 0.435712,-99) , -16, 489.245, 1, 0, 0.468591,-99) , -4, 0.783491, 1, 0, 0.499241,-99) ); - // itree = 366 - fBoostWeights.push_back(0.00963004); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645862,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524346,-99) , -1, 39.5, 1, 0, 0.617219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448565,-99) , -1, 17.5, 0, 0, 0.592273,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48973,-99) , -16, 299.735, 1, 0, 0.512866,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209663,-99) , -2, 17.5, 0, 0, 0.321971,-99) , -7, 0.0359043, 1, 0, 0.498605,-99) , -2, 24.5, 0, 0, 0.516476,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250422,-99) , -5, 2.31694, 1, 0, 0.509302,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238912,-99) , -1, 87.5, 1, 0, 0.41579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.061298,-99) , -1, 21.5, 0, 0, 0.334662,-99) , -7, 0.0865985, 1, 0, 0.494581,-99) ); - // itree = 367 - fBoostWeights.push_back(0.00765132); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704505,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465726,-99) , -6, 0.838472, 1, 0, 0.548616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430459,-99) , -8, 0.983261, 1, 0, 0.533468,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435858,-99) , -7, 0.0143946, 0, 0, 0.512377,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154272,-99) , -13, 0.0167714, 1, 0, 0.412384,-99) , -5, 1.46782, 1, 0, 0.462318,-99) , -16, 515.859, 1, 0, 0.490159,-99) , -12, 0.517414, 0, 0, 0.499006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269276,-99) , -4, 1.93427, 1, 0, 0.489264,-99) ); - // itree = 368 - fBoostWeights.push_back(0.0055332); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646937,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548881,-99) , -10, -4298.58, 1, 0, 0.561515,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451577,-99) , -11, 1.5, 0, 0, 0.48124,-99) , -12, 0.111593, 1, 0, 0.513947,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3687,-99) , -6, 0.513199, 1, 0, 0.433791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307399,-99) , -15, 1.8358, 1, 0, 0.388843,-99) , -12, 0.0313038, 0, 0, 0.503043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247125,-99) , -2, 6.5, 0, 0, 0.498083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160909,-99) , -7, 0.253137, 1, 0, 0.494484,-99) ); - // itree = 369 - fBoostWeights.push_back(0.0108819); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612964,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523192,-99) , -4, 0.652706, 1, 0, 0.549655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416699,-99) , -5, 0.624868, 0, 0, 0.538652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368383,-99) , -7, 0.00921876, 0, 0, 0.528595,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443458,-99) , -6, 0.253909, 1, 0, 0.517567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296988,-99) , -3, 0.985223, 1, 0, 0.357861,-99) , -10, 1557.73, 1, 0, 0.40661,-99) , -11, 1.5, 0, 0, 0.447436,-99) , -14, -3.25965, 0, 0, 0.507865,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671309,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528355,-99) , -10, 4140.94, 1, 0, 0.616903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419534,-99) , -1, 10.5, 0, 0, 0.554323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247218,-99) , -8, -0.62381, 0, 0, 0.52147,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582932,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223858,-99) , -5, 1.92361, 1, 0, 0.325231,-99) , -12, 0.336198, 0, 0, 0.392919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158351,-99) , -8, 0.285041, 0, 0, 0.328771,-99) , -12, 0.100778, 1, 0, 0.413694,-99) , -4, 1.53259, 1, 0, 0.487899,-99) ); - // itree = 370 - fBoostWeights.push_back(0.00593857); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629782,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546311,-99) , -2, 19.5, 0, 0, 0.578929,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401217,-99) , -4, 1.60663, 1, 0, 0.508352,-99) , -12, 0.113401, 1, 0, 0.538149,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467608,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309814,-99) , -3, 0.99344, 1, 0, 0.417907,-99) , -12, 0.0313038, 0, 0, 0.527698,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161628,-99) , -5, 1.79109, 1, 0, 0.37965,-99) , -3, 0.999379, 1, 0, 0.51936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318627,-99) , -5, 2.23646, 1, 0, 0.510769,-99) ); - // itree = 371 - fBoostWeights.push_back(0.0107798); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720448,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438892,-99) , -5, 1.99658, 1, 0, 0.625615,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390827,-99) , -16, 834.546, 1, 0, 0.506396,-99) , -8, 0.455242, 1, 0, 0.554055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413522,-99) , -8, -0.880835, 0, 0, 0.539815,-99) , -12, 0.357835, 0, 0, 0.559309,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204905,-99) , -4, 1.79026, 1, 0, 0.504141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313207,-99) , -12, 0.0246211, 0, 0, 0.495114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274228,-99) , -7, 0.134958, 1, 0, 0.486201,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.163962,-99) , -0, 34.5, 1, 0, 0.395369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111298,-99) , -8, 0.803102, 0, 0, 0.298452,-99) , -5, 1.95922, 1, 0, 0.462294,-99) , -11, 1.5, 0, 0, 0.494578,-99) ); - // itree = 372 - fBoostWeights.push_back(0.00574842); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.727043,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484842,-99) , -16, 889.601, 1, 0, 0.515104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200942,-99) , -5, 2.31715, 1, 0, 0.511238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291659,-99) , -13, 0.0337026, 1, 0, 0.503158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303068,-99) , -4, 1.92765, 1, 0, 0.494471,-99) , -12, 0.526395, 0, 0, 0.503151,-99) ); - // itree = 373 - fBoostWeights.push_back(0.00755734); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497444,-99) , -12, 0.110588, 1, 0, 0.531907,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297304,-99) , -9, 0.268651, 0, 0, 0.394988,-99) , -12, 0.0287873, 0, 0, 0.522057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280556,-99) , -3, 0.999668, 1, 0, 0.516595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292116,-99) , -7, 0.145791, 1, 0, 0.508734,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350502,-99) , -8, -0.984542, 0, 0, 0.439101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246097,-99) , -2, 10.5, 0, 0, 0.390437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.65569, 1, 0, 0.369333,-99) , -8, -0.895746, 0, 0, 0.493344,-99) ); - // itree = 374 - fBoostWeights.push_back(0.00458763); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405178,-99) , -8, -0.966885, 0, 0, 0.523227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327576,-99) , -14, -5.57808, 0, 0, 0.517795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310797,-99) , -3, 0.999643, 1, 0, 0.511797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288662,-99) , -12, 0.0175985, 0, 0, 0.506363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316991,-99) , -4, 1.92378, 1, 0, 0.497321,-99) ); - // itree = 375 - fBoostWeights.push_back(0.00452669); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638739,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380836,-99) , -15, 0.0468486, 0, 0, 0.508067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309126,-99) , -13, 0.034847, 1, 0, 0.501124,-99) , -12, 0.414174, 0, 0, 0.510183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309053,-99) , -3, 0.999638, 1, 0, 0.504418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329029,-99) , -5, 2.24516, 1, 0, 0.497002,-99) ); - // itree = 376 - fBoostWeights.push_back(0.00626248); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663638,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557853,-99) , -10, -3505.46, 1, 0, 0.573763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447718,-99) , -8, -0.896408, 0, 0, 0.561665,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466924,-99) , -12, 0.113398, 1, 0, 0.506619,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.030284,-99) , -7, 0.047583, 1, 0, 0.4168,-99) , -1, 9.5, 0, 0, 0.486885,-99) , -16, 261.376, 1, 0, 0.511406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283529,-99) , -12, 0.0174853, 0, 0, 0.505447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259546,-99) , -3, 0.999642, 1, 0, 0.498627,-99) ); - // itree = 377 - fBoostWeights.push_back(0.0109844); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.715874,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625351,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505884,-99) , -7, 0.06493, 1, 0, 0.590613,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329045,-99) , -7, 0.027372, 1, 0, 0.525326,-99) , -2, 17.5, 0, 0, 0.554438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317523,-99) , -6, 0.796419, 1, 0, 0.419264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161813,-99) , -5, 2.07538, 1, 0, 0.396199,-99) , -12, 0.0312849, 0, 0, 0.527766,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618882,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515719,-99) , -1, 18.5, 0, 0, 0.559827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389888,-99) , -8, -0.766073, 0, 0, 0.52617,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128067,-99) , -4, 2.0177, 1, 0, 0.523073,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290827,-99) , -8, 0.607844, 0, 0, 0.36461,-99) , -9, 3.22925, 0, 0, 0.404162,-99) , -4, 0.921158, 1, 0, 0.450798,-99) , -12, 0.127196, 1, 0, 0.491876,-99) , -12, 0.513942, 0, 0, 0.500833,-99) ); - // itree = 378 - fBoostWeights.push_back(0.00861114); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425547,-99) , -5, 2.2106, 1, 0, 0.58282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319313,-99) , -4, 1.7359, 1, 0, 0.471574,-99) , -6, 0.916389, 1, 0, 0.558232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368864,-99) , -14, -5.334, 0, 0, 0.5476,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6827,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339081,-99) , -7, 0.0118921, 0, 0, 0.464266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107449,-99) , -7, 0.162654, 1, 0, 0.45539,-99) , -12, 0.512772, 0, 0, 0.469245,-99) , -12, 0.101366, 1, 0, 0.500559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232305,-99) , -12, 0.0182039, 0, 0, 0.493464,-99) ); - // itree = 379 - fBoostWeights.push_back(0.0107726); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.721168,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433868,-99) , -15, 0.0552864, 0, 0, 0.545099,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249496,-99) , -13, 0.0136862, 1, 0, 0.448331,-99) , -3, 0.998029, 1, 0, 0.528327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254105,-99) , -6, 0.357159, 0, 0, 0.378323,-99) , -14, -4.32592, 0, 0, 0.516939,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363721,-99) , -12, 0.0335924, 0, 0, 0.5247,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343519,-99) , -16, 109.506, 1, 0, 0.396182,-99) , -12, 0.118503, 1, 0, 0.465721,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0469373,-99) , -5, 2.1237, 1, 0, 0.255887,-99) , -14, -2.54026, 1, 0, 0.415574,-99) , -5, 1.77473, 1, 0, 0.48942,-99) , -12, 0.527172, 0, 0, 0.497932,-99) ); - // itree = 380 - fBoostWeights.push_back(0.0094174); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596381,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503956,-99) , -6, 0.794152, 1, 0, 0.567891,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422711,-99) , -7, 0.0144275, 0, 0, 0.495398,-99) , -16, 497.042, 1, 0, 0.523315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289566,-99) , -13, 0.0568849, 1, 0, 0.517216,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488222,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272806,-99) , -7, 0.0143187, 1, 0, 0.360985,-99) , -7, 0.0300532, 0, 0, 0.399357,-99) , -14, -4.11385, 0, 0, 0.504042,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609154,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.076503,-99) , -4, 2.10593, 1, 0, 0.41497,-99) , -11, 1.5, 0, 0, 0.49742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.143223,-99) , -8, 0.777545, 0, 0, 0.396412,-99) , -5, 1.99836, 1, 0, 0.490559,-99) ); - // itree = 381 - fBoostWeights.push_back(0.00668731); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.707871,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623994,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54474,-99) , -5, 1.22598, 1, 0, 0.566472,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449491,-99) , -8, -0.896165, 0, 0, 0.554008,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436851,-99) , -12, 0.191163, 1, 0, 0.492918,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0939861,-99) , -14, -2.51278, 1, 0, 0.360158,-99) , -5, 1.99059, 1, 0, 0.475933,-99) , -16, 140.368, 1, 0, 0.49815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273565,-99) , -13, 0.0378099, 1, 0, 0.490798,-99) , -12, 0.525198, 0, 0, 0.499256,-99) ); - // itree = 382 - fBoostWeights.push_back(0.00514425); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478444,-99) , -2, 24.5, 0, 0, 0.500312,-99) , -12, 0.414045, 0, 0, 0.508405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336572,-99) , -3, 0.99963, 1, 0, 0.503128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36851,-99) , -2, 7.5, 0, 0, 0.496738,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23418,-99) , -14, -3.92404, 1, 0, 0.330513,-99) , -4, 1.82202, 1, 0, 0.485077,-99) ); - // itree = 383 - fBoostWeights.push_back(0.00857212); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465647,-99) , -5, 1.48656, 1, 0, 0.623672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490245,-99) , -8, 0.809754, 1, 0, 0.573699,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498783,-99) , -16, 9.61178, 1, 0, 0.509706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213999,-99) , -7, 0.0529649, 1, 0, 0.500768,-99) , -2, 29.5, 0, 0, 0.514121,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211063,-99) , -3, 0.992445, 1, 0, 0.371931,-99) , -13, 0.0295666, 1, 0, 0.506386,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273979,-99) , -3, 0.996918, 1, 0, 0.4761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0304252,-99) , -8, 0.74619, 0, 0, 0.375292,-99) , -5, 2.12025, 1, 0, 0.496443,-99) ); - // itree = 384 - fBoostWeights.push_back(0.00893319); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635771,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544987,-99) , -1, 15.5, 0, 0, 0.59577,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559458,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41834,-99) , -5, 1.30677, 0, 0, 0.518263,-99) , -13, 0.00150225, 0, 0, 0.560232,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462009,-99) , -16, 2391.12, 1, 0, 0.505771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305318,-99) , -7, 0.0904071, 1, 0, 0.491903,-99) , -12, 0.101569, 1, 0, 0.520527,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254027,-99) , -12, 0.0742125, 0, 0, 0.381345,-99) , -14, -4.60204, 0, 0, 0.511326,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611088,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330003,-99) , -5, 2.1021, 1, 0, 0.417759,-99) , -8, 0.996893, 0, 0, 0.484911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20519,-99) , -8, 0.74611, 0, 0, 0.406435,-99) , -5, 1.97497, 1, 0, 0.49681,-99) ); - // itree = 385 - fBoostWeights.push_back(0.00839819); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492176,-99) , -5, 1.10903, 0, 0, 0.579582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219076,-99) , -5, 2.24473, 1, 0, 0.573158,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361198,-99) , -15, 0.359824, 0, 0, 0.456637,-99) , -14, -4.11859, 0, 0, 0.552601,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62446,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44281,-99) , -16, 457.224, 1, 0, 0.472883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222163,-99) , -5, 2.12189, 1, 0, 0.454985,-99) , -12, 0.446102, 0, 0, 0.471187,-99) , -12, 0.100542, 1, 0, 0.503715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230163,-99) , -12, 0.0181734, 0, 0, 0.496886,-99) ); - // itree = 386 - fBoostWeights.push_back(0.00657478); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621702,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613884,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51863,-99) , -9, -3.29502, 1, 0, 0.542009,-99) , -6, 0.170762, 1, 0, 0.559808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337064,-99) , -5, 2.24548, 1, 0, 0.549973,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379112,-99) , -1, 18.5, 0, 0, 0.605479,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314601,-99) , -5, 2.12685, 1, 0, 0.47193,-99) , -2, 30.5, 0, 0, 0.492698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272981,-99) , -0, 98.5, 1, 0, 0.485739,-99) , -16, 438.034, 1, 0, 0.509663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250127,-99) , -3, 0.999646, 1, 0, 0.502935,-99) ); - // itree = 387 - fBoostWeights.push_back(0.00680824); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64239,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540963,-99) , -2, 24.5, 0, 0, 0.565612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438396,-99) , -12, 0.0336111, 0, 0, 0.551805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350709,-99) , -7, 0.145303, 1, 0, 0.543524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401273,-99) , -8, -0.921412, 0, 0, 0.530005,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60775,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366217,-99) , -4, 1.6364, 1, 0, 0.473859,-99) , -6, 0.478355, 1, 0, 0.537859,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33519,-99) , -13, 0.0201012, 1, 0, 0.476798,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340487,-99) , -12, 0.289739, 0, 0, 0.380565,-99) , -7, 0.0144709, 0, 0, 0.446167,-99) , -10, -648.898, 1, 0, 0.467732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27345,-99) , -5, 2.21116, 1, 0, 0.459682,-99) , -16, 2412.1, 1, 0, 0.496677,-99) ); - // itree = 388 - fBoostWeights.push_back(0.00709248); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709156,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445766,-99) , -1, 11.5, 0, 0, 0.586337,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390693,-99) , -5, 1.99604, 1, 0, 0.497189,-99) , -6, 0.161929, 1, 0, 0.517022,-99) , -15, 0.0455975, 1, 0, 0.526622,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416106,-99) , -8, 0.901572, 1, 0, 0.50078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281872,-99) , -0, 15.5, 1, 0, 0.479968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292079,-99) , -8, -0.552335, 0, 0, 0.443869,-99) , -7, 0.0135756, 0, 0, 0.50629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267855,-99) , -3, 0.999674, 1, 0, 0.50105,-99) ); - // itree = 389 - fBoostWeights.push_back(0.00991124); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.715576,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616703,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469952,-99) , -9, 1.16888, 1, 0, 0.585448,-99) , -10, -1550.59, 1, 0, 0.614638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233181,-99) , -1, 13.5, 0, 0, 0.592489,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402522,-99) , -7, 0.035781, 1, 0, 0.500117,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118121,-99) , -8, 0.919372, 0, 0, 0.311719,-99) , -5, 2.11381, 1, 0, 0.485829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102521,-99) , -7, 0.0646808, 1, 0, 0.477927,-99) , -2, 28.5, 0, 0, 0.50155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240955,-99) , -7, 0.190686, 1, 0, 0.496207,-99) ); - // itree = 390 - fBoostWeights.push_back(0.00841024); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693815,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447407,-99) , -2, 11.5, 0, 0, 0.56289,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537476,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386848,-99) , -15, 0.286258, 1, 0, 0.465249,-99) , -13, 0.00206398, 0, 0, 0.530285,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40159,-99) , -1, 9.5, 0, 0, 0.483694,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114476,-99) , -7, 0.0663312, 1, 0, 0.283344,-99) , -13, 0.00946691, 1, 0, 0.458162,-99) , -5, 1.44948, 1, 0, 0.489672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261974,-99) , -3, 0.999691, 1, 0, 0.483625,-99) , -12, 0.525387, 0, 0, 0.490833,-99) ); - // itree = 391 - fBoostWeights.push_back(0.00777768); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660279,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448185,-99) , -8, 0.982186, 1, 0, 0.536456,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403259,-99) , -5, 1.5655, 1, 0, 0.470117,-99) , -16, 1339.6, 1, 0, 0.502048,-99) , -12, 0.462593, 0, 0, 0.50878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211269,-99) , -13, 0.0813737, 1, 0, 0.503933,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.11409,-99) , -13, 0.000194075, 1, 0, 0.324445,-99) , -5, 2.12681, 1, 0, 0.491642,-99) ); - // itree = 392 - fBoostWeights.push_back(0.00688898); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.698778,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462245,-99) , -12, 0.0368807, 0, 0, 0.547968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378675,-99) , -8, 0.992269, 1, 0, 0.532864,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409441,-99) , -5, 1.64996, 1, 0, 0.471668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278784,-99) , -7, 0.00867618, 0, 0, 0.459446,-99) , -12, 0.112229, 1, 0, 0.494165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245029,-99) , -5, 2.35078, 1, 0, 0.488362,-99) , -12, 0.513211, 0, 0, 0.497088,-99) ); - // itree = 393 - fBoostWeights.push_back(0.00852614); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.766592,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556448,-99) , -4, 1.80362, 0, 0, 0.579288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184572,-99) , -1, 10.5, 0, 0, 0.562922,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129193,-99) , -5, 2.42123, 1, 0, 0.492362,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188427,-99) , -7, 0.0447794, 1, 0, 0.478533,-99) , -2, 24.5, 0, 0, 0.500525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220846,-99) , -7, 0.209536, 1, 0, 0.496228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250431,-99) , -2, 6.5, 0, 0, 0.491199,-99) ); - // itree = 394 - fBoostWeights.push_back(0.00997464); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667191,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644149,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503168,-99) , -4, 0.456738, 1, 0, 0.58471,-99) , -10, 1891.28, 1, 0, 0.615191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483597,-99) , -7, 0.0134176, 0, 0, 0.585347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462348,-99) , -3, 0.997152, 1, 0, 0.562055,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.722471,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542424,-99) , -11, 1.5, 0, 0, 0.613951,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440459,-99) , -8, 0.692747, 1, 0, 0.515704,-99) , -4, 1.50129, 0, 0, 0.547599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278667,-99) , -12, 0.0191634, 0, 0, 0.528361,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326797,-99) , -15, 0.153592, 1, 0, 0.521768,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412182,-99) , -9, 4.8073, 0, 0, 0.437052,-99) , -12, 0.239549, 0, 0, 0.470196,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166328,-99) , -8, 0.890796, 0, 0, 0.308197,-99) , -5, 1.92664, 1, 0, 0.445293,-99) , -12, 0.100927, 1, 0, 0.481415,-99) , -6, 0.171873, 1, 0, 0.500434,-99) ); - // itree = 395 - fBoostWeights.push_back(0.0100444); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.731094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238067,-99) , -1, 11.5, 0, 0, 0.600808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336394,-99) , -12, 0.033604, 0, 0, 0.567753,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380401,-99) , -5, 1.97708, 1, 0, 0.482403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109057,-99) , -7, 0.0510567, 1, 0, 0.471447,-99) , -2, 24.5, 0, 0, 0.495638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103564,-99) , -7, 0.252459, 1, 0, 0.491539,-99) , -12, 0.526395, 0, 0, 0.500087,-99) ); - // itree = 396 - fBoostWeights.push_back(0.00719499); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632572,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54434,-99) , -2, 18.5, 0, 0, 0.579512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468099,-99) , -12, 0.0312135, 0, 0, 0.566911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35679,-99) , -3, 0.99887, 1, 0, 0.549413,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604394,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492649,-99) , -6, 0.342378, 1, 0, 0.564564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434043,-99) , -8, 0.855291, 1, 0, 0.531338,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413342,-99) , -9, -1.21997, 1, 0, 0.446318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293699,-99) , -8, -0.946263, 0, 0, 0.435743,-99) , -4, 0.844913, 1, 0, 0.468758,-99) , -16, 238.74, 1, 0, 0.494996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23771,-99) , -13, 0.049743, 1, 0, 0.488464,-99) ); - // itree = 397 - fBoostWeights.push_back(0.00775431); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654933,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559762,-99) , -2, 12.5, 0, 0, 0.619231,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516591,-99) , -13, 0.0101037, 1, 0, 0.593224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429391,-99) , -8, 0.966879, 1, 0, 0.570938,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609116,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53519,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457023,-99) , -12, 0.101397, 1, 0, 0.490449,-99) , -6, 1.03548, 0, 0, 0.511424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410012,-99) , -4, 0.460716, 0, 0, 0.500858,-99) , -6, 0.298514, 1, 0, 0.523858,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461213,-99) , -2, 18.5, 0, 0, 0.495876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219153,-99) , -3, 0.999201, 1, 0, 0.484313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253277,-99) , -1, 7.5, 0, 0, 0.46612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247594,-99) , -13, 0.0119869, 1, 0, 0.445217,-99) , -5, 1.67567, 1, 0, 0.495187,-99) ); - // itree = 398 - fBoostWeights.push_back(0.00756827); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666403,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384454,-99) , -1, 64.5, 1, 0, 0.530534,-99) , -10, -2016.71, 1, 0, 0.552719,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465584,-99) , -12, 0.104274, 1, 0, 0.502548,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131202,-99) , -7, 0.0485289, 1, 0, 0.485494,-99) , -1, 14.5, 0, 0, 0.516635,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349439,-99) , -5, 2.20942, 1, 0, 0.508462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277272,-99) , -3, 0.999637, 1, 0, 0.501797,-99) ); - // itree = 399 - fBoostWeights.push_back(0.0101619); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629011,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480818,-99) , -5, 0.797129, 0, 0, 0.570367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471913,-99) , -2, 10.5, 0, 0, 0.548848,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429578,-99) , -6, 0.616226, 1, 0, 0.51608,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319158,-99) , -7, 0.018518, 0, 0, 0.423971,-99) , -16, 1044.56, 1, 0, 0.46857,-99) , -8, 0.44746, 1, 0, 0.517435,-99) , -6, 0.0997689, 1, 0, 0.531642,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490372,-99) , -4, 1.36214, 0, 0, 0.573957,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307187,-99) , -4, 1.82873, 1, 0, 0.460299,-99) , -16, 527.384, 1, 0, 0.508628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259461,-99) , -15, 1.32839, 1, 0, 0.495771,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335098,-99) , -7, 0.0157179, 0, 0, 0.450115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22601,-99) , -7, 0.0566486, 1, 0, 0.408346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138235,-99) , -5, 1.96509, 1, 0, 0.34734,-99) , -13, 0.00399197, 1, 0, 0.460279,-99) , -5, 1.60429, 1, 0, 0.500718,-99) ); - // itree = 400 - fBoostWeights.push_back(0.00777214); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626187,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553241,-99) , -9, -2.32378, 1, 0, 0.573964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453613,-99) , -8, 0.979895, 1, 0, 0.554376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415929,-99) , -8, -0.924572, 0, 0, 0.540627,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444129,-99) , -12, 0.182337, 1, 0, 0.517392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396539,-99) , -8, 0.914198, 1, 0, 0.499018,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383005,-99) , -7, 0.011267, 0, 0, 0.481555,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0884142,-99) , -5, 2.12991, 1, 0, 0.329394,-99) , -13, 0.000876582, 1, 0, 0.410221,-99) , -5, 1.60383, 1, 0, 0.463484,-99) , -16, 471.406, 1, 0, 0.493221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214912,-99) , -4, 2.06707, 1, 0, 0.487462,-99) ); - // itree = 401 - fBoostWeights.push_back(0.00618979); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683061,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585896,-99) , -15, 0.179822, 0, 0, 0.645053,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456238,-99) , -15, 0.453247, 1, 0, 0.54799,-99) , -3, 0.982567, 1, 0, 0.593018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448099,-99) , -16, 1.56359, 0, 0, 0.573804,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681422,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455722,-99) , -2, 17.5, 0, 0, 0.48932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247194,-99) , -13, 0.037838, 1, 0, 0.481969,-99) , -12, 0.513942, 0, 0, 0.489901,-99) , -16, 67.046, 1, 0, 0.509271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299305,-99) , -3, 0.999638, 1, 0, 0.50295,-99) ); - // itree = 402 - fBoostWeights.push_back(0.00475719); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560538,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500924,-99) , -12, 0.123431, 1, 0, 0.529773,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.64681, 1, 0, 0.427304,-99) , -8, -0.916087, 0, 0, 0.519957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29884,-99) , -7, 0.00739766, 0, 0, 0.514104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284575,-99) , -12, 0.0159776, 0, 0, 0.509335,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27588,-99) , -13, 0.0566644, 1, 0, 0.504105,-99) ); - // itree = 403 - fBoostWeights.push_back(0.00587719); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685754,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35136,-99) , -12, 0.0191568, 0, 0, 0.527315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304563,-99) , -13, 0.0256094, 1, 0, 0.520915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408927,-99) , -5, 1.44998, 1, 0, 0.454827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267995,-99) , -8, -0.906334, 0, 0, 0.438299,-99) , -12, 0.196919, 1, 0, 0.498614,-99) , -12, 0.508865, 0, 0, 0.505467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268175,-99) , -4, 2.02296, 1, 0, 0.498685,-99) ); - // itree = 404 - fBoostWeights.push_back(0.00906912); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68556,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49248,-99) , -7, 0.0570926, 1, 0, 0.580493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381888,-99) , -1, 11.5, 0, 0, 0.48432,-99) , -13, 0.000841798, 0, 0, 0.548039,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418496,-99) , -13, 0.0114162, 1, 0, 0.507706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232334,-99) , -13, 0.00508767, 1, 0, 0.40484,-99) , -5, 1.64477, 1, 0, 0.475547,-99) , -11, 1.5, 0, 0, 0.499424,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195368,-99) , -14, -4.06208, 1, 0, 0.351279,-99) , -5, 2.09733, 1, 0, 0.48755,-99) , -12, 0.526742, 0, 0, 0.494868,-99) ); - // itree = 405 - fBoostWeights.push_back(0.00780031); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622116,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513612,-99) , -6, 0.521864, 1, 0, 0.562521,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407553,-99) , -13, 0.00267602, 1, 0, 0.489592,-99) , -5, 1.48905, 1, 0, 0.522149,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298433,-99) , -1, 11.5, 0, 0, 0.420256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0751807,-99) , -5, 2.03775, 1, 0, 0.402231,-99) , -8, -0.911487, 0, 0, 0.51088,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456684,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112059,-99) , -5, 1.59947, 1, 0, 0.354831,-99) , -3, 0.99938, 1, 0, 0.50202,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247131,-99) , -12, 0.0165266, 0, 0, 0.496594,-99) ); - // itree = 406 - fBoostWeights.push_back(0.0117174); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686652,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577507,-99) , -16, 162.219, 0, 0, 0.633993,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280482,-99) , -5, 2.22959, 1, 0, 0.574747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36765,-99) , -8, -0.921328, 0, 0, 0.548067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367192,-99) , -5, 1.97056, 0, 0, 0.43065,-99) , -8, 0.920467, 1, 0, 0.515215,-99) , -0, 31.5, 0, 0, 0.546117,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612953,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511544,-99) , -8, 0.72058, 1, 0, 0.580526,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320485,-99) , -2, 8.5, 0, 0, 0.45878,-99) , -12, 0.103437, 1, 0, 0.504576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358041,-99) , -12, 0.0335996, 0, 0, 0.491417,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634908,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260745,-99) , -13, 0.00397871, 1, 0, 0.403625,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155264,-99) , -5, 1.98501, 1, 0, 0.336934,-99) , -8, 0.995278, 0, 0, 0.3884,-99) , -4, 1.46052, 1, 0, 0.465935,-99) , -11, 1.5, 0, 0, 0.492292,-99) ); - // itree = 407 - fBoostWeights.push_back(0.00828444); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687994,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555012,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312665,-99) , -1, 69.5, 1, 0, 0.539438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200256,-99) , -1, 8.5, 0, 0, 0.528075,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239675,-99) , -7, 0.0360529, 1, 0, 0.468371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165567,-99) , -5, 2.24285, 1, 0, 0.456181,-99) , -2, 17.5, 0, 0, 0.485878,-99) , -12, 0.521876, 0, 0, 0.492979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0816428,-99) , -7, 0.253231, 1, 0, 0.489149,-99) ); - // itree = 408 - fBoostWeights.push_back(0.00718088); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483867,-99) , -14, -4.11378, 0, 0, 0.568793,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429246,-99) , -7, 0.0132689, 0, 0, 0.503978,-99) , -12, 0.105166, 1, 0, 0.530428,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401492,-99) , -12, 0.0259878, 0, 0, 0.522677,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549723,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301522,-99) , -0, 13.5, 1, 0, 0.404064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0523276,-99) , -3, 0.911102, 0, 0, 0.367058,-99) , -12, 0.0712054, 1, 0, 0.429255,-99) , -4, 1.69459, 1, 0, 0.511113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204476,-99) , -3, 0.999633, 1, 0, 0.503463,-99) ); - // itree = 409 - fBoostWeights.push_back(0.00550514); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611774,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506247,-99) , -2, 30.5, 0, 0, 0.522577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301976,-99) , -3, 0.999638, 1, 0, 0.516354,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376318,-99) , -10, 3247.72, 1, 0, 0.435735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269401,-99) , -8, 0.879139, 1, 0, 0.390904,-99) , -12, 0.0313553, 0, 0, 0.505622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252853,-99) , -7, 0.00714633, 0, 0, 0.500386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288151,-99) , -7, 0.143679, 1, 0, 0.493513,-99) ); - // itree = 410 - fBoostWeights.push_back(0.0108494); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675716,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573092,-99) , -7, 0.0197626, 1, 0, 0.61747,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655753,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510368,-99) , -4, 1.48656, 0, 0, 0.54415,-99) , -10, 2328.89, 1, 0, 0.57735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 2.06329, 1, 0, 0.570069,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423106,-99) , -5, 2.0218, 0, 0, 0.479364,-99) , -14, -3.62578, 0, 0, 0.548012,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608833,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421287,-99) , -3, 0.964496, 0, 0, 0.509686,-99) , -6, 0.24871, 1, 0, 0.538484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437818,-99) , -12, 0.330186, 0, 0, 0.461738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252899,-99) , -7, 0.0786057, 1, 0, 0.443936,-99) , -12, 0.0996278, 1, 0, 0.484001,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448948,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0716834,-99) , -4, 1.80601, 1, 0, 0.244997,-99) , -14, -3.79757, 1, 0, 0.325631,-99) , -5, 1.88647, 1, 0, 0.456928,-99) , -11, 1.5, 0, 0, 0.488157,-99) ); - // itree = 411 - fBoostWeights.push_back(0.00638667); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695178,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310398,-99) , -4, 2.01621, 1, 0, 0.554904,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274085,-99) , -5, 2.13018, 1, 0, 0.469612,-99) , -12, 0.101394, 1, 0, 0.501923,-99) , -12, 0.526826, 0, 0, 0.509374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0696953,-99) , -7, 0.253231, 1, 0, 0.505659,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305669,-99) , -9, 0.412336, 0, 0, 0.367921,-99) , -12, 0.0305522, 0, 0, 0.49436,-99) ); - // itree = 412 - fBoostWeights.push_back(0.00781553); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489031,-99) , -12, 0.0312133, 0, 0, 0.578871,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391132,-99) , -7, 0.0561909, 1, 0, 0.505954,-99) , -12, 0.114785, 1, 0, 0.540241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319429,-99) , -14, -5.30089, 0, 0, 0.5313,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270004,-99) , -7, 0.135224, 1, 0, 0.494502,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323988,-99) , -12, 0.0329367, 0, 0, 0.478662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271079,-99) , -3, 0.885649, 0, 0, 0.463803,-99) , -6, 0.767118, 1, 0, 0.50983,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17401,-99) , -8, 0.946429, 0, 0, 0.37474,-99) , -5, 2.09734, 1, 0, 0.498808,-99) ); - // itree = 413 - fBoostWeights.push_back(0.00581651); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442063,-99) , -14, -4.10221, 0, 0, 0.562614,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459246,-99) , -12, 0.118339, 1, 0, 0.495115,-99) , -11, 1.5, 0, 0, 0.5168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291275,-99) , -2, 6.5, 0, 0, 0.511938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296232,-99) , -4, 1.99485, 1, 0, 0.505191,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148956,-99) , -1, 21.5, 0, 0, 0.345697,-99) , -15, 1.711, 1, 0, 0.495302,-99) ); - // itree = 414 - fBoostWeights.push_back(0.00471795); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654726,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526908,-99) , -9, 5.73081, 0, 0, 0.542702,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556047,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446411,-99) , -5, 1.97502, 0, 0, 0.469808,-99) , -14, -3.37695, 0, 0, 0.524115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293368,-99) , -2, 6.5, 0, 0, 0.519445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339403,-99) , -7, 0.143906, 1, 0, 0.513394,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331943,-99) , -5, 2.23542, 1, 0, 0.505972,-99) ); - // itree = 415 - fBoostWeights.push_back(0.006173); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493005,-99) , -15, 0.660247, 1, 0, 0.575029,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337746,-99) , -5, 2.02718, 1, 0, 0.493255,-99) , -15, 0.101426, 0, 0, 0.555731,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407888,-99) , -3, 0.999161, 1, 0, 0.54632,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467248,-99) , -5, 1.56396, 1, 0, 0.540422,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472503,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201573,-99) , -0, 23.5, 1, 0, 0.458659,-99) , -2, 18.5, 0, 0, 0.485218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320918,-99) , -7, 0.105549, 1, 0, 0.47638,-99) , -16, 462.883, 1, 0, 0.502732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329163,-99) , -8, -0.984375, 0, 0, 0.49572,-99) ); - // itree = 416 - fBoostWeights.push_back(0.00615044); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648659,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517467,-99) , -12, 0.450253, 0, 0, 0.524805,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191956,-99) , -13, 0.000887603, 1, 0, 0.417305,-99) , -4, 1.76956, 1, 0, 0.515133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255784,-99) , -3, 0.999733, 1, 0, 0.510144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271185,-99) , -7, 0.00728829, 0, 0, 0.504869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268854,-99) , -12, 0.018167, 0, 0, 0.499005,-99) ); - // itree = 417 - fBoostWeights.push_back(0.0110358); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652247,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519459,-99) , -13, 0.00393147, 0, 0, 0.584257,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44531,-99) , -2, 12.5, 0, 0, 0.49367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329768,-99) , -3, 0.99802, 1, 0, 0.477446,-99) , -10, 11651.3, 0, 0, 0.491137,-99) , -10, -3549.6, 1, 0, 0.50499,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32393,-99) , -5, 2.30856, 1, 0, 0.582348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393896,-99) , -8, 0.987968, 1, 0, 0.53504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299609,-99) , -8, -0.653876, 0, 0, 0.511373,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34523,-99) , -12, 0.0406227, 0, 0, 0.465747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302217,-99) , -13, 0.0015407, 1, 0, 0.426084,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519716,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0172331,-99) , -1, 8.5, 0, 0, 0.242053,-99) , -12, 0.414272, 0, 0, 0.286366,-99) , -12, 0.114439, 1, 0, 0.345046,-99) , -11, 1.5, 0, 0, 0.408571,-99) , -5, 1.73916, 1, 0, 0.476491,-99) ); - // itree = 418 - fBoostWeights.push_back(0.0125282); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720373,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495729,-99) , -13, 0.00218502, 0, 0, 0.583243,-99) , -4, 1.7314, 0, 0, 0.597687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459114,-99) , -3, 0.99785, 1, 0, 0.571833,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633734,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491022,-99) , -6, 0.162395, 1, 0, 0.527985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.2109, 1, 0, 0.51299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140523,-99) , -1, 31.5, 1, 0, 0.484616,-99) , -2, 24.5, 0, 0, 0.532939,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416643,-99) , -8, -0.925994, 0, 0, 0.517837,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33111,-99) , -9, -0.355504, 1, 0, 0.393639,-99) , -8, 0.935163, 1, 0, 0.497467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607287,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263911,-99) , -5, 2.08847, 1, 0, 0.367113,-99) , -12, 0.392319, 0, 0, 0.400538,-99) , -5, 1.80889, 1, 0, 0.47156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183425,-99) , -7, 0.0391863, 1, 0, 0.450649,-99) , -1, 15.5, 0, 0, 0.486015,-99) ); - // itree = 419 - fBoostWeights.push_back(0.00739671); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680251,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408345,-99) , -14, -4.43787, 0, 0, 0.542717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392708,-99) , -13, 0.0177675, 1, 0, 0.529282,-99) , -15, 0.0484435, 1, 0, 0.545995,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400097,-99) , -7, 0.0588509, 1, 0, 0.492943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295955,-99) , -3, 0.7483, 0, 0, 0.485918,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125852,-99) , -8, 0.913979, 0, 0, 0.320235,-99) , -4, 1.73709, 1, 0, 0.472012,-99) , -11, 1.5, 0, 0, 0.497298,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159396,-99) , -4, 2.16145, 1, 0, 0.493547,-99) ); - // itree = 420 - fBoostWeights.push_back(0.00708333); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665644,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32731,-99) , -5, 2.02692, 1, 0, 0.557039,-99) , -12, 0.285232, 0, 0, 0.575055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43766,-99) , -13, 0.00013174, 0, 0, 0.551903,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39818,-99) , -12, 0.03128, 0, 0, 0.525541,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196915,-99) , -7, 0.0936519, 1, 0, 0.450021,-99) , -12, 0.099569, 1, 0, 0.481461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227369,-99) , -5, 2.21067, 1, 0, 0.475661,-99) , -11, 1.5, 0, 0, 0.500964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292854,-99) , -4, 1.98841, 1, 0, 0.493932,-99) ); - // itree = 421 - fBoostWeights.push_back(0.00889999); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649548,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429353,-99) , -13, 0.014723, 1, 0, 0.533844,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340877,-99) , -6, 0.397847, 0, 0, 0.415862,-99) , -8, 0.982976, 1, 0, 0.519264,-99) , -12, 0.41418, 0, 0, 0.527828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378771,-99) , -5, 0.457354, 0, 0, 0.520221,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482188,-99) , -13, 0.00154017, 1, 0, 0.580859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351629,-99) , -12, 0.031568, 0, 0, 0.522011,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613372,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481382,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0426908,-99) , -5, 2.08133, 1, 0, 0.269388,-99) , -8, 0.984207, 0, 0, 0.325249,-99) , -12, 0.454146, 0, 0, 0.362096,-99) , -12, 0.0939697, 1, 0, 0.426483,-99) , -4, 1.56018, 1, 0, 0.502394,-99) ); - // itree = 422 - fBoostWeights.push_back(0.00495846); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235794,-99) , -5, 2.27321, 1, 0, 0.539197,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39709,-99) , -7, 0.0134325, 0, 0, 0.477911,-99) , -12, 0.113902, 1, 0, 0.505157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325272,-99) , -12, 0.0195631, 0, 0, 0.499506,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 1.92023, 1, 0, 0.359401,-99) , -8, -0.974139, 0, 0, 0.492054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270118,-99) , -7, 0.00714105, 0, 0, 0.487466,-99) ); - // itree = 423 - fBoostWeights.push_back(0.00479034); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678403,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51212,-99) , -12, 0.513942, 0, 0, 0.518132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258465,-99) , -3, 0.999693, 1, 0, 0.513191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278171,-99) , -1, 77.5, 1, 0, 0.507884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193327,-99) , -5, 2.44869, 1, 0, 0.50372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253744,-99) , -12, 0.0178106, 0, 0, 0.497686,-99) ); - // itree = 424 - fBoostWeights.push_back(0.0107117); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379883,-99) , -7, 0.00922733, 0, 0, 0.528514,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138374,-99) , -5, 1.43996, 1, 0, 0.386559,-99) , -13, 0.0202362, 1, 0, 0.513302,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50558,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299431,-99) , -15, 0.37089, 0, 0, 0.358845,-99) , -4, 0.808926, 1, 0, 0.413709,-99) , -14, -3.65587, 0, 0, 0.497964,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442973,-99) , -9, -1.91376, 1, 0, 0.489308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250347,-99) , -1, 8.5, 0, 0, 0.45706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101553,-99) , -6, 0.700299, 1, 0, 0.220752,-99) , -13, 0.00222397, 1, 0, 0.396244,-99) , -5, 1.82276, 1, 0, 0.474328,-99) , -12, 0.522667, 0, 0, 0.482228,-99) ); - // itree = 425 - fBoostWeights.push_back(0.0046449); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574994,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502859,-99) , -16, 171.482, 1, 0, 0.523979,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437244,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114297,-99) , -4, 1.64355, 1, 0, 0.420516,-99) , -8, -0.895746, 0, 0, 0.512678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319806,-99) , -3, 0.99963, 1, 0, 0.506605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262096,-99) , -2, 6.5, 0, 0, 0.501769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255111,-99) , -4, 2.07372, 1, 0, 0.496861,-99) ); - // itree = 426 - fBoostWeights.push_back(0.00561292); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697952,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440098,-99) , -8, 0.965605, 1, 0, 0.508965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267925,-99) , -12, 0.0159776, 0, 0, 0.503309,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252429,-99) , -15, 0.0699479, 0, 0, 0.358146,-99) , -7, 0.00884872, 0, 0, 0.493385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311748,-99) , -13, 0.0314184, 1, 0, 0.485734,-99) , -12, 0.537257, 0, 0, 0.493116,-99) ); - // itree = 427 - fBoostWeights.push_back(0.00500017); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674933,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483228,-99) , -16, 76.4557, 1, 0, 0.503461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305693,-99) , -12, 0.0198115, 0, 0, 0.496926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196857,-99) , -13, 0.0560738, 1, 0, 0.491418,-99) , -12, 0.513211, 0, 0, 0.498299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259792,-99) , -7, 0.00714633, 0, 0, 0.493145,-99) ); - // itree = 428 - fBoostWeights.push_back(0.00484543); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675015,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293238,-99) , -1, 66.5, 1, 0, 0.504728,-99) , -12, 0.523213, 0, 0, 0.5114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275023,-99) , -7, 0.00711374, 0, 0, 0.5067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2391,-99) , -7, 0.209058, 1, 0, 0.50241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111726,-99) , -4, 2.15252, 1, 0, 0.497825,-99) ); - // itree = 429 - fBoostWeights.push_back(0.00882134); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48787,-99) , -6, 0.914749, 1, 0, 0.567835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432131,-99) , -8, 0.990588, 1, 0, 0.553757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361271,-99) , -12, 0.0198085, 0, 0, 0.540102,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48447,-99) , -2, 20.5, 0, 0, 0.520788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381537,-99) , -3, 0.998851, 1, 0, 0.506653,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258378,-99) , -8, 0.147883, 0, 0, 0.424608,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0429437,-99) , -0, 55.5, 1, 0, 0.400699,-99) , -5, 1.65089, 1, 0, 0.467232,-99) , -12, 0.113336, 1, 0, 0.502453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281778,-99) , -5, 2.31646, 1, 0, 0.496437,-99) ); - // itree = 430 - fBoostWeights.push_back(0.00691534); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653426,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647632,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552194,-99) , -0, 31.5, 0, 0, 0.57852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460201,-99) , -3, 0.995142, 1, 0, 0.553808,-99) , -10, -1630.28, 1, 0, 0.572255,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618866,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649116,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358557,-99) , -9, -0.192694, 1, 0, 0.425241,-99) , -5, 1.94179, 0, 0, 0.460508,-99) , -12, 0.234518, 0, 0, 0.495155,-99) , -6, 0.671646, 1, 0, 0.545485,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636114,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540465,-99) , -9, 7.74006, 0, 0, 0.578692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426117,-99) , -13, 0.010952, 1, 0, 0.556006,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45816,-99) , -10, 9294.28, 0, 0, 0.474035,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215234,-99) , -5, 1.72648, 1, 0, 0.362348,-99) , -1, 8.5, 0, 0, 0.460387,-99) , -9, 3.95621, 0, 0, 0.478315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194599,-99) , -4, 2.07717, 1, 0, 0.472889,-99) , -16, 272.755, 1, 0, 0.497129,-99) ); - // itree = 431 - fBoostWeights.push_back(0.0048299); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661404,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382267,-99) , -8, -0.969753, 0, 0, 0.503598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269958,-99) , -2, 6.5, 0, 0, 0.498711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151697,-99) , -13, 0.0693277, 1, 0, 0.494364,-99) , -12, 0.507497, 0, 0, 0.500904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276657,-99) , -4, 1.9682, 1, 0, 0.492884,-99) ); - // itree = 432 - fBoostWeights.push_back(0.0111577); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671026,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55406,-99) , -9, 4.55636, 0, 0, 0.57409,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365369,-99) , -3, 0.998917, 1, 0, 0.502998,-99) , -6, 0.662858, 1, 0, 0.543185,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462574,-99) , -14, -4.05189, 1, 0, 0.514471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35486,-99) , -12, 0.0945094, 0, 0, 0.456466,-99) , -8, 0.935957, 1, 0, 0.528215,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372133,-99) , -2, 7.5, 0, 0, 0.52186,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46693,-99) , -8, 0.983868, 1, 0, 0.590438,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290016,-99) , -0, 29.5, 1, 0, 0.45991,-99) , -11, 1.5, 0, 0, 0.515159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262726,-99) , -3, 0.998756, 1, 0, 0.496401,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549093,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302142,-99) , -1, 10.5, 0, 0, 0.453923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196841,-99) , -7, 0.0262374, 1, 0, 0.398253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.104278,-99) , -4, 1.75844, 1, 0, 0.315411,-99) , -8, 0.798939, 0, 0, 0.42649,-99) , -5, 1.79363, 1, 0, 0.497431,-99) ); - // itree = 433 - fBoostWeights.push_back(0.00682194); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703611,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45509,-99) , -12, 0.0314222, 0, 0, 0.545322,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416878,-99) , -5, 1.42827, 1, 0, 0.465151,-99) , -12, 0.125936, 1, 0, 0.507595,-99) , -12, 0.521669, 0, 0, 0.515495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270168,-99) , -3, 0.999634, 1, 0, 0.508586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141993,-99) , -5, 2.4484, 1, 0, 0.503997,-99) ); - // itree = 434 - fBoostWeights.push_back(0.00686842); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47544,-99) , -13, 0.00014558, 0, 0, 0.585981,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460921,-99) , -4, 1.29357, 1, 0, 0.514811,-99) , -9, 3.31279, 0, 0, 0.530477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356858,-99) , -3, 0.999613, 1, 0, 0.524998,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472218,-99) , -10, 5782.72, 0, 0, 0.535709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189311,-99) , -13, 0.000481965, 1, 0, 0.417519,-99) , -5, 2.03673, 1, 0, 0.513443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273461,-99) , -13, 0.0552021, 1, 0, 0.507968,-99) ); - // itree = 435 - fBoostWeights.push_back(0.00701166); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437857,-99) , -14, -4.64009, 0, 0, 0.529222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387241,-99) , -7, 0.00796254, 0, 0, 0.523222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387397,-99) , -13, 0.0288197, 1, 0, 0.516064,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204226,-99) , -7, 0.0122174, 0, 0, 0.491436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0551519,-99) , -13, 0.000845332, 1, 0, 0.371178,-99) , -4, 1.83293, 1, 0, 0.505513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289835,-99) , -8, -0.987864, 0, 0, 0.497245,-99) ); - // itree = 436 - fBoostWeights.push_back(0.00962744); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.689968,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58227,-99) , -12, 0.126166, 1, 0, 0.642696,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364755,-99) , -5, 1.39001, 1, 0, 0.516374,-99) , -7, 0.0801436, 1, 0, 0.600941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419178,-99) , -12, 0.0335701, 0, 0, 0.578424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253057,-99) , -1, 13.5, 0, 0, 0.551971,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61211,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50921,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406063,-99) , -8, 0.977819, 1, 0, 0.493704,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156043,-99) , -8, -0.489784, 0, 0, 0.345047,-99) , -15, 0.0456993, 0, 0, 0.479793,-99) , -12, 0.422566, 0, 0, 0.488914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150305,-99) , -7, 0.0498293, 1, 0, 0.477751,-99) , -2, 24.5, 0, 0, 0.49716,-99) ); - // itree = 437 - fBoostWeights.push_back(0.00908841); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491145,-99) , -6, 0.909491, 1, 0, 0.557444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297696,-99) , -3, 0.998736, 1, 0, 0.466074,-99) , -13, 0.00798387, 1, 0, 0.529152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546163,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341514,-99) , -3, 0.972176, 1, 0, 0.40088,-99) , -4, 1.54283, 0, 0, 0.440095,-99) , -14, -3.87081, 0, 0, 0.516301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301193,-99) , -12, 0.0182039, 0, 0, 0.510781,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363159,-99) , -15, 0.190847, 0, 0, 0.515302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1321,-99) , -8, 0.946344, 0, 0, 0.367979,-99) , -5, 2.09036, 1, 0, 0.498888,-99) ); - // itree = 438 - fBoostWeights.push_back(0.00651015); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.723394,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588793,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52394,-99) , -9, 0.370869, 0, 0, 0.55373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318693,-99) , -4, 2.07698, 1, 0, 0.549773,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359584,-99) , -8, -0.944367, 0, 0, 0.50553,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103145,-99) , -7, 0.124227, 1, 0, 0.391001,-99) , -4, 1.42103, 1, 0, 0.473451,-99) , -12, 0.10141, 1, 0, 0.505517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254163,-99) , -12, 0.01821, 0, 0, 0.499405,-99) , -12, 0.526359, 0, 0, 0.507147,-99) ); - // itree = 439 - fBoostWeights.push_back(0.00816693); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647856,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605559,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51717,-99) , -9, 2.74625, 0, 0, 0.540035,-99) , -4, 0.418619, 1, 0, 0.559246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429417,-99) , -12, 0.0307204, 0, 0, 0.547025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344823,-99) , -7, 0.135459, 1, 0, 0.538298,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562888,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435949,-99) , -3, 0.903877, 0, 0, 0.543609,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380228,-99) , -8, 0.202538, 1, 0, 0.453013,-99) , -11, 0.5, 1, 0, 0.510909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34566,-99) , -3, 0.998812, 1, 0, 0.491981,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493265,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353489,-99) , -2, 11.5, 1, 0, 0.453612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27419,-99) , -5, 1.9706, 1, 0, 0.431071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187232,-99) , -3, 0.927373, 0, 0, 0.390355,-99) , -7, 0.0149842, 0, 0, 0.459855,-99) , -16, 1957.91, 1, 0, 0.500034,-99) ); - // itree = 440 - fBoostWeights.push_back(0.00652324); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678519,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554947,-99) , -9, 0.419169, 0, 0, 0.611533,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450639,-99) , -8, -0.727693, 0, 0, 0.522378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436678,-99) , -7, 0.0289362, 1, 0, 0.507237,-99) , -1, 20.5, 0, 0, 0.548542,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447648,-99) , -12, 0.0525135, 0, 0, 0.552154,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326613,-99) , -4, 1.84922, 1, 0, 0.462674,-99) , -16, 257.693, 1, 0, 0.492595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178969,-99) , -7, 0.143729, 1, 0, 0.485055,-99) , -4, 0.938366, 1, 0, 0.510531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304593,-99) , -3, 0.999568, 1, 0, 0.503376,-99) ); - // itree = 441 - fBoostWeights.push_back(0.00685972); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620085,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253592,-99) , -5, 2.30272, 1, 0, 0.5555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429918,-99) , -7, 0.0324488, 1, 0, 0.534552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381162,-99) , -14, -4.81492, 0, 0, 0.520801,-99) , -0, 34.5, 0, 0, 0.543752,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498642,-99) , -10, -5178.58, 1, 0, 0.509267,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235312,-99) , -5, 1.42234, 1, 0, 0.398768,-99) , -13, 0.0152568, 1, 0, 0.494256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346433,-99) , -1, 7.5, 0, 0, 0.483099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200961,-99) , -4, 1.98891, 1, 0, 0.474707,-99) , -11, 1.5, 0, 0, 0.497329,-99) ); - // itree = 442 - fBoostWeights.push_back(0.00590235); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58818,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512305,-99) , -11, 1.5, 0, 0, 0.537849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257207,-99) , -6, 0.271643, 0, 0, 0.437189,-99) , -14, -4.30627, 0, 0, 0.526663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382866,-99) , -8, -0.974449, 0, 0, 0.518769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311205,-99) , -5, 2.31016, 1, 0, 0.513074,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488892,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274703,-99) , -9, 0.272605, 0, 0, 0.377841,-99) , -7, 0.00922731, 0, 0, 0.502698,-99) ); - // itree = 443 - fBoostWeights.push_back(0.00764105); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.70632,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640111,-99) , -16, 1434.03, 1, 0, 0.674067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58098,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502416,-99) , -7, 0.0212439, 0, 0, 0.547518,-99) , -8, -0.296309, 0, 0, 0.610394,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374761,-99) , -15, 0.379896, 1, 0, 0.487906,-99) , -13, 0.00117164, 0, 0, 0.573178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433169,-99) , -5, 0.444456, 0, 0, 0.554667,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368183,-99) , -3, 0.999328, 1, 0, 0.509605,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501548,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277028,-99) , -6, 0.595449, 1, 0, 0.413413,-99) , -3, 0.889664, 0, 0, 0.49818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2882,-99) , -5, 2.36282, 1, 0, 0.49122,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161369,-99) , -4, 1.36576, 1, 0, 0.351847,-99) , -13, 0.0176857, 1, 0, 0.478623,-99) , -4, 0.815474, 1, 0, 0.503847,-99) ); - // itree = 444 - fBoostWeights.push_back(0.00937829); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629305,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533157,-99) , -10, 8899.15, 0, 0, 0.547818,-99) , -2, 24.5, 0, 0, 0.56989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46272,-99) , -7, 0.0669823, 1, 0, 0.556094,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518449,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297847,-99) , -15, 1.23055, 1, 0, 0.371063,-99) , -3, 0.983108, 1, 0, 0.438052,-99) , -12, 0.0312849, 0, 0, 0.532791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6658,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42403,-99) , -5, 1.59076, 1, 0, 0.490042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217208,-99) , -7, 0.152796, 1, 0, 0.479261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205964,-99) , -8, -0.526092, 0, 0, 0.367808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.105432,-99) , -4, 1.74629, 1, 0, 0.341732,-99) , -7, 0.0135374, 0, 0, 0.444913,-99) , -12, 0.507814, 0, 0, 0.461692,-99) , -12, 0.11373, 1, 0, 0.495215,-99) ); - // itree = 445 - fBoostWeights.push_back(0.00855876); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704574,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58285,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486746,-99) , -2, 13.5, 0, 0, 0.548567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300742,-99) , -4, 0.897476, 1, 0, 0.385936,-99) , -8, 0.91416, 1, 0, 0.524485,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422388,-99) , -16, 528.201, 1, 0, 0.471928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239751,-99) , -13, 0.0130465, 1, 0, 0.453036,-99) , -5, 1.54839, 1, 0, 0.491563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127925,-99) , -5, 2.43946, 1, 0, 0.486927,-99) , -12, 0.526826, 0, 0, 0.495472,-99) ); - // itree = 446 - fBoostWeights.push_back(0.00763641); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322701,-99) , -12, 0.0198665, 0, 0, 0.527311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299382,-99) , -14, -5.71064, 0, 0, 0.520238,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310979,-99) , -12, 0.129896, 1, 0, 0.4211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126717,-99) , -0, 73.5, 1, 0, 0.385314,-99) , -3, 0.998954, 1, 0, 0.508191,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460074,-99) , -7, 0.0254768, 1, 0, 0.504842,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400022,-99) , -11, 0.5, 0, 0, 0.47041,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53563,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0562434,-99) , -5, 1.67418, 1, 0, 0.273517,-99) , -12, 0.327939, 0, 0, 0.344988,-99) , -12, 0.129524, 1, 0, 0.418022,-99) , -8, -0.765639, 0, 0, 0.492924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0595688,-99) , -5, 2.57723, 1, 0, 0.490538,-99) ); - // itree = 447 - fBoostWeights.push_back(0.00589676); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496802,-99) , -5, 1.46594, 1, 0, 0.529499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332619,-99) , -12, 0.01821, 0, 0, 0.52324,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328135,-99) , -7, 0.0155705, 1, 0, 0.468096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296869,-99) , -8, -0.482957, 0, 0, 0.425877,-99) , -2, 9.5, 0, 0, 0.507135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24183,-99) , -4, 2.07555, 1, 0, 0.502073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254729,-99) , -3, 0.999642, 1, 0, 0.495565,-99) ); - // itree = 448 - fBoostWeights.push_back(0.00534541); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681724,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365697,-99) , -12, 0.0174853, 0, 0, 0.532967,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357373,-99) , -4, 1.5521, 1, 0, 0.469226,-99) , -12, 0.111255, 1, 0, 0.499532,-99) , -12, 0.525387, 0, 0, 0.505849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311023,-99) , -1, 65.5, 1, 0, 0.499742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102242,-99) , -7, 0.28174, 1, 0, 0.496397,-99) ); - // itree = 449 - fBoostWeights.push_back(0.00740149); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624966,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524808,-99) , -13, 0.000448648, 0, 0, 0.605174,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0998599,-99) , -1, 23.5, 0, 0, 0.423806,-99) , -7, 0.101136, 1, 0, 0.561837,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297667,-99) , -7, 0.0071135, 0, 0, 0.493531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157998,-99) , -7, 0.0496955, 1, 0, 0.483352,-99) , -2, 24.5, 0, 0, 0.502577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297246,-99) , -3, 0.999633, 1, 0, 0.497113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299409,-99) , -4, 1.98694, 1, 0, 0.490483,-99) ); - // itree = 450 - fBoostWeights.push_back(0.00751964); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697347,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671968,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610191,-99) , -1, 29.5, 1, 0, 0.643898,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423238,-99) , -5, 1.49291, 1, 0, 0.5091,-99) , -16, 965.513, 1, 0, 0.575758,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496046,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34373,-99) , -5, 2.10179, 1, 0, 0.483687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.131176,-99) , -7, 0.050451, 1, 0, 0.474732,-99) , -2, 24.5, 0, 0, 0.497971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325378,-99) , -7, 0.12423, 1, 0, 0.490186,-99) , -12, 0.525387, 0, 0, 0.498734,-99) ); - // itree = 451 - fBoostWeights.push_back(0.00534356); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481129,-99) , -13, 0.0109346, 1, 0, 0.54149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370137,-99) , -14, -5.44608, 0, 0, 0.535722,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441804,-99) , -16, 347.008, 1, 0, 0.482796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3184,-99) , -0, 13.5, 1, 0, 0.450374,-99) , -7, 0.012507, 0, 0, 0.517808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297856,-99) , -12, 0.0174853, 0, 0, 0.51227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254276,-99) , -7, 0.179327, 1, 0, 0.506527,-99) ); - // itree = 452 - fBoostWeights.push_back(0.00702859); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233033,-99) , -5, 2.49011, 1, 0, 0.529347,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15858,-99) , -4, 1.58434, 1, 0, 0.405834,-99) , -8, -0.945726, 0, 0, 0.519602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286165,-99) , -9, 0.624747, 0, 0, 0.391485,-99) , -7, 0.00940415, 0, 0, 0.508069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317304,-99) , -5, 1.74649, 1, 0, 0.462593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256626,-99) , -12, 0.21039, 1, 0, 0.417651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0442472,-99) , -7, 0.114685, 1, 0, 0.378299,-99) , -3, 0.999047, 1, 0, 0.497175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266537,-99) , -12, 0.01821, 0, 0, 0.490934,-99) ); - // itree = 453 - fBoostWeights.push_back(0.00541492); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688924,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594671,-99) , -4, 1.33163, 0, 0, 0.627865,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434632,-99) , -1, 10.5, 0, 0, 0.499272,-99) , -8, 0.3356, 1, 0, 0.565246,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444231,-99) , -12, 0.138223, 1, 0, 0.483864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335396,-99) , -14, -4.93931, 0, 0, 0.475823,-99) , -9, 4.45357, 0, 0, 0.490939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300492,-99) , -7, 0.145791, 1, 0, 0.484852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305721,-99) , -5, 2.22346, 1, 0, 0.477417,-99) ); - // itree = 454 - fBoostWeights.push_back(0.00778712); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682436,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484131,-99) , -3, 0.997787, 1, 0, 0.585602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264926,-99) , -7, 0.0453675, 1, 0, 0.50905,-99) , -2, 24.5, 0, 0, 0.529888,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352787,-99) , -12, 0.0182039, 0, 0, 0.423828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281223,-99) , -4, 1.70376, 1, 0, 0.403378,-99) , -12, 0.0296016, 0, 0, 0.516107,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406735,-99) , -9, -0.0986206, 1, 0, 0.465604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229697,-99) , -8, -0.910962, 0, 0, 0.445531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.153644,-99) , -4, 1.84894, 1, 0, 0.42733,-99) , -12, 0.196862, 1, 0, 0.492363,-99) , -12, 0.523051, 0, 0, 0.499804,-99) ); - // itree = 455 - fBoostWeights.push_back(0.00589825); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496164,-99) , -8, 0.70789, 1, 0, 0.531156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304834,-99) , -5, 2.23313, 1, 0, 0.526079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288678,-99) , -4, 0.993161, 1, 0, 0.389038,-99) , -8, -0.924256, 0, 0, 0.513346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307497,-99) , -4, 1.93184, 1, 0, 0.505005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218225,-99) , -12, 0.0182006, 0, 0, 0.497935,-99) ); - // itree = 456 - fBoostWeights.push_back(0.00906593); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687402,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483319,-99) , -12, 0.182774, 1, 0, 0.554428,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320401,-99) , -3, 0.995493, 1, 0, 0.441248,-99) , -8, 0.897921, 1, 0, 0.533447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373223,-99) , -5, 0.50588, 0, 0, 0.52093,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329314,-99) , -4, 2.06251, 1, 0, 0.523217,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164229,-99) , -1, 7.5, 0, 0, 0.417384,-99) , -16, 762.445, 1, 0, 0.46402,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164493,-99) , -13, 0.0124626, 1, 0, 0.440676,-99) , -5, 1.64927, 1, 0, 0.490368,-99) , -12, 0.523206, 0, 0, 0.498131,-99) ); - // itree = 457 - fBoostWeights.push_back(0.0072551); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655273,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515962,-99) , -1, 60.5, 1, 0, 0.627403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467537,-99) , -8, -0.637362, 0, 0, 0.598859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276401,-99) , -1, 13.5, 0, 0, 0.580367,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376393,-99) , -15, 0.734518, 1, 0, 0.503078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322626,-99) , -5, 2.16532, 1, 0, 0.492519,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225912,-99) , -7, 0.0561693, 1, 0, 0.482746,-99) , -2, 30.5, 0, 0, 0.501007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144424,-99) , -7, 0.253137, 1, 0, 0.497416,-99) ); - // itree = 458 - fBoostWeights.push_back(0.00814532); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591832,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505664,-99) , -4, 0.618006, 1, 0, 0.525513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367631,-99) , -5, 0.558125, 0, 0, 0.516333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321771,-99) , -14, -5.19959, 0, 0, 0.509246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329432,-99) , -8, -0.975078, 0, 0, 0.499094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401715,-99) , -12, 0.103352, 1, 0, 0.488021,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161897,-99) , -11, 1.5, 0, 0, 0.256575,-99) , -14, -3.4345, 1, 0, 0.382052,-99) , -5, 1.93635, 1, 0, 0.481757,-99) ); - // itree = 459 - fBoostWeights.push_back(0.00978014); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65579,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59579,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506533,-99) , -15, 0.480423, 1, 0, 0.565528,-99) , -6, 0.139562, 1, 0, 0.58396,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453165,-99) , -15, 0.0720461, 1, 0, 0.513195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382887,-99) , -6, 0.671264, 1, 0, 0.475357,-99) , -2, 11.5, 0, 0, 0.551149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371806,-99) , -14, -4.89468, 0, 0, 0.537428,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64781,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545737,-99) , -9, -0.391701, 1, 0, 0.594857,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407666,-99) , -12, 0.175217, 1, 0, 0.484519,-99) , -0, 21.5, 0, 0, 0.536931,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366892,-99) , -11, 0.5, 1, 0, 0.448588,-99) , -6, 0.939109, 1, 0, 0.51103,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4027,-99) , -15, 0.058702, 0, 0, 0.492155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304197,-99) , -3, 0.896938, 0, 0, 0.467404,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256364,-99) , -1, 12.5, 0, 0, 0.383507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158151,-99) , -4, 1.51352, 1, 0, 0.302697,-99) , -13, 0.0046676, 1, 0, 0.427544,-99) , -5, 1.47131, 1, 0, 0.466338,-99) , -11, 1.5, 0, 0, 0.490286,-99) ); - // itree = 460 - fBoostWeights.push_back(0.00608471); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638036,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48244,-99) , -10, 3335.25, 1, 0, 0.529817,-99) , -3, 0.912664, 1, 0, 0.548426,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431851,-99) , -12, 0.137016, 1, 0, 0.480556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189445,-99) , -5, 2.20944, 1, 0, 0.473603,-99) , -11, 1.5, 0, 0, 0.498352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248031,-99) , -4, 2.03909, 1, 0, 0.492534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279929,-99) , -8, -0.989583, 0, 0, 0.485784,-99) ); - // itree = 461 - fBoostWeights.push_back(0.0079905); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447595,-99) , -8, -0.922507, 0, 0, 0.567043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118626,-99) , -5, 2.22304, 1, 0, 0.560713,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568043,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515028,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394912,-99) , -6, 0.289491, 1, 0, 0.440701,-99) , -5, 1.96877, 0, 0, 0.474963,-99) , -13, 0.000430034, 0, 0, 0.533674,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660074,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405988,-99) , -5, 1.53641, 1, 0, 0.454787,-99) , -12, 0.523332, 0, 0, 0.468679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103088,-99) , -7, 0.179217, 1, 0, 0.461593,-99) , -12, 0.126392, 1, 0, 0.497379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236837,-99) , -12, 0.01821, 0, 0, 0.490864,-99) ); - // itree = 462 - fBoostWeights.push_back(0.00651327); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.724315,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331885,-99) , -1, 10.5, 0, 0, 0.537697,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177089,-99) , -7, 0.0359982, 1, 0, 0.469355,-99) , -2, 18.5, 0, 0, 0.494957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222284,-99) , -7, 0.252994, 1, 0, 0.491604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256276,-99) , -2, 6.5, 0, 0, 0.486795,-99) , -12, 0.534864, 0, 0, 0.495393,-99) ); - // itree = 463 - fBoostWeights.push_back(0.00717392); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671863,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585927,-99) , -12, 0.0854519, 0, 0, 0.599959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485289,-99) , -14, -2.11712, 1, 0, 0.582187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459673,-99) , -8, 0.973749, 1, 0, 0.562909,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341802,-99) , -2, 11.5, 0, 0, 0.455143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314433,-99) , -15, 2.58818, 1, 0, 0.419973,-99) , -12, 0.0313038, 0, 0, 0.53368,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604894,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281616,-99) , -3, 0.999117, 1, 0, 0.461324,-99) , -9, 5.67496, 0, 0, 0.476987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232809,-99) , -15, 0.744327, 1, 0, 0.468597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161785,-99) , -4, 2.0737, 1, 0, 0.462377,-99) , -12, 0.0995843, 1, 0, 0.492168,-99) ); - // itree = 464 - fBoostWeights.push_back(0.00643138); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680065,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487786,-99) , -16, 1168.3, 1, 0, 0.520352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292656,-99) , -13, 0.0560576, 1, 0, 0.516762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362548,-99) , -7, 0.00865728, 0, 0, 0.507679,-99) , -12, 0.519614, 0, 0, 0.514716,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38498,-99) , -12, 0.190612, 1, 0, 0.503037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316943,-99) , -13, 0.0112906, 1, 0, 0.464954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113653,-99) , -5, 2.20614, 1, 0, 0.452414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22575,-99) , -15, 0.824325, 1, 0, 0.409428,-99) , -3, 0.998043, 1, 0, 0.497646,-99) ); - // itree = 465 - fBoostWeights.push_back(0.00451891); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482411,-99) , -9, 0.563126, 0, 0, 0.508873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288982,-99) , -14, -5.85956, 0, 0, 0.503921,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19053,-99) , -7, 0.252106, 1, 0, 0.500873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229868,-99) , -3, 0.999713, 1, 0, 0.495856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308667,-99) , -5, 2.21234, 1, 0, 0.487216,-99) ); - // itree = 466 - fBoostWeights.push_back(0.00963062); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670022,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565831,-99) , -5, 1.77471, 0, 0, 0.59351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410332,-99) , -5, 2.08164, 1, 0, 0.57884,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469897,-99) , -5, 1.61974, 0, 0, 0.507664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187403,-99) , -1, 13.5, 0, 0, 0.47574,-99) , -7, 0.0417666, 1, 0, 0.551819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404899,-99) , -14, -4.6799, 0, 0, 0.539079,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604616,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506371,-99) , -2, 30.5, 0, 0, 0.525254,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352947,-99) , -6, 0.787413, 1, 0, 0.432255,-99) , -7, 0.0147827, 0, 0, 0.495616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347409,-99) , -7, 0.0895915, 1, 0, 0.485288,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578598,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277837,-99) , -11, 0.5, 1, 0, 0.37173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120103,-99) , -14, -2.63606, 1, 0, 0.306427,-99) , -12, 0.414713, 0, 0, 0.34208,-99) , -5, 1.87753, 1, 0, 0.460434,-99) , -16, 471.539, 1, 0, 0.490587,-99) ); - // itree = 467 - fBoostWeights.push_back(0.00726357); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498175,-99) , -12, 0.0454654, 0, 0, 0.573679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414095,-99) , -0, 88.5, 1, 0, 0.553661,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0800803,-99) , -4, 2.06589, 1, 0, 0.50849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323189,-99) , -7, 0.0271252, 1, 0, 0.488745,-99) , -2, 17.5, 0, 0, 0.520011,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434894,-99) , -14, -3.29809, 0, 0, 0.507647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345209,-99) , -5, 1.90693, 1, 0, 0.478718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189457,-99) , -7, 0.0305911, 1, 0, 0.449346,-99) , -1, 9.5, 0, 0, 0.504941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241927,-99) , -3, 0.999739, 1, 0, 0.500731,-99) ); - // itree = 468 - fBoostWeights.push_back(0.00673369); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399833,-99) , -8, -0.982765, 0, 0, 0.525042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364646,-99) , -14, -5.50696, 0, 0, 0.519147,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535339,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425639,-99) , -6, 1.00497, 0, 0, 0.472442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194711,-99) , -3, 0.866296, 0, 0, 0.455894,-99) , -6, 0.743287, 1, 0, 0.49844,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147889,-99) , -8, 0.95016, 0, 0, 0.384204,-99) , -5, 2.12901, 1, 0, 0.490624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167515,-99) , -7, 0.250645, 1, 0, 0.48736,-99) ); - // itree = 469 - fBoostWeights.push_back(0.00961231); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669565,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536805,-99) , -2, 38.5, 0, 0, 0.553573,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255221,-99) , -5, 1.77272, 1, 0, 0.472226,-99) , -3, 0.996562, 1, 0, 0.533456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369001,-99) , -12, 0.0248253, 0, 0, 0.525194,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508091,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27294,-99) , -1, 12.5, 0, 0, 0.339689,-99) , -12, 0.101281, 1, 0, 0.418939,-99) , -8, -0.886199, 0, 0, 0.511783,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644103,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50624,-99) , -3, 0.995285, 1, 0, 0.594906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421226,-99) , -3, 0.972802, 0, 0, 0.543576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377028,-99) , -1, 9.5, 0, 0, 0.49955,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0566248,-99) , -4, 1.8052, 1, 0, 0.277986,-99) , -14, -2.98952, 1, 0, 0.412456,-99) , -4, 1.58478, 1, 0, 0.494621,-99) ); - // itree = 470 - fBoostWeights.push_back(0.0081476); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449894,-99) , -14, -4.74883, 0, 0, 0.581062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466547,-99) , -3, 0.998046, 1, 0, 0.564299,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405537,-99) , -2, 11.5, 0, 0, 0.484568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177085,-99) , -7, 0.253231, 1, 0, 0.479265,-99) , -6, 0.401572, 1, 0, 0.518832,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454385,-99) , -13, 0.00146659, 0, 0, 0.537303,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194466,-99) , -5, 1.99016, 1, 0, 0.399161,-99) , -10, -451.637, 1, 0, 0.444894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0349123,-99) , -7, 0.0478684, 1, 0, 0.426353,-99) , -1, 9.5, 0, 0, 0.499831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227683,-99) , -2, 6.5, 0, 0, 0.494291,-99) ); - // itree = 471 - fBoostWeights.push_back(0.00368835); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336998,-99) , -14, -5.66195, 0, 0, 0.523337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315455,-99) , -2, 6.5, 0, 0, 0.519248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380063,-99) , -8, -0.977668, 0, 0, 0.512594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323564,-99) , -3, 0.999637, 1, 0, 0.507387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311629,-99) , -5, 2.27571, 1, 0, 0.50076,-99) ); - // itree = 472 - fBoostWeights.push_back(0.00703984); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.724979,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647896,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52375,-99) , -3, 0.997163, 1, 0, 0.614102,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380228,-99) , -7, 0.0391654, 1, 0, 0.523667,-99) , -2, 30.5, 0, 0, 0.544908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402589,-99) , -12, 0.0227642, 0, 0, 0.529689,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470451,-99) , -2, 42.5, 0, 0, 0.48157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244915,-99) , -0, 84.5, 1, 0, 0.470328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274856,-99) , -7, 0.00866202, 0, 0, 0.458236,-99) , -12, 0.110628, 1, 0, 0.492309,-99) , -12, 0.525387, 0, 0, 0.501313,-99) ); - // itree = 473 - fBoostWeights.push_back(0.00463324); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374228,-99) , -14, -4.52722, 0, 0, 0.545893,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450272,-99) , -12, 0.111195, 1, 0, 0.485312,-99) , -11, 1.5, 0, 0, 0.505807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336529,-99) , -4, 1.98895, 1, 0, 0.49983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172306,-99) , -13, 0.111134, 1, 0, 0.496715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24655,-99) , -2, 6.5, 0, 0, 0.491832,-99) ); - // itree = 474 - fBoostWeights.push_back(0.00634896); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659378,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555315,-99) , -8, -0.632567, 0, 0, 0.616607,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418272,-99) , -3, 0.978935, 1, 0, 0.480534,-99) , -13, 0.0018997, 0, 0, 0.565598,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251697,-99) , -2, 6.5, 0, 0, 0.489372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122377,-99) , -7, 0.250678, 1, 0, 0.485827,-99) , -4, 0.735088, 1, 0, 0.507485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317321,-99) , -5, 0.375997, 0, 0, 0.499694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0755863,-99) , -5, 2.49133, 1, 0, 0.496005,-99) ); - // itree = 475 - fBoostWeights.push_back(0.00990587); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697625,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571638,-99) , -6, 0.491515, 1, 0, 0.622742,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508981,-99) , -8, -0.754892, 0, 0, 0.590281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423763,-99) , -12, 0.0742565, 0, 0, 0.498493,-99) , -13, 0.00208623, 0, 0, 0.561757,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570629,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400806,-99) , -13, 0.00104486, 1, 0, 0.454842,-99) , -1, 8.5, 1, 0, 0.491041,-99) , -2, 12.5, 0, 0, 0.539594,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642904,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310386,-99) , -3, 0.999078, 1, 0, 0.49061,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166539,-99) , -5, 2.23563, 1, 0, 0.37811,-99) , -12, 0.136043, 1, 0, 0.443075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136238,-99) , -13, 0.0222143, 1, 0, 0.430612,-99) , -12, 0.44905, 0, 0, 0.446487,-99) , -5, 1.53655, 1, 0, 0.495021,-99) ); - // itree = 476 - fBoostWeights.push_back(0.00537921); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635729,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524537,-99) , -5, 1.71077, 0, 0, 0.564819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446891,-99) , -8, 0.991426, 1, 0, 0.551327,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38393,-99) , -7, 0.0806903, 1, 0, 0.493133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30537,-99) , -4, 1.83319, 1, 0, 0.482555,-99) , -11, 1.5, 0, 0, 0.505327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22038,-99) , -5, 2.45763, 1, 0, 0.501848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200909,-99) , -3, 0.999708, 1, 0, 0.496503,-99) ); - // itree = 477 - fBoostWeights.push_back(0.00495693); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326676,-99) , -3, 0.755537, 0, 0, 0.513776,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478233,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339749,-99) , -3, 0.982847, 1, 0, 0.402138,-99) , -12, 0.0312838, 0, 0, 0.503717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275518,-99) , -2, 6.5, 0, 0, 0.498882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320221,-99) , -7, 0.1357, 1, 0, 0.492349,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277851,-99) , -10, 2915.98, 1, 0, 0.334846,-99) , -8, -0.971143, 0, 0, 0.483264,-99) ); - // itree = 478 - fBoostWeights.push_back(0.0067468); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661416,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58817,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502455,-99) , -2, 15.5, 0, 0, 0.548289,-99) , -12, 0.0904779, 0, 0, 0.56187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387473,-99) , -12, 0.0217817, 0, 0, 0.544422,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517335,-99) , -9, 3.03908, 0, 0, 0.543258,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407149,-99) , -5, 1.49863, 1, 0, 0.460157,-99) , -11, 1.5, 0, 0, 0.486452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180392,-99) , -7, 0.15629, 1, 0, 0.479252,-99) , -12, 0.100765, 1, 0, 0.506514,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268159,-99) , -4, 1.97334, 1, 0, 0.498764,-99) ); - // itree = 479 - fBoostWeights.push_back(0.00708635); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664827,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486321,-99) , -3, 0.996218, 1, 0, 0.562807,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253637,-99) , -7, 0.0435631, 1, 0, 0.486419,-99) , -2, 24.5, 0, 0, 0.506728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582209,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258651,-99) , -12, 0.101326, 1, 0, 0.353257,-99) , -9, -4.33103, 1, 0, 0.411823,-99) , -4, 1.63638, 1, 0, 0.492671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159156,-99) , -13, 0.0726367, 1, 0, 0.488608,-99) , -12, 0.525198, 0, 0, 0.494605,-99) ); - // itree = 480 - fBoostWeights.push_back(0.00762729); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699623,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596113,-99) , -16, 1505.42, 1, 0, 0.649343,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527263,-99) , -6, 0.821663, 1, 0, 0.604914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474083,-99) , -0, 72.5, 1, 0, 0.570692,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353671,-99) , -8, -0.98242, 0, 0, 0.492991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176006,-99) , -4, 2.09854, 1, 0, 0.488604,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.097477,-99) , -2, 19.5, 0, 0, 0.253652,-99) , -7, 0.043232, 1, 0, 0.47305,-99) , -2, 29.5, 0, 0, 0.49075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233377,-99) , -7, 0.178342, 1, 0, 0.485609,-99) ); - // itree = 481 - fBoostWeights.push_back(0.00747533); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610033,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530706,-99) , -16, 2425.27, 1, 0, 0.572404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435558,-99) , -14, -3.91631, 0, 0, 0.553842,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398277,-99) , -12, 0.128698, 1, 0, 0.457202,-99) , -8, -0.797228, 0, 0, 0.534416,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287018,-99) , -5, 2.24363, 1, 0, 0.569592,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412966,-99) , -15, 0.239898, 0, 0, 0.447754,-99) , -16, 60.7599, 1, 0, 0.476232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235547,-99) , -7, 0.0909908, 1, 0, 0.463411,-99) , -4, 1.0164, 1, 0, 0.495168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256275,-99) , -12, 0.01821, 0, 0, 0.488913,-99) ); - // itree = 482 - fBoostWeights.push_back(0.00453702); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586239,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514611,-99) , -6, 0.136271, 1, 0, 0.527747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328598,-99) , -2, 6.5, 0, 0, 0.523893,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368058,-99) , -6, 0.501796, 1, 0, 0.435424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0839791,-99) , -5, 1.92198, 1, 0, 0.412037,-99) , -8, -0.912585, 0, 0, 0.512108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.197191,-99) , -5, 2.48989, 1, 0, 0.508959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337134,-99) , -7, 0.12117, 1, 0, 0.501492,-99) ); - // itree = 483 - fBoostWeights.push_back(0.00872968); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203416,-99) , -1, 14.5, 0, 0, 0.602493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157029,-99) , -7, 0.0632382, 1, 0, 0.519948,-99) , -2, 30.5, 0, 0, 0.535918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330433,-99) , -3, 0.734821, 0, 0, 0.530214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286492,-99) , -3, 0.999694, 1, 0, 0.525019,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538758,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506028,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357012,-99) , -3, 0.983195, 1, 0, 0.445522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276842,-99) , -4, 1.34064, 1, 0, 0.42198,-99) , -9, 3.06997, 0, 0, 0.451758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0658992,-99) , -4, 1.63603, 1, 0, 0.427046,-99) , -8, -0.758424, 0, 0, 0.508798,-99) ); - // itree = 484 - fBoostWeights.push_back(0.00837307); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459064,-99) , -1, 11.5, 0, 0, 0.621094,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629607,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505934,-99) , -9, 4.7548, 0, 0, 0.529343,-99) , -9, -3.49455, 1, 0, 0.550914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301813,-99) , -13, 0.0551993, 1, 0, 0.540117,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3294,-99) , -8, -0.928688, 0, 0, 0.484516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177025,-99) , -4, 1.98799, 1, 0, 0.476094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117589,-99) , -7, 0.0359029, 1, 0, 0.463913,-99) , -2, 14.5, 0, 0, 0.503477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25952,-99) , -12, 0.01821, 0, 0, 0.497681,-99) ); - // itree = 485 - fBoostWeights.push_back(0.00694476); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701522,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552409,-99) , -0, 16.5, 1, 0, 0.641843,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371119,-99) , -13, 0.0217085, 1, 0, 0.523124,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325252,-99) , -3, 0.957181, 0, 0, 0.44054,-99) , -6, 0.860628, 1, 0, 0.501025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248003,-99) , -5, 2.21078, 1, 0, 0.492491,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50242,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222417,-99) , -15, 0.32102, 1, 0, 0.308261,-99) , -5, 2.08297, 0, 0, 0.358318,-99) , -14, -4.54163, 0, 0, 0.480111,-99) , -12, 0.438429, 0, 0, 0.489891,-99) ); - // itree = 486 - fBoostWeights.push_back(0.00802078); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708582,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635807,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52558,-99) , -2, 18.5, 0, 0, 0.587277,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437918,-99) , -5, 1.22149, 0, 0, 0.487387,-99) , -13, 0.00206175, 0, 0, 0.549679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428076,-99) , -8, -0.912786, 0, 0, 0.532684,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318978,-99) , -3, 0.999256, 1, 0, 0.49199,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183087,-99) , -4, 1.7695, 1, 0, 0.369239,-99) , -15, 0.057286, 0, 0, 0.473408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100718,-99) , -13, 0.0262892, 1, 0, 0.46187,-99) , -5, 1.45272, 1, 0, 0.493996,-99) , -12, 0.526826, 0, 0, 0.50198,-99) ); - // itree = 487 - fBoostWeights.push_back(0.00513837); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444854,-99) , -8, -0.906691, 0, 0, 0.558199,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448368,-99) , -5, 1.47132, 1, 0, 0.488305,-99) , -16, 493.571, 1, 0, 0.51522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344875,-99) , -3, 0.999487, 1, 0, 0.506946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23889,-99) , -2, 6.5, 0, 0, 0.502143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159571,-99) , -5, 2.47694, 1, 0, 0.498578,-99) ); - // itree = 488 - fBoostWeights.push_back(0.00463474); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475348,-99) , -7, 0.014791, 0, 0, 0.522189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353651,-99) , -3, 0.999637, 1, 0, 0.517642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334509,-99) , -1, 68.5, 1, 0, 0.511221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316394,-99) , -4, 1.97336, 1, 0, 0.504362,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212571,-99) , -6, 0.497732, 1, 0, 0.321968,-99) , -7, 0.00863766, 0, 0, 0.494559,-99) ); - // itree = 489 - fBoostWeights.push_back(0.00582485); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68048,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635451,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533382,-99) , -9, -4.52343, 1, 0, 0.552439,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169011,-99) , -7, 0.246759, 1, 0, 0.481575,-99) , -11, 1.5, 0, 0, 0.504484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384198,-99) , -10, 3155.05, 1, 0, 0.429478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156199,-99) , -5, 1.67395, 1, 0, 0.380815,-99) , -8, -0.91538, 0, 0, 0.491871,-99) , -12, 0.519027, 0, 0, 0.498601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245279,-99) , -5, 2.32332, 1, 0, 0.492476,-99) ); - // itree = 490 - fBoostWeights.push_back(0.00857991); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425113,-99) , -1, 67.5, 1, 0, 0.603909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415135,-99) , -12, 0.0314507, 0, 0, 0.580111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189649,-99) , -1, 11.5, 0, 0, 0.560487,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509459,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344938,-99) , -14, -5.2805, 0, 0, 0.502315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308895,-99) , -5, 2.25681, 1, 0, 0.494496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170848,-99) , -7, 0.0485973, 1, 0, 0.483362,-99) , -2, 24.5, 0, 0, 0.502776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0767855,-99) , -7, 0.251046, 1, 0, 0.498926,-99) ); - // itree = 491 - fBoostWeights.push_back(0.007947); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639527,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465107,-99) , -5, 1.31421, 0, 0, 0.580242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461574,-99) , -8, 0.983355, 1, 0, 0.559499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410519,-99) , -7, 0.0375108, 1, 0, 0.543552,-99) , -0, 35.5, 0, 0, 0.565797,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600068,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522981,-99) , -10, 209.22, 1, 0, 0.54401,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274978,-99) , -8, 0.502525, 1, 0, 0.373456,-99) , -12, 0.0312599, 0, 0, 0.517007,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173998,-99) , -4, 1.89561, 1, 0, 0.466934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310128,-99) , -15, 0.259492, 1, 0, 0.446079,-99) , -12, 0.124176, 1, 0, 0.481089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171333,-99) , -5, 2.35519, 1, 0, 0.47604,-99) , -11, 1.5, 0, 0, 0.506427,-99) ); - // itree = 492 - fBoostWeights.push_back(0.00756996); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65811,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447308,-99) , -16, 3.45516, 0, 0, 0.54379,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222573,-99) , -5, 2.1221, 1, 0, 0.485485,-99) , -16, 364.313, 1, 0, 0.506407,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450131,-99) , -10, 5787.15, 0, 0, 0.508554,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206791,-99) , -0, 15.5, 1, 0, 0.311759,-99) , -14, -3.43915, 1, 0, 0.410194,-99) , -4, 1.58083, 1, 0, 0.488935,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263065,-99) , -5, 1.73655, 1, 0, 0.43338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259076,-99) , -15, 0.137503, 0, 0, 0.378617,-99) , -8, -0.901313, 0, 0, 0.476195,-99) , -12, 0.512572, 0, 0, 0.483421,-99) ); - // itree = 493 - fBoostWeights.push_back(0.00497093); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620428,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515121,-99) , -13, 0.00207545, 0, 0, 0.584658,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227103,-99) , -7, 0.0650215, 1, 0, 0.488431,-99) , -2, 33.5, 0, 0, 0.500947,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31085,-99) , -1, 65.5, 1, 0, 0.495565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294137,-99) , -4, 2.02291, 1, 0, 0.490278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199661,-99) , -7, 0.207895, 1, 0, 0.485933,-99) ); - // itree = 494 - fBoostWeights.push_back(0.00808287); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720654,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60209,-99) , -2, 19.5, 0, 0, 0.662073,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519146,-99) , -8, -0.553665, 0, 0, 0.605417,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414121,-99) , -15, 0.288572, 1, 0, 0.488355,-99) , -13, 0.00112625, 0, 0, 0.569712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431953,-99) , -5, 0.375997, 0, 0, 0.551216,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483145,-99) , -12, 0.4496, 0, 0, 0.493605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303952,-99) , -3, 0.999365, 1, 0, 0.483446,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2753,-99) , -11, 0.5, 0, 0, 0.372528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0522988,-99) , -4, 1.7811, 1, 0, 0.343544,-99) , -3, 0.886313, 0, 0, 0.468864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126861,-99) , -7, 0.205443, 1, 0, 0.464435,-99) , -4, 0.797438, 1, 0, 0.493442,-99) ); - // itree = 495 - fBoostWeights.push_back(0.00805217); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.687366,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542896,-99) , -12, 0.178115, 1, 0, 0.63254,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527212,-99) , -13, 0.0018361, 0, 0, 0.590008,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451104,-99) , -8, 0.909485, 1, 0, 0.565543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424804,-99) , -5, 0.62702, 0, 0, 0.540524,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40287,-99) , -8, 0.979193, 1, 0, 0.508358,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186532,-99) , -13, 0.0175269, 1, 0, 0.41475,-99) , -16, 498.827, 1, 0, 0.450645,-99) , -4, 0.73108, 1, 0, 0.47871,-99) , -10, -4087.62, 1, 0, 0.492884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280906,-99) , -4, 1.96821, 1, 0, 0.485368,-99) ); - // itree = 496 - fBoostWeights.push_back(0.00740154); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68792,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552552,-99) , -0, 23.5, 0, 0, 0.624213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46388,-99) , -8, -0.879684, 0, 0, 0.583625,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477629,-99) , -7, 0.0169958, 0, 0, 0.532241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384787,-99) , -15, 0.5031, 1, 0, 0.496884,-99) , -13, 0.00213475, 0, 0, 0.548425,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416111,-99) , -5, 0.534332, 0, 0, 0.531606,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449961,-99) , -5, 1.50368, 0, 0, 0.524544,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1584,-99) , -5, 2.31656, 1, 0, 0.449709,-99) , -11, 1.5, 0, 0, 0.473921,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132864,-99) , -5, 2.5698, 1, 0, 0.471193,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281401,-99) , -7, 0.080043, 1, 0, 0.457831,-99) , -4, 0.917435, 1, 0, 0.486653,-99) ); - // itree = 497 - fBoostWeights.push_back(0.00764363); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640068,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532317,-99) , -13, 0.00859728, 1, 0, 0.608707,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391135,-99) , -1, 39.5, 1, 0, 0.531088,-99) , -16, 994.24, 1, 0, 0.569553,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307622,-99) , -8, -0.9886, 0, 0, 0.490601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16777,-99) , -0, 35.5, 1, 0, 0.484298,-99) , -2, 21.5, 0, 0, 0.507972,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0276283,-99) , -1, 22.5, 0, 0, 0.345095,-99) , -7, 0.104704, 1, 0, 0.497949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243349,-99) , -7, 0.0074769, 0, 0, 0.491183,-99) ); - // itree = 498 - fBoostWeights.push_back(0.00741975); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208224,-99) , -1, 12.5, 0, 0, 0.581704,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205392,-99) , -7, 0.0514024, 1, 0, 0.508382,-99) , -2, 24.5, 0, 0, 0.528134,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25145,-99) , -7, 0.0436848, 1, 0, 0.406363,-99) , -3, 0.999206, 1, 0, 0.518781,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389662,-99) , -7, 0.0282904, 1, 0, 0.466327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130664,-99) , -5, 1.79931, 1, 0, 0.426815,-99) , -8, -0.854867, 0, 0, 0.506811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336319,-99) , -2, 7.5, 0, 0, 0.499281,-99) ); - // itree = 499 - fBoostWeights.push_back(0.00737801); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675018,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665217,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580707,-99) , -6, 0.694021, 1, 0, 0.630284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.00864, 1, 0, 0.61085,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445085,-99) , -4, 1.45684, 0, 0, 0.505794,-99) , -8, 0.662309, 1, 0, 0.566987,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467451,-99) , -1, 10.5, 0, 0, 0.582408,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336004,-99) , -3, 0.997386, 1, 0, 0.497969,-99) , -9, -3.80668, 1, 0, 0.51796,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361961,-99) , -3, 0.997992, 1, 0, 0.468682,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0763934,-99) , -13, 0.0149579, 1, 0, 0.370181,-99) , -4, 1.404, 1, 0, 0.441629,-99) , -16, 1020.31, 1, 0, 0.476675,-99) , -9, 4.41839, 0, 0, 0.491258,-99) , -12, 0.544829, 0, 0, 0.497143,-99) ); - // itree = 500 - fBoostWeights.push_back(0.00894429); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.697762,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641295,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541015,-99) , -6, 0.44022, 1, 0, 0.57885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45069,-99) , -8, -0.919848, 0, 0, 0.557899,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466736,-99) , -4, 0.983884, 1, 0, 0.519843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380462,-99) , -5, 1.16623, 0, 0, 0.465878,-99) , -14, -2.75014, 0, 0, 0.527561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426695,-99) , -6, 0.262911, 0, 0, 0.495625,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290679,-99) , -12, 0.0222896, 0, 0, 0.485275,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.106764,-99) , -5, 2.15488, 1, 0, 0.334089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0608513,-99) , -7, 0.0770543, 1, 0, 0.284976,-99) , -13, 0.00770762, 1, 0, 0.455893,-99) , -5, 1.49826, 1, 0, 0.490878,-99) , -12, 0.526395, 0, 0, 0.498358,-99) ); - // itree = 501 - fBoostWeights.push_back(0.00944573); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669427,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646827,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544162,-99) , -13, 0.0137628, 1, 0, 0.604232,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456353,-99) , -1, 11.5, 1, 0, 0.503393,-99) , -2, 18.5, 0, 0, 0.555462,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481588,-99) , -4, 0.899164, 1, 0, 0.525585,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322892,-99) , -5, 1.17286, 0, 0, 0.410919,-99) , -15, 0.279569, 1, 0, 0.471198,-99) , -14, -2.66947, 0, 0, 0.526499,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483838,-99) , -0, 16.5, 0, 0, 0.53811,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228606,-99) , -5, 2.15133, 1, 0, 0.427945,-99) , -11, 1.5, 0, 0, 0.468612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0319393,-99) , -14, -1.60939, 1, 0, 0.455544,-99) , -5, 1.49775, 1, 0, 0.490112,-99) , -12, 0.492332, 0, 0, 0.49779,-99) ); - // itree = 502 - fBoostWeights.push_back(0.00656125); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461464,-99) , -13, 0.0233909, 1, 0, 0.568704,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496688,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182624,-99) , -7, 0.049619, 1, 0, 0.486859,-99) , -2, 24.5, 0, 0, 0.507447,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180034,-99) , -5, 2.0622, 1, 0, 0.458851,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158839,-99) , -7, 0.0997147, 1, 0, 0.428572,-99) , -3, 0.99804, 1, 0, 0.494349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.111374,-99) , -5, 2.56973, 1, 0, 0.492322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251624,-99) , -2, 6.5, 0, 0, 0.487498,-99) ); - // itree = 503 - fBoostWeights.push_back(0.00987042); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676646,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563385,-99) , -6, 0.270458, 1, 0, 0.595178,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459828,-99) , -11, 0.5, 1, 0, 0.516375,-99) , -16, 1141.71, 1, 0, 0.552146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432062,-99) , -8, -0.9558, 0, 0, 0.538265,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539766,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365059,-99) , -14, -4.54575, 1, 0, 0.404602,-99) , -3, 0.967208, 1, 0, 0.450459,-99) , -8, 0.914165, 1, 0, 0.522531,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652217,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570658,-99) , -12, 0.196379, 1, 0, 0.62172,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358141,-99) , -10, 5366.36, 1, 0, 0.496598,-99) , -0, 15.5, 0, 0, 0.557133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428765,-99) , -15, 0.617518, 1, 0, 0.536131,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333531,-99) , -6, 0.911203, 1, 0, 0.481049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243044,-99) , -5, 2.25703, 1, 0, 0.460948,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210591,-99) , -12, 0.249975, 0, 0, 0.305773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0307487,-99) , -5, 2.07673, 1, 0, 0.265937,-99) , -13, 0.00269826, 1, 0, 0.406427,-99) , -11, 1.5, 0, 0, 0.454507,-99) , -5, 1.64998, 1, 0, 0.495989,-99) ); - // itree = 504 - fBoostWeights.push_back(0.00764577); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622276,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532576,-99) , -8, 0.934872, 1, 0, 0.594457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436685,-99) , -3, 0.999082, 1, 0, 0.57684,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240992,-99) , -4, 1.98902, 1, 0, 0.494941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192468,-99) , -7, 0.0491853, 1, 0, 0.487951,-99) , -2, 24.5, 0, 0, 0.508279,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54323,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0770715,-99) , -5, 1.46822, 1, 0, 0.30431,-99) , -12, 0.396378, 0, 0, 0.371494,-99) , -13, 0.0229596, 1, 0, 0.498203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24523,-99) , -12, 0.01821, 0, 0, 0.492277,-99) ); - // itree = 505 - fBoostWeights.push_back(0.00723115); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595553,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506257,-99) , -6, 0.732857, 1, 0, 0.565189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440954,-99) , -8, 0.989923, 1, 0, 0.551046,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341502,-99) , -12, 0.0252547, 1, 0, 0.435436,-99) , -12, 0.0313038, 0, 0, 0.534637,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667543,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537513,-99) , -13, 0.0134845, 0, 0, 0.59786,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402297,-99) , -7, 0.0143751, 0, 0, 0.486561,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.145183,-99) , -7, 0.0674355, 1, 0, 0.384099,-99) , -4, 1.2917, 1, 0, 0.448536,-99) , -12, 0.415723, 0, 0, 0.465707,-99) , -12, 0.110628, 1, 0, 0.49663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274938,-99) , -12, 0.01821, 0, 0, 0.490715,-99) ); - // itree = 506 - fBoostWeights.push_back(0.00788304); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662924,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47312,-99) , -7, 0.053965, 1, 0, 0.555383,-99) , -16, 167.772, 0, 0, 0.569404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465842,-99) , -8, -0.896246, 0, 0, 0.557176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1506,-99) , -4, 2.0694, 1, 0, 0.550493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674639,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403886,-99) , -13, 0.0188379, 1, 0, 0.493883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341005,-99) , -12, 0.113366, 1, 0, 0.397365,-99) , -7, 0.0132788, 0, 0, 0.470351,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402726,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155517,-99) , -14, -3.06495, 1, 0, 0.307589,-99) , -4, 1.71368, 1, 0, 0.453607,-99) , -12, 0.492155, 0, 0, 0.463512,-99) , -16, 264.989, 1, 0, 0.492228,-99) ); - // itree = 507 - fBoostWeights.push_back(0.00486805); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665618,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413142,-99) , -14, -4.64766, 0, 0, 0.512371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287627,-99) , -0, 10.5, 1, 0, 0.394726,-99) , -7, 0.00908566, 0, 0, 0.503053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327648,-99) , -13, 0.0316678, 1, 0, 0.495985,-99) , -12, 0.509824, 0, 0, 0.502019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234511,-99) , -4, 2.06283, 1, 0, 0.496484,-99) ); - // itree = 508 - fBoostWeights.push_back(0.00798092); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669339,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561858,-99) , -8, -0.475536, 0, 0, 0.636856,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476822,-99) , -12, 0.205084, 1, 0, 0.551215,-99) , -16, 300.578, 1, 0, 0.597927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175023,-99) , -5, 2.25704, 1, 0, 0.586918,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415161,-99) , -5, 1.91981, 0, 0, 0.474642,-99) , -14, -3.6228, 0, 0, 0.558878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413376,-99) , -7, 0.00904184, 0, 0, 0.506923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339052,-99) , -3, 0.748857, 0, 0, 0.499824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342558,-99) , -3, 0.999224, 1, 0, 0.488651,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204178,-99) , -14, -3.42995, 1, 0, 0.328917,-99) , -4, 1.69967, 1, 0, 0.471464,-99) , -11, 1.5, 0, 0, 0.500871,-99) ); - // itree = 509 - fBoostWeights.push_back(0.0079061); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66714,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364083,-99) , -8, -0.982271, 0, 0, 0.516568,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260461,-99) , -1, 11.5, 1, 0, 0.364693,-99) , -14, -4.65075, 0, 0, 0.505606,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510458,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0847246,-99) , -8, 0.946352, 0, 0, 0.352654,-99) , -5, 2.09046, 1, 0, 0.493803,-99) , -12, 0.511562, 0, 0, 0.500319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218574,-99) , -7, 0.219572, 1, 0, 0.496367,-99) ); - // itree = 510 - fBoostWeights.push_back(0.00497449); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451912,-99) , -8, -0.884372, 0, 0, 0.551226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245126,-99) , -4, 2.07597, 1, 0, 0.54602,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460234,-99) , -12, 0.100182, 1, 0, 0.488084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341153,-99) , -12, 0.0286099, 0, 0, 0.479075,-99) , -16, 511.376, 1, 0, 0.505189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259178,-99) , -2, 6.5, 0, 0, 0.499927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223105,-99) , -7, 0.19385, 1, 0, 0.495227,-99) ); - // itree = 511 - fBoostWeights.push_back(0.00730469); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709448,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290694,-99) , -13, 0.0492026, 1, 0, 0.535435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303622,-99) , -12, 0.0216857, 0, 0, 0.525892,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390661,-99) , -8, 0.753448, 1, 0, 0.464827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199739,-99) , -7, 0.0280665, 1, 0, 0.448425,-99) , -2, 12.5, 0, 0, 0.496892,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31449,-99) , -5, 2.21078, 1, 0, 0.488912,-99) , -12, 0.534374, 0, 0, 0.496632,-99) ); - // itree = 512 - fBoostWeights.push_back(0.00671231); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485312,-99) , -5, 1.53815, 1, 0, 0.544525,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239478,-99) , -7, 0.0360559, 1, 0, 0.482676,-99) , -2, 19.5, 0, 0, 0.506394,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336261,-99) , -3, 0.99962, 1, 0, 0.501588,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41945,-99) , -6, 0.691399, 1, 0, 0.484468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326535,-99) , -5, 1.82417, 1, 0, 0.444213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0148338,-99) , -7, 0.0369502, 1, 0, 0.4143,-99) , -1, 8.5, 0, 0, 0.48966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0654887,-99) , -7, 0.351145, 1, 0, 0.487389,-99) ); - // itree = 513 - fBoostWeights.push_back(0.00846222); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.7034,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596246,-99) , -16, 70.1536, 0, 0, 0.64916,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505962,-99) , -15, 1.65224, 1, 0, 0.609328,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440205,-99) , -7, 0.0236424, 1, 0, 0.517558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311718,-99) , -5, 2.24263, 1, 0, 0.507584,-99) , -2, 24.5, 0, 0, 0.534891,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649925,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276012,-99) , -15, 0.0585713, 0, 0, 0.490855,-99) , -12, 0.330893, 0, 0, 0.509755,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372995,-99) , -2, 12.5, 0, 0, 0.431538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164271,-99) , -5, 2.17063, 1, 0, 0.41778,-99) , -11, 0.5, 1, 0, 0.471798,-99) , -16, 969.262, 1, 0, 0.500641,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24402,-99) , -4, 0.945312, 1, 0, 0.380809,-99) , -13, 0.0182087, 1, 0, 0.488918,-99) ); - // itree = 514 - fBoostWeights.push_back(0.00677157); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684661,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37957,-99) , -1, 68.5, 1, 0, 0.561959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274232,-99) , -1, 9.5, 0, 0, 0.551209,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470332,-99) , -10, -7029.07, 1, 0, 0.482712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15415,-99) , -7, 0.0447637, 1, 0, 0.473359,-99) , -2, 20.5, 0, 0, 0.498609,-99) , -12, 0.513211, 0, 0, 0.505231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0989689,-99) , -7, 0.280959, 1, 0, 0.502221,-99) ); - // itree = 515 - fBoostWeights.push_back(0.00666484); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490402,-99) , -5, 1.60129, 1, 0, 0.526623,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0301165,-99) , -1, 14.5, 0, 0, 0.418918,-99) , -7, 0.0801532, 1, 0, 0.51464,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390165,-99) , -8, 0.913101, 0, 0, 0.460399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18339,-99) , -13, 0.00210853, 1, 0, 0.402518,-99) , -7, 0.00922198, 0, 0, 0.506029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358595,-99) , -8, -0.98302, 0, 0, 0.499331,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225129,-99) , -4, 2.07713, 1, 0, 0.49411,-99) ); - // itree = 516 - fBoostWeights.push_back(0.00625571); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62659,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516394,-99) , -7, 0.0179711, 0, 0, 0.603253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474457,-99) , -1, 43.5, 1, 0, 0.580343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463215,-99) , -1, 10.5, 0, 0, 0.55755,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414745,-99) , -8, 0.988621, 1, 0, 0.513149,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469201,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316755,-99) , -1, 8.5, 0, 0, 0.446839,-99) , -16, 3257.44, 1, 0, 0.481554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115503,-99) , -7, 0.21273, 1, 0, 0.477209,-99) , -4, 0.696957, 1, 0, 0.500794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241074,-99) , -4, 2.01487, 1, 0, 0.494251,-99) ); - // itree = 517 - fBoostWeights.push_back(0.0049687); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662316,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552335,-99) , -13, 0.00172798, 0, 0, 0.600574,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527935,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434851,-99) , -7, 0.0127905, 0, 0, 0.507399,-99) , -12, 0.0594875, 1, 0, 0.522956,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386482,-99) , -4, 1.0748, 0, 0, 0.433743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257674,-99) , -4, 1.61406, 1, 0, 0.403159,-99) , -12, 0.032708, 0, 0, 0.512316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34968,-99) , -3, 0.775689, 0, 0, 0.505382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30286,-99) , -3, 0.999652, 1, 0, 0.500135,-99) ); - // itree = 518 - fBoostWeights.push_back(0.00511845); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.706719,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524378,-99) , -2, 14.5, 0, 0, 0.62928,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488558,-99) , -4, 0.0917971, 1, 0, 0.498264,-99) , -10, -8426.86, 1, 0, 0.506981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249104,-99) , -7, 0.170561, 1, 0, 0.502011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33268,-99) , -5, 0.56881, 0, 0, 0.493964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223148,-99) , -2, 6.5, 0, 0, 0.488946,-99) ); - // itree = 519 - fBoostWeights.push_back(0.00677951); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641463,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475687,-99) , -16, 967.566, 1, 0, 0.565947,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419427,-99) , -4, 1.10728, 0, 0, 0.486294,-99) , -13, 0.00563574, 0, 0, 0.513162,-99) , -6, 0.0989002, 1, 0, 0.533943,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488148,-99) , -13, 0.00210551, 0, 0, 0.562505,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379573,-99) , -3, 0.995619, 1, 0, 0.460217,-99) , -6, 0.820893, 1, 0, 0.523829,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422264,-99) , -9, -6.32615, 1, 0, 0.434911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137938,-99) , -7, 0.133239, 1, 0, 0.426891,-99) , -5, 1.44668, 1, 0, 0.472059,-99) , -11, 1.5, 0, 0, 0.492979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264044,-99) , -4, 2.07713, 1, 0, 0.488546,-99) ); - // itree = 520 - fBoostWeights.push_back(0.00678544); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481334,-99) , -7, 0.0151394, 0, 0, 0.520788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321413,-99) , -4, 1.97247, 1, 0, 0.514765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304049,-99) , -14, -5.5514, 0, 0, 0.508082,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233126,-99) , -2, 6.5, 0, 0, 0.502462,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303122,-99) , -3, 0.995261, 1, 0, 0.439768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0291943,-99) , -1, 18.5, 0, 0, 0.359524,-99) , -7, 0.0891699, 1, 0, 0.491256,-99) ); - // itree = 521 - fBoostWeights.push_back(0.00547525); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686892,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60094,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51431,-99) , -2, 17.5, 0, 0, 0.557129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38989,-99) , -15, 0.0842028, 0, 0, 0.540801,-99) , -15, 0.0527044, 1, 0, 0.55829,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365505,-99) , -1, 40.5, 1, 0, 0.500491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349953,-99) , -5, 2.06778, 1, 0, 0.49238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332559,-99) , -7, 0.103985, 1, 0, 0.483132,-99) , -11, 1.5, 0, 0, 0.508443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289195,-99) , -4, 1.96752, 1, 0, 0.500982,-99) ); - // itree = 522 - fBoostWeights.push_back(0.00693402); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693198,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666433,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549369,-99) , -6, 0.679845, 1, 0, 0.608072,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455087,-99) , -9, -2.33025, 1, 0, 0.498541,-99) , -13, 0.00395106, 0, 0, 0.550394,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286345,-99) , -13, 0.0296706, 1, 0, 0.493024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278593,-99) , -3, 0.999072, 1, 0, 0.478548,-99) , -5, 1.37113, 1, 0, 0.504627,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44955,-99) , -5, 1.4214, 0, 0, 0.477609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353938,-99) , -15, 0.133164, 0, 0, 0.439708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158489,-99) , -5, 1.88073, 1, 0, 0.41426,-99) , -8, -0.837444, 0, 0, 0.491758,-99) , -12, 0.526853, 0, 0, 0.498959,-99) ); - // itree = 523 - fBoostWeights.push_back(0.00511113); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620928,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438743,-99) , -1, 9.5, 0, 0, 0.509812,-99) , -9, 6.26016, 0, 0, 0.520388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354905,-99) , -3, 0.999492, 1, 0, 0.51344,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325179,-99) , -12, 0.129316, 1, 0, 0.415745,-99) , -8, -0.896962, 0, 0, 0.50217,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124045,-99) , -13, 0.00122374, 1, 0, 0.359832,-99) , -4, 1.87404, 1, 0, 0.494115,-99) ); - // itree = 524 - fBoostWeights.push_back(0.00927953); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649991,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503439,-99) , -15, 1.54183, 1, 0, 0.619419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424977,-99) , -1, 69.5, 1, 0, 0.597689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196271,-99) , -1, 12.5, 0, 0, 0.57886,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49966,-99) , -10, -4356.8, 1, 0, 0.510129,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120657,-99) , -8, 0.919449, 0, 0, 0.368253,-99) , -5, 2.1217, 1, 0, 0.499596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184774,-99) , -7, 0.0501985, 1, 0, 0.489077,-99) , -2, 26.5, 0, 0, 0.510535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294227,-99) , -3, 0.999625, 1, 0, 0.50431,-99) ); - // itree = 525 - fBoostWeights.push_back(0.00384901); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688243,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548706,-99) , -6, 0.532254, 1, 0, 0.632125,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648524,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461344,-99) , -5, 1.64489, 1, 0, 0.499182,-99) , -9, 9.80519, 0, 0, 0.506271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311312,-99) , -3, 0.99969, 1, 0, 0.501324,-99) , -12, 0.415723, 0, 0, 0.509591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352912,-99) , -2, 7.5, 0, 0, 0.502063,-99) ); - // itree = 526 - fBoostWeights.push_back(0.00570063); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671401,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479302,-99) , -12, 0.125358, 1, 0, 0.520804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313705,-99) , -14, -5.3152, 0, 0, 0.512669,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33612,-99) , -2, 9.5, 0, 0, 0.455793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263551,-99) , -12, 0.0298522, 0, 0, 0.439027,-99) , -6, 0.821055, 1, 0, 0.491769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315234,-99) , -5, 2.20145, 1, 0, 0.483781,-99) , -12, 0.513631, 0, 0, 0.491147,-99) ); - // itree = 527 - fBoostWeights.push_back(0.0080945); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657342,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514536,-99) , -14, -3.06963, 0, 0, 0.605593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448693,-99) , -13, 0.0180746, 1, 0, 0.579655,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466415,-99) , -15, 0.0892507, 0, 0, 0.51933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243705,-99) , -7, 0.031533, 1, 0, 0.500143,-99) , -2, 18.5, 0, 0, 0.527955,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344205,-99) , -2, 8.5, 0, 0, 0.5005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340742,-99) , -15, 1.10829, 1, 0, 0.481569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227453,-99) , -3, 0.866836, 0, 0, 0.46616,-99) , -6, 0.590581, 1, 0, 0.502353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235727,-99) , -4, 2.07717, 1, 0, 0.497726,-99) ); - // itree = 528 - fBoostWeights.push_back(0.00727318); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441975,-99) , -14, -3.86635, 0, 0, 0.525994,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327742,-99) , -1, 13.5, 0, 0, 0.430211,-99) , -8, -0.895085, 0, 0, 0.514763,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428005,-99) , -8, 0.991908, 0, 0, 0.500396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189751,-99) , -8, 0.746796, 0, 0, 0.420131,-99) , -5, 1.99208, 1, 0, 0.502954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230652,-99) , -12, 0.0168791, 0, 0, 0.497767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0283945,-99) , -7, 0.291101, 1, 0, 0.495055,-99) ); - // itree = 529 - fBoostWeights.push_back(0.00604174); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670108,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569459,-99) , -10, 3751.01, 0, 0, 0.620539,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301114,-99) , -1, 14.5, 0, 0, 0.511424,-99) , -11, 1.5, 0, 0, 0.570202,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392696,-99) , -15, 0.448686, 1, 0, 0.511682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339095,-99) , -5, 2.06472, 1, 0, 0.494633,-99) , -2, 20.5, 0, 0, 0.52139,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356736,-99) , -15, 0.883232, 1, 0, 0.493367,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3404,-99) , -6, 0.850072, 1, 0, 0.424135,-99) , -3, 0.976419, 0, 0, 0.467242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232544,-99) , -5, 2.31642, 1, 0, 0.462035,-99) , -16, 1038.88, 1, 0, 0.489369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274221,-99) , -3, 0.999696, 1, 0, 0.484718,-99) ); - // itree = 530 - fBoostWeights.push_back(0.00794197); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660227,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564396,-99) , -3, 0.9878, 0, 0, 0.618034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688944,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542674,-99) , -5, 2.08421, 0, 0, 0.569751,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387128,-99) , -2, 14.5, 0, 0, 0.466903,-99) , -16, 700.025, 1, 0, 0.537775,-99) , -8, 0.324573, 1, 0, 0.566567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432698,-99) , -8, -0.897834, 0, 0, 0.553913,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492333,-99) , -2, 24.5, 0, 0, 0.512534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319482,-99) , -3, 0.745014, 0, 0, 0.504418,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518973,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388228,-99) , -9, 2.81538, 0, 0, 0.44599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203224,-99) , -7, 0.065525, 1, 0, 0.405415,-99) , -3, 0.997965, 1, 0, 0.488976,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462109,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130291,-99) , -8, 0.89024, 0, 0, 0.319742,-99) , -4, 1.77613, 1, 0, 0.475453,-99) , -11, 1.5, 0, 0, 0.501728,-99) ); - // itree = 531 - fBoostWeights.push_back(0.00764859); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677647,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583224,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504194,-99) , -15, 0.559976, 1, 0, 0.553371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295346,-99) , -12, 0.0173719, 0, 0, 0.54013,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288234,-99) , -7, 0.00897731, 0, 0, 0.486748,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.074613,-99) , -8, -0.410757, 0, 0, 0.343515,-99) , -4, 1.54246, 1, 0, 0.459714,-99) , -12, 0.113273, 1, 0, 0.498747,-99) , -12, 0.497308, 0, 0, 0.505864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255486,-99) , -2, 6.5, 0, 0, 0.500702,-99) ); - // itree = 532 - fBoostWeights.push_back(0.00737435); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672786,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397487,-99) , -12, 0.0312534, 0, 0, 0.510312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285313,-99) , -14, -4.98776, 0, 0, 0.501253,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376059,-99) , -16, 343.087, 1, 0, 0.452722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141102,-99) , -14, -2.51393, 1, 0, 0.394716,-99) , -5, 1.93508, 1, 0, 0.486741,-99) , -12, 0.512884, 0, 0, 0.494033,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.121644,-99) , -4, 2.16192, 1, 0, 0.49044,-99) ); - // itree = 533 - fBoostWeights.push_back(0.00873165); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662831,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632167,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448611,-99) , -9, -1.53113, 1, 0, 0.512619,-99) , -6, 0.206926, 1, 0, 0.552525,-99) , -9, 2.87712, 0, 0, 0.580194,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603392,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218129,-99) , -5, 2.11477, 1, 0, 0.526363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286698,-99) , -8, 0.965171, 1, 0, 0.478405,-99) , -7, 0.0110341, 1, 0, 0.509873,-99) , -0, 16.5, 0, 0, 0.549142,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440009,-99) , -8, -0.807626, 0, 0, 0.548116,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355965,-99) , -10, 2416.27, 1, 0, 0.418106,-99) , -12, 0.0362326, 0, 0, 0.516878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430096,-99) , -2, 21.5, 0, 0, 0.455468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20695,-99) , -7, 0.0934512, 1, 0, 0.439695,-99) , -12, 0.108649, 1, 0, 0.473696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239535,-99) , -4, 1.98884, 1, 0, 0.466871,-99) , -11, 1.5, 0, 0, 0.494165,-99) ); - // itree = 534 - fBoostWeights.push_back(0.00452668); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669419,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229859,-99) , -5, 2.43407, 1, 0, 0.543533,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486249,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294108,-99) , -13, 0.0334742, 1, 0, 0.477683,-99) , -11, 1.5, 0, 0, 0.500136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326176,-99) , -12, 0.019767, 0, 0, 0.494199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316583,-99) , -15, 0.0349629, 0, 0, 0.486986,-99) , -12, 0.527172, 0, 0, 0.49321,-99) ); - // itree = 535 - fBoostWeights.push_back(0.00583809); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675183,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548374,-99) , -6, 0.555676, 1, 0, 0.615067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459543,-99) , -14, -3.45711, 0, 0, 0.543374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211302,-99) , -7, 0.0406535, 1, 0, 0.517785,-99) , -1, 15.5, 0, 0, 0.551967,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439519,-99) , -6, 0.786034, 1, 0, 0.501878,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399415,-99) , -10, 11431.7, 0, 0, 0.434579,-99) , -3, 0.991422, 1, 0, 0.480843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23477,-99) , -7, 0.00699733, 0, 0, 0.476116,-99) , -9, 2.92705, 0, 0, 0.494231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294518,-99) , -3, 0.999634, 1, 0, 0.488797,-99) ); - // itree = 536 - fBoostWeights.push_back(0.0101121); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655344,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557531,-99) , -13, 0.00220336, 0, 0, 0.617316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443832,-99) , -1, 52.5, 1, 0, 0.5927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195791,-99) , -1, 11.5, 0, 0, 0.576319,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350173,-99) , -14, -4.78448, 0, 0, 0.510764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235074,-99) , -5, 2.24537, 1, 0, 0.50026,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126751,-99) , -2, 16.5, 0, 0, 0.3165,-99) , -7, 0.0330927, 1, 0, 0.481613,-99) , -2, 24.5, 0, 0, 0.503992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260353,-99) , -7, 0.15601, 1, 0, 0.497787,-99) ); - // itree = 537 - fBoostWeights.push_back(0.0064937); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17169,-99) , -4, 1.98895, 1, 0, 0.534809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245434,-99) , -5, 2.24239, 1, 0, 0.527236,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530771,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365449,-99) , -5, 1.37835, 1, 0, 0.402816,-99) , -5, 2.01793, 0, 0, 0.439407,-99) , -14, -3.91751, 0, 0, 0.510248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326743,-99) , -7, 0.135535, 1, 0, 0.503528,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343462,-99) , -9, -0.6685, 0, 0, 0.424371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136854,-99) , -5, 1.82708, 1, 0, 0.392802,-99) , -8, -0.89627, 0, 0, 0.4912,-99) ); - // itree = 538 - fBoostWeights.push_back(0.00663804); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432655,-99) , -8, 0.984724, 1, 0, 0.529719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345807,-99) , -7, 0.0179727, 1, 0, 0.46347,-99) , -2, 11.5, 0, 0, 0.508431,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224793,-99) , -14, -4.04457, 1, 0, 0.383643,-99) , -5, 2.12456, 1, 0, 0.499707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219493,-99) , -13, 0.062928, 1, 0, 0.494743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228164,-99) , -12, 0.0165396, 0, 0, 0.489397,-99) ); - // itree = 539 - fBoostWeights.push_back(0.00807078); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241454,-99) , -7, 0.194184, 1, 0, 0.532648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326492,-99) , -1, 71.5, 1, 0, 0.526693,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329056,-99) , -6, 0.355249, 0, 0, 0.41673,-99) , -14, -4.39248, 0, 0, 0.516958,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540236,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351947,-99) , -3, 0.982362, 0, 0, 0.458713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216678,-99) , -0, 11.5, 1, 0, 0.393247,-99) , -7, 0.00915005, 0, 0, 0.507892,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125386,-99) , -14, -4.23426, 1, 0, 0.285715,-99) , -5, 2.13253, 1, 0, 0.495404,-99) ); - // itree = 540 - fBoostWeights.push_back(0.00821718); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355389,-99) , -5, 2.02144, 1, 0, 0.579224,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430835,-99) , -5, 1.85453, 0, 0, 0.501677,-99) , -14, -3.36795, 0, 0, 0.55184,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278926,-99) , -1, 26.5, 0, 0, 0.45172,-99) , -15, 1.26161, 1, 0, 0.534687,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648178,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392111,-99) , -4, 1.3584, 1, 0, 0.46219,-99) , -12, 0.508978, 0, 0, 0.475287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249039,-99) , -4, 1.8492, 1, 0, 0.461513,-99) , -12, 0.10141, 1, 0, 0.491125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220326,-99) , -12, 0.0174121, 0, 0, 0.485158,-99) ); - // itree = 541 - fBoostWeights.push_back(0.00691055); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495103,-99) , -5, 0.786064, 0, 0, 0.57735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454853,-99) , -2, 9.5, 0, 0, 0.564029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445673,-99) , -8, -0.945819, 0, 0, 0.548126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332873,-99) , -3, 0.987401, 1, 0, 0.429988,-99) , -6, 0.283338, 0, 0, 0.478995,-99) , -14, -3.172, 0, 0, 0.530906,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490751,-99) , -3, 0.998214, 0, 0, 0.58519,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196241,-99) , -7, 0.00736152, 0, 0, 0.458548,-99) , -9, 6.41125, 0, 0, 0.473089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187514,-99) , -7, 0.126792, 1, 0, 0.464393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160949,-99) , -3, 0.748278, 0, 0, 0.455908,-99) , -4, 1.13537, 1, 0, 0.495868,-99) ); - // itree = 542 - fBoostWeights.push_back(0.00358109); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634041,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524578,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459671,-99) , -8, 0.848087, 1, 0, 0.503412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328152,-99) , -13, 0.0254329, 1, 0, 0.494707,-99) , -12, 0.479045, 0, 0, 0.500563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367254,-99) , -5, 0.447282, 0, 0, 0.494405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353821,-99) , -4, 1.91929, 1, 0, 0.488144,-99) ); - // itree = 543 - fBoostWeights.push_back(0.0077992); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.773483,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376942,-99) , -8, 0.989985, 1, 0, 0.555596,-99) , -5, 2.15971, 0, 0, 0.571164,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532157,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279685,-99) , -12, 0.0235362, 0, 0, 0.382801,-99) , -8, 0.147053, 1, 0, 0.455075,-99) , -12, 0.0371721, 0, 0, 0.536702,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592798,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329234,-99) , -8, -0.968545, 0, 0, 0.473986,-99) , -16, 9.16659, 1, 0, 0.487225,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212919,-99) , -9, -0.798497, 1, 0, 0.337666,-99) , -4, 1.6765, 1, 0, 0.469958,-99) , -12, 0.0977799, 1, 0, 0.497219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200453,-99) , -5, 2.48996, 1, 0, 0.494208,-99) ); - // itree = 544 - fBoostWeights.push_back(0.00614551); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499765,-99) , -5, 1.43666, 1, 0, 0.528335,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126174,-99) , -4, 1.5669, 1, 0, 0.423537,-99) , -8, -0.908409, 0, 0, 0.516783,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497128,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270053,-99) , -16, 417.409, 1, 0, 0.353536,-99) , -11, 0.5, 1, 0, 0.419641,-99) , -7, 0.0100032, 0, 0, 0.50625,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23434,-99) , -7, 0.0254813, 1, 0, 0.372741,-99) , -3, 0.999155, 1, 0, 0.497048,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254439,-99) , -5, 2.33369, 1, 0, 0.491467,-99) ); - // itree = 545 - fBoostWeights.push_back(0.00417549); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670775,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334068,-99) , -12, 0.0181941, 0, 0, 0.509939,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357027,-99) , -8, 0.737395, 1, 0, 0.434946,-99) , -2, 9.5, 0, 0, 0.497587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307656,-99) , -13, 0.0377037, 1, 0, 0.491714,-99) , -12, 0.521876, 0, 0, 0.498283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257676,-99) , -4, 2.07717, 1, 0, 0.493524,-99) ); - // itree = 546 - fBoostWeights.push_back(0.00961372); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574925,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501842,-99) , -6, 0.449762, 1, 0, 0.545724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384766,-99) , -14, -4.879, 0, 0, 0.536066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416685,-99) , -7, 0.00994547, 0, 0, 0.526761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428954,-99) , -8, -0.946433, 0, 0, 0.517249,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63183,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452327,-99) , -9, -3.14441, 1, 0, 0.499632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329898,-99) , -3, 0.997419, 1, 0, 0.473235,-99) , -2, 24.5, 0, 0, 0.503948,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559726,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158966,-99) , -0, 52.5, 1, 0, 0.382898,-99) , -10, -1600.77, 1, 0, 0.421601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.81969, 1, 0, 0.377688,-99) , -14, -2.99741, 1, 0, 0.444234,-99) , -4, 1.29371, 1, 0, 0.490472,-99) ); - // itree = 547 - fBoostWeights.push_back(0.00739806); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640794,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46062,-99) , -1, 12.5, 0, 0, 0.532103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421258,-99) , -3, 0.996557, 1, 0, 0.509264,-99) , -10, -3516.67, 1, 0, 0.527801,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357092,-99) , -13, 0.00816355, 1, 0, 0.528332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32963,-99) , -12, 0.0216857, 0, 0, 0.511965,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311694,-99) , -5, 2.14361, 1, 0, 0.510097,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346704,-99) , -8, 0.950365, 0, 0, 0.390007,-99) , -11, 1.5, 0, 0, 0.429219,-99) , -12, 0.11523, 1, 0, 0.467286,-99) , -4, 0.892497, 1, 0, 0.490619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238437,-99) , -3, 0.999742, 1, 0, 0.486581,-99) ); - // itree = 548 - fBoostWeights.push_back(0.00500364); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471115,-99) , -3, 0.995725, 1, 0, 0.595389,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301703,-99) , -7, 0.0569434, 1, 0, 0.493544,-99) , -2, 36.5, 0, 0, 0.506122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109957,-99) , -7, 0.246898, 1, 0, 0.503806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279851,-99) , -1, 77.5, 1, 0, 0.499063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.197143,-99) , -5, 2.47694, 1, 0, 0.495953,-99) ); - // itree = 549 - fBoostWeights.push_back(0.00873172); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69161,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466158,-99) , -14, -3.2953, 0, 0, 0.526998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32842,-99) , -5, 1.44032, 1, 0, 0.451623,-99) , -13, 0.010969, 1, 0, 0.511553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387656,-99) , -7, 0.00920108, 0, 0, 0.503056,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675116,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526764,-99) , -5, 2.14895, 0, 0, 0.595829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324176,-99) , -4, 1.67529, 1, 0, 0.408002,-99) , -2, 13.5, 0, 0, 0.502427,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28076,-99) , -12, 0.0657561, 1, 0, 0.352324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0538286,-99) , -4, 1.96546, 1, 0, 0.310636,-99) , -14, -3.31421, 1, 0, 0.418036,-99) , -5, 1.86021, 1, 0, 0.486456,-99) , -12, 0.534864, 0, 0, 0.493244,-99) ); - // itree = 550 - fBoostWeights.push_back(0.00764154); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378645,-99) , -7, 0.0135534, 0, 0, 0.552633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369624,-99) , -1, 69.5, 1, 0, 0.545461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348424,-99) , -1, 8.5, 0, 0, 0.534879,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457175,-99) , -16, 251.267, 1, 0, 0.492229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140247,-99) , -5, 2.3896, 1, 0, 0.484884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13441,-99) , -7, 0.0280665, 1, 0, 0.46409,-99) , -2, 12.5, 0, 0, 0.507365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227371,-99) , -7, 0.202562, 1, 0, 0.502957,-99) ); - // itree = 551 - fBoostWeights.push_back(0.00663448); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588811,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502091,-99) , -6, 0.664325, 1, 0, 0.554878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113429,-99) , -5, 2.28863, 1, 0, 0.549282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349682,-99) , -5, 1.84225, 0, 0, 0.426533,-99) , -14, -4.67523, 0, 0, 0.536109,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472522,-99) , -12, 0.436917, 0, 0, 0.488028,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258847,-99) , -7, 0.00805688, 0, 0, 0.478222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292653,-99) , -3, 0.999337, 1, 0, 0.466989,-99) , -12, 0.130742, 1, 0, 0.50239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259114,-99) , -12, 0.01821, 0, 0, 0.496263,-99) ); - // itree = 552 - fBoostWeights.push_back(0.00763052); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703555,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605051,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336466,-99) , -7, 0.163303, 1, 0, 0.587444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0864161,-99) , -5, 2.36277, 1, 0, 0.501223,-99) , -2, 18.5, 0, 0, 0.536136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408319,-99) , -12, 0.0324153, 0, 0, 0.522109,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464583,-99) , -9, -3.70088, 1, 0, 0.486323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326258,-99) , -7, 0.0813586, 1, 0, 0.471172,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320618,-99) , -3, 0.981933, 0, 0, 0.376823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170347,-99) , -5, 1.86146, 1, 0, 0.329398,-99) , -15, 0.0579109, 0, 0, 0.451543,-99) , -16, 1042.88, 1, 0, 0.483496,-99) , -12, 0.534137, 0, 0, 0.491246,-99) ); - // itree = 553 - fBoostWeights.push_back(0.00895196); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601891,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516994,-99) , -6, 0.878008, 1, 0, 0.579055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474186,-99) , -8, 0.982876, 1, 0, 0.563288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425426,-99) , -8, -0.946433, 0, 0, 0.552333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651619,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349484,-99) , -15, 0.0468739, 0, 0, 0.468604,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124446,-99) , -13, 0.00325329, 1, 0, 0.310266,-99) , -4, 1.57522, 1, 0, 0.441039,-99) , -12, 0.525205, 0, 0, 0.454892,-99) , -12, 0.113752, 1, 0, 0.495936,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333716,-99) , -8, 0.138417, 1, 0, 0.39014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17206,-99) , -5, 2.02295, 1, 0, 0.368677,-99) , -12, 0.0312849, 0, 0, 0.484918,-99) ); - // itree = 554 - fBoostWeights.push_back(0.00973972); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670788,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685615,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527936,-99) , -16, 1996.06, 1, 0, 0.616804,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471254,-99) , -6, 0.382187, 1, 0, 0.523231,-99) , -10, 4819.88, 1, 0, 0.5633,-99) , -10, 8506.88, 0, 0, 0.587863,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627581,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38462,-99) , -8, 0.774463, 1, 0, 0.488682,-99) , -1, 11.5, 0, 0, 0.554305,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408573,-99) , -2, 16.5, 0, 0, 0.507489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31612,-99) , -3, 0.997214, 1, 0, 0.435956,-99) , -9, -5.51977, 1, 0, 0.500598,-99) , -3, 0.991454, 1, 0, 0.545666,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598195,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506335,-99) , -16, 3230.63, 1, 0, 0.560403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468929,-99) , -2, 13.5, 0, 0, 0.527889,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124741,-99) , -7, 0.117073, 1, 0, 0.502033,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15099,-99) , -4, 1.82596, 1, 0, 0.395061,-99) , -9, 2.71883, 0, 0, 0.444531,-99) , -4, 0.840139, 1, 0, 0.475181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14727,-99) , -7, 0.00711479, 0, 0, 0.468661,-99) , -9, -0.82038, 1, 0, 0.501914,-99) ); - // itree = 555 - fBoostWeights.push_back(0.00402715); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207249,-99) , -7, 0.240602, 1, 0, 0.524657,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359114,-99) , -12, 0.0204025, 1, 0, 0.42197,-99) , -12, 0.0312422, 0, 0, 0.515483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369714,-99) , -2, 7.5, 0, 0, 0.508333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294887,-99) , -3, 0.999637, 1, 0, 0.502562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331745,-99) , -5, 2.2453, 1, 0, 0.496233,-99) ); - // itree = 556 - fBoostWeights.push_back(0.00812721); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482225,-99) , -7, 0.0248469, 0, 0, 0.575567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10037,-99) , -1, 17.5, 0, 0, 0.446696,-99) , -7, 0.0798389, 1, 0, 0.548071,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492907,-99) , -12, 0.41423, 0, 0, 0.506115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266019,-99) , -7, 0.0280484, 1, 0, 0.487292,-99) , -2, 16.5, 0, 0, 0.513812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298121,-99) , -12, 0.01821, 0, 0, 0.508332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294673,-99) , -3, 0.999638, 1, 0, 0.502322,-99) ); - // itree = 557 - fBoostWeights.push_back(0.00709586); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305128,-99) , -1, 13.5, 0, 0, 0.619664,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241831,-99) , -7, 0.0523542, 1, 0, 0.501678,-99) , -2, 32.5, 0, 0, 0.517773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229437,-99) , -1, 70.5, 1, 0, 0.512619,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221535,-99) , -1, 31.5, 0, 0, 0.359094,-99) , -15, 1.97104, 1, 0, 0.504318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344704,-99) , -2, 7.5, 0, 0, 0.496639,-99) ); - // itree = 558 - fBoostWeights.push_back(0.00409761); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41393,-99) , -7, 0.105891, 1, 0, 0.525715,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265794,-99) , -6, 0.542072, 1, 0, 0.403524,-99) , -3, 0.830377, 0, 0, 0.51748,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226038,-99) , -5, 1.84832, 1, 0, 0.396931,-99) , -8, -0.972039, 0, 0, 0.510597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237445,-99) , -5, 2.48284, 1, 0, 0.50783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280781,-99) , -3, 0.99965, 1, 0, 0.502031,-99) ); - // itree = 559 - fBoostWeights.push_back(0.00539025); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598814,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507363,-99) , -9, 6.26089, 0, 0, 0.516374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385543,-99) , -12, 0.022715, 0, 0, 0.510667,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227192,-99) , -8, 0.985025, 0, 0, 0.384398,-99) , -5, 2.1726, 1, 0, 0.50369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251541,-99) , -7, 0.00744826, 0, 0, 0.497041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268098,-99) , -7, 0.146098, 1, 0, 0.490169,-99) ); - // itree = 560 - fBoostWeights.push_back(0.00501963); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623738,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405892,-99) , -3, 0.998493, 1, 0, 0.536114,-99) , -6, 0.159742, 1, 0, 0.556738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224938,-99) , -5, 2.44721, 1, 0, 0.550237,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463826,-99) , -9, -1.2201, 1, 0, 0.489299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340411,-99) , -4, 1.87392, 1, 0, 0.481553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182163,-99) , -13, 0.0902365, 1, 0, 0.477391,-99) , -11, 1.5, 0, 0, 0.501161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280088,-99) , -12, 0.0195509, 0, 0, 0.495071,-99) ); - // itree = 561 - fBoostWeights.push_back(0.00762488); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701171,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409677,-99) , -5, 0.595822, 0, 0, 0.546939,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356899,-99) , -16, 1341.5, 1, 0, 0.416417,-99) , -13, 0.000545289, 0, 0, 0.524129,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210883,-99) , -3, 0.790357, 0, 0, 0.477446,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141962,-99) , -13, 0.018764, 1, 0, 0.461946,-99) , -5, 1.54838, 1, 0, 0.495206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328801,-99) , -2, 7.5, 0, 0, 0.48764,-99) , -12, 0.526742, 0, 0, 0.495746,-99) ); - // itree = 562 - fBoostWeights.push_back(0.00655584); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483311,-99) , -1, 60.5, 1, 0, 0.59758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286822,-99) , -1, 14.5, 0, 0, 0.577544,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325651,-99) , -8, -0.989378, 0, 0, 0.509309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0910195,-99) , -7, 0.0668663, 1, 0, 0.50138,-99) , -2, 30.5, 0, 0, 0.515887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120215,-99) , -7, 0.324593, 1, 0, 0.513639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263971,-99) , -12, 0.016565, 0, 0, 0.508771,-99) ); - // itree = 563 - fBoostWeights.push_back(0.00642648); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574314,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504502,-99) , -12, 0.0455052, 0, 0, 0.552437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437503,-99) , -8, 0.989909, 1, 0, 0.539603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323166,-99) , -12, 0.0173719, 0, 0, 0.528675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253094,-99) , -7, 0.134853, 1, 0, 0.466045,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0609095,-99) , -5, 1.97676, 1, 0, 0.314684,-99) , -7, 0.0100329, 0, 0, 0.450036,-99) , -12, 0.521876, 0, 0, 0.461206,-99) , -12, 0.110552, 1, 0, 0.492846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100883,-99) , -5, 2.49032, 1, 0, 0.489448,-99) ); - // itree = 564 - fBoostWeights.push_back(0.00380083); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646152,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472308,-99) , -12, 0.0984659, 1, 0, 0.497579,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245831,-99) , -15, 0.293628, 1, 0, 0.364283,-99) , -14, -4.87842, 0, 0, 0.489504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155705,-99) , -5, 2.40272, 1, 0, 0.487122,-99) , -12, 0.509317, 0, 0, 0.492634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325062,-99) , -4, 1.98694, 1, 0, 0.487186,-99) ); - // itree = 565 - fBoostWeights.push_back(0.0063871); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679013,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626632,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522482,-99) , -9, -6.57191, 1, 0, 0.53403,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374631,-99) , -16, 980.815, 1, 0, 0.425139,-99) , -15, 0.0986616, 0, 0, 0.520966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32737,-99) , -12, 0.0181941, 0, 0, 0.513981,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450404,-99) , -2, 12.5, 0, 0, 0.501322,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229548,-99) , -0, 24.5, 1, 0, 0.406092,-99) , -5, 1.4754, 1, 0, 0.452289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203885,-99) , -4, 1.77503, 1, 0, 0.432391,-99) , -12, 0.197515, 1, 0, 0.492056,-99) , -12, 0.523332, 0, 0, 0.49845,-99) ); - // itree = 566 - fBoostWeights.push_back(0.00366047); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577637,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502827,-99) , -10, 8656.97, 0, 0, 0.515819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226991,-99) , -7, 0.252094, 1, 0, 0.513139,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287519,-99) , -7, 0.00711915, 0, 0, 0.508573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304343,-99) , -12, 0.0173719, 0, 0, 0.503966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243161,-99) , -4, 2.07557, 1, 0, 0.499143,-99) ); - // itree = 567 - fBoostWeights.push_back(0.00440353); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498948,-99) , -14, -3.83059, 0, 0, 0.560625,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392605,-99) , -16, 1608.74, 1, 0, 0.45624,-99) , -12, 0.0312838, 0, 0, 0.539097,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477618,-99) , -12, 0.450214, 0, 0, 0.490906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345197,-99) , -3, 0.999241, 1, 0, 0.480908,-99) , -12, 0.10141, 1, 0, 0.505611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317352,-99) , -5, 2.25671, 1, 0, 0.50149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270651,-99) , -4, 2.07376, 1, 0, 0.497032,-99) ); - // itree = 568 - fBoostWeights.push_back(0.00889936); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671104,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582223,-99) , -6, 0.436695, 1, 0, 0.613091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440794,-99) , -8, -0.882747, 0, 0, 0.574021,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54245,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344417,-99) , -16, 1072.38, 1, 0, 0.412036,-99) , -15, 0.292528, 1, 0, 0.482332,-99) , -13, 0.00303295, 0, 0, 0.537819,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308583,-99) , -0, 71.5, 1, 0, 0.494511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173447,-99) , -7, 0.00697176, 0, 0, 0.487657,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199815,-99) , -12, 0.402764, 0, 0, 0.310783,-99) , -13, 0.0124359, 1, 0, 0.470559,-99) , -5, 1.43598, 1, 0, 0.499147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244928,-99) , -3, 0.99965, 1, 0, 0.492658,-99) ); - // itree = 569 - fBoostWeights.push_back(0.00491254); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683499,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388143,-99) , -12, 0.01821, 0, 0, 0.549169,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455552,-99) , -11, 1.5, 0, 0, 0.487374,-99) , -12, 0.119779, 1, 0, 0.520274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328634,-99) , -13, 0.0377251, 1, 0, 0.513912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324905,-99) , -5, 2.22775, 1, 0, 0.506589,-99) , -12, 0.526853, 0, 0, 0.513023,-99) ); - // itree = 570 - fBoostWeights.push_back(0.00735102); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446634,-99) , -14, -3.24583, 0, 0, 0.558236,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328982,-99) , -13, 0.0110616, 1, 0, 0.496641,-99) , -5, 1.43395, 1, 0, 0.524254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272156,-99) , -13, 0.0374124, 1, 0, 0.520355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351406,-99) , -12, 0.018893, 0, 0, 0.513127,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619196,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514055,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321043,-99) , -5, 1.47708, 1, 0, 0.404054,-99) , -10, 5054.73, 0, 0, 0.441832,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185193,-99) , -14, -3.5123, 1, 0, 0.316844,-99) , -5, 1.87316, 1, 0, 0.414257,-99) , -12, 0.530061, 0, 0, 0.437594,-99) , -12, 0.196168, 1, 0, 0.490953,-99) ); - // itree = 571 - fBoostWeights.push_back(0.00763706); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407904,-99) , -12, 0.0216686, 0, 0, 0.546008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351864,-99) , -1, 70.5, 1, 0, 0.538144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204671,-99) , -7, 0.265233, 1, 0, 0.533568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369307,-99) , -1, 8.5, 0, 0, 0.523104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469132,-99) , -4, 1.61168, 0, 0, 0.491954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334703,-99) , -8, -0.868147, 0, 0, 0.473559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277404,-99) , -0, 15.5, 1, 0, 0.456581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125151,-99) , -5, 2.11108, 1, 0, 0.43398,-99) , -2, 11.5, 0, 0, 0.495163,-99) ); - // itree = 572 - fBoostWeights.push_back(0.00416621); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488107,-99) , -2, 23.5, 0, 0, 0.505954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308941,-99) , -12, 0.0167728, 0, 0, 0.501563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309924,-99) , -3, 0.999637, 1, 0, 0.496397,-99) , -12, 0.492021, 0, 0, 0.503891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210919,-99) , -4, 2.07376, 1, 0, 0.498755,-99) ); - // itree = 573 - fBoostWeights.push_back(0.00856332); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449547,-99) , -3, 0.997773, 1, 0, 0.607648,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3642,-99) , -14, -4.07462, 0, 0, 0.51456,-99) , -2, 18.5, 0, 0, 0.553041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422633,-99) , -12, 0.0312211, 0, 0, 0.539133,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62598,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527857,-99) , -2, 23.5, 0, 0, 0.57261,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41826,-99) , -5, 1.2311, 0, 0, 0.466375,-99) , -13, 0.00535495, 0, 0, 0.516403,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445686,-99) , -10, -4397.94, 1, 0, 0.466118,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128453,-99) , -1, 23.5, 0, 0, 0.308966,-99) , -7, 0.0376424, 1, 0, 0.440565,-99) , -5, 1.434, 1, 0, 0.47267,-99) , -16, 487.289, 1, 0, 0.498004,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0977863,-99) , -4, 1.58306, 1, 0, 0.353267,-99) , -8, -0.967625, 0, 0, 0.489172,-99) ); - // itree = 574 - fBoostWeights.push_back(0.00663223); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670746,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517439,-99) , -14, -3.21315, 0, 0, 0.624564,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499711,-99) , -5, 1.37397, 1, 0, 0.527373,-99) , -9, 2.87221, 0, 0, 0.552536,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439877,-99) , -11, 0.5, 1, 0, 0.492383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275883,-99) , -13, 0.028135, 1, 0, 0.484288,-99) , -16, 1957.71, 1, 0, 0.519172,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327212,-99) , -4, 0.983618, 1, 0, 0.405894,-99) , -8, -0.895998, 0, 0, 0.506206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212303,-99) , -4, 1.96825, 1, 0, 0.497511,-99) ); - // itree = 575 - fBoostWeights.push_back(0.00530674); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663998,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585566,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505459,-99) , -12, 0.0597036, 1, 0, 0.526084,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463816,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306343,-99) , -8, 0.901473, 1, 0, 0.426334,-99) , -12, 0.0313038, 0, 0, 0.514225,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348296,-99) , -7, 0.0411596, 1, 0, 0.472481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234271,-99) , -4, 1.74038, 1, 0, 0.450767,-99) , -12, 0.197504, 1, 0, 0.496757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231103,-99) , -7, 0.00691466, 0, 0, 0.492936,-99) , -12, 0.525198, 0, 0, 0.498727,-99) ); - // itree = 576 - fBoostWeights.push_back(0.00798127); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684388,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664313,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548841,-99) , -16, 246.539, 1, 0, 0.598306,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401554,-99) , -15, 0.896241, 1, 0, 0.512927,-99) , -3, 0.982253, 1, 0, 0.553805,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38746,-99) , -13, 0.00744093, 1, 0, 0.497175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390727,-99) , -12, 0.0336111, 0, 0, 0.47251,-99) , -6, 0.624575, 1, 0, 0.521434,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463149,-99) , -0, 13.5, 0, 0, 0.53558,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381353,-99) , -4, 1.07904, 1, 0, 0.440797,-99) , -11, 1.5, 0, 0, 0.472023,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213492,-99) , -13, 0.00110587, 1, 0, 0.344922,-99) , -4, 1.58719, 1, 0, 0.450166,-99) , -12, 0.110628, 1, 0, 0.484069,-99) , -12, 0.52367, 0, 0, 0.490602,-99) ); - // itree = 577 - fBoostWeights.push_back(0.00756565); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667167,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624309,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524723,-99) , -5, 1.83971, 0, 0, 0.541917,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341213,-99) , -6, 0.413222, 0, 0, 0.429079,-99) , -14, -4.37626, 0, 0, 0.52832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319919,-99) , -5, 2.17084, 1, 0, 0.520432,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56475,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407007,-99) , -5, 1.39883, 1, 0, 0.449828,-99) , -10, -1576.07, 1, 0, 0.470568,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0536709,-99) , -2, 8.5, 0, 0, 0.329387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0670968,-99) , -13, 0.0151349, 1, 0, 0.297091,-99) , -4, 1.5891, 1, 0, 0.443098,-99) , -12, 0.126584, 1, 0, 0.483985,-99) , -12, 0.539953, 0, 0, 0.490394,-99) ); - // itree = 578 - fBoostWeights.push_back(0.0102928); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616919,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516563,-99) , -5, 1.38614, 1, 0, 0.57858,-99) , -5, 1.89017, 0, 0, 0.603541,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427055,-99) , -8, 0.966206, 1, 0, 0.558986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407966,-99) , -7, 0.0220775, 1, 0, 0.525512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135222,-99) , -5, 2.35603, 1, 0, 0.514825,-99) , -0, 20.5, 0, 0, 0.554975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592093,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444732,-99) , -8, 0.736834, 1, 0, 0.521212,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389638,-99) , -2, 14.5, 0, 0, 0.451482,-99) , -9, -0.118294, 1, 0, 0.490876,-99) , -10, -2557.42, 1, 0, 0.506617,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632836,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322681,-99) , -12, 0.132158, 1, 0, 0.400931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170656,-99) , -4, 1.81726, 1, 0, 0.367435,-99) , -8, 0.997508, 0, 0, 0.404889,-99) , -5, 1.64941, 1, 0, 0.470124,-99) , -11, 1.5, 0, 0, 0.499065,-99) ); - // itree = 579 - fBoostWeights.push_back(0.00291766); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495249,-99) , -12, 0.124767, 1, 0, 0.519869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391,-99) , -8, -0.982487, 0, 0, 0.513815,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318811,-99) , -7, 0.00714175, 0, 0, 0.509695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293802,-99) , -1, 78.5, 1, 0, 0.50593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226071,-99) , -7, 0.234018, 1, 0, 0.5029,-99) ); - // itree = 580 - fBoostWeights.push_back(0.00708091); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647324,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469177,-99) , -8, -0.90201, 0, 0, 0.556512,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43462,-99) , -5, 1.20441, 0, 0, 0.477493,-99) , -14, -2.77209, 0, 0, 0.531031,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435474,-99) , -16, 534.445, 1, 0, 0.474673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0881312,-99) , -13, 0.0263061, 1, 0, 0.461824,-99) , -5, 1.54853, 1, 0, 0.500061,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389995,-99) , -3, 0.986619, 0, 0, 0.451225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295075,-99) , -6, 0.788097, 1, 0, 0.409588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179953,-99) , -5, 2.04426, 1, 0, 0.382053,-99) , -15, 0.0577334, 0, 0, 0.485441,-99) , -12, 0.510131, 0, 0, 0.49178,-99) ); - // itree = 581 - fBoostWeights.push_back(0.00643259); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498931,-99) , -6, 0.954336, 1, 0, 0.567957,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387316,-99) , -3, 0.886733, 0, 0, 0.498307,-99) , -12, 0.113902, 1, 0, 0.531148,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32643,-99) , -3, 0.997989, 1, 0, 0.46613,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196858,-99) , -4, 1.51588, 1, 0, 0.433796,-99) , -13, 0.0125115, 1, 0, 0.514707,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380366,-99) , -15, 1.54229, 1, 0, 0.430078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172068,-99) , -4, 1.6947, 1, 0, 0.397762,-99) , -12, 0.0313038, 0, 0, 0.504826,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23911,-99) , -2, 6.5, 0, 0, 0.499988,-99) ); - // itree = 582 - fBoostWeights.push_back(0.00341389); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66177,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538642,-99) , -13, 0.00215557, 0, 0, 0.602152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442395,-99) , -4, 1.29127, 1, 0, 0.484166,-99) , -12, 0.483704, 0, 0, 0.489892,-99) , -10, -8075.7, 1, 0, 0.497664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242096,-99) , -13, 0.0810049, 1, 0, 0.494406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225607,-99) , -5, 2.49129, 1, 0, 0.491675,-99) ); - // itree = 583 - fBoostWeights.push_back(0.00672675); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581317,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509883,-99) , -12, 0.113389, 1, 0, 0.541398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295183,-99) , -15, 3.5749, 1, 0, 0.535657,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494845,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248007,-99) , -7, 0.0263203, 1, 0, 0.372132,-99) , -12, 0.100427, 1, 0, 0.429793,-99) , -8, -0.921946, 0, 0, 0.524034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333505,-99) , -6, 0.363808, 0, 0, 0.463774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223391,-99) , -2, 11.5, 0, 0, 0.404352,-99) , -14, -4.64892, 0, 0, 0.514241,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340227,-99) , -0, 10.5, 1, 0, 0.439632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175807,-99) , -13, 0.00292968, 1, 0, 0.391033,-99) , -7, 0.00903901, 0, 0, 0.505749,-99) ); - // itree = 584 - fBoostWeights.push_back(0.00703261); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590864,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501781,-99) , -8, -0.653299, 0, 0, 0.559316,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39222,-99) , -15, 0.39402, 1, 0, 0.481133,-99) , -8, 0.711095, 1, 0, 0.53423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400938,-99) , -5, 0.505267, 0, 0, 0.524741,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463133,-99) , -11, 1.5, 0, 0, 0.506811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296061,-99) , -1, 7.5, 0, 0, 0.490357,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504279,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291535,-99) , -16, 256.534, 1, 0, 0.358822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0730206,-99) , -5, 2.15499, 1, 0, 0.325281,-99) , -14, -2.22444, 1, 0, 0.462788,-99) , -5, 1.68542, 1, 0, 0.503199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0886364,-99) , -7, 0.330462, 1, 0, 0.500967,-99) ); - // itree = 585 - fBoostWeights.push_back(0.00408396); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581268,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503331,-99) , -16, 359.511, 1, 0, 0.548765,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272369,-99) , -3, 0.734285, 0, 0, 0.48799,-99) , -11, 1.5, 0, 0, 0.508362,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329645,-99) , -8, -0.987046, 0, 0, 0.502654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0662241,-99) , -5, 2.57722, 1, 0, 0.500444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20292,-99) , -13, 0.0811795, 1, 0, 0.496999,-99) ); - // itree = 586 - fBoostWeights.push_back(0.00595262); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674428,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482324,-99) , -8, 0.867625, 1, 0, 0.54978,-99) , -4, 1.70075, 0, 0, 0.566282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447293,-99) , -15, 0.204964, 0, 0, 0.545296,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600416,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505527,-99) , -2, 28.5, 0, 0, 0.527841,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4285,-99) , -8, 0.998224, 0, 0, 0.44739,-99) , -4, 0.985927, 1, 0, 0.480959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.08576,-99) , -7, 0.2509, 1, 0, 0.477521,-99) , -12, 0.0915734, 1, 0, 0.499272,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385582,-99) , -3, 0.978508, 0, 0, 0.451061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283134,-99) , -10, 4827.37, 1, 0, 0.395817,-99) , -12, 0.0324514, 0, 0, 0.490085,-99) ); - // itree = 587 - fBoostWeights.push_back(0.00806991); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660781,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575642,-99) , -5, 1.73873, 0, 0, 0.604565,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40966,-99) , -16, 281.047, 1, 0, 0.504789,-99) , -0, 12.5, 0, 0, 0.578687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4739,-99) , -7, 0.0666069, 1, 0, 0.564655,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330687,-99) , -0, 16.5, 0, 0, 0.442698,-99) , -8, 0.970868, 1, 0, 0.540753,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447692,-99) , -3, 0.996406, 1, 0, 0.526558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232602,-99) , -3, 0.796242, 0, 0, 0.512081,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415204,-99) , -4, 0.712906, 1, 0, 0.446999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199167,-99) , -13, 0.0334568, 1, 0, 0.434677,-99) , -11, 0.5, 1, 0, 0.47239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169666,-99) , -4, 2.01798, 1, 0, 0.46599,-99) , -11, 1.5, 0, 0, 0.491169,-99) ); - // itree = 588 - fBoostWeights.push_back(0.0064349); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632054,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534112,-99) , -3, 0.982174, 1, 0, 0.579095,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435871,-99) , -3, 0.939272, 0, 0, 0.517239,-99) , -16, 1351.3, 1, 0, 0.548642,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391782,-99) , -8, -0.883078, 0, 0, 0.505618,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0264413,-99) , -3, 0.88979, 0, 0, 0.410642,-99) , -4, 1.49261, 1, 0, 0.483767,-99) , -12, 0.110653, 1, 0, 0.512619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29371,-99) , -12, 0.0181796, 0, 0, 0.506853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269202,-99) , -3, 0.999629, 1, 0, 0.500416,-99) ); - // itree = 589 - fBoostWeights.push_back(0.00401953); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560012,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498299,-99) , -5, 1.4018, 1, 0, 0.521962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317245,-99) , -1, 69.5, 1, 0, 0.516772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177747,-99) , -7, 0.265306, 1, 0, 0.514079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345232,-99) , -8, 0.251443, 1, 0, 0.413859,-99) , -12, 0.0314081, 0, 0, 0.50523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319238,-99) , -8, -0.983988, 0, 0, 0.49759,-99) ); - // itree = 590 - fBoostWeights.push_back(0.00492379); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652144,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525426,-99) , -10, 14822.3, 1, 0, 0.590606,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405783,-99) , -7, 0.00867743, 0, 0, 0.510966,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301027,-99) , -9, 4.79383, 0, 0, 0.416807,-99) , -3, 0.998659, 1, 0, 0.502456,-99) , -9, -6.53706, 1, 0, 0.510244,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314689,-99) , -13, 0.0725779, 1, 0, 0.507342,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10824,-99) , -14, -2.91165, 1, 0, 0.366905,-99) , -4, 1.83119, 1, 0, 0.498579,-99) ); - // itree = 591 - fBoostWeights.push_back(0.00415975); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617468,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5264,-99) , -2, 28.5, 0, 0, 0.547998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330851,-99) , -7, 0.00887992, 0, 0, 0.481525,-99) , -16, 486.476, 1, 0, 0.507483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370245,-99) , -12, 0.0239286, 0, 0, 0.500609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302668,-99) , -3, 0.99965, 1, 0, 0.495559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176979,-99) , -5, 2.48276, 1, 0, 0.492789,-99) ); - // itree = 592 - fBoostWeights.push_back(0.00519998); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471276,-99) , -6, 0.849712, 1, 0, 0.521489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353217,-99) , -5, 2.3088, 1, 0, 0.516734,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417742,-99) , -12, 0.215218, 0, 0, 0.468027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160375,-99) , -4, 1.31469, 1, 0, 0.404028,-99) , -13, 0.0187606, 1, 0, 0.506685,-99) , -12, 0.526395, 0, 0, 0.512758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216873,-99) , -7, 0.00711697, 0, 0, 0.507353,-99) ); - // itree = 593 - fBoostWeights.push_back(0.00795973); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608906,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522035,-99) , -13, 0.00202506, 0, 0, 0.57639,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249834,-99) , -7, 0.0422355, 1, 0, 0.509651,-99) , -2, 21.5, 0, 0, 0.533685,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22289,-99) , -7, 0.0314698, 1, 0, 0.471276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24398,-99) , -3, 0.945, 0, 0, 0.443496,-99) , -1, 9.5, 0, 0, 0.517316,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446376,-99) , -13, 0.0017239, 0, 0, 0.543987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353589,-99) , -7, 0.0351976, 1, 0, 0.476762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228739,-99) , -5, 1.84417, 1, 0, 0.434203,-99) , -3, 0.997886, 1, 0, 0.50343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333502,-99) , -8, -0.984885, 0, 0, 0.496011,-99) ); - // itree = 594 - fBoostWeights.push_back(0.00645426); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678546,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.41103, 1, 0, 0.511928,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358977,-99) , -6, 0.601652, 0, 0, 0.417163,-99) , -8, 0.981053, 1, 0, 0.49633,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308972,-99) , -12, 0.19606, 1, 0, 0.425512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0813682,-99) , -5, 1.95197, 1, 0, 0.404472,-99) , -8, -0.851892, 0, 0, 0.483727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.329358, 1, 0, 0.481517,-99) , -12, 0.526248, 0, 0, 0.488093,-99) ); - // itree = 595 - fBoostWeights.push_back(0.0060522); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613231,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528304,-99) , -6, 0.216439, 1, 0, 0.553926,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416957,-99) , -12, 0.188558, 1, 0, 0.48262,-99) , -16, 272.755, 1, 0, 0.505891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.282135, 1, 0, 0.502923,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345063,-99) , -9, 0.211571, 0, 0, 0.412458,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252157,-99) , -12, 0.0165266, 0, 0, 0.369099,-99) , -12, 0.0286101, 0, 0, 0.493236,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209178,-99) , -2, 6.5, 0, 0, 0.487866,-99) ); - // itree = 596 - fBoostWeights.push_back(0.00514335); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459251,-99) , -6, 0.954845, 1, 0, 0.568172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40116,-99) , -8, 0.990339, 1, 0, 0.550532,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482879,-99) , -2, 29.5, 0, 0, 0.497199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239457,-99) , -7, 0.145707, 1, 0, 0.490642,-99) , -12, 0.109496, 1, 0, 0.516701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361402,-99) , -5, 2.2429, 1, 0, 0.510551,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261416,-99) , -15, 4.08392, 1, 0, 0.506419,-99) ); - // itree = 597 - fBoostWeights.push_back(0.00892717); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456765,-99) , -7, 0.0243392, 0, 0, 0.572269,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315596,-99) , -7, 0.0279179, 1, 0, 0.493064,-99) , -2, 17.5, 0, 0, 0.530252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.064115,-99) , -7, 0.250303, 1, 0, 0.52738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288232,-99) , -1, 74.5, 1, 0, 0.520063,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468477,-99) , -16, 150.911, 1, 0, 0.509663,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.079677,-99) , -4, 1.7981, 1, 0, 0.385109,-99) , -12, 0.185823, 1, 0, 0.467453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231116,-99) , -3, 0.931807, 0, 0, 0.447871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0705943,-99) , -7, 0.0430966, 1, 0, 0.427371,-99) , -1, 9.5, 0, 0, 0.500619,-99) ); - // itree = 598 - fBoostWeights.push_back(0.00552658); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666443,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561843,-99) , -10, 2896, 1, 0, 0.615454,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101539,-99) , -4, 1.96838, 1, 0, 0.533597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427932,-99) , -8, 0.979392, 1, 0, 0.518623,-99) , -12, 0.0855194, 0, 0, 0.536992,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619347,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500665,-99) , -16, 2545.96, 1, 0, 0.559816,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231653,-99) , -7, 0.0358624, 1, 0, 0.458389,-99) , -2, 18.5, 0, 0, 0.487102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346581,-99) , -7, 0.0844831, 1, 0, 0.475984,-99) , -12, 0.101389, 1, 0, 0.500102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372482,-99) , -12, 0.0217797, 0, 0, 0.494913,-99) ); - // itree = 599 - fBoostWeights.push_back(0.00427167); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456466,-99) , -6, 0.771483, 1, 0, 0.599923,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391646,-99) , -3, 0.827782, 0, 0, 0.50355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334223,-99) , -14, -5.41849, 0, 0, 0.497396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300642,-99) , -2, 6.5, 0, 0, 0.492909,-99) , -10, -6147.49, 1, 0, 0.501995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282636,-99) , -3, 0.999662, 1, 0, 0.496528,-99) ); - // itree = 600 - fBoostWeights.push_back(0.00487177); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49972,-99) , -1, 11.5, 0, 0, 0.603725,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367868,-99) , -8, -0.974302, 0, 0, 0.500045,-99) , -6, 0.0723653, 1, 0, 0.51182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125664,-99) , -5, 2.5697, 1, 0, 0.509761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230957,-99) , -2, 6.5, 0, 0, 0.504339,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168304,-99) , -3, 0.999757, 1, 0, 0.49992,-99) ); - // itree = 601 - fBoostWeights.push_back(0.00592505); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683128,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580368,-99) , -2, 21.5, 0, 0, 0.61854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592429,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470123,-99) , -9, 0.555054, 0, 0, 0.525376,-99) , -8, -0.373687, 0, 0, 0.579655,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388942,-99) , -12, 0.142552, 0, 0, 0.477241,-99) , -8, 0.914378, 1, 0, 0.557814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438874,-99) , -5, 0.482572, 0, 0, 0.544296,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280863,-99) , -3, 0.730154, 0, 0, 0.480795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235135,-99) , -5, 2.48979, 1, 0, 0.477224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262319,-99) , -3, 0.999582, 1, 0, 0.472277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160311,-99) , -7, 0.170523, 1, 0, 0.466308,-99) , -4, 0.902363, 1, 0, 0.497422,-99) ); - // itree = 602 - fBoostWeights.push_back(0.00664841); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477445,-99) , -8, -0.812219, 0, 0, 0.578958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399756,-99) , -14, -4.02938, 0, 0, 0.560073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449213,-99) , -5, 0.505825, 0, 0, 0.544573,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495474,-99) , -15, 0.0274738, 1, 0, 0.504353,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0971961,-99) , -4, 1.68851, 1, 0, 0.424107,-99) , -8, -0.351566, 0, 0, 0.484099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133228,-99) , -7, 0.209122, 1, 0, 0.479453,-99) , -4, 0.834463, 1, 0, 0.502438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2596,-99) , -12, 0.0181829, 0, 0, 0.496823,-99) ); - // itree = 603 - fBoostWeights.push_back(0.00458452); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413633,-99) , -8, -0.923969, 0, 0, 0.511494,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214887,-99) , -14, -3.03715, 1, 0, 0.388913,-99) , -4, 1.82954, 1, 0, 0.503742,-99) , -10, -13239.1, 1, 0, 0.509389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293219,-99) , -7, 0.170607, 1, 0, 0.504353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228082,-99) , -2, 6.5, 0, 0, 0.498984,-99) ); - // itree = 604 - fBoostWeights.push_back(0.00515192); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524293,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440738,-99) , -1, 8.5, 0, 0, 0.513461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322557,-99) , -4, 1.9965, 1, 0, 0.507901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123685,-99) , -7, 0.248758, 1, 0, 0.504095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273586,-99) , -12, 0.0182006, 0, 0, 0.497565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1837,-99) , -2, 6.5, 0, 0, 0.491528,-99) ); - // itree = 605 - fBoostWeights.push_back(0.0031989); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343137,-99) , -13, 0.0551611, 1, 0, 0.517852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312773,-99) , -7, 0.00714056, 0, 0, 0.513933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3296,-99) , -3, 0.99965, 1, 0, 0.508879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357779,-99) , -5, 2.23631, 1, 0, 0.502519,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34121,-99) , -8, -0.984777, 0, 0, 0.496236,-99) ); - // itree = 606 - fBoostWeights.push_back(0.00342897); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443087,-99) , -8, 0.983387, 1, 0, 0.514778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339577,-99) , -12, 0.018167, 0, 0, 0.509759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372192,-99) , -13, 0.0311859, 1, 0, 0.503681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348806,-99) , -5, 2.2429, 1, 0, 0.497679,-99) , -12, 0.525205, 0, 0, 0.504699,-99) ); - // itree = 607 - fBoostWeights.push_back(0.00454439); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676055,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599682,-99) , -6, 0.699487, 1, 0, 0.642663,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534146,-99) , -8, 0.631008, 1, 0, 0.59856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345277,-99) , -5, 2.02669, 1, 0, 0.580281,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509826,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316881,-99) , -1, 83.5, 1, 0, 0.505573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319913,-99) , -2, 6.5, 0, 0, 0.501352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314809,-99) , -1, 6.5, 0, 0, 0.495527,-99) , -9, 4.39396, 0, 0, 0.508409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24582,-99) , -3, 0.999694, 1, 0, 0.502557,-99) ); - // itree = 608 - fBoostWeights.push_back(0.00568785); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.690501,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583905,-99) , -3, 0.942169, 1, 0, 0.616282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46902,-99) , -7, 0.0126871, 0, 0, 0.589431,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403267,-99) , -14, -4.5566, 0, 0, 0.566347,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478639,-99) , -9, -0.2581, 1, 0, 0.503565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289123,-99) , -3, 0.999668, 1, 0, 0.49849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35673,-99) , -3, 0.834605, 0, 0, 0.490387,-99) , -6, 0.159724, 1, 0, 0.506985,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309598,-99) , -2, 12.5, 0, 0, 0.389572,-99) , -9, 0.55831, 0, 0, 0.438251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.63748, 1, 0, 0.415078,-99) , -8, -0.854893, 0, 0, 0.495028,-99) ); - // itree = 609 - fBoostWeights.push_back(0.00662608); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692879,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558943,-99) , -7, 0.0175089, 0, 0, 0.642989,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452706,-99) , -13, 0.0034226, 0, 0, 0.504934,-99) , -3, 0.98509, 1, 0, 0.579862,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601493,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503845,-99) , -3, 0.992545, 1, 0, 0.556334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453515,-99) , -9, -1.13342, 1, 0, 0.526786,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389528,-99) , -5, 1.86222, 1, 0, 0.490968,-99) , -9, 0.26292, 0, 0, 0.533781,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611255,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284062,-99) , -13, 0.0314274, 1, 0, 0.482128,-99) , -12, 0.411832, 0, 0, 0.4915,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284238,-99) , -4, 1.30436, 1, 0, 0.37907,-99) , -3, 0.922896, 0, 0, 0.476218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259007,-99) , -3, 0.999625, 1, 0, 0.470084,-99) , -6, 0.292796, 1, 0, 0.492479,-99) ); - // itree = 610 - fBoostWeights.push_back(0.00484632); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674206,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505922,-99) , -2, 12.5, 1, 0, 0.601133,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384731,-99) , -14, -4.75471, 0, 0, 0.510531,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350959,-99) , -16, 1010.28, 1, 0, 0.408031,-99) , -15, 0.060391, 0, 0, 0.499171,-99) , -12, 0.38835, 0, 0, 0.507219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350226,-99) , -8, -0.974523, 0, 0, 0.499018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304692,-99) , -5, 2.25689, 1, 0, 0.492463,-99) ); - // itree = 611 - fBoostWeights.push_back(0.00832946); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664023,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568657,-99) , -8, -0.464565, 0, 0, 0.628274,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530298,-99) , -2, 13.5, 0, 0, 0.591701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373354,-99) , -8, 0.912918, 1, 0, 0.547816,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600734,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506433,-99) , -5, 1.91442, 0, 0, 0.53641,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511728,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423072,-99) , -11, 0.5, 1, 0, 0.470191,-99) , -16, 470.246, 1, 0, 0.495267,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485907,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1869,-99) , -12, 0.411625, 0, 0, 0.284929,-99) , -5, 1.44026, 1, 0, 0.385956,-99) , -13, 0.0103388, 1, 0, 0.477304,-99) , -4, 0.75728, 1, 0, 0.495994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336773,-99) , -5, 0.481968, 0, 0, 0.489295,-99) ); - // itree = 612 - fBoostWeights.push_back(0.00818217); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593795,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513678,-99) , -13, 0.0189085, 1, 0, 0.579484,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368138,-99) , -12, 0.074483, 0, 0, 0.489622,-99) , -8, 0.609563, 1, 0, 0.551361,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339034,-99) , -14, -4.38754, 0, 0, 0.504049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213142,-99) , -7, 0.0768742, 1, 0, 0.487957,-99) , -5, 1.41941, 1, 0, 0.523981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37131,-99) , -5, 0.482621, 0, 0, 0.514621,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620901,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504708,-99) , -7, 0.0146487, 1, 0, 0.548481,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416733,-99) , -10, 6009.25, 0, 0, 0.460915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293332,-99) , -1, 9.5, 0, 0, 0.426391,-99) , -16, 65.8124, 1, 0, 0.45582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287867,-99) , -3, 0.99789, 1, 0, 0.43231,-99) , -5, 1.75514, 1, 0, 0.491414,-99) ); - // itree = 613 - fBoostWeights.push_back(0.00956906); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650898,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548772,-99) , -10, -3920.67, 1, 0, 0.561518,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402262,-99) , -4, 1.36715, 0, 0, 0.462688,-99) , -12, 0.0313038, 0, 0, 0.548149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244617,-99) , -4, 2.06283, 1, 0, 0.543269,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620208,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501323,-99) , -9, 3.42779, 0, 0, 0.52611,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34755,-99) , -13, 0.00281818, 1, 0, 0.41297,-99) , -7, 0.0141598, 0, 0, 0.49771,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232957,-99) , -5, 1.88596, 1, 0, 0.35579,-99) , -12, 0.438322, 0, 0, 0.386663,-99) , -4, 1.27044, 1, 0, 0.456272,-99) , -12, 0.113902, 1, 0, 0.496664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170228,-99) , -12, 0.01821, 0, 0, 0.489683,-99) ); - // itree = 614 - fBoostWeights.push_back(0.00340437); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497279,-99) , -12, 0.10141, 1, 0, 0.519757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373063,-99) , -12, 0.02276, 0, 0, 0.513374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219623,-99) , -7, 0.251777, 1, 0, 0.510381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278463,-99) , -2, 6.5, 0, 0, 0.506034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142944,-99) , -5, 2.54934, 1, 0, 0.50376,-99) ); - // itree = 615 - fBoostWeights.push_back(0.00672599); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645541,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551275,-99) , -13, 0.0028034, 0, 0, 0.59817,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516124,-99) , -8, -0.764819, 0, 0, 0.579095,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454348,-99) , -4, 0.794509, 0, 0, 0.507296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40796,-99) , -7, 0.0189531, 0, 0, 0.479949,-99) , -6, 0.698511, 1, 0, 0.534973,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452544,-99) , -1, 9.5, 0, 0, 0.532064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311104,-99) , -12, 0.0192724, 0, 0, 0.518017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594307,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203722,-99) , -7, 0.00796797, 0, 0, 0.416357,-99) , -12, 0.411844, 0, 0, 0.44176,-99) , -12, 0.111319, 1, 0, 0.475853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0263467,-99) , -7, 0.203231, 1, 0, 0.471327,-99) , -5, 1.37991, 1, 0, 0.496063,-99) ); - // itree = 616 - fBoostWeights.push_back(0.00635294); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621898,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513619,-99) , -9, -6.90816, 1, 0, 0.522112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334552,-99) , -3, 0.999638, 1, 0, 0.516664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301104,-99) , -14, -5.73444, 0, 0, 0.511388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213809,-99) , -4, 1.3996, 1, 0, 0.362032,-99) , -7, 0.00922688, 0, 0, 0.499403,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0838818,-99) , -1, 25.5, 0, 0, 0.340403,-99) , -7, 0.0979288, 1, 0, 0.489249,-99) ); - // itree = 617 - fBoostWeights.push_back(0.00457561); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658493,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557424,-99) , -5, 1.96437, 0, 0, 0.574884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458935,-99) , -14, -4.72785, 0, 0, 0.562408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410201,-99) , -8, -0.921296, 0, 0, 0.54891,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295922,-99) , -3, 0.9996, 1, 0, 0.494723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122597,-99) , -7, 0.291115, 1, 0, 0.491282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122281,-99) , -5, 2.31658, 1, 0, 0.486291,-99) , -11, 1.5, 0, 0, 0.506685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186252,-99) , -4, 2.21951, 1, 0, 0.504567,-99) ); - // itree = 618 - fBoostWeights.push_back(0.00931557); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682401,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670392,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517422,-99) , -16, 1424.04, 0, 0, 0.57641,-99) , -16, 22.6849, 1, 0, 0.610054,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624711,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447396,-99) , -3, 0.955182, 1, 0, 0.49288,-99) , -5, 1.35376, 1, 0, 0.535004,-99) , -6, 0.552461, 0, 0, 0.56936,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379552,-99) , -6, 0.399496, 1, 0, 0.458741,-99) , -2, 9.5, 0, 0, 0.552643,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645426,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521661,-99) , -11, 0.5, 1, 0, 0.580696,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3945,-99) , -15, 0.0619502, 0, 0, 0.497312,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245039,-99) , -9, -5.69158, 1, 0, 0.347002,-99) , -3, 0.997886, 1, 0, 0.47885,-99) , -9, 4.17743, 0, 0, 0.497468,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445814,-99) , -4, 1.94016, 0, 0, 0.51611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233227,-99) , -8, 0.934547, 0, 0, 0.387948,-99) , -5, 1.90809, 1, 0, 0.480323,-99) , -11, 1.5, 0, 0, 0.504717,-99) ); - // itree = 619 - fBoostWeights.push_back(0.00629476); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649356,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534675,-99) , -13, 0.00547448, 0, 0, 0.586391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49676,-99) , -1, 38.5, 1, 0, 0.563074,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.119934,-99) , -4, 2.14444, 1, 0, 0.50101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0942737,-99) , -0, 39.5, 1, 0, 0.494449,-99) , -2, 24.5, 0, 0, 0.509967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298784,-99) , -7, 0.00711731, 0, 0, 0.505341,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0587693,-99) , -4, 1.27731, 1, 0, 0.367931,-99) , -7, 0.109479, 1, 0, 0.497834,-99) ); - // itree = 620 - fBoostWeights.push_back(0.0045994); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490703,-99) , -12, 0.0406205, 0, 0, 0.555934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428861,-99) , -14, -4.64824, 0, 0, 0.541319,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46265,-99) , -0, 14.5, 0, 0, 0.535423,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218379,-99) , -7, 0.0783667, 1, 0, 0.456096,-99) , -5, 1.34391, 1, 0, 0.48255,-99) , -12, 0.111253, 1, 0, 0.508772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330394,-99) , -12, 0.01821, 0, 0, 0.504238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368178,-99) , -8, -0.982503, 0, 0, 0.49801,-99) ); - // itree = 621 - fBoostWeights.push_back(0.0061981); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645877,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614967,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533218,-99) , -4, 0.196586, 1, 0, 0.54501,-99) , -10, -5524.97, 1, 0, 0.554718,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467662,-99) , -3, 0.989805, 1, 0, 0.528392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25173,-99) , -7, 0.00867867, 0, 0, 0.443038,-99) , -4, 0.95691, 1, 0, 0.478005,-99) , -12, 0.124483, 1, 0, 0.513004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0890905,-99) , -7, 0.25306, 1, 0, 0.509409,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253987,-99) , -14, -3.34777, 0, 0, 0.380354,-99) , -12, 0.0313553, 0, 0, 0.498473,-99) ); - // itree = 622 - fBoostWeights.push_back(0.00707393); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633894,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518254,-99) , -0, 14.5, 0, 0, 0.598125,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276167,-99) , -5, 2.20101, 1, 0, 0.531934,-99) , -11, 1.5, 0, 0, 0.555363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391998,-99) , -15, 4.07537, 1, 0, 0.54702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392131,-99) , -14, -4.64986, 0, 0, 0.530255,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435371,-99) , -1, 10.5, 0, 0, 0.532897,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35758,-99) , -7, 0.0274848, 1, 0, 0.452564,-99) , -4, 0.818764, 1, 0, 0.481748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30769,-99) , -7, 0.0087011, 0, 0, 0.471354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168889,-99) , -4, 1.95618, 1, 0, 0.461717,-99) , -12, 0.101342, 1, 0, 0.4915,-99) ); - // itree = 623 - fBoostWeights.push_back(0.00642686); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487671,-99) , -12, 0.038432, 0, 0, 0.541758,-99) , -6, 0.097552, 1, 0, 0.553537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351092,-99) , -12, 0.0182006, 0, 0, 0.541861,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314776,-99) , -3, 0.999207, 1, 0, 0.516457,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261837,-99) , -6, 0.84881, 1, 0, 0.411653,-99) , -7, 0.0146042, 0, 0, 0.485178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215121,-99) , -7, 0.133595, 1, 0, 0.476654,-99) , -12, 0.111424, 1, 0, 0.50667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296705,-99) , -5, 2.33369, 1, 0, 0.501465,-99) ); - // itree = 624 - fBoostWeights.push_back(0.00675673); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667593,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528852,-99) , -1, 16.5, 0, 0, 0.598547,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421909,-99) , -8, 0.988177, 1, 0, 0.538898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333633,-99) , -12, 0.0182039, 0, 0, 0.52708,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493002,-99) , -2, 23.5, 0, 0, 0.539999,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318808,-99) , -7, 0.0274406, 1, 0, 0.425172,-99) , -5, 1.2521, 1, 0, 0.460654,-99) , -12, 0.113524, 1, 0, 0.492511,-99) , -6, 0.0693099, 1, 0, 0.503876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311518,-99) , -5, 2.24529, 1, 0, 0.496899,-99) ); - // itree = 625 - fBoostWeights.push_back(0.0082037); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623134,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510571,-99) , -2, 24.5, 0, 0, 0.532169,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527825,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154324,-99) , -5, 1.46876, 1, 0, 0.405632,-99) , -7, 0.0845847, 1, 0, 0.521873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381349,-99) , -5, 0.482764, 0, 0, 0.51487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332878,-99) , -7, 0.0230812, 0, 0, 0.412613,-99) , -14, -4.63951, 0, 0, 0.507031,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0951859,-99) , -14, -3.34624, 1, 0, 0.283275,-99) , -5, 2.15673, 1, 0, 0.495665,-99) ); - // itree = 626 - fBoostWeights.push_back(0.00603125); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605635,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523262,-99) , -8, 0.913648, 1, 0, 0.580011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4508,-99) , -16, 1.89422, 0, 0, 0.568379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459611,-99) , -12, 0.0335996, 0, 0, 0.554062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410151,-99) , -13, 0.0217785, 1, 0, 0.544284,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458003,-99) , -7, 0.105872, 1, 0, 0.56843,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237816,-99) , -7, 0.0412738, 1, 0, 0.473639,-99) , -2, 26.5, 0, 0, 0.495574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297749,-99) , -8, -0.982765, 0, 0, 0.486603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311249,-99) , -4, 1.88359, 1, 0, 0.47824,-99) , -16, 471.701, 1, 0, 0.503484,-99) ); - // itree = 627 - fBoostWeights.push_back(0.00674788); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.712224,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56159,-99) , -4, 1.90794, 0, 0, 0.570427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477037,-99) , -7, 0.0115708, 0, 0, 0.556453,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442521,-99) , -6, 0.430912, 0, 0, 0.512608,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331548,-99) , -6, 0.813097, 1, 0, 0.46303,-99) , -12, 0.0324855, 0, 0, 0.535989,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477582,-99) , -11, 1.5, 0, 0, 0.50094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343733,-99) , -2, 7.5, 0, 0, 0.492388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245392,-99) , -15, 0.0612248, 1, 0, 0.333888,-99) , -4, 1.6372, 1, 0, 0.471913,-99) , -12, 0.110588, 1, 0, 0.501771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135604,-99) , -5, 2.43801, 1, 0, 0.497603,-99) ); - // itree = 628 - fBoostWeights.push_back(0.00639568); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708295,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586316,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503169,-99) , -10, -4107.93, 1, 0, 0.513801,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306732,-99) , -12, 0.340796, 0, 0, 0.402188,-99) , -15, 0.0439201, 0, 0, 0.504787,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189556,-99) , -5, 1.46347, 1, 0, 0.379222,-99) , -13, 0.0176813, 1, 0, 0.492853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.092065,-99) , -5, 2.48281, 1, 0, 0.489425,-99) , -12, 0.526826, 0, 0, 0.498436,-99) ); - // itree = 629 - fBoostWeights.push_back(0.00562633); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668715,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672444,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529212,-99) , -9, -5.46141, 1, 0, 0.55019,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0510538,-99) , -4, 2.00673, 1, 0, 0.482553,-99) , -11, 1.5, 0, 0, 0.505588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486954,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258547,-99) , -5, 1.3799, 1, 0, 0.406666,-99) , -13, 0.0163334, 1, 0, 0.494821,-99) , -12, 0.495577, 0, 0, 0.50172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320123,-99) , -5, 2.26544, 1, 0, 0.495717,-99) ); - // itree = 630 - fBoostWeights.push_back(0.00904785); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68091,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440093,-99) , -13, 0.010528, 1, 0, 0.553757,-99) , -5, 1.16096, 1, 0, 0.577603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428381,-99) , -8, -0.906444, 0, 0, 0.562329,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518216,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268414,-99) , -6, 1.00406, 0, 0, 0.450232,-99) , -6, 0.954833, 1, 0, 0.543494,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648083,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527955,-99) , -11, 0.5, 1, 0, 0.600488,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337626,-99) , -4, 1.69251, 1, 0, 0.511304,-99) , -12, 0.0612136, 1, 0, 0.548654,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295689,-99) , -13, 0.000449114, 0, 0, 0.399999,-99) , -12, 0.0342795, 0, 0, 0.518263,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60592,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368164,-99) , -7, 0.0147658, 0, 0, 0.451733,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419022,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16401,-99) , -5, 1.37961, 1, 0, 0.323555,-99) , -13, 0.0151612, 1, 0, 0.427804,-99) , -12, 0.491658, 0, 0, 0.44247,-99) , -12, 0.113622, 1, 0, 0.475853,-99) , -16, 450.53, 1, 0, 0.501577,-99) ); - // itree = 631 - fBoostWeights.push_back(0.00648773); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660227,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556642,-99) , -15, 0.211911, 0, 0, 0.615575,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326292,-99) , -5, 2.11387, 1, 0, 0.529258,-99) , -16, 15.369, 0, 0, 0.569059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377587,-99) , -8, -0.880667, 0, 0, 0.546794,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485777,-99) , -10, 11031.9, 0, 0, 0.496318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283193,-99) , -5, 2.1526, 1, 0, 0.49251,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41227,-99) , -16, 3264.37, 1, 0, 0.506973,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361022,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125778,-99) , -13, 0.00550577, 1, 0, 0.323406,-99) , -3, 0.992614, 0, 0, 0.413226,-99) , -4, 1.5357, 1, 0, 0.476904,-99) , -16, 86.7738, 1, 0, 0.494271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289093,-99) , -7, 0.15287, 1, 0, 0.488831,-99) ); - // itree = 632 - fBoostWeights.push_back(0.00784662); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.730676,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633146,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517967,-99) , -6, 0.765793, 1, 0, 0.595051,-99) , -4, 1.64671, 0, 0, 0.614807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461761,-99) , -14, -3.43669, 0, 0, 0.582513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238896,-99) , -4, 1.97393, 1, 0, 0.568862,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610542,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314145,-99) , -14, -5.06717, 0, 0, 0.4952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300853,-99) , -5, 2.13165, 1, 0, 0.489087,-99) , -12, 0.411835, 0, 0, 0.497385,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618427,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248293,-99) , -9, -1.90736, 1, 0, 0.36837,-99) , -1, 23.5, 0, 0, 0.423286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0482093,-99) , -8, -0.410757, 0, 0, 0.383338,-99) , -4, 1.68775, 1, 0, 0.484244,-99) , -9, 3.96689, 0, 0, 0.500233,-99) ); - // itree = 633 - fBoostWeights.push_back(0.00577957); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660356,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588602,-99) , -4, 1.39128, 0, 0, 0.616335,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510368,-99) , -15, 0.681776, 1, 0, 0.59317,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473469,-99) , -3, 0.994791, 1, 0, 0.545735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42319,-99) , -9, 0.00165707, 0, 0, 0.522005,-99) , -9, -1.24746, 1, 0, 0.5499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436788,-99) , -8, -0.895533, 0, 0, 0.537009,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630378,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5204,-99) , -13, 0.00374969, 0, 0, 0.583888,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493789,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274289,-99) , -7, 0.0394399, 1, 0, 0.47863,-99) , -2, 29.5, 0, 0, 0.494585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266623,-99) , -3, 0.745011, 0, 0, 0.487706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314749,-99) , -7, 0.105785, 1, 0, 0.479234,-99) , -16, 528.702, 1, 0, 0.502345,-99) ); - // itree = 634 - fBoostWeights.push_back(0.00753155); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616149,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198667,-99) , -4, 1.98815, 1, 0, 0.536817,-99) , -14, -4.10148, 1, 0, 0.552846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436447,-99) , -8, -0.859462, 0, 0, 0.539078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381644,-99) , -16, 2.01004, 0, 0, 0.525775,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416862,-99) , -14, -3.35864, 0, 0, 0.507752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342211,-99) , -7, 0.0990258, 1, 0, 0.494915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363965,-99) , -13, 0.00215324, 1, 0, 0.471894,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.145527,-99) , -14, -3.74909, 0, 0, 0.322144,-99) , -11, 0.5, 1, 0, 0.409764,-99) , -7, 0.0149779, 0, 0, 0.467962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228496,-99) , -4, 1.92774, 1, 0, 0.459059,-99) , -16, 470.857, 1, 0, 0.484941,-99) ); - // itree = 635 - fBoostWeights.push_back(0.00527792); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571339,-99) , -3, 0.98813, 1, 0, 0.615802,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533999,-99) , -16, 2514.98, 1, 0, 0.578834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486439,-99) , -2, 23.5, 0, 0, 0.528481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421908,-99) , -12, 0.0526575, 0, 0, 0.50426,-99) , -6, 0.617733, 1, 0, 0.54206,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318497,-99) , -7, 0.00729722, 0, 0, 0.51312,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431726,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148354,-99) , -5, 2.02871, 1, 0, 0.406492,-99) , -13, 0.0074143, 1, 0, 0.492906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294476,-99) , -14, -5.44572, 0, 0, 0.484509,-99) , -5, 1.37994, 1, 0, 0.50645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284003,-99) , -13, 0.0811888, 1, 0, 0.503593,-99) ); - // itree = 636 - fBoostWeights.push_back(0.00398522); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670368,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406001,-99) , -13, 0.0188469, 1, 0, 0.515604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362167,-99) , -5, 0.505205, 0, 0, 0.508505,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340472,-99) , -5, 2.25681, 1, 0, 0.502702,-99) , -12, 0.525387, 0, 0, 0.509326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293243,-99) , -12, 0.0182039, 0, 0, 0.503972,-99) ); - // itree = 637 - fBoostWeights.push_back(0.00524684); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607264,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505522,-99) , -2, 26.5, 0, 0, 0.520709,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477779,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100412,-99) , -1, 17.5, 0, 0, 0.425789,-99) , -7, 0.0801463, 1, 0, 0.512708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326617,-99) , -12, 0.0182039, 0, 0, 0.508391,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206002,-99) , -12, 0.189113, 1, 0, 0.371399,-99) , -3, 0.999322, 1, 0, 0.500456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292797,-99) , -4, 1.9963, 1, 0, 0.494547,-99) ); - // itree = 638 - fBoostWeights.push_back(0.00614679); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68733,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613756,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527396,-99) , -6, 0.28574, 1, 0, 0.557955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184154,-99) , -5, 2.25768, 1, 0, 0.548596,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397902,-99) , -14, -4.54431, 0, 0, 0.532963,-99) , -12, 0.323445, 0, 0, 0.554098,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496459,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381479,-99) , -3, 0.999092, 1, 0, 0.486763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320478,-99) , -3, 0.789022, 0, 0, 0.479585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22176,-99) , -2, 6.5, 0, 0, 0.474182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17925,-99) , -13, 0.0725587, 1, 0, 0.469228,-99) , -11, 1.5, 0, 0, 0.497645,-99) ); - // itree = 639 - fBoostWeights.push_back(0.00726743); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638703,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560476,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45713,-99) , -16, 2.4624, 0, 0, 0.547906,-99) , -2, 30.5, 0, 0, 0.561819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429487,-99) , -15, 1.70005, 1, 0, 0.551695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279665,-99) , -4, 2.04485, 1, 0, 0.546238,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633049,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503668,-99) , -3, 0.995381, 1, 0, 0.586861,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224252,-99) , -7, 0.0658266, 1, 0, 0.434454,-99) , -5, 1.49755, 1, 0, 0.536711,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422883,-99) , -7, 0.0147706, 0, 0, 0.463829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240204,-99) , -7, 0.0358482, 1, 0, 0.448289,-99) , -2, 22.5, 0, 0, 0.473619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181087,-99) , -4, 2.12972, 1, 0, 0.470055,-99) , -16, 450.703, 1, 0, 0.499109,-99) ); - // itree = 640 - fBoostWeights.push_back(0.00755444); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664439,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532371,-99) , -6, 0.378505, 1, 0, 0.61237,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649598,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532929,-99) , -3, 0.996134, 0, 0, 0.578864,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413368,-99) , -15, 0.319818, 1, 0, 0.474335,-99) , -4, 1.37824, 0, 0, 0.509188,-99) , -3, 0.952107, 1, 0, 0.534945,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53397,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400319,-99) , -8, 0.943116, 1, 0, 0.515918,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399663,-99) , -9, 2.21745, 0, 0, 0.438425,-99) , -12, 0.195174, 1, 0, 0.494324,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326942,-99) , -13, 0.00331299, 1, 0, 0.434118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0279929,-99) , -13, 0.0175895, 1, 0, 0.411925,-99) , -5, 1.69255, 1, 0, 0.468082,-99) , -11, 1.5, 0, 0, 0.490835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170834,-99) , -5, 2.47688, 1, 0, 0.487741,-99) ); - // itree = 641 - fBoostWeights.push_back(0.00471721); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458157,-99) , -13, 0.0109424, 1, 0, 0.513034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149519,-99) , -4, 2.21981, 1, 0, 0.510799,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232144,-99) , -9, 0.44689, 0, 0, 0.373335,-99) , -7, 0.00869406, 0, 0, 0.502579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284287,-99) , -3, 0.999649, 1, 0, 0.497246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27509,-99) , -12, 0.0181941, 0, 0, 0.491735,-99) ); - // itree = 642 - fBoostWeights.push_back(0.00706768); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461829,-99) , -7, 0.0581286, 1, 0, 0.569446,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483739,-99) , -14, -3.53595, 0, 0, 0.550348,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464036,-99) , -6, 0.671157, 1, 0, 0.506972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338196,-99) , -5, 1.95915, 1, 0, 0.495514,-99) , -16, 271.549, 1, 0, 0.513822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327653,-99) , -3, 0.999594, 1, 0, 0.508279,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390894,-99) , -9, 0.352652, 0, 0, 0.493487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519038,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159325,-99) , -11, 1.5, 0, 0, 0.250444,-99) , -8, 0.989193, 0, 0, 0.319212,-99) , -12, 0.111363, 1, 0, 0.403987,-99) , -4, 1.64181, 1, 0, 0.493609,-99) ); - // itree = 643 - fBoostWeights.push_back(0.00818043); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619653,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530941,-99) , -13, 0.00263162, 0, 0, 0.580682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261495,-99) , -4, 1.97386, 1, 0, 0.569034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625654,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511376,-99) , -9, -8.12459, 1, 0, 0.521566,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258221,-99) , -5, 1.47337, 1, 0, 0.428743,-99) , -13, 0.011097, 1, 0, 0.501262,-99) , -10, -618.707, 1, 0, 0.517616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283733,-99) , -3, 0.999694, 1, 0, 0.511467,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403048,-99) , -13, 0.000464339, 0, 0, 0.494471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32001,-99) , -0, 14.5, 1, 0, 0.466784,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283636,-99) , -12, 0.365823, 0, 0, 0.353537,-99) , -15, 0.0459851, 0, 0, 0.436038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100182,-99) , -5, 2.29219, 1, 0, 0.426451,-99) , -7, 0.0135843, 0, 0, 0.49106,-99) ); - // itree = 644 - fBoostWeights.push_back(0.0072446); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423793,-99) , -3, 0.999203, 1, 0, 0.556622,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168926,-99) , -0, 24.5, 1, 0, 0.49473,-99) , -2, 16.5, 0, 0, 0.525046,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413003,-99) , -16, 343.427, 1, 0, 0.465475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0340277,-99) , -0, 20.5, 1, 0, 0.431723,-99) , -1, 8.5, 0, 0, 0.512358,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365263,-99) , -10, 2314.3, 1, 0, 0.435334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129955,-99) , -4, 1.58685, 1, 0, 0.414581,-99) , -8, -0.894233, 0, 0, 0.501435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204357,-99) , -5, 2.48967, 1, 0, 0.498774,-99) ); - // itree = 645 - fBoostWeights.push_back(0.00543345); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.738188,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582969,-99) , -5, 1.9711, 0, 0, 0.630202,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60867,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511261,-99) , -3, 0.961513, 1, 0, 0.541445,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272882,-99) , -2, 7.5, 0, 0, 0.475289,-99) , -11, 1.5, 0, 0, 0.497934,-99) , -12, 0.415622, 0, 0, 0.507024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33337,-99) , -5, 0.528034, 0, 0, 0.499679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192129,-99) , -7, 0.179323, 1, 0, 0.494503,-99) ); - // itree = 646 - fBoostWeights.push_back(0.00847715); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623913,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478303,-99) , -12, 0.0795743, 1, 0, 0.526586,-99) , -6, 0.489889, 1, 0, 0.568664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256203,-99) , -5, 2.10084, 1, 0, 0.563078,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.691959,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529332,-99) , -6, 0.740722, 1, 0, 0.615185,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332685,-99) , -7, 0.0113136, 0, 0, 0.570807,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559279,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453356,-99) , -10, 2927.45, 1, 0, 0.50799,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331035,-99) , -12, 0.047682, 0, 0, 0.39294,-99) , -0, 17.5, 1, 0, 0.454186,-99) , -4, 1.47402, 0, 0, 0.494454,-99) , -14, -2.72788, 0, 0, 0.523949,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582613,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466544,-99) , -6, 0.299135, 1, 0, 0.539317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437255,-99) , -2, 12.5, 0, 0, 0.503641,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370615,-99) , -5, 1.83611, 1, 0, 0.442044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233845,-99) , -8, -0.925596, 0, 0, 0.428299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0926332,-99) , -7, 0.141427, 1, 0, 0.420558,-99) , -4, 0.902539, 1, 0, 0.452597,-99) , -12, 0.11364, 1, 0, 0.48634,-99) ); - // itree = 647 - fBoostWeights.push_back(0.00419672); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458223,-99) , -5, 0.624775, 0, 0, 0.560568,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162591,-99) , -5, 2.49352, 1, 0, 0.493985,-99) , -4, 0.664058, 1, 0, 0.511504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331852,-99) , -3, 0.999638, 1, 0, 0.506513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255169,-99) , -15, 4.17083, 1, 0, 0.502102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261089,-99) , -2, 6.5, 0, 0, 0.497545,-99) ); - // itree = 648 - fBoostWeights.push_back(0.00404505); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637288,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6056,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501914,-99) , -15, 0.0712727, 1, 0, 0.512143,-99) , -10, -8284.4, 1, 0, 0.521464,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423013,-99) , -12, 0.144301, 1, 0, 0.469187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301725,-99) , -6, 0.0692598, 0, 0, 0.455748,-99) , -7, 0.0147808, 0, 0, 0.502443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286406,-99) , -3, 0.999717, 1, 0, 0.498355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320305,-99) , -3, 0.745149, 0, 0, 0.492757,-99) ); - // itree = 649 - fBoostWeights.push_back(0.0063844); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720983,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583782,-99) , -5, 1.77307, 0, 0, 0.62705,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429816,-99) , -7, 0.0244489, 1, 0, 0.532833,-99) , -2, 18.5, 0, 0, 0.571335,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438673,-99) , -3, 0.998869, 1, 0, 0.558408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388926,-99) , -8, -0.900524, 0, 0, 0.54128,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230869,-99) , -4, 1.97628, 1, 0, 0.493174,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285094,-99) , -13, 0.00106977, 1, 0, 0.394576,-99) , -7, 0.00931116, 0, 0, 0.483426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272565,-99) , -5, 2.21222, 1, 0, 0.475363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271656,-99) , -7, 0.104421, 1, 0, 0.466199,-99) , -16, 486.401, 1, 0, 0.495637,-99) ); - // itree = 650 - fBoostWeights.push_back(0.00999979); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668679,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61917,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511934,-99) , -14, -2.72433, 0, 0, 0.558473,-99) , -12, 0.148563, 0, 0, 0.594315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481905,-99) , -13, 0.0107979, 1, 0, 0.57149,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623753,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503771,-99) , -8, 0.0872043, 0, 0, 0.569912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410793,-99) , -8, 0.951234, 1, 0, 0.528568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368858,-99) , -6, 0.80286, 1, 0, 0.4949,-99) , -0, 15.5, 0, 0, 0.541052,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365719,-99) , -7, 0.0143676, 0, 0, 0.52906,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473621,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0608004,-99) , -7, 0.0513927, 1, 0, 0.454147,-99) , -1, 12.5, 0, 0, 0.496057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251448,-99) , -14, -5.01315, 0, 0, 0.48786,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572023,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122994,-99) , -3, 0.925325, 0, 0, 0.353783,-99) , -8, 0.994425, 0, 0, 0.429673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141853,-99) , -13, 0.00342261, 1, 0, 0.374247,-99) , -5, 1.92617, 1, 0, 0.471404,-99) , -11, 1.5, 0, 0, 0.494696,-99) ); - // itree = 651 - fBoostWeights.push_back(0.00597455); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651234,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461093,-99) , -3, 0.998908, 1, 0, 0.550878,-99) , -12, 0.353692, 0, 0, 0.560897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443204,-99) , -8, -0.921106, 0, 0, 0.550075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268567,-99) , -4, 2.05933, 1, 0, 0.544336,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486294,-99) , -2, 39.5, 0, 0, 0.498272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343037,-99) , -0, 75.5, 1, 0, 0.488983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339382,-99) , -7, 0.0089369, 0, 0, 0.478565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15206,-99) , -5, 2.18196, 1, 0, 0.467018,-99) , -16, 1091.94, 1, 0, 0.503376,-99) ); - // itree = 652 - fBoostWeights.push_back(0.00703722); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663821,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566599,-99) , -6, 0.144677, 1, 0, 0.598476,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418354,-99) , -7, 0.021939, 1, 0, 0.540297,-99) , -1, 14.5, 0, 0, 0.568198,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623552,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504339,-99) , -5, 1.68908, 0, 0, 0.531288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385358,-99) , -6, 0.973636, 0, 0, 0.481053,-99) , -6, 0.822105, 1, 0, 0.545719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322479,-99) , -12, 0.0239822, 0, 0, 0.531849,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59166,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449189,-99) , -9, 0.514244, 0, 0, 0.495225,-99) , -2, 24.5, 0, 0, 0.528741,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37019,-99) , -1, 9.5, 0, 0, 0.446246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123773,-99) , -5, 2.48986, 1, 0, 0.44228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.056094,-99) , -0, 98.5, 1, 0, 0.433326,-99) , -5, 1.37771, 1, 0, 0.469913,-99) , -16, 514.828, 1, 0, 0.494182,-99) ); - // itree = 653 - fBoostWeights.push_back(0.00765321); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336159,-99) , -7, 0.251653, 1, 0, 0.578919,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19695,-99) , -7, 0.0510786, 1, 0, 0.51176,-99) , -2, 24.5, 0, 0, 0.532247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292531,-99) , -3, 0.999648, 1, 0, 0.52622,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410221,-99) , -14, -3.45597, 0, 0, 0.495246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200609,-99) , -3, 0.932277, 0, 0, 0.469798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125026,-99) , -0, 22.5, 1, 0, 0.444622,-99) , -1, 9.5, 0, 0, 0.50965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294413,-99) , -12, 0.0203187, 0, 0, 0.50298,-99) ); - // itree = 654 - fBoostWeights.push_back(0.00488596); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384761,-99) , -8, 0.990574, 1, 0, 0.532974,-99) , -5, 2.02019, 0, 0, 0.547759,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389709,-99) , -12, 0.127096, 1, 0, 0.468658,-99) , -8, -0.767789, 0, 0, 0.534762,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254112,-99) , -7, 0.132374, 1, 0, 0.501515,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171467,-99) , -5, 2.14288, 1, 0, 0.400094,-99) , -2, 9.5, 0, 0, 0.483778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261956,-99) , -1, 60.5, 1, 0, 0.47627,-99) , -16, 471.128, 1, 0, 0.498237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225021,-99) , -4, 2.15244, 1, 0, 0.495285,-99) ); - // itree = 655 - fBoostWeights.push_back(0.00476367); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658329,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486655,-99) , -12, 0.415695, 0, 0, 0.494273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254946,-99) , -2, 6.5, 0, 0, 0.489949,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116057,-99) , -5, 1.78125, 1, 0, 0.345203,-99) , -3, 0.999108, 1, 0, 0.480853,-99) , -10, -15200.9, 1, 0, 0.486757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.57736, 1, 0, 0.484579,-99) ); - // itree = 656 - fBoostWeights.push_back(0.00655276); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680827,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569471,-99) , -3, 0.982456, 1, 0, 0.625641,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681639,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591567,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512162,-99) , -10, 892.364, 1, 0, 0.538188,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415801,-99) , -8, 0.921226, 1, 0, 0.509528,-99) , -4, 1.94281, 0, 0, 0.524696,-99) , -6, 0.159703, 1, 0, 0.548496,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430276,-99) , -7, 0.0127304, 0, 0, 0.488547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25819,-99) , -3, 0.732808, 0, 0, 0.482139,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272279,-99) , -13, 0.0350657, 1, 0, 0.473247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 2.10615, 1, 0, 0.468163,-99) , -11, 1.5, 0, 0, 0.495753,-99) ); - // itree = 657 - fBoostWeights.push_back(0.00725405); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462789,-99) , -8, 0.979072, 1, 0, 0.554057,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35642,-99) , -3, 0.858593, 0, 0, 0.494465,-99) , -6, 0.371949, 1, 0, 0.521214,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216265,-99) , -13, 0.0115449, 1, 0, 0.385531,-99) , -3, 0.998899, 1, 0, 0.510858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257424,-99) , -7, 0.00796843, 0, 0, 0.505622,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442005,-99) , -13, 0.00177384, 0, 0, 0.495674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242001,-99) , -5, 2.08495, 1, 0, 0.477347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226237,-99) , -3, 0.927384, 0, 0, 0.456968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16501,-99) , -7, 0.034606, 1, 0, 0.432543,-99) , -1, 9.5, 0, 0, 0.49034,-99) ); - // itree = 658 - fBoostWeights.push_back(0.00630071); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391912,-99) , -12, 0.0290787, 0, 0, 0.517024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33449,-99) , -3, 0.999633, 1, 0, 0.511338,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301125,-99) , -12, 0.170041, 1, 0, 0.40949,-99) , -8, -0.917479, 0, 0, 0.500286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275384,-99) , -14, -5.31224, 0, 0, 0.49365,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429586,-99) , -1, 10.5, 1, 0, 0.494755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235862,-99) , -8, 0.911119, 0, 0, 0.400554,-99) , -5, 1.98956, 1, 0, 0.482148,-99) ); - // itree = 659 - fBoostWeights.push_back(0.0074538); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644839,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53431,-99) , -12, 0.13039, 1, 0, 0.601816,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471355,-99) , -6, 0.432181, 0, 0, 0.53701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397686,-99) , -16, 3.4322, 0, 0, 0.507592,-99) , -3, 0.975207, 1, 0, 0.54585,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44752,-99) , -7, 0.101219, 1, 0, 0.55783,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293317,-99) , -7, 0.0455382, 1, 0, 0.480762,-99) , -2, 30.5, 0, 0, 0.496224,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433014,-99) , -3, 0.996332, 0, 0, 0.51869,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17954,-99) , -5, 1.84632, 1, 0, 0.314322,-99) , -8, 0.900041, 0, 0, 0.408021,-99) , -4, 1.54898, 1, 0, 0.480759,-99) , -16, 81.7125, 1, 0, 0.496944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303237,-99) , -5, 2.30366, 1, 0, 0.491831,-99) ); - // itree = 660 - fBoostWeights.push_back(0.00579358); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.691581,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439556,-99) , -13, 0.0142775, 1, 0, 0.524934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346295,-99) , -12, 0.0227284, 0, 0, 0.516107,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372161,-99) , -15, 0.04735, 0, 0, 0.45731,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281824,-99) , -5, 2.08843, 1, 0, 0.441786,-99) , -7, 0.014792, 0, 0, 0.494286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161285,-99) , -13, 0.0577484, 1, 0, 0.48935,-99) , -12, 0.521665, 0, 0, 0.497049,-99) ); - // itree = 661 - fBoostWeights.push_back(0.00432156); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395602,-99) , -3, 0.999348, 1, 0, 0.519574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275842,-99) , -15, 4.04966, 1, 0, 0.515098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350263,-99) , -8, -0.982996, 0, 0, 0.507722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290818,-99) , -7, 0.00730153, 0, 0, 0.502741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0638429,-99) , -5, 2.49382, 1, 0, 0.499351,-99) ); - // itree = 662 - fBoostWeights.push_back(0.00623141); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669212,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534307,-99) , -5, 2.09792, 0, 0, 0.550193,-99) , -9, 4.17494, 0, 0, 0.56937,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341269,-99) , -1, 8.5, 0, 0, 0.509598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322378,-99) , -4, 1.70955, 1, 0, 0.491772,-99) , -11, 1.5, 0, 0, 0.51858,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458873,-99) , -12, 0.38756, 0, 0, 0.475398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208965,-99) , -5, 2.36237, 1, 0, 0.469154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242295,-99) , -7, 0.0248227, 1, 0, 0.454113,-99) , -2, 11.5, 0, 0, 0.497076,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306934,-99) , -3, 0.999637, 1, 0, 0.491917,-99) ); - // itree = 663 - fBoostWeights.push_back(0.00613213); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595265,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513137,-99) , -13, 0.00122428, 0, 0, 0.55247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436535,-99) , -8, -0.922367, 0, 0, 0.541088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397438,-99) , -12, 0.0217728, 0, 0, 0.528219,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630366,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397461,-99) , -2, 9.5, 0, 0, 0.503686,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235727,-99) , -8, -0.0378139, 0, 0, 0.39784,-99) , -5, 1.64014, 1, 0, 0.461392,-99) , -12, 0.534864, 0, 0, 0.471857,-99) , -12, 0.111424, 1, 0, 0.497917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0947269,-99) , -7, 0.324392, 1, 0, 0.495884,-99) ); - // itree = 664 - fBoostWeights.push_back(0.0049419); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.707707,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45812,-99) , -5, 0.865138, 0, 0, 0.540867,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520825,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426835,-99) , -4, 1.01634, 1, 0, 0.470209,-99) , -12, 0.129247, 1, 0, 0.506123,-99) , -9, 13.342, 0, 0, 0.51157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227754,-99) , -7, 0.00691466, 0, 0, 0.507161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280536,-99) , -12, 0.01821, 0, 0, 0.501099,-99) ); - // itree = 665 - fBoostWeights.push_back(0.00716625); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321224,-99) , -1, 10.5, 0, 0, 0.567854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24445,-99) , -7, 0.0332294, 1, 0, 0.494316,-99) , -2, 18.5, 0, 0, 0.521554,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366367,-99) , -9, 0.591086, 0, 0, 0.433484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0338469,-99) , -4, 1.6548, 1, 0, 0.413772,-99) , -8, -0.895617, 0, 0, 0.509936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.163727,-99) , -7, 0.252106, 1, 0, 0.506848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317064,-99) , -8, 0.242663, 1, 0, 0.389174,-99) , -12, 0.0313859, 0, 0, 0.497069,-99) ); - // itree = 666 - fBoostWeights.push_back(0.00414815); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653383,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514954,-99) , -12, 0.493228, 0, 0, 0.520234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305172,-99) , -2, 6.5, 0, 0, 0.515589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142241,-99) , -7, 0.190847, 1, 0, 0.512023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32203,-99) , -1, 66.5, 1, 0, 0.506655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237385,-99) , -12, 0.0165015, 0, 0, 0.50142,-99) ); - // itree = 667 - fBoostWeights.push_back(0.00820512); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.705243,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594679,-99) , -2, 18.5, 0, 0, 0.651175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491712,-99) , -8, -0.883154, 0, 0, 0.615543,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37293,-99) , -3, 0.982188, 1, 0, 0.467104,-99) , -13, 0.0012373, 0, 0, 0.569965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416879,-99) , -5, 0.504902, 0, 0, 0.549403,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636167,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418275,-99) , -12, 0.191243, 1, 0, 0.491591,-99) , -12, 0.449233, 0, 0, 0.499901,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403991,-99) , -1, 12.5, 0, 0, 0.508149,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.88893, 1, 0, 0.375868,-99) , -9, -0.688799, 1, 0, 0.421369,-99) , -3, 0.963574, 0, 0, 0.477857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245048,-99) , -7, 0.1417, 1, 0, 0.472172,-99) , -4, 0.782664, 1, 0, 0.496742,-99) ); - // itree = 668 - fBoostWeights.push_back(0.00511279); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291656,-99) , -1, 14.5, 0, 0, 0.567554,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191776,-99) , -7, 0.0572854, 1, 0, 0.499083,-99) , -2, 28.5, 0, 0, 0.513576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366573,-99) , -8, -0.987842, 0, 0, 0.508226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209381,-99) , -5, 2.48008, 1, 0, 0.505463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288076,-99) , -3, 0.999676, 1, 0, 0.500697,-99) ); - // itree = 669 - fBoostWeights.push_back(0.00482851); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605103,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503339,-99) , -10, -5966.71, 1, 0, 0.512537,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268212,-99) , -14, -2.66706, 1, 0, 0.401081,-99) , -15, 0.0479306, 0, 0, 0.502642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214193,-99) , -13, 0.049695, 1, 0, 0.498456,-99) , -12, 0.523332, 0, 0, 0.50499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282803,-99) , -1, 77.5, 1, 0, 0.500033,-99) ); - // itree = 670 - fBoostWeights.push_back(0.00558692); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59617,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513363,-99) , -16, 2929.52, 1, 0, 0.558273,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466757,-99) , -6, 0.164732, 1, 0, 0.491984,-99) , -9, -0.686945, 1, 0, 0.521674,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427499,-99) , -3, 0.951108, 1, 0, 0.457322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0330695,-99) , -5, 1.97529, 1, 0, 0.438073,-99) , -8, -0.76984, 0, 0, 0.50796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257843,-99) , -4, 2.09858, 1, 0, 0.504253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253513,-99) , -3, 0.685985, 0, 0, 0.499825,-99) ); - // itree = 671 - fBoostWeights.push_back(0.00461103); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65029,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561411,-99) , -0, 75.5, 1, 0, 0.615224,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515593,-99) , -6, 0.853424, 1, 0, 0.579879,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271341,-99) , -7, 0.0647103, 1, 0, 0.496261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144769,-99) , -0, 55.5, 1, 0, 0.491269,-99) , -2, 37.5, 0, 0, 0.502546,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241837,-99) , -7, 0.22007, 1, 0, 0.499666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292202,-99) , -3, 0.99965, 1, 0, 0.493981,-99) ); - // itree = 672 - fBoostWeights.push_back(0.00361241); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638724,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652316,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516842,-99) , -10, 11582.4, 0, 0, 0.53538,-99) , -0, 35.5, 0, 0, 0.559694,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320069,-99) , -3, 0.712912, 0, 0, 0.500794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268314,-99) , -4, 2.14444, 1, 0, 0.498296,-99) , -11, 1.5, 0, 0, 0.518971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381118,-99) , -8, -0.98298, 0, 0, 0.512761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323496,-99) , -3, 0.999646, 1, 0, 0.508291,-99) ); - // itree = 673 - fBoostWeights.push_back(0.00644626); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619912,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504597,-99) , -3, 0.944786, 1, 0, 0.558366,-99) , -12, 0.10953, 1, 0, 0.601637,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216114,-99) , -5, 2.05822, 1, 0, 0.467704,-99) , -1, 12.5, 0, 0, 0.554714,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652349,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501985,-99) , -15, 0.140172, 1, 0, 0.573124,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347851,-99) , -2, 7.5, 0, 0, 0.488748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302721,-99) , -5, 1.99142, 1, 0, 0.474652,-99) , -8, 0.991135, 0, 0, 0.486772,-99) , -6, 0.170762, 1, 0, 0.502284,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144854,-99) , -5, 1.82337, 1, 0, 0.380606,-99) , -3, 0.99915, 1, 0, 0.49349,-99) ); - // itree = 674 - fBoostWeights.push_back(0.00375929); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479433,-99) , -2, 13.5, 0, 0, 0.514288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306871,-99) , -1, 75.5, 1, 0, 0.509701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340506,-99) , -8, -0.984768, 0, 0, 0.503122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295312,-99) , -7, 0.00735785, 0, 0, 0.497932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0705485,-99) , -7, 0.323959, 1, 0, 0.495836,-99) ); - // itree = 675 - fBoostWeights.push_back(0.00670693); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652422,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455434,-99) , -6, 0.990312, 1, 0, 0.5387,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405523,-99) , -9, 7.7872, 0, 0, 0.451323,-99) , -3, 0.997908, 1, 0, 0.522117,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31999,-99) , -7, 0.0215, 1, 0, 0.466971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208275,-99) , -5, 2.14369, 1, 0, 0.451059,-99) , -2, 11.5, 0, 0, 0.497848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159697,-99) , -5, 1.45909, 1, 0, 0.364931,-99) , -13, 0.0211448, 1, 0, 0.487966,-99) , -12, 0.498981, 0, 0, 0.494748,-99) ); - // itree = 676 - fBoostWeights.push_back(0.00752098); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622761,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540892,-99) , -13, 0.00172138, 0, 0, 0.571756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468197,-99) , -8, -0.885075, 0, 0, 0.559769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428632,-99) , -3, 0.999132, 1, 0, 0.550234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311263,-99) , -12, 0.0165015, 0, 0, 0.538915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361713,-99) , -1, 9.5, 0, 0, 0.518849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252365,-99) , -7, 0.0241238, 1, 0, 0.446121,-99) , -2, 13.5, 0, 0, 0.48424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180115,-99) , -7, 0.146042, 1, 0, 0.476287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256417,-99) , -5, 2.10683, 1, 0, 0.460762,-99) , -12, 0.101394, 1, 0, 0.494604,-99) ); - // itree = 677 - fBoostWeights.push_back(0.00565858); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623381,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522049,-99) , -16, 30.9186, 0, 0, 0.587693,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451835,-99) , -13, 0.00200044, 0, 0, 0.506845,-99) , -16, 1848.4, 1, 0, 0.548073,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271769,-99) , -3, 0.999482, 1, 0, 0.488393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234856,-99) , -3, 0.722001, 0, 0, 0.481436,-99) , -4, 0.916472, 1, 0, 0.506657,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188942,-99) , -5, 1.84557, 1, 0, 0.369093,-99) , -8, -0.947017, 0, 0, 0.495676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316847,-99) , -7, 0.119912, 1, 0, 0.488108,-99) ); - // itree = 678 - fBoostWeights.push_back(0.00392212); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619509,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565384,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486667,-99) , -12, 0.0597036, 1, 0, 0.504873,-99) , -10, -4959.63, 1, 0, 0.515494,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259894,-99) , -7, 0.148553, 1, 0, 0.477133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320697,-99) , -3, 0.89693, 0, 0, 0.46356,-99) , -6, 0.665708, 1, 0, 0.496038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309135,-99) , -12, 0.0165011, 0, 0, 0.492073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312684,-99) , -3, 0.999624, 1, 0, 0.487035,-99) ); - // itree = 679 - fBoostWeights.push_back(0.00489593); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671881,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479451,-99) , -8, 0.915208, 1, 0, 0.525532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396286,-99) , -3, 0.789517, 0, 0, 0.518878,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421032,-99) , -1, 11.5, 0, 0, 0.478817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172037,-99) , -5, 1.72709, 1, 0, 0.431646,-99) , -8, -0.85417, 0, 0, 0.507827,-99) , -12, 0.510131, 0, 0, 0.51361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284617,-99) , -3, 0.999634, 1, 0, 0.507522,-99) ); - // itree = 680 - fBoostWeights.push_back(0.00575362); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444109,-99) , -15, 0.194869, 0, 0, 0.5528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410294,-99) , -4, 1.36441, 0, 0, 0.468774,-99) , -6, 0.871919, 1, 0, 0.531606,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464052,-99) , -9, 6.22029, 0, 0, 0.478743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135317,-99) , -7, 0.156536, 1, 0, 0.471643,-99) , -12, 0.100949, 1, 0, 0.496256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291561,-99) , -12, 0.0182006, 0, 0, 0.490866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224739,-99) , -3, 0.999733, 1, 0, 0.486247,-99) ); - // itree = 681 - fBoostWeights.push_back(0.0056487); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684307,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570796,-99) , -5, 1.93146, 0, 0, 0.592778,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418073,-99) , -8, 0.044218, 1, 0, 0.48016,-99) , -6, 0.780526, 1, 0, 0.556874,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483921,-99) , -10, 9990.33, 0, 0, 0.498741,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151252,-99) , -15, 0.262698, 1, 0, 0.395565,-99) , -1, 8.5, 0, 0, 0.487121,-99) , -10, 14.4222, 1, 0, 0.505356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32049,-99) , -3, 0.999632, 1, 0, 0.500152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156003,-99) , -5, 2.4484, 1, 0, 0.4964,-99) ); - // itree = 682 - fBoostWeights.push_back(0.0079365); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652394,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559918,-99) , -5, 0.995867, 1, 0, 0.588009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492968,-99) , -8, -0.912664, 0, 0, 0.573227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434063,-99) , -14, -4.28157, 0, 0, 0.559925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3838,-99) , -5, 0.482544, 0, 0, 0.538173,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.716949,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544923,-99) , -3, 0.991978, 0, 0, 0.629666,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562293,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424042,-99) , -3, 0.993596, 1, 0, 0.508342,-99) , -16, 2354.98, 1, 0, 0.57679,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481691,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352344,-99) , -1, 17.5, 1, 0, 0.464309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0558478,-99) , -7, 0.0509364, 1, 0, 0.455662,-99) , -2, 24.5, 0, 0, 0.47898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240689,-99) , -7, 0.124126, 1, 0, 0.471781,-99) , -4, 0.809261, 1, 0, 0.494682,-99) ); - // itree = 683 - fBoostWeights.push_back(0.00686646); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679038,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585822,-99) , -16, 495.07, 1, 0, 0.625833,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469385,-99) , -10, 4015.19, 1, 0, 0.529566,-99) , -12, 0.0479627, 0, 0, 0.578155,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381187,-99) , -3, 0.999232, 1, 0, 0.510486,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.02905, 1, 0, 0.423513,-99) , -8, -0.47978, 0, 0, 0.489847,-99) , -12, 0.0686069, 1, 0, 0.5096,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36648,-99) , -16, 1004.77, 1, 0, 0.434618,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261186,-99) , -9, -1.04949, 0, 0, 0.377551,-99) , -12, 0.0307491, 0, 0, 0.498625,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231223,-99) , -7, 0.00716452, 0, 0, 0.493077,-99) ); - // itree = 684 - fBoostWeights.push_back(0.00869592); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69147,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574801,-99) , -9, -0.932972, 1, 0, 0.623637,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654402,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506068,-99) , -16, 1913.06, 1, 0, 0.594407,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590502,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492925,-99) , -10, -4080.38, 1, 0, 0.508952,-99) , -9, -4.51602, 1, 0, 0.523803,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446758,-99) , -2, 36.5, 0, 0, 0.502982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229906,-99) , -5, 1.46836, 1, 0, 0.421477,-99) , -14, -1.95976, 1, 0, 0.502654,-99) , -15, 0.0682865, 1, 0, 0.515104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424233,-99) , -10, 4982.59, 1, 0, 0.492282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256135,-99) , -8, -0.774708, 0, 0, 0.392651,-99) , -13, 0.00309216, 1, 0, 0.467389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14714,-99) , -4, 1.96547, 1, 0, 0.457604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214426,-99) , -0, 16.5, 1, 0, 0.43987,-99) , -7, 0.0140528, 0, 0, 0.495594,-99) ); - // itree = 685 - fBoostWeights.push_back(0.00619058); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661853,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546781,-99) , -8, 0.529048, 0, 0, 0.618539,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427284,-99) , -5, 1.82401, 1, 0, 0.528978,-99) , -3, 0.95075, 1, 0, 0.556663,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389562,-99) , -5, 2.02135, 1, 0, 0.537724,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437415,-99) , -12, 0.414092, 0, 0, 0.460976,-99) , -12, 0.113881, 1, 0, 0.493123,-99) , -16, 899.378, 1, 0, 0.522392,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456192,-99) , -9, 5.58699, 0, 0, 0.475393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286552,-99) , -3, 0.999074, 1, 0, 0.463351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275334,-99) , -2, 8.5, 0, 0, 0.451014,-99) , -6, 0.821122, 1, 0, 0.502573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299097,-99) , -3, 0.999634, 1, 0, 0.497141,-99) ); - // itree = 686 - fBoostWeights.push_back(0.00912073); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617695,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528441,-99) , -4, 1.49381, 1, 0, 0.598645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482685,-99) , -16, 6.37709, 0, 0, 0.579295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403399,-99) , -12, 0.0241448, 0, 0, 0.560775,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645158,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548742,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310806,-99) , -13, 0.00581792, 1, 0, 0.42061,-99) , -5, 1.35539, 1, 0, 0.470209,-99) , -9, 5.81991, 0, 0, 0.49139,-99) , -12, 0.127326, 1, 0, 0.528972,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661216,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575493,-99) , -4, 1.30484, 0, 0, 0.621156,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0930644,-99) , -5, 2.12368, 1, 0, 0.481304,-99) , -13, 0.000236502, 1, 0, 0.515004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302487,-99) , -12, 0.0329875, 0, 0, 0.497647,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554022,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337663,-99) , -12, 0.147747, 1, 0, 0.409446,-99) , -9, 4.13039, 0, 0, 0.437773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226317,-99) , -5, 1.99787, 1, 0, 0.41533,-99) , -11, 0.5, 1, 0, 0.465014,-99) , -16, 1142.96, 1, 0, 0.494617,-99) ); - // itree = 687 - fBoostWeights.push_back(0.00626872); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668884,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623923,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386839,-99) , -12, 0.0227642, 0, 0, 0.51153,-99) , -10, -5528.96, 1, 0, 0.523478,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417578,-99) , -7, 0.0147853, 0, 0, 0.489532,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266578,-99) , -13, 0.00243779, 1, 0, 0.381461,-99) , -5, 1.64483, 1, 0, 0.448509,-99) , -12, 0.13624, 1, 0, 0.491929,-99) , -12, 0.526853, 0, 0, 0.498752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22978,-99) , -4, 2.07357, 1, 0, 0.494176,-99) ); - // itree = 688 - fBoostWeights.push_back(0.00640225); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664689,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519017,-99) , -4, 0.552929, 1, 0, 0.608075,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612911,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532485,-99) , -8, -0.398935, 0, 0, 0.583017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437685,-99) , -9, -2.42621, 1, 0, 0.491434,-99) , -9, 0.616559, 0, 0, 0.535112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411333,-99) , -13, 0.000136333, 0, 0, 0.520338,-99) , -3, 0.951147, 1, 0, 0.544177,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478866,-99) , -16, 2795.93, 1, 0, 0.58393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437362,-99) , -13, 0.00140767, 1, 0, 0.467851,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124493,-99) , -0, 46.5, 1, 0, 0.461188,-99) , -2, 33.5, 0, 0, 0.472988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248765,-99) , -7, 0.106174, 1, 0, 0.464443,-99) , -4, 0.91767, 1, 0, 0.49558,-99) ); - // itree = 689 - fBoostWeights.push_back(0.00554581); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649919,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537967,-99) , -15, 0.389439, 1, 0, 0.587609,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366496,-99) , -5, 2.0814, 1, 0, 0.532482,-99) , -12, 0.101366, 1, 0, 0.555819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414236,-99) , -12, 0.0245224, 0, 0, 0.546379,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 2.07742, 1, 0, 0.521255,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305419,-99) , -5, 1.9882, 1, 0, 0.448593,-99) , -11, 0.5, 1, 0, 0.485899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262433,-99) , -3, 0.722001, 0, 0, 0.479908,-99) , -16, 487.251, 1, 0, 0.505416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155828,-99) , -7, 0.253257, 1, 0, 0.502466,-99) ); - // itree = 690 - fBoostWeights.push_back(0.00616564); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704692,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57921,-99) , -5, 2.11803, 0, 0, 0.58993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39955,-99) , -1, 13.5, 0, 0, 0.574399,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280428,-99) , -4, 1.98886, 1, 0, 0.506468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30699,-99) , -0, 28.5, 1, 0, 0.496369,-99) , -2, 24.5, 0, 0, 0.513811,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204493,-99) , -4, 1.06196, 1, 0, 0.355526,-99) , -13, 0.0251411, 1, 0, 0.503518,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270456,-99) , -12, 0.01821, 0, 0, 0.497308,-99) ); - // itree = 691 - fBoostWeights.push_back(0.00383125); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390064,-99) , -15, 1.8119, 1, 0, 0.520602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377963,-99) , -7, 0.1357, 1, 0, 0.515268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397083,-99) , -12, 0.129454, 1, 0, 0.456052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.22328, 1, 0, 0.448143,-99) , -8, -0.663913, 0, 0, 0.501805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280678,-99) , -7, 0.00699682, 0, 0, 0.497908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272518,-99) , -3, 0.999713, 1, 0, 0.493427,-99) ); - // itree = 692 - fBoostWeights.push_back(0.00528427); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.732964,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552969,-99) , -4, 1.9393, 0, 0, 0.572456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413916,-99) , -15, 0.0585156, 0, 0, 0.554238,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490493,-99) , -12, 0.0493408, 1, 0, 0.504554,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247168,-99) , -14, -2.53459, 1, 0, 0.409762,-99) , -4, 1.57258, 1, 0, 0.489225,-99) , -9, -3.77377, 1, 0, 0.501934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216672,-99) , -7, 0.252109, 1, 0, 0.499252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216814,-99) , -12, 0.0167728, 0, 0, 0.49404,-99) ); - // itree = 693 - fBoostWeights.push_back(0.00617662); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670923,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565057,-99) , -7, 0.0125243, 1, 0, 0.587029,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406847,-99) , -6, 0.999176, 0, 0, 0.48106,-99) , -6, 0.858336, 1, 0, 0.558498,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601425,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237847,-99) , -5, 2.19428, 1, 0, 0.483232,-99) , -10, -3562.85, 1, 0, 0.498613,-99) , -16, 1028.68, 1, 0, 0.528197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374501,-99) , -12, 0.0217335, 0, 0, 0.517209,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631347,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449883,-99) , -0, 17.5, 0, 0, 0.509826,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240004,-99) , -4, 1.89321, 1, 0, 0.427041,-99) , -11, 1.5, 0, 0, 0.454555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324541,-99) , -8, -0.879647, 0, 0, 0.440609,-99) , -12, 0.49407, 0, 0, 0.456426,-99) , -12, 0.136063, 1, 0, 0.489905,-99) ); - // itree = 694 - fBoostWeights.push_back(0.00580021); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411882,-99) , -1, 67.5, 1, 0, 0.551628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281664,-99) , -1, 10.5, 0, 0, 0.540638,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0993735,-99) , -4, 2.0734, 1, 0, 0.488128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258763,-99) , -7, 0.0387563, 1, 0, 0.472969,-99) , -2, 24.5, 0, 0, 0.490227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16391,-99) , -7, 0.282135, 1, 0, 0.487967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257881,-99) , -5, 2.33369, 1, 0, 0.482845,-99) ); - // itree = 695 - fBoostWeights.push_back(0.00604251); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452328,-99) , -6, 0.915968, 1, 0, 0.551099,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114962,-99) , -7, 0.056794, 1, 0, 0.484366,-99) , -2, 24.5, 0, 0, 0.50092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281681,-99) , -14, -5.90276, 0, 0, 0.49619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277583,-99) , -2, 6.5, 0, 0, 0.49161,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335162,-99) , -5, 1.90566, 1, 0, 0.442765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254582,-99) , -7, 0.0327075, 1, 0, 0.368013,-99) , -3, 0.999035, 1, 0, 0.481101,-99) ); - // itree = 696 - fBoostWeights.push_back(0.00886194); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392361,-99) , -4, 1.47203, 1, 0, 0.554754,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336932,-99) , -3, 0.871778, 0, 0, 0.488403,-99) , -6, 0.600299, 1, 0, 0.525155,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484381,-99) , -8, 0.984617, 1, 0, 0.550651,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324172,-99) , -12, 0.0809207, 0, 0, 0.426594,-99) , -5, 1.85396, 0, 0, 0.464162,-99) , -8, 0.892181, 1, 0, 0.509304,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536801,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108916,-99) , -8, 0.909367, 0, 0, 0.405536,-99) , -5, 2.1156, 1, 0, 0.502054,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302563,-99) , -4, 1.28422, 1, 0, 0.465758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 20.5, 0, 0, 0.380855,-99) , -7, 0.0891195, 1, 0, 0.492915,-99) ); - // itree = 697 - fBoostWeights.push_back(0.00546443); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686056,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602691,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495221,-99) , -2, 39.5, 0, 0, 0.508534,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442175,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.14381, 1, 0, 0.428484,-99) , -3, 0.997423, 1, 0, 0.492501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24806,-99) , -2, 6.5, 0, 0, 0.488056,-99) , -12, 0.521312, 0, 0, 0.49511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0584583,-99) , -5, 2.49032, 1, 0, 0.491894,-99) ); - // itree = 698 - fBoostWeights.push_back(0.00433334); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681996,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577392,-99) , -6, 0.763739, 0, 0, 0.619214,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532088,-99) , -3, 0.969699, 0, 0, 0.589662,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509421,-99) , -15, 0.501608, 1, 0, 0.567497,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469103,-99) , -15, 0.468443, 1, 0, 0.518607,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431079,-99) , -12, 0.446186, 0, 0, 0.456571,-99) , -12, 0.197118, 1, 0, 0.500838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350492,-99) , -3, 0.770951, 0, 0, 0.494641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343531,-99) , -4, 1.83322, 1, 0, 0.485522,-99) , -16, 34.2945, 1, 0, 0.501583,-99) ); - // itree = 699 - fBoostWeights.push_back(0.00592782); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676893,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547682,-99) , -8, 0.55549, 1, 0, 0.619344,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450673,-99) , -12, 0.0327361, 0, 0, 0.541072,-99) , -9, 3.9991, 0, 0, 0.555651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354442,-99) , -12, 0.018188, 0, 0, 0.543506,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181235,-99) , -7, 0.143756, 1, 0, 0.50189,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226852,-99) , -7, 0.0300649, 1, 0, 0.368481,-99) , -8, -0.885182, 0, 0, 0.487545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147151,-99) , -1, 69.5, 1, 0, 0.480273,-99) , -12, 0.101389, 1, 0, 0.507197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35265,-99) , -1, 6.5, 0, 0, 0.501244,-99) ); - // itree = 700 - fBoostWeights.push_back(0.0058995); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63324,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453901,-99) , -6, 0.570477, 1, 0, 0.538656,-99) , -9, 0.712565, 0, 0, 0.572602,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633917,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502997,-99) , -3, 0.997635, 0, 0, 0.547544,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384928,-99) , -13, 0.0011964, 0, 0, 0.465519,-99) , -15, 0.468935, 1, 0, 0.507973,-99) , -3, 0.982209, 1, 0, 0.536915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345654,-99) , -3, 0.999097, 1, 0, 0.49659,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295583,-99) , -8, -0.959454, 1, 0, 0.370457,-99) , -8, -0.885298, 0, 0, 0.482549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310653,-99) , -4, 1.81714, 1, 0, 0.47109,-99) , -12, 0.10141, 1, 0, 0.498489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302549,-99) , -12, 0.0182039, 0, 0, 0.493561,-99) ); - // itree = 701 - fBoostWeights.push_back(0.00630196); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627425,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527731,-99) , -7, 0.0588961, 1, 0, 0.591796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497328,-99) , -3, 0.974281, 1, 0, 0.530044,-99) , -2, 17.5, 0, 0, 0.55674,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460285,-99) , -0, 16.5, 0, 0, 0.538611,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201676,-99) , -1, 40.5, 1, 0, 0.451351,-99) , -11, 1.5, 0, 0, 0.480085,-99) , -12, 0.109415, 1, 0, 0.510655,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412571,-99) , -9, 0.271879, 0, 0, 0.471987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280797,-99) , -6, 0.788276, 1, 0, 0.411289,-99) , -12, 0.0305522, 0, 0, 0.50212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32449,-99) , -3, 0.99963, 1, 0, 0.497306,-99) ); - // itree = 702 - fBoostWeights.push_back(0.00567458); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630833,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543735,-99) , -13, 0.00250672, 0, 0, 0.6013,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415363,-99) , -8, 0.558107, 1, 0, 0.507561,-99) , -6, 0.437641, 1, 0, 0.544276,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468313,-99) , -15, 0.234849, 0, 0, 0.497805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310412,-99) , -13, 0.0154792, 1, 0, 0.482426,-99) , -5, 1.39058, 1, 0, 0.507151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271165,-99) , -2, 6.5, 0, 0, 0.502798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275333,-99) , -12, 0.0176003, 0, 0, 0.497801,-99) ); - // itree = 703 - fBoostWeights.push_back(0.00334554); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488478,-99) , -2, 24.5, 0, 0, 0.50613,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273131,-99) , -13, 0.0569757, 1, 0, 0.502479,-99) , -12, 0.521876, 0, 0, 0.50795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285089,-99) , -2, 6.5, 0, 0, 0.503641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313355,-99) , -3, 0.999634, 1, 0, 0.498857,-99) ); - // itree = 704 - fBoostWeights.push_back(0.00745465); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546799,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347837,-99) , -5, 2.25771, 1, 0, 0.542482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355447,-99) , -14, -5.46461, 0, 0, 0.533558,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449496,-99) , -12, 0.169058, 0, 0, 0.52931,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222483,-99) , -8, -0.0429255, 0, 0, 0.404009,-99) , -5, 1.56421, 1, 0, 0.469022,-99) , -12, 0.127002, 1, 0, 0.502895,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117893,-99) , -4, 1.58028, 1, 0, 0.372456,-99) , -3, 0.999224, 1, 0, 0.493568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226104,-99) , -2, 6.5, 0, 0, 0.488235,-99) ); - // itree = 705 - fBoostWeights.push_back(0.00730452); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609746,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535146,-99) , -9, -3.35408, 1, 0, 0.550483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443722,-99) , -12, 0.0305427, 0, 0, 0.540368,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523265,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427064,-99) , -5, 1.53566, 0, 0, 0.490667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260488,-99) , -7, 0.0235968, 1, 0, 0.468923,-99) , -2, 12.5, 0, 0, 0.518911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362188,-99) , -3, 0.999216, 1, 0, 0.510178,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544037,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310591,-99) , -13, 0.00346185, 1, 0, 0.447058,-99) , -5, 1.37953, 1, 0, 0.482886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215138,-99) , -5, 2.0231, 1, 0, 0.459149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152721,-99) , -7, 0.0304183, 1, 0, 0.428797,-99) , -1, 9.5, 0, 0, 0.493299,-99) ); - // itree = 706 - fBoostWeights.push_back(0.00419369); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.693985,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685128,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493924,-99) , -16, 76.474, 1, 0, 0.510812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356591,-99) , -8, -0.985076, 0, 0, 0.504582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340052,-99) , -3, 0.99938, 1, 0, 0.4969,-99) , -10, -14777.8, 1, 0, 0.502872,-99) , -12, 0.513304, 0, 0, 0.510604,-99) ); - // itree = 707 - fBoostWeights.push_back(0.00465554); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633624,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520366,-99) , -6, 0.0591738, 1, 0, 0.530747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35571,-99) , -1, 55.5, 1, 0, 0.523575,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402612,-99) , -5, 1.49386, 0, 0, 0.480906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314003,-99) , -1, 13.5, 1, 0, 0.457944,-99) , -7, 0.0146072, 0, 0, 0.505088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34155,-99) , -7, 0.141664, 1, 0, 0.499376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270172,-99) , -7, 0.00716579, 0, 0, 0.494806,-99) ); - // itree = 708 - fBoostWeights.push_back(0.00505949); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652516,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645895,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527534,-99) , -9, -4.78972, 1, 0, 0.546504,-99) , -0, 33.5, 0, 0, 0.570257,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630455,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500793,-99) , -9, 10.0569, 0, 0, 0.507451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320338,-99) , -7, 0.00714423, 0, 0, 0.501901,-99) , -11, 1.5, 0, 0, 0.524122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316034,-99) , -8, -0.984638, 0, 0, 0.51777,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283281,-99) , -15, 0.228482, 1, 0, 0.4008,-99) , -13, 0.0201003, 1, 0, 0.5081,-99) ); - // itree = 709 - fBoostWeights.push_back(0.00544409); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650115,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523705,-99) , -8, 0.712138, 1, 0, 0.57718,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259473,-99) , -7, 0.0461247, 1, 0, 0.497368,-99) , -2, 24.5, 0, 0, 0.513399,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339469,-99) , -5, 1.46907, 1, 0, 0.447879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0978943,-99) , -4, 1.68351, 1, 0, 0.426252,-99) , -13, 0.0139844, 1, 0, 0.501867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271344,-99) , -2, 6.5, 0, 0, 0.497464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258857,-99) , -15, 4.16271, 1, 0, 0.493227,-99) ); - // itree = 710 - fBoostWeights.push_back(0.00919532); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486196,-99) , -15, 0.823382, 1, 0, 0.578239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427236,-99) , -14, -4.58666, 0, 0, 0.559929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432044,-99) , -8, -0.858071, 0, 0, 0.543017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28336,-99) , -5, 1.74771, 1, 0, 0.400972,-99) , -12, 0.0313553, 0, 0, 0.517121,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552533,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461673,-99) , -13, 0.0180672, 1, 0, 0.529273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412502,-99) , -3, 0.997858, 1, 0, 0.508791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491306,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325806,-99) , -12, 0.199476, 0, 0, 0.379099,-99) , -10, 3937.06, 0, 0, 0.42532,-99) , -7, 0.0146933, 0, 0, 0.484591,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166894,-99) , -7, 0.0771403, 1, 0, 0.429215,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141158,-99) , -4, 2.07376, 1, 0, 0.40878,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137975,-99) , -8, 0.00121749, 0, 0, 0.357542,-99) , -4, 1.43993, 1, 0, 0.452045,-99) , -12, 0.110628, 1, 0, 0.482741,-99) ); - // itree = 711 - fBoostWeights.push_back(0.00474191); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431265,-99) , -13, 0.000249074, 0, 0, 0.584403,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467268,-99) , -9, 0.543327, 0, 0, 0.49659,-99) , -4, 0.528786, 1, 0, 0.512823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384609,-99) , -5, 0.570354, 0, 0, 0.506321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251174,-99) , -4, 2.06757, 1, 0, 0.501655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262651,-99) , -3, 0.730301, 0, 0, 0.495808,-99) ); - // itree = 712 - fBoostWeights.push_back(0.00482144); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638051,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526203,-99) , -10, 18189.6, 1, 0, 0.598402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499446,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373189,-99) , -3, 0.999223, 1, 0, 0.492186,-99) , -9, -6.59854, 1, 0, 0.503195,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318705,-99) , -7, 0.00896767, 0, 0, 0.4374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200703,-99) , -4, 1.78184, 1, 0, 0.418977,-99) , -15, 0.0793337, 0, 0, 0.486125,-99) , -12, 0.509824, 0, 0, 0.492012,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26755,-99) , -7, 0.178502, 1, 0, 0.487825,-99) ); - // itree = 713 - fBoostWeights.push_back(0.00390727); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365546,-99) , -8, -0.979963, 0, 0, 0.515151,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536285,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386594,-99) , -10, 9218.54, 0, 0, 0.440352,-99) , -3, 0.998059, 1, 0, 0.50332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318018,-99) , -7, 0.00714071, 0, 0, 0.499271,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160633,-99) , -7, 0.253618, 1, 0, 0.496555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307626,-99) , -12, 0.01821, 0, 0, 0.491812,-99) ); - // itree = 714 - fBoostWeights.push_back(0.00371465); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677925,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631327,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511792,-99) , -2, 13.5, 0, 0, 0.584135,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537306,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470936,-99) , -9, -1.21677, 1, 0, 0.498664,-99) , -9, 6.34077, 0, 0, 0.507469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216664,-99) , -5, 2.49011, 1, 0, 0.504814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339286,-99) , -13, 0.0303353, 1, 0, 0.498096,-99) , -12, 0.522667, 0, 0, 0.504197,-99) ); - // itree = 715 - fBoostWeights.push_back(0.00539202); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626458,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537669,-99) , -0, 16.5, 0, 0, 0.587354,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473131,-99) , -4, 1.43637, 0, 0, 0.519824,-99) , -6, 0.398653, 1, 0, 0.551416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406225,-99) , -14, -4.67513, 0, 0, 0.537209,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619229,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503966,-99) , -6, 0.0836283, 1, 0, 0.517961,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427171,-99) , -15, 0.0243452, 1, 0, 0.446532,-99) , -12, 0.134216, 1, 0, 0.485717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183293,-99) , -5, 2.30887, 1, 0, 0.480234,-99) , -11, 1.5, 0, 0, 0.499274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298727,-99) , -3, 0.999647, 1, 0, 0.49446,-99) ); - // itree = 716 - fBoostWeights.push_back(0.00822747); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.700667,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533561,-99) , -2, 34.5, 0, 0, 0.546605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337708,-99) , -1, 47.5, 1, 0, 0.539504,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319988,-99) , -13, 0.0175018, 1, 0, 0.502002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36865,-99) , -2, 24.5, 0, 0, 0.464208,-99) , -15, 0.633401, 1, 0, 0.52313,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1778,-99) , -5, 1.75927, 1, 0, 0.437765,-99) , -8, -0.89439, 0, 0, 0.513813,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385811,-99) , -8, 0.855733, 1, 0, 0.498325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319188,-99) , -5, 1.98505, 1, 0, 0.477209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284574,-99) , -3, 0.956438, 0, 0, 0.451507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125185,-99) , -7, 0.0314074, 1, 0, 0.421056,-99) , -1, 9.5, 0, 0, 0.49487,-99) ); - // itree = 717 - fBoostWeights.push_back(0.0091688); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644192,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581905,-99) , -4, 0.652342, 1, 0, 0.61892,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467057,-99) , -12, 0.226604, 0, 0, 0.513047,-99) , -13, 0.0103373, 1, 0, 0.5753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443144,-99) , -7, 0.0140044, 0, 0, 0.557179,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586127,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374232,-99) , -14, -3.87284, 0, 0, 0.430372,-99) , -9, -0.0227014, 1, 0, 0.489487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294561,-99) , -10, 6088.67, 1, 0, 0.449584,-99) , -13, 0.00168938, 0, 0, 0.519911,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456539,-99) , -15, 0.259269, 0, 0, 0.494122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324882,-99) , -12, 0.0236344, 0, 0, 0.483817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358135,-99) , -3, 0.887593, 0, 0, 0.470491,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535718,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236465,-99) , -9, -0.257682, 1, 0, 0.336024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115638,-99) , -4, 1.65594, 1, 0, 0.300147,-99) , -11, 1.5, 0, 0, 0.379683,-99) , -13, 0.00770564, 1, 0, 0.45253,-99) , -4, 1.0147, 1, 0, 0.482432,-99) ); - // itree = 718 - fBoostWeights.push_back(0.00385121); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666652,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530906,-99) , -6, 0.0329964, 0, 0, 0.600171,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477731,-99) , -9, -0.777828, 1, 0, 0.506839,-99) , -6, 0.0644884, 1, 0, 0.516759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356788,-99) , -5, 2.25775, 1, 0, 0.511132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352819,-99) , -8, -0.984599, 0, 0, 0.504922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300477,-99) , -3, 0.999645, 1, 0, 0.499955,-99) ); - // itree = 719 - fBoostWeights.push_back(0.00692235); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611463,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585163,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507073,-99) , -10, 8653.28, 0, 0, 0.5212,-99) , -6, 0.0719945, 1, 0, 0.532128,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376351,-99) , -5, 1.33244, 1, 0, 0.475347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234673,-99) , -3, 0.998129, 1, 0, 0.432724,-99) , -13, 0.0167731, 1, 0, 0.516671,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395975,-99) , -8, -0.657822, 0, 0, 0.493729,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241113,-99) , -7, 0.00914895, 0, 0, 0.386193,-99) , -12, 0.165862, 1, 0, 0.452097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 2.0149, 1, 0, 0.443072,-99) , -7, 0.0147807, 0, 0, 0.495427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23644,-99) , -15, 4.61116, 1, 0, 0.491636,-99) ); - // itree = 720 - fBoostWeights.push_back(0.00615607); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471751,-99) , -7, 0.103129, 1, 0, 0.561846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225773,-99) , -1, 10.5, 0, 0, 0.548515,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40887,-99) , -8, 0.979662, 1, 0, 0.498782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176812,-99) , -7, 0.0455639, 1, 0, 0.487827,-99) , -2, 24.5, 0, 0, 0.503332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311488,-99) , -3, 0.999688, 1, 0, 0.499363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221456,-99) , -2, 6.5, 0, 0, 0.49463,-99) ); - // itree = 721 - fBoostWeights.push_back(0.00374604); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626696,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535442,-99) , -9, -3.71133, 1, 0, 0.554327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297538,-99) , -3, 0.764327, 0, 0, 0.497104,-99) , -16, 492.966, 1, 0, 0.518995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249522,-99) , -7, 0.252106, 1, 0, 0.516416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3441,-99) , -12, 0.0190252, 0, 0, 0.511427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279944,-99) , -2, 6.5, 0, 0, 0.507009,-99) ); - // itree = 722 - fBoostWeights.push_back(0.00624774); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496159,-99) , -2, 16.5, 0, 0, 0.564562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424239,-99) , -1, 62.5, 1, 0, 0.553021,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219747,-99) , -5, 2.27784, 1, 0, 0.501045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0450278,-99) , -0, 41.5, 1, 0, 0.491881,-99) , -1, 14.5, 0, 0, 0.520571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323467,-99) , -3, 0.999651, 1, 0, 0.515441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231118,-99) , -2, 6.5, 0, 0, 0.510241,-99) ); - // itree = 723 - fBoostWeights.push_back(0.00454016); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675491,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44067,-99) , -5, 2.03442, 1, 0, 0.547177,-99) , -1, 19.5, 0, 0, 0.577397,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412748,-99) , -8, -0.857285, 0, 0, 0.55906,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648116,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330748,-99) , -14, -4.89654, 0, 0, 0.486988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333,-99) , -5, 2.16541, 1, 0, 0.479123,-99) , -12, 0.492292, 0, 0, 0.486346,-99) , -9, -3.72438, 1, 0, 0.500567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283419,-99) , -7, 0.178342, 1, 0, 0.496391,-99) ); - // itree = 724 - fBoostWeights.push_back(0.00737831); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.746471,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465138,-99) , -13, 0.00136652, 0, 0, 0.571665,-99) , -4, 1.80332, 0, 0, 0.599187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446891,-99) , -1, 8.5, 0, 0, 0.571096,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60722,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502613,-99) , -6, 0.170866, 1, 0, 0.529781,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308567,-99) , -12, 0.0299848, 0, 0, 0.467852,-99) , -16, 1111.77, 1, 0, 0.495697,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287803,-99) , -5, 2.27558, 1, 0, 0.48947,-99) , -10, 8903.92, 0, 0, 0.502222,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310817,-99) , -3, 0.996368, 1, 0, 0.453376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0308804,-99) , -1, 17.5, 0, 0, 0.389352,-99) , -7, 0.0837049, 1, 0, 0.492251,-99) ); - // itree = 725 - fBoostWeights.push_back(0.00561721); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469908,-99) , -8, 0.970481, 1, 0, 0.554974,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343683,-99) , -12, 0.0312838, 0, 0, 0.493093,-99) , -16, 1038.15, 1, 0, 0.521995,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402472,-99) , -13, 0.00811866, 1, 0, 0.448838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.067372,-99) , -5, 1.91977, 1, 0, 0.424885,-99) , -8, -0.842564, 0, 0, 0.509273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254148,-99) , -2, 6.5, 0, 0, 0.504808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266711,-99) , -3, 0.71543, 0, 0, 0.499699,-99) ); - // itree = 726 - fBoostWeights.push_back(0.00814866); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677022,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568686,-99) , -13, 0.00531675, 1, 0, 0.629887,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524557,-99) , -13, 0.000529104, 0, 0, 0.596038,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576323,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41112,-99) , -9, 4.4167, 0, 0, 0.478322,-99) , -3, 0.972446, 1, 0, 0.507417,-99) , -6, 0.219055, 1, 0, 0.536947,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410528,-99) , -15, 0.0584209, 0, 0, 0.494159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374364,-99) , -13, 0.0240608, 1, 0, 0.486145,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305331,-99) , -5, 2.07672, 1, 0, 0.479609,-99) , -9, 0.497043, 0, 0, 0.505266,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431733,-99) , -1, 9.5, 0, 0, 0.537894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289564,-99) , -13, 0.00396119, 1, 0, 0.490343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22893,-99) , -3, 0.897584, 0, 0, 0.403657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162812,-99) , -4, 1.9711, 1, 0, 0.366095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109804,-99) , -8, -0.403376, 0, 0, 0.331861,-99) , -9, -1.22093, 1, 0, 0.403712,-99) , -4, 1.55762, 1, 0, 0.486786,-99) ); - // itree = 727 - fBoostWeights.push_back(0.00571833); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483745,-99) , -5, 1.21254, 0, 0, 0.548536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432702,-99) , -8, 0.988716, 1, 0, 0.535829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359421,-99) , -12, 0.01821, 0, 0, 0.526537,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631163,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519658,-99) , -15, 0.189975, 1, 0, 0.580924,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406951,-99) , -7, 0.0136947, 1, 0, 0.461017,-99) , -0, 16.5, 0, 0, 0.525773,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480119,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345319,-99) , -3, 0.997833, 1, 0, 0.458543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250049,-99) , -4, 1.70846, 1, 0, 0.443067,-99) , -11, 1.5, 0, 0, 0.469099,-99) , -12, 0.119218, 1, 0, 0.497909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360613,-99) , -5, 2.19661, 1, 0, 0.491593,-99) ); - // itree = 728 - fBoostWeights.push_back(0.00535555); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641029,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442885,-99) , -8, -0.914717, 0, 0, 0.552151,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549288,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422718,-99) , -13, 0.00347535, 0, 0, 0.470624,-99) , -15, 0.552591, 1, 0, 0.520092,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54169,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434488,-99) , -5, 0.858265, 0, 0, 0.518398,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0702745,-99) , -7, 0.109404, 1, 0, 0.424513,-99) , -4, 1.00049, 1, 0, 0.467064,-99) , -12, 0.12498, 1, 0, 0.494155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29379,-99) , -5, 2.31711, 1, 0, 0.489116,-99) , -9, 11.5583, 0, 0, 0.494484,-99) ); - // itree = 729 - fBoostWeights.push_back(0.00613081); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361112,-99) , -1, 74.5, 1, 0, 0.552895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377141,-99) , -1, 10.5, 0, 0, 0.539134,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273037,-99) , -7, 0.0313268, 1, 0, 0.487887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0453047,-99) , -0, 28.5, 1, 0, 0.479243,-99) , -2, 16.5, 0, 0, 0.505027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323115,-99) , -8, -0.991053, 0, 0, 0.499804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278832,-99) , -3, 0.999718, 1, 0, 0.495668,-99) ); - // itree = 730 - fBoostWeights.push_back(0.00387339); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6831,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484599,-99) , -2, 24.5, 0, 0, 0.502478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144735,-99) , -7, 0.26332, 1, 0, 0.4998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271979,-99) , -7, 0.0071459, 0, 0, 0.495638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302647,-99) , -3, 0.741135, 0, 0, 0.489733,-99) , -12, 0.545255, 0, 0, 0.49625,-99) ); - // itree = 731 - fBoostWeights.push_back(0.00605617); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454734,-99) , -15, 1.65392, 1, 0, 0.585733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450066,-99) , -1, 63.5, 1, 0, 0.568158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229694,-99) , -1, 10.5, 0, 0, 0.555335,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501635,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280395,-99) , -5, 2.3884, 1, 0, 0.497624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286607,-99) , -0, 31.5, 1, 0, 0.491882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1561,-99) , -7, 0.0569752, 1, 0, 0.484526,-99) , -2, 24.5, 0, 0, 0.502563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281244,-99) , -3, 0.999634, 1, 0, 0.497285,-99) ); - // itree = 732 - fBoostWeights.push_back(0.00622095); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651545,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52486,-99) , -16, 1664.16, 1, 0, 0.593592,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676675,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518162,-99) , -7, 0.0166483, 1, 0, 0.602152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549786,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474149,-99) , -2, 24.5, 0, 0, 0.501979,-99) , -15, 0.064223, 1, 0, 0.512376,-99) , -6, 0.0641822, 1, 0, 0.521147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158306,-99) , -7, 0.354082, 1, 0, 0.518744,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598565,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313365,-99) , -5, 1.86189, 1, 0, 0.458312,-99) , -15, 0.131029, 0, 0, 0.516718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305877,-99) , -0, 14.5, 1, 0, 0.49268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228834,-99) , -4, 1.38453, 1, 0, 0.346311,-99) , -14, -2.68213, 1, 0, 0.448206,-99) , -7, 0.0132704, 0, 0, 0.502599,-99) ); - // itree = 733 - fBoostWeights.push_back(0.00512245); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663769,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477324,-99) , -16, 450.971, 1, 0, 0.502241,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214794,-99) , -14, -3.82906, 1, 0, 0.368188,-99) , -4, 1.81157, 1, 0, 0.493887,-99) , -10, -15209.8, 1, 0, 0.499132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.145575,-99) , -7, 0.324392, 1, 0, 0.497366,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215451,-99) , -2, 6.5, 0, 0, 0.492201,-99) ); - // itree = 734 - fBoostWeights.push_back(0.00567009); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598673,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517861,-99) , -12, 0.125377, 1, 0, 0.560514,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408283,-99) , -12, 0.0289881, 0, 0, 0.546565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387973,-99) , -16, 1.55895, 0, 0, 0.533821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357221,-99) , -8, -0.946846, 0, 0, 0.522123,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40798,-99) , -14, -4.11031, 0, 0, 0.522131,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427256,-99) , -5, 1.33989, 1, 0, 0.454437,-99) , -12, 0.0706912, 1, 0, 0.473207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24506,-99) , -4, 1.97113, 1, 0, 0.466667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223296,-99) , -3, 0.999642, 1, 0, 0.459897,-99) , -16, 492.966, 1, 0, 0.483765,-99) ); - // itree = 735 - fBoostWeights.push_back(0.00574472); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620533,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458557,-99) , -3, 0.995946, 1, 0, 0.544132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433925,-99) , -1, 9.5, 0, 0, 0.526644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156065,-99) , -4, 2.05847, 1, 0, 0.520893,-99) , -9, -5.13042, 1, 0, 0.536897,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581962,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387713,-99) , -7, 0.028977, 1, 0, 0.495543,-99) , -2, 29.5, 0, 0, 0.519315,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43475,-99) , -11, 0.5, 1, 0, 0.474733,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138777,-99) , -5, 2.01947, 1, 0, 0.32915,-99) , -13, 0.00833047, 1, 0, 0.451999,-99) , -5, 1.41965, 1, 0, 0.48058,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228812,-99) , -13, 0.0707336, 1, 0, 0.476003,-99) , -11, 1.5, 0, 0, 0.496182,-99) ); - // itree = 736 - fBoostWeights.push_back(0.00477506); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654174,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37878,-99) , -13, 0.0252557, 1, 0, 0.504987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356134,-99) , -12, 0.0216607, 0, 0, 0.497909,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276511,-99) , -5, 2.08094, 1, 0, 0.449606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268818,-99) , -7, 0.00896757, 0, 0, 0.406323,-99) , -15, 0.0583582, 0, 0, 0.486128,-99) , -12, 0.512772, 0, 0, 0.492478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117187,-99) , -7, 0.251046, 1, 0, 0.489068,-99) ); - // itree = 737 - fBoostWeights.push_back(0.00719072); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678537,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519837,-99) , -13, 0.00198558, 0, 0, 0.61809,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462213,-99) , -8, 0.651343, 1, 0, 0.547968,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294676,-99) , -12, 0.169671, 1, 0, 0.439343,-99) , -6, 0.780131, 1, 0, 0.511791,-99) , -15, 0.0939007, 1, 0, 0.542917,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662294,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524474,-99) , -5, 1.70756, 0, 0, 0.573274,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421725,-99) , -0, 19.5, 0, 0, 0.475981,-99) , -12, 0.101513, 1, 0, 0.521887,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327909,-99) , -13, 0.0311583, 1, 0, 0.461442,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215346,-99) , -14, -4.11795, 1, 0, 0.310931,-99) , -5, 1.9817, 1, 0, 0.445032,-99) , -11, 1.5, 0, 0, 0.470372,-99) , -9, 2.87452, 0, 0, 0.488155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125187,-99) , -5, 2.59392, 1, 0, 0.486409,-99) ); - // itree = 738 - fBoostWeights.push_back(0.00464845); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245855,-99) , -4, 1.81695, 1, 0, 0.565681,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480215,-99) , -4, 1.46247, 0, 0, 0.511956,-99) , -8, 0.438495, 1, 0, 0.539198,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424706,-99) , -8, -0.735474, 0, 0, 0.515336,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13063,-99) , -2, 7.5, 0, 0, 0.435296,-99) , -4, 1.2868, 1, 0, 0.484119,-99) , -12, 0.13624, 1, 0, 0.513817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311819,-99) , -3, 0.999685, 1, 0, 0.509917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316574,-99) , -12, 0.0168727, 0, 0, 0.50595,-99) ); - // itree = 739 - fBoostWeights.push_back(0.008295); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.724883,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57821,-99) , -6, 0.88764, 1, 0, 0.670663,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532998,-99) , -8, 0.690457, 1, 0, 0.618984,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616093,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509935,-99) , -16, 1256.48, 1, 0, 0.562497,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191977,-99) , -7, 0.136897, 1, 0, 0.477731,-99) , -4, 0.909636, 1, 0, 0.517336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293155,-99) , -3, 0.999432, 1, 0, 0.506858,-99) , -9, 4.71138, 0, 0, 0.524014,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641088,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515158,-99) , -4, 1.35747, 0, 0, 0.568516,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330451,-99) , -8, -0.887358, 0, 0, 0.467833,-99) , -12, 0.0752891, 1, 0, 0.491048,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345195,-99) , -15, 0.440163, 1, 0, 0.480571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16557,-99) , -7, 0.0282995, 1, 0, 0.462938,-99) , -2, 13.5, 0, 0, 0.496749,-99) ); - // itree = 740 - fBoostWeights.push_back(0.00313131); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478366,-99) , -1, 10.5, 0, 0, 0.584591,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432308,-99) , -8, -0.914372, 0, 0, 0.508796,-99) , -10, 10853.9, 0, 0, 0.51735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387049,-99) , -12, 0.0229865, 0, 0, 0.511543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351283,-99) , -7, 0.00738125, 0, 0, 0.507278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314814,-99) , -3, 0.999638, 1, 0, 0.502057,-99) ); - // itree = 741 - fBoostWeights.push_back(0.00364544); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617971,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470171,-99) , -12, 0.100163, 1, 0, 0.500104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359507,-99) , -12, 0.0220065, 0, 0, 0.494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278977,-99) , -15, 0.0308752, 0, 0, 0.489468,-99) , -12, 0.443537, 0, 0, 0.496522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261434,-99) , -4, 2.06713, 1, 0, 0.492367,-99) ); - // itree = 742 - fBoostWeights.push_back(0.00631615); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709519,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558255,-99) , -8, 0.165496, 0, 0, 0.658349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458877,-99) , -12, 0.0622389, 0, 0, 0.591712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477441,-99) , -10, 8523.89, 0, 0, 0.491909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.197111,-99) , -7, 0.062927, 1, 0, 0.483508,-99) , -2, 35.5, 0, 0, 0.497177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0513107,-99) , -7, 0.21299, 1, 0, 0.494341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324624,-99) , -1, 64.5, 1, 0, 0.488473,-99) ); - // itree = 743 - fBoostWeights.push_back(0.00683617); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.690595,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605847,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524057,-99) , -4, 0.834637, 1, 0, 0.556805,-99) , -9, -5.19006, 1, 0, 0.575746,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393606,-99) , -7, 0.0141049, 1, 0, 0.483414,-99) , -1, 9.5, 0, 0, 0.558837,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316037,-99) , -4, 1.58093, 1, 0, 0.463844,-99) , -16, 5.57431, 0, 0, 0.540516,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606146,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48043,-99) , -13, 0.00985285, 1, 0, 0.517344,-99) , -6, 0.492437, 1, 0, 0.553439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434135,-99) , -13, 0.00203001, 0, 0, 0.518387,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56789,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459434,-99) , -15, 0.0712766, 1, 0, 0.486742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33934,-99) , -7, 0.00930967, 0, 0, 0.46918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209835,-99) , -13, 0.0151096, 1, 0, 0.450239,-99) , -5, 1.34523, 1, 0, 0.475856,-99) , -16, 532.119, 1, 0, 0.501162,-99) ); - // itree = 744 - fBoostWeights.push_back(0.0038573); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662938,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489426,-99) , -11, 1.5, 0, 0, 0.509308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338018,-99) , -13, 0.0377251, 1, 0, 0.504127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353458,-99) , -15, 0.0387165, 0, 0, 0.496903,-99) , -12, 0.509317, 0, 0, 0.502915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207192,-99) , -4, 2.06958, 1, 0, 0.497928,-99) ); - // itree = 745 - fBoostWeights.push_back(0.00387444); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629957,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269164,-99) , -5, 2.30382, 1, 0, 0.51953,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337451,-99) , -2, 12.5, 1, 0, 0.431675,-99) , -14, -4.57917, 0, 0, 0.510975,-99) , -9, 10.0569, 0, 0, 0.516282,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299309,-99) , -4, 1.08773, 1, 0, 0.422785,-99) , -13, 0.0175316, 1, 0, 0.506266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297145,-99) , -4, 2.07376, 1, 0, 0.502467,-99) ); - // itree = 746 - fBoostWeights.push_back(0.00668169); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46831,-99) , -13, 0.00081558, 0, 0, 0.561406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436726,-99) , -7, 0.014377, 0, 0, 0.53902,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402859,-99) , -14, -4.67533, 0, 0, 0.508421,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140617,-99) , -4, 1.76084, 1, 0, 0.405503,-99) , -14, -2.39694, 1, 0, 0.480316,-99) , -5, 1.44017, 1, 0, 0.50535,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199675,-99) , -12, 0.190149, 1, 0, 0.342694,-99) , -3, 0.999385, 1, 0, 0.497064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.074824,-99) , -7, 0.240014, 1, 0, 0.493675,-99) ); - // itree = 747 - fBoostWeights.push_back(0.00678739); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65695,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554091,-99) , -6, 0.160354, 1, 0, 0.577687,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234374,-99) , -5, 2.3217, 1, 0, 0.571538,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401222,-99) , -5, 1.91043, 0, 0, 0.495811,-99) , -14, -3.46743, 0, 0, 0.549125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410936,-99) , -13, 0.0212354, 1, 0, 0.539383,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613047,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510753,-99) , -6, 0.819398, 1, 0, 0.569025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451244,-99) , -13, 0.0020128, 0, 0, 0.5302,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185989,-99) , -7, 0.00706906, 0, 0, 0.463177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.121984,-99) , -13, 0.0367801, 1, 0, 0.456043,-99) , -5, 1.32872, 1, 0, 0.482099,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192965,-99) , -3, 0.99526, 1, 0, 0.360915,-99) , -8, -0.944385, 0, 0, 0.472148,-99) , -11, 1.5, 0, 0, 0.495,-99) ); - // itree = 748 - fBoostWeights.push_back(0.00634113); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677839,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434174,-99) , -8, 0.990478, 1, 0, 0.561756,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511257,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40935,-99) , -4, 1.4604, 1, 0, 0.484641,-99) , -12, 0.10094, 1, 0, 0.513891,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331952,-99) , -4, 1.68926, 1, 0, 0.476541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380573,-99) , -4, 1.21742, 0, 0, 0.424899,-99) , -12, 0.0369407, 0, 0, 0.501941,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15355,-99) , -5, 1.38766, 1, 0, 0.37622,-99) , -13, 0.0218644, 1, 0, 0.493417,-99) , -12, 0.544829, 0, 0, 0.499384,-99) ); - // itree = 749 - fBoostWeights.push_back(0.00471622); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636381,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566677,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496138,-99) , -2, 11.5, 0, 0, 0.544987,-99) , -6, 0.112324, 1, 0, 0.560957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443297,-99) , -8, 0.991377, 1, 0, 0.547561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534319,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389637,-99) , -3, 0.876076, 0, 0, 0.521765,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530472,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403846,-99) , -8, 0.954774, 0, 0, 0.447576,-99) , -5, 1.65196, 1, 0, 0.495723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34241,-99) , -7, 0.0959695, 1, 0, 0.486108,-99) , -11, 1.5, 0, 0, 0.506342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331238,-99) , -4, 1.96732, 1, 0, 0.500629,-99) ); - // itree = 750 - fBoostWeights.push_back(0.00423332); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652955,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567768,-99) , -8, -0.6862, 0, 0, 0.621782,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408614,-99) , -4, 1.38305, 0, 0, 0.473977,-99) , -8, 0.586508, 1, 0, 0.561658,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480126,-99) , -4, 0.761227, 1, 0, 0.500237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36785,-99) , -3, 0.999141, 1, 0, 0.492456,-99) , -9, 4.4007, 0, 0, 0.50312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31802,-99) , -4, 1.98914, 1, 0, 0.498728,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138807,-99) , -5, 2.46997, 1, 0, 0.49543,-99) ); - // itree = 751 - fBoostWeights.push_back(0.00372048); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471778,-99) , -6, 0.979484, 1, 0, 0.528559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342396,-99) , -3, 0.999686, 1, 0, 0.524456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336832,-99) , -2, 6.5, 0, 0, 0.520605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385849,-99) , -12, 0.0233927, 0, 0, 0.514684,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516941,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374889,-99) , -13, 0.0237953, 0, 0, 0.416558,-99) , -13, 0.00754863, 1, 0, 0.456418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0621733,-99) , -4, 1.64501, 1, 0, 0.436456,-99) , -8, -0.847314, 0, 0, 0.504147,-99) ); - // itree = 752 - fBoostWeights.push_back(0.00522183); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645545,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536841,-99) , -8, 0.494314, 1, 0, 0.595169,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493207,-99) , -9, 5.32952, 0, 0, 0.506808,-99) , -12, 0.0588766, 1, 0, 0.522128,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335022,-99) , -3, 0.983178, 1, 0, 0.408796,-99) , -12, 0.0324183, 0, 0, 0.511534,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340055,-99) , -3, 0.942746, 0, 0, 0.486302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307921,-99) , -2, 9.5, 1, 0, 0.423439,-99) , -7, 0.0100117, 0, 0, 0.502186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321573,-99) , -3, 0.999625, 1, 0, 0.497064,-99) ); - // itree = 753 - fBoostWeights.push_back(0.00457038); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627065,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492999,-99) , -6, 0.250009, 1, 0, 0.511531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295409,-99) , -13, 0.0569972, 1, 0, 0.506663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345013,-99) , -12, 0.01821, 0, 0, 0.500692,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431113,-99) , -15, 0.0682276, 1, 0, 0.508883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319071,-99) , -0, 11.5, 1, 0, 0.425254,-99) , -7, 0.0133033, 0, 0, 0.463084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304155,-99) , -5, 1.95907, 1, 0, 0.437575,-99) , -15, 0.0879077, 0, 0, 0.485747,-99) , -12, 0.532578, 0, 0, 0.490353,-99) ); - // itree = 754 - fBoostWeights.push_back(0.00668116); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.764425,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649136,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558487,-99) , -15, 0.280808, 1, 0, 0.605093,-99) , -4, 1.95011, 0, 0, 0.625716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448614,-99) , -1, 8.5, 0, 0, 0.594572,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627012,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393706,-99) , -0, 18.5, 1, 0, 0.534978,-99) , -1, 14.5, 0, 0, 0.57017,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371625,-99) , -4, 1.69162, 1, 0, 0.489832,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207767,-99) , -13, 0.00941606, 1, 0, 0.36462,-99) , -3, 0.997828, 1, 0, 0.477882,-99) , -10, -2011.35, 1, 0, 0.496759,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212486,-99) , -14, -3.69545, 1, 0, 0.361476,-99) , -5, 2.12019, 1, 0, 0.487741,-99) , -10, 10923, 0, 0, 0.500807,-99) ); - // itree = 755 - fBoostWeights.push_back(0.00634529); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701237,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529862,-99) , -6, 0.331088, 1, 0, 0.626877,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49165,-99) , -12, 0.111379, 1, 0, 0.582794,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391356,-99) , -8, 0.823561, 1, 0, 0.494036,-99) , -4, 1.42595, 0, 0, 0.521146,-99) , -3, 0.950984, 1, 0, 0.546753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357238,-99) , -14, -4.80632, 0, 0, 0.532377,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397949,-99) , -8, -0.946431, 0, 0, 0.493312,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312708,-99) , -7, 0.0124178, 0, 0, 0.40947,-99) , -15, 0.0499276, 0, 0, 0.482668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198943,-99) , -13, 0.0813225, 1, 0, 0.478612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311518,-99) , -5, 2.15284, 1, 0, 0.47048,-99) , -11, 1.5, 0, 0, 0.490925,-99) ); - // itree = 756 - fBoostWeights.push_back(0.00589946); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665194,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575091,-99) , -2, 33.5, 0, 0, 0.591951,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464791,-99) , -4, 1.50627, 0, 0, 0.492598,-99) , -9, 2.06035, 1, 0, 0.567371,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632516,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50251,-99) , -10, -8277.51, 1, 0, 0.510874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35133,-99) , -12, 0.0305374, 0, 0, 0.499559,-99) , -16, 271.158, 1, 0, 0.522438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315417,-99) , -1, 69.5, 1, 0, 0.516807,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417714,-99) , -15, 0.174456, 0, 0, 0.488165,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33948,-99) , -7, 0.0243924, 1, 0, 0.387534,-99) , -3, 0.988115, 1, 0, 0.44192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110702,-99) , -4, 1.57465, 1, 0, 0.41691,-99) , -8, -0.776242, 0, 0, 0.501605,-99) ); - // itree = 757 - fBoostWeights.push_back(0.00793025); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669206,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629757,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55117,-99) , -5, 1.74144, 0, 0, 0.568462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485966,-99) , -2, 10.5, 0, 0, 0.550036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451562,-99) , -8, 0.983265, 1, 0, 0.53419,-99) , -4, 1.92285, 0, 0, 0.54357,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637993,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459867,-99) , -15, 0.521608, 1, 0, 0.514372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291437,-99) , -15, 1.64356, 1, 0, 0.499604,-99) , -2, 50.5, 0, 0, 0.51406,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435964,-99) , -1, 14.5, 0, 0, 0.501947,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359167,-99) , -15, 0.0654585, 1, 0, 0.425698,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0624864,-99) , -5, 1.93372, 1, 0, 0.282398,-99) , -8, 0.4184, 0, 0, 0.375801,-99) , -5, 1.39776, 1, 0, 0.426968,-99) , -12, 0.113767, 1, 0, 0.467641,-99) , -11, 1.5, 0, 0, 0.493418,-99) ); - // itree = 758 - fBoostWeights.push_back(0.00921213); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613598,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511655,-99) , -4, 1.3886, 1, 0, 0.593466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213209,-99) , -5, 2.12175, 1, 0, 0.583453,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667076,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553201,-99) , -6, 0.737653, 1, 0, 0.608392,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341041,-99) , -12, 0.0330246, 0, 0, 0.469372,-99) , -4, 1.66756, 0, 0, 0.50224,-99) , -14, -2.99631, 0, 0, 0.548975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386912,-99) , -5, 2.03159, 1, 0, 0.523378,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.145623,-99) , -4, 1.52352, 1, 0, 0.397837,-99) , -14, -2.5307, 1, 0, 0.497773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243787,-99) , -0, 17.5, 1, 0, 0.482308,-99) , -7, 0.0156435, 0, 0, 0.523395,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584294,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455653,-99) , -1, 32.5, 1, 0, 0.538417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385693,-99) , -2, 14.5, 0, 0, 0.503264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32757,-99) , -4, 1.35827, 1, 0, 0.469159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174548,-99) , -3, 0.999315, 1, 0, 0.448619,-99) , -13, 0.0105545, 1, 0, 0.509539,-99) ); - // itree = 759 - fBoostWeights.push_back(0.00636648); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592163,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506062,-99) , -16, 434.68, 1, 0, 0.537468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413826,-99) , -12, 0.225034, 0, 0, 0.464893,-99) , -8, 0.930775, 1, 0, 0.518755,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309188,-99) , -7, 0.0157262, 0, 0, 0.418,-99) , -8, -0.920915, 0, 0, 0.508785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369715,-99) , -5, 0.452389, 0, 0, 0.502167,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311116,-99) , -7, 0.0126617, 0, 0, 0.485232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241889,-99) , -14, -3.03715, 1, 0, 0.397509,-99) , -4, 1.70936, 1, 0, 0.491298,-99) ); - // itree = 760 - fBoostWeights.push_back(0.00379274); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620472,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44659,-99) , -4, 1.57692, 1, 0, 0.509881,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444345,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.143115,-99) , -4, 1.81758, 1, 0, 0.430448,-99) , -15, 0.0604899, 0, 0, 0.499693,-99) , -12, 0.418008, 0, 0, 0.506828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303436,-99) , -7, 0.027556, 1, 0, 0.402564,-99) , -3, 0.998951, 1, 0, 0.497819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26719,-99) , -4, 2.07717, 1, 0, 0.493939,-99) ); - // itree = 761 - fBoostWeights.push_back(0.00701822); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621288,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605088,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6193,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487371,-99) , -8, -0.231192, 1, 0, 0.514105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370795,-99) , -8, -0.852641, 0, 0, 0.497108,-99) , -9, 4.0636, 0, 0, 0.519727,-99) , -3, 0.900372, 1, 0, 0.534543,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392801,-99) , -7, 0.0845847, 1, 0, 0.506695,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279853,-99) , -10, 2064.02, 1, 0, 0.385971,-99) , -7, 0.00941227, 0, 0, 0.495348,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252581,-99) , -0, 11.5, 1, 0, 0.362875,-99) , -1, 7.5, 0, 0, 0.483242,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288626,-99) , -1, 14.5, 0, 0, 0.406024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.5445, 1, 0, 0.364091,-99) , -13, 0.0162564, 1, 0, 0.470036,-99) , -11, 1.5, 0, 0, 0.491738,-99) ); - // itree = 762 - fBoostWeights.push_back(0.00590046); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438867,-99) , -12, 0.0305869, 0, 0, 0.555735,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415542,-99) , -4, 1.47916, 0, 0, 0.456903,-99) , -8, 0.705169, 1, 0, 0.519854,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437696,-99) , -7, 0.0140079, 0, 0, 0.495162,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345433,-99) , -14, -2.86849, 1, 0, 0.420342,-99) , -4, 1.28124, 1, 0, 0.46894,-99) , -12, 0.11833, 1, 0, 0.493563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348252,-99) , -4, 1.98694, 1, 0, 0.489179,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22459,-99) , -2, 6.5, 0, 0, 0.484443,-99) ); - // itree = 763 - fBoostWeights.push_back(0.00607973); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666339,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446042,-99) , -12, 0.0326435, 0, 0, 0.562837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20675,-99) , -1, 11.5, 0, 0, 0.545813,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115826,-99) , -5, 2.46109, 1, 0, 0.480011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.04906,-99) , -0, 42.5, 1, 0, 0.473731,-99) , -2, 23.5, 0, 0, 0.493469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318438,-99) , -3, 0.999635, 1, 0, 0.488252,-99) , -12, 0.539953, 0, 0, 0.494155,-99) ); - // itree = 764 - fBoostWeights.push_back(0.00745662); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666868,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599196,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503793,-99) , -15, 0.544695, 1, 0, 0.546275,-99) , -10, -1417.32, 1, 0, 0.569598,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212782,-99) , -5, 2.46103, 1, 0, 0.512733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178335,-99) , -7, 0.0485866, 1, 0, 0.502668,-99) , -2, 24.5, 0, 0, 0.519165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289705,-99) , -7, 0.00734213, 0, 0, 0.513785,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576761,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27562,-99) , -9, -5.68019, 1, 0, 0.417083,-99) , -9, 4.76445, 0, 0, 0.473403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28292,-99) , -5, 1.79138, 1, 0, 0.433806,-99) , -3, 0.997997, 1, 0, 0.50112,-99) ); - // itree = 765 - fBoostWeights.push_back(0.00849768); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654371,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573778,-99) , -16, 85.9229, 0, 0, 0.607436,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436154,-99) , -7, 0.0178085, 1, 0, 0.533723,-99) , -2, 17.5, 0, 0, 0.569712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463383,-99) , -14, -2.37343, 1, 0, 0.546391,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368453,-99) , -1, 14.5, 0, 0, 0.452066,-99) , -9, -1.03175, 1, 0, 0.492424,-99) , -12, 0.133865, 1, 0, 0.538251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412161,-99) , -8, -0.895927, 0, 0, 0.524861,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608987,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463571,-99) , -12, 0.155531, 0, 0, 0.504018,-99) , -6, 0.492437, 1, 0, 0.548317,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386695,-99) , -9, 0.28933, 1, 0, 0.432393,-99) , -8, 0.542807, 1, 0, 0.512883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612264,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382674,-99) , -11, 0.5, 1, 0, 0.438788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215813,-99) , -13, 0.00890654, 1, 0, 0.408328,-99) , -12, 0.450164, 0, 0, 0.424706,-99) , -5, 1.42684, 1, 0, 0.46346,-99) , -16, 528.472, 1, 0, 0.487598,-99) ); - // itree = 766 - fBoostWeights.push_back(0.00608533); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591785,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506351,-99) , -5, 1.45224, 1, 0, 0.561227,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367199,-99) , -7, 0.0357863, 1, 0, 0.501569,-99) , -2, 24.5, 0, 0, 0.515251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35376,-99) , -12, 0.0188283, 0, 0, 0.510837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381797,-99) , -13, 0.0377251, 1, 0, 0.505659,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442629,-99) , -16, 926.166, 1, 0, 0.551715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184408,-99) , -13, 0.00157988, 1, 0, 0.467972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122487,-99) , -3, 0.969335, 0, 0, 0.399832,-99) , -4, 1.77229, 1, 0, 0.496581,-99) ); - // itree = 767 - fBoostWeights.push_back(0.0031947); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461606,-99) , -13, 0.0110854, 1, 0, 0.523475,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291464,-99) , -8, -0.923562, 0, 0, 0.463486,-99) , -6, 0.814462, 1, 0, 0.506172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384267,-99) , -14, -4.99013, 0, 0, 0.499951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384032,-99) , -5, 2.18189, 1, 0, 0.494376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318311,-99) , -7, 0.00734119, 0, 0, 0.489877,-99) ); - // itree = 768 - fBoostWeights.push_back(0.00812382); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.700548,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597188,-99) , -9, 0.370305, 0, 0, 0.645143,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540034,-99) , -6, 0.888619, 1, 0, 0.608098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459764,-99) , -8, -0.913515, 0, 0, 0.576721,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535049,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401827,-99) , -6, 0.417437, 1, 0, 0.451442,-99) , -5, 1.23413, 0, 0, 0.484276,-99) , -13, 0.0040748, 0, 0, 0.53327,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607158,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515872,-99) , -5, 1.87949, 0, 0, 0.551396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361733,-99) , -3, 0.998841, 1, 0, 0.53636,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497784,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379161,-99) , -0, 26.5, 1, 0, 0.475965,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201141,-99) , -8, 0.79737, 0, 0, 0.34212,-99) , -5, 1.9351, 1, 0, 0.445189,-99) , -16, 532.143, 1, 0, 0.482255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176199,-99) , -14, -1.52731, 1, 0, 0.473316,-99) , -5, 1.41154, 1, 0, 0.498092,-99) ); - // itree = 769 - fBoostWeights.push_back(0.00721814); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667691,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522758,-99) , -15, 1.61593, 1, 0, 0.611095,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572945,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498004,-99) , -5, 1.3953, 0, 0, 0.545062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385056,-99) , -14, -4.83393, 0, 0, 0.531288,-99) , -2, 28.5, 0, 0, 0.550899,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459172,-99) , -3, 0.997812, 1, 0, 0.54834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403377,-99) , -7, 0.0145871, 0, 0, 0.519496,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361509,-99) , -6, 0.739106, 1, 0, 0.545731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386401,-99) , -16, 26.8298, 1, 0, 0.41551,-99) , -15, 0.0400925, 1, 0, 0.441783,-99) , -5, 1.4259, 1, 0, 0.473824,-99) , -12, 0.100554, 1, 0, 0.502764,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31965,-99) , -7, 0.0341295, 1, 0, 0.426752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285056,-99) , -0, 14.5, 0, 0, 0.387866,-99) , -12, 0.0287663, 0, 0, 0.494619,-99) ); - // itree = 770 - fBoostWeights.push_back(0.00647645); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663531,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472606,-99) , -16, 575.312, 1, 0, 0.549095,-99) , -0, 20.5, 0, 0, 0.593229,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603174,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497726,-99) , -6, 0.22528, 1, 0, 0.544883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433179,-99) , -8, 0.951839, 1, 0, 0.522375,-99) , -4, 1.20075, 0, 0, 0.555695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407086,-99) , -8, -0.896332, 0, 0, 0.542049,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580731,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487552,-99) , -12, 0.0587985, 1, 0, 0.503263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394259,-99) , -12, 0.0329201, 0, 0, 0.493455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345859,-99) , -3, 0.797913, 0, 0, 0.486244,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0493713,-99) , -8, 0.659502, 0, 0, 0.328878,-99) , -5, 2.02876, 1, 0, 0.472328,-99) , -11, 1.5, 0, 0, 0.49573,-99) ); - // itree = 771 - fBoostWeights.push_back(0.00721955); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41495,-99) , -8, -0.971182, 0, 0, 0.534767,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369478,-99) , -13, 0.000912652, 0, 0, 0.422198,-99) , -12, 0.0312422, 0, 0, 0.525219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346727,-99) , -7, 0.00748195, 0, 0, 0.520043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0861104,-99) , -4, 1.95603, 1, 0, 0.513508,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671975,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547024,-99) , -10, 3611.76, 1, 0, 0.619043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419047,-99) , -6, 0.291924, 0, 0, 0.548373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345172,-99) , -14, -3.53642, 1, 0, 0.523858,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490814,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331818,-99) , -9, -0.766656, 1, 0, 0.384344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212563,-99) , -1, 9.5, 0, 0, 0.351938,-99) , -5, 1.31613, 1, 0, 0.392582,-99) , -5, 1.92104, 0, 0, 0.442137,-99) , -8, 0.930132, 1, 0, 0.496412,-99) ); - // itree = 772 - fBoostWeights.push_back(0.00686572); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646981,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585594,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508452,-99) , -12, 0.100103, 1, 0, 0.544697,-99) , -10, -1754.82, 1, 0, 0.565961,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395145,-99) , -8, 0.461359, 1, 0, 0.490391,-99) , -16, 1682.42, 1, 0, 0.5489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23765,-99) , -5, 2.48006, 1, 0, 0.54438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45131,-99) , -0, 11.5, 0, 0, 0.533068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394427,-99) , -1, 38.5, 1, 0, 0.521524,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507526,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377096,-99) , -10, 8303.22, 1, 0, 0.488333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26482,-99) , -5, 1.79885, 1, 0, 0.374871,-99) , -16, 1080.8, 1, 0, 0.444864,-99) , -11, 0.5, 1, 0, 0.481873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241748,-99) , -5, 2.15676, 1, 0, 0.471464,-99) , -11, 1.5, 0, 0, 0.496411,-99) ); - // itree = 773 - fBoostWeights.push_back(0.00324629); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68792,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525552,-99) , -4, 1.89041, 0, 0, 0.536932,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400493,-99) , -5, 1.95602, 1, 0, 0.482781,-99) , -16, 264.989, 1, 0, 0.500849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172232,-99) , -4, 2.20644, 1, 0, 0.498624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354751,-99) , -3, 0.754968, 0, 0, 0.493252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200882,-99) , -7, 0.25306, 1, 0, 0.490574,-99) ); - // itree = 774 - fBoostWeights.push_back(0.0050805); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380964,-99) , -1, 41.5, 1, 0, 0.503078,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112045,-99) , -2, 61.5, 0, 0, 0.394139,-99) , -7, 0.104598, 1, 0, 0.497077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306001,-99) , -12, 0.01821, 0, 0, 0.4924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.159926,-99) , -4, 2.06343, 1, 0, 0.489877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236505,-99) , -5, 2.30886, 1, 0, 0.483968,-99) ); - // itree = 775 - fBoostWeights.push_back(0.00393412); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641934,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461635,-99) , -7, 0.0268656, 1, 0, 0.496129,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231187,-99) , -0, 14.5, 1, 0, 0.431666,-99) , -7, 0.012671, 0, 0, 0.482612,-99) , -9, 11.8115, 0, 0, 0.48714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245443,-99) , -5, 2.4913, 1, 0, 0.484866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309312,-99) , -3, 0.999629, 1, 0, 0.480221,-99) ); - // itree = 776 - fBoostWeights.push_back(0.00524765); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650621,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506158,-99) , -1, 9.5, 0, 0, 0.608089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460451,-99) , -6, 0.917756, 1, 0, 0.569661,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482011,-99) , -12, 0.124192, 1, 0, 0.546862,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449288,-99) , -12, 0.441954, 0, 0, 0.45822,-99) , -16, 66.8945, 1, 0, 0.478803,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247395,-99) , -3, 0.999585, 1, 0, 0.472819,-99) , -10, 10920.4, 0, 0, 0.484357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133416,-99) , -5, 2.5698, 1, 0, 0.482671,-99) ); - // itree = 777 - fBoostWeights.push_back(0.00627885); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638702,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515794,-99) , -9, -8.05511, 1, 0, 0.524363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255348,-99) , -7, 0.175236, 1, 0, 0.521075,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564705,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285944,-99) , -8, 0.954773, 0, 0, 0.41883,-99) , -2, 31.5, 0, 0, 0.445548,-99) , -8, 0.920444, 1, 0, 0.503514,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187562,-99) , -14, -4.4325, 1, 0, 0.360816,-99) , -5, 2.15977, 1, 0, 0.495956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298848,-99) , -1, 69.5, 1, 0, 0.490066,-99) ); - // itree = 778 - fBoostWeights.push_back(0.0039783); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678088,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60954,-99) , -15, 0.0454553, 1, 0, 0.648528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495251,-99) , -1, 9.5, 0, 0, 0.609943,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49336,-99) , -10, -7992.05, 1, 0, 0.500829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342837,-99) , -13, 0.0371634, 1, 0, 0.496181,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281927,-99) , -3, 0.99963, 1, 0, 0.490602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271756,-99) , -15, 0.0347288, 0, 0, 0.485425,-99) , -12, 0.386379, 0, 0, 0.49567,-99) ); - // itree = 779 - fBoostWeights.push_back(0.00641476); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637882,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606596,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446368,-99) , -8, 0.502872, 0, 0, 0.491217,-99) , -9, -7.06467, 1, 0, 0.529894,-99) , -3, 0.983548, 1, 0, 0.57282,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629258,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526671,-99) , -15, 0.111423, 0, 0, 0.57995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413933,-99) , -9, 0.397846, 0, 0, 0.542566,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332633,-99) , -6, 0.765844, 1, 0, 0.459337,-99) , -15, 0.304133, 1, 0, 0.508672,-99) , -9, -0.783726, 1, 0, 0.536012,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452684,-99) , -13, 0.00221536, 0, 0, 0.528749,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193595,-99) , -7, 0.0854246, 1, 0, 0.460843,-99) , -5, 1.38893, 1, 0, 0.488263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31624,-99) , -7, 0.00792782, 0, 0, 0.480777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243158,-99) , -3, 0.99963, 1, 0, 0.474438,-99) , -16, 353.168, 1, 0, 0.496289,-99) ); - // itree = 780 - fBoostWeights.push_back(0.00722005); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678617,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550069,-99) , -13, 0.00704307, 0, 0, 0.565946,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27906,-99) , -5, 1.69994, 1, 0, 0.464243,-99) , -13, 0.0106992, 1, 0, 0.54843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0837344,-99) , -4, 2.15918, 1, 0, 0.543609,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48896,-99) , -1, 17.5, 0, 0, 0.569794,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416234,-99) , -13, 0.00800656, 1, 0, 0.487259,-99) , -3, 0.948897, 1, 0, 0.510773,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327156,-99) , -12, 0.0287189, 0, 0, 0.478763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259287,-99) , -13, 0.00501694, 1, 0, 0.436741,-99) , -5, 1.59982, 1, 0, 0.479978,-99) , -10, 1540.59, 1, 0, 0.503648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260154,-99) , -2, 6.5, 0, 0, 0.499202,-99) ); - // itree = 781 - fBoostWeights.push_back(0.00801709); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622389,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501294,-99) , -6, 0.885015, 1, 0, 0.590658,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6402,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441862,-99) , -4, 1.54462, 0, 0, 0.514452,-99) , -8, 0.951694, 1, 0, 0.567434,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344724,-99) , -7, 0.0290057, 1, 0, 0.498191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235691,-99) , -5, 2.27499, 1, 0, 0.489929,-99) , -2, 16.5, 0, 0, 0.519316,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433626,-99) , -3, 0.995699, 1, 0, 0.501658,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267868,-99) , -3, 0.972402, 0, 0, 0.415916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0745982,-99) , -7, 0.0599455, 1, 0, 0.336764,-99) , -5, 1.40194, 1, 0, 0.437803,-99) , -13, 0.010943, 1, 0, 0.504457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339883,-99) , -12, 0.0227642, 0, 0, 0.497756,-99) ); - // itree = 782 - fBoostWeights.push_back(0.00426977); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622871,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467805,-99) , -12, 0.129946, 1, 0, 0.52725,-99) , -15, 0.0527055, 1, 0, 0.537728,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409244,-99) , -15, 0.634562, 1, 0, 0.484431,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303104,-99) , -3, 0.778866, 0, 0, 0.476297,-99) , -11, 1.5, 0, 0, 0.496253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196743,-99) , -5, 2.4913, 1, 0, 0.49374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31514,-99) , -8, -0.98524, 0, 0, 0.487054,-99) ); - // itree = 783 - fBoostWeights.push_back(0.00743987); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636247,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466749,-99) , -15, 0.323399, 1, 0, 0.531459,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379006,-99) , -16, 446.707, 1, 0, 0.453222,-99) , -8, 0.937917, 1, 0, 0.512379,-99) , -10, 9457.1, 0, 0, 0.531044,-99) , -6, 0.0909903, 1, 0, 0.547145,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652146,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528618,-99) , -9, -0.39097, 1, 0, 0.587417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472327,-99) , -13, 0.00192185, 0, 0, 0.550609,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430041,-99) , -4, 0.903123, 0, 0, 0.470206,-99) , -6, 0.815311, 1, 0, 0.519734,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333858,-99) , -7, 0.0751246, 1, 0, 0.490322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180844,-99) , -7, 0.00711308, 0, 0, 0.479042,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345092,-99) , -4, 1.23946, 0, 0, 0.423229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200598,-99) , -4, 1.45796, 1, 0, 0.350009,-99) , -13, 0.00507073, 1, 0, 0.447893,-99) , -5, 1.39346, 1, 0, 0.477333,-99) , -11, 1.5, 0, 0, 0.500912,-99) ); - // itree = 784 - fBoostWeights.push_back(0.00496218); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.715458,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592357,-99) , -1, 14.5, 1, 0, 0.655891,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550006,-99) , -0, 13.5, 0, 0, 0.619176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434381,-99) , -6, 0.943859, 1, 0, 0.578376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63596,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537994,-99) , -5, 1.47865, 1, 0, 0.604459,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438094,-99) , -3, 0.997394, 1, 0, 0.563455,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294092,-99) , -7, 0.0637832, 1, 0, 0.485137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216096,-99) , -0, 55.5, 1, 0, 0.48018,-99) , -2, 39.5, 0, 0, 0.490283,-99) , -10, 9891, 0, 0, 0.502617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265562,-99) , -13, 0.059668, 1, 0, 0.498377,-99) ); - // itree = 785 - fBoostWeights.push_back(0.00509145); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586045,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506273,-99) , -16, 2929.9, 1, 0, 0.55076,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.64338, 1, 0, 0.442796,-99) , -8, -0.804142, 0, 0, 0.535946,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464538,-99) , -4, 1.04695, 1, 0, 0.505407,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23286,-99) , -1, 30.5, 1, 0, 0.403237,-99) , -9, 0.5439, 0, 0, 0.48493,-99) , -9, -0.321064, 1, 0, 0.509136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319377,-99) , -7, 0.00714227, 0, 0, 0.504979,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274805,-99) , -15, 4.29098, 1, 0, 0.501526,-99) ); - // itree = 786 - fBoostWeights.push_back(0.00473172); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61641,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325224,-99) , -1, 52.5, 1, 0, 0.50679,-99) , -10, -8689.43, 1, 0, 0.513336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215275,-99) , -5, 2.54966, 1, 0, 0.511482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308222,-99) , -7, 0.0068963, 0, 0, 0.507675,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456188,-99) , -3, 0.976411, 1, 0, 0.49854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257137,-99) , -5, 1.72463, 1, 0, 0.380332,-99) , -2, 22.5, 0, 0, 0.462922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0529166,-99) , -4, 2.0022, 1, 0, 0.454381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0778685,-99) , -12, 0.160057, 1, 0, 0.438859,-99) , -15, 0.63031, 1, 0, 0.494391,-99) ); - // itree = 787 - fBoostWeights.push_back(0.00468439); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657182,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560044,-99) , -2, 16.5, 0, 0, 0.606674,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474594,-99) , -6, 0.53039, 1, 0, 0.504588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146451,-99) , -7, 0.0313873, 1, 0, 0.427823,-99) , -1, 9.5, 0, 0, 0.489439,-99) , -9, 7.74912, 0, 0, 0.497558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124405,-99) , -7, 0.28174, 1, 0, 0.495285,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234301,-99) , -3, 0.999726, 1, 0, 0.490798,-99) ); - // itree = 788 - fBoostWeights.push_back(0.00562001); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683813,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563786,-99) , -2, 36.5, 0, 0, 0.584859,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366895,-99) , -0, 43.5, 1, 0, 0.513789,-99) , -16, 2328.92, 1, 0, 0.551291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390881,-99) , -12, 0.0309508, 0, 0, 0.540171,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615478,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5376,-99) , -4, 0.661186, 0, 0, 0.564848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459264,-99) , -9, 0.42024, 0, 0, 0.53898,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43194,-99) , -12, 0.114379, 1, 0, 0.483989,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421968,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219879,-99) , -1, 38.5, 1, 0, 0.402533,-99) , -10, 989.418, 1, 0, 0.447326,-99) , -4, 0.901901, 1, 0, 0.483373,-99) , -9, -0.793243, 1, 0, 0.507105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267846,-99) , -13, 0.0729551, 1, 0, 0.503823,-99) ); - // itree = 789 - fBoostWeights.push_back(0.00540907); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633866,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172138,-99) , -1, 11.5, 0, 0, 0.548215,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134883,-99) , -7, 0.0572943, 1, 0, 0.479667,-99) , -2, 28.5, 0, 0, 0.494085,-99) , -15, 0.0270581, 1, 0, 0.498777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36299,-99) , -3, 0.999522, 1, 0, 0.493103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263899,-99) , -7, 0.00714068, 0, 0, 0.488893,-99) ); - // itree = 790 - fBoostWeights.push_back(0.00470702); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224193,-99) , -7, 0.246781, 1, 0, 0.522528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477145,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155447,-99) , -7, 0.0306063, 1, 0, 0.446005,-99) , -1, 9.5, 0, 0, 0.505629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36193,-99) , -5, 0.481968, 0, 0, 0.499237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293471,-99) , -8, 0.999682, 1, 0, 0.49498,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222254,-99) , -5, 2.46103, 1, 0, 0.492184,-99) ); - // itree = 791 - fBoostWeights.push_back(0.00549238); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61473,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313741,-99) , -4, 1.7645, 1, 0, 0.499994,-99) , -10, 13106.2, 1, 0, 0.561364,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483629,-99) , -2, 36.5, 0, 0, 0.492271,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180441,-99) , -4, 1.16798, 1, 0, 0.374476,-99) , -0, 70.5, 1, 0, 0.483717,-99) , -10, 9566.68, 0, 0, 0.494063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259791,-99) , -7, 0.00699586, 0, 0, 0.490004,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324937,-99) , -9, 3.6971, 0, 0, 0.392252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0307414,-99) , -0, 85.5, 1, 0, 0.363327,-99) , -3, 0.999148, 1, 0, 0.480782,-99) ); - // itree = 792 - fBoostWeights.push_back(0.00673455); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364783,-99) , -5, 2.25394, 1, 0, 0.57521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440137,-99) , -8, -0.94938, 0, 0, 0.562248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40547,-99) , -8, 0.990312, 1, 0, 0.545142,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3805,-99) , -3, 0.879346, 0, 0, 0.490388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0733557,-99) , -7, 0.0236485, 1, 0, 0.381918,-99) , -1, 8.5, 0, 0, 0.474995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.104981,-99) , -15, 0.988612, 1, 0, 0.470704,-99) , -12, 0.127516, 1, 0, 0.505377,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501935,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306451,-99) , -14, -3.59758, 0, 0, 0.436749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262368,-99) , -6, 0.908911, 1, 0, 0.396695,-99) , -12, 0.0327201, 0, 0, 0.495416,-99) ); - // itree = 793 - fBoostWeights.push_back(0.00532639); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417171,-99) , -3, 0.999142, 1, 0, 0.546443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405659,-99) , -15, 1.82767, 1, 0, 0.533261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327369,-99) , -7, 0.0285173, 1, 0, 0.480173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178912,-99) , -0, 24.5, 1, 0, 0.470395,-99) , -2, 16.5, 0, 0, 0.495678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306532,-99) , -1, 66.5, 1, 0, 0.491759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258577,-99) , -7, 0.170523, 1, 0, 0.486691,-99) ); - // itree = 794 - fBoostWeights.push_back(0.00881543); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598314,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520493,-99) , -2, 13.5, 0, 0, 0.560889,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336222,-99) , -13, 0.00203773, 0, 0, 0.461278,-99) , -15, 0.744026, 1, 0, 0.538361,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330835,-99) , -7, 0.0774338, 1, 0, 0.488611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28514,-99) , -7, 0.00931131, 0, 0, 0.472484,-99) , -12, 0.182562, 1, 0, 0.515986,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538937,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332814,-99) , -7, 0.0217502, 0, 0, 0.449213,-99) , -7, 0.0125041, 1, 0, 0.477121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361509,-99) , -10, 864.981, 0, 0, 0.44478,-99) , -14, -3.73336, 0, 0, 0.504111,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603359,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218098,-99) , -15, 0.117692, 0, 0, 0.356546,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125217,-99) , -5, 2.44703, 1, 0, 0.330985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0304931,-99) , -8, -0.568527, 0, 0, 0.293079,-99) , -8, 0.995514, 0, 0, 0.38751,-99) , -5, 2.03214, 1, 0, 0.493131,-99) ); - // itree = 795 - fBoostWeights.push_back(0.00624773); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624257,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526537,-99) , -10, -222.812, 1, 0, 0.55337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182661,-99) , -7, 0.25306, 1, 0, 0.546688,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333497,-99) , -12, 0.0235074, 0, 0, 0.5342,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348222,-99) , -14, -5.20428, 0, 0, 0.490855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116317,-99) , -4, 2.17915, 1, 0, 0.48818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21764,-99) , -7, 0.0330571, 1, 0, 0.474073,-99) , -2, 16.5, 0, 0, 0.500565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255027,-99) , -3, 0.999718, 1, 0, 0.496392,-99) ); - // itree = 796 - fBoostWeights.push_back(0.00429715); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.706224,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505086,-99) , -5, 1.95019, 0, 0, 0.601771,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373823,-99) , -5, 0.558611, 0, 0, 0.501238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280098,-99) , -5, 2.21127, 1, 0, 0.494051,-99) , -8, 0.998217, 0, 0, 0.501913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30136,-99) , -1, 5.5, 0, 0, 0.497919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278987,-99) , -12, 0.0171171, 0, 0, 0.493268,-99) ); - // itree = 797 - fBoostWeights.push_back(0.00369235); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645253,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3768,-99) , -12, 0.0191507, 0, 0, 0.520643,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235703,-99) , -7, 0.0267919, 1, 0, 0.458667,-99) , -2, 11.5, 0, 0, 0.499791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251677,-99) , -13, 0.0591743, 1, 0, 0.496187,-99) , -12, 0.510577, 0, 0, 0.501698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271117,-99) , -3, 0.999733, 1, 0, 0.49798,-99) ); - // itree = 798 - fBoostWeights.push_back(0.00810791); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692894,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568054,-99) , -16, 421.752, 0, 0, 0.658952,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476365,-99) , -13, 0.000776343, 0, 0, 0.547961,-99) , -4, 1.60629, 0, 0, 0.577689,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421203,-99) , -2, 13.5, 0, 0, 0.489042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181629,-99) , -4, 1.64422, 1, 0, 0.467753,-99) , -8, -0.477383, 0, 0, 0.553115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303288,-99) , -7, 0.127656, 1, 0, 0.543548,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543046,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232651,-99) , -5, 2.12189, 1, 0, 0.531501,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395505,-99) , -16, 215.765, 1, 0, 0.444551,-99) , -8, 0.935824, 1, 0, 0.509332,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308897,-99) , -7, 0.105686, 1, 0, 0.467224,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262698,-99) , -6, 0.996465, 0, 0, 0.35118,-99) , -10, 2353.55, 1, 0, 0.434165,-99) , -6, 0.648708, 1, 0, 0.481633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149307,-99) , -5, 2.44828, 1, 0, 0.478033,-99) , -9, -1.27138, 1, 0, 0.502773,-99) ); - // itree = 799 - fBoostWeights.push_back(0.00547183); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612526,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53443,-99) , -9, -0.399706, 1, 0, 0.567899,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60863,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482434,-99) , -10, 10993.3, 0, 0, 0.512408,-99) , -3, 0.991118, 1, 0, 0.543712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593821,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533001,-99) , -3, 0.989711, 1, 0, 0.565816,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0797621,-99) , -7, 0.208925, 1, 0, 0.447351,-99) , -5, 1.0552, 1, 0, 0.469881,-99) , -12, 0.111167, 1, 0, 0.500963,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340718,-99) , -8, 0.133033, 1, 0, 0.399632,-99) , -12, 0.0295419, 0, 0, 0.492911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275544,-99) , -7, 0.00794581, 0, 0, 0.485857,-99) ); - // itree = 800 - fBoostWeights.push_back(0.00446943); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646995,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469784,-99) , -14, -2.08844, 1, 0, 0.531384,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245667,-99) , -7, 0.02662, 1, 0, 0.468533,-99) , -2, 13.5, 0, 0, 0.50306,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310236,-99) , -13, 0.0375667, 1, 0, 0.497646,-99) , -12, 0.519027, 0, 0, 0.502662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268329,-99) , -4, 2.07722, 1, 0, 0.498825,-99) ); - // itree = 801 - fBoostWeights.push_back(0.00521558); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623152,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424395,-99) , -7, 0.165442, 1, 0, 0.606017,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433803,-99) , -12, 0.0371065, 0, 0, 0.577676,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242639,-99) , -7, 0.0594608, 1, 0, 0.511061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.135366,-99) , -0, 44.5, 1, 0, 0.505114,-99) , -2, 29.5, 0, 0, 0.517636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0948346,-99) , -7, 0.323268, 1, 0, 0.515995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347572,-99) , -5, 0.440895, 0, 0, 0.509252,-99) ); - // itree = 802 - fBoostWeights.push_back(0.00298953); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647617,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561476,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495603,-99) , -16, 64.7267, 1, 0, 0.510401,-99) , -12, 0.507657, 0, 0, 0.515683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325447,-99) , -2, 6.5, 0, 0, 0.51176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322191,-99) , -3, 0.999685, 1, 0, 0.507855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288761,-99) , -1, 77.5, 1, 0, 0.503298,-99) ); - // itree = 803 - fBoostWeights.push_back(0.00774468); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.740496,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566957,-99) , -4, 1.73237, 0, 0, 0.591419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410072,-99) , -1, 67.5, 1, 0, 0.572131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200346,-99) , -1, 11.5, 0, 0, 0.552999,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478582,-99) , -9, -0.756244, 1, 0, 0.505016,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257754,-99) , -13, 0.000291924, 1, 0, 0.392038,-99) , -5, 2.06304, 1, 0, 0.494336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210847,-99) , -7, 0.0418889, 1, 0, 0.481153,-99) , -2, 25.5, 0, 0, 0.498132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337286,-99) , -5, 0.482133, 0, 0, 0.491246,-99) ); - // itree = 804 - fBoostWeights.push_back(0.00460229); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651383,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475104,-99) , -14, -2.75806, 0, 0, 0.527812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37941,-99) , -5, 0.429213, 0, 0, 0.516588,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434676,-99) , -16, 471.406, 1, 0, 0.468093,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0710036,-99) , -13, 0.0268506, 1, 0, 0.458932,-99) , -5, 1.59952, 1, 0, 0.492899,-99) , -12, 0.524926, 0, 0, 0.497836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161988,-99) , -5, 2.56393, 1, 0, 0.496183,-99) ); - // itree = 805 - fBoostWeights.push_back(0.00535402); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608137,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514888,-99) , -6, 0.657207, 1, 0, 0.568674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43918,-99) , -8, 0.988196, 1, 0, 0.555004,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409041,-99) , -8, -0.791662, 0, 0, 0.525719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413083,-99) , -4, 0.678181, 1, 0, 0.448413,-99) , -9, -0.880332, 1, 0, 0.489296,-99) , -9, 2.9113, 0, 0, 0.504989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295238,-99) , -3, 0.999686, 1, 0, 0.500245,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208337,-99) , -5, 1.74922, 1, 0, 0.369555,-99) , -12, 0.0246262, 0, 0, 0.493217,-99) ); - // itree = 806 - fBoostWeights.push_back(0.00514638); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622263,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485961,-99) , -4, 0.619335, 1, 0, 0.503908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308882,-99) , -12, 0.01821, 0, 0, 0.497393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26659,-99) , -13, 0.0582668, 1, 0, 0.492683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396301,-99) , -9, -0.33165, 1, 0, 0.459206,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352283,-99) , -10, 2607.74, 1, 0, 0.396639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285473,-99) , -5, 1.86149, 1, 0, 0.371666,-99) , -16, 357.151, 1, 0, 0.3987,-99) , -15, 0.0908036, 0, 0, 0.470627,-99) , -12, 0.525198, 0, 0, 0.476244,-99) ); - // itree = 807 - fBoostWeights.push_back(0.00563273); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363124,-99) , -4, 1.6547, 1, 0, 0.616746,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649591,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281128,-99) , -3, 0.999587, 1, 0, 0.507669,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0755636,-99) , -7, 0.0313585, 1, 0, 0.447096,-99) , -2, 12.5, 0, 0, 0.484508,-99) , -12, 0.525198, 0, 0, 0.490082,-99) , -10, -8715.48, 1, 0, 0.4975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0623059,-99) , -7, 0.291384, 1, 0, 0.495304,-99) ); - // itree = 808 - fBoostWeights.push_back(0.00675924); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661267,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538786,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372248,-99) , -8, -0.984048, 0, 0, 0.529968,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420062,-99) , -7, 0.0103428, 1, 0, 0.447517,-99) , -14, -3.55354, 0, 0, 0.514846,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396173,-99) , -8, 0.995454, 0, 0, 0.464806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14401,-99) , -14, -2.51393, 1, 0, 0.410611,-99) , -5, 1.95616, 1, 0, 0.501001,-99) , -12, 0.525387, 0, 0, 0.506824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.202748,-99) , -3, 0.999712, 1, 0, 0.502163,-99) ); - // itree = 809 - fBoostWeights.push_back(0.00772484); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634486,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59167,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456082,-99) , -3, 0.985602, 0, 0, 0.496732,-99) , -10, 1354.13, 1, 0, 0.527944,-99) , -6, 0.434834, 1, 0, 0.567776,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419191,-99) , -8, 0.952655, 0, 0, 0.465062,-99) , -13, 0.00206929, 0, 0, 0.535093,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6401,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539208,-99) , -10, -2667.82, 1, 0, 0.555383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418043,-99) , -15, 1.23438, 1, 0, 0.534569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369116,-99) , -14, -4.50598, 0, 0, 0.509033,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635549,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536851,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404142,-99) , -16, 36.0665, 1, 0, 0.430081,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24389,-99) , -13, 0.0159005, 1, 0, 0.410322,-99) , -12, 0.512598, 0, 0, 0.428602,-99) , -12, 0.113631, 1, 0, 0.465655,-99) , -5, 1.32312, 1, 0, 0.490122,-99) ); - // itree = 810 - fBoostWeights.push_back(0.00531647); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407181,-99) , -8, 0.989965, 1, 0, 0.56405,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457432,-99) , -4, 0.938167, 1, 0, 0.494902,-99) , -12, 0.11369, 1, 0, 0.523373,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376953,-99) , -16, 1018.2, 1, 0, 0.461769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275572,-99) , -6, 0.804996, 1, 0, 0.412956,-99) , -12, 0.0314081, 0, 0, 0.513799,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301102,-99) , -2, 6.5, 0, 0, 0.509837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368039,-99) , -5, 0.538452, 0, 0, 0.503105,-99) ); - // itree = 811 - fBoostWeights.push_back(0.00475484); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.762838,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547761,-99) , -5, 2.00185, 0, 0, 0.613407,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434216,-99) , -12, 0.0312838, 0, 0, 0.522004,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176999,-99) , -5, 1.75943, 1, 0, 0.419746,-99) , -8, -0.946424, 0, 0, 0.51398,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530085,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38226,-99) , -0, 10.5, 1, 0, 0.431379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0865098,-99) , -5, 2.15323, 1, 0, 0.412454,-99) , -15, 0.0552986, 0, 0, 0.503689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342851,-99) , -13, 0.0302885, 1, 0, 0.497798,-99) , -12, 0.414272, 0, 0, 0.505167,-99) ); - // itree = 812 - fBoostWeights.push_back(0.00590451); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458876,-99) , -13, 0.00283876, 0, 0, 0.590276,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490592,-99) , -16, 26.2263, 1, 0, 0.509688,-99) , -2, 24.5, 0, 0, 0.531419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404606,-99) , -5, 0.53974, 0, 0, 0.520323,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468967,-99) , -1, 11.5, 1, 0, 0.497708,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219596,-99) , -5, 2.11129, 1, 0, 0.407396,-99) , -1, 9.5, 0, 0, 0.476055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269598,-99) , -7, 0.0691571, 1, 0, 0.465171,-99) , -5, 1.53097, 1, 0, 0.493976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281932,-99) , -7, 0.177686, 1, 0, 0.489922,-99) ); - // itree = 813 - fBoostWeights.push_back(0.00602765); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409774,-99) , -8, -0.983803, 0, 0, 0.542698,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36337,-99) , -7, 0.0353162, 0, 0, 0.434697,-99) , -8, 0.979861, 1, 0, 0.528143,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402442,-99) , -8, 0.674941, 1, 0, 0.488176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323761,-99) , -14, -1.97699, 1, 0, 0.441894,-99) , -3, 0.997865, 1, 0, 0.513037,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469512,-99) , -2, 9.5, 1, 0, 0.531796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279045,-99) , -5, 1.94543, 1, 0, 0.430754,-99) , -9, 0.160532, 0, 0, 0.48141,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459874,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324957,-99) , -9, -1.09294, 1, 0, 0.382102,-99) , -6, 0.796386, 1, 0, 0.459249,-99) , -7, 0.0147955, 0, 0, 0.497521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31709,-99) , -4, 1.99653, 1, 0, 0.492722,-99) ); - // itree = 814 - fBoostWeights.push_back(0.0048433); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658233,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526833,-99) , -7, 0.0133452, 0, 0, 0.588826,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472853,-99) , -6, 0.575461, 1, 0, 0.502601,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293877,-99) , -5, 1.26143, 1, 0, 0.412882,-99) , -13, 0.0167546, 1, 0, 0.492687,-99) , -15, 0.0450477, 1, 0, 0.500556,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281528,-99) , -15, 0.0577797, 0, 0, 0.377016,-99) , -7, 0.00931116, 0, 0, 0.491448,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242572,-99) , -3, 0.999723, 1, 0, 0.487378,-99) ); - // itree = 815 - fBoostWeights.push_back(0.00646242); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64403,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467898,-99) , -8, -0.586452, 0, 0, 0.565945,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421828,-99) , -15, 0.815208, 1, 0, 0.488507,-99) , -4, 0.619902, 1, 0, 0.510562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361654,-99) , -5, 0.512545, 0, 0, 0.499668,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462664,-99) , -15, 0.391882, 1, 0, 0.511653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368985,-99) , -10, 3351.46, 1, 0, 0.434708,-99) , -15, 0.20608, 0, 0, 0.468903,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455114,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232114,-99) , -9, 2.39658, 0, 0, 0.297442,-99) , -13, 0.00573512, 1, 0, 0.440755,-99) , -5, 1.6492, 1, 0, 0.477572,-99) , -12, 0.509679, 0, 0, 0.483436,-99) ); - // itree = 816 - fBoostWeights.push_back(0.00649991); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258486,-99) , -5, 2.23193, 1, 0, 0.576235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455091,-99) , -8, 0.981481, 1, 0, 0.557379,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527223,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358457,-99) , -2, 35.5, 0, 0, 0.441795,-99) , -15, 0.531066, 1, 0, 0.487354,-99) , -6, 0.838906, 1, 0, 0.537667,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633817,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521661,-99) , -10, 10477.9, 1, 0, 0.559419,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497012,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408201,-99) , -5, 1.40266, 1, 0, 0.442953,-99) , -10, 8506.03, 0, 0, 0.464002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182185,-99) , -7, 0.152873, 1, 0, 0.457553,-99) , -12, 0.110613, 1, 0, 0.494059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27298,-99) , -12, 0.0181941, 0, 0, 0.488599,-99) ); - // itree = 817 - fBoostWeights.push_back(0.00535508); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596734,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525535,-99) , -10, 1563.52, 1, 0, 0.552683,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276059,-99) , -3, 0.789268, 0, 0, 0.479289,-99) , -12, 0.112226, 1, 0, 0.511042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325634,-99) , -8, 0.472075, 1, 0, 0.40387,-99) , -12, 0.0289881, 0, 0, 0.502738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156872,-99) , -13, 0.0730075, 1, 0, 0.498574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218983,-99) , -2, 6.5, 0, 0, 0.49354,-99) ); - // itree = 818 - fBoostWeights.push_back(0.00333784); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699084,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518366,-99) , -1, 10.5, 0, 0, 0.613611,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649791,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480762,-99) , -4, 0.719802, 1, 0, 0.497813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300117,-99) , -3, 0.999662, 1, 0, 0.493931,-99) , -12, 0.513631, 0, 0, 0.499755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192346,-99) , -4, 2.14443, 1, 0, 0.497192,-99) , -10, -8432.04, 1, 0, 0.504726,-99) ); - // itree = 819 - fBoostWeights.push_back(0.0095152); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610045,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520218,-99) , -8, -0.676795, 0, 0, 0.584072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275395,-99) , -5, 2.20671, 1, 0, 0.576627,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451083,-99) , -3, 0.98176, 0, 0, 0.517434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38311,-99) , -15, 1.9938, 1, 0, 0.498609,-99) , -6, 0.773257, 1, 0, 0.550066,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410403,-99) , -12, 0.046516, 0, 0, 0.507516,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315528,-99) , -4, 1.19711, 0, 0, 0.432307,-99) , -14, -3.96111, 0, 0, 0.526462,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617863,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53422,-99) , -10, 1904.22, 1, 0, 0.568486,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43065,-99) , -1, 9.5, 1, 0, 0.467421,-99) , -2, 12.5, 0, 0, 0.523986,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37654,-99) , -3, 0.98971, 1, 0, 0.442757,-99) , -13, 0.0141443, 1, 0, 0.502991,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60109,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447352,-99) , -12, 0.336159, 0, 0, 0.482277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.173523,-99) , -7, 0.0775925, 1, 0, 0.465497,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183676,-99) , -8, 0.993399, 0, 0, 0.308553,-99) , -5, 1.9354, 1, 0, 0.418971,-99) , -4, 1.23913, 1, 0, 0.470109,-99) , -12, 0.113524, 1, 0, 0.496833,-99) ); - // itree = 820 - fBoostWeights.push_back(0.00526413); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607413,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612211,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342405,-99) , -4, 1.71392, 1, 0, 0.494404,-99) , -8, 0.999219, 0, 0, 0.503318,-99) , -5, 0.993786, 1, 0, 0.514532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37175,-99) , -8, -0.981676, 0, 0, 0.507563,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402458,-99) , -12, 0.182167, 1, 0, 0.477801,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328058,-99) , -12, 0.0330248, 0, 0, 0.462128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0914177,-99) , -5, 2.20841, 1, 0, 0.455442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302501,-99) , -3, 0.929428, 0, 0, 0.438404,-99) , -6, 0.765827, 1, 0, 0.486587,-99) ); - // itree = 821 - fBoostWeights.push_back(0.00550536); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630088,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427275,-99) , -13, 0.00167023, 1, 0, 0.621843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456886,-99) , -3, 0.97228, 0, 0, 0.572387,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554541,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422282,-99) , -15, 0.363275, 1, 0, 0.45638,-99) , -12, 0.144555, 0, 0, 0.49461,-99) , -5, 1.77905, 0, 0, 0.51853,-99) , -6, 0.0977041, 1, 0, 0.535162,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324462,-99) , -8, -0.989113, 0, 0, 0.490396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238321,-99) , -3, 0.99965, 1, 0, 0.484764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26522,-99) , -3, 0.745431, 0, 0, 0.478623,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170883,-99) , -5, 2.33316, 1, 0, 0.474,-99) , -11, 1.5, 0, 0, 0.494563,-99) ); - // itree = 822 - fBoostWeights.push_back(0.00782913); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497339,-99) , -13, 0.000283785, 0, 0, 0.554922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433452,-99) , -5, 2.12981, 1, 0, 0.546041,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472263,-99) , -7, 0.0217963, 0, 0, 0.493457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309696,-99) , -3, 0.90677, 0, 0, 0.472991,-99) , -6, 0.671659, 1, 0, 0.522863,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467309,-99) , -5, 1.45038, 1, 0, 0.523891,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152072,-99) , -13, 0.0201062, 1, 0, 0.372811,-99) , -3, 0.997868, 1, 0, 0.494791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174427,-99) , -2, 14.5, 0, 0, 0.464258,-99) , -7, 0.0275955, 1, 0, 0.501755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325543,-99) , -4, 1.97324, 1, 0, 0.496235,-99) ); - // itree = 823 - fBoostWeights.push_back(0.00571401); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643164,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474347,-99) , -3, 0.924235, 0, 0, 0.55165,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374209,-99) , -7, 0.0181097, 0, 0, 0.469228,-99) , -3, 0.990975, 1, 0, 0.520104,-99) , -10, 11442.9, 0, 0, 0.536215,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563907,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466601,-99) , -9, 3.16648, 0, 0, 0.488685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307751,-99) , -5, 2.15471, 1, 0, 0.479187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203931,-99) , -7, 0.145611, 1, 0, 0.472359,-99) , -12, 0.101366, 1, 0, 0.498522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291889,-99) , -12, 0.0181941, 0, 0, 0.493303,-99) ); - // itree = 824 - fBoostWeights.push_back(0.00603437); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65118,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56299,-99) , -12, 0.0894369, 0, 0, 0.576539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464855,-99) , -14, -4.54892, 0, 0, 0.563696,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360884,-99) , -8, 0.298269, 1, 0, 0.414458,-99) , -12, 0.0312838, 0, 0, 0.532975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619935,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15404,-99) , -7, 0.0778956, 1, 0, 0.465082,-99) , -2, 39.5, 0, 0, 0.479732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169476,-99) , -7, 0.162653, 1, 0, 0.473964,-99) , -12, 0.101426, 1, 0, 0.499336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277851,-99) , -7, 0.00714456, 0, 0, 0.494715,-99) ); - // itree = 825 - fBoostWeights.push_back(0.00406476); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656177,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395487,-99) , -1, 9.5, 0, 0, 0.54953,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477622,-99) , -10, -13246.7, 1, 0, 0.483019,-99) , -6, 0.159704, 1, 0, 0.497583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182172,-99) , -13, 0.0694026, 1, 0, 0.494013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223215,-99) , -5, 2.40728, 1, 0, 0.490365,-99) , -12, 0.510577, 0, 0, 0.496614,-99) ); - // itree = 826 - fBoostWeights.push_back(0.00411441); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663331,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621891,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510942,-99) , -3, 0.907962, 1, 0, 0.535089,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465577,-99) , -8, 0.997419, 0, 0, 0.475569,-99) , -6, 0.253876, 1, 0, 0.494768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261277,-99) , -7, 0.00706943, 0, 0, 0.490479,-99) , -12, 0.509824, 0, 0, 0.496685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276799,-99) , -7, 0.170561, 1, 0, 0.491819,-99) ); - // itree = 827 - fBoostWeights.push_back(0.00574404); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658027,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53318,-99) , -3, 0.979091, 1, 0, 0.590086,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339879,-99) , -3, 0.755233, 0, 0, 0.510231,-99) , -4, 0.394719, 1, 0, 0.522493,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251903,-99) , -15, 0.393574, 1, 0, 0.399192,-99) , -14, -4.60496, 0, 0, 0.512317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359307,-99) , -5, 0.484037, 0, 0, 0.505563,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242388,-99) , -8, 0.94025, 0, 0, 0.393977,-99) , -4, 1.74931, 1, 0, 0.495534,-99) ); - // itree = 828 - fBoostWeights.push_back(0.00510404); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65051,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588703,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504933,-99) , -15, 0.195104, 1, 0, 0.531199,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392286,-99) , -12, 0.213178, 0, 0, 0.447258,-99) , -7, 0.0171919, 0, 0, 0.519976,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453683,-99) , -11, 0.5, 1, 0, 0.482776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13787,-99) , -7, 0.0270878, 1, 0, 0.465766,-99) , -2, 12.5, 0, 0, 0.498584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363386,-99) , -3, 0.999379, 1, 0, 0.492605,-99) , -10, -15196.3, 1, 0, 0.497377,-99) ); - // itree = 829 - fBoostWeights.push_back(0.00485312); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665284,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423888,-99) , -7, 0.0127211, 0, 0, 0.513714,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162164,-99) , -7, 0.022632, 1, 0, 0.448261,-99) , -2, 10.5, 0, 0, 0.497436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339655,-99) , -3, 0.999497, 1, 0, 0.49109,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226239,-99) , -5, 2.33304, 1, 0, 0.485752,-99) , -12, 0.544852, 0, 0, 0.491789,-99) ); - // itree = 830 - fBoostWeights.push_back(0.00568519); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653831,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651087,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566355,-99) , -3, 0.9685, 1, 0, 0.599197,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489333,-99) , -9, 4.42108, 0, 0, 0.507431,-99) , -6, 0.141805, 1, 0, 0.526337,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0571167,-99) , -5, 2.40256, 1, 0, 0.475876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0784789,-99) , -7, 0.0359864, 1, 0, 0.464746,-99) , -2, 14.5, 0, 0, 0.496918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133359,-99) , -13, 0.0970076, 1, 0, 0.494438,-99) , -12, 0.537642, 0, 0, 0.499779,-99) ); - // itree = 831 - fBoostWeights.push_back(0.00541721); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434948,-99) , -15, 0.120324, 0, 0, 0.53418,-99) , -12, 0.236014, 0, 0, 0.550327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447792,-99) , -8, -0.823144, 0, 0, 0.535329,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646258,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507921,-99) , -10, 10905.8, 0, 0, 0.523812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322775,-99) , -1, 8.5, 0, 0, 0.51437,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425256,-99) , -7, 0.0148146, 0, 0, 0.459718,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271359,-99) , -7, 0.022405, 1, 0, 0.439412,-99) , -2, 13.5, 0, 0, 0.480382,-99) , -16, 285.374, 1, 0, 0.499116,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291794,-99) , -3, 0.999633, 1, 0, 0.493967,-99) ); - // itree = 832 - fBoostWeights.push_back(0.00706624); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.702041,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625344,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359647,-99) , -8, -0.635851, 0, 0, 0.505772,-99) , -10, 9646.05, 0, 0, 0.543368,-99) , -3, 0.911294, 1, 0, 0.570665,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642347,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543696,-99) , -9, 4.53547, 0, 0, 0.597244,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45564,-99) , -13, 0.000604123, 0, 0, 0.554472,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554094,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195445,-99) , -4, 1.3888, 1, 0, 0.375398,-99) , -11, 1.5, 0, 0, 0.444213,-99) , -9, 2.50521, 0, 0, 0.492735,-99) , -9, -0.321847, 1, 0, 0.528998,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575903,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440461,-99) , -9, -1.39243, 1, 0, 0.471044,-99) , -9, 7.88218, 0, 0, 0.480974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354457,-99) , -3, 0.862543, 0, 0, 0.472329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28472,-99) , -5, 2.11128, 1, 0, 0.464526,-99) , -6, 0.438409, 1, 0, 0.494969,-99) ); - // itree = 833 - fBoostWeights.push_back(0.00591414); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465367,-99) , -14, -3.86979, 0, 0, 0.52985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43179,-99) , -12, 0.0265438, 0, 0, 0.5232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329906,-99) , -3, 0.999663, 1, 0, 0.517934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36193,-99) , -2, 7.5, 0, 0, 0.511618,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427345,-99) , -5, 2.20142, 0, 0, 0.545888,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567065,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207371,-99) , -5, 2.01952, 1, 0, 0.251735,-99) , -12, 0.410337, 0, 0, 0.299385,-99) , -14, -3.79864, 1, 0, 0.417473,-99) , -5, 1.97958, 1, 0, 0.500036,-99) ); - // itree = 834 - fBoostWeights.push_back(0.00465957); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480747,-99) , -7, 0.0181379, 1, 0, 0.598262,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526578,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386194,-99) , -5, 2.1206, 1, 0, 0.517312,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38594,-99) , -11, 0.5, 1, 0, 0.458189,-99) , -16, 3573.92, 1, 0, 0.490486,-99) , -12, 0.387255, 0, 0, 0.498657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280202,-99) , -2, 6.5, 0, 0, 0.494367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193202,-99) , -13, 0.0727869, 1, 0, 0.490679,-99) ); - // itree = 835 - fBoostWeights.push_back(0.00485139); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643124,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544041,-99) , -4, 0.389856, 1, 0, 0.592436,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477311,-99) , -8, -0.78296, 0, 0, 0.544285,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4335,-99) , -1, 28.5, 1, 0, 0.521629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415749,-99) , -8, 0.855437, 1, 0, 0.49834,-99) , -3, 0.951857, 1, 0, 0.523824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427624,-99) , -6, 0.465413, 0, 0, 0.473128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233996,-99) , -7, 0.00711413, 0, 0, 0.468117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17823,-99) , -5, 2.49363, 1, 0, 0.464647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267552,-99) , -7, 0.12494, 1, 0, 0.458478,-99) , -4, 0.903355, 1, 0, 0.483478,-99) ); - // itree = 836 - fBoostWeights.push_back(0.00514339); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485197,-99) , -5, 1.6519, 1, 0, 0.518953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313777,-99) , -2, 6.5, 0, 0, 0.514835,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367405,-99) , -4, 1.00616, 1, 0, 0.44538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127939,-99) , -5, 1.78861, 1, 0, 0.40958,-99) , -8, -0.895843, 0, 0, 0.503528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283857,-99) , -3, 0.999624, 1, 0, 0.497805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.179435,-99) , -4, 2.06952, 1, 0, 0.492938,-99) ); - // itree = 837 - fBoostWeights.push_back(0.0056783); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643759,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55211,-99) , -12, 0.0850148, 0, 0, 0.572439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464745,-99) , -13, 0.00760356, 1, 0, 0.556683,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396367,-99) , -12, 0.0395716, 1, 0, 0.468255,-99) , -14, -4.19302, 0, 0, 0.541757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320535,-99) , -12, 0.0175239, 0, 0, 0.531712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502563,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412924,-99) , -7, 0.0132644, 0, 0, 0.477104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255813,-99) , -7, 0.0599687, 1, 0, 0.467822,-99) , -2, 41.5, 0, 0, 0.479053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241873,-99) , -7, 0.15164, 1, 0, 0.472912,-99) , -12, 0.111146, 1, 0, 0.500123,-99) ); - // itree = 838 - fBoostWeights.push_back(0.00622028); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660817,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523641,-99) , -16, 1970.06, 1, 0, 0.598546,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392126,-99) , -1, 24.5, 1, 0, 0.521308,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217774,-99) , -2, 19.5, 0, 0, 0.425948,-99) , -7, 0.0394111, 1, 0, 0.513051,-99) , -2, 30.5, 0, 0, 0.522244,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521294,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283405,-99) , -14, -3.42302, 0, 0, 0.425039,-99) , -12, 0.0305522, 0, 0, 0.515123,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527047,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320425,-99) , -5, 1.49167, 1, 0, 0.471354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114144,-99) , -1, 17.5, 0, 0, 0.411741,-99) , -7, 0.0845138, 1, 0, 0.506551,-99) ); - // itree = 839 - fBoostWeights.push_back(0.0040056); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675284,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560799,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46589,-99) , -6, 0.888961, 1, 0, 0.539655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440419,-99) , -16, 3.59293, 0, 0, 0.522001,-99) , -4, 1.95536, 0, 0, 0.531228,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371528,-99) , -13, 0.0142053, 1, 0, 0.548659,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239109,-99) , -7, 0.00746759, 0, 0, 0.465241,-99) , -9, 4.29354, 0, 0, 0.480189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140054,-99) , -5, 2.4913, 1, 0, 0.477768,-99) , -16, 204.935, 1, 0, 0.49448,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37002,-99) , -3, 0.791603, 0, 0, 0.488554,-99) ); - // itree = 840 - fBoostWeights.push_back(0.00317321); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656298,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353115,-99) , -8, -0.995065, 0, 0, 0.508908,-99) , -10, -14843.3, 1, 0, 0.513314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224633,-99) , -7, 0.180329, 1, 0, 0.510049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263116,-99) , -15, 4.10015, 1, 0, 0.50619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270732,-99) , -2, 6.5, 0, 0, 0.501785,-99) ); - // itree = 841 - fBoostWeights.push_back(0.00686951); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621623,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516155,-99) , -12, 0.0391668, 0, 0, 0.598412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237955,-99) , -5, 2.05523, 1, 0, 0.587936,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383785,-99) , -15, 0.592659, 0, 0, 0.448482,-99) , -5, 1.95311, 0, 0, 0.486898,-99) , -13, 0.000529784, 0, 0, 0.551008,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533668,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390012,-99) , -10, 4355.29, 0, 0, 0.466443,-99) , -9, 3.0191, 0, 0, 0.495092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378291,-99) , -15, 0.196173, 1, 0, 0.470806,-99) , -12, 0.127494, 1, 0, 0.515546,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474666,-99) , -1, 10.5, 1, 0, 0.491012,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294259,-99) , -5, 1.7348, 1, 0, 0.417452,-99) , -1, 9.5, 0, 0, 0.474837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34183,-99) , -7, 0.0934429, 1, 0, 0.468382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332381,-99) , -4, 1.68175, 1, 0, 0.453963,-99) , -16, 2484.28, 1, 0, 0.486323,-99) ); - // itree = 842 - fBoostWeights.push_back(0.00376773); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683445,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556282,-99) , -13, 0.00426009, 0, 0, 0.612045,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31726,-99) , -14, -5.57422, 0, 0, 0.495586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364612,-99) , -5, 2.15355, 1, 0, 0.488702,-99) , -10, -8174.64, 1, 0, 0.496285,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293772,-99) , -3, 0.999636, 1, 0, 0.491176,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279976,-99) , -12, 0.018167, 0, 0, 0.486284,-99) ); - // itree = 843 - fBoostWeights.push_back(0.00434715); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624988,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398735,-99) , -8, 0.991423, 1, 0, 0.520605,-99) , -0, 38.5, 0, 0, 0.541918,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413582,-99) , -6, 0.991296, 1, 0, 0.485508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27606,-99) , -5, 2.15978, 1, 0, 0.477932,-99) , -11, 1.5, 0, 0, 0.49925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210489,-99) , -5, 2.48989, 1, 0, 0.496763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292013,-99) , -3, 0.999604, 1, 0, 0.49091,-99) ); - // itree = 844 - fBoostWeights.push_back(0.008276); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.720745,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594797,-99) , -16, 1327.36, 1, 0, 0.661061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482661,-99) , -15, 1.14855, 1, 0, 0.607538,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380919,-99) , -12, 0.0962178, 1, 0, 0.465945,-99) , -1, 42.5, 1, 0, 0.555643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252681,-99) , -1, 11.5, 0, 0, 0.540229,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403258,-99) , -7, 0.00936119, 0, 0, 0.498681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370179,-99) , -14, -4.72856, 0, 0, 0.489571,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250228,-99) , -3, 0.969424, 0, 0, 0.459003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19261,-99) , -14, -2.8448, 1, 0, 0.390379,-99) , -4, 1.74863, 1, 0, 0.48053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219984,-99) , -7, 0.049426, 1, 0, 0.468925,-99) , -2, 29.5, 0, 0, 0.483333,-99) ); - // itree = 845 - fBoostWeights.push_back(0.00620888); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671241,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619715,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513932,-99) , -11, 1.5, 0, 0, 0.575142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502407,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349622,-99) , -9, -0.575197, 1, 0, 0.454881,-99) , -9, 3.67185, 0, 0, 0.492087,-99) , -3, 0.972999, 1, 0, 0.522981,-99) , -5, 2.19455, 0, 0, 0.535636,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30477,-99) , -13, 0.0404706, 1, 0, 0.484735,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362504,-99) , -2, 8.5, 0, 0, 0.474301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297938,-99) , -8, -0.984837, 0, 0, 0.46719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248791,-99) , -5, 2.16126, 1, 0, 0.457134,-99) , -16, 351.596, 1, 0, 0.48575,-99) ); - // itree = 846 - fBoostWeights.push_back(0.00854143); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.73229,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548113,-99) , -5, 2.01254, 0, 0, 0.599734,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.755168,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566484,-99) , -4, 1.50882, 0, 0, 0.623278,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429614,-99) , -13, 0.000673562, 0, 0, 0.507548,-99) , -3, 0.995602, 0, 0, 0.531856,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390026,-99) , -8, 0.674571, 1, 0, 0.480332,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233737,-99) , -13, 0.0166845, 1, 0, 0.430458,-99) , -3, 0.998094, 1, 0, 0.512182,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444378,-99) , -7, 0.0144364, 0, 0, 0.484554,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192484,-99) , -8, 0.950367, 0, 0, 0.354789,-99) , -5, 1.99117, 1, 0, 0.468177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260512,-99) , -7, 0.028798, 1, 0, 0.451622,-99) , -2, 16.5, 0, 0, 0.478762,-99) , -12, 0.414466, 0, 0, 0.486721,-99) ); - // itree = 847 - fBoostWeights.push_back(0.0039497); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647677,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288864,-99) , -14, -5.87367, 0, 0, 0.503739,-99) , -12, 0.495308, 0, 0, 0.509411,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112185,-99) , -7, 0.246898, 1, 0, 0.507344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313922,-99) , -1, 68.5, 1, 0, 0.501597,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290517,-99) , -15, 0.0738381, 0, 0, 0.366272,-99) , -7, 0.00889296, 0, 0, 0.493547,-99) ); - // itree = 848 - fBoostWeights.push_back(0.0038843); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640158,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438057,-99) , -12, 0.0387301, 0, 0, 0.510801,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292382,-99) , -5, 1.93503, 1, 0, 0.443632,-99) , -15, 0.0862456, 0, 0, 0.496432,-99) , -12, 0.495916, 0, 0, 0.501852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345844,-99) , -4, 1.99648, 1, 0, 0.497552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247108,-99) , -7, 0.00714056, 0, 0, 0.492655,-99) ); - // itree = 849 - fBoostWeights.push_back(0.00648515); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483465,-99) , -9, -0.501152, 1, 0, 0.546025,-99) , -9, 0.549067, 0, 0, 0.602373,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49983,-99) , -11, 1.5, 0, 0, 0.566607,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389908,-99) , -12, 0.128737, 1, 0, 0.460831,-99) , -6, 0.397508, 0, 0, 0.507918,-99) , -3, 0.980535, 1, 0, 0.552894,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418399,-99) , -6, 1.00301, 0, 0, 0.468441,-99) , -6, 0.820942, 1, 0, 0.531309,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499615,-99) , -13, 0.00209088, 0, 0, 0.539263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399191,-99) , -3, 0.998234, 1, 0, 0.519215,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436547,-99) , -4, 0.634544, 1, 0, 0.463227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228082,-99) , -4, 1.92369, 1, 0, 0.453713,-99) , -12, 0.100951, 1, 0, 0.479959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268994,-99) , -8, -0.98465, 0, 0, 0.47232,-99) , -16, 406.584, 1, 0, 0.493468,-99) ); - // itree = 850 - fBoostWeights.push_back(0.00529808); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648831,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56425,-99) , -10, 3186.96, 0, 0, 0.609139,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489472,-99) , -8, 0.37621, 1, 0, 0.528296,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3669,-99) , -8, 0.835238, 1, 0, 0.440497,-99) , -5, 1.60589, 1, 0, 0.511939,-99) , -3, 0.904095, 1, 0, 0.526633,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.210287,-99) , -7, 0.108294, 1, 0, 0.487375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312201,-99) , -3, 0.834177, 0, 0, 0.477347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216111,-99) , -13, 0.0217231, 1, 0, 0.466683,-99) , -4, 1.19078, 1, 0, 0.500925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245886,-99) , -2, 6.5, 0, 0, 0.496218,-99) ); - // itree = 851 - fBoostWeights.push_back(0.00386654); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593678,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518671,-99) , -4, 0.459314, 1, 0, 0.533503,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248969,-99) , -3, 0.761308, 0, 0, 0.473778,-99) , -16, 2444.1, 1, 0, 0.505717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307238,-99) , -3, 0.999687, 1, 0, 0.501466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288853,-99) , -2, 6.5, 0, 0, 0.497095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122294,-99) , -7, 0.265405, 1, 0, 0.494559,-99) ); - // itree = 852 - fBoostWeights.push_back(0.00647704); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659892,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568416,-99) , -3, 0.980006, 1, 0, 0.618079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450826,-99) , -10, 3568.24, 1, 0, 0.502174,-99) , -9, -5.3579, 1, 0, 0.525532,-99) , -6, 0.160591, 1, 0, 0.547922,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357814,-99) , -1, 13.5, 0, 0, 0.567166,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109832,-99) , -0, 36.5, 1, 0, 0.485014,-99) , -2, 24.5, 0, 0, 0.502906,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4862,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344769,-99) , -10, 4757.37, 1, 0, 0.440401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230029,-99) , -6, 1.00441, 0, 0, 0.400494,-99) , -6, 0.980044, 1, 0, 0.48603,-99) , -11, 1.5, 0, 0, 0.506884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307939,-99) , -3, 0.999651, 1, 0, 0.502095,-99) ); - // itree = 853 - fBoostWeights.push_back(0.00738153); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678183,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592247,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500764,-99) , -8, -0.921509, 0, 0, 0.575197,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538146,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411082,-99) , -9, -0.102106, 1, 0, 0.47479,-99) , -14, -2.73753, 0, 0, 0.543689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399961,-99) , -5, 0.50588, 0, 0, 0.526896,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466601,-99) , -11, 1.5, 0, 0, 0.497676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191428,-99) , -12, 0.0196194, 0, 0, 0.488102,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24595,-99) , -1, 11.5, 0, 0, 0.37143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.058993,-99) , -4, 1.76836, 1, 0, 0.345555,-99) , -13, 0.00829363, 1, 0, 0.466313,-99) , -5, 1.37978, 1, 0, 0.490951,-99) , -12, 0.526853, 0, 0, 0.497554,-99) ); - // itree = 854 - fBoostWeights.push_back(0.00544051); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462626,-99) , -8, -0.836617, 0, 0, 0.526717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161102,-99) , -4, 1.96809, 1, 0, 0.523217,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46184,-99) , -12, 0.0986961, 1, 0, 0.541798,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466769,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338509,-99) , -2, 15.5, 0, 0, 0.416811,-99) , -5, 1.80688, 0, 0, 0.46908,-99) , -8, 0.935558, 1, 0, 0.511435,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444817,-99) , -15, 0.0274333, 1, 0, 0.498787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304707,-99) , -12, 0.340982, 0, 0, 0.41463,-99) , -15, 0.0468486, 0, 0, 0.502064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286332,-99) , -5, 2.25671, 1, 0, 0.495589,-99) ); - // itree = 855 - fBoostWeights.push_back(0.00754091); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.756712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620089,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533818,-99) , -13, 0.0037924, 0, 0, 0.586239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408706,-99) , -4, 1.3568, 1, 0, 0.558899,-99) , -5, 2.11753, 0, 0, 0.576603,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.205497, 1, 0, 0.437584,-99) , -3, 0.997825, 1, 0, 0.545856,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411781,-99) , -7, 0.0332099, 1, 0, 0.512615,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240774,-99) , -1, 13.5, 1, 0, 0.440818,-99) , -7, 0.01276, 0, 0, 0.491821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270708,-99) , -0, 34.5, 1, 0, 0.486898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128693,-99) , -7, 0.0586093, 1, 0, 0.478429,-99) , -2, 26.5, 0, 0, 0.493928,-99) ); - // itree = 856 - fBoostWeights.push_back(0.00359852); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624497,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500852,-99) , -12, 0.449338, 0, 0, 0.507249,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337246,-99) , -8, -0.989124, 0, 0, 0.502189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278198,-99) , -12, 0.0165015, 0, 0, 0.497727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177379,-99) , -7, 0.252106, 1, 0, 0.494909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254992,-99) , -2, 6.5, 0, 0, 0.490297,-99) ); - // itree = 857 - fBoostWeights.push_back(0.003772); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247223,-99) , -7, 0.107474, 1, 0, 0.500992,-99) , -2, 54.5, 0, 0, 0.50871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138338,-99) , -7, 0.239941, 1, 0, 0.50649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293597,-99) , -1, 77.5, 1, 0, 0.502056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302074,-99) , -3, 0.755789, 0, 0, 0.49512,-99) ); - // itree = 858 - fBoostWeights.push_back(0.00651599); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621468,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501604,-99) , -3, 0.996958, 0, 0, 0.573524,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482925,-99) , -9, -0.390291, 1, 0, 0.519672,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342771,-99) , -2, 8.5, 0, 0, 0.461013,-99) , -16, 4068.84, 1, 0, 0.49201,-99) , -10, -5481.19, 1, 0, 0.500072,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0420472,-99) , -8, 0.95012, 0, 0, 0.371587,-99) , -5, 2.12918, 1, 0, 0.492507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276045,-99) , -7, 0.148691, 1, 0, 0.486799,-99) ); - // itree = 859 - fBoostWeights.push_back(0.00641425); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663043,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466408,-99) , -8, 0.710662, 1, 0, 0.514717,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260815,-99) , -8, 0.900294, 0, 0, 0.388633,-99) , -4, 1.71416, 1, 0, 0.503734,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318163,-99) , -7, 0.00872027, 0, 0, 0.436575,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206552,-99) , -0, 15.5, 1, 0, 0.398913,-99) , -15, 0.0583711, 0, 0, 0.49047,-99) , -12, 0.525784, 0, 0, 0.496618,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292592,-99) , -14, -5.31556, 0, 0, 0.489267,-99) ); - // itree = 860 - fBoostWeights.push_back(0.00673536); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529259,-99) , -3, 0.978863, 0, 0, 0.564014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46207,-99) , -10, 6684.57, 1, 0, 0.541553,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380047,-99) , -5, 1.49517, 1, 0, 0.468977,-99) , -15, 0.44454, 1, 0, 0.519115,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45203,-99) , -7, 0.0174019, 0, 0, 0.490135,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191618,-99) , -0, 21.5, 0, 0, 0.417249,-99) , -7, 0.0275295, 1, 0, 0.465236,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199793,-99) , -4, 1.8995, 1, 0, 0.45942,-99) , -16, 506.506, 1, 0, 0.482762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220557,-99) , -4, 2.07552, 1, 0, 0.478671,-99) ); - // itree = 861 - fBoostWeights.push_back(0.00588352); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573623,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483563,-99) , -8, 0.982846, 1, 0, 0.559611,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463391,-99) , -1, 35.5, 1, 0, 0.54706,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378318,-99) , -12, 0.0182006, 0, 0, 0.537198,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604678,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538306,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43517,-99) , -2, 18.5, 0, 0, 0.468142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196753,-99) , -1, 60.5, 1, 0, 0.45981,-99) , -16, 8.10835, 1, 0, 0.47495,-99) , -12, 0.110628, 1, 0, 0.504111,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334261,-99) , -12, 0.142524, 1, 0, 0.405736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0515951,-99) , -5, 1.85981, 1, 0, 0.377298,-99) , -8, -0.945871, 0, 0, 0.494513,-99) ); - // itree = 862 - fBoostWeights.push_back(0.00583996); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.761029,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54828,-99) , -5, 2.1461, 0, 0, 0.565713,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212619,-99) , -7, 0.0445424, 1, 0, 0.492041,-99) , -2, 24.5, 0, 0, 0.510124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368562,-99) , -12, 0.0246262, 0, 0, 0.503277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317409,-99) , -14, -5.54194, 0, 0, 0.497791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0322844,-99) , -7, 0.280354, 1, 0, 0.495066,-99) ); - // itree = 863 - fBoostWeights.push_back(0.00353958); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57766,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519134,-99) , -2, 24.5, 0, 0, 0.531376,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108804,-99) , -5, 2.02868, 1, 0, 0.461318,-99) , -13, 0.010992, 1, 0, 0.518437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318529,-99) , -7, 0.00716461, 0, 0, 0.514415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354839,-99) , -12, 0.0222178, 0, 0, 0.508038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.104727,-99) , -7, 0.324392, 1, 0, 0.506214,-99) ); - // itree = 864 - fBoostWeights.push_back(0.00621189); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644656,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538677,-99) , -15, 0.386882, 1, 0, 0.609079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483615,-99) , -5, 1.98803, 0, 0, 0.514857,-99) , -16, 29.627, 0, 0, 0.564495,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539297,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315523,-99) , -5, 1.98314, 1, 0, 0.530266,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340816,-99) , -5, 1.93892, 0, 0, 0.409943,-99) , -8, 0.737722, 1, 0, 0.483643,-99) , -6, 0.558456, 1, 0, 0.53127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401754,-99) , -8, -0.883359, 0, 0, 0.5176,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558082,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432191,-99) , -4, 0.901901, 1, 0, 0.459453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328103,-99) , -3, 0.999189, 1, 0, 0.451131,-99) , -10, -6280.13, 1, 0, 0.460764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209079,-99) , -5, 2.23622, 1, 0, 0.453483,-99) , -16, 501.777, 1, 0, 0.478476,-99) ); - // itree = 865 - fBoostWeights.push_back(0.00607467); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.70574,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594015,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500967,-99) , -6, 0.586261, 1, 0, 0.546646,-99) , -5, 2.00823, 0, 0, 0.572692,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496313,-99) , -12, 0.124176, 1, 0, 0.530155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391977,-99) , -12, 0.030443, 0, 0, 0.519517,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470165,-99) , -9, -2.29941, 1, 0, 0.507607,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333062,-99) , -7, 0.0143371, 0, 0, 0.417168,-99) , -16, 512.419, 1, 0, 0.452574,-99) , -10, 2541.16, 1, 0, 0.487719,-99) , -10, 9175.73, 0, 0, 0.499983,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224592,-99) , -13, 0.0182417, 1, 0, 0.429507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.207025,-99) , -8, 0.854409, 1, 0, 0.380179,-99) , -3, 0.999139, 1, 0, 0.491014,-99) ); - // itree = 866 - fBoostWeights.push_back(0.00382756); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658923,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648311,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523978,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456648,-99) , -7, 0.0143934, 0, 0, 0.50967,-99) , -12, 0.494707, 0, 0, 0.515624,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413611,-99) , -5, 1.65073, 1, 0, 0.469714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0254776,-99) , -0, 28.5, 1, 0, 0.45475,-99) , -1, 9.5, 0, 0, 0.503398,-99) , -9, 11.3624, 0, 0, 0.508335,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339305,-99) , -3, 0.999638, 1, 0, 0.504015,-99) ); - // itree = 867 - fBoostWeights.push_back(0.00543396); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497025,-99) , -6, 0.916453, 1, 0, 0.566205,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382657,-99) , -15, 0.668197, 1, 0, 0.494351,-99) , -2, 26.5, 0, 0, 0.509233,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292037,-99) , -5, 1.41061, 1, 0, 0.421723,-99) , -13, 0.0208323, 1, 0, 0.501282,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500947,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337893,-99) , -7, 0.0111687, 0, 0, 0.472414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248138,-99) , -1, 7.5, 0, 0, 0.454379,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297689,-99) , -14, -2.57235, 1, 0, 0.419853,-99) , -5, 1.88647, 1, 0, 0.486548,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243664,-99) , -3, 0.999703, 1, 0, 0.481794,-99) ); - // itree = 868 - fBoostWeights.push_back(0.00557322); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653859,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557645,-99) , -4, 0.613434, 1, 0, 0.590252,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382664,-99) , -16, 1133.03, 1, 0, 0.461866,-99) , -8, 0.718755, 1, 0, 0.55649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417746,-99) , -5, 0.398546, 0, 0, 0.539534,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485704,-99) , -16, 1292.36, 1, 0, 0.526167,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429553,-99) , -12, 0.427428, 0, 0, 0.449738,-99) , -12, 0.138441, 1, 0, 0.491275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224912,-99) , -7, 0.1368, 1, 0, 0.485547,-99) , -5, 1.37728, 1, 0, 0.506606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37606,-99) , -8, -0.982993, 0, 0, 0.501421,-99) ); - // itree = 869 - fBoostWeights.push_back(0.00609832); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640287,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487912,-99) , -13, 0.0106022, 1, 0, 0.53373,-99) , -10, 10931.1, 0, 0, 0.546934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384329,-99) , -4, 1.66428, 1, 0, 0.537019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136934,-99) , -5, 2.12462, 1, 0, 0.528113,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386146,-99) , -14, -4.60177, 0, 0, 0.484317,-99) , -5, 2.13889, 0, 0, 0.497899,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517536,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255679,-99) , -10, 2852.07, 1, 0, 0.3705,-99) , -9, -2.64727, 1, 0, 0.417619,-99) , -1, 9.5, 0, 0, 0.482313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313712,-99) , -3, 0.998928, 1, 0, 0.468918,-99) , -8, 0.436838, 1, 0, 0.498194,-99) ); - // itree = 870 - fBoostWeights.push_back(0.0072092); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497628,-99) , -5, 1.42155, 0, 0, 0.555796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0918579,-99) , -5, 2.30974, 1, 0, 0.548899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452996,-99) , -8, 0.981053, 1, 0, 0.534069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613624,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39093,-99) , -15, 0.0581754, 0, 0, 0.463667,-99) , -10, -7785.84, 1, 0, 0.474657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243683,-99) , -3, 0.755718, 0, 0, 0.466803,-99) , -16, 485.855, 1, 0, 0.491633,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439049,-99) , -5, 1.46953, 1, 0, 0.524574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372039,-99) , -10, 5277.14, 1, 0, 0.481054,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33902,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132871,-99) , -4, 1.32414, 1, 0, 0.270671,-99) , -1, 19.5, 0, 0, 0.411138,-99) , -15, 0.743533, 1, 0, 0.479126,-99) ); - // itree = 871 - fBoostWeights.push_back(0.00695301); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.757168,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552655,-99) , -5, 2.11885, 0, 0, 0.570112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232191,-99) , -1, 11.5, 0, 0, 0.552637,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0661999,-99) , -4, 2.06959, 1, 0, 0.498367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199031,-99) , -7, 0.0485965, 1, 0, 0.489622,-99) , -2, 24.5, 0, 0, 0.504005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0805933,-99) , -7, 0.208737, 1, 0, 0.501006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244309,-99) , -1, 76.5, 1, 0, 0.495992,-99) ); - // itree = 872 - fBoostWeights.push_back(0.00333196); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623541,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505196,-99) , -12, 0.502953, 0, 0, 0.509484,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307662,-99) , -7, 0.00668952, 0, 0, 0.506492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341601,-99) , -12, 0.0181941, 0, 0, 0.502636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301998,-99) , -3, 0.99969, 1, 0, 0.498453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158377,-99) , -4, 2.06707, 1, 0, 0.493384,-99) ); - // itree = 873 - fBoostWeights.push_back(0.00675804); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669455,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541589,-99) , -5, 2.07892, 0, 0, 0.554534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426911,-99) , -3, 0.998823, 1, 0, 0.542747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338315,-99) , -5, 2.36266, 1, 0, 0.537484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611659,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378443,-99) , -5, 1.31869, 0, 0, 0.487841,-99) , -13, 0.00396594, 0, 0, 0.519565,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432065,-99) , -2, 12.5, 0, 0, 0.505003,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279125,-99) , -8, -0.160296, 0, 0, 0.405929,-99) , -5, 1.40096, 1, 0, 0.444508,-99) , -12, 0.100609, 1, 0, 0.473979,-99) , -11, 1.5, 0, 0, 0.495486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270381,-99) , -12, 0.0188354, 0, 0, 0.489772,-99) ); - // itree = 874 - fBoostWeights.push_back(0.00601043); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620488,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635517,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505191,-99) , -12, 0.446102, 0, 0, 0.512263,-99) , -2, 26.5, 0, 0, 0.519369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362681,-99) , -8, -0.983788, 0, 0, 0.512689,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349335,-99) , -2, 24.5, 0, 0, 0.504841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331171,-99) , -3, 0.997831, 1, 0, 0.470196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0673107,-99) , -1, 10.5, 0, 0, 0.44393,-99) , -7, 0.0421695, 1, 0, 0.49686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275219,-99) , -2, 6.5, 0, 0, 0.492892,-99) ); - // itree = 875 - fBoostWeights.push_back(0.00434401); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605471,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220107,-99) , -4, 2.06754, 1, 0, 0.535521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444759,-99) , -5, 1.32598, 0, 0, 0.510602,-99) , -0, 37.5, 0, 0, 0.529233,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460478,-99) , -2, 13.5, 0, 0, 0.491426,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151258,-99) , -4, 1.968, 1, 0, 0.421633,-99) , -6, 0.916389, 1, 0, 0.476159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194094,-99) , -13, 0.0628639, 1, 0, 0.471525,-99) , -11, 1.5, 0, 0, 0.49089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271166,-99) , -3, 0.999727, 1, 0, 0.487229,-99) ); - // itree = 876 - fBoostWeights.push_back(0.00380048); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.591479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469121,-99) , -12, 0.0549996, 0, 0, 0.566828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460587,-99) , -4, -0.134102, 0, 0, 0.53916,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386114,-99) , -13, 0.0163986, 1, 0, 0.486704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295429,-99) , -12, 0.018188, 0, 0, 0.48145,-99) , -4, 0.653544, 1, 0, 0.496726,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234963,-99) , -13, 0.0969482, 1, 0, 0.494451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279633,-99) , -4, 2.01811, 1, 0, 0.489581,-99) ); - // itree = 877 - fBoostWeights.push_back(0.00482865); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58152,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510227,-99) , -12, 0.34438, 0, 0, 0.518232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358196,-99) , -7, 0.00714695, 0, 0, 0.514667,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516833,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319558,-99) , -1, 13.5, 0, 0, 0.425768,-99) , -8, -0.915841, 0, 0, 0.50564,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323225,-99) , -5, 1.53579, 1, 0, 0.46346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0988779,-99) , -1, 19.5, 0, 0, 0.411985,-99) , -7, 0.0844957, 1, 0, 0.497416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269474,-99) , -4, 2.02292, 1, 0, 0.492376,-99) ); - // itree = 878 - fBoostWeights.push_back(0.00418319); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311925,-99) , -5, 2.27976, 1, 0, 0.51248,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0742559,-99) , -1, 17.5, 0, 0, 0.414326,-99) , -7, 0.0857115, 1, 0, 0.504523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374397,-99) , -8, -0.981676, 0, 0, 0.498268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330479,-99) , -4, 1.97103, 1, 0, 0.493292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262574,-99) , -8, 0.999754, 1, 0, 0.489119,-99) ); - // itree = 879 - fBoostWeights.push_back(0.0038762); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674707,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432676,-99) , -15, 0.506579, 1, 0, 0.575612,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486973,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373522,-99) , -8, -0.974268, 0, 0, 0.480692,-99) , -9, 6.64699, 0, 0, 0.489896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302554,-99) , -3, 0.999694, 1, 0, 0.486053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235707,-99) , -2, 6.5, 0, 0, 0.482135,-99) , -12, 0.535654, 0, 0, 0.4888,-99) ); - // itree = 880 - fBoostWeights.push_back(0.00671832); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701367,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570109,-99) , -5, 1.9524, 0, 0, 0.606352,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445422,-99) , -1, 12.5, 0, 0, 0.501267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0837664,-99) , -5, 2.49356, 1, 0, 0.498648,-99) , -15, 0.0645557, 1, 0, 0.50887,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44617,-99) , -0, 12.5, 1, 0, 0.529293,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439038,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205532,-99) , -3, 0.939824, 0, 0, 0.391919,-99) , -12, 0.113701, 1, 0, 0.455594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0488294,-99) , -5, 2.25784, 1, 0, 0.443364,-99) , -7, 0.0140826, 0, 0, 0.491764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23938,-99) , -3, 0.999741, 1, 0, 0.48808,-99) ); - // itree = 881 - fBoostWeights.push_back(0.00552826); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66341,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498512,-99) , -2, 24.5, 0, 0, 0.518732,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457892,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101019,-99) , -5, 2.15574, 1, 0, 0.446157,-99) , -3, 0.997773, 1, 0, 0.505594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22671,-99) , -13, 0.0560698, 1, 0, 0.500757,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41846,-99) , -16, 791.421, 1, 0, 0.4685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279771,-99) , -12, 0.233807, 0, 0, 0.424269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180207,-99) , -8, -0.771582, 0, 0, 0.397006,-99) , -15, 0.0579439, 0, 0, 0.488733,-99) , -12, 0.513631, 0, 0, 0.495237,-99) ); - // itree = 882 - fBoostWeights.push_back(0.00334502); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658969,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375809,-99) , -12, 0.0227607, 0, 0, 0.499679,-99) , -12, 0.508039, 0, 0, 0.505439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.313323,-99) , -7, 0.00743903, 0, 0, 0.500779,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142633,-99) , -7, 0.234087, 1, 0, 0.498685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294416,-99) , -1, 69.5, 1, 0, 0.493266,-99) ); - // itree = 883 - fBoostWeights.push_back(0.00542341); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685254,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561916,-99) , -0, 11.5, 1, 0, 0.60443,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556048,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41871,-99) , -8, 0.725781, 1, 0, 0.520559,-99) , -5, 1.66538, 0, 0, 0.556268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424645,-99) , -3, 0.998074, 1, 0, 0.519128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397745,-99) , -2, 15.5, 0, 0, 0.49552,-99) , -15, 0.477645, 1, 0, 0.528105,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461728,-99) , -3, 0.996096, 1, 0, 0.515142,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261542,-99) , -7, 0.00974432, 0, 0, 0.440998,-99) , -3, 0.985687, 0, 0, 0.480156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177053,-99) , -15, 0.902701, 1, 0, 0.475892,-99) , -12, 0.118225, 1, 0, 0.501808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149855,-99) , -5, 2.59381, 1, 0, 0.500501,-99) ); - // itree = 884 - fBoostWeights.push_back(0.00763854); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47938,-99) , -12, 0.180153, 1, 0, 0.594559,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413276,-99) , -8, -0.945762, 0, 0, 0.522711,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30662,-99) , -9, -2.86493, 0, 0, 0.450002,-99) , -14, -3.09063, 0, 0, 0.500814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363058,-99) , -5, 0.512545, 0, 0, 0.492148,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583843,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344835,-99) , -6, 0.866332, 1, 0, 0.442035,-99) , -9, 2.89429, 0, 0, 0.475853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485323,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18097,-99) , -7, 0.0182555, 1, 0, 0.291317,-99) , -10, 5888.5, 0, 0, 0.36209,-99) , -12, 0.113631, 1, 0, 0.414465,-99) , -4, 1.41124, 1, 0, 0.471557,-99) , -10, -8170.32, 1, 0, 0.480768,-99) ); - // itree = 885 - fBoostWeights.push_back(0.00723089); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665119,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554386,-99) , -6, 0.0977005, 1, 0, 0.570412,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45966,-99) , -9, -7.44194, 1, 0, 0.491017,-99) , -10, 5029.44, 1, 0, 0.545851,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413726,-99) , -12, 0.0235703, 0, 0, 0.533307,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496532,-99) , -10, -1689.15, 1, 0, 0.518904,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314067,-99) , -0, 13.5, 1, 0, 0.436163,-99) , -7, 0.0138109, 0, 0, 0.497264,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383432,-99) , -9, -0.837536, 1, 0, 0.495994,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241565,-99) , -13, 0.00108171, 1, 0, 0.38111,-99) , -4, 1.55176, 1, 0, 0.475394,-99) , -12, 0.118339, 1, 0, 0.503583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216024,-99) , -3, 0.99975, 1, 0, 0.499739,-99) ); - // itree = 886 - fBoostWeights.push_back(0.00415634); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682326,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656686,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540074,-99) , -9, -12.5966, 0, 0, 0.608883,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46442,-99) , -5, 1.47564, 1, 0, 0.490155,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272833,-99) , -3, 0.999664, 1, 0, 0.485988,-99) , -9, -9.12586, 1, 0, 0.493182,-99) , -12, 0.521876, 0, 0, 0.500347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193386,-99) , -2, 6.5, 0, 0, 0.495421,-99) ); - // itree = 887 - fBoostWeights.push_back(0.00584538); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444985,-99) , -14, -4.8892, 0, 0, 0.554145,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401389,-99) , -7, 0.0279748, 1, 0, 0.458938,-99) , -6, 0.929717, 1, 0, 0.534417,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456877,-99) , -0, 19.5, 0, 0, 0.536301,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407888,-99) , -12, 0.272299, 0, 0, 0.45218,-99) , -4, 0.845106, 1, 0, 0.482936,-99) , -12, 0.114006, 1, 0, 0.507434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386028,-99) , -8, -0.984058, 0, 0, 0.501577,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496599,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235328,-99) , -14, -3.71389, 1, 0, 0.363231,-99) , -4, 1.84786, 1, 0, 0.493962,-99) ); - // itree = 888 - fBoostWeights.push_back(0.00336412); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472031,-99) , -5, 1.57562, 1, 0, 0.504528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32451,-99) , -3, 0.999663, 1, 0, 0.500081,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280724,-99) , -12, 0.0165015, 0, 0, 0.495886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212605,-99) , -5, 2.46981, 1, 0, 0.493238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26958,-99) , -2, 6.5, 0, 0, 0.488786,-99) ); - // itree = 889 - fBoostWeights.push_back(0.00545188); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658311,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561463,-99) , -8, 0.619011, 1, 0, 0.617964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439448,-99) , -1, 9.5, 0, 0, 0.568194,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639957,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51011,-99) , -12, 0.417829, 0, 0, 0.518709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270136,-99) , -4, 1.92775, 1, 0, 0.512574,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14527,-99) , -4, 2.02275, 1, 0, 0.507748,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183842,-99) , -3, 0.999151, 1, 0, 0.385378,-99) , -9, 3.27268, 0, 0, 0.445076,-99) , -3, 0.991452, 1, 0, 0.489286,-99) , -9, -6.15278, 1, 0, 0.497234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353294,-99) , -7, 0.00754516, 0, 0, 0.492855,-99) ); - // itree = 890 - fBoostWeights.push_back(0.00556355); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.736085,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57798,-99) , -9, 1.24508, 0, 0, 0.647353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281056,-99) , -1, 9.5, 0, 0, 0.599715,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607766,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540859,-99) , -8, 0.388491, 0, 0, 0.56834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465573,-99) , -8, -0.760604, 0, 0, 0.542663,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37799,-99) , -3, 0.98438, 1, 0, 0.43381,-99) , -8, 0.839133, 1, 0, 0.510495,-99) , -5, 1.94735, 0, 0, 0.528742,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375731,-99) , -12, 0.0287383, 0, 0, 0.488204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293852,-99) , -7, 0.00689984, 0, 0, 0.483345,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251069,-99) , -6, 0.624212, 1, 0, 0.369585,-99) , -8, -0.946457, 0, 0, 0.473935,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305662,-99) , -7, 0.125315, 1, 0, 0.467485,-99) , -11, 1.5, 0, 0, 0.488187,-99) ); - // itree = 891 - fBoostWeights.push_back(0.00382359); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664242,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326447,-99) , -12, 0.0197537, 0, 0, 0.499715,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.11305,-99) , -5, 1.84557, 1, 0, 0.40848,-99) , -8, -0.915891, 0, 0, 0.4903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314693,-99) , -4, 2.01811, 1, 0, 0.486152,-99) , -12, 0.523169, 0, 0, 0.492089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312627,-99) , -1, 69.5, 1, 0, 0.486624,-99) ); - // itree = 892 - fBoostWeights.push_back(0.00455729); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643945,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522404,-99) , -9, 0.974663, 1, 0, 0.598513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490064,-99) , -0, 46.5, 0, 0, 0.557747,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390418,-99) , -14, -5.20252, 0, 0, 0.494756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300321,-99) , -5, 2.36282, 1, 0, 0.491111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256915,-99) , -7, 0.0572864, 1, 0, 0.484789,-99) , -2, 30.5, 0, 0, 0.49481,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0472394,-99) , -1, 17.5, 0, 0, 0.360396,-99) , -7, 0.0993885, 1, 0, 0.487041,-99) ); - // itree = 893 - fBoostWeights.push_back(0.00597858); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0577865,-99) , -5, 2.19659, 1, 0, 0.527661,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270414,-99) , -12, 0.0295071, 0, 0, 0.474197,-99) , -8, 0.836011, 1, 0, 0.508159,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527175,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20473,-99) , -15, 0.0433965, 0, 0, 0.356406,-99) , -13, 0.000160254, 1, 0, 0.412358,-99) , -7, 0.0095321, 0, 0, 0.49996,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148084,-99) , -5, 1.77317, 1, 0, 0.396383,-99) , -8, -0.946424, 0, 0, 0.491835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.351656, 1, 0, 0.489893,-99) ); - // itree = 894 - fBoostWeights.push_back(0.00526786); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661083,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466496,-99) , -1, 19.5, 1, 0, 0.53123,-99) , -13, 0.00778191, 1, 0, 0.576809,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477494,-99) , -15, 0.509015, 1, 0, 0.533283,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430882,-99) , -16, 2445.01, 1, 0, 0.517122,-99) , -13, 0.00395756, 0, 0, 0.541118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305391,-99) , -5, 2.48055, 1, 0, 0.537314,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628518,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40809,-99) , -3, 0.996392, 1, 0, 0.477486,-99) , -10, -8435.58, 1, 0, 0.485281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.121886,-99) , -7, 0.207036, 1, 0, 0.480791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235273,-99) , -5, 2.21067, 1, 0, 0.473001,-99) , -11, 1.5, 0, 0, 0.495195,-99) ); - // itree = 895 - fBoostWeights.push_back(0.00787809); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647154,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488713,-99) , -7, 0.0401071, 1, 0, 0.538885,-99) , -6, 0.270996, 1, 0, 0.566097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453135,-99) , -8, -0.925521, 0, 0, 0.546993,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446879,-99) , -15, 0.251621, 1, 0, 0.505315,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346939,-99) , -5, 1.32465, 0, 0, 0.395001,-99) , -3, 0.988344, 1, 0, 0.454409,-99) , -13, 0.00116853, 0, 0, 0.522413,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65832,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507831,-99) , -4, 1.94011, 0, 0, 0.53155,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299046,-99) , -1, 7.5, 0, 0, 0.45687,-99) , -16, 887.632, 1, 0, 0.491749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302991,-99) , -12, 0.0203717, 0, 0, 0.484076,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611415,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146589,-99) , -7, 0.0566486, 1, 0, 0.32584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157543,-99) , -5, 1.98161, 1, 0, 0.291117,-99) , -12, 0.420302, 0, 0, 0.343802,-99) , -13, 0.00503678, 1, 0, 0.456748,-99) , -5, 1.59969, 1, 0, 0.495031,-99) ); - // itree = 896 - fBoostWeights.push_back(0.00687385); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655519,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459643,-99) , -5, 1.43987, 0, 0, 0.530867,-99) , -2, 15.5, 0, 0, 0.56737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460723,-99) , -12, 0.0446357, 0, 0, 0.521767,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331743,-99) , -12, 0.0246954, 1, 0, 0.401785,-99) , -1, 19.5, 0, 0, 0.475031,-99) , -15, 0.558857, 1, 0, 0.525721,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60721,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445904,-99) , -2, 14.5, 0, 0, 0.487288,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398703,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147651,-99) , -0, 53.5, 1, 0, 0.382831,-99) , -4, 1.35788, 1, 0, 0.460233,-99) , -12, 0.492021, 0, 0, 0.469655,-99) , -12, 0.0952502, 1, 0, 0.492491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322805,-99) , -4, 1.86547, 1, 0, 0.484231,-99) ); - // itree = 897 - fBoostWeights.push_back(0.00636597); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675036,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526994,-99) , -10, -5408.09, 1, 0, 0.540404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347093,-99) , -1, 9.5, 0, 0, 0.531553,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503411,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.44724, 1, 0, 0.498758,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157869,-99) , -2, 13.5, 0, 0, 0.292676,-99) , -7, 0.0276664, 1, 0, 0.476456,-99) , -2, 18.5, 0, 0, 0.496481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243462,-99) , -13, 0.0776655, 1, 0, 0.493427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348816,-99) , -12, 0.0234631, 0, 0, 0.487144,-99) ); - // itree = 898 - fBoostWeights.push_back(0.00692167); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.782754,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653032,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539878,-99) , -1, 34.5, 1, 0, 0.58649,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464269,-99) , -13, 0.00202836, 0, 0, 0.549234,-99) , -5, 2.11963, 0, 0, 0.570192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237761,-99) , -1, 14.5, 0, 0, 0.546419,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495098,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321635,-99) , -7, 0.00696981, 0, 0, 0.491253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.055248,-99) , -5, 2.4914, 1, 0, 0.487854,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251669,-99) , -7, 0.0572382, 1, 0, 0.482467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122181,-99) , -0, 43.5, 1, 0, 0.475264,-99) , -2, 31.5, 0, 0, 0.4889,-99) ); - // itree = 899 - fBoostWeights.push_back(0.00698566); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678181,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567146,-99) , -7, 0.0266059, 0, 0, 0.630021,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517802,-99) , -15, 0.442941, 1, 0, 0.592828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529033,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260105,-99) , -1, 20.5, 0, 0, 0.49147,-99) , -7, 0.0588662, 1, 0, 0.558426,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454565,-99) , -14, -3.55997, 0, 0, 0.535118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393747,-99) , -7, 0.0206188, 1, 0, 0.504473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199496,-99) , -5, 2.26441, 1, 0, 0.494726,-99) , -0, 19.5, 0, 0, 0.527352,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493064,-99) , -12, 0.211125, 1, 0, 0.556287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429727,-99) , -8, -0.82104, 0, 0, 0.524092,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38539,-99) , -5, 1.19322, 0, 0, 0.454507,-99) , -13, 0.00198951, 0, 0, 0.501762,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441462,-99) , -10, -2661.07, 1, 0, 0.457005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.139349,-99) , -7, 0.00710955, 0, 0, 0.448829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267692,-99) , -7, 0.0650084, 1, 0, 0.436532,-99) , -5, 1.41269, 1, 0, 0.463363,-99) , -16, 362.82, 1, 0, 0.486588,-99) ); - // itree = 900 - fBoostWeights.push_back(0.00355531); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524559,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461786,-99) , -15, 0.0879056, 0, 0, 0.508291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0710386,-99) , -7, 0.299106, 1, 0, 0.506471,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368309,-99) , -5, 0.457191, 0, 0, 0.499721,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2099,-99) , -5, 2.46963, 1, 0, 0.497006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20675,-99) , -12, 0.016483, 0, 0, 0.492383,-99) ); - // itree = 901 - fBoostWeights.push_back(0.00607039); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654586,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5897,-99) , -16, 2406.55, 1, 0, 0.6225,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448637,-99) , -16, 2007.5, 1, 0, 0.521171,-99) , -15, 0.3341, 1, 0, 0.572177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409502,-99) , -7, 0.0139877, 0, 0, 0.545834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564907,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46692,-99) , -3, 0.997978, 1, 0, 0.548617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432559,-99) , -14, -4.68316, 0, 0, 0.533958,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486436,-99) , -12, 0.343805, 0, 0, 0.514516,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0432846,-99) , -4, 1.90403, 1, 0, 0.431844,-99) , -14, -2.86849, 1, 0, 0.464989,-99) , -12, 0.0789467, 1, 0, 0.487146,-99) , -4, 0.591703, 1, 0, 0.501036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262182,-99) , -15, 4.08714, 1, 0, 0.497376,-99) ); - // itree = 902 - fBoostWeights.push_back(0.00552586); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548016,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479792,-99) , -6, 0.391495, 1, 0, 0.509506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186607,-99) , -5, 2.26439, 1, 0, 0.506556,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536311,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320966,-99) , -5, 1.53454, 1, 0, 0.374491,-99) , -3, 0.942141, 1, 0, 0.424227,-99) , -8, 0.983465, 1, 0, 0.496631,-99) , -12, 0.483939, 0, 0, 0.502823,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.104147,-99) , -13, 0.000847541, 1, 0, 0.342753,-99) , -4, 1.83113, 1, 0, 0.493538,-99) ); - // itree = 903 - fBoostWeights.push_back(0.00553176); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459175,-99) , -7, 0.0159275, 0, 0, 0.541529,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0849494,-99) , -3, 0.999359, 1, 0, 0.458968,-99) , -13, 0.0109795, 1, 0, 0.523078,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120012,-99) , -4, 1.96805, 1, 0, 0.473771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201339,-99) , -0, 17.5, 1, 0, 0.461801,-99) , -2, 11.5, 0, 0, 0.50396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318512,-99) , -12, 0.01821, 0, 0, 0.499533,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235513,-99) , -5, 2.46103, 1, 0, 0.496819,-99) ); - // itree = 904 - fBoostWeights.push_back(0.0039039); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664008,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584289,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503358,-99) , -10, -4175.43, 1, 0, 0.513191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355202,-99) , -3, 0.999646, 1, 0, 0.508672,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211675,-99) , -4, 1.66786, 1, 0, 0.458768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213341,-99) , -8, -0.507136, 0, 0, 0.415152,-99) , -15, 0.0468348, 0, 0, 0.500875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30216,-99) , -12, 0.0165266, 0, 0, 0.496629,-99) , -12, 0.527172, 0, 0, 0.502419,-99) ); - // itree = 905 - fBoostWeights.push_back(0.00363899); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.727354,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464738,-99) , -6, 0.915791, 1, 0, 0.542673,-99) , -4, 1.94378, 0, 0, 0.563079,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481789,-99) , -10, -585.497, 1, 0, 0.499337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118145,-99) , -4, 2.17392, 1, 0, 0.497034,-99) , -9, -4.18942, 1, 0, 0.508759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301287,-99) , -7, 0.00697269, 0, 0, 0.505096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258771,-99) , -3, 0.999733, 1, 0, 0.501196,-99) ); - // itree = 906 - fBoostWeights.push_back(0.0060561); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651537,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553259,-99) , -7, 0.0129829, 1, 0, 0.580324,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287357,-99) , -4, 1.63263, 1, 0, 0.500793,-99) , -12, 0.113902, 1, 0, 0.538471,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478685,-99) , -13, 0.00150477, 0, 0, 0.55983,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418054,-99) , -9, -3.72781, 1, 0, 0.457063,-99) , -9, 4.4178, 0, 0, 0.482607,-99) , -3, 0.979124, 1, 0, 0.507232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320845,-99) , -5, 2.30884, 1, 0, 0.501607,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459631,-99) , -7, 0.0320296, 0, 0, 0.519788,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324639,-99) , -7, 0.0804735, 1, 0, 0.438873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160466,-99) , -5, 2.068, 1, 0, 0.429581,-99) , -11, 1.5, 0, 0, 0.456022,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265738,-99) , -2, 8.5, 0, 0, 0.443738,-99) , -6, 0.829198, 1, 0, 0.485522,-99) ); - // itree = 907 - fBoostWeights.push_back(0.00322541); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265794,-99) , -5, 2.4937, 1, 0, 0.514418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339093,-99) , -3, 0.999624, 1, 0, 0.510316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29034,-99) , -2, 6.5, 0, 0, 0.505881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.209971,-99) , -7, 0.154573, 1, 0, 0.502034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33795,-99) , -1, 63.5, 1, 0, 0.496406,-99) ); - // itree = 908 - fBoostWeights.push_back(0.00705135); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634162,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615784,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50562,-99) , -3, 0.996876, 0, 0, 0.515577,-99) , -6, 0.0613572, 1, 0, 0.527484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484306,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346364,-99) , -12, 0.196574, 1, 0, 0.445755,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0934641,-99) , -0, 92.5, 1, 0, 0.419539,-99) , -3, 0.997996, 1, 0, 0.509738,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459041,-99) , -7, 0.00996172, 1, 0, 0.516423,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523465,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212217,-99) , -8, 0.295609, 0, 0, 0.334233,-99) , -9, 3.10952, 0, 0, 0.381341,-99) , -12, 0.114623, 1, 0, 0.443852,-99) , -7, 0.0133583, 0, 0, 0.494523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304968,-99) , -4, 2.00681, 1, 0, 0.489609,-99) ); - // itree = 909 - fBoostWeights.push_back(0.00449431); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40667,-99) , -13, 0.0179125, 1, 0, 0.55281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50651,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370301,-99) , -3, 0.999241, 1, 0, 0.496926,-99) , -6, 0.522461, 1, 0, 0.524972,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612793,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385044,-99) , -10, 4240.91, 1, 0, 0.43713,-99) , -5, 2.0842, 0, 0, 0.461418,-99) , -14, -3.65564, 0, 0, 0.510562,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389408,-99) , -12, 0.158913, 1, 0, 0.457884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32861,-99) , -6, 0.699847, 1, 0, 0.419371,-99) , -8, -0.8517, 0, 0, 0.498708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322575,-99) , -5, 2.25426, 1, 0, 0.493235,-99) ); - // itree = 910 - fBoostWeights.push_back(0.00326712); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648374,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352982,-99) , -12, 0.0216868, 0, 0, 0.489391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360285,-99) , -16, 2.56219, 0, 0, 0.484228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253825,-99) , -3, 0.99971, 1, 0, 0.480615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.56523, 1, 0, 0.478715,-99) , -10, -14103.9, 1, 0, 0.484547,-99) ); - // itree = 911 - fBoostWeights.push_back(0.00598963); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413914,-99) , -14, -3.94639, 0, 0, 0.526936,-99) , -5, 2.05043, 0, 0, 0.537719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333872,-99) , -12, 0.0182039, 0, 0, 0.527551,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383177,-99) , -12, 0.142652, 0, 0, 0.503282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363,-99) , -1, 41.5, 1, 0, 0.489764,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347507,-99) , -6, 0.624558, 0, 0, 0.430429,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188682,-99) , -0, 18.5, 1, 0, 0.403426,-99) , -1, 9.5, 0, 0, 0.470853,-99) , -12, 0.125932, 1, 0, 0.499952,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267796,-99) , -4, 2.07376, 1, 0, 0.496147,-99) ); - // itree = 912 - fBoostWeights.push_back(0.00579824); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637499,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554433,-99) , -16, 1416.56, 1, 0, 0.597158,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475381,-99) , -4, 1.22723, 0, 0, 0.522493,-99) , -13, 0.00172918, 0, 0, 0.549644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404107,-99) , -15, 2.89555, 1, 0, 0.536082,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676021,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342657,-99) , -5, 1.84167, 1, 0, 0.495683,-99) , -13, 0.00113852, 1, 0, 0.559137,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484715,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341788,-99) , -14, -4.02683, 0, 0, 0.469225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25852,-99) , -5, 2.09929, 1, 0, 0.459645,-99) , -12, 0.341652, 0, 0, 0.475592,-99) , -12, 0.070024, 1, 0, 0.494419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275114,-99) , -4, 2.07357, 1, 0, 0.49098,-99) ); - // itree = 913 - fBoostWeights.push_back(0.00546416); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497355,-99) , -6, 0.830751, 1, 0, 0.547314,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539553,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376653,-99) , -16, 3046.1, 0, 0, 0.451425,-99) , -14, -4.11934, 0, 0, 0.531099,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622451,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514455,-99) , -4, 0.45714, 0, 0, 0.577158,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435435,-99) , -12, 0.491125, 0, 0, 0.44656,-99) , -5, 1.1217, 1, 0, 0.474663,-99) , -12, 0.113902, 1, 0, 0.500965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309745,-99) , -12, 0.0165266, 0, 0, 0.496901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269475,-99) , -4, 1.9733, 1, 0, 0.490586,-99) ); - // itree = 914 - fBoostWeights.push_back(0.00661576); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.662567,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639074,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63738,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503223,-99) , -4, 1.113, 1, 0, 0.581122,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566916,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470871,-99) , -4, 1.43808, 0, 0, 0.499141,-99) , -3, 0.951403, 1, 0, 0.523486,-99) , -9, 6.47073, 0, 0, 0.536422,-99) , -9, -6.63011, 1, 0, 0.548011,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659596,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503784,-99) , -3, 0.863534, 1, 0, 0.515899,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237306,-99) , -8, -0.135444, 0, 0, 0.374401,-99) , -2, 8.5, 0, 0, 0.502589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228072,-99) , -3, 0.745075, 0, 0, 0.494039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288835,-99) , -7, 0.10252, 1, 0, 0.483233,-99) , -11, 1.5, 0, 0, 0.505176,-99) ); - // itree = 915 - fBoostWeights.push_back(0.00584944); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659453,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498888,-99) , -3, 0.977278, 1, 0, 0.558084,-99) , -1, 29.5, 1, 0, 0.593788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35134,-99) , -1, 14.5, 0, 0, 0.578771,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434261,-99) , -8, -0.822378, 0, 0, 0.50187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.255154,-99) , -5, 2.44703, 1, 0, 0.498852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176583,-99) , -7, 0.0564826, 1, 0, 0.488999,-99) , -2, 29.5, 0, 0, 0.506287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28545,-99) , -7, 0.173317, 1, 0, 0.502183,-99) ); - // itree = 916 - fBoostWeights.push_back(0.0056287); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645837,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478003,-99) , -8, 0.597472, 1, 0, 0.535234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241684,-99) , -4, 1.86522, 1, 0, 0.516569,-99) , -1, 14.5, 0, 0, 0.563558,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620314,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522292,-99) , -3, 0.997881, 1, 0, 0.587804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454928,-99) , -2, 10.5, 0, 0, 0.558541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392282,-99) , -7, 0.0888218, 1, 0, 0.544448,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478981,-99) , -6, 0.170686, 1, 0, 0.504071,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212512,-99) , -7, 0.00784741, 0, 0, 0.439915,-99) , -12, 0.143357, 1, 0, 0.476804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193333,-99) , -3, 0.99935, 1, 0, 0.469947,-99) , -10, 8506.34, 0, 0, 0.484494,-99) , -9, 5.06034, 0, 0, 0.495037,-99) ); - // itree = 917 - fBoostWeights.push_back(0.00837894); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699887,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585747,-99) , -12, 0.147192, 0, 0, 0.633737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481233,-99) , -3, 0.988654, 1, 0, 0.581139,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609187,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457005,-99) , -9, 3.61507, 0, 0, 0.48914,-99) , -9, -4.56363, 1, 0, 0.510619,-99) , -6, 0.239493, 1, 0, 0.533675,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546072,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149118,-99) , -5, 1.9267, 1, 0, 0.507758,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266495,-99) , -8, 0.838886, 1, 0, 0.444353,-99) , -1, 9.5, 0, 0, 0.517234,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59191,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43886,-99) , -4, 0.926617, 1, 0, 0.474602,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298265,-99) , -9, -6.51584, 1, 0, 0.374825,-99) , -3, 0.996579, 1, 0, 0.454022,-99) , -10, -6297.77, 1, 0, 0.464087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229712,-99) , -4, 1.87409, 1, 0, 0.454594,-99) , -16, 1510.15, 1, 0, 0.485559,-99) ); - // itree = 918 - fBoostWeights.push_back(0.00596722); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456733,-99) , -8, 0.984606, 1, 0, 0.545348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365868,-99) , -5, 2.22308, 1, 0, 0.539946,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611485,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478123,-99) , -12, 0.387652, 0, 0, 0.490924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12945,-99) , -7, 0.030925, 1, 0, 0.478895,-99) , -2, 13.5, 0, 0, 0.510721,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286962,-99) , -2, 44.5, 0, 0, 0.393517,-99) , -1, 40.5, 1, 0, 0.503969,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100329,-99) , -5, 1.55707, 1, 0, 0.365021,-99) , -7, 0.109389, 1, 0, 0.496927,-99) ); - // itree = 919 - fBoostWeights.push_back(0.00505016); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554058,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470224,-99) , -0, 13.5, 0, 0, 0.534185,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448879,-99) , -9, -3.13642, 1, 0, 0.479312,-99) , -4, 1.13726, 1, 0, 0.508406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280616,-99) , -7, 0.00690927, 0, 0, 0.504491,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497117,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345345,-99) , -16, 477.091, 1, 0, 0.420732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261525,-99) , -10, 336.374, 0, 0, 0.383103,-99) , -12, 0.0313775, 0, 0, 0.494143,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273748,-99) , -3, 0.999625, 1, 0, 0.488545,-99) ); - // itree = 920 - fBoostWeights.push_back(0.00456897); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459833,-99) , -12, 0.038432, 0, 0, 0.52857,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0711417,-99) , -4, 2.06626, 1, 0, 0.473424,-99) , -12, 0.185981, 1, 0, 0.512686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384038,-99) , -14, -5.46573, 0, 0, 0.507314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250018,-99) , -7, 0.00667906, 0, 0, 0.503799,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505151,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334552,-99) , -3, 0.994474, 1, 0, 0.447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181181,-99) , -5, 1.71915, 1, 0, 0.404332,-99) , -13, 0.0176856, 1, 0, 0.493826,-99) ); - // itree = 921 - fBoostWeights.push_back(0.0051006); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671726,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584385,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446938,-99) , -8, -0.634197, 0, 0, 0.537981,-99) , -3, 0.951126, 1, 0, 0.573067,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377447,-99) , -15, 0.259943, 1, 0, 0.456825,-99) , -13, 0.00123653, 0, 0, 0.538343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329622,-99) , -15, 2.13223, 1, 0, 0.49067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295385,-99) , -3, 0.730405, 0, 0, 0.485991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0977457,-99) , -7, 0.205443, 1, 0, 0.482178,-99) , -4, 0.760631, 1, 0, 0.499547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279259,-99) , -2, 6.5, 0, 0, 0.495615,-99) ); - // itree = 922 - fBoostWeights.push_back(0.00623771); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646332,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428008,-99) , -13, 0.000638346, 0, 0, 0.568819,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441321,-99) , -2, 14.5, 0, 0, 0.482062,-99) , -4, 0.675943, 1, 0, 0.511299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388511,-99) , -5, 0.433238, 0, 0, 0.502602,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128239,-99) , -4, 2.20635, 1, 0, 0.471824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237311,-99) , -6, 0.974308, 1, 0, 0.45793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28132,-99) , -13, 0.00948815, 1, 0, 0.438904,-99) , -5, 1.65142, 1, 0, 0.47905,-99) , -10, -12473.1, 1, 0, 0.486718,-99) ); - // itree = 923 - fBoostWeights.push_back(0.00572615); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513969,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370037,-99) , -7, 0.102656, 1, 0, 0.504701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167562,-99) , -5, 2.44696, 1, 0, 0.502385,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33033,-99) , -1, 10.5, 0, 0, 0.570742,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346804,-99) , -11, 0.5, 1, 0, 0.383733,-99) , -5, 2.04258, 0, 0, 0.432835,-99) , -14, -3.59902, 0, 0, 0.487792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268671,-99) , -2, 6.5, 0, 0, 0.483564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299571,-99) , -12, 0.0187761, 0, 0, 0.478703,-99) ); - // itree = 924 - fBoostWeights.push_back(0.00507489); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478017,-99) , -6, 0.889667, 1, 0, 0.542308,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328835,-99) , -7, 0.0587737, 1, 0, 0.489088,-99) , -5, 1.46814, 1, 0, 0.515112,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521835,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404339,-99) , -5, 1.59613, 0, 0, 0.474639,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30755,-99) , -0, 12.5, 1, 0, 0.439615,-99) , -2, 9.5, 0, 0, 0.503258,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360911,-99) , -12, 0.129568, 1, 0, 0.441186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.171249,-99) , -4, 1.58763, 1, 0, 0.424958,-99) , -8, -0.896278, 0, 0, 0.494412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285484,-99) , -4, 2.07379, 1, 0, 0.49109,-99) ); - // itree = 925 - fBoostWeights.push_back(0.00473577); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415258,-99) , -14, -4.56086, 0, 0, 0.526931,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482747,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308645,-99) , -6, 0.98753, 1, 0, 0.467005,-99) , -7, 0.0136062, 0, 0, 0.510418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341105,-99) , -12, 0.0182006, 0, 0, 0.505456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320461,-99) , -5, 2.25774, 1, 0, 0.499678,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487905,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242332,-99) , -12, 0.389004, 0, 0, 0.314072,-99) , -4, 0.955124, 1, 0, 0.413875,-99) , -13, 0.0156311, 1, 0, 0.489499,-99) ); - // itree = 926 - fBoostWeights.push_back(0.00660936); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644404,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531032,-99) , -14, -2.16967, 1, 0, 0.600318,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657509,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533834,-99) , -8, 0.0875664, 0, 0, 0.601887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455405,-99) , -8, 0.954838, 1, 0, 0.568756,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544256,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400485,-99) , -10, -710.573, 1, 0, 0.44308,-99) , -9, -2.46747, 1, 0, 0.470335,-99) , -7, 0.0176377, 1, 0, 0.518602,-99) , -2, 24.5, 0, 0, 0.540222,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624386,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364296,-99) , -1, 7.5, 0, 0, 0.48586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328684,-99) , -1, 33.5, 1, 0, 0.476796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110624,-99) , -4, 1.00973, 1, 0, 0.348277,-99) , -7, 0.0802921, 1, 0, 0.466077,-99) , -9, 8.72875, 0, 0, 0.47579,-99) , -11, 1.5, 0, 0, 0.497121,-99) ); - // itree = 927 - fBoostWeights.push_back(0.00646113); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499235,-99) , -6, 0.246026, 1, 0, 0.52412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194015,-99) , -5, 2.2063, 1, 0, 0.51806,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658036,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535335,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399361,-99) , -5, 1.95267, 0, 0, 0.441643,-99) , -12, 0.367911, 0, 0, 0.47085,-99) , -8, 0.920487, 1, 0, 0.504191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311648,-99) , -2, 6.5, 0, 0, 0.500412,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282041,-99) , -5, 1.51571, 1, 0, 0.455138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285839,-99) , -3, 0.9976, 1, 0, 0.412788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138402,-99) , -4, 1.6835, 1, 0, 0.393935,-99) , -13, 0.0188448, 1, 0, 0.49065,-99) ); - // itree = 928 - fBoostWeights.push_back(0.00447045); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398043,-99) , -15, 1.79721, 1, 0, 0.514852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.40016, 1, 0, 0.511203,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578654,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320784,-99) , -15, 0.123646, 1, 0, 0.380501,-99) , -5, 2.04355, 0, 0, 0.443135,-99) , -8, 0.983849, 1, 0, 0.501928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355936,-99) , -3, 0.999634, 1, 0, 0.498004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310631,-99) , -2, 6.5, 0, 0, 0.494594,-99) ); - // itree = 929 - fBoostWeights.push_back(0.00479506); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387339,-99) , -14, -4.99075, 0, 0, 0.536871,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454176,-99) , -4, 0.737171, 1, 0, 0.475096,-99) , -16, 694.883, 1, 0, 0.501617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277837,-99) , -7, 0.00711447, 0, 0, 0.497126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315991,-99) , -5, 0.483291, 0, 0, 0.489365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160581,-99) , -5, 2.38457, 1, 0, 0.485003,-99) ); - // itree = 930 - fBoostWeights.push_back(0.006577); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.72369,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577522,-99) , -5, 1.74801, 0, 0, 0.624923,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648331,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53891,-99) , -4, 1.36168, 0, 0, 0.57935,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39111,-99) , -7, 0.0237894, 0, 0, 0.465451,-99) , -16, 272.001, 1, 0, 0.525976,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110772,-99) , -4, 1.98716, 1, 0, 0.514788,-99) , -11, 0.5, 1, 0, 0.551267,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485341,-99) , -15, 0.206622, 0, 0, 0.558458,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433548,-99) , -13, 0.00264297, 0, 0, 0.474227,-99) , -15, 0.456824, 1, 0, 0.519089,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431858,-99) , -12, 0.17492, 0, 0, 0.527365,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363502,-99) , -8, -0.483489, 0, 0, 0.440034,-99) , -16, 113.481, 1, 0, 0.462081,-99) , -12, 0.111611, 1, 0, 0.488499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286664,-99) , -4, 1.99479, 1, 0, 0.483653,-99) , -10, -249.556, 1, 0, 0.50059,-99) ); - // itree = 931 - fBoostWeights.push_back(0.00535214); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627082,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469885,-99) , -6, 0.573121, 1, 0, 0.529344,-99) , -10, -2972.39, 1, 0, 0.544959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414738,-99) , -7, 0.108959, 1, 0, 0.536131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400332,-99) , -8, -0.945565, 0, 0, 0.525553,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569531,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404019,-99) , -4, -0.151087, 0, 0, 0.511314,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440431,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0247549,-99) , -7, 0.155683, 1, 0, 0.434722,-99) , -4, 0.783542, 1, 0, 0.46123,-99) , -10, -6296.2, 1, 0, 0.470228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29826,-99) , -5, 2.13249, 1, 0, 0.461091,-99) , -16, 262.038, 1, 0, 0.482714,-99) ); - // itree = 932 - fBoostWeights.push_back(0.00641675); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670042,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653741,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627743,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518287,-99) , -10, 8374.11, 0, 0, 0.541374,-99) , -6, 0.186777, 1, 0, 0.571504,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63223,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490842,-99) , -12, 0.437011, 0, 0, 0.500039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150274,-99) , -7, 0.0522105, 1, 0, 0.49201,-99) , -2, 24.5, 0, 0, 0.510785,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414296,-99) , -9, -6.41525, 1, 0, 0.46617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188545,-99) , -5, 2.06228, 1, 0, 0.45073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10253,-99) , -7, 0.129843, 1, 0, 0.429327,-99) , -3, 0.998035, 1, 0, 0.499156,-99) , -10, -14810, 1, 0, 0.504701,-99) ); - // itree = 933 - fBoostWeights.push_back(0.00469937); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672335,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610303,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526133,-99) , -12, 0.0588267, 1, 0, 0.54641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398965,-99) , -14, -4.52442, 0, 0, 0.531722,-99) , -5, 2.22265, 0, 0, 0.543423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401367,-99) , -8, -0.92633, 0, 0, 0.531771,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267177,-99) , -1, 5.5, 0, 0, 0.489751,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122161,-99) , -7, 0.246759, 1, 0, 0.487059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225832,-99) , -1, 74.5, 1, 0, 0.481665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307095,-99) , -3, 0.789411, 0, 0, 0.473236,-99) , -11, 1.5, 0, 0, 0.49346,-99) ); - // itree = 934 - fBoostWeights.push_back(0.0073338); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639063,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374036,-99) , -5, 1.79634, 1, 0, 0.546218,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41124,-99) , -15, 0.380102, 1, 0, 0.466992,-99) , -14, -3.32526, 0, 0, 0.51847,-99) , -4, 1.80788, 0, 0, 0.531139,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517249,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439374,-99) , -8, -0.407167, 0, 0, 0.497204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303739,-99) , -7, 0.105872, 1, 0, 0.488626,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597562,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221068,-99) , -16, 485.866, 1, 0, 0.310443,-99) , -10, 9617.38, 0, 0, 0.364726,-99) , -5, 1.92663, 1, 0, 0.46884,-99) , -12, 0.101688, 1, 0, 0.496039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24402,-99) , -3, 0.999624, 1, 0, 0.490117,-99) ); - // itree = 935 - fBoostWeights.push_back(0.00618638); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461792,-99) , -8, 0.974418, 1, 0, 0.524708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312432,-99) , -2, 6.5, 0, 0, 0.520279,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409369,-99) , -10, 1507.14, 1, 0, 0.444717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.137525,-99) , -4, 1.75371, 1, 0, 0.436129,-99) , -8, -0.897326, 0, 0, 0.510737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.413448,-99) , -3, 0.997771, 1, 0, 0.525872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303974,-99) , -2, 36.5, 0, 0, 0.482547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0629367,-99) , -1, 14.5, 0, 0, 0.43462,-99) , -7, 0.0587747, 1, 0, 0.499737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21058,-99) , -5, 2.45779, 1, 0, 0.497094,-99) ); - // itree = 936 - fBoostWeights.push_back(0.00396748); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.681658,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165459,-99) , -7, 0.108122, 1, 0, 0.499723,-99) , -2, 52.5, 0, 0, 0.507263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363585,-99) , -1, 53.5, 1, 0, 0.50099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266567,-99) , -15, 4.47824, 1, 0, 0.497291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.56475, 1, 0, 0.49527,-99) ); - // itree = 937 - fBoostWeights.push_back(0.00407248); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612327,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50934,-99) , -6, 0.74389, 1, 0, 0.572473,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472257,-99) , -4, 0.903352, 1, 0, 0.494017,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330367,-99) , -3, 0.999575, 1, 0, 0.48966,-99) , -9, -6.53822, 1, 0, 0.497363,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27028,-99) , -2, 6.5, 0, 0, 0.493139,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174483,-99) , -14, -3.31418, 1, 0, 0.357755,-99) , -4, 1.8399, 1, 0, 0.485678,-99) ); - // itree = 938 - fBoostWeights.push_back(0.00592262); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658141,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372481,-99) , -15, 0.0410647, 0, 0, 0.515399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39369,-99) , -15, 0.141689, 1, 0, 0.435364,-99) , -8, 0.915036, 1, 0, 0.496983,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392084,-99) , -7, 0.0138287, 0, 0, 0.495894,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259078,-99) , -14, -3.07241, 1, 0, 0.424762,-99) , -5, 1.93573, 1, 0, 0.486466,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157651,-99) , -3, 0.998037, 1, 0, 0.373555,-99) , -13, 0.0252675, 1, 0, 0.479777,-99) , -12, 0.539953, 0, 0, 0.485857,-99) ); - // itree = 939 - fBoostWeights.push_back(0.00342608); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488349,-99) , -10, 5210.56, 0, 0, 0.502764,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17194,-99) , -7, 0.0300902, 1, 0, 0.451782,-99) , -1, 9.5, 0, 0, 0.492692,-99) , -10, -12095.8, 1, 0, 0.496642,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312443,-99) , -12, 0.129949, 1, 0, 0.421318,-99) , -3, 0.999068, 1, 0, 0.490732,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285224,-99) , -2, 6.5, 0, 0, 0.486883,-99) ); - // itree = 940 - fBoostWeights.push_back(0.00535713); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616614,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237352,-99) , -0, 55.5, 1, 0, 0.502593,-99) , -2, 42.5, 0, 0, 0.513203,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148062,-99) , -5, 2.08839, 1, 0, 0.542283,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33867,-99) , -9, -3.94169, 1, 0, 0.409988,-99) , -9, 4.76371, 0, 0, 0.455846,-99) , -3, 0.996215, 1, 0, 0.49834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.182869,-99) , -7, 0.25096, 1, 0, 0.495638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281869,-99) , -2, 6.5, 0, 0, 0.491322,-99) ); - // itree = 941 - fBoostWeights.push_back(0.00321957); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651859,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543825,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491308,-99) , -2, 18.5, 0, 0, 0.510438,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280104,-99) , -3, 0.989748, 1, 0, 0.412788,-99) , -12, 0.0265438, 0, 0, 0.504025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161972,-99) , -13, 0.0778749, 1, 0, 0.501053,-99) , -12, 0.537642, 0, 0, 0.505975,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154304,-99) , -5, 2.59392, 1, 0, 0.504646,-99) ); - // itree = 942 - fBoostWeights.push_back(0.00650361); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606577,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627451,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395173,-99) , -4, 1.77213, 1, 0, 0.508365,-99) , -9, -7.61528, 1, 0, 0.517556,-99) , -0, 10.5, 1, 0, 0.527953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356472,-99) , -15, 2.61245, 1, 0, 0.519053,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609042,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512066,-99) , -1, 10.5, 0, 0, 0.581979,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382358,-99) , -8, 0.642713, 1, 0, 0.484966,-99) , -11, 0.5, 1, 0, 0.545162,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337848,-99) , -12, 0.0227741, 0, 0, 0.417151,-99) , -12, 0.0368721, 0, 0, 0.515384,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459675,-99) , -15, 0.0521735, 1, 0, 0.479756,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0805095,-99) , -5, 2.15746, 1, 0, 0.350988,-99) , -7, 0.0130063, 0, 0, 0.442736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28076,-99) , -7, 0.053183, 1, 0, 0.423834,-99) , -12, 0.113376, 1, 0, 0.46423,-99) , -16, 1042.58, 1, 0, 0.489682,-99) ); - // itree = 943 - fBoostWeights.push_back(0.00808047); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670508,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627261,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527577,-99) , -3, 0.938999, 1, 0, 0.549919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410661,-99) , -8, 0.980733, 1, 0, 0.53557,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561223,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399176,-99) , -6, 0.976383, 0, 0, 0.44382,-99) , -9, 4.90688, 0, 0, 0.463382,-99) , -6, 0.61412, 1, 0, 0.502811,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367992,-99) , -1, 9.5, 0, 0, 0.519193,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396989,-99) , -10, -3076.68, 1, 0, 0.416846,-99) , -16, 527.139, 1, 0, 0.459989,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281599,-99) , -15, 0.102377, 0, 0, 0.412206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164284,-99) , -5, 1.89061, 1, 0, 0.331941,-99) , -13, 0.00325118, 1, 0, 0.427368,-99) , -5, 1.6491, 1, 0, 0.475487,-99) , -12, 0.534864, 0, 0, 0.481754,-99) ); - // itree = 944 - fBoostWeights.push_back(0.00608894); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61973,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514358,-99) , -5, 0.833537, 0, 0, 0.581868,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274226,-99) , -13, 0.0131215, 1, 0, 0.486113,-99) , -5, 1.39138, 1, 0, 0.541054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.139453,-99) , -1, 9.5, 0, 0, 0.527861,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504533,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454493,-99) , -6, 0.532254, 1, 0, 0.482041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282245,-99) , -5, 2.32316, 1, 0, 0.477348,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140971,-99) , -7, 0.0510567, 1, 0, 0.469997,-99) , -2, 22.5, 0, 0, 0.486004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301937,-99) , -15, 4.38232, 1, 0, 0.483439,-99) ); - // itree = 945 - fBoostWeights.push_back(0.00482223); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631376,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518304,-99) , -6, 0.811088, 1, 0, 0.591067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637479,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539329,-99) , -13, 0.00400562, 1, 0, 0.587499,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307194,-99) , -15, 0.0351609, 0, 0, 0.492278,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469828,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.138934,-99) , -5, 1.35019, 1, 0, 0.360245,-99) , -13, 0.0186871, 1, 0, 0.482157,-99) , -12, 0.386907, 0, 0, 0.49083,-99) , -9, -7.24913, 1, 0, 0.498869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322763,-99) , -4, 1.99479, 1, 0, 0.494332,-99) ); - // itree = 946 - fBoostWeights.push_back(0.00675594); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666059,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483541,-99) , -11, 1.5, 0, 0, 0.546495,-99) , -12, 0.0596471, 1, 0, 0.584694,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638663,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562889,-99) , -3, 0.979715, 0, 0, 0.600576,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405367,-99) , -8, 0.924263, 1, 0, 0.503776,-99) , -12, 0.202057, 0, 0, 0.530062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390454,-99) , -3, 0.998129, 1, 0, 0.509447,-99) , -16, 133.107, 0, 0, 0.533657,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492012,-99) , -13, 0.0181362, 1, 0, 0.572704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447441,-99) , -8, -0.915511, 0, 0, 0.544968,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415619,-99) , -7, 0.0430786, 1, 0, 0.483172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367489,-99) , -2, 10.5, 0, 0, 0.458788,-99) , -8, 0.434813, 1, 0, 0.510814,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44442,-99) , -3, 0.976684, 1, 0, 0.477438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331374,-99) , -3, 0.940161, 0, 0, 0.445245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0503803,-99) , -7, 0.113066, 1, 0, 0.436275,-99) , -5, 1.65314, 1, 0, 0.483884,-99) , -16, 527.72, 1, 0, 0.503793,-99) ); - // itree = 947 - fBoostWeights.push_back(0.00564828); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660834,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427383,-99) , -7, 0.0144369, 0, 0, 0.516298,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468983,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0997236,-99) , -13, 0.0229768, 1, 0, 0.457565,-99) , -5, 1.4799, 1, 0, 0.486094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237477,-99) , -3, 0.999716, 1, 0, 0.481776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.103467,-99) , -5, 2.48278, 1, 0, 0.479043,-99) , -12, 0.526853, 0, 0, 0.485991,-99) ); - // itree = 948 - fBoostWeights.push_back(0.0064123); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675826,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615143,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510835,-99) , -5, 1.65355, 0, 0, 0.550002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.222007,-99) , -5, 2.05226, 1, 0, 0.532008,-99) , -1, 14.5, 0, 0, 0.584423,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652657,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467508,-99) , -6, 0.589991, 1, 0, 0.498905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384748,-99) , -14, -4.65025, 0, 0, 0.491463,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632888,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40354,-99) , -6, 0.354882, 0, 0, 0.52891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198488,-99) , -8, 0.908296, 0, 0, 0.409464,-99) , -5, 1.99464, 1, 0, 0.482233,-99) , -12, 0.520728, 0, 0, 0.488757,-99) , -10, -4431.99, 1, 0, 0.500396,-99) ); - // itree = 949 - fBoostWeights.push_back(0.00586965); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.695597,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563367,-99) , -4, 1.49382, 0, 0, 0.61524,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440727,-99) , -8, 0.977814, 1, 0, 0.516188,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314632,-99) , -5, 2.24263, 1, 0, 0.510247,-99) , -15, 0.0645816, 1, 0, 0.519877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294417,-99) , -3, 0.999686, 1, 0, 0.51439,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595489,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39371,-99) , -5, 1.92194, 0, 0, 0.449048,-99) , -0, 11.5, 1, 0, 0.519245,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411055,-99) , -3, 0.96257, 1, 0, 0.443586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.113114,-99) , -5, 2.21073, 1, 0, 0.434654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.197495,-99) , -3, 0.912066, 0, 0, 0.40604,-99) , -6, 0.314852, 1, 0, 0.452867,-99) , -7, 0.0138054, 0, 0, 0.498898,-99) ); - // itree = 950 - fBoostWeights.push_back(0.00395961); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439623,-99) , -13, 0.00158128, 1, 0, 0.60737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389473,-99) , -7, 0.00869173, 0, 0, 0.507234,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44496,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337556,-99) , -8, 0.998845, 0, 0, 0.392377,-99) , -14, -4.57871, 0, 0, 0.498391,-99) , -4, 1.80646, 0, 0, 0.505136,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281052,-99) , -7, 0.0305632, 1, 0, 0.394394,-99) , -3, 0.999224, 1, 0, 0.497945,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358708,-99) , -5, 2.17267, 1, 0, 0.491562,-99) ); - // itree = 951 - fBoostWeights.push_back(0.00317955); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611201,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490833,-99) , -12, 0.101688, 1, 0, 0.51498,-99) , -9, 5.63099, 0, 0, 0.524597,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369357,-99) , -8, -0.896593, 0, 0, 0.489465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306634,-99) , -3, 0.866863, 0, 0, 0.478467,-99) , -6, 0.767359, 1, 0, 0.51018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361552,-99) , -3, 0.999624, 1, 0, 0.506316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269718,-99) , -2, 6.5, 0, 0, 0.502061,-99) ); - // itree = 952 - fBoostWeights.push_back(0.00680309); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.685282,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539854,-99) , -10, 2395.49, 0, 0, 0.633593,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586448,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416748,-99) , -2, 12.5, 0, 0, 0.498999,-99) , -9, 0.396848, 0, 0, 0.538511,-99) , -4, 1.51026, 0, 0, 0.561067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569166,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391099,-99) , -9, -4.03425, 1, 0, 0.456761,-99) , -9, 3.28786, 0, 0, 0.502156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.148535,-99) , -4, 2.0754, 1, 0, 0.494822,-99) , -3, 0.989765, 1, 0, 0.531576,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594795,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511319,-99) , -10, 7346.01, 0, 0, 0.52986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403134,-99) , -8, -0.969631, 0, 0, 0.515589,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452497,-99) , -8, 0.991414, 0, 0, 0.493965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361831,-99) , -10, 4958.01, 1, 0, 0.454138,-99) , -8, 0.718471, 1, 0, 0.495165,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538778,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172369,-99) , -8, -0.809799, 0, 0, 0.393478,-99) , -15, 0.22832, 0, 0, 0.439948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264136,-99) , -0, 35.5, 1, 0, 0.4149,-99) , -4, 1.38322, 1, 0, 0.472331,-99) , -16, 506.854, 1, 0, 0.495649,-99) ); - // itree = 953 - fBoostWeights.push_back(0.00722068); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640735,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563748,-99) , -2, 29.5, 0, 0, 0.587774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479153,-99) , -7, 0.0149195, 0, 0, 0.564742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442381,-99) , -5, 0.567326, 0, 0, 0.548717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371822,-99) , -12, 0.032964, 0, 0, 0.532441,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665698,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510511,-99) , -13, 0.000309058, 1, 0, 0.550506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423362,-99) , -14, -4.30727, 0, 0, 0.530615,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385964,-99) , -8, -0.561839, 0, 0, 0.500364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568759,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385683,-99) , -2, 27.5, 0, 0, 0.407283,-99) , -11, 0.5, 1, 0, 0.453322,-99) , -16, 272.928, 1, 0, 0.478969,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242679,-99) , -7, 0.0888474, 1, 0, 0.468654,-99) , -5, 1.37387, 1, 0, 0.493083,-99) ); - // itree = 954 - fBoostWeights.push_back(0.00651058); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564995,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5129,-99) , -10, 517.088, 1, 0, 0.529325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22956,-99) , -4, 2.06953, 1, 0, 0.527456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373327,-99) , -5, 2.2428, 1, 0, 0.522042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205882,-99) , -6, 0.34756, 1, 0, 0.324954,-99) , -16, 1183.92, 1, 0, 0.424747,-99) , -3, 0.889538, 0, 0, 0.510542,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549122,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300033,-99) , -3, 0.983659, 0, 0, 0.437575,-99) , -4, 0.780098, 1, 0, 0.489574,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.1383,-99) , -5, 2.01357, 1, 0, 0.473972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204775,-99) , -3, 0.997855, 1, 0, 0.423023,-99) , -13, 0.0139742, 1, 0, 0.498917,-99) ); - // itree = 955 - fBoostWeights.push_back(0.00428744); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646614,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598154,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454167,-99) , -13, 0.00217573, 0, 0, 0.531371,-99) , -4, 1.58506, 0, 0, 0.562813,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473936,-99) , -12, 0.100786, 1, 0, 0.496707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344595,-99) , -12, 0.0181796, 0, 0, 0.492463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279249,-99) , -5, 2.49125, 1, 0, 0.490468,-99) , -9, -4.13737, 1, 0, 0.503152,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498819,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294621,-99) , -12, 0.250415, 0, 0, 0.366603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144984,-99) , -4, 1.45381, 1, 0, 0.33669,-99) , -16, 291.55, 1, 0, 0.394557,-99) , -13, 0.0166254, 1, 0, 0.491902,-99) ); - // itree = 956 - fBoostWeights.push_back(0.00578048); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644666,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596315,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432248,-99) , -7, 0.0275196, 1, 0, 0.502022,-99) , -2, 27.5, 0, 0, 0.52762,-99) , -4, 0.280881, 1, 0, 0.551269,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680768,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543527,-99) , -16, 20.4596, 1, 0, 0.583097,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453015,-99) , -3, 0.964519, 1, 0, 0.489717,-99) , -4, 1.41567, 0, 0, 0.533335,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251134,-99) , -1, 6.5, 0, 0, 0.458943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.43528, 1, 0, 0.45417,-99) , -11, 1.5, 0, 0, 0.48227,-99) , -5, 1.37866, 1, 0, 0.507418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361137,-99) , -5, 0.422278, 0, 0, 0.501299,-99) ); - // itree = 957 - fBoostWeights.push_back(0.00607427); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59396,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669113,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534802,-99) , -5, 2.07784, 0, 0, 0.558733,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360113,-99) , -8, 0.046448, 0, 0, 0.474533,-99) , -11, 1.5, 0, 0, 0.521242,-99) , -4, 0.705327, 1, 0, 0.540671,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614368,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491447,-99) , -15, 0.262949, 1, 0, 0.544534,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454824,-99) , -7, 0.0162586, 0, 0, 0.522075,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537565,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455124,-99) , -6, 0.635052, 0, 0, 0.485487,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350443,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0883674,-99) , -4, 1.75734, 1, 0, 0.326338,-99) , -13, 0.0059938, 1, 0, 0.457377,-99) , -5, 1.38585, 1, 0, 0.482278,-99) , -16, 487.115, 1, 0, 0.504691,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397362,-99) , -15, 0.17665, 0, 0, 0.459039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329719,-99) , -3, 0.99652, 1, 0, 0.431521,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.12462, 1, 0, 0.420899,-99) , -8, -0.882629, 0, 0, 0.495168,-99) ); - // itree = 958 - fBoostWeights.push_back(0.00309981); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428771,-99) , -1, 7.5, 0, 0, 0.507795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386804,-99) , -8, -0.984885, 0, 0, 0.502601,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244178,-99) , -2, 57.5, 0, 0, 0.384173,-99) , -1, 50.5, 1, 0, 0.496331,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340799,-99) , -4, 1.97635, 1, 0, 0.491922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154386,-99) , -7, 0.253137, 1, 0, 0.48947,-99) ); - // itree = 959 - fBoostWeights.push_back(0.00618513); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649159,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545767,-99) , -0, 15.5, 0, 0, 0.60849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480969,-99) , -13, 0.0144391, 1, 0, 0.583768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461215,-99) , -6, 0.581003, 1, 0, 0.554119,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527551,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394885,-99) , -5, 1.32654, 1, 0, 0.45762,-99) , -8, 0.912556, 1, 0, 0.533316,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486893,-99) , -6, 1.01135, 0, 0, 0.498797,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25113,-99) , -0, 20.5, 1, 0, 0.361714,-99) , -3, 0.88944, 0, 0, 0.48504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335243,-99) , -7, 0.0090227, 0, 0, 0.473618,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.205995,-99) , -7, 0.136897, 1, 0, 0.467742,-99) , -4, 0.917753, 1, 0, 0.493124,-99) ); - // itree = 960 - fBoostWeights.push_back(0.0037758); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464139,-99) , -13, 0.00283327, 0, 0, 0.581305,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448323,-99) , -8, -0.66313, 0, 0, 0.501069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342092,-99) , -7, 0.0559281, 1, 0, 0.493343,-99) , -2, 38.5, 0, 0, 0.502169,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301168,-99) , -1, 69.5, 1, 0, 0.498272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275452,-99) , -7, 0.172989, 1, 0, 0.494028,-99) ); - // itree = 961 - fBoostWeights.push_back(0.00668775); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.649405,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544311,-99) , -8, 0.123659, 1, 0, 0.594021,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423562,-99) , -3, 0.985373, 1, 0, 0.498222,-99) , -8, -0.578671, 0, 0, 0.555812,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373886,-99) , -15, 0.294373, 1, 0, 0.459345,-99) , -13, 0.00168638, 0, 0, 0.523152,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493766,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322278,-99) , -4, 2.07555, 1, 0, 0.489134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290981,-99) , -12, 0.0198393, 0, 0, 0.482695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254946,-99) , -7, 0.0069475, 0, 0, 0.477642,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273326,-99) , -8, -0.635347, 1, 0, 0.393545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.154343,-99) , -5, 1.7988, 1, 0, 0.346037,-99) , -13, 0.0115952, 1, 0, 0.461162,-99) , -4, 0.913059, 1, 0, 0.485579,-99) ); - // itree = 962 - fBoostWeights.push_back(0.00654658); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656358,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541658,-99) , -15, 1.50049, 0, 0, 0.554558,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460418,-99) , -3, 0.995786, 0, 0, 0.49053,-99) , -6, 0.85028, 1, 0, 0.537144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356436,-99) , -2, 8.5, 0, 0, 0.531156,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426555,-99) , -9, 4.74761, 0, 0, 0.473601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156513,-99) , -5, 2.08409, 1, 0, 0.460851,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.085931,-99) , -7, 0.19082, 1, 0, 0.445338,-99) , -3, 0.997677, 1, 0, 0.51476,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58955,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530258,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410893,-99) , -14, -3.32971, 0, 0, 0.479137,-99) , -15, 0.0377613, 1, 0, 0.498588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286898,-99) , -0, 12.5, 1, 0, 0.376303,-99) , -13, 0.00347859, 1, 0, 0.469628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318487,-99) , -5, 2.02275, 1, 0, 0.452677,-99) , -7, 0.0147799, 0, 0, 0.497151,-99) ); - // itree = 963 - fBoostWeights.push_back(0.00690056); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63164,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488616,-99) , -4, 0.795972, 0, 0, 0.520763,-99) , -3, 0.945974, 1, 0, 0.549499,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453737,-99) , -2, 18.5, 0, 0, 0.505421,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357318,-99) , -4, 1.16609, 0, 0, 0.416959,-99) , -13, 0.00235918, 0, 0, 0.472444,-99) , -6, 0.608914, 1, 0, 0.513723,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587203,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28938,-99) , -7, 0.0266846, 1, 0, 0.440106,-99) , -1, 26.5, 0, 0, 0.459083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142169,-99) , -1, 60.5, 1, 0, 0.451348,-99) , -5, 1.65155, 1, 0, 0.490813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24403,-99) , -2, 6.5, 0, 0, 0.486598,-99) ); - // itree = 964 - fBoostWeights.push_back(0.0061558); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676161,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545526,-99) , -12, 0.171776, 1, 0, 0.628236,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496822,-99) , -13, 0.00120827, 0, 0, 0.585362,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161083,-99) , -5, 2.08558, 1, 0, 0.570505,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636859,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524976,-99) , -16, 3613.87, 1, 0, 0.592157,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343971,-99) , -1, 34.5, 1, 0, 0.494561,-99) , -2, 44.5, 0, 0, 0.503694,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432473,-99) , -3, 0.998739, 0, 0, 0.5064,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333173,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0895669,-99) , -13, 0.019553, 1, 0, 0.296713,-99) , -9, -5.1608, 1, 0, 0.403347,-99) , -3, 0.997629, 1, 0, 0.48964,-99) , -9, 5.79329, 0, 0, 0.49911,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149318,-99) , -5, 2.49133, 1, 0, 0.49666,-99) ); - // itree = 965 - fBoostWeights.push_back(0.00820759); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370973,-99) , -8, -0.98298, 0, 0, 0.541473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0708515,-99) , -4, 1.84728, 1, 0, 0.537347,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623921,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302347,-99) , -6, 0.332737, 0, 0, 0.378216,-99) , -5, 2.08756, 0, 0, 0.44,-99) , -8, 0.97921, 1, 0, 0.520342,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402278,-99) , -12, 0.0489259, 0, 0, 0.497296,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100249,-99) , -7, 0.205497, 1, 0, 0.488771,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431947,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.218856,-99) , -4, 1.44686, 1, 0, 0.356998,-99) , -3, 0.969266, 0, 0, 0.457674,-99) , -6, 0.672029, 1, 0, 0.497198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0969559,-99) , -5, 2.47708, 1, 0, 0.494078,-99) ); - // itree = 966 - fBoostWeights.push_back(0.00519717); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.669526,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553441,-99) , -16, 1614.08, 1, 0, 0.619647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492235,-99) , -1, 12.5, 0, 0, 0.575791,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52009,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419922,-99) , -3, 0.889117, 0, 0, 0.509051,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198257,-99) , -2, 15.5, 0, 0, 0.456631,-99) , -7, 0.0282928, 1, 0, 0.489761,-99) , -6, 0.0979775, 1, 0, 0.501661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290571,-99) , -14, -5.69147, 0, 0, 0.496898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334303,-99) , -5, 2.25696, 1, 0, 0.492051,-99) ); - // itree = 967 - fBoostWeights.push_back(0.00527781); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410684,-99) , -7, 0.0215018, 0, 0, 0.537308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366248,-99) , -1, 63.5, 1, 0, 0.524426,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517162,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44856,-99) , -16, 2483.93, 1, 0, 0.483076,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0964549,-99) , -2, 11.5, 0, 0, 0.328805,-99) , -7, 0.0268626, 1, 0, 0.466552,-99) , -2, 17.5, 0, 0, 0.490196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297414,-99) , -12, 0.016565, 0, 0, 0.486326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123639,-99) , -7, 0.32389, 1, 0, 0.484897,-99) ); - // itree = 968 - fBoostWeights.push_back(0.00555097); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692707,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566633,-99) , -7, 0.0503713, 0, 0, 0.625174,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455875,-99) , -10, 3231.53, 1, 0, 0.516459,-99) , -1, 30.5, 1, 0, 0.5789,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366893,-99) , -0, 29.5, 1, 0, 0.513304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195504,-99) , -4, 2.23919, 1, 0, 0.511631,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2181,-99) , -2, 15.5, 0, 0, 0.389848,-99) , -7, 0.0358014, 1, 0, 0.501135,-99) , -2, 26.5, 0, 0, 0.514508,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50059,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352135,-99) , -3, 0.995665, 1, 0, 0.453267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0759349,-99) , -1, 17.5, 0, 0, 0.396792,-99) , -7, 0.0866128, 1, 0, 0.505333,-99) ); - // itree = 969 - fBoostWeights.push_back(0.00502992); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.689651,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544333,-99) , -12, 0.164796, 0, 0, 0.621935,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300991,-99) , -7, 0.107757, 1, 0, 0.547845,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5236,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442744,-99) , -9, -1.21583, 1, 0, 0.486948,-99) , -10, 845.625, 1, 0, 0.506416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293086,-99) , -5, 2.14761, 1, 0, 0.498346,-99) , -8, 0.993313, 0, 0, 0.508242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356827,-99) , -14, -5.44644, 0, 0, 0.502755,-99) ); - // itree = 970 - fBoostWeights.push_back(0.0049171); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552902,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483988,-99) , -8, 0.919516, 1, 0, 0.531958,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411304,-99) , -11, 1.5, 0, 0, 0.460374,-99) , -6, 0.915621, 1, 0, 0.516555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378042,-99) , -8, -0.983971, 0, 0, 0.51052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370537,-99) , -3, 0.759303, 0, 0, 0.504607,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291478,-99) , -4, 1.32488, 1, 0, 0.428606,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142904,-99) , -13, 0.0138977, 1, 0, 0.380292,-99) , -3, 0.999128, 1, 0, 0.49578,-99) ); - // itree = 971 - fBoostWeights.push_back(0.00428946); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571039,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447117,-99) , -5, 0.555434, 0, 0, 0.554617,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203363,-99) , -7, 0.246898, 1, 0, 0.502442,-99) , -4, 0.902138, 1, 0, 0.522996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385575,-99) , -14, -5.31569, 0, 0, 0.518209,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384406,-99) , -8, -0.984913, 0, 0, 0.512342,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151013,-99) , -8, 0.954571, 0, 0, 0.375883,-99) , -5, 2.15977, 1, 0, 0.505236,-99) ); - // itree = 972 - fBoostWeights.push_back(0.00621299); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.715495,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559598,-99) , -4, 1.73227, 0, 0, 0.574836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291038,-99) , -1, 12.5, 0, 0, 0.558866,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304827,-99) , -5, 2.23566, 1, 0, 0.501056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168662,-99) , -7, 0.0502075, 1, 0, 0.49183,-99) , -2, 24.5, 0, 0, 0.510544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348674,-99) , -3, 0.999624, 1, 0, 0.506063,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238113,-99) , -15, 0.0470408, 0, 0, 0.3777,-99) , -7, 0.00920928, 0, 0, 0.497218,-99) ); - // itree = 973 - fBoostWeights.push_back(0.00474606); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641732,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489861,-99) , -6, 0.313094, 1, 0, 0.50925,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0736969,-99) , -4, 1.51228, 1, 0, 0.425253,-99) , -13, 0.0142132, 1, 0, 0.498811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296877,-99) , -15, 4.10052, 1, 0, 0.495242,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264082,-99) , -1, 11.5, 1, 0, 0.401246,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0769163,-99) , -4, 1.76911, 1, 0, 0.377514,-99) , -15, 0.0468629, 0, 0, 0.486123,-99) , -12, 0.513942, 0, 0, 0.491832,-99) ); - // itree = 974 - fBoostWeights.push_back(0.00574617); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667075,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552647,-99) , -9, 2.42616, 0, 0, 0.581707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469582,-99) , -14, -3.0911, 0, 0, 0.555612,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522179,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373453,-99) , -9, -1.64979, 1, 0, 0.431986,-99) , -10, 1653.23, 1, 0, 0.46928,-99) , -0, 15.5, 0, 0, 0.526568,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490785,-99) , -9, -3.15769, 1, 0, 0.522264,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501119,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407262,-99) , -16, 416.954, 1, 0, 0.440292,-99) , -12, 0.0790012, 1, 0, 0.465453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272425,-99) , -15, 1.91539, 1, 0, 0.457572,-99) , -4, 0.988162, 1, 0, 0.48628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358554,-99) , -5, 0.506585, 0, 0, 0.480698,-99) ); - // itree = 975 - fBoostWeights.push_back(0.00537322); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65702,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534985,-99) , -16, 33.6729, 0, 0, 0.56144,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486098,-99) , -0, 30.5, 0, 0, 0.497259,-99) , -16, 71.7883, 1, 0, 0.512047,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325737,-99) , -0, 54.5, 1, 0, 0.507997,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216252,-99) , -5, 2.49352, 1, 0, 0.505823,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557134,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467426,-99) , -0, 65.5, 0, 0, 0.523156,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308454,-99) , -1, 87.5, 1, 0, 0.490079,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15483,-99) , -1, 20.5, 0, 0, 0.423645,-99) , -7, 0.0652397, 1, 0, 0.495194,-99) ); - // itree = 976 - fBoostWeights.push_back(0.00782159); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.709481,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572399,-99) , -5, 1.73367, 0, 0, 0.616298,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65367,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538902,-99) , -13, 0.00737397, 0, 0, 0.597469,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445687,-99) , -6, 0.938286, 1, 0, 0.561481,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373297,-99) , -5, 1.93223, 0, 0, 0.430658,-99) , -8, 0.680512, 1, 0, 0.507419,-99) , -11, 0.5, 1, 0, 0.541098,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476823,-99) , -8, -0.145145, 0, 0, 0.541286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374718,-99) , -12, 0.0285894, 0, 0, 0.530414,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509086,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355481,-99) , -3, 0.990653, 0, 0, 0.446417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0828012,-99) , -7, 0.0443506, 1, 0, 0.43205,-99) , -1, 10.5, 0, 0, 0.502581,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36854,-99) , -13, 0.0102343, 1, 0, 0.459493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297797,-99) , -9, 0.122648, 0, 0, 0.444252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22704,-99) , -5, 2.11894, 1, 0, 0.431171,-99) , -9, -0.0625173, 1, 0, 0.477134,-99) , -10, -681.711, 1, 0, 0.491737,-99) ); - // itree = 977 - fBoostWeights.push_back(0.00600482); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648539,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56329,-99) , -16, 408.765, 1, 0, 0.595243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400013,-99) , -14, -3.55419, 0, 0, 0.562201,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459758,-99) , -6, 0.67545, 1, 0, 0.548895,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484603,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399877,-99) , -8, -0.837916, 0, 0, 0.473209,-99) , -9, 4.17726, 0, 0, 0.485837,-99) , -4, 0.505692, 1, 0, 0.50008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375266,-99) , -5, 0.428077, 0, 0, 0.494438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240435,-99) , -3, 0.972302, 0, 0, 0.454052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.185584,-99) , -13, 0.000847541, 1, 0, 0.365306,-99) , -4, 1.7664, 1, 0, 0.484463,-99) ); - // itree = 978 - fBoostWeights.push_back(0.00513633); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589798,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244929,-99) , -1, 13.5, 0, 0, 0.571557,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269354,-99) , -7, 0.0497458, 1, 0, 0.489028,-99) , -2, 30.5, 0, 0, 0.501189,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51132,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275272,-99) , -2, 53.5, 0, 0, 0.404135,-99) , -15, 1.71454, 1, 0, 0.495304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340389,-99) , -3, 0.99965, 1, 0, 0.491311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251929,-99) , -7, 0.007377, 0, 0, 0.48651,-99) ); - // itree = 979 - fBoostWeights.push_back(0.00432178); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674964,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608036,-99) , -10, 3712.88, 0, 0, 0.640763,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509372,-99) , -11, 1.5, 0, 0, 0.588989,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570694,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471063,-99) , -4, 0.733281, 1, 0, 0.520146,-99) , -5, 1.54028, 0, 0, 0.555344,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480328,-99) , -5, 1.49728, 1, 0, 0.50846,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.63625, 1, 0, 0.424519,-99) , -8, -0.845278, 0, 0, 0.497328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301215,-99) , -3, 0.730104, 0, 0, 0.492409,-99) , -16, 67.3609, 1, 0, 0.507299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187242,-99) , -5, 2.48979, 1, 0, 0.504855,-99) ); - // itree = 980 - fBoostWeights.push_back(0.00757155); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620711,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50476,-99) , -10, 4265.02, 1, 0, 0.575375,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272719,-99) , -7, 0.0497458, 1, 0, 0.508664,-99) , -2, 30.5, 0, 0, 0.526817,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.100921,-99) , -7, 0.108196, 1, 0, 0.402527,-99) , -3, 0.999139, 1, 0, 0.516184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298,-99) , -12, 0.0195631, 0, 0, 0.510067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500308,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376543,-99) , -0, 14.5, 1, 0, 0.486669,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281482,-99) , -15, 0.0844782, 0, 0, 0.394727,-99) , -8, -0.558505, 0, 0, 0.46572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250075,-99) , -4, 1.89828, 1, 0, 0.45666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13625,-99) , -7, 0.0273527, 1, 0, 0.442219,-99) , -2, 11.5, 0, 0, 0.488775,-99) ); - // itree = 981 - fBoostWeights.push_back(0.00400932); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481334,-99) , -8, 0.934525, 1, 0, 0.532144,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48497,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262226,-99) , -3, 0.838599, 0, 0, 0.473988,-99) , -6, 0.678546, 1, 0, 0.510551,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35019,-99) , -8, -0.984585, 0, 0, 0.504838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298409,-99) , -7, 0.00730086, 0, 0, 0.50023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280507,-99) , -3, 0.999638, 1, 0, 0.495085,-99) ); - // itree = 982 - fBoostWeights.push_back(0.00537731); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458212,-99) , -8, 0.862594, 1, 0, 0.495946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330178,-99) , -15, 0.0363229, 0, 0, 0.491685,-99) , -12, 0.387715, 0, 0, 0.499714,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398953,-99) , -9, -2.4547, 1, 0, 0.465882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.143729,-99) , -3, 0.999202, 1, 0, 0.446632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0318626,-99) , -8, -0.258261, 0, 0, 0.400783,-99) , -4, 1.69971, 1, 0, 0.489286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24429,-99) , -2, 6.5, 0, 0, 0.48519,-99) ); - // itree = 983 - fBoostWeights.push_back(0.0049196); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657812,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432019,-99) , -1, 40.5, 1, 0, 0.552327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.121608,-99) , -5, 2.11217, 1, 0, 0.450667,-99) , -7, 0.0128946, 0, 0, 0.527195,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487023,-99) , -2, 65.5, 0, 0, 0.494417,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0404691,-99) , -4, 1.8399, 1, 0, 0.396052,-99) , -16, 2459.04, 1, 0, 0.472568,-99) , -11, 0.5, 1, 0, 0.490316,-99) , -9, 12.2621, 0, 0, 0.494562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302989,-99) , -3, 0.999638, 1, 0, 0.489738,-99) ); - // itree = 984 - fBoostWeights.push_back(0.00764042); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628355,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592001,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41967,-99) , -3, 0.996568, 1, 0, 0.491955,-99) , -10, 7155.19, 0, 0, 0.513731,-99) , -12, 0.0775897, 1, 0, 0.543839,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463694,-99) , -0, 15.5, 0, 0, 0.50578,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.422761,-99) , -5, 1.1919, 0, 0, 0.473156,-99) , -13, 0.00192624, 0, 0, 0.520416,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564816,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286336,-99) , -12, 0.0271506, 0, 0, 0.477578,-99) , -5, 1.73646, 1, 0, 0.498833,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376348,-99) , -5, 1.61834, 0, 0, 0.483782,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56961,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250893,-99) , -7, 0.0260672, 1, 0, 0.361696,-99) , -9, 3.46976, 0, 0, 0.406902,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130528,-99) , -4, 1.76063, 1, 0, 0.377334,-99) , -13, 0.00284926, 1, 0, 0.451897,-99) , -5, 1.53007, 1, 0, 0.487338,-99) ); - // itree = 985 - fBoostWeights.push_back(0.00448873); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442883,-99) , -12, 0.0312599, 0, 0, 0.539163,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503233,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409282,-99) , -4, 1.56749, 1, 0, 0.487371,-99) , -12, 0.101366, 1, 0, 0.509325,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54647,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405302,-99) , -9, -6.21401, 1, 0, 0.451785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0764636,-99) , -13, 0.0274417, 1, 0, 0.427201,-99) , -3, 0.998654, 1, 0, 0.499466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303786,-99) , -2, 6.5, 0, 0, 0.495906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300933,-99) , -14, -5.8559, 0, 0, 0.491967,-99) ); - // itree = 986 - fBoostWeights.push_back(0.0036069); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518863,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379035,-99) , -8, -0.984939, 0, 0, 0.512657,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312903,-99) , -4, 1.92761, 1, 0, 0.508344,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557518,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5157,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364726,-99) , -5, 1.37586, 1, 0, 0.411814,-99) , -5, 2.08104, 0, 0, 0.442094,-99) , -8, 0.974507, 1, 0, 0.497752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308175,-99) , -3, 0.698342, 0, 0, 0.493958,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248028,-99) , -5, 2.43948, 1, 0, 0.491186,-99) ); - // itree = 987 - fBoostWeights.push_back(0.0047576); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.733492,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606041,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491281,-99) , -8, 0.685207, 1, 0, 0.562827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433698,-99) , -7, 0.0148237, 0, 0, 0.529615,-99) , -4, 1.80813, 0, 0, 0.545341,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384575,-99) , -7, 0.0088761, 0, 0, 0.497252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291534,-99) , -5, 2.22775, 1, 0, 0.492646,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283819,-99) , -6, 0.304627, 1, 0, 0.365225,-99) , -14, -4.66181, 0, 0, 0.483082,-99) , -9, 2.7544, 0, 0, 0.499138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318329,-99) , -4, 1.98895, 1, 0, 0.494086,-99) ); - // itree = 988 - fBoostWeights.push_back(0.00702297); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703099,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629462,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432174,-99) , -8, 0.93236, 1, 0, 0.556781,-99) , -3, 0.995259, 0, 0, 0.611575,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590394,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38823,-99) , -13, 0.000343517, 0, 0, 0.491856,-99) , -3, 0.951411, 1, 0, 0.519906,-99) , -4, 1.43369, 0, 0, 0.548498,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51629,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434169,-99) , -14, -3.33185, 0, 0, 0.499247,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277721,-99) , -14, -2.81166, 1, 0, 0.426935,-99) , -5, 1.79645, 1, 0, 0.482513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0867384,-99) , -4, 2.15909, 1, 0, 0.480161,-99) , -11, 1.5, 0, 0, 0.503086,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 16.5, 0, 0, 0.354271,-99) , -7, 0.10477, 1, 0, 0.495062,-99) ); - // itree = 989 - fBoostWeights.push_back(0.0049234); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634579,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434878,-99) , -13, 0.010969, 1, 0, 0.506289,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363104,-99) , -12, 0.0227741, 0, 0, 0.498186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530626,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.13938,-99) , -4, 1.7195, 1, 0, 0.401739,-99) , -9, 3.29878, 0, 0, 0.432576,-99) , -15, 0.0878651, 0, 0, 0.482854,-99) , -12, 0.513211, 0, 0, 0.488491,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.114064,-99) , -5, 2.48285, 1, 0, 0.485659,-99) ); - // itree = 990 - fBoostWeights.push_back(0.0056842); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560067,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444858,-99) , -15, 1.39331, 1, 0, 0.543469,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570461,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357869,-99) , -5, 1.85337, 0, 0, 0.444464,-99) , -14, -4.01594, 0, 0, 0.524706,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470886,-99) , -4, 0.93697, 1, 0, 0.516342,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134409,-99) , -15, 0.359325, 1, 0, 0.433146,-99) , -5, 1.47528, 1, 0, 0.47155,-99) , -12, 0.125932, 1, 0, 0.498883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0951821,-99) , -7, 0.281901, 1, 0, 0.496638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16501,-99) , -5, 2.4485, 1, 0, 0.49361,-99) ); - // itree = 991 - fBoostWeights.push_back(0.00595979); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654833,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616674,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515759,-99) , -4, 1.40952, 0, 0, 0.53943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412656,-99) , -10, 2205.42, 1, 0, 0.526775,-99) , -9, 1.1017, 1, 0, 0.546752,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494105,-99) , -9, -5.76502, 1, 0, 0.510147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351162,-99) , -8, -0.964477, 0, 0, 0.500741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314188,-99) , -7, 0.00866381, 0, 0, 0.489696,-99) , -9, 0.563083, 0, 0, 0.515633,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59872,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46345,-99) , -6, 0.90329, 1, 0, 0.502484,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429159,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26662,-99) , -1, 8.5, 0, 0, 0.407529,-99) , -11, 0.5, 1, 0, 0.441858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.188505,-99) , -4, 2.01818, 1, 0, 0.433196,-99) , -9, -10.7848, 1, 0, 0.442804,-99) , -6, 0.742267, 1, 0, 0.49286,-99) ); - // itree = 992 - fBoostWeights.push_back(0.00699114); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64523,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535013,-99) , -15, 0.572475, 1, 0, 0.609295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485633,-99) , -12, 0.20052, 1, 0, 0.578075,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38272,-99) , -12, 0.0329921, 0, 0, 0.501727,-99) , -6, 0.0560208, 1, 0, 0.514098,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601597,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46039,-99) , -8, 0.517762, 1, 0, 0.535761,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37327,-99) , -16, 134.653, 1, 0, 0.414043,-99) , -10, -6.19767, 1, 0, 0.444508,-99) , -7, 0.0149197, 0, 0, 0.49312,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375338,-99) , -4, 1.49571, 1, 0, 0.520745,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208105,-99) , -10, 5199.01, 0, 0, 0.309372,-99) , -9, 4.92017, 0, 0, 0.402131,-99) , -3, 0.998043, 1, 0, 0.481039,-99) , -10, 11959.3, 0, 0, 0.490376,-99) ); - // itree = 993 - fBoostWeights.push_back(0.00605744); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.677235,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472344,-99) , -16, 3742.39, 1, 0, 0.5426,-99) , -15, 0.226478, 0, 0, 0.590295,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633917,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540256,-99) , -12, 0.0446867, 0, 0, 0.591326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485628,-99) , -14, -2.08109, 1, 0, 0.558962,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504959,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39023,-99) , -0, 13.5, 0, 0, 0.482926,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387095,-99) , -5, 1.21976, 0, 0, 0.462506,-99) , -13, 0.0016685, 0, 0, 0.506762,-99) , -15, 0.287002, 1, 0, 0.53233,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217032,-99) , -5, 2.25096, 1, 0, 0.537901,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505535,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418695,-99) , -11, 0.5, 1, 0, 0.46322,-99) , -16, 471.284, 1, 0, 0.490441,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239508,-99) , -15, 0.805984, 1, 0, 0.484722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31268,-99) , -2, 7.5, 0, 0, 0.476155,-99) , -12, 0.101411, 1, 0, 0.500445,-99) ); - // itree = 994 - fBoostWeights.push_back(0.00551978); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663704,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510074,-99) , -2, 15.5, 0, 0, 0.598967,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362858,-99) , -3, 0.999368, 1, 0, 0.517803,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39782,-99) , -12, 0.242741, 0, 0, 0.427228,-99) , -8, 0.916518, 1, 0, 0.498877,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48326,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251146,-99) , -1, 8.5, 0, 0, 0.457538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272025,-99) , -8, 0.602402, 0, 0, 0.413038,-99) , -5, 1.88922, 1, 0, 0.483866,-99) , -10, -8351.34, 1, 0, 0.491338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338353,-99) , -8, -0.984575, 0, 0, 0.485364,-99) ); - // itree = 995 - fBoostWeights.push_back(0.00654917); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639004,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539613,-99) , -8, -0.508669, 0, 0, 0.595136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492483,-99) , -13, 0.00188187, 0, 0, 0.560986,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621505,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503461,-99) , -13, 0.0003786, 0, 0, 0.580052,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470625,-99) , -2, 8.5, 1, 0, 0.496829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435771,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231489,-99) , -2, 17.5, 0, 0, 0.392281,-99) , -7, 0.0259239, 1, 0, 0.467776,-99) , -10, -633.367, 1, 0, 0.492097,-99) , -5, 1.38936, 1, 0, 0.515382,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569165,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38423,-99) , -15, 0.585328, 1, 0, 0.455347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259159,-99) , -4, 1.9733, 1, 0, 0.446511,-99) , -9, -6.50565, 1, 0, 0.46359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211883,-99) , -3, 0.837811, 0, 0, 0.452302,-99) , -6, 0.663019, 1, 0, 0.491898,-99) ); - // itree = 996 - fBoostWeights.push_back(0.00904295); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.683313,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56694,-99) , -7, 0.0600443, 1, 0, 0.627062,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608997,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51654,-99) , -3, 0.946534, 1, 0, 0.536957,-99) , -2, 23.5, 0, 0, 0.564465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429795,-99) , -12, 0.0361075, 0, 0, 0.550349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416449,-99) , -5, 0.506585, 0, 0, 0.535349,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54621,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0646409,-99) , -5, 2.21209, 1, 0, 0.53113,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387483,-99) , -5, 1.80201, 0, 0, 0.459387,-99) , -14, -3.62914, 0, 0, 0.504227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367019,-99) , -3, 0.828887, 0, 0, 0.493986,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349557,-99) , -13, 0.0163224, 1, 0, 0.446191,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183054,-99) , -10, -649.313, 1, 0, 0.273127,-99) , -5, 1.66862, 1, 0, 0.372373,-99) , -14, -2.28081, 1, 0, 0.466065,-99) , -5, 1.38314, 1, 0, 0.494444,-99) ); - // itree = 997 - fBoostWeights.push_back(0.00743369); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539105,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457785,-99) , -8, -0.920915, 0, 0, 0.530984,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393425,-99) , -9, -0.343188, 1, 0, 0.457551,-99) , -3, 0.894546, 0, 0, 0.522752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21484,-99) , -5, 2.49117, 1, 0, 0.520173,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538607,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282213,-99) , -9, 0.64194, 0, 0, 0.404068,-99) , -7, 0.00888976, 0, 0, 0.509803,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569907,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466604,-99) , -13, 0.000811436, 0, 0, 0.531186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287616,-99) , -15, 0.883913, 1, 0, 0.424978,-99) , -13, 0.010664, 1, 0, 0.492466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.204782,-99) , -1, 12.5, 0, 0, 0.474951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22655,-99) , -2, 24.5, 0, 0, 0.432204,-99) , -7, 0.0398244, 1, 0, 0.491993,-99) ); - // itree = 998 - fBoostWeights.push_back(0.00554912); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654669,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606534,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514981,-99) , -9, -3.76104, 1, 0, 0.531941,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421854,-99) , -6, 1.0116, 0, 0, 0.46556,-99) , -6, 0.821194, 1, 0, 0.511333,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.432517,-99) , -15, 0.228297, 0, 0, 0.490426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248141,-99) , -13, 0.00316393, 1, 0, 0.442944,-99) , -5, 1.81555, 1, 0, 0.496664,-99) , -12, 0.525205, 0, 0, 0.501859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.146447,-99) , -5, 2.46981, 1, 0, 0.499156,-99) ); - // itree = 999 - fBoostWeights.push_back(0.00515928); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650001,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549772,-99) , -4, 1.72805, 1, 0, 0.606374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455777,-99) , -13, 0.00171726, 0, 0, 0.521679,-99) , -4, 1.48716, 0, 0, 0.544671,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363905,-99) , -3, 0.782166, 0, 0, 0.500719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357387,-99) , -4, 1.81959, 1, 0, 0.491832,-99) , -11, 1.5, 0, 0, 0.509762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273487,-99) , -2, 6.5, 0, 0, 0.50565,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500564,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348296,-99) , -13, 0.0186822, 1, 0, 0.452678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325196,-99) , -7, 0.0151091, 0, 0, 0.417393,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0569271,-99) , -4, 1.64387, 1, 0, 0.400119,-99) , -8, -0.898363, 0, 0, 0.49415,-99) ); - // itree = 1000 - fBoostWeights.push_back(0.00590349); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617294,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518639,-99) , -12, 0.17806, 1, 0, 0.577918,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401939,-99) , -3, 0.987976, 1, 0, 0.487933,-99) , -13, 0.00198646, 0, 0, 0.539705,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.203935,-99) , -7, 0.0648217, 1, 0, 0.494725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349084,-99) , -0, 51.5, 1, 0, 0.481659,-99) , -4, 0.959636, 1, 0, 0.505484,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463382,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343682,-99) , -12, 0.142957, 1, 0, 0.419853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149017,-99) , -4, 1.63534, 1, 0, 0.405003,-99) , -8, -0.932182, 0, 0, 0.496358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310501,-99) , -7, 0.00818818, 0, 0, 0.488732,-99) ); - // itree = 1001 - fBoostWeights.push_back(0.00298085); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656979,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607984,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496218,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380155,-99) , -15, 0.0372726, 0, 0, 0.490818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354314,-99) , -4, 1.83995, 1, 0, 0.484314,-99) , -9, -9.61938, 1, 0, 0.490467,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.192932,-99) , -5, 2.49356, 1, 0, 0.488203,-99) , -12, 0.509824, 0, 0, 0.494917,-99) ); - // itree = 1002 - fBoostWeights.push_back(0.00405108); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624364,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381499,-99) , -9, 2.03784, 1, 0, 0.526939,-99) , -9, 3.4928, 0, 0, 0.538192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416598,-99) , -10, -5420.49, 0, 0, 0.52893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381733,-99) , -3, 0.999219, 1, 0, 0.520517,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505318,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452547,-99) , -11, 0.5, 1, 0, 0.479153,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321585,-99) , -3, 0.760587, 0, 0, 0.473693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311592,-99) , -1, 60.5, 1, 0, 0.468303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317831,-99) , -4, 1.86567, 1, 0, 0.460929,-99) , -16, 443.783, 1, 0, 0.483761,-99) ); - // itree = 1003 - fBoostWeights.push_back(0.00427339); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654331,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668244,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527619,-99) , -4, 1.89188, 0, 0, 0.53832,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259116,-99) , -5, 2.18973, 1, 0, 0.47674,-99) , -16, 489.002, 1, 0, 0.500698,-99) , -10, -12885.5, 1, 0, 0.506739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267304,-99) , -2, 56.5, 0, 0, 0.387291,-99) , -15, 1.91173, 1, 0, 0.499842,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358482,-99) , -2, 7.5, 0, 0, 0.493473,-99) ); - // itree = 1004 - fBoostWeights.push_back(0.00465891); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573524,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472443,-99) , -5, 0.694659, 0, 0, 0.553516,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343665,-99) , -3, 0.988538, 1, 0, 0.450375,-99) , -14, -3.12233, 0, 0, 0.526833,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626821,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484856,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42109,-99) , -14, -2.53129, 1, 0, 0.46253,-99) , -9, 8.76364, 0, 0, 0.472755,-99) , -4, 0.918377, 1, 0, 0.493841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304938,-99) , -3, 0.999645, 1, 0, 0.489415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342265,-99) , -8, -0.983, 0, 0, 0.483286,-99) ); - // itree = 1005 - fBoostWeights.push_back(0.00641372); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546371,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489341,-99) , -16, 2484.28, 1, 0, 0.518427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28489,-99) , -5, 2.22151, 1, 0, 0.514844,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309746,-99) , -5, 1.44259, 1, 0, 0.470677,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18073,-99) , -3, 0.998294, 1, 0, 0.424214,-99) , -13, 0.0175293, 1, 0, 0.504601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337924,-99) , -4, 1.82984, 1, 0, 0.496617,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549574,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400538,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189331,-99) , -6, 0.358618, 0, 0, 0.31011,-99) , -5, 2.04394, 0, 0, 0.38551,-99) , -14, -4.57912, 0, 0, 0.486985,-99) ); - // itree = 1006 - fBoostWeights.push_back(0.00404741); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.67066,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499241,-99) , -6, 0.183165, 1, 0, 0.520594,-99) , -9, -6.48222, 1, 0, 0.537303,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480486,-99) , -10, -6620.09, 1, 0, 0.489261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246481,-99) , -4, 1.97627, 1, 0, 0.483648,-99) , -11, 1.5, 0, 0, 0.501238,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195106,-99) , -7, 0.252109, 1, 0, 0.498938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251047,-99) , -3, 0.999695, 1, 0, 0.49417,-99) ); - // itree = 1007 - fBoostWeights.push_back(0.00750254); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652988,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531926,-99) , -13, 0.0038404, 0, 0, 0.607425,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504761,-99) , -16, 123.509, 0, 0, 0.577304,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49392,-99) , -7, 0.0172804, 0, 0, 0.525631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.396364,-99) , -7, 0.0321684, 1, 0, 0.509685,-99) , -2, 24.5, 0, 0, 0.529549,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361367,-99) , -7, 0.0316096, 1, 0, 0.454107,-99) , -3, 0.998707, 1, 0, 0.520274,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496525,-99) , -5, 1.96236, 0, 0, 0.560834,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309732,-99) , -12, 0.0240743, 0, 0, 0.524034,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.411375,-99) , -7, 0.00992462, 0, 0, 0.535205,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35216,-99) , -11, 1.5, 0, 0, 0.404603,-99) , -15, 0.0482892, 1, 0, 0.436267,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283806,-99) , -5, 2.1591, 1, 0, 0.416851,-99) , -12, 0.0692704, 1, 0, 0.448985,-99) , -5, 1.65109, 1, 0, 0.49382,-99) ); - // itree = 1008 - fBoostWeights.push_back(0.00505178); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481329,-99) , -15, 1.15205, 1, 0, 0.570052,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321596,-99) , -7, 0.0444605, 1, 0, 0.487497,-99) , -2, 29.5, 0, 0, 0.501171,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0625333,-99) , -4, 1.30368, 1, 0, 0.399134,-99) , -7, 0.109439, 1, 0, 0.495307,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264207,-99) , -2, 6.5, 0, 0, 0.491226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328916,-99) , -5, 2.22423, 1, 0, 0.485284,-99) ); - // itree = 1009 - fBoostWeights.push_back(0.00969275); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596975,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599807,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510886,-99) , -3, 0.952359, 1, 0, 0.541671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500714,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408474,-99) , -13, 0.0101141, 1, 0, 0.482254,-99) , -9, -0.09944, 1, 0, 0.512057,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546064,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.170105,-99) , -5, 1.62974, 1, 0, 0.357039,-99) , -9, -5.69016, 1, 0, 0.427254,-99) , -3, 0.996034, 1, 0, 0.492595,-99) , -10, -5204.52, 1, 0, 0.503125,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.651988,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291389,-99) , -15, 0.149705, 1, 0, 0.464074,-99) , -12, 0.070334, 1, 0, 0.546237,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370745,-99) , -3, 0.927876, 1, 0, 0.427528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152967,-99) , -4, 1.91953, 1, 0, 0.38941,-99) , -3, 0.988808, 0, 0, 0.475126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.10976,-99) , -5, 1.90277, 1, 0, 0.274706,-99) , -13, 0.00305614, 1, 0, 0.423997,-99) , -4, 1.47188, 1, 0, 0.485229,-99) ); - // itree = 1010 - fBoostWeights.push_back(0.00346028); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560697,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481755,-99) , -6, 0.851839, 1, 0, 0.539462,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497711,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343157,-99) , -7, 0.0853715, 1, 0, 0.48689,-99) , -12, 0.111385, 1, 0, 0.510051,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.437866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193644,-99) , -5, 1.75986, 1, 0, 0.408717,-99) , -8, -0.945993, 0, 0, 0.502252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389582,-99) , -12, 0.0233211, 0, 0, 0.496972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289635,-99) , -7, 0.00699782, 0, 0, 0.49313,-99) ); - // itree = 1011 - fBoostWeights.push_back(0.00531562); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.702078,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596445,-99) , -10, 15694.1, 1, 0, 0.651927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478591,-99) , -15, 0.104708, 0, 0, 0.603252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398464,-99) , -7, 0.0766906, 1, 0, 0.581498,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340613,-99) , -4, 1.87209, 1, 0, 0.533917,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604833,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445545,-99) , -10, -13239.1, 1, 0, 0.465729,-99) , -3, 0.993511, 1, 0, 0.512022,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448867,-99) , -12, 0.351363, 0, 0, 0.468336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289664,-99) , -3, 0.882805, 0, 0, 0.447106,-99) , -7, 0.0138054, 0, 0, 0.49532,-99) , -10, 11038.1, 0, 0, 0.505324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299136,-99) , -12, 0.01821, 0, 0, 0.50066,-99) ); - // itree = 1012 - fBoostWeights.push_back(0.00866665); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534384,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401748,-99) , -14, -4.8698, 0, 0, 0.525428,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358907,-99) , -0, 51.5, 1, 0, 0.519513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391819,-99) , -1, 69.5, 1, 0, 0.498797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0628913,-99) , -1, 17.5, 0, 0, 0.44413,-99) , -7, 0.0589316, 1, 0, 0.506339,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184119,-99) , -5, 1.80669, 1, 0, 0.406121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0309337,-99) , -7, 0.142657, 1, 0, 0.38009,-99) , -3, 0.999144, 1, 0, 0.496655,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439069,-99) , -10, -754.952, 0, 0, 0.517085,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457277,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305859,-99) , -5, 1.83599, 1, 0, 0.407853,-99) , -9, 0.665717, 0, 0, 0.45593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33368,-99) , -6, 0.823372, 1, 0, 0.429023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.98717, 1, 0, 0.419788,-99) , -7, 0.0128285, 0, 0, 0.480387,-99) ); - // itree = 1013 - fBoostWeights.push_back(0.00452621); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625762,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493419,-99) , -12, 0.387545, 0, 0, 0.503026,-99) , -10, -5373.93, 1, 0, 0.513729,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366323,-99) , -15, 1.26115, 1, 0, 0.485234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302856,-99) , -7, 0.0106806, 0, 0, 0.465335,-99) , -6, 0.787673, 1, 0, 0.499475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317051,-99) , -3, 0.999642, 1, 0, 0.494908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228762,-99) , -3, 0.700889, 0, 0, 0.489495,-99) ); - // itree = 1014 - fBoostWeights.push_back(0.0068315); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653821,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525317,-99) , -7, 0.0992327, 1, 0, 0.598626,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498794,-99) , -9, -1.05559, 1, 0, 0.527706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244757,-99) , -4, 1.57948, 1, 0, 0.443137,-99) , -13, 0.00493165, 1, 0, 0.502737,-99) , -2, 36.5, 0, 0, 0.518479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367273,-99) , -12, 0.0227607, 0, 0, 0.510947,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637949,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546036,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429321,-99) , -5, 1.42799, 1, 0, 0.489905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.228483,-99) , -4, 1.92324, 1, 0, 0.482969,-99) , -14, -3.55074, 1, 0, 0.528651,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482686,-99) , -3, 0.996166, 1, 0, 0.546611,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21234,-99) , -4, 1.81761, 1, 0, 0.446361,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.1011, 1, 0, 0.326791,-99) , -3, 0.989194, 1, 0, 0.41483,-99) , -10, 8900.89, 0, 0, 0.442073,-99) , -9, 2.8058, 0, 0, 0.463774,-99) , -16, 1170.96, 1, 0, 0.485965,-99) ); - // itree = 1015 - fBoostWeights.push_back(0.00602816); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648916,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542979,-99) , -1, 20.5, 0, 0, 0.579734,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448782,-99) , -5, 2.02456, 0, 0, 0.502281,-99) , -8, 0.913621, 1, 0, 0.550655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431857,-99) , -8, -0.885232, 0, 0, 0.536904,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344527,-99) , -12, 0.0233211, 0, 0, 0.496674,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252361,-99) , -13, 0.0299398, 1, 0, 0.490461,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502284,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219117,-99) , -15, 0.0911448, 1, 0, 0.382279,-99) , -5, 1.16752, 1, 0, 0.41344,-99) , -12, 0.215375, 1, 0, 0.472046,-99) , -6, 0.199632, 1, 0, 0.489748,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230626,-99) , -4, 2.06713, 1, 0, 0.485793,-99) ); - // itree = 1016 - fBoostWeights.push_back(0.00720589); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470627,-99) , -13, 0.00198802, 0, 0, 0.570255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399681,-99) , -1, 63.5, 1, 0, 0.54659,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232637,-99) , -1, 11.5, 0, 0, 0.532015,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479138,-99) , -4, 1.89305, 0, 0, 0.484217,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5728,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26168,-99) , -14, -4.33108, 1, 0, 0.385329,-99) , -5, 2.11399, 1, 0, 0.477228,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141108,-99) , -7, 0.0515265, 1, 0, 0.468956,-99) , -2, 24.5, 0, 0, 0.484293,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0685984,-99) , -7, 0.284891, 1, 0, 0.482081,-99) ); - // itree = 1017 - fBoostWeights.push_back(0.00632149); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653706,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61624,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536301,-99) , -6, 0.0966435, 1, 0, 0.547082,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351407,-99) , -5, 1.74602, 0, 0, 0.440287,-99) , -8, 0.98798, 1, 0, 0.533806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320521,-99) , -12, 0.01821, 0, 0, 0.523231,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480884,-99) , -15, 0.0679218, 1, 0, 0.502345,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309528,-99) , -3, 0.999284, 1, 0, 0.489099,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433504,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235022,-99) , -5, 1.97655, 1, 0, 0.415482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0775722,-99) , -4, 1.7407, 1, 0, 0.386919,-99) , -7, 0.0130131, 0, 0, 0.465506,-99) , -12, 0.110599, 1, 0, 0.492466,-99) , -12, 0.526853, 0, 0, 0.498189,-99) ); - // itree = 1018 - fBoostWeights.push_back(0.00459961); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.673189,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494391,-99) , -13, 0.0029214, 0, 0, 0.514669,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248979,-99) , -5, 2.48264, 1, 0, 0.512299,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377992,-99) , -12, 0.252269, 1, 0, 0.414654,-99) , -15, 0.0441162, 0, 0, 0.504962,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485509,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230023,-99) , -5, 1.39505, 1, 0, 0.396245,-99) , -13, 0.0142999, 1, 0, 0.492419,-99) , -12, 0.523213, 0, 0, 0.499069,-99) ); - // itree = 1019 - fBoostWeights.push_back(0.00699178); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638617,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548387,-99) , -15, 0.204493, 0, 0, 0.605175,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526734,-99) , -10, -1472.17, 0, 0, 0.574253,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596086,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488092,-99) , -0, 12.5, 0, 0, 0.559586,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372178,-99) , -3, 0.964737, 1, 0, 0.438631,-99) , -10, 4913.24, 0, 0, 0.517111,-99) , -10, 2634.14, 1, 0, 0.542903,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560153,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300045,-99) , -5, 1.64229, 1, 0, 0.522372,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.327702,-99) , -5, 1.85845, 0, 0, 0.378993,-99) , -13, 0.00117164, 0, 0, 0.461734,-99) , -15, 0.590897, 1, 0, 0.514941,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475809,-99) , -13, 0.00107058, 1, 0, 0.541983,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445952,-99) , -12, 0.172227, 1, 0, 0.460117,-99) , -3, 0.953131, 1, 0, 0.484657,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318351,-99) , -5, 1.5626, 1, 0, 0.39855,-99) , -12, 0.154848, 0, 0, 0.471008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325717,-99) , -4, 1.82168, 1, 0, 0.461927,-99) , -12, 0.127213, 1, 0, 0.489138,-99) ); - // itree = 1020 - fBoostWeights.push_back(0.00896378); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.735839,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611016,-99) , -5, 2.14418, 0, 0, 0.651626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462999,-99) , -13, 0.00288063, 1, 0, 0.624366,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495817,-99) , -16, 1284.5, 1, 0, 0.536679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344081,-99) , -8, 0.982625, 1, 0, 0.515528,-99) , -4, 1.60688, 0, 0, 0.535352,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423588,-99) , -12, 0.0198376, 1, 0, 0.49664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332176,-99) , -0, 26.5, 1, 0, 0.437946,-99) , -12, 0.0312838, 0, 0, 0.517118,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590681,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470821,-99) , -6, 0.135627, 0, 0, 0.529089,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355195,-99) , -5, 1.29693, 1, 0, 0.440177,-99) , -12, 0.203934, 1, 0, 0.495749,-99) , -12, 0.338786, 0, 0, 0.514119,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440612,-99) , -15, 0.0762173, 1, 0, 0.55282,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.284476,-99) , -7, 0.0300814, 1, 0, 0.428115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256731,-99) , -4, 1.64386, 1, 0, 0.394386,-99) , -8, 0.983079, 0, 0, 0.427282,-99) , -4, 1.01123, 1, 0, 0.467719,-99) , -12, 0.11049, 1, 0, 0.490158,-99) ); - // itree = 1021 - fBoostWeights.push_back(0.00687176); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646303,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599853,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486172,-99) , -6, 0.553142, 1, 0, 0.550842,-99) , -16, 19.1911, 1, 0, 0.599113,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481801,-99) , -11, 1.5, 0, 0, 0.552004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404188,-99) , -10, 5651.51, 1, 0, 0.514227,-99) , -15, 0.187613, 0, 0, 0.556728,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506384,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266931,-99) , -4, 1.15532, 1, 0, 0.43366,-99) , -15, 0.786385, 1, 0, 0.534806,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541227,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44093,-99) , -6, 0.871583, 1, 0, 0.516284,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419506,-99) , -10, 5466.86, 0, 0, 0.446966,-99) , -12, 0.120239, 1, 0, 0.479676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286055,-99) , -8, -0.982759, 0, 0, 0.471539,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219325,-99) , -4, 1.97331, 1, 0, 0.465026,-99) , -16, 265.107, 1, 0, 0.488845,-99) ); - // itree = 1022 - fBoostWeights.push_back(0.00561408); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433312,-99) , -5, 1.57313, 1, 0, 0.590166,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419694,-99) , -5, 1.66203, 0, 0, 0.49185,-99) , -14, -2.68094, 0, 0, 0.554889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363845,-99) , -7, 0.168937, 1, 0, 0.539635,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324851,-99) , -4, 2.23883, 1, 0, 0.500972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357537,-99) , -0, 28.5, 1, 0, 0.495374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244996,-99) , -7, 0.0396054, 1, 0, 0.481661,-99) , -2, 24.5, 0, 0, 0.496025,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317383,-99) , -3, 0.999664, 1, 0, 0.491732,-99) ); - // itree = 1023 - fBoostWeights.push_back(0.00548484); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596928,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508088,-99) , -6, 0.0963367, 1, 0, 0.520589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29208,-99) , -5, 2.12022, 1, 0, 0.515596,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59726,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427684,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293699,-99) , -12, 0.115535, 1, 0, 0.398366,-99) , -12, 0.19618, 0, 0, 0.447264,-99) , -14, -3.95358, 0, 0, 0.505318,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525024,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19789,-99) , -14, -3.26398, 1, 0, 0.409206,-99) , -4, 1.76856, 1, 0, 0.497664,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314835,-99) , -3, 0.999643, 1, 0, 0.492891,-99) ); - // itree = 1024 - fBoostWeights.push_back(0.00318967); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518961,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457111,-99) , -6, 0.917608, 1, 0, 0.505767,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319436,-99) , -3, 0.697485, 0, 0, 0.502094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33283,-99) , -3, 0.99965, 1, 0, 0.497037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267894,-99) , -2, 6.5, 0, 0, 0.493343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280938,-99) , -12, 0.0182006, 0, 0, 0.488385,-99) ); - // itree = 1025 - fBoostWeights.push_back(0.00605192); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616031,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528936,-99) , -15, 0.45768, 1, 0, 0.588422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483113,-99) , -1, 9.5, 0, 0, 0.571889,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462646,-99) , -6, 0.969526, 0, 0, 0.532213,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389091,-99) , -3, 0.971109, 0, 0, 0.497867,-99) , -6, 0.631953, 1, 0, 0.544996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424063,-99) , -16, 2.4624, 0, 0, 0.531888,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672087,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528532,-99) , -5, 1.63169, 0, 0, 0.583443,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410538,-99) , -16, 2362.16, 1, 0, 0.474583,-99) , -11, 0.5, 1, 0, 0.531263,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328347,-99) , -7, 0.00918691, 0, 0, 0.458259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19384,-99) , -5, 2.1898, 1, 0, 0.452908,-99) , -10, -563.508, 1, 0, 0.471456,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176725,-99) , -5, 2.33294, 1, 0, 0.466604,-99) , -16, 492.966, 1, 0, 0.492136,-99) ); - // itree = 1026 - fBoostWeights.push_back(0.00484758); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583263,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511279,-99) , -9, -3.74514, 1, 0, 0.525378,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330012,-99) , -3, 0.994162, 1, 0, 0.426705,-99) , -12, 0.0287743, 0, 0, 0.517861,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217214,-99) , -5, 1.42557, 1, 0, 0.399969,-99) , -13, 0.0279145, 1, 0, 0.511126,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.416914,-99) , -10, 2552.34, 1, 0, 0.48741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31143,-99) , -5, 1.9738, 1, 0, 0.462743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187097,-99) , -0, 12.5, 1, 0, 0.416025,-99) , -7, 0.00998716, 0, 0, 0.501717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0987823,-99) , -5, 2.57715, 1, 0, 0.500235,-99) ); - // itree = 1027 - fBoostWeights.push_back(0.00617089); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.670305,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.553461,-99) , -10, 4518.7, 1, 0, 0.578945,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557505,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478267,-99) , -7, 0.0214296, 1, 0, 0.519749,-99) , -9, -0.496037, 1, 0, 0.546958,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30233,-99) , -9, 0.259189, 0, 0, 0.429936,-99) , -8, -0.874134, 0, 0, 0.533659,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485461,-99) , -3, 0.910671, 1, 0, 0.50018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278142,-99) , -4, 1.97627, 1, 0, 0.494845,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454552,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260733,-99) , -0, 13.5, 1, 0, 0.413526,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0533383,-99) , -5, 2.15687, 1, 0, 0.396534,-99) , -7, 0.0125066, 0, 0, 0.473326,-99) , -16, 1031.27, 1, 0, 0.50188,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256937,-99) , -3, 0.999649, 1, 0, 0.496455,-99) ); - // itree = 1028 - fBoostWeights.push_back(0.00542732); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657587,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525597,-99) , -13, 0.0017252, 0, 0, 0.597753,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391015,-99) , -1, 12.5, 0, 0, 0.478039,-99) , -6, 0.741679, 1, 0, 0.553658,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604963,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500865,-99) , -1, 13.5, 0, 0, 0.548947,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276769,-99) , -3, 0.997463, 1, 0, 0.471452,-99) , -9, 3.38398, 0, 0, 0.49084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196314,-99) , -4, 2.02284, 1, 0, 0.486236,-99) , -9, -3.80366, 1, 0, 0.498824,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362389,-99) , -1, 6.5, 0, 0, 0.49368,-99) ); - // itree = 1029 - fBoostWeights.push_back(0.00635396); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68138,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473574,-99) , -4, 1.12767, 1, 0, 0.555516,-99) , -4, 1.7316, 0, 0, 0.567542,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409272,-99) , -1, 82.5, 1, 0, 0.553127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239954,-99) , -1, 12.5, 0, 0, 0.534393,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36998,-99) , -15, 0.660617, 1, 0, 0.502037,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420647,-99) , -9, -3.19251, 1, 0, 0.454285,-99) , -6, 0.589184, 1, 0, 0.483761,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142784,-99) , -4, 2.14444, 1, 0, 0.480917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.181223,-99) , -7, 0.0491957, 1, 0, 0.471331,-99) , -2, 26.5, 0, 0, 0.485886,-99) ); - // itree = 1030 - fBoostWeights.push_back(0.00261819); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611742,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317424,-99) , -4, 1.98886, 1, 0, 0.497727,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309823,-99) , -6, 0.371745, 0, 0, 0.405469,-99) , -14, -4.8962, 0, 0, 0.491947,-99) , -5, 2.30001, 0, 0, 0.496724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323971,-99) , -2, 6.5, 0, 0, 0.493166,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321928,-99) , -3, 0.99965, 1, 0, 0.489014,-99) ); - // itree = 1031 - fBoostWeights.push_back(0.00592065); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648119,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565048,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512415,-99) , -10, 2990.55, 1, 0, 0.538003,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301018,-99) , -8, 0.698152, 1, 0, 0.427746,-99) , -3, 0.998033, 1, 0, 0.523465,-99) , -9, -8.19765, 1, 0, 0.532375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402557,-99) , -8, -0.924521, 0, 0, 0.52052,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607398,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51435,-99) , -3, 0.98465, 1, 0, 0.554641,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388866,-99) , -4, 0.999056, 1, 0, 0.465167,-99) , -9, -0.247997, 1, 0, 0.510753,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408619,-99) , -11, 0.5, 1, 0, 0.480927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334503,-99) , -3, 0.822041, 0, 0, 0.462434,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36717,-99) , -10, 8675.44, 0, 0, 0.407762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217602,-99) , -13, 0.0070319, 1, 0, 0.370756,-99) , -3, 0.993377, 1, 0, 0.431859,-99) , -5, 1.44989, 1, 0, 0.467426,-99) , -16, 1327.49, 1, 0, 0.493017,-99) ); - // itree = 1032 - fBoostWeights.push_back(0.00422341); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630494,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51047,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.31745, 1, 0, 0.507379,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558746,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367376,-99) , -7, 0.0357659, 0, 0, 0.430679,-99) , -8, 0.979617, 1, 0, 0.496555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355838,-99) , -13, 0.0355776, 1, 0, 0.491923,-99) , -12, 0.513631, 0, 0, 0.497493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308278,-99) , -4, 1.9682, 1, 0, 0.491937,-99) ); - // itree = 1033 - fBoostWeights.push_back(0.00591955); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4151,-99) , -7, 0.0195075, 0, 0, 0.549239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290415,-99) , -1, 8.5, 0, 0, 0.541051,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493459,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343665,-99) , -7, 0.00743876, 0, 0, 0.486796,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260059,-99) , -7, 0.027949, 1, 0, 0.468242,-99) , -2, 16.5, 0, 0, 0.499941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33846,-99) , -12, 0.0227642, 0, 0, 0.493414,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0993915,-99) , -5, 2.4827, 1, 0, 0.490609,-99) ); - // itree = 1034 - fBoostWeights.push_back(0.00562931); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.691952,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516952,-99) , -6, 0.352114, 1, 0, 0.621682,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64233,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47922,-99) , -4, 1.43331, 0, 0, 0.51066,-99) , -9, 5.53034, 0, 0, 0.532925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393572,-99) , -8, 0.988048, 1, 0, 0.514938,-99) , -3, 0.957086, 1, 0, 0.543904,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417982,-99) , -4, 1.69961, 1, 0, 0.499433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311344,-99) , -3, 0.794492, 0, 0, 0.491235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.124419,-99) , -7, 0.168313, 1, 0, 0.487525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31429,-99) , -1, 52.5, 1, 0, 0.478914,-99) , -11, 1.5, 0, 0, 0.500941,-99) ); - // itree = 1035 - fBoostWeights.push_back(0.00628231); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499819,-99) , -12, 0.129226, 1, 0, 0.531795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107911,-99) , -5, 2.14548, 1, 0, 0.521864,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686787,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407573,-99) , -12, 0.321629, 0, 0, 0.435244,-99) , -5, 2.34972, 0, 0, 0.458287,-99) , -8, 0.932668, 1, 0, 0.506087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385044,-99) , -5, 0.594481, 0, 0, 0.500029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282186,-99) , -7, 0.170561, 1, 0, 0.495555,-99) ); - // itree = 1036 - fBoostWeights.push_back(0.00597963); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676353,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622919,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495694,-99) , -10, -3864.57, 1, 0, 0.560761,-99) , -15, 0.221837, 1, 0, 0.596716,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612276,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539202,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363351,-99) , -12, 0.136941, 1, 0, 0.486764,-99) , -12, 0.259252, 0, 0, 0.519149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0691404,-99) , -7, 0.0532375, 1, 0, 0.504175,-99) , -1, 14.5, 0, 0, 0.541037,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467103,-99) , -6, 0.866631, 1, 0, 0.572992,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478514,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3059,-99) , -7, 0.0677702, 1, 0, 0.473886,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256547,-99) , -0, 55.5, 1, 0, 0.468038,-99) , -2, 43.5, 0, 0, 0.478722,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336503,-99) , -3, 0.999139, 1, 0, 0.47075,-99) , -9, 2.71733, 0, 0, 0.488903,-99) ); - // itree = 1037 - fBoostWeights.push_back(0.00424713); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618047,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505488,-99) , -6, 0.104524, 0, 0, 0.566684,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431387,-99) , -12, 0.0474816, 0, 0, 0.543731,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473,-99) , -10, 8501.21, 0, 0, 0.487953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347269,-99) , -13, 0.0205824, 1, 0, 0.478787,-99) , -4, 0.739622, 1, 0, 0.496268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379362,-99) , -5, 0.48356, 0, 0, 0.490604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264053,-99) , -7, 0.00711941, 0, 0, 0.486314,-99) ); - // itree = 1038 - fBoostWeights.push_back(0.00711252); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.68904,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5829,-99) , -1, 18.5, 1, 0, 0.623407,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507698,-99) , -12, 0.0454664, 0, 0, 0.587202,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648573,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480846,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247333,-99) , -1, 13.5, 0, 0, 0.456773,-99) , -8, 0.997576, 0, 0, 0.493885,-99) , -8, 0.508422, 1, 0, 0.53255,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617526,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.499887,-99) , -15, 0.0269809, 1, 0, 0.507627,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324247,-99) , -5, 2.21129, 1, 0, 0.499377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309001,-99) , -7, 0.0287877, 1, 0, 0.485234,-99) , -2, 17.5, 0, 0, 0.502196,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39613,-99) , -12, 0.188589, 0, 0, 0.49727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326582,-99) , -1, 15.5, 0, 0, 0.444404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167619,-99) , -3, 0.998866, 1, 0, 0.414631,-99) , -14, -1.78525, 1, 0, 0.492367,-99) ); - // itree = 1039 - fBoostWeights.push_back(0.00379354); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530421,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431141,-99) , -7, 0.0891461, 1, 0, 0.523304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368608,-99) , -3, 0.737072, 0, 0, 0.519069,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351311,-99) , -1, 12.5, 0, 0, 0.437183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0636257,-99) , -4, 1.63603, 1, 0, 0.418103,-99) , -8, -0.938624, 0, 0, 0.510622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344318,-99) , -3, 0.999597, 1, 0, 0.505501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22955,-99) , -2, 6.5, 0, 0, 0.501176,-99) ); - // itree = 1040 - fBoostWeights.push_back(0.00576623); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.675673,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619812,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534312,-99) , -3, 0.951011, 1, 0, 0.558151,-99) , -9, -5.21808, 1, 0, 0.575204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426923,-99) , -8, -0.921376, 0, 0, 0.558964,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350536,-99) , -5, 1.93814, 0, 0, 0.457768,-99) , -13, 0.000138064, 0, 0, 0.538798,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708329,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510286,-99) , -4, 1.80597, 0, 0, 0.517724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.319819,-99) , -1, 49.5, 1, 0, 0.507935,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360334,-99) , -3, 0.954055, 0, 0, 0.450944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293173,-99) , -3, 0.999052, 1, 0, 0.437535,-99) , -6, 0.821069, 1, 0, 0.487139,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294892,-99) , -5, 2.20951, 1, 0, 0.480941,-99) , -11, 1.5, 0, 0, 0.500077,-99) ); - // itree = 1041 - fBoostWeights.push_back(0.00844239); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.703269,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572298,-99) , -5, 1.94249, 0, 0, 0.589895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464048,-99) , -1, 10.5, 0, 0, 0.568597,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403042,-99) , -14, -3.41261, 0, 0, 0.482087,-99) , -15, 0.227068, 0, 0, 0.5479,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36821,-99) , -5, 1.80839, 1, 0, 0.477099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259931,-99) , -8, 0.879288, 1, 0, 0.427531,-99) , -12, 0.0327419, 0, 0, 0.520571,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603509,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504991,-99) , -6, 0.551514, 1, 0, 0.558717,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404752,-99) , -4, 0.984941, 1, 0, 0.475779,-99) , -7, 0.0180379, 1, 0, 0.508387,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415097,-99) , -5, 1.47371, 1, 0, 0.512938,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360777,-99) , -3, 0.987565, 1, 0, 0.414741,-99) , -2, 19.5, 0, 0, 0.44532,-99) , -16, 3101.81, 1, 0, 0.477231,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562062,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453961,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0938638,-99) , -6, 0.479995, 1, 0, 0.270757,-99) , -16, 381.205, 1, 0, 0.343549,-99) , -14, -4.42944, 1, 0, 0.390327,-99) , -5, 1.86672, 1, 0, 0.459928,-99) , -12, 0.101379, 1, 0, 0.486145,-99) ); - // itree = 1042 - fBoostWeights.push_back(0.00620851); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.652412,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563884,-99) , -6, 0.710896, 0, 0, 0.604859,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634162,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511286,-99) , -1, 12.5, 0, 0, 0.579633,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467644,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306215,-99) , -6, 0.957565, 1, 0, 0.438612,-99) , -16, 273.288, 1, 0, 0.511709,-99) , -11, 0.5, 1, 0, 0.543513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642412,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504958,-99) , -6, 0.149286, 1, 0, 0.539801,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495642,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392045,-99) , -15, 0.0619004, 0, 0, 0.477577,-99) , -11, 1.5, 0, 0, 0.497439,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584192,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409181,-99) , -3, 0.998944, 0, 0, 0.509264,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286797,-99) , -9, -5.17954, 1, 0, 0.412769,-99) , -3, 0.997867, 1, 0, 0.485484,-99) , -10, 41.2106, 1, 0, 0.501122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26753,-99) , -5, 2.40273, 1, 0, 0.498105,-99) ); - // itree = 1043 - fBoostWeights.push_back(0.0065075); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.645167,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463306,-99) , -13, 0.00181184, 0, 0, 0.547051,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245511,-99) , -5, 1.99561, 1, 0, 0.536536,-99) , -8, 0.987339, 0, 0, 0.554987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316978,-99) , -1, 14.5, 0, 0, 0.53244,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370298,-99) , -14, -4.82803, 0, 0, 0.500376,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226855,-99) , -8, 0.802132, 0, 0, 0.414913,-99) , -5, 1.98367, 1, 0, 0.489901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325551,-99) , -7, 0.0405029, 1, 0, 0.482439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0876882,-99) , -0, 41.5, 1, 0, 0.477128,-99) , -2, 24.5, 0, 0, 0.49121,-99) ); - // itree = 1044 - fBoostWeights.push_back(0.00388634); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639486,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550091,-99) , -12, 0.143458, 1, 0, 0.599424,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594524,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5106,-99) , -12, 0.235448, 0, 0, 0.532741,-99) , -6, 0.169981, 1, 0, 0.548923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440946,-99) , -12, 0.0324609, 0, 0, 0.537598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429581,-99) , -8, -0.897458, 0, 0, 0.526065,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569697,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276492,-99) , -7, 0.00736746, 0, 0, 0.472368,-99) , -10, -5481.26, 1, 0, 0.481457,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.109646,-99) , -4, 2.1617, 1, 0, 0.478882,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293631,-99) , -0, 79.5, 1, 0, 0.47058,-99) , -16, 963.226, 1, 0, 0.496167,-99) ); - // itree = 1045 - fBoostWeights.push_back(0.00947916); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634937,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379035,-99) , -8, 0.984854, 1, 0, 0.531258,-99) , -3, 0.91781, 1, 0, 0.553124,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379248,-99) , -15, 0.0466122, 0, 0, 0.514494,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387108,-99) , -4, 1.47418, 0, 0, 0.438045,-99) , -8, 0.724192, 1, 0, 0.490325,-99) , -6, 0.377168, 1, 0, 0.515801,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349885,-99) , -13, 0.0352717, 1, 0, 0.508942,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667799,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429073,-99) , -4, 1.66533, 0, 0, 0.544442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385189,-99) , -1, 10.5, 0, 0, 0.497782,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381472,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0626347,-99) , -13, 0.0110659, 1, 0, 0.346312,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.102387,-99) , -5, 2.12014, 1, 0, 0.282635,-99) , -14, -3.69545, 1, 0, 0.384605,-99) , -12, 0.442659, 0, 0, 0.413711,-99) , -5, 1.86874, 1, 0, 0.491762,-99) ); - // itree = 1046 - fBoostWeights.push_back(0.00673986); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479965,-99) , -7, 0.0147804, 0, 0, 0.530124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.214218,-99) , -5, 2.13026, 1, 0, 0.524969,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666511,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414216,-99) , -4, 1.61275, 0, 0, 0.442182,-99) , -5, 2.171, 0, 0, 0.465094,-99) , -8, 0.91546, 1, 0, 0.509243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352016,-99) , -8, -0.98417, 0, 0, 0.502119,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52217,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240508,-99) , -15, 0.195177, 0, 0, 0.396987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -3, 0.998622, 1, 0, 0.35391,-99) , -4, 1.81964, 1, 0, 0.493257,-99) ); - // itree = 1047 - fBoostWeights.push_back(0.00594677); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622118,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535545,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337265,-99) , -5, 2.44681, 1, 0, 0.533161,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.33782,-99) , -12, 0.0911019, 0, 0, 0.426786,-99) , -14, -4.37902, 0, 0, 0.520849,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0795045,-99) , -7, 0.184237, 1, 0, 0.51735,-99) , -1, 44.5, 0, 0, 0.527402,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483295,-99) , -8, 0.96351, 0, 0, 0.50401,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356562,-99) , -3, 0.817547, 0, 0, 0.494026,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378092,-99) , -11, 1.5, 0, 0, 0.430358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.10104, 1, 0, 0.413557,-99) , -11, 0.5, 1, 0, 0.469224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252045,-99) , -8, -0.984541, 0, 0, 0.459769,-99) , -16, 4039.3, 1, 0, 0.496878,-99) ); - // itree = 1048 - fBoostWeights.push_back(0.00450313); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656229,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554241,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486783,-99) , -6, 0.87299, 1, 0, 0.536937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393452,-99) , -12, 0.01821, 0, 0, 0.529014,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425869,-99) , -5, 1.53086, 1, 0, 0.473518,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.175561,-99) , -0, 96.5, 1, 0, 0.465321,-99) , -12, 0.11364, 1, 0, 0.497083,-99) , -12, 0.536291, 0, 0, 0.501974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264376,-99) , -2, 6.5, 0, 0, 0.498116,-99) ); - // itree = 1049 - fBoostWeights.push_back(0.00318095); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544725,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428988,-99) , -8, -0.921186, 0, 0, 0.533171,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454567,-99) , -4, 0.966964, 1, 0, 0.486914,-99) , -16, 436.063, 1, 0, 0.504367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0772195,-99) , -7, 0.284997, 1, 0, 0.502881,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316504,-99) , -1, 87.5, 1, 0, 0.49951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260539,-99) , -2, 6.5, 0, 0, 0.495408,-99) ); - // itree = 1050 - fBoostWeights.push_back(0.00499956); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538007,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421419,-99) , -1, 9.5, 0, 0, 0.53124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363142,-99) , -3, 0.999547, 1, 0, 0.524473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425883,-99) , -7, 0.0172318, 0, 0, 0.514181,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370724,-99) , -14, -4.98936, 0, 0, 0.488324,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370196,-99) , -0, 17.5, 1, 0, 0.480207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178633,-99) , -7, 0.0284535, 1, 0, 0.463952,-99) , -2, 13.5, 0, 0, 0.492477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289395,-99) , -4, 1.91818, 1, 0, 0.485191,-99) ); - // itree = 1051 - fBoostWeights.push_back(0.00463942); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64693,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524305,-99) , -14, -5.94609, 0, 0, 0.596022,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631406,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562084,-99) , -5, 0.892466, 1, 0, 0.597761,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43108,-99) , -4, 0.865335, 0, 0, 0.492498,-99) , -6, 0.645975, 1, 0, 0.542094,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486881,-99) , -2, 26.5, 0, 0, 0.499257,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249339,-99) , -3, 0.998692, 1, 0, 0.415267,-99) , -14, -2.10875, 1, 0, 0.481238,-99) , -5, 1.12353, 1, 0, 0.49591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268089,-99) , -5, 2.27806, 1, 0, 0.490952,-99) , -8, 0.998765, 0, 0, 0.497373,-99) ); - // itree = 1052 - fBoostWeights.push_back(0.00591481); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.672043,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579259,-99) , -6, 0.725687, 1, 0, 0.626272,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524283,-99) , -2, 16.5, 0, 0, 0.590766,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50165,-99) , -8, -0.76616, 0, 0, 0.563376,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574848,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498973,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388852,-99) , -4, 0.793231, 1, 0, 0.447922,-99) , -13, 7.99214e-05, 1, 0, 0.480572,-99) , -13, 0.00231101, 0, 0, 0.534907,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661317,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525196,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453154,-99) , -11, 1.5, 0, 0, 0.478043,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229281,-99) , -5, 2.48989, 1, 0, 0.474744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26693,-99) , -13, 0.0139182, 1, 0, 0.459155,-99) , -12, 0.506508, 0, 0, 0.468386,-99) , -5, 1.37069, 1, 0, 0.49419,-99) ); - // itree = 1053 - fBoostWeights.push_back(0.00658372); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577581,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464224,-99) , -6, 0.790496, 1, 0, 0.527205,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250988,-99) , -5, 1.82838, 1, 0, 0.472036,-99) , -3, 0.993175, 1, 0, 0.511099,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400209,-99) , -5, 1.35138, 1, 0, 0.494941,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236494,-99) , -2, 24.5, 0, 0, 0.450743,-99) , -7, 0.0405838, 1, 0, 0.497695,-99) , -10, 11955.2, 0, 0, 0.504821,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559127,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483532,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.262208,-99) , -9, 2.72091, 0, 0, 0.370958,-99) , -9, -1.90428, 1, 0, 0.455465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211811,-99) , -8, -0.214729, 0, 0, 0.42192,-99) , -4, 1.68175, 1, 0, 0.495438,-99) ); - // itree = 1054 - fBoostWeights.push_back(0.00553361); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636016,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546588,-99) , -6, 0.170437, 1, 0, 0.57161,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433732,-99) , -0, 13.5, 0, 0, 0.545777,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39802,-99) , -8, -0.944681, 0, 0, 0.497001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266704,-99) , -5, 2.31694, 1, 0, 0.493297,-99) , -11, 1.5, 0, 0, 0.51118,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552555,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445253,-99) , -8, 0.84384, 1, 0, 0.525177,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298186,-99) , -7, 0.0253936, 1, 0, 0.494628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.258775,-99) , -5, 1.8442, 1, 0, 0.449424,-99) , -1, 9.5, 0, 0, 0.498395,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298165,-99) , -3, 0.999717, 1, 0, 0.494576,-99) ); - // itree = 1055 - fBoostWeights.push_back(0.00509172); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655632,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570689,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494825,-99) , -3, 0.977132, 1, 0, 0.538094,-99) , -3, 0.995186, 0, 0, 0.562399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485035,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166699,-99) , -5, 1.9805, 1, 0, 0.459532,-99) , -3, 0.997878, 1, 0, 0.541567,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393546,-99) , -7, 0.0282957, 1, 0, 0.497982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259298,-99) , -4, 1.98841, 1, 0, 0.492428,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0786589,-99) , -7, 0.0572138, 1, 0, 0.486565,-99) , -2, 21.5, 0, 0, 0.503139,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301154,-99) , -13, 0.0707336, 1, 0, 0.500548,-99) ); - // itree = 1056 - fBoostWeights.push_back(0.00654608); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671594,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378986,-99) , -15, 0.0445217, 0, 0, 0.544213,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451333,-99) , -3, 0.953229, 1, 0, 0.482389,-99) , -8, 0.510771, 1, 0, 0.51104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412961,-99) , -3, 0.991256, 1, 0, 0.489773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320971,-99) , -5, 1.44014, 1, 0, 0.441836,-99) , -13, 0.0122466, 1, 0, 0.500258,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533103,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243421,-99) , -14, -3.65118, 1, 0, 0.387761,-99) , -4, 1.7161, 1, 0, 0.48933,-99) , -12, 0.535654, 0, 0, 0.495637,-99) ); - // itree = 1057 - fBoostWeights.push_back(0.00317601); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48129,-99) , -5, 1.73406, 1, 0, 0.591828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498042,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366843,-99) , -8, -0.982477, 0, 0, 0.492376,-99) , -10, -8003.35, 1, 0, 0.498793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334206,-99) , -3, 0.722978, 0, 0, 0.494827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246077,-99) , -4, 2.23892, 1, 0, 0.493353,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315188,-99) , -12, 0.112318, 1, 0, 0.400747,-99) , -2, 8.5, 0, 0, 0.485096,-99) ); - // itree = 1058 - fBoostWeights.push_back(0.0043916); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621621,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612364,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517914,-99) , -3, 0.996504, 0, 0, 0.543777,-99) , -6, 0.168793, 1, 0, 0.562378,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434855,-99) , -3, 0.990418, 1, 0, 0.505109,-99) , -15, 0.466927, 1, 0, 0.54451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408749,-99) , -16, 2.4624, 0, 0, 0.52956,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51473,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456831,-99) , -8, 0.434681, 1, 0, 0.487413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322913,-99) , -1, 51.5, 1, 0, 0.480011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.101489,-99) , -4, 1.97611, 1, 0, 0.477765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309836,-99) , -5, 2.10686, 1, 0, 0.468017,-99) , -16, 500.939, 1, 0, 0.492375,-99) ); - // itree = 1059 - fBoostWeights.push_back(0.00337517); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619018,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.541373,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489336,-99) , -4, 0.725479, 1, 0, 0.504791,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39902,-99) , -5, 0.43803, 0, 0, 0.499372,-99) , -4, 1.68762, 0, 0, 0.504605,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535315,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277346,-99) , -13, 0.000247091, 1, 0, 0.411198,-99) , -4, 1.76189, 1, 0, 0.497359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.108563,-99) , -7, 0.284023, 1, 0, 0.4953,-99) ); - // itree = 1060 - fBoostWeights.push_back(0.00828076); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648407,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.612061,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52512,-99) , -3, 0.933294, 1, 0, 0.542428,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408944,-99) , -13, 0.0288159, 1, 0, 0.53039,-99) , -9, -6.06924, 1, 0, 0.544428,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430905,-99) , -8, 0.930636, 1, 0, 0.517558,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548306,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334329,-99) , -6, 0.508879, 1, 0, 0.389721,-99) , -8, 0.989249, 0, 0, 0.431096,-99) , -5, 1.43429, 0, 0, 0.466278,-99) , -14, -2.75626, 0, 0, 0.517476,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644229,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539637,-99) , -10, 2897.69, 1, 0, 0.595118,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488069,-99) , -4, 1.83837, 0, 0, 0.518636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386609,-99) , -16, 885.24, 1, 0, 0.480835,-99) , -0, 18.5, 0, 0, 0.527645,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420489,-99) , -11, 0.5, 1, 0, 0.510294,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415293,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226553,-99) , -7, 0.0396817, 1, 0, 0.387681,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161002,-99) , -5, 2.12017, 1, 0, 0.363584,-99) , -14, -3.69527, 1, 0, 0.415554,-99) , -11, 1.5, 0, 0, 0.457505,-99) , -5, 1.64929, 1, 0, 0.495314,-99) ); - // itree = 1061 - fBoostWeights.push_back(0.00374354); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.671245,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51808,-99) , -4, 1.86266, 0, 0, 0.523342,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352097,-99) , -4, 1.97334, 1, 0, 0.519802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340423,-99) , -13, 0.0375676, 1, 0, 0.515248,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376446,-99) , -3, 0.982039, 1, 0, 0.444052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125982,-99) , -4, 1.54245, 1, 0, 0.423621,-99) , -8, -0.90201, 0, 0, 0.505546,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300471,-99) , -5, 2.30896, 1, 0, 0.501001,-99) ); - // itree = 1062 - fBoostWeights.push_back(0.00387531); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626867,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53961,-99) , -8, 0.0805906, 1, 0, 0.579011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392886,-99) , -5, 2.08694, 1, 0, 0.570451,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611084,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508849,-99) , -3, 0.917605, 1, 0, 0.537025,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484493,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360124,-99) , -4, 0.463238, 0, 0, 0.474197,-99) , -6, 0.23793, 1, 0, 0.493361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304889,-99) , -7, 0.00734406, 0, 0, 0.488925,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344099,-99) , -3, 0.999142, 1, 0, 0.480691,-99) , -9, 5.6726, 0, 0, 0.491437,-99) ); - // itree = 1063 - fBoostWeights.push_back(0.0092011); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659419,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573522,-99) , -2, 11.5, 0, 0, 0.614895,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468887,-99) , -5, 2.08696, 1, 0, 0.604914,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435804,-99) , -7, 0.0638995, 1, 0, 0.566661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410774,-99) , -0, 17.5, 0, 0, 0.513941,-99) , -15, 0.152716, 1, 0, 0.55577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409036,-99) , -6, 0.991006, 1, 0, 0.535286,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620806,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539512,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434078,-99) , -12, 0.0693137, 0, 0, 0.514395,-99) , -12, 0.0569576, 1, 0, 0.534515,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543412,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41834,-99) , -2, 13.5, 0, 0, 0.493424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36776,-99) , -3, 0.986962, 1, 0, 0.44193,-99) , -12, 0.0461788, 0, 0, 0.503186,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492216,-99) , -10, 4627.92, 0, 0, 0.542065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40567,-99) , -2, 12.5, 0, 0, 0.501926,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370703,-99) , -3, 0.975408, 1, 0, 0.469333,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249787,-99) , -9, -0.65942, 1, 0, 0.348601,-99) , -6, 0.188092, 1, 0, 0.388641,-99) , -5, 1.34285, 1, 0, 0.428677,-99) , -12, 0.113589, 1, 0, 0.463673,-99) , -9, 2.88843, 0, 0, 0.481148,-99) ); - // itree = 1064 - fBoostWeights.push_back(0.00890372); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604181,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504862,-99) , -15, 0.118119, 0, 0, 0.576183,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522092,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386275,-99) , -4, 0.815125, 1, 0, 0.47444,-99) , -13, 0.00814218, 1, 0, 0.54276,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390071,-99) , -15, 0.265436, 1, 0, 0.50643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357304,-99) , -8, 0.969994, 0, 0, 0.463252,-99) , -8, 0.91442, 1, 0, 0.522951,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374785,-99) , -14, -3.70137, 0, 0, 0.489673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.375695,-99) , -8, -0.750759, 0, 0, 0.472438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309992,-99) , -3, 0.885688, 0, 0, 0.459383,-99) , -6, 0.590535, 1, 0, 0.495268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620171,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443845,-99) , -2, 11.5, 0, 0, 0.558226,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287849,-99) , -16, 682.161, 1, 0, 0.368887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0571537,-99) , -5, 2.26444, 1, 0, 0.319189,-99) , -14, -3.9794, 1, 0, 0.422219,-99) , -5, 1.94292, 1, 0, 0.485243,-99) ); - // itree = 1065 - fBoostWeights.push_back(0.00500939); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676365,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545174,-99) , -13, 0.00393637, 0, 0, 0.601098,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467135,-99) , -8, 0.863019, 1, 0, 0.557346,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304813,-99) , -15, 1.95936, 1, 0, 0.490289,-99) , -5, 1.4871, 1, 0, 0.523157,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506245,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389522,-99) , -15, 0.22872, 1, 0, 0.484172,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.332234,-99) , -7, 0.00939397, 0, 0, 0.4702,-99) , -12, 0.111237, 1, 0, 0.494559,-99) , -10, -8078.09, 1, 0, 0.501913,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.213887,-99) , -15, 0.141531, 0, 0, 0.3738,-99) , -8, -0.975686, 0, 0, 0.495476,-99) ); - // itree = 1066 - fBoostWeights.push_back(0.00290148); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495089,-99) , -6, 0.27189, 1, 0, 0.512901,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393782,-99) , -14, -4.99056, 0, 0, 0.506573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36945,-99) , -5, 2.24281, 1, 0, 0.502129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.18686,-99) , -7, 0.284097, 1, 0, 0.500212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253878,-99) , -2, 6.5, 0, 0, 0.495376,-99) ); - // itree = 1067 - fBoostWeights.push_back(0.00308914); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.673648,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43759,-99) , -15, 0.0663481, 0, 0, 0.496937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318014,-99) , -14, -5.85956, 0, 0, 0.49325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31743,-99) , -3, 0.721925, 0, 0, 0.48892,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.134757,-99) , -7, 0.284097, 1, 0, 0.487045,-99) , -12, 0.526853, 0, 0, 0.494129,-99) ); - // itree = 1068 - fBoostWeights.push_back(0.00512866); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.711811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478013,-99) , -8, 0.447027, 1, 0, 0.609567,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618426,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448874,-99) , -13, 0.00137782, 0, 0, 0.565075,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235407,-99) , -3, 0.730017, 0, 0, 0.476879,-99) , -4, 0.390953, 1, 0, 0.488391,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362097,-99) , -5, 0.539941, 0, 0, 0.482164,-99) , -10, -8059.38, 1, 0, 0.490929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240136,-99) , -12, 0.0165158, 0, 0, 0.486766,-99) ); - // itree = 1069 - fBoostWeights.push_back(0.00454948); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639737,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61637,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525342,-99) , -9, -8.47713, 1, 0, 0.549341,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425897,-99) , -15, 0.95918, 1, 0, 0.534211,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478498,-99) , -10, -8057.68, 1, 0, 0.487495,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.446409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.167092,-99) , -13, 0.00212254, 1, 0, 0.381178,-99) , -4, 1.63946, 1, 0, 0.474533,-99) , -9, -3.20886, 1, 0, 0.487619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349372,-99) , -13, 0.0296889, 1, 0, 0.481478,-99) , -12, 0.525205, 0, 0, 0.487064,-99) ); - // itree = 1070 - fBoostWeights.push_back(0.00588007); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632754,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536456,-99) , -2, 16.5, 0, 0, 0.584394,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487704,-99) , -1, 32.5, 1, 0, 0.56485,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543895,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366164,-99) , -8, 0.585156, 1, 0, 0.430025,-99) , -8, 0.962408, 0, 0, 0.462091,-99) , -13, 0.00292841, 0, 0, 0.525215,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478125,-99) , -0, 10.5, 1, 0, 0.49419,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.257849,-99) , -4, 1.5876, 1, 0, 0.409581,-99) , -13, 0.00609678, 1, 0, 0.478065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294884,-99) , -7, 0.0795137, 1, 0, 0.467798,-99) , -5, 1.38049, 1, 0, 0.490583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282315,-99) , -3, 0.999675, 1, 0, 0.486155,-99) ); - // itree = 1071 - fBoostWeights.push_back(0.00771645); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668422,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558288,-99) , -3, 0.995261, 0, 0, 0.614422,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57536,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444736,-99) , -15, 0.136068, 1, 0, 0.516357,-99) , -1, 11.5, 0, 0, 0.568589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112928,-99) , -4, 2.10596, 1, 0, 0.560493,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64246,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549418,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463639,-99) , -5, 1.32802, 1, 0, 0.51481,-99) , -6, 0.213082, 1, 0, 0.55573,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160374,-99) , -5, 2.43431, 1, 0, 0.484955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178008,-99) , -7, 0.0491869, 1, 0, 0.476567,-99) , -2, 24.5, 0, 0, 0.494419,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622262,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488734,-99) , -8, 0.837557, 1, 0, 0.565205,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381423,-99) , -13, 0.0063659, 1, 0, 0.517726,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151751,-99) , -5, 2.02189, 1, 0, 0.364946,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198592,-99) , -3, 0.999373, 1, 0, 0.333444,-99) , -9, -5.17029, 1, 0, 0.423276,-99) , -3, 0.996199, 1, 0, 0.479062,-99) , -10, -1628.84, 1, 0, 0.494409,-99) ); - // itree = 1072 - fBoostWeights.push_back(0.0064018); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.680497,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570776,-99) , -4, 1.42583, 0, 0, 0.607108,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.575405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464402,-99) , -16, 1484.71, 0, 0, 0.5309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23301,-99) , -7, 0.0323507, 1, 0, 0.502344,-99) , -1, 14.5, 0, 0, 0.542466,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633273,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53001,-99) , -9, -4.56795, 0, 0, 0.55762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439946,-99) , -6, 0.914724, 1, 0, 0.530584,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455542,-99) , -4, 0.691057, 1, 0, 0.476807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264136,-99) , -3, 0.996584, 1, 0, 0.459573,-99) , -9, -3.70153, 1, 0, 0.477634,-99) , -9, 2.78693, 0, 0, 0.493646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350642,-99) , -5, 0.450886, 0, 0, 0.487335,-99) ); - // itree = 1073 - fBoostWeights.push_back(0.00572583); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472206,-99) , -6, 0.832709, 1, 0, 0.618113,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445175,-99) , -4, 1.61891, 0, 0, 0.477737,-99) , -8, 0.708462, 1, 0, 0.563148,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610099,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526952,-99) , -2, 30.5, 0, 0, 0.546556,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504128,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325871,-99) , -10, 6279.72, 1, 0, 0.455179,-99) , -12, 0.0327224, 0, 0, 0.5263,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635367,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477075,-99) , -5, 1.90894, 0, 0, 0.485176,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307949,-99) , -12, 0.411844, 0, 0, 0.363496,-99) , -5, 1.95945, 1, 0, 0.468081,-99) , -12, 0.100949, 1, 0, 0.492484,-99) , -9, 4.91985, 0, 0, 0.502365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195204,-99) , -13, 0.110219, 1, 0, 0.500204,-99) ); - // itree = 1074 - fBoostWeights.push_back(0.00379355); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624975,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511137,-99) , -1, 9.5, 0, 0, 0.587806,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425884,-99) , -15, 0.80139, 1, 0, 0.563408,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.614883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488737,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.307212,-99) , -3, 0.999253, 1, 0, 0.481716,-99) , -10, -11965.1, 1, 0, 0.487617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 2.20336, 1, 0, 0.485754,-99) , -10, 10989.1, 0, 0, 0.494829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267163,-99) , -7, 0.00711657, 0, 0, 0.490639,-99) ); - // itree = 1075 - fBoostWeights.push_back(0.00498307); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636018,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38391,-99) , -14, -5.19352, 0, 0, 0.504524,-99) , -4, 1.92357, 0, 0, 0.510624,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405166,-99) , -12, 0.166233, 1, 0, 0.509743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328043,-99) , -12, 0.0651839, 0, 0, 0.453462,-99) , -6, 0.939099, 1, 0, 0.49998,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337513,-99) , -5, 2.49125, 1, 0, 0.498295,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43317,-99) , -2, 19.5, 0, 0, 0.500622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390381,-99) , -3, 0.996996, 1, 0, 0.470477,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285491,-99) , -5, 1.57333, 1, 0, 0.427504,-99) , -13, 0.00964188, 1, 0, 0.48466,-99) ); - // itree = 1076 - fBoostWeights.push_back(0.003765); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665664,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.463415,-99) , -12, 0.0310581, 0, 0, 0.529853,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387511,-99) , -4, 1.53338, 1, 0, 0.464659,-99) , -12, 0.136403, 1, 0, 0.502112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346922,-99) , -8, -0.981405, 0, 0, 0.495107,-99) , -12, 0.523186, 0, 0, 0.500877,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176108,-99) , -5, 2.49129, 1, 0, 0.498461,-99) ); - // itree = 1077 - fBoostWeights.push_back(0.00517879); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590854,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516938,-99) , -12, 0.127032, 1, 0, 0.556569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441539,-99) , -12, 0.030443, 0, 0, 0.544756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392945,-99) , -3, 0.999148, 1, 0, 0.535742,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299507,-99) , -4, 1.98841, 1, 0, 0.501182,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364371,-99) , -7, 0.026574, 1, 0, 0.488645,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.117036,-99) , -0, 26.5, 1, 0, 0.47873,-99) , -2, 16.5, 0, 0, 0.503556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314663,-99) , -3, 0.999674, 1, 0, 0.499045,-99) ); - // itree = 1078 - fBoostWeights.push_back(0.00668342); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.704139,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578886,-99) , -13, 0.00126575, 0, 0, 0.642123,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495697,-99) , -5, 2.09244, 0, 0, 0.528315,-99) , -15, 0.188767, 0, 0, 0.584027,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423158,-99) , -2, 11.5, 0, 0, 0.516913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395984,-99) , -15, 0.382922, 1, 0, 0.480386,-99) , -3, 0.975422, 1, 0, 0.527671,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286202,-99) , -3, 0.999207, 1, 0, 0.560769,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472106,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0715866,-99) , -0, 55.5, 1, 0, 0.46589,-99) , -2, 40.5, 0, 0, 0.478417,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.277402,-99) , -12, 0.0188313, 0, 0, 0.472959,-99) , -6, 0.296726, 1, 0, 0.491991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274516,-99) , -7, 0.0074299, 0, 0, 0.486743,-99) ); - // itree = 1079 - fBoostWeights.push_back(0.00400485); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648129,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625448,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529605,-99) , -1, 14.5, 0, 0, 0.563102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240562,-99) , -5, 2.02305, 1, 0, 0.549618,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351163,-99) , -7, 0.00884556, 0, 0, 0.482679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360167,-99) , -3, 0.999116, 1, 0, 0.475998,-99) , -9, 4.28317, 0, 0, 0.488452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303221,-99) , -5, 2.26567, 1, 0, 0.483664,-99) , -12, 0.526853, 0, 0, 0.489628,-99) ); - // itree = 1080 - fBoostWeights.push_back(0.00444211); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511453,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338881,-99) , -12, 0.01821, 0, 0, 0.506765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362299,-99) , -13, 0.0377402, 1, 0, 0.50126,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508615,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.289066,-99) , -7, 0.0115443, 0, 0, 0.384658,-99) , -15, 0.0417649, 0, 0, 0.492763,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374681,-99) , -10, 3759.61, 1, 0, 0.445614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315334,-99) , -15, 0.345926, 1, 0, 0.405527,-99) , -8, 0.984937, 1, 0, 0.482481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317835,-99) , -5, 2.23643, 1, 0, 0.477085,-99) ); - // itree = 1081 - fBoostWeights.push_back(0.00437972); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65227,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537339,-99) , -2, 23.5, 0, 0, 0.58549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481599,-99) , -13, 0.00186439, 0, 0, 0.557457,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640455,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32639,-99) , -13, 0.0206279, 1, 0, 0.474362,-99) , -12, 0.499302, 0, 0, 0.481618,-99) , -5, 1.13304, 1, 0, 0.496717,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.357109,-99) , -5, 0.436112, 0, 0, 0.490776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297226,-99) , -5, 2.25092, 1, 0, 0.484971,-99) ); - // itree = 1082 - fBoostWeights.push_back(0.00593756); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688622,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653267,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455004,-99) , -8, 0.922005, 1, 0, 0.528223,-99) , -9, -5.16376, 1, 0, 0.547395,-99) , -6, 0.0824607, 1, 0, 0.565557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358263,-99) , -14, -4.84626, 0, 0, 0.550831,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484735,-99) , -10, -2390.49, 1, 0, 0.497845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.227325,-99) , -1, 5.5, 0, 0, 0.491914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123923,-99) , -7, 0.135521, 1, 0, 0.486655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308242,-99) , -1, 52.5, 1, 0, 0.4783,-99) , -11, 1.5, 0, 0, 0.502641,-99) ); - // itree = 1083 - fBoostWeights.push_back(0.00575202); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.688896,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523075,-99) , -6, 0.288252, 1, 0, 0.617039,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.599223,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216828,-99) , -4, 1.99501, 1, 0, 0.487475,-99) , -9, -5.46381, 1, 0, 0.506702,-99) , -3, 0.950137, 1, 0, 0.534205,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617214,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517899,-99) , -2, 30.5, 0, 0, 0.55011,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504957,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410321,-99) , -15, 0.263585, 1, 0, 0.455173,-99) , -13, 0.00263629, 0, 0, 0.516421,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490082,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417133,-99) , -11, 0.5, 1, 0, 0.453063,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279283,-99) , -7, 0.0695649, 1, 0, 0.440815,-99) , -5, 1.39177, 1, 0, 0.472276,-99) , -11, 1.5, 0, 0, 0.493384,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303805,-99) , -3, 0.999645, 1, 0, 0.488816,-99) ); - // itree = 1084 - fBoostWeights.push_back(0.00512794); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701548,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588311,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4693,-99) , -3, 0.987483, 1, 0, 0.524941,-99) , -15, 0.569292, 1, 0, 0.58111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221216,-99) , -1, 14.5, 0, 0, 0.5614,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538676,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482847,-99) , -16, 471.29, 1, 0, 0.503643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328241,-99) , -1, 34.5, 1, 0, 0.498631,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180729,-99) , -7, 0.079848, 1, 0, 0.492528,-99) , -2, 39.5, 0, 0, 0.501794,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.441638,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189471,-99) , -5, 1.75954, 1, 0, 0.409482,-99) , -8, -0.935835, 0, 0, 0.494043,-99) ); - // itree = 1085 - fBoostWeights.push_back(0.0072037); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60028,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512989,-99) , -6, 0.662033, 1, 0, 0.568961,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443061,-99) , -8, -0.893293, 0, 0, 0.555435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400759,-99) , -16, 3.32022, 0, 0, 0.531427,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521692,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128526,-99) , -4, 2.06351, 1, 0, 0.516908,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49148,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25286,-99) , -2, 21.5, 0, 0, 0.439377,-99) , -7, 0.0331436, 1, 0, 0.489081,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465672,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325094,-99) , -8, 0.887412, 1, 0, 0.435214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252999,-99) , -5, 1.8762, 1, 0, 0.399064,-99) , -7, 0.0128262, 0, 0, 0.468563,-99) , -16, 271.158, 1, 0, 0.490118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291676,-99) , -3, 0.99965, 1, 0, 0.485402,-99) ); - // itree = 1086 - fBoostWeights.push_back(0.00396328); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666474,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522951,-99) , -3, 0.993795, 1, 0, 0.608415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488481,-99) , -9, 1.36647, 1, 0, 0.570262,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501221,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199758,-99) , -4, 2.20307, 1, 0, 0.499593,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272712,-99) , -7, 0.0650985, 1, 0, 0.491455,-99) , -2, 39.5, 0, 0, 0.501032,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0870051,-99) , -7, 0.330376, 1, 0, 0.49932,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299113,-99) , -12, 0.01821, 0, 0, 0.494729,-99) ); - // itree = 1087 - fBoostWeights.push_back(0.0052142); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594676,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513662,-99) , -10, 2476.5, 1, 0, 0.550066,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318068,-99) , -12, 0.0165015, 0, 0, 0.539996,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590636,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469155,-99) , -2, 25.5, 0, 0, 0.488624,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260984,-99) , -7, 0.0997566, 1, 0, 0.478507,-99) , -12, 0.113401, 1, 0, 0.507746,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249921,-99) , -3, 0.687679, 0, 0, 0.503582,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358969,-99) , -5, 0.505717, 0, 0, 0.497053,-99) ); - // itree = 1088 - fBoostWeights.push_back(0.00420354); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578352,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.468599,-99) , -14, -2.89052, 0, 0, 0.542808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420175,-99) , -5, 0.523452, 0, 0, 0.527672,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566069,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480069,-99) , -3, 0.957042, 1, 0, 0.492427,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341164,-99) , -8, 0.821653, 0, 0, 0.387143,-99) , -3, 0.913341, 0, 0, 0.478759,-99) , -4, 0.891937, 1, 0, 0.497912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333621,-99) , -3, 0.999665, 1, 0, 0.494292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295501,-99) , -5, 2.25092, 1, 0, 0.488534,-99) ); - // itree = 1089 - fBoostWeights.push_back(0.00320681); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633583,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398865,-99) , -14, -4.57863, 0, 0, 0.516579,-99) , -8, 0.999557, 0, 0, 0.521588,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322353,-99) , -4, 2.07717, 1, 0, 0.518468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32725,-99) , -12, 0.0192724, 0, 0, 0.513828,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503434,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243044,-99) , -5, 1.84979, 1, 0, 0.354642,-99) , -3, 0.951219, 1, 0, 0.401856,-99) , -8, -0.945944, 0, 0, 0.505017,-99) ); - // itree = 1090 - fBoostWeights.push_back(0.00436249); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661111,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554551,-99) , -9, -7.2959, 1, 0, 0.569208,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426446,-99) , -7, 0.0256827, 1, 0, 0.491082,-99) , -10, 1979.63, 0, 0, 0.539339,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.351597,-99) , -10, 4808.75, 1, 0, 0.457729,-99) , -12, 0.0465163, 0, 0, 0.523385,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372989,-99) , -7, 0.084193, 1, 0, 0.483544,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326622,-99) , -2, 7.5, 0, 0, 0.475917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336175,-99) , -3, 0.999388, 1, 0, 0.468266,-99) , -16, 957.348, 1, 0, 0.493198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353464,-99) , -8, -0.972059, 0, 0, 0.486156,-99) ); - // itree = 1091 - fBoostWeights.push_back(0.00449357); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564338,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256969,-99) , -1, 12.5, 0, 0, 0.548363,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200974,-99) , -7, 0.0565488, 1, 0, 0.480091,-99) , -2, 30.5, 0, 0, 0.491008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.158512,-99) , -5, 2.57722, 1, 0, 0.489454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120629,-99) , -7, 0.234429, 1, 0, 0.48751,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31321,-99) , -1, 68.5, 1, 0, 0.482494,-99) ); - // itree = 1092 - fBoostWeights.push_back(0.00819536); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628067,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621822,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259987,-99) , -5, 1.76068, 1, 0, 0.484923,-99) , -6, 0.483685, 1, 0, 0.550915,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47215,-99) , -4, 1.69365, 1, 0, 0.551811,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391481,-99) , -3, 0.979185, 1, 0, 0.434713,-99) , -4, 1.41532, 0, 0, 0.477835,-99) , -13, 0.00187741, 0, 0, 0.508242,-99) , -10, -4175.43, 1, 0, 0.52418,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616598,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516322,-99) , -8, 0.488867, 0, 0, 0.573517,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38989,-99) , -1, 9.5, 0, 0, 0.539601,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369053,-99) , -2, 9.5, 0, 0, 0.465867,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305407,-99) , -4, 1.70828, 1, 0, 0.452296,-99) , -9, -1.08584, 1, 0, 0.484256,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529255,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326483,-99) , -6, 0.946461, 0, 0, 0.362945,-99) , -9, 6.3294, 0, 0, 0.414962,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118772,-99) , -15, 0.614634, 1, 0, 0.393334,-99) , -3, 0.997126, 1, 0, 0.464806,-99) , -12, 0.101379, 1, 0, 0.49017,-99) ); - // itree = 1093 - fBoostWeights.push_back(0.00667618); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.667234,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569259,-99) , -12, 0.0684851, 1, 0, 0.608791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56623,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402864,-99) , -1, 35.5, 1, 0, 0.509237,-99) , -16, 1716.19, 1, 0, 0.564616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.206714,-99) , -1, 10.5, 0, 0, 0.549936,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636179,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347793,-99) , -13, 0.0163313, 1, 0, 0.482187,-99) , -9, -9.77374, 1, 0, 0.48939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26268,-99) , -7, 0.0393753, 1, 0, 0.476494,-99) , -2, 23.5, 0, 0, 0.496141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278654,-99) , -12, 0.0173719, 0, 0, 0.491372,-99) ); - // itree = 1094 - fBoostWeights.push_back(0.00233828); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.632902,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480324,-99) , -4, 0.838802, 1, 0, 0.499742,-99) , -10, -13241, 1, 0, 0.504897,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34263,-99) , -3, 0.999685, 1, 0, 0.501037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312359,-99) , -2, 6.5, 0, 0, 0.497617,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.163201,-99) , -5, 2.5698, 1, 0, 0.496289,-99) ); - // itree = 1095 - fBoostWeights.push_back(0.00512759); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635887,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623189,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49304,-99) , -7, 0.0209882, 0, 0, 0.572999,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380479,-99) , -4, -0.205876, 0, 0, 0.492308,-99) , -3, 0.951049, 1, 0, 0.513607,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618011,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47716,-99) , -10, 12318.8, 0, 0, 0.494368,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431632,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.268703,-99) , -4, 1.82178, 1, 0, 0.416775,-99) , -12, 0.124355, 1, 0, 0.455328,-99) , -4, 0.913059, 1, 0, 0.478844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291759,-99) , -14, -5.77556, 0, 0, 0.474264,-99) , -10, -13278.5, 1, 0, 0.47997,-99) ); - // itree = 1096 - fBoostWeights.push_back(0.00458922); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.682283,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606444,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537274,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457158,-99) , -9, 1.73686, 1, 0, 0.520353,-99) , -10, -4132.79, 1, 0, 0.530479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38566,-99) , -12, 0.0165266, 0, 0, 0.524248,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.592912,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46439,-99) , -5, 1.66456, 1, 0, 0.55673,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582328,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442889,-99) , -9, 8.68126, 0, 0, 0.453137,-99) , -10, 9477.89, 0, 0, 0.467866,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305505,-99) , -5, 2.12369, 1, 0, 0.456856,-99) , -12, 0.11223, 1, 0, 0.489813,-99) , -12, 0.523169, 0, 0, 0.496769,-99) ); - // itree = 1097 - fBoostWeights.push_back(0.00559185); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616461,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525119,-99) , -13, 0.0110552, 1, 0, 0.580588,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524875,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426174,-99) , -15, 0.293737, 1, 0, 0.484036,-99) , -8, 0.424525, 1, 0, 0.535331,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515977,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.394628,-99) , -12, 0.0312599, 0, 0, 0.503631,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477474,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305037,-99) , -5, 1.42822, 1, 0, 0.381575,-99) , -13, 0.0074373, 1, 0, 0.479628,-99) , -4, 0.860427, 1, 0, 0.500212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.244798,-99) , -7, 0.00677737, 0, 0, 0.496999,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328074,-99) , -8, -0.988169, 0, 0, 0.491349,-99) ); - // itree = 1098 - fBoostWeights.push_back(0.002897); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603528,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504252,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383348,-99) , -14, -1.5919, 1, 0, 0.498218,-99) , -5, 0.799129, 1, 0, 0.504183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322348,-99) , -7, 0.00711389, 0, 0, 0.500402,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380913,-99) , -5, 0.455288, 0, 0, 0.494951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.267657,-99) , -3, 0.999642, 1, 0, 0.489806,-99) ); - // itree = 1099 - fBoostWeights.push_back(0.0037775); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638794,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398119,-99) , -5, 0.516124, 0, 0, 0.508224,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234502,-99) , -13, 0.0151468, 1, 0, 0.45918,-99) , -5, 1.59853, 1, 0, 0.487893,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.246433,-99) , -7, 0.00668203, 0, 0, 0.484858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.201656,-99) , -13, 0.065529, 1, 0, 0.481572,-99) , -12, 0.52475, 0, 0, 0.487068,-99) ); - // itree = 1100 - fBoostWeights.push_back(0.00412383); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.706291,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606386,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508618,-99) , -16, 74.1657, 1, 0, 0.531203,-99) , -4, 1.81105, 0, 0, 0.54868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0945496,-99) , -5, 2.27317, 1, 0, 0.54224,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621399,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494596,-99) , -10, 455.687, 1, 0, 0.500498,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308381,-99) , -8, 0.652423, 1, 0, 0.412183,-99) , -9, 1.71293, 1, 0, 0.491031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229603,-99) , -13, 0.0719091, 1, 0, 0.488213,-99) , -9, 2.91299, 0, 0, 0.501234,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326017,-99) , -3, 0.999637, 1, 0, 0.496581,-99) ); - // itree = 1101 - fBoostWeights.push_back(0.00576262); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.729653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.429976,-99) , -8, 0.970212, 1, 0, 0.533704,-99) , -4, 1.80265, 0, 0, 0.550951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133827,-99) , -1, 10.5, 0, 0, 0.537219,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557364,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475997,-99) , -16, 11.9843, 1, 0, 0.487212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292943,-99) , -14, -5.69376, 0, 0, 0.481905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.129637,-99) , -7, 0.0548971, 1, 0, 0.47534,-99) , -2, 24.5, 0, 0, 0.49107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166688,-99) , -7, 0.24866, 1, 0, 0.488559,-99) ); - // itree = 1102 - fBoostWeights.push_back(0.00734282); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.26469, 1, 0, 0.561183,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511659,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356669,-99) , -8, 0.967, 0, 0, 0.476893,-99) , -8, 0.921572, 1, 0, 0.537747,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59825,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507614,-99) , -13, 0.00150755, 0, 0, 0.543698,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393765,-99) , -9, 2.34593, 0, 0, 0.439019,-99) , -12, 0.0995748, 1, 0, 0.483534,-99) , -9, -0.213307, 1, 0, 0.510148,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455101,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362035,-99) , -15, 0.13122, 0, 0, 0.419368,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0677164,-99) , -4, 1.63673, 1, 0, 0.404849,-99) , -8, -0.947019, 0, 0, 0.501551,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548993,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342612,-99) , -9, -6.62922, 1, 0, 0.416789,-99) , -10, -5211.24, 1, 0, 0.45292,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.062391,-99) , -5, 2.15967, 1, 0, 0.442016,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132709,-99) , -0, 86.5, 1, 0, 0.422815,-99) , -3, 0.998129, 1, 0, 0.489675,-99) ); - // itree = 1103 - fBoostWeights.push_back(0.00584127); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684291,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516281,-99) , -5, 1.97941, 0, 0, 0.590686,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648674,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578602,-99) , -6, 0.0721518, 1, 0, 0.611842,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530863,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.435448,-99) , -15, 0.0888596, 0, 0, 0.494589,-99) , -1, 15.5, 0, 0, 0.553889,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269577,-99) , -13, 0.0643836, 1, 0, 0.481845,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345473,-99) , -8, 0.983154, 1, 0, 0.473086,-99) , -6, 0.171633, 1, 0, 0.490974,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471765,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160981,-99) , -8, 0.946389, 0, 0, 0.330215,-99) , -5, 2.08848, 1, 0, 0.481364,-99) , -8, 0.998216, 0, 0, 0.488586,-99) ); - // itree = 1104 - fBoostWeights.push_back(0.00372105); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658634,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494847,-99) , -10, -3867.5, 1, 0, 0.508318,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.393279,-99) , -12, 0.138799, 1, 0, 0.445698,-99) , -7, 0.0144882, 0, 0, 0.491358,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.16275,-99) , -7, 0.24882, 1, 0, 0.489051,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297645,-99) , -12, 0.0173719, 0, 0, 0.484914,-99) , -12, 0.536636, 0, 0, 0.490202,-99) ); - // itree = 1105 - fBoostWeights.push_back(0.00325422); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589149,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508,-99) , -0, 19.5, 0, 0, 0.545935,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405257,-99) , -7, 0.0600099, 1, 0, 0.49123,-99) , -11, 1.5, 0, 0, 0.509388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0800422,-99) , -5, 2.54964, 1, 0, 0.507695,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381568,-99) , -14, -5.29943, 0, 0, 0.502522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304198,-99) , -3, 0.723285, 0, 0, 0.497802,-99) ); - // itree = 1106 - fBoostWeights.push_back(0.00432295); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628695,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516094,-99) , -16, 1551.88, 0, 0, 0.578226,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5464,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487027,-99) , -9, 3.60073, 0, 0, 0.500243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370158,-99) , -8, -0.982737, 0, 0, 0.493905,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316634,-99) , -14, -5.46183, 0, 0, 0.489346,-99) , -10, 12234, 0, 0, 0.497584,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443948,-99) , -16, 213.866, 1, 0, 0.513831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.247126,-99) , -8, 0.946369, 0, 0, 0.409614,-99) , -5, 2.02747, 1, 0, 0.489142,-99) ); - // itree = 1107 - fBoostWeights.push_back(0.0024101); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482557,-99) , -9, -1.21626, 1, 0, 0.50112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388868,-99) , -8, -0.983947, 0, 0, 0.496416,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324701,-99) , -4, 2.06704, 1, 0, 0.493591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306708,-99) , -15, 3.99085, 1, 0, 0.490065,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302625,-99) , -1, 5.5, 0, 0, 0.48615,-99) ); - // itree = 1108 - fBoostWeights.push_back(0.00576096); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596996,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582801,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469001,-99) , -4, 1.43323, 0, 0, 0.491428,-99) , -13, 0.0112774, 0, 0, 0.510983,-99) , -3, 0.936097, 1, 0, 0.531376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596782,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516188,-99) , -1, 33.5, 1, 0, 0.559106,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418708,-99) , -7, 0.113159, 1, 0, 0.527095,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369708,-99) , -4, 1.664, 1, 0, 0.470355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126504,-99) , -7, 0.0571202, 1, 0, 0.460043,-99) , -2, 30.5, 0, 0, 0.472486,-99) , -16, 82.2326, 1, 0, 0.487327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436055,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165683,-99) , -13, 0.0008453, 1, 0, 0.350543,-99) , -4, 1.82602, 1, 0, 0.479535,-99) ); - // itree = 1109 - fBoostWeights.push_back(0.00474625); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619577,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494573,-99) , -15, 0.518482, 1, 0, 0.580408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450424,-99) , -15, 0.0983021, 0, 0, 0.551099,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619044,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515903,-99) , -15, 0.0874258, 0, 0, 0.56892,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335907,-99) , -8, 0.991409, 1, 0, 0.483672,-99) , -7, 0.0149157, 1, 0, 0.508071,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433767,-99) , -7, 0.035136, 1, 0, 0.516944,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459044,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.346669,-99) , -7, 0.0135718, 0, 0, 0.428699,-99) , -9, 2.88768, 0, 0, 0.4543,-99) , -16, 1086.16, 1, 0, 0.478991,-99) , -10, 10209, 0, 0, 0.488372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35672,-99) , -4, 1.96546, 1, 0, 0.484335,-99) ); - // itree = 1110 - fBoostWeights.push_back(0.00482318); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497985,-99) , -5, 2.38323, 0, 0, 0.502256,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305451,-99) , -1, 70.5, 1, 0, 0.497659,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305857,-99) , -7, 0.184535, 1, 0, 0.493706,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533851,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235569,-99) , -3, 0.907501, 0, 0, 0.441736,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281732,-99) , -7, 0.0106416, 1, 0, 0.390785,-99) , -12, 0.0701243, 1, 0, 0.428504,-99) , -7, 0.0124274, 0, 0, 0.480857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311675,-99) , -12, 0.0195631, 0, 0, 0.47641,-99) ); - // itree = 1111 - fBoostWeights.push_back(0.00360121); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534938,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433326,-99) , -6, 0.994188, 1, 0, 0.524242,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337001,-99) , -1, 12.5, 0, 0, 0.463535,-99) , -15, 0.471812, 1, 0, 0.509436,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523989,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.410322,-99) , -10, 1747.96, 1, 0, 0.454697,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177978,-99) , -5, 2.02871, 1, 0, 0.443774,-99) , -8, -0.852154, 0, 0, 0.500709,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281241,-99) , -13, 0.0797573, 1, 0, 0.498301,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298505,-99) , -3, 0.999689, 1, 0, 0.494271,-99) ); - // itree = 1112 - fBoostWeights.push_back(0.00360266); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653717,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551944,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373621,-99) , -1, 12.5, 0, 0, 0.53956,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334586,-99) , -7, 0.0376441, 1, 0, 0.473304,-99) , -2, 24.5, 0, 0, 0.488608,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365065,-99) , -13, 0.0303186, 1, 0, 0.483322,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29807,-99) , -12, 0.0173719, 0, 0, 0.479385,-99) , -12, 0.534864, 0, 0, 0.484941,-99) ); - // itree = 1113 - fBoostWeights.push_back(0.00398239); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631994,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.533095,-99) , -0, 40.5, 0, 0, 0.549869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15914,-99) , -4, 2.16211, 1, 0, 0.545683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147444,-99) , -7, 0.246898, 1, 0, 0.496423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243257,-99) , -1, 69.5, 1, 0, 0.490836,-99) , -11, 1.5, 0, 0, 0.509397,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272199,-99) , -7, 0.0071142, 0, 0, 0.505001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341857,-99) , -5, 0.538452, 0, 0, 0.498027,-99) ); - // itree = 1114 - fBoostWeights.push_back(0.00255719); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644325,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51591,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412815,-99) , -12, 0.0246049, 0, 0, 0.510552,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122761,-99) , -4, 1.64398, 1, 0, 0.437425,-99) , -8, -0.885179, 0, 0, 0.502057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364299,-99) , -7, 0.00752411, 0, 0, 0.498003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342191,-99) , -3, 0.999597, 1, 0, 0.493597,-99) , -10, -15775.4, 1, 0, 0.497788,-99) ); - // itree = 1115 - fBoostWeights.push_back(0.00564596); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607037,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.60666,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517339,-99) , -6, 1.00666, 0, 0, 0.528394,-99) , -4, 0.287028, 1, 0, 0.539985,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424007,-99) , -16, 2.04717, 0, 0, 0.531187,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.606496,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519252,-99) , -10, 1042.37, 1, 0, 0.546568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.449711,-99) , -15, 0.736775, 1, 0, 0.527538,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517396,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419822,-99) , -12, 0.113941, 1, 0, 0.467259,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271103,-99) , -13, 0.00609553, 1, 0, 0.438019,-99) , -5, 1.42437, 1, 0, 0.475785,-99) , -16, 1107.81, 1, 0, 0.502257,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584426,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474444,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37354,-99) , -4, 0.643759, 1, 0, 0.415468,-99) , -4, 1.33929, 0, 0, 0.446543,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0995118,-99) , -4, 1.64467, 1, 0, 0.430409,-99) , -8, -0.852154, 0, 0, 0.49245,-99) ); - // itree = 1116 - fBoostWeights.push_back(0.00491944); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308942,-99) , -5, 2.02587, 1, 0, 0.535687,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494226,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35697,-99) , -3, 0.99823, 1, 0, 0.480095,-99) , -13, 0.00177499, 0, 0, 0.509114,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.395307,-99) , -2, 22.5, 0, 0, 0.45934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194227,-99) , -4, 1.33956, 1, 0, 0.425847,-99) , -13, 0.0187159, 1, 0, 0.501177,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507368,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241142,-99) , -14, -3.65136, 1, 0, 0.381849,-99) , -4, 1.8333, 1, 0, 0.494666,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271176,-99) , -1, 5.5, 0, 0, 0.490277,-99) ); - // itree = 1117 - fBoostWeights.push_back(0.00583416); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.653291,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558261,-99) , -0, 21.5, 0, 0, 0.590969,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501149,-99) , -15, 0.50341, 1, 0, 0.567829,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421182,-99) , -13, 0.000112907, 0, 0, 0.550289,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495307,-99) , -10, 5720.12, 0, 0, 0.517584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443412,-99) , -12, 0.0446698, 0, 0, 0.504652,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.366189,-99) , -10, 2376.35, 1, 0, 0.435177,-99) , -7, 0.0148994, 0, 0, 0.487765,-99) , -6, 0.372111, 1, 0, 0.511889,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.583814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469473,-99) , -12, 0.0761434, 1, 0, 0.505204,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241811,-99) , -6, 0.993947, 1, 0, 0.495279,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348422,-99) , -3, 0.997643, 1, 0, 0.473819,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226532,-99) , -8, -0.897119, 0, 0, 0.460398,-99) , -5, 1.67862, 1, 0, 0.493947,-99) ); - // itree = 1118 - fBoostWeights.push_back(0.00694129); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.684787,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.587366,-99) , -8, -0.122236, 0, 0, 0.641102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483394,-99) , -13, 0.00113731, 0, 0, 0.583502,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562355,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334322,-99) , -10, 4814.67, 0, 0, 0.430042,-99) , -9, 0.61647, 0, 0, 0.490301,-99) , -1, 15.5, 0, 0, 0.535997,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566847,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493154,-99) , -9, -3.13472, 1, 0, 0.511042,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419857,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.120983,-99) , -4, 1.65434, 1, 0, 0.401377,-99) , -8, -0.851972, 0, 0, 0.497561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.282963,-99) , -2, 25.5, 0, 0, 0.46087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.152539,-99) , -1, 12.5, 0, 0, 0.423654,-99) , -7, 0.0397736, 1, 0, 0.480918,-99) , -6, 0.20964, 1, 0, 0.496303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294752,-99) , -4, 2.07376, 1, 0, 0.493094,-99) ); - // itree = 1119 - fBoostWeights.push_back(0.00400914); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62597,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603339,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502809,-99) , -5, 1.96182, 0, 0, 0.516802,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355629,-99) , -12, 0.0181974, 0, 0, 0.507958,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56053,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451619,-99) , -2, 12.5, 0, 0, 0.529383,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402138,-99) , -16, 458.574, 1, 0, 0.434952,-99) , -5, 1.25213, 1, 0, 0.462902,-99) , -12, 0.110584, 1, 0, 0.48429,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.23428,-99) , -13, 0.072936, 1, 0, 0.481781,-99) , -12, 0.527172, 0, 0, 0.486523,-99) ); - // itree = 1120 - fBoostWeights.push_back(0.00582751); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.620575,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529316,-99) , -16, 113.497, 0, 0, 0.597731,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439745,-99) , -13, 0.0352018, 1, 0, 0.578305,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424983,-99) , -12, 0.0326435, 0, 0, 0.5595,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287123,-99) , -1, 11.5, 0, 0, 0.545366,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392621,-99) , -8, -0.893242, 0, 0, 0.478002,-99) , -9, -9.89696, 1, 0, 0.483839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275935,-99) , -0, 33.5, 1, 0, 0.479235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.119403,-99) , -7, 0.0571965, 1, 0, 0.471943,-99) , -2, 25.5, 0, 0, 0.490339,-99) ); - // itree = 1121 - fBoostWeights.push_back(0.00662623); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69043,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566829,-99) , -13, 0.0104343, 1, 0, 0.627709,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460238,-99) , -4, 1.37588, 0, 0, 0.505305,-99) , -13, 0.00375146, 0, 0, 0.568917,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229807,-99) , -4, 1.98895, 1, 0, 0.495809,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.236915,-99) , -7, 0.0465572, 1, 0, 0.488012,-99) , -2, 24.5, 0, 0, 0.504469,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401195,-99) , -3, 0.983098, 1, 0, 0.467584,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0526158,-99) , -1, 19.5, 0, 0, 0.406687,-99) , -7, 0.0891686, 1, 0, 0.497006,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286995,-99) , -7, 0.00725398, 0, 0, 0.493278,-99) ); - // itree = 1122 - fBoostWeights.push_back(0.00531335); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699177,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572365,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502855,-99) , -8, 0.717763, 1, 0, 0.54769,-99) , -5, 2.13107, 0, 0, 0.557389,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58422,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440045,-99) , -8, -0.345446, 1, 0, 0.482476,-99) , -7, 0.0114994, 1, 0, 0.503245,-99) , -12, 0.0455111, 0, 0, 0.539353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.336465,-99) , -15, 3.95256, 1, 0, 0.532048,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.635115,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666057,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476321,-99) , -2, 42.5, 0, 0, 0.490423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303425,-99) , -1, 55.5, 1, 0, 0.482529,-99) , -15, 0.0370818, 1, 0, 0.49666,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423928,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223092,-99) , -3, 0.932162, 0, 0, 0.380983,-99) , -7, 0.0102091, 0, 0, 0.483721,-99) , -12, 0.111609, 1, 0, 0.506437,-99) ); - // itree = 1123 - fBoostWeights.push_back(0.00757568); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.642956,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629187,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522286,-99) , -3, 0.946639, 1, 0, 0.551495,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.561752,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.450646,-99) , -6, 1.04782, 0, 0, 0.48269,-99) , -6, 0.580705, 1, 0, 0.518267,-99) , -9, -6.53647, 1, 0, 0.530372,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462049,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344426,-99) , -14, -4.2038, 1, 0, 0.409649,-99) , -14, -3.56373, 0, 0, 0.513091,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457818,-99) , -5, 1.9029, 0, 0, 0.546527,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41919,-99) , -4, 0.842007, 1, 0, 0.441176,-99) , -12, 0.0761796, 1, 0, 0.474909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271159,-99) , -12, 0.0227642, 0, 0, 0.465612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.253376,-99) , -13, 0.00824494, 1, 0, 0.44202,-99) , -5, 1.64948, 1, 0, 0.486756,-99) ); - // itree = 1124 - fBoostWeights.push_back(0.00328443); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.668221,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550054,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485372,-99) , -6, 0.171633, 1, 0, 0.500658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.121593,-99) , -5, 2.54949, 1, 0, 0.499214,-99) , -10, -15145.2, 1, 0, 0.504297,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328728,-99) , -7, 0.00788594, 0, 0, 0.498434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335157,-99) , -14, -5.20233, 0, 0, 0.491094,-99) ); - // itree = 1125 - fBoostWeights.push_back(0.00355077); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.546583,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444706,-99) , -14, -4.60971, 0, 0, 0.53622,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485018,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291825,-99) , -3, 0.772968, 0, 0, 0.478187,-99) , -16, 186.771, 1, 0, 0.495795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176309,-99) , -7, 0.177929, 1, 0, 0.492653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.349666,-99) , -1, 63.5, 1, 0, 0.48741,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.150359,-99) , -5, 2.49375, 1, 0, 0.485135,-99) ); - // itree = 1126 - fBoostWeights.push_back(0.00566877); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621135,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522491,-99) , -8, -0.741139, 0, 0, 0.593602,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459522,-99) , -13, 0.000685851, 0, 0, 0.569586,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440996,-99) , -5, 0.602124, 0, 0, 0.551398,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345022,-99) , -15, 0.149219, 1, 0, 0.432438,-99) , -2, 11.5, 0, 0, 0.522408,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45692,-99) , -14, -2.97632, 1, 0, 0.492848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287733,-99) , -3, 0.732894, 0, 0, 0.486622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30228,-99) , -3, 0.999404, 1, 0, 0.479445,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123431,-99) , -1, 69.5, 1, 0, 0.474077,-99) , -5, 1.46944, 1, 0, 0.496397,-99) ); - // itree = 1127 - fBoostWeights.push_back(0.00268094); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643897,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.508506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299522,-99) , -13, 0.0567385, 1, 0, 0.504991,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345832,-99) , -12, 0.0191123, 0, 0, 0.50052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324975,-99) , -3, 0.731403, 0, 0, 0.496354,-99) , -12, 0.526248, 0, 0, 0.501343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312167,-99) , -2, 6.5, 0, 0, 0.497663,-99) ); - // itree = 1128 - fBoostWeights.push_back(0.00645746); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638211,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619043,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516666,-99) , -13, 0.00820079, 1, 0, 0.574511,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461402,-99) , -6, 0.818521, 1, 0, 0.531148,-99) , -2, 30.5, 0, 0, 0.564923,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551816,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510372,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.401534,-99) , -8, 0.711759, 1, 0, 0.45597,-99) , -8, 0.973276, 0, 0, 0.481978,-99) , -13, 0.00207063, 0, 0, 0.53703,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562269,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440698,-99) , -14, -4.60765, 0, 0, 0.542159,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496663,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358012,-99) , -8, -0.257752, 0, 0, 0.468149,-99) , -12, 0.102993, 1, 0, 0.499286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.200913,-99) , -7, 0.00691566, 0, 0, 0.493855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30054,-99) , -7, 0.0684201, 1, 0, 0.479375,-99) , -5, 1.41352, 1, 0, 0.503417,-99) ); - // itree = 1129 - fBoostWeights.push_back(0.0062008); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634138,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615254,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5133,-99) , -3, 0.942448, 1, 0, 0.540697,-99) , -9, 2.91876, 0, 0, 0.565488,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.96611, 1, 0, 0.558767,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567734,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361256,-99) , -6, 0.437875, 1, 0, 0.399484,-99) , -5, 1.88773, 0, 0, 0.466405,-99) , -13, 0.000749353, 0, 0, 0.526058,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604162,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37332,-99) , -12, 0.0312472, 0, 0, 0.481388,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438437,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226946,-99) , -5, 1.63661, 1, 0, 0.39446,-99) , -8, -0.818665, 0, 0, 0.467935,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0414813,-99) , -5, 2.31026, 1, 0, 0.462724,-99) , -8, 0.998291, 0, 0, 0.47157,-99) , -11, 1.5, 0, 0, 0.489634,-99) ); - // itree = 1130 - fBoostWeights.push_back(0.00536286); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637406,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581571,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490234,-99) , -3, 0.974461, 1, 0, 0.528344,-99) , -10, 10942.6, 0, 0, 0.545096,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390308,-99) , -14, -4.4724, 0, 0, 0.532151,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49271,-99) , -6, 0.786449, 1, 0, 0.542742,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447592,-99) , -13, 0.00144117, 0, 0, 0.520426,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286328,-99) , -0, 43.5, 1, 0, 0.488309,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39844,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0813937,-99) , -5, 2.06763, 1, 0, 0.378394,-99) , -13, 0.00342481, 1, 0, 0.453701,-99) , -5, 1.4112, 1, 0, 0.482979,-99) , -11, 1.5, 0, 0, 0.499225,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330623,-99) , -8, 0.999655, 1, 0, 0.495553,-99) ); - // itree = 1131 - fBoostWeights.push_back(0.00701906); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655746,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271948,-99) , -15, 0.0419275, 0, 0, 0.536786,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417183,-99) , -12, 0.232972, 0, 0, 0.449701,-99) , -14, -3.17169, 0, 0, 0.5125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367034,-99) , -5, 0.438112, 0, 0, 0.503814,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515843,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408578,-99) , -12, 0.115072, 1, 0, 0.460768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.132323,-99) , -8, -0.967167, 0, 0, 0.451321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224734,-99) , -0, 45.5, 1, 0, 0.430526,-99) , -4, 1.46005, 1, 0, 0.486587,-99) , -12, 0.525387, 0, 0, 0.492501,-99) ); - // itree = 1132 - fBoostWeights.push_back(0.00550211); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593719,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481795,-99) , -8, -0.545434, 0, 0, 0.568395,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51095,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367935,-99) , -12, 0.0233798, 0, 0, 0.504088,-99) , -6, 0.141134, 1, 0, 0.51729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379027,-99) , -14, -5.44797, 0, 0, 0.512711,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570364,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453568,-99) , -3, 0.980793, 1, 0, 0.519199,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296477,-99) , -0, 11.5, 1, 0, 0.422233,-99) , -6, 0.519903, 1, 0, 0.477268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304562,-99) , -7, 0.0181505, 1, 0, 0.449988,-99) , -2, 11.5, 0, 0, 0.492927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.298524,-99) , -3, 0.999638, 1, 0, 0.487966,-99) ); - // itree = 1133 - fBoostWeights.push_back(0.00442284); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565661,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4949,-99) , -16, 2324.06, 1, 0, 0.530228,-99) , -2, 29.5, 0, 0, 0.561145,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657699,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521467,-99) , -4, 1.73733, 0, 0, 0.554596,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151241,-99) , -5, 2.49011, 1, 0, 0.488353,-99) , -9, -3.19236, 1, 0, 0.503835,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424099,-99) , -2, 16.5, 0, 0, 0.474087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194855,-99) , -5, 1.9012, 1, 0, 0.448633,-99) , -13, 0.00523797, 1, 0, 0.488542,-99) , -5, 1.06055, 1, 0, 0.499713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392207,-99) , -5, 0.425894, 0, 0, 0.494732,-99) ); - // itree = 1134 - fBoostWeights.push_back(0.00534054); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.64816,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519697,-99) , -3, 0.983552, 1, 0, 0.587446,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44609,-99) , -8, -0.856588, 0, 0, 0.53754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.161668,-99) , -5, 2.40686, 1, 0, 0.533237,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34998,-99) , -5, 1.95203, 0, 0, 0.424852,-99) , -8, 0.974443, 1, 0, 0.514152,-99) , -4, 0.507793, 1, 0, 0.530437,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517987,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430282,-99) , -6, 0.900935, 1, 0, 0.496688,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338583,-99) , -7, 0.0087041, 0, 0, 0.487277,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264261,-99) , -8, 0.998295, 0, 0, 0.380714,-99) , -14, -4.33159, 0, 0, 0.477002,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212307,-99) , -5, 2.29248, 1, 0, 0.472276,-99) , -16, 1100.17, 1, 0, 0.499112,-99) ); - // itree = 1135 - fBoostWeights.push_back(0.00604177); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650935,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.57972,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419591,-99) , -12, 0.0330036, 0, 0, 0.558604,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189501,-99) , -1, 10.5, 0, 0, 0.54278,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.276853,-99) , -4, 2.03924, 1, 0, 0.489746,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398197,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.118784,-99) , -2, 13.5, 0, 0, 0.34694,-99) , -7, 0.0327492, 1, 0, 0.474472,-99) , -2, 24.5, 0, 0, 0.491371,-99) , -12, 0.507814, 0, 0, 0.497633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328575,-99) , -5, 0.461375, 0, 0, 0.490725,-99) ); - // itree = 1136 - fBoostWeights.push_back(0.00338596); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516345,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.163489,-99) , -7, 0.200889, 1, 0, 0.5149,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.54974, 1, 0, 0.513304,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515076,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304576,-99) , -8, 0.998645, 0, 0, 0.421908,-99) , -14, -4.60198, 0, 0, 0.505424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.344551,-99) , -1, 68.5, 1, 0, 0.501634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.251968,-99) , -15, 4.16271, 1, 0, 0.49782,-99) ); - // itree = 1137 - fBoostWeights.push_back(0.00505417); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66288,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566681,-99) , -2, 16.5, 0, 0, 0.597757,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485482,-99) , -7, 0.0568302, 1, 0, 0.57942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452706,-99) , -8, -0.897236, 0, 0, 0.56004,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55643,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376272,-99) , -0, 18.5, 0, 0, 0.474899,-99) , -8, 0.920467, 1, 0, 0.53683,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335751,-99) , -8, -0.98764, 0, 0, 0.492988,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296133,-99) , -1, 5.5, 0, 0, 0.487303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225405,-99) , -1, 50.5, 1, 0, 0.481097,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.333647,-99) , -7, 0.105836, 1, 0, 0.473451,-99) , -11, 1.5, 0, 0, 0.495354,-99) ); - // itree = 1138 - fBoostWeights.push_back(0.00409472); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656151,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512847,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.122337,-99) , -4, 1.96529, 1, 0, 0.50796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400724,-99) , -5, 1.96182, 0, 0, 0.445507,-99) , -14, -3.58284, 0, 0, 0.494354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.127527,-99) , -7, 0.328926, 1, 0, 0.492939,-99) , -12, 0.535437, 0, 0, 0.498273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.184884,-99) , -5, 2.4913, 1, 0, 0.496006,-99) ); - // itree = 1139 - fBoostWeights.push_back(0.00507391); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.708402,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3469,-99) , -4, 1.70868, 1, 0, 0.526934,-99) , -5, 2.17251, 0, 0, 0.539165,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493138,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355588,-99) , -8, 0.296922, 1, 0, 0.423257,-99) , -12, 0.0286175, 0, 0, 0.519458,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474128,-99) , -15, 0.0689888, 1, 0, 0.49627,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451068,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.314312,-99) , -6, 0.768004, 1, 0, 0.42115,-99) , -7, 0.0133309, 0, 0, 0.477463,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281891,-99) , -3, 0.999619, 1, 0, 0.472554,-99) , -12, 0.101394, 1, 0, 0.492268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.156965,-99) , -7, 0.25306, 1, 0, 0.489938,-99) ); - // itree = 1140 - fBoostWeights.push_back(0.00630899); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.692161,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563317,-99) , -1, 30.5, 1, 0, 0.621685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482226,-99) , -13, 0.00229582, 0, 0, 0.574425,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280822,-99) , -1, 13.5, 0, 0, 0.553867,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374104,-99) , -8, -0.947225, 0, 0, 0.515857,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520626,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424135,-99) , -4, 0.70628, 1, 0, 0.453383,-99) , -1, 12.5, 1, 0, 0.489125,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.116077,-99) , -7, 0.0634026, 1, 0, 0.482217,-99) , -2, 29.5, 0, 0, 0.494302,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334319,-99) , -1, 61.5, 1, 0, 0.488396,-99) ); - // itree = 1141 - fBoostWeights.push_back(0.00498552); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678533,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542321,-99) , -2, 14.5, 0, 0, 0.613804,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.46231,-99) , -6, 0.955604, 1, 0, 0.580568,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595872,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509634,-99) , -3, 0.989963, 1, 0, 0.532525,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42385,-99) , -7, 0.0155671, 0, 0, 0.473744,-99) , -3, 0.986681, 0, 0, 0.493869,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531351,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.20756,-99) , -5, 2.05127, 1, 0, 0.514416,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295363,-99) , -7, 0.028981, 1, 0, 0.371012,-99) , -9, -5.208, 1, 0, 0.432246,-99) , -3, 0.996175, 1, 0, 0.480031,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359728,-99) , -2, 7.5, 0, 0, 0.474706,-99) , -9, 7.17485, 0, 0, 0.483556,-99) ); - // itree = 1142 - fBoostWeights.push_back(0.00378849); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636956,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545245,-99) , -0, 16.5, 1, 0, 0.599487,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402634,-99) , -5, 2.01042, 1, 0, 0.524501,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392325,-99) , -5, 1.98984, 0, 0, 0.448554,-99) , -8, 0.968603, 1, 0, 0.511542,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43497,-99) , -12, 0.291423, 0, 0, 0.470019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358651,-99) , -5, 1.8731, 1, 0, 0.449329,-99) , -12, 0.197106, 1, 0, 0.495666,-99) , -12, 0.427428, 0, 0, 0.501482,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215085,-99) , -5, 2.49362, 1, 0, 0.499427,-99) ); - // itree = 1143 - fBoostWeights.push_back(0.00544012); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.663905,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62454,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474595,-99) , -13, 0.00369443, 0, 0, 0.56668,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543178,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469474,-99) , -16, 178.371, 1, 0, 0.491393,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421229,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 17.5, 0, 0, 0.345725,-99) , -7, 0.0800126, 1, 0, 0.481106,-99) , -5, 1.10297, 1, 0, 0.496062,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364818,-99) , -5, 0.454128, 0, 0, 0.490239,-99) , -12, 0.541847, 0, 0, 0.49601,-99) ); - // itree = 1144 - fBoostWeights.push_back(0.0039703); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633167,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548039,-99) , -15, 0.455391, 1, 0, 0.591161,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.555506,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481274,-99) , -8, 0.245713, 1, 0, 0.517468,-99) , -16, 78.8413, 1, 0, 0.537351,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488518,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37,-99) , -5, 1.98164, 1, 0, 0.474356,-99) , -12, 0.507814, 0, 0, 0.483728,-99) , -12, 0.100175, 1, 0, 0.505145,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.295972,-99) , -7, 0.00734394, 0, 0, 0.5005,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34871,-99) , -12, 0.0232558, 0, 0, 0.494527,-99) ); - // itree = 1145 - fBoostWeights.push_back(0.0069195); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492521,-99) , -12, 0.209889, 1, 0, 0.533399,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403815,-99) , -12, 0.100891, 1, 0, 0.453859,-99) , -8, -0.882629, 0, 0, 0.521261,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.198945,-99) , -5, 2.20974, 1, 0, 0.518447,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574684,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48464,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407383,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.230737,-99) , -7, 0.0234076, 0, 0, 0.332629,-99) , -7, 0.0135171, 1, 0, 0.384754,-99) , -12, 0.170736, 0, 0, 0.438266,-99) , -14, -3.93888, 0, 0, 0.507666,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532282,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402471,-99) , -14, -2.84345, 1, 0, 0.495392,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250524,-99) , -3, 0.999043, 1, 0, 0.476993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.190871,-99) , -3, 0.892045, 0, 0, 0.454956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107421,-99) , -13, 0.00948935, 1, 0, 0.425393,-99) , -4, 1.56771, 1, 0, 0.494031,-99) ); - // itree = 1146 - fBoostWeights.push_back(0.00384721); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664225,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514367,-99) , -2, 14.5, 0, 0, 0.60175,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518576,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457987,-99) , -7, 0.0581179, 1, 0, 0.509386,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363615,-99) , -7, 0.00739763, 0, 0, 0.506079,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380114,-99) , -8, -0.984231, 0, 0, 0.500653,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522019,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.211973,-99) , -8, 0.908463, 0, 0, 0.397339,-99) , -4, 1.76094, 1, 0, 0.49271,-99) , -10, -8272.58, 1, 0, 0.50004,-99) ); - // itree = 1147 - fBoostWeights.push_back(0.00422487); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531575,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36892,-99) , -15, 1.97104, 1, 0, 0.524839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330813,-99) , -1, 62.5, 1, 0, 0.519056,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467969,-99) , -16, 297.617, 1, 0, 0.497553,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461124,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272152,-99) , -1, 11.5, 1, 0, 0.402366,-99) , -12, 0.208512, 0, 0, 0.463501,-99) , -15, 0.115126, 0, 0, 0.499937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329488,-99) , -7, 0.148236, 1, 0, 0.495859,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37312,-99) , -5, 0.427031, 0, 0, 0.490282,-99) ); - // itree = 1148 - fBoostWeights.push_back(0.00609752); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618756,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473503,-99) , -7, 0.0166496, 1, 0, 0.530804,-99) , -1, 14.5, 0, 0, 0.558551,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.624215,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504653,-99) , -3, 0.960947, 1, 0, 0.522557,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578102,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456639,-99) , -8, 0.986918, 0, 0, 0.468188,-99) , -9, -1.32928, 1, 0, 0.492044,-99) , -9, 4.39931, 0, 0, 0.503792,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265268,-99) , -14, -5.52268, 0, 0, 0.498376,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644374,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.491906,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.125395,-99) , -5, 2.36185, 1, 0, 0.451063,-99) , -10, 7378.98, 0, 0, 0.505359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254856,-99) , -8, 0.898523, 0, 0, 0.417822,-99) , -5, 1.9796, 1, 0, 0.488811,-99) ); - // itree = 1149 - fBoostWeights.push_back(0.00429459); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626655,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44977,-99) , -13, 0.00793121, 1, 0, 0.533796,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320366,-99) , -16, 857.228, 1, 0, 0.433337,-99) , -12, 0.0324972, 0, 0, 0.520268,-99) , -7, 0.00876897, 1, 0, 0.528882,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477993,-99) , -9, 3.05879, 0, 0, 0.495982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.358105,-99) , -7, 0.00939397, 0, 0, 0.484198,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217438,-99) , -3, 0.999626, 1, 0, 0.478288,-99) , -12, 0.113902, 1, 0, 0.501374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337715,-99) , -12, 0.0202202, 0, 0, 0.496235,-99) ); - // itree = 1150 - fBoostWeights.push_back(0.00512472); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594317,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647317,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50486,-99) , -2, 11.5, 0, 0, 0.595883,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517861,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376665,-99) , -14, -4.64944, 0, 0, 0.505666,-99) , -4, 1.49665, 0, 0, 0.51749,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412894,-99) , -7, 0.0190284, 0, 0, 0.470029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353051,-99) , -8, -0.76925, 0, 0, 0.452153,-99) , -6, 0.667143, 1, 0, 0.497746,-99) , -6, 1.07399, 0, 0, 0.504849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.238218,-99) , -14, -3.81315, 1, 0, 0.375362,-99) , -4, 1.81739, 1, 0, 0.497005,-99) ); - // itree = 1151 - fBoostWeights.push_back(0.00505965); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593639,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52011,-99) , -11, 1.5, 0, 0, 0.544805,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504144,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365989,-99) , -5, 1.85313, 0, 0, 0.421651,-99) , -8, 0.982924, 1, 0, 0.527867,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.590171,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212441,-99) , -5, 2.14365, 1, 0, 0.45885,-99) , -8, 0.994285, 0, 0, 0.473751,-99) , -12, 0.135756, 1, 0, 0.501344,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515481,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.31586,-99) , -5, 1.791, 1, 0, 0.462415,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30018,-99) , -6, 0.71497, 1, 0, 0.408619,-99) , -12, 0.0312849, 0, 0, 0.494216,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260115,-99) , -13, 0.0726047, 1, 0, 0.491604,-99) ); - // itree = 1152 - fBoostWeights.push_back(0.0060428); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650855,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62707,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53036,-99) , -8, 0.738238, 1, 0, 0.581378,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459407,-99) , -5, 1.53579, 0, 0, 0.533936,-99) , -12, 0.0479627, 0, 0, 0.563202,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523119,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.291751,-99) , -12, 0.0291286, 0, 0, 0.449086,-99) , -6, 0.814555, 1, 0, 0.532372,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619122,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484324,-99) , -10, -8343.84, 1, 0, 0.493177,-99) , -15, 0.0306743, 1, 0, 0.501508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335621,-99) , -2, 7.5, 0, 0, 0.494259,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501452,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345605,-99) , -15, 0.28625, 1, 0, 0.456423,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330093,-99) , -7, 0.0142913, 0, 0, 0.424374,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.21223,-99) , -4, 1.64437, 1, 0, 0.411763,-99) , -8, -0.459608, 0, 0, 0.47477,-99) , -12, 0.0596911, 1, 0, 0.489325,-99) ); - // itree = 1153 - fBoostWeights.push_back(0.00738337); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563078,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456102,-99) , -15, 0.0629532, 0, 0, 0.547723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.26457, 1, 0, 0.540711,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.608682,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544648,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.42993,-99) , -12, 0.0624543, 1, 0, 0.464563,-99) , -15, 0.0451891, 1, 0, 0.48612,-99) , -8, 0.8378, 1, 0, 0.519665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.405342,-99) , -13, 0.0233602, 1, 0, 0.513127,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611482,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504358,-99) , -7, 0.0636389, 1, 0, 0.562768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.281537,-99) , -1, 11.5, 0, 0, 0.536238,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481653,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243141,-99) , -3, 0.998936, 1, 0, 0.46089,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294842,-99) , -12, 0.0457037, 0, 0, 0.439194,-99) , -2, 23.5, 0, 0, 0.472508,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.164064,-99) , -4, 1.58048, 1, 0, 0.344017,-99) , -3, 0.952395, 0, 0, 0.450724,-99) , -6, 0.705844, 1, 0, 0.491769,-99) ); - // itree = 1154 - fBoostWeights.push_back(0.00476899); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.728996,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552945,-99) , -5, 2.14505, 0, 0, 0.563208,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361481,-99) , -1, 10.5, 0, 0, 0.550674,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.565459,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484728,-99) , -16, 19.7163, 1, 0, 0.498419,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0929882,-99) , -7, 0.045449, 1, 0, 0.491353,-99) , -2, 18.5, 0, 0, 0.512136,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165483,-99) , -7, 0.206536, 1, 0, 0.509931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355411,-99) , -1, 63.5, 1, 0, 0.504678,-99) ); - // itree = 1155 - fBoostWeights.push_back(0.00604357); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.674112,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538816,-99) , -16, 1481.46, 1, 0, 0.606266,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51909,-99) , -13, 0.00645275, 1, 0, 0.567914,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465931,-99) , -8, 0.913752, 1, 0, 0.54613,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5909,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54784,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45857,-99) , -5, 1.28624, 0, 0, 0.505923,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408703,-99) , -1, 18.5, 1, 0, 0.481655,-99) , -2, 52.5, 0, 0, 0.492337,-99) , -6, 0.440751, 1, 0, 0.515,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453614,-99) , -15, 0.228435, 0, 0, 0.48398,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323135,-99) , -13, 0.0151357, 1, 0, 0.474014,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256117,-99) , -1, 7.5, 0, 0, 0.460168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300804,-99) , -3, 0.998114, 1, 0, 0.439922,-99) , -5, 1.65209, 1, 0, 0.487539,-99) ); - // itree = 1156 - fBoostWeights.push_back(0.005586); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602754,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5241,-99) , -12, 0.135913, 1, 0, 0.564937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472441,-99) , -12, 0.0409893, 0, 0, 0.550129,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4299,-99) , -8, -0.895927, 0, 0, 0.537241,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.556487,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431272,-99) , -8, 0.93515, 1, 0, 0.536271,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498366,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406584,-99) , -3, 0.981354, 0, 0, 0.465498,-99) , -6, 0.582221, 1, 0, 0.502577,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573212,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421922,-99) , -10, 6012.9, 0, 0, 0.470733,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270892,-99) , -14, -2.30209, 1, 0, 0.434416,-99) , -5, 1.66913, 1, 0, 0.479905,-99) , -16, 475.51, 1, 0, 0.501865,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275394,-99) , -2, 6.5, 0, 0, 0.49784,-99) ); - // itree = 1157 - fBoostWeights.push_back(0.00349447); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467928,-99) , -3, 0.99289, 1, 0, 0.496341,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515724,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.338609,-99) , -12, 0.365845, 0, 0, 0.421678,-99) , -15, 0.052382, 0, 0, 0.487887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310772,-99) , -3, 0.999694, 1, 0, 0.484744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.229102,-99) , -5, 2.46103, 1, 0, 0.482439,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.242064,-99) , -2, 6.5, 0, 0, 0.478129,-99) ); - // itree = 1158 - fBoostWeights.push_back(0.00442005); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.655942,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501427,-99) , -13, 0.00373972, 0, 0, 0.596719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504199,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225321,-99) , -7, 0.0644865, 1, 0, 0.499137,-99) , -2, 33.5, 0, 0, 0.508278,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.168358,-99) , -7, 0.162186, 1, 0, 0.505606,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5746,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409113,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.223888,-99) , -2, 42.5, 0, 0, 0.34601,-99) , -2, 76.5, 0, 0, 0.427484,-99) , -1, 40.5, 1, 0, 0.498795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342172,-99) , -2, 6.5, 0, 0, 0.495721,-99) ); - // itree = 1159 - fBoostWeights.push_back(0.00427028); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643714,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.558898,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442612,-99) , -8, 0.915105, 1, 0, 0.529526,-99) , -5, 2.03149, 0, 0, 0.544699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.24513,-99) , -5, 2.44721, 1, 0, 0.539875,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492554,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.112175,-99) , -4, 2.14449, 1, 0, 0.490061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0682966,-99) , -7, 0.280354, 1, 0, 0.48713,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.245655,-99) , -1, 5.5, 0, 0, 0.481586,-99) , -11, 1.5, 0, 0, 0.50107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360692,-99) , -8, -0.984885, 0, 0, 0.495284,-99) ); - // itree = 1160 - fBoostWeights.push_back(0.00329804); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.142745,-99) , -4, 1.96543, 1, 0, 0.534432,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47657,-99) , -2, 52.5, 0, 0, 0.485034,-99) , -8, 0.625318, 1, 0, 0.51099,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35636,-99) , -3, 0.999629, 1, 0, 0.506697,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28026,-99) , -2, 6.5, 0, 0, 0.502992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330311,-99) , -8, -0.989404, 0, 0, 0.497193,-99) ); - // itree = 1161 - fBoostWeights.push_back(0.00672575); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.638666,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535805,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400535,-99) , -12, 0.317051, 1, 0, 0.527849,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304046,-99) , -8, 0.421439, 1, 0, 0.412816,-99) , -12, 0.0313674, 0, 0, 0.516078,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451316,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0677417,-99) , -4, 1.31337, 1, 0, 0.388269,-99) , -13, 0.0218496, 1, 0, 0.503598,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.597652,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467036,-99) , -3, 0.966152, 1, 0, 0.516326,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527951,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392194,-99) , -5, 1.37962, 1, 0, 0.433556,-99) , -16, 760.851, 1, 0, 0.464582,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187081,-99) , -5, 1.87303, 1, 0, 0.341808,-99) , -0, 14.5, 1, 0, 0.438945,-99) , -7, 0.015506, 0, 0, 0.483893,-99) , -12, 0.521876, 0, 0, 0.489325,-99) ); - // itree = 1162 - fBoostWeights.push_back(0.00937635); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616372,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528471,-99) , -8, -0.593704, 0, 0, 0.577882,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550168,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426984,-99) , -3, 0.988356, 1, 0, 0.496185,-99) , -14, -2.68933, 0, 0, 0.547807,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554807,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445044,-99) , -9, -0.0318666, 1, 0, 0.504291,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.40128,-99) , -7, 0.0247468, 0, 0, 0.463673,-99) , -6, 0.830718, 1, 0, 0.518015,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.686627,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539345,-99) , -5, 1.86728, 0, 0, 0.589281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.292931,-99) , -0, 37.5, 1, 0, 0.478193,-99) , -11, 1.5, 0, 0, 0.520286,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364315,-99) , -8, 0.99041, 1, 0, 0.499866,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485314,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285628,-99) , -1, 8.5, 0, 0, 0.458867,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0971689,-99) , -7, 0.0232947, 1, 0, 0.299195,-99) , -8, -0.223055, 0, 0, 0.424729,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.194705,-99) , -4, 1.83113, 1, 0, 0.404367,-99) , -12, 0.132028, 1, 0, 0.454536,-99) , -5, 1.43394, 1, 0, 0.482582,-99) ); - // itree = 1163 - fBoostWeights.push_back(0.00685138); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.661037,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572699,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472694,-99) , -6, 0.938343, 1, 0, 0.547525,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41375,-99) , -14, -3.70212, 0, 0, 0.530565,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507619,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367206,-99) , -8, 0.548906, 0, 0, 0.464045,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0559147,-99) , -7, 0.0926549, 1, 0, 0.449052,-99) , -5, 1.67948, 1, 0, 0.503262,-99) , -10, 2649.08, 1, 0, 0.513828,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462982,-99) , -10, -659.079, 1, 0, 0.513191,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514231,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.407479,-99) , -16, 307.151, 1, 0, 0.445944,-99) , -8, 0.672515, 1, 0, 0.484903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.254187,-99) , -4, 2.04678, 1, 0, 0.481026,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.263052,-99) , -9, -0.0578416, 1, 0, 0.345248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133684,-99) , -4, 1.69959, 1, 0, 0.324746,-99) , -9, 0.14516, 0, 0, 0.464639,-99) , -9, -0.320301, 1, 0, 0.487488,-99) ); - // itree = 1164 - fBoostWeights.push_back(0.00358271); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658475,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514515,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38389,-99) , -8, -0.982681, 0, 0, 0.508838,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324171,-99) , -7, 0.00714058, 0, 0, 0.504757,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438327,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187087,-99) , -13, 0.0109592, 1, 0, 0.382904,-99) , -3, 0.999134, 1, 0, 0.497121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293163,-99) , -12, 0.01821, 0, 0, 0.492286,-99) , -10, -15407.6, 1, 0, 0.497217,-99) ); - // itree = 1165 - fBoostWeights.push_back(0.00748034); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699419,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475991,-99) , -13, 0.00230443, 0, 0, 0.570409,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.215185,-99) , -7, 0.134706, 1, 0, 0.48585,-99) , -5, 1.44592, 1, 0, 0.543191,-99) , -5, 2.06058, 0, 0, 0.557184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217911,-99) , -1, 10.5, 0, 0, 0.543823,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641656,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.566013,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488201,-99) , -11, 0.5, 1, 0, 0.518661,-99) , -16, 10.3645, 1, 0, 0.536583,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.486659,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382744,-99) , -7, 0.0282063, 1, 0, 0.474683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269158,-99) , -4, 1.82199, 1, 0, 0.463949,-99) , -10, 1596.66, 1, 0, 0.491707,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.22697,-99) , -7, 0.0412669, 1, 0, 0.478954,-99) , -2, 24.5, 0, 0, 0.496173,-99) ); - // itree = 1166 - fBoostWeights.push_back(0.0051156); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.616773,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484654,-99) , -6, 0.0337458, 0, 0, 0.589203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41827,-99) , -8, -0.827311, 0, 0, 0.565062,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389306,-99) , -3, 0.999249, 1, 0, 0.503343,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19802,-99) , -3, 0.962358, 0, 0, 0.387294,-99) , -15, 0.0418318, 0, 0, 0.49479,-99) , -6, 0.171858, 1, 0, 0.510787,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348324,-99) , -5, 2.0308, 0, 0, 0.411013,-99) , -14, -4.87755, 0, 0, 0.504001,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225032,-99) , -2, 6.5, 0, 0, 0.4996,-99) ); - // itree = 1167 - fBoostWeights.push_back(0.00562666); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.679008,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595091,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458179,-99) , -7, 0.0172006, 0, 0, 0.542911,-99) , -3, 0.939039, 0, 0, 0.572076,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362101,-99) , -8, -0.137548, 1, 0, 0.430759,-99) , -6, 0.672743, 1, 0, 0.534654,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.593052,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564884,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.470126,-99) , -13, 0.00406784, 0, 0, 0.491959,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440982,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -4, 1.69226, 1, 0, 0.42444,-99) , -13, 0.00925185, 1, 0, 0.477188,-99) , -15, 0.0334085, 1, 0, 0.484226,-99) , -3, 0.954816, 1, 0, 0.497744,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.261081,-99) , -15, 4.43423, 1, 0, 0.494479,-99) ); - // itree = 1168 - fBoostWeights.push_back(0.0055331); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.66261,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584456,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501,-99) , -13, 0.00242801, 0, 0, 0.5601,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50841,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421629,-99) , -15, 0.338682, 1, 0, 0.491442,-99) , -2, 21.5, 0, 0, 0.519002,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493822,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.361179,-99) , -3, 0.999143, 1, 0, 0.48553,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14566,-99) , -5, 1.92135, 1, 0, 0.353926,-99) , -14, -2.3018, 1, 0, 0.456715,-99) , -5, 1.49918, 1, 0, 0.488487,-99) , -12, 0.52584, 0, 0, 0.494237,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248181,-99) , -12, 0.016565, 0, 0, 0.489734,-99) ); - // itree = 1169 - fBoostWeights.push_back(0.00325062); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641912,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430814,-99) , -8, 0.980733, 1, 0, 0.525643,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466591,-99) , -10, -8375.85, 1, 0, 0.475134,-99) , -16, 513.888, 1, 0, 0.494686,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362067,-99) , -5, 2.16528, 1, 0, 0.488658,-99) , -12, 0.526705, 0, 0, 0.494034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166554,-99) , -7, 0.253137, 1, 0, 0.491494,-99) ); - // itree = 1170 - fBoostWeights.push_back(0.00644627); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.701475,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423179,-99) , -14, -3.71916, 0, 0, 0.53714,-99) , -5, 1.94984, 0, 0, 0.558508,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310149,-99) , -4, 1.98718, 1, 0, 0.55042,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540995,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473395,-99) , -9, -0.32022, 1, 0, 0.509911,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498594,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320884,-99) , -9, -3.07462, 1, 0, 0.438127,-99) , -3, 0.996213, 1, 0, 0.494796,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.505359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.341606,-99) , -3, 0.968665, 0, 0, 0.453387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.237268,-99) , -8, 0.365352, 0, 0, 0.393392,-99) , -4, 1.57468, 1, 0, 0.479658,-99) , -10, -618.166, 1, 0, 0.495899,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155237,-99) , -7, 0.252094, 1, 0, 0.493186,-99) ); - // itree = 1171 - fBoostWeights.push_back(0.00501583); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.699204,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518727,-99) , -8, -0.694283, 0, 0, 0.613656,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452695,-99) , -15, 0.37755, 1, 0, 0.516161,-99) , -8, 0.0773524, 1, 0, 0.560366,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637764,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482393,-99) , -6, 0.612928, 1, 0, 0.58658,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528986,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457413,-99) , -4, 0.751696, 1, 0, 0.47784,-99) , -12, 0.416559, 0, 0, 0.487416,-99) , -12, 0.0637098, 1, 0, 0.501671,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370722,-99) , -4, 1.19832, 0, 0, 0.434141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269646,-99) , -4, 1.68779, 1, 0, 0.413242,-99) , -12, 0.0312599, 0, 0, 0.493816,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354047,-99) , -5, 0.443713, 0, 0, 0.487834,-99) ); - // itree = 1172 - fBoostWeights.push_back(0.00706045); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629985,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512793,-99) , -5, 0.829692, 0, 0, 0.600999,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502694,-99) , -12, 0.19282, 1, 0, 0.573738,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554662,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369072,-99) , -12, 0.0742757, 0, 0, 0.470559,-99) , -13, 0.00119789, 0, 0, 0.549586,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542017,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481783,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.377047,-99) , -15, 0.109915, 1, 0, 0.42995,-99) , -1, 8.5, 1, 0, 0.46403,-99) , -2, 12.5, 0, 0, 0.523343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654912,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513418,-99) , -7, 0.0236054, 1, 0, 0.601908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389554,-99) , -1, 8.5, 0, 0, 0.561133,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324971,-99) , -5, 2.24284, 1, 0, 0.509739,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.578321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.403543,-99) , -12, 0.463535, 0, 0, 0.42238,-99) , -12, 0.110599, 1, 0, 0.46083,-99) , -9, -4.34402, 1, 0, 0.477248,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.136853,-99) , -7, 0.133155, 1, 0, 0.471292,-99) , -5, 1.53564, 1, 0, 0.498429,-99) ); - // itree = 1173 - fBoostWeights.push_back(0.00576274); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424399,-99) , -12, 0.0294655, 0, 0, 0.525791,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547871,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32251,-99) , -0, 10.5, 1, 0, 0.433138,-99) , -7, 0.0100512, 0, 0, 0.517223,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534336,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447592,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36238,-99) , -2, 16.5, 1, 0, 0.415535,-99) , -12, 0.170439, 0, 0, 0.444665,-99) , -14, -3.85961, 0, 0, 0.506126,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.275297,-99) , -13, 0.0796594, 1, 0, 0.503447,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613965,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430243,-99) , -8, 0.997768, 0, 0, 0.499868,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224662,-99) , -8, 0.919805, 0, 0, 0.396164,-99) , -5, 1.99478, 1, 0, 0.491869,-99) ); - // itree = 1174 - fBoostWeights.push_back(0.00271158); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610268,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.515546,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467412,-99) , -5, 1.42352, 1, 0, 0.488817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310844,-99) , -13, 0.0494953, 1, 0, 0.48554,-99) , -12, 0.513631, 0, 0, 0.489839,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299275,-99) , -7, 0.00714287, 0, 0, 0.486255,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260925,-99) , -5, 2.33369, 1, 0, 0.482353,-99) ); - // itree = 1175 - fBoostWeights.push_back(0.00592565); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640326,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.594365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383302,-99) , -7, 0.0162389, 1, 0, 0.515953,-99) , -2, 17.5, 0, 0, 0.572585,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551389,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.48238,-99) , -8, 0.912285, 1, 0, 0.528743,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549889,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400749,-99) , -5, 1.84072, 0, 0, 0.44688,-99) , -16, 81.6212, 1, 0, 0.512154,-99) , -16, 214.776, 0, 0, 0.531872,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427478,-99) , -8, -0.883526, 0, 0, 0.521157,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582778,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496995,-99) , -1, 11.5, 1, 0, 0.527132,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382894,-99) , -12, 0.284315, 0, 0, 0.440075,-99) , -15, 0.0880654, 0, 0, 0.503391,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.47492,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294049,-99) , -7, 0.0856296, 1, 0, 0.460634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304717,-99) , -1, 8.5, 0, 0, 0.439133,-99) , -11, 0.5, 1, 0, 0.476247,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178516,-99) , -4, 1.97324, 1, 0, 0.469585,-99) , -16, 996.421, 1, 0, 0.493526,-99) ); - // itree = 1176 - fBoostWeights.push_back(0.00446565); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490673,-99) , -7, 0.108695, 1, 0, 0.589782,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472665,-99) , -15, 1.83322, 1, 0, 0.561474,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392267,-99) , -3, 0.999257, 1, 0, 0.547103,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482402,-99) , -10, -641.719, 1, 0, 0.49465,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.12235,-99) , -5, 2.49336, 1, 0, 0.4922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177255,-99) , -7, 0.0559158, 1, 0, 0.482679,-99) , -2, 30.5, 0, 0, 0.494541,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.199112,-99) , -7, 0.324392, 1, 0, 0.493331,-99) ); - // itree = 1177 - fBoostWeights.push_back(0.0060865); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.630523,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.542022,-99) , -6, 0.801277, 1, 0, 0.593725,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570667,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526183,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447408,-99) , -5, 1.16213, 0, 0, 0.485315,-99) , -2, 20.5, 0, 0, 0.514589,-99) , -12, 0.130705, 1, 0, 0.558022,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544195,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439632,-99) , -8, 0.977641, 0, 0, 0.475924,-99) , -8, 0.704647, 1, 0, 0.535621,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551165,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388717,-99) , -16, 2.62804, 0, 0, 0.536583,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493917,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391028,-99) , -11, 0.5, 1, 0, 0.454921,-99) , -16, 1355.49, 1, 0, 0.495422,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.157876,-99) , -7, 0.00691023, 0, 0, 0.489549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278715,-99) , -13, 0.0154647, 1, 0, 0.47549,-99) , -5, 1.43261, 1, 0, 0.50209,-99) ); - // itree = 1178 - fBoostWeights.push_back(0.00702372); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.778926,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596606,-99) , -4, 1.83021, 0, 0, 0.61343,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445824,-99) , -15, 1.15421, 1, 0, 0.580096,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59712,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335437,-99) , -13, 0.0076972, 1, 0, 0.417265,-99) , -7, 0.14096, 0, 0, 0.475538,-99) , -1, 40.5, 1, 0, 0.548704,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.191571,-99) , -1, 10.5, 0, 0, 0.534493,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391496,-99) , -15, 0.565522, 1, 0, 0.49242,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329546,-99) , -7, 0.0072981, 0, 0, 0.487486,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.243585,-99) , -7, 0.0465751, 1, 0, 0.482334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115676,-99) , -0, 34.5, 1, 0, 0.475401,-99) , -2, 22.5, 0, 0, 0.492757,-99) ); - // itree = 1179 - fBoostWeights.push_back(0.00383768); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.62654,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522753,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383297,-99) , -13, 0.037596, 1, 0, 0.517785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308402,-99) , -15, 0.0316527, 0, 0, 0.512105,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55729,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331823,-99) , -7, 0.0149389, 1, 0, 0.39343,-99) , -6, 0.795942, 0, 0, 0.435757,-99) , -8, 0.978342, 1, 0, 0.501042,-99) , -12, 0.52549, 0, 0, 0.50548,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.322802,-99) , -5, 2.31036, 1, 0, 0.501478,-99) ); - // itree = 1180 - fBoostWeights.push_back(0.00221232); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627305,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49996,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384879,-99) , -13, 0.0356222, 1, 0, 0.496225,-99) , -15, 0.0266476, 1, 0, 0.500887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.293085,-99) , -7, 0.00668197, 0, 0, 0.49811,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317065,-99) , -3, 0.999712, 1, 0, 0.495272,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130302,-99) , -7, 0.281901, 1, 0, 0.493334,-99) ); - // itree = 1181 - fBoostWeights.push_back(0.00411601); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537964,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444866,-99) , -0, 11.5, 0, 0, 0.530353,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.379894,-99) , -1, 65.5, 1, 0, 0.524205,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493434,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363677,-99) , -6, 0.848958, 1, 0, 0.469207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.32334, 1, 0, 0.460526,-99) , -7, 0.0129631, 0, 0, 0.510283,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535903,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399336,-99) , -4, 1.21268, 0, 0, 0.458745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.311311,-99) , -6, 0.872145, 1, 0, 0.422045,-99) , -12, 0.032386, 0, 0, 0.502273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299476,-99) , -3, 0.99965, 1, 0, 0.49765,-99) ); - // itree = 1182 - fBoostWeights.push_back(0.00465353); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646425,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49108,-99) , -3, 0.994448, 1, 0, 0.585784,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.598908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493618,-99) , -4, 0.726001, 0, 0, 0.559998,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.512966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453856,-99) , -6, 0.674195, 1, 0, 0.493232,-99) , -2, 24.5, 0, 0, 0.504415,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460924,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186029,-99) , -2, 31.5, 0, 0, 0.375785,-99) , -7, 0.062922, 1, 0, 0.495379,-99) , -2, 53.5, 0, 0, 0.50281,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461118,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29668,-99) , -5, 1.5938, 1, 0, 0.380495,-99) , -1, 7.5, 0, 0, 0.493636,-99) ); - // itree = 1183 - fBoostWeights.push_back(0.00477421); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665753,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.539462,-99) , -7, 0.0281576, 1, 0, 0.594551,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563331,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438024,-99) , -4, 1.20712, 0, 0, 0.502177,-99) , -13, 0.00172729, 0, 0, 0.544391,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523104,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460987,-99) , -5, 1.37639, 1, 0, 0.48607,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316517,-99) , -7, 0.00744826, 0, 0, 0.480837,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.54979, 1, 0, 0.478541,-99) , -12, 0.0716944, 1, 0, 0.494079,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477818,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28768,-99) , -8, 0.185736, 1, 0, 0.380094,-99) , -12, 0.0312849, 0, 0, 0.484794,-99) ); - // itree = 1184 - fBoostWeights.push_back(0.00511982); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.660253,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628212,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5204,-99) , -2, 16.5, 0, 0, 0.573433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.186908,-99) , -5, 2.08106, 1, 0, 0.56456,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658965,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436958,-99) , -15, 0.634363, 1, 0, 0.48576,-99) , -5, 2.43341, 0, 0, 0.490848,-99) , -13, 0.00534214, 0, 0, 0.505142,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528077,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389933,-99) , -2, 22.5, 0, 0, 0.4696,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273356,-99) , -5, 1.47777, 1, 0, 0.411917,-99) , -13, 0.010982, 1, 0, 0.490511,-99) , -12, 0.525205, 0, 0, 0.496611,-99) ); - // itree = 1185 - fBoostWeights.push_back(0.0075594); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657863,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495873,-99) , -7, 0.0337603, 1, 0, 0.569755,-99) , -2, 38.5, 0, 0, 0.58513,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415469,-99) , -13, 0.0314426, 1, 0, 0.569022,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.478932,-99) , -12, 0.0744898, 0, 0, 0.52187,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.428003,-99) , -15, 0.0963238, 0, 0, 0.499949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402749,-99) , -12, 0.0315268, 0, 0, 0.484292,-99) , -13, 0.00222365, 0, 0, 0.537988,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.633723,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376832,-99) , -1, 8.5, 0, 0, 0.58854,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485575,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2231,-99) , -4, 1.99385, 1, 0, 0.475889,-99) , -9, -3.60054, 1, 0, 0.49794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256069,-99) , -3, 0.999382, 1, 0, 0.489992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.151751,-99) , -7, 0.0909877, 1, 0, 0.478199,-99) , -5, 1.56204, 1, 0, 0.510534,-99) ); - // itree = 1186 - fBoostWeights.push_back(0.00474022); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.560851,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500458,-99) , -12, 0.0993872, 1, 0, 0.524373,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521449,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359413,-99) , -3, 0.989633, 1, 0, 0.461266,-99) , -8, 0.935902, 1, 0, 0.510108,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406539,-99) , -16, 5.14535, 0, 0, 0.502772,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356958,-99) , -12, 0.0235703, 0, 0, 0.49704,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.460251,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.145682,-99) , -14, -3.31418, 1, 0, 0.356308,-99) , -4, 1.84638, 1, 0, 0.489845,-99) ); - // itree = 1187 - fBoostWeights.push_back(0.00577908); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.588796,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567304,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496135,-99) , -6, 0.1689, 1, 0, 0.511061,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408064,-99) , -10, 7704.99, 1, 0, 0.50177,-99) , -10, 10999.1, 0, 0, 0.511181,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55037,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45198,-99) , -6, 0.267499, 0, 0, 0.516295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404637,-99) , -8, 0.963332, 0, 0, 0.484974,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352054,-99) , -12, 0.0742125, 0, 0, 0.44981,-99) , -8, 0.911184, 1, 0, 0.497988,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666112,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498398,-99) , -8, 0.967376, 1, 0, 0.555831,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406211,-99) , -10, 3545.79, 1, 0, 0.495482,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378797,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.119904,-99) , -3, 0.993044, 1, 0, 0.304008,-99) , -8, 0.897608, 0, 0, 0.41907,-99) , -5, 1.90711, 1, 0, 0.485842,-99) ); - // itree = 1188 - fBoostWeights.push_back(0.00432518); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.535127,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278979,-99) , -5, 2.12366, 1, 0, 0.527879,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492336,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252783,-99) , -8, 0.955647, 0, 0, 0.467009,-99) , -8, 0.934753, 1, 0, 0.51239,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408729,-99) , -8, -0.972997, 0, 0, 0.506953,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32569,-99) , -2, 6.5, 0, 0, 0.50363,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487507,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266106,-99) , -7, 0.0351183, 1, 0, 0.405994,-99) , -3, 0.999228, 1, 0, 0.49696,-99) ); - // itree = 1189 - fBoostWeights.push_back(0.00338638); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.525135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404129,-99) , -7, 0.00922132, 0, 0, 0.519135,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.389809,-99) , -13, 0.037838, 1, 0, 0.514346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.337136,-99) , -12, 0.0173719, 0, 0, 0.510606,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511667,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.288828,-99) , -5, 1.91759, 1, 0, 0.471775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.249661,-99) , -0, 12.5, 1, 0, 0.420927,-99) , -2, 8.5, 0, 0, 0.502562,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274457,-99) , -3, 0.999753, 1, 0, 0.499811,-99) ); - // itree = 1190 - fBoostWeights.push_back(0.00602671); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637543,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.518887,-99) , -6, 0.505941, 1, 0, 0.587423,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.461271,-99) , -16, 137.475, 1, 0, 0.493443,-99) , -12, 0.108474, 1, 0, 0.537938,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524527,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.384686,-99) , -15, 0.757413, 1, 0, 0.504029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353562,-99) , -9, 3.30103, 0, 0, 0.472351,-99) , -3, 0.993389, 1, 0, 0.513401,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628967,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495785,-99) , -3, 0.998791, 0, 0, 0.566624,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.537883,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.433553,-99) , -3, 0.958054, 1, 0, 0.464935,-99) , -9, -8.11177, 1, 0, 0.479327,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0987739,-99) , -4, 1.55261, 1, 0, 0.330971,-99) , -9, -0.217368, 1, 0, 0.464644,-99) , -9, 0.165823, 0, 0, 0.488494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.303556,-99) , -4, 2.07376, 1, 0, 0.485726,-99) ); - // itree = 1191 - fBoostWeights.push_back(0.00500349); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.629965,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524363,-99) , -1, 52.5, 1, 0, 0.59224,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.250787,-99) , -1, 17.5, 0, 0, 0.571638,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504568,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.409002,-99) , -14, -4.81527, 0, 0, 0.496719,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467721,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26468,-99) , -3, 0.9959, 1, 0, 0.419123,-99) , -13, 0.0111113, 1, 0, 0.486858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.221904,-99) , -7, 0.0787526, 1, 0, 0.481343,-99) , -2, 38.5, 0, 0, 0.493244,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.29378,-99) , -4, 1.9733, 1, 0, 0.488132,-99) ); - // itree = 1192 - fBoostWeights.push_back(0.00417037); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.611646,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527578,-99) , -10, 104.898, 1, 0, 0.545664,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489739,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256467,-99) , -4, 1.27321, 1, 0, 0.451219,-99) , -1, 9.5, 0, 0, 0.530104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589299,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480726,-99) , -0, 10.5, 1, 0, 0.493776,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356175,-99) , -3, 0.887506, 0, 0, 0.481752,-99) , -6, 0.391419, 1, 0, 0.502777,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278625,-99) , -5, 2.49115, 1, 0, 0.50108,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.442193,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.141193,-99) , -13, 0.0130482, 1, 0, 0.386637,-99) , -3, 0.999348, 1, 0, 0.49456,-99) ); - // itree = 1193 - fBoostWeights.push_back(0.00628299); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.6253,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479108,-99) , -15, 0.0568614, 1, 0, 0.581236,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.440141,-99) , -8, 0.984091, 1, 0, 0.556878,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.549015,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454422,-99) , -13, 0.00395559, 0, 0, 0.484532,-99) , -6, 0.513642, 1, 0, 0.520281,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459858,-99) , -12, 0.178068, 1, 0, 0.482581,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.324114,-99) , -13, 0.00680577, 0, 0, 0.383371,-99) , -12, 0.155539, 0, 0, 0.460568,-99) , -12, 0.123372, 1, 0, 0.493252,-99) , -12, 0.367983, 0, 0, 0.500705,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.569716,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359611,-99) , -3, 0.9555, 1, 0, 0.442705,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.126418,-99) , -8, 0.687741, 0, 0, 0.37427,-99) , -5, 2.1023, 1, 0, 0.492431,-99) ); - // itree = 1194 - fBoostWeights.push_back(0.00376612); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.602466,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490155,-99) , -7, 0.079618, 1, 0, 0.556948,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500927,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231811,-99) , -7, 0.0572923, 1, 0, 0.492331,-99) , -2, 30.5, 0, 0, 0.504388,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356231,-99) , -12, 0.0182006, 0, 0, 0.500528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259704,-99) , -13, 0.0807334, 1, 0, 0.498008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.305478,-99) , -7, 0.00716742, 0, 0, 0.494368,-99) ); - // itree = 1195 - fBoostWeights.push_back(0.00484258); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.625835,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522561,-99) , -13, 0.000981339, 0, 0, 0.592488,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438205,-99) , -6, 0.24473, 1, 0, 0.551113,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637287,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4615,-99) , -8, 0.29358, 0, 0, 0.585565,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.408756,-99) , -15, 1.09108, 1, 0, 0.482022,-99) , -12, 0.386354, 0, 0, 0.490235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.362765,-99) , -6, 0.114699, 0, 0, 0.48305,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490488,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350015,-99) , -15, 0.115945, 0, 0, 0.441356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297314,-99) , -6, 0.652606, 1, 0, 0.397943,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0839812,-99) , -5, 2.17722, 1, 0, 0.380709,-99) , -3, 0.889538, 0, 0, 0.471822,-99) , -4, 0.361866, 1, 0, 0.484731,-99) ); - // itree = 1196 - fBoostWeights.push_back(0.00651513); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.666367,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55941,-99) , -5, 1.3666, 1, 0, 0.596721,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.434025,-99) , -13, 0.0111078, 1, 0, 0.566342,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.596942,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445072,-99) , -6, 0.979542, 1, 0, 0.555698,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452245,-99) , -10, -580.234, 1, 0, 0.475015,-99) , -9, -4.19536, 1, 0, 0.489999,-99) , -6, 0.21895, 1, 0, 0.509282,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.576409,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458796,-99) , -8, 0.991777, 0, 0, 0.512447,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372467,-99) , -6, 0.184799, 0, 0, 0.477088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342778,-99) , -9, -2.59305, 0, 0, 0.446766,-99) , -14, -3.56284, 0, 0, 0.496431,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547969,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.219664,-99) , -14, -3.81383, 1, 0, 0.399753,-99) , -5, 2.1018, 1, 0, 0.490018,-99) ); - // itree = 1197 - fBoostWeights.push_back(0.00288536); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.503219,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436745,-99) , -5, 1.93568, 1, 0, 0.494275,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.325746,-99) , -3, 0.725867, 0, 0, 0.49029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.283513,-99) , -2, 6.5, 0, 0, 0.486455,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.149044,-99) , -5, 2.5698, 1, 0, 0.485093,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187395,-99) , -13, 0.0727469, 1, 0, 0.481903,-99) ); - // itree = 1198 - fBoostWeights.push_back(0.00762887); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650437,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544897,-99) , -3, 0.986268, 0, 0, 0.604611,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.595937,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.448017,-99) , -8, 0.973006, 0, 0, 0.498866,-99) , -13, 0.00199371, 0, 0, 0.564827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467056,-99) , -8, -0.847487, 0, 0, 0.547684,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386178,-99) , -5, 0.427143, 0, 0, 0.530561,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.646322,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.545129,-99) , -8, -0.0684312, 1, 0, 0.572083,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.536523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414946,-99) , -2, 24.5, 0, 0, 0.475529,-99) , -15, 0.617518, 1, 0, 0.535093,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585225,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464817,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.356232,-99) , -15, 0.054013, 0, 0, 0.447111,-99) , -15, 0.0324343, 1, 0, 0.464559,-99) , -15, 0.232841, 0, 0, 0.49372,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.45887,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224211,-99) , -4, 1.52614, 1, 0, 0.426475,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256315,-99) , -15, 0.297385, 1, 0, 0.385141,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0786277,-99) , -4, 1.76083, 1, 0, 0.360959,-99) , -13, 0.00851039, 1, 0, 0.474272,-99) , -5, 1.3944, 1, 0, 0.497035,-99) ); - // itree = 1199 - fBoostWeights.push_back(0.0037248); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.658885,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.4987,-99) , -7, 0.0681269, 1, 0, 0.616982,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564084,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467364,-99) , -15, 0.0988113, 0, 0, 0.516551,-99) , -7, 0.0226516, 0, 0, 0.568371,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.572211,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490646,-99) , -2, 39.5, 0, 0, 0.500222,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.252139,-99) , -4, 1.99653, 1, 0, 0.49563,-99) , -10, 9565.13, 0, 0, 0.50569,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331562,-99) , -3, 0.99962, 1, 0, 0.500763,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30403,-99) , -12, 0.01821, 0, 0, 0.49581,-99) ); - // itree = 1200 - fBoostWeights.push_back(0.00513092); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648968,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554033,-99) , -16, 759.043, 1, 0, 0.602094,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487782,-99) , -7, 0.0483551, 0, 0, 0.57918,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382793,-99) , -1, 77.5, 1, 0, 0.556891,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.196621,-99) , -1, 11.5, 0, 0, 0.544401,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507026,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369949,-99) , -14, -5.4707, 0, 0, 0.501216,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110273,-99) , -4, 1.63672, 1, 0, 0.40637,-99) , -8, -0.935131, 0, 0, 0.492827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306639,-99) , -1, 31.5, 1, 0, 0.488206,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.155037,-99) , -7, 0.0693547, 1, 0, 0.482302,-99) , -2, 30.5, 0, 0, 0.493846,-99) ); - // itree = 1201 - fBoostWeights.push_back(0.00521195); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647084,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.631836,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.41784,-99) , -4, 1.35186, 1, 0, 0.597675,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604743,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.456081,-99) , -4, 1.68302, 0, 0, 0.483144,-99) , -13, 0.00371273, 0, 0, 0.535993,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492503,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.38974,-99) , -4, 1.74693, 1, 0, 0.483354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.266285,-99) , -7, 0.041887, 1, 0, 0.47532,-99) , -2, 23.5, 0, 0, 0.489784,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454789,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.260763,-99) , -5, 1.3124, 1, 0, 0.377995,-99) , -13, 0.0203209, 1, 0, 0.481289,-99) , -12, 0.555743, 0, 0, 0.486482,-99) ); - // itree = 1202 - fBoostWeights.push_back(0.00623444); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601685,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493678,-99) , -13, 0.00177523, 0, 0, 0.56573,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436929,-99) , -1, 62.5, 1, 0, 0.544004,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.3019,-99) , -1, 14.5, 0, 0, 0.526824,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577501,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489111,-99) , -12, 0.0423248, 1, 0, 0.49612,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.397222,-99) , -15, 0.612971, 1, 0, 0.488701,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.17447,-99) , -7, 0.0466457, 1, 0, 0.478497,-99) , -2, 24.5, 0, 0, 0.490591,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5029,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.176555,-99) , -14, -3.42246, 1, 0, 0.377852,-99) , -4, 1.82018, 1, 0, 0.483849,-99) ); - // itree = 1203 - fBoostWeights.push_back(0.00378082); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.650693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497421,-99) , -13, 0.00233571, 0, 0, 0.583303,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526658,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481208,-99) , -12, 0.0984411, 1, 0, 0.499782,-99) , -9, -5.90301, 1, 0, 0.508285,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.605605,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321562,-99) , -8, 0.98626, 0, 0, 0.423226,-99) , -4, 1.76837, 1, 0, 0.501531,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378432,-99) , -8, -0.981496, 0, 0, 0.496381,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.269117,-99) , -3, 0.999753, 1, 0, 0.49311,-99) ); - // itree = 1204 - fBoostWeights.push_back(0.00511216); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580801,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502796,-99) , -10, 4002.9, 1, 0, 0.548235,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.110196,-99) , -5, 2.25158, 1, 0, 0.541667,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523672,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458083,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308227,-99) , -12, 0.0774096, 1, 0, 0.384108,-99) , -7, 0.0209355, 0, 0, 0.454018,-99) , -14, -3.54405, 0, 0, 0.520408,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657679,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498558,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.430228,-99) , -12, 0.136147, 1, 0, 0.466594,-99) , -5, 2.11309, 0, 0, 0.471526,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323193,-99) , -5, 2.16623, 1, 0, 0.465161,-99) , -16, 1085.87, 1, 0, 0.491081,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28851,-99) , -3, 0.999637, 1, 0, 0.486096,-99) ); - // itree = 1205 - fBoostWeights.push_back(0.00374308); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.637383,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506271,-99) , -1, 20.5, 0, 0, 0.563059,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.557395,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465716,-99) , -6, 0.914646, 1, 0, 0.532731,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477848,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.36873,-99) , -4, 1.71687, 1, 0, 0.466628,-99) , -9, -3.18969, 1, 0, 0.482468,-99) , -4, 0.390545, 1, 0, 0.493712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.35796,-99) , -5, 0.4581, 0, 0, 0.487745,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.30723,-99) , -14, -5.73772, 0, 0, 0.483526,-99) ); - // itree = 1206 - fBoostWeights.push_back(0.00464678); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.664492,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.425996,-99) , -8, -0.900729, 0, 0, 0.549075,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547023,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.420117,-99) , -4, 0.759932, 1, 0, 0.475059,-99) , -15, 0.444321, 1, 0, 0.526124,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51369,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439486,-99) , -12, 0.104793, 1, 0, 0.471243,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15504,-99) , -4, 1.97331, 1, 0, 0.466975,-99) , -16, 456.25, 1, 0, 0.489489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.287038,-99) , -5, 2.26444, 1, 0, 0.484163,-99) , -10, -15056.2, 1, 0, 0.489804,-99) ); - // itree = 1207 - fBoostWeights.push_back(0.00743723); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.628685,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.548587,-99) , -16, 1623.69, 1, 0, 0.588192,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.604054,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500016,-99) , -9, 6.48252, 0, 0, 0.511577,-99) , -4, 0.505631, 1, 0, 0.530073,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419839,-99) , -5, 0.593481, 0, 0, 0.520827,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354206,-99) , -7, 0.00924779, 0, 0, 0.511422,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644257,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527157,-99) , -14, -3.89242, 0, 0, 0.588936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.363334,-99) , -8, 0.719855, 0, 0, 0.549211,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547055,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431034,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.115824,-99) , -5, 2.36153, 1, 0, 0.414227,-99) , -9, -4.03453, 1, 0, 0.440423,-99) , -11, 0.5, 1, 0, 0.476434,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488987,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387404,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.177394,-99) , -5, 1.83216, 1, 0, 0.288162,-99) , -11, 1.5, 0, 0, 0.36122,-99) , -13, 0.00210923, 1, 0, 0.440703,-99) , -5, 1.67717, 1, 0, 0.487415,-99) ); - // itree = 1208 - fBoostWeights.push_back(0.0043149); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648828,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659516,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.522772,-99) , -6, 0.176617, 1, 0, 0.571732,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.531654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.43434,-99) , -13, 0.0026932, 0, 0, 0.489664,-99) , -3, 0.982135, 1, 0, 0.526616,-99) , -4, 1.73414, 0, 0, 0.541121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.380836,-99) , -8, 0.996994, 1, 0, 0.529598,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513266,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438032,-99) , -3, 0.997597, 1, 0, 0.500309,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.447556,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.178405,-99) , -13, 0.0712741, 1, 0, 0.440635,-99) , -6, 0.838758, 1, 0, 0.483581,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.140356,-99) , -4, 2.20331, 1, 0, 0.481869,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.224904,-99) , -2, 6.5, 0, 0, 0.477215,-99) , -11, 1.5, 0, 0, 0.495025,-99) ); - // itree = 1209 - fBoostWeights.push_back(0.00690503); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.750168,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543021,-99) , -4, 1.566, 0, 0, 0.60807,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.438492,-99) , -12, 0.0288253, 0, 0, 0.541704,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.466749,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0609375,-99) , -7, 0.237406, 1, 0, 0.461105,-99) , -12, 0.125547, 1, 0, 0.508141,-99) , -15, 0.0690117, 1, 0, 0.517821,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386503,-99) , -16, 3.35351, 0, 0, 0.510813,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607517,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547298,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421048,-99) , -0, 11.5, 1, 0, 0.484186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421785,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195969,-99) , -7, 0.00910536, 0, 0, 0.37689,-99) , -6, 0.745339, 1, 0, 0.451768,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.147585,-99) , -5, 2.11359, 1, 0, 0.434762,-99) , -8, 0.996857, 0, 0, 0.452519,-99) , -7, 0.014807, 0, 0, 0.49422,-99) ); - // itree = 1210 - fBoostWeights.push_back(0.00378938); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.700879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49169,-99) , -13, 0.00394384, 0, 0, 0.600343,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.559263,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.490436,-99) , -8, 0.702477, 1, 0, 0.529576,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495489,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.426748,-99) , -8, -0.510893, 0, 0, 0.47899,-99) , -16, 471.711, 1, 0, 0.497915,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.339991,-99) , -1, 6.5, 0, 0, 0.492589,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.220077,-99) , -3, 0.999718, 1, 0, 0.488518,-99) , -10, -8271.06, 1, 0, 0.496284,-99) ); - // itree = 1211 - fBoostWeights.push_back(0.00494559); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574665,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.187094,-99) , -4, 1.81742, 1, 0, 0.564579,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.584158,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.418115,-99) , -4, 1.48074, 0, 0, 0.484019,-99) , -13, 0.00173168, 0, 0, 0.527281,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617957,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501829,-99) , -5, 1.54273, 1, 0, 0.568257,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.483858,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.406385,-99) , -3, 0.99235, 1, 0, 0.46611,-99) , -9, 6.55704, 0, 0, 0.481529,-99) , -9, -0.9461, 1, 0, 0.499909,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.321733,-99) , -3, 0.999657, 1, 0, 0.49579,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306148,-99) , -7, 0.00739685, 0, 0, 0.491532,-99) ); - // itree = 1212 - fBoostWeights.push_back(0.00470584); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643239,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.563913,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493411,-99) , -4, 0.757478, 1, 0, 0.517992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.348487,-99) , -1, 65.5, 1, 0, 0.51044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479601,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.353191,-99) , -5, 1.98478, 1, 0, 0.464646,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0677361,-99) , -7, 0.0504846, 1, 0, 0.451537,-99) , -1, 10.5, 0, 0, 0.493109,-99) , -12, 0.499154, 0, 0, 0.498929,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.329021,-99) , -12, 0.0227741, 0, 0, 0.492574,-99) ); - // itree = 1213 - fBoostWeights.push_back(0.00375157); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.647467,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510321,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.271539,-99) , -5, 2.20935, 1, 0, 0.506253,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.488529,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318994,-99) , -6, 0.37, 0, 0, 0.408832,-99) , -14, -4.54063, 0, 0, 0.497633,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.270725,-99) , -13, 0.0590895, 1, 0, 0.494499,-99) , -12, 0.502184, 0, 0, 0.500376,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.294466,-99) , -4, 1.97619, 1, 0, 0.495046,-99) ); - // itree = 1214 - fBoostWeights.push_back(0.00457929); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.621648,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516025,-99) , -9, -7.77889, 1, 0, 0.523078,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.544317,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310665,-99) , -8, 0.143361, 1, 0, 0.429243,-99) , -12, 0.03047, 0, 0, 0.514857,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521186,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.443403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299553,-99) , -7, 0.00886848, 0, 0, 0.359912,-99) , -12, 0.117721, 1, 0, 0.436492,-99) , -7, 0.0100386, 0, 0, 0.506297,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.513479,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330649,-99) , -13, 0.0340099, 0, 0, 0.447754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.208349,-99) , -3, 0.998281, 1, 0, 0.408232,-99) , -13, 0.0231836, 1, 0, 0.499357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308905,-99) , -4, 2.06599, 1, 0, 0.496332,-99) ); - // itree = 1215 - fBoostWeights.push_back(0.0036214); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.600832,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387991,-99) , -8, -0.249398, 0, 0, 0.568503,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.509233,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.417882,-99) , -14, -3.53579, 0, 0, 0.491354,-99) , -4, 1.58704, 0, 0, 0.502074,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39228,-99) , -4, 1.85373, 1, 0, 0.496505,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.300451,-99) , -12, 0.0165412, 0, 0, 0.492727,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.286873,-99) , -13, 0.0582729, 1, 0, 0.48923,-99) ); - // itree = 1216 - fBoostWeights.push_back(0.00560825); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.527549,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451663,-99) , -8, -0.847122, 0, 0, 0.515354,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53027,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350638,-99) , -5, 1.41332, 1, 0, 0.415189,-99) , -8, 0.983136, 1, 0, 0.50405,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.618273,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.467224,-99) , -8, 0.994682, 0, 0, 0.548546,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.216549,-99) , -8, 0.944842, 0, 0, 0.42332,-99) , -5, 2.02885, 1, 0, 0.496354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312981,-99) , -2, 6.5, 0, 0, 0.492587,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280959,-99) , -3, 0.999711, 1, 0, 0.488854,-99) ); - // itree = 1217 - fBoostWeights.push_back(0.00587916); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.617665,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.511293,-99) , -10, 9527.68, 0, 0, 0.527695,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.497438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.355592,-99) , -5, 1.65114, 1, 0, 0.465842,-99) , -6, 0.900236, 1, 0, 0.514203,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.240197,-99) , -5, 2.49306, 1, 0, 0.512499,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376523,-99) , -5, 0.565007, 0, 0, 0.503891,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.56131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.453238,-99) , -10, 3639.06, 1, 0, 0.513635,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381605,-99) , -12, 0.274416, 0, 0, 0.428616,-99) , -12, 0.133685, 1, 0, 0.471635,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.239115,-99) , -5, 2.11127, 1, 0, 0.456107,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.160199,-99) , -7, 0.0277873, 1, 0, 0.44173,-99) , -2, 11.5, 0, 0, 0.484467,-99) ); - // itree = 1218 - fBoostWeights.push_back(0.00858933); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654671,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550708,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.166239,-99) , -5, 1.8806, 1, 0, 0.524468,-99) , -8, 0.785323, 0, 0, 0.582033,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.641313,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.144115,-99) , -5, 1.90337, 1, 0, 0.620519,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528688,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.280371,-99) , -3, 0.9983, 1, 0, 0.495357,-99) , -9, -6.6022, 1, 0, 0.535146,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.603627,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496896,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369687,-99) , -10, 7731.97, 1, 0, 0.422378,-99) , -5, 2.14647, 0, 0, 0.448898,-99) , -8, 0.81418, 1, 0, 0.505862,-99) , -3, 0.980815, 1, 0, 0.532474,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619548,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489469,-99) , -13, 0.000604123, 0, 0, 0.578442,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.550359,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.400766,-99) , -3, 0.998614, 1, 0, 0.522172,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457628,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34037,-99) , -3, 0.993359, 0, 0, 0.410795,-99) , -6, 0.765536, 0, 0, 0.475761,-99) , -6, 0.376349, 1, 0, 0.515419,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.484435,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387468,-99) , -4, 1.41896, 1, 0, 0.462547,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225991,-99) , -15, 0.0321411, 0, 0, 0.451955,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.235691,-99) , -3, 0.997198, 1, 0, 0.441215,-99) , -9, 2.55105, 0, 0, 0.475036,-99) , -9, -0.767729, 1, 0, 0.499538,-99) ); - // itree = 1219 - fBoostWeights.push_back(0.00559362); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.717503,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.540075,-99) , -4, 1.54368, 0, 0, 0.586643,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.571483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.481633,-99) , -2, 15.5, 0, 0, 0.527679,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.378761,-99) , -3, 0.999085, 1, 0, 0.506787,-99) , -11, 1.5, 0, 0, 0.535753,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.640375,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.472826,-99) , -9, -0.797148, 1, 0, 0.584362,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.530163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454572,-99) , -3, 0.952045, 1, 0, 0.481855,-99) , -6, 0.657848, 0, 0, 0.494335,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.54613,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.471166,-99) , -15, 0.3716, 1, 0, 0.514666,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404787,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.165232,-99) , -13, 0.0151604, 1, 0, 0.375866,-99) , -6, 1.0106, 0, 0, 0.434286,-99) , -6, 0.786523, 1, 0, 0.477715,-99) , -9, 3.04971, 0, 0, 0.49121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347556,-99) , -12, 0.0227741, 0, 0, 0.485356,-99) ); - // itree = 1220 - fBoostWeights.push_back(0.00251294); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.654335,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.551295,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.496758,-99) , -2, 30.5, 0, 0, 0.507557,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.330566,-99) , -3, 0.99972, 1, 0, 0.503852,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.272575,-99) , -5, 2.4913, 1, 0, 0.502121,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.359447,-99) , -15, 0.0369743, 0, 0, 0.495689,-99) , -12, 0.507781, 0, 0, 0.501739,-99) ); - // itree = 1221 - fBoostWeights.push_back(0.0025); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.58615,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.500812,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.415621,-99) , -3, 0.884047, 0, 0, 0.491894,-99) , -4, 0.105574, 1, 0, 0.499309,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.331015,-99) , -14, -5.73726, 0, 0, 0.495436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388946,-99) , -5, 0.50588, 0, 0, 0.490572,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.345345,-99) , -5, 2.22327, 1, 0, 0.485521,-99) ); - // itree = 1222 - fBoostWeights.push_back(0.00442404); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.657084,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.568647,-99) , -7, 0.0268168, 1, 0, 0.604651,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.623902,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494701,-99) , -7, 0.0158451, 1, 0, 0.541145,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517254,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340242,-99) , -7, 0.0179079, 0, 0, 0.442599,-99) , -16, 835.453, 1, 0, 0.513498,-99) , -13, 0.00442244, 0, 0, 0.542281,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.421264,-99) , -8, -0.898089, 0, 0, 0.529649,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.5003,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427878,-99) , -6, 0.993465, 1, 0, 0.489823,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.376628,-99) , -4, 1.82192, 1, 0, 0.483428,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.285072,-99) , -3, 0.999605, 1, 0, 0.477956,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.274394,-99) , -3, 0.712762, 0, 0, 0.472931,-99) , -11, 1.5, 0, 0, 0.491883,-99) ); - // itree = 1223 - fBoostWeights.push_back(0.0042566); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.643184,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.579169,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.49743,-99) , -5, 1.2008, 1, 0, 0.522267,-99) , -3, 0.897864, 1, 0, 0.538788,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427244,-99) , -7, 0.0116606, 0, 0, 0.524826,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589408,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482652,-99) , -2, 30.5, 0, 0, 0.493963,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367846,-99) , -1, 40.5, 1, 0, 0.484012,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.59712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.318383,-99) , -10, -4335.58, 1, 0, 0.370534,-99) , -4, 1.67642, 1, 0, 0.473206,-99) , -16, 308.576, 1, 0, 0.490931,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34107,-99) , -5, 2.27799, 1, 0, 0.486984,-99) ); - // itree = 1224 - fBoostWeights.push_back(0.00275317); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607995,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.552346,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489984,-99) , -4, 0.739461, 1, 0, 0.508912,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465303,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308279,-99) , -12, 0.0295578, 0, 0, 0.452219,-99) , -3, 0.994039, 1, 0, 0.490815,-99) , -9, 10.8193, 0, 0, 0.495413,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.212333,-99) , -4, 2.24563, 1, 0, 0.494106,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.299861,-99) , -7, 0.00716642, 0, 0, 0.490233,-99) ); - // itree = 1225 - fBoostWeights.push_back(0.00290269); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.601269,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51834,-99) , -13, 0.00344809, 0, 0, 0.56944,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610668,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523147,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465899,-99) , -12, 0.11373, 1, 0, 0.492024,-99) , -9, 7.95972, 0, 0, 0.500064,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.354682,-99) , -7, 0.086608, 1, 0, 0.491858,-99) , -5, 0.997194, 1, 0, 0.501495,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.387304,-99) , -5, 0.43734, 0, 0, 0.49642,-99) ); - // itree = 1226 - fBoostWeights.push_back(0.00688663); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644816,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.567323,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.459703,-99) , -6, 0.916971, 1, 0, 0.541377,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.390449,-99) , -5, 1.88006, 1, 0, 0.520606,-99) , -8, 0.996412, 0, 0, 0.533053,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.678099,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502441,-99) , -10, -4094.33, 1, 0, 0.567467,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507329,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.174289,-99) , -7, 0.0413423, 1, 0, 0.489991,-99) , -1, 15.5, 0, 0, 0.517312,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493873,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.391608,-99) , -1, 43.5, 1, 0, 0.478912,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547682,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.342513,-99) , -8, 0.975287, 0, 0, 0.388139,-99) , -15, 0.143978, 0, 0, 0.441657,-99) , -10, 845.394, 1, 0, 0.477373,-99) , -9, -1.64376, 1, 0, 0.496494,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.279052,-99) , -13, 0.0576018, 1, 0, 0.492376,-99) ); - // itree = 1227 - fBoostWeights.push_back(0.0060895); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.659913,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.554472,-99) , -14, -1.96096, 1, 0, 0.611814,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543939,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.419983,-99) , -13, 0.006937, 1, 0, 0.492334,-99) , -2, 16.5, 0, 0, 0.556569,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524438,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.399306,-99) , -12, 0.0744293, 0, 0, 0.467158,-99) , -14, -2.71727, 0, 0, 0.527199,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.526738,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.455334,-99) , -12, 0.118255, 1, 0, 0.491133,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.317429,-99) , -13, 0.0163145, 1, 0, 0.480427,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.323817,-99) , -1, 7.5, 0, 0, 0.468239,-99) , -5, 1.46817, 1, 0, 0.493933,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334758,-99) , -5, 0.507591, 0, 0, 0.487035,-99) ); - // itree = 1228 - fBoostWeights.push_back(0.00568934); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.712641,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585324,-99) , -8, 0.471744, 1, 0, 0.643971,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585808,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474933,-99) , -15, 0.212933, 1, 0, 0.532482,-99) , -4, 1.30939, 0, 0, 0.578655,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2071,-99) , -4, 1.95381, 1, 0, 0.567159,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622158,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.514596,-99) , -16, 1144.66, 1, 0, 0.566363,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.69654,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.501468,-99) , -4, 2.1288, 0, 0, 0.506589,-99) , -12, 0.0939131, 1, 0, 0.525031,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465879,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.388993,-99) , -0, 20.5, 1, 0, 0.426575,-99) , -12, 0.0369267, 0, 0, 0.513916,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.487971,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.248967,-99) , -4, 2.03882, 1, 0, 0.485075,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.304148,-99) , -9, 0.180214, 0, 0, 0.466698,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.232281,-99) , -3, 0.998017, 1, 0, 0.451797,-99) , -9, -0.0966898, 1, 0, 0.487145,-99) , -9, 4.82226, 0, 0, 0.498651,-99) ); - // itree = 1229 - fBoostWeights.push_back(0.00642412); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615016,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.529791,-99) , -15, 0.173076, 1, 0, 0.570522,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.53876,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485556,-99) , -12, 0.110474, 1, 0, 0.509022,-99) , -9, 3.30206, 0, 0, 0.522371,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.474207,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.32469,-99) , -8, 0.998978, 0, 0, 0.405689,-99) , -14, -4.68257, 0, 0, 0.514123,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.350629,-99) , -1, 62.5, 1, 0, 0.508104,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.639993,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475466,-99) , -1, 10.5, 0, 0, 0.582855,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.392698,-99) , -8, 0.900294, 0, 0, 0.543478,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.169258,-99) , -3, 0.947009, 0, 0, 0.5016,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.172164,-99) , -14, -2.81329, 1, 0, 0.414997,-99) , -4, 1.69213, 1, 0, 0.498424,-99) ); - // itree = 1230 - fBoostWeights.push_back(0.00351344); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.648143,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.504978,-99) , -9, 11.333, 0, 0, 0.510163,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.195921,-99) , -7, 0.250994, 1, 0, 0.508044,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532361,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423518,-99) , -4, 1.10263, 0, 0, 0.461357,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.087557,-99) , -4, 1.57448, 1, 0, 0.440365,-99) , -8, -0.834325, 0, 0, 0.498333,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326037,-99) , -3, 0.706502, 0, 0, 0.494442,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.360886,-99) , -12, 0.0220065, 0, 0, 0.489192,-99) ); - // itree = 1231 - fBoostWeights.push_back(0.00276713); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613775,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.494142,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.123031,-99) , -7, 0.168589, 1, 0, 0.491905,-99) , -2, 78.5, 0, 0, 0.496354,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.256779,-99) , -7, 0.00678936, 0, 0, 0.49334,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.315635,-99) , -3, 0.999662, 1, 0, 0.489451,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.162705,-99) , -5, 2.4937, 1, 0, 0.487386,-99) ); - // itree = 1232 - fBoostWeights.push_back(0.00471116); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.636319,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.627728,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534629,-99) , -4, 0.337997, 0, 0, 0.589537,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.517325,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431229,-99) , -10, 5150.77, 1, 0, 0.489138,-99) , -8, 0.339567, 1, 0, 0.534904,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.414768,-99) , -8, -0.885075, 0, 0, 0.51639,-99) , -3, 0.905838, 1, 0, 0.535415,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.520609,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.462783,-99) , -9, -0.0732493, 1, 0, 0.492522,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0999387,-99) , -7, 0.284097, 1, 0, 0.490424,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.19804,-99) , -6, 0.110759, 0, 0, 0.485561,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.340708,-99) , -3, 0.847708, 0, 0, 0.475411,-99) , -4, 0.845754, 1, 0, 0.497057,-99) ); - // itree = 1233 - fBoostWeights.push_back(0.00296026); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.521433,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.424624,-99) , -7, 0.0798114, 1, 0, 0.512813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.370141,-99) , -8, -0.987868, 0, 0, 0.507468,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.365212,-99) , -14, -5.31091, 0, 0, 0.502111,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.290441,-99) , -3, 0.691124, 0, 0, 0.498483,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -5, 2.56529, 1, 0, 0.496797,-99) ); - // itree = 1234 - fBoostWeights.push_back(0.0051984); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.63405,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.51812,-99) , -3, 0.831119, 1, 0, 0.525754,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.404159,-99) , -3, 0.737458, 0, 0, 0.520819,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493803,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.130198,-99) , -7, 0.045531, 1, 0, 0.478537,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.231795,-99) , -3, 0.956505, 0, 0, 0.450368,-99) , -1, 9.5, 0, 0, 0.506526,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457784,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.241715,-99) , -5, 1.60624, 1, 0, 0.387276,-99) , -3, 0.99917, 1, 0, 0.498178,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444137,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.265634,-99) , -5, 1.73463, 1, 0, 0.393862,-99) , -12, 0.0312599, 0, 0, 0.489348,-99) ); - // itree = 1235 - fBoostWeights.push_back(0.0059381); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589432,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.479635,-99) , -7, 0.0850548, 1, 0, 0.557762,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.180523,-99) , -1, 10.5, 0, 0, 0.545068,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.492008,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.373405,-99) , -7, 0.0331107, 1, 0, 0.481191,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.0140114,-99) , -0, 43.5, 1, 0, 0.474703,-99) , -2, 24.5, 0, 0, 0.492071,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0,-99) , -7, 0.322914, 1, 0, 0.490337,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310207,-99) , -12, 0.0181941, 0, 0, 0.48587,-99) ); - // itree = 1236 - fBoostWeights.push_back(0.0058793); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.615021,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.477685,-99) , -13, 0.036751, 1, 0, 0.593217,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.502076,-99) , -13, 0.00191185, 0, 0, 0.562749,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.516614,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.369644,-99) , -1, 27.5, 1, 0, 0.510774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264705,-99) , -7, 0.0501267, 1, 0, 0.500619,-99) , -2, 30.5, 0, 0, 0.511589,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.581408,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.524052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.306798,-99) , -9, -3.16799, 1, 0, 0.427301,-99) , -9, 9.15823, 0, 0, 0.466122,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.193309,-99) , -7, 0.0997806, 1, 0, 0.443378,-99) , -3, 0.998052, 1, 0, 0.500268,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.297645,-99) , -2, 6.5, 0, 0, 0.496854,-99) ); - // itree = 1237 - fBoostWeights.push_back(0.00504248); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.673346,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573409,-99) , -13, 0.00299853, 0, 0, 0.624314,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.52952,-99) , -9, -2.33146, 0, 0, 0.595345,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.610563,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55903,-99) , -8, 0.404705, 0, 0, 0.584909,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.506816,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.381932,-99) , -7, 0.0285072, 1, 0, 0.488175,-99) , -3, 0.997182, 0, 0, 0.511463,-99) , -2, 24.5, 0, 0, 0.537344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.386028,-99) , -12, 0.01821, 0, 0, 0.528675,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.573052,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.482217,-99) , -9, -0.704184, 1, 0, 0.518086,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.464076,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302045,-99) , -15, 0.361093, 1, 0, 0.444103,-99) , -3, 0.992437, 1, 0, 0.491115,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.371371,-99) , -7, 0.00927356, 0, 0, 0.481678,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.335977,-99) , -4, 1.82581, 1, 0, 0.473353,-99) , -12, 0.11049, 1, 0, 0.499256,-99) ); - // itree = 1238 - fBoostWeights.push_back(0.00267787); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.609995,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.507886,-99) , -8, 0.993235, 0, 0, 0.513775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.398547,-99) , -14, -5.10416, 0, 0, 0.507814,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.326965,-99) , -3, 0.999649, 1, 0, 0.503634,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.316655,-99) , -2, 6.5, 0, 0, 0.499793,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.309734,-99) , -12, 0.01821, 0, 0, 0.495369,-99) ); - // itree = 1239 - fBoostWeights.push_back(0.00472121); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.665845,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.547131,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485101,-99) , -9, -1.10265, 1, 0, 0.509468,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.452232,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.107221,-99) , -0, 22.5, 1, 0, 0.436021,-99) , -1, 9.5, 0, 0, 0.495455,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.402167,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.14633,-99) , -13, 0.0114064, 1, 0, 0.34812,-99) , -3, 0.999134, 1, 0, 0.487027,-99) , -9, 12.9108, 0, 0, 0.491186,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.278594,-99) , -12, 0.01821, 0, 0, 0.486574,-99) ); - // itree = 1240 - fBoostWeights.push_back(0.00470255); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.65438,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.538387,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.480635,-99) , -8, 0.892283, 1, 0, 0.522825,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.493405,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.368502,-99) , -15, 0.063518, 0, 0, 0.474593,-99) , -16, 4083.78, 1, 0, 0.500406,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.26635,-99) , -5, 2.28857, 1, 0, 0.498349,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.543961,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.308445,-99) , -1, 10.5, 0, 0, 0.468683,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.217344,-99) , -14, -2.84499, 1, 0, 0.399256,-99) , -4, 1.70301, 1, 0, 0.488801,-99) , -12, 0.493768, 0, 0, 0.495382,-99) ); - // itree = 1241 - fBoostWeights.push_back(0.00615023); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.562345,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.451481,-99) , -8, -0.767529, 0, 0, 0.546743,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.498775,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.259955,-99) , -0, 79.5, 1, 0, 0.48548,-99) , -16, 1971.12, 1, 0, 0.517936,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.334224,-99) , -13, 0.056903, 1, 0, 0.513059,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.613616,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476859,-99) , -14, -3.03186, 1, 0, 0.501898,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.458864,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.296003,-99) , -0, 11.5, 1, 0, 0.395381,-99) , -14, -3.33944, 0, 0, 0.467284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.133141,-99) , -7, 0.0267996, 1, 0, 0.451962,-99) , -2, 11.5, 0, 0, 0.493656,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.320242,-99) , -3, 0.999622, 1, 0, 0.489122,-99) ); - // itree = 1242 - fBoostWeights.push_back(0.00838077); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.644615,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.580075,-99) , -5, 1.26272, 1, 0, 0.615556,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.577355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.427809,-99) , -16, 41.0129, 1, 0, 0.530181,-99) , -16, 215.217, 0, 0, 0.564826,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534671,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.431694,-99) , -5, 1.33819, 0, 0, 0.487648,-99) , -2, 12.5, 0, 0, 0.541513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.619984,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.367598,-99) , -8, -0.105032, 0, 0, 0.587794,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476302,-99) , -4, 1.5089, 0, 0, 0.530707,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570355,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.382737,-99) , -6, 0.620017, 0, 0, 0.463922,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.2112,-99) , -13, 0.00313258, 1, 0, 0.406759,-99) , -11, 1.5, 0, 0, 0.475394,-99) , -5, 1.65081, 1, 0, 0.516789,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.574944,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.586214,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.44327,-99) , -10, 3009, 1, 0, 0.527829,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.444528,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.128726,-99) , -5, 2.1301, 1, 0, 0.437581,-99) , -13, 0.000902971, 1, 0, 0.471342,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.475365,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.347344,-99) , -10, 2646.91, 1, 0, 0.412622,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.234248,-99) , -4, 1.54881, 1, 0, 0.384753,-99) , -11, 0.5, 1, 0, 0.442512,-99) , -10, 11452.3, 0, 0, 0.456003,-99) , -16, 2316.2, 1, 0, 0.487918,-99) ); - // itree = 1243 - fBoostWeights.push_back(0.00592376); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.656322,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.585585,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.485159,-99) , -8, 0.910757, 1, 0, 0.563747,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.50087,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.37231,-99) , -3, 0.790806, 0, 0, 0.489715,-99) , -4, 0.730631, 1, 0, 0.512476,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.25636,-99) , -15, 0.0320959, 0, 0, 0.506681,-99) , -12, 0.417282, 0, 0, 0.51736,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.626635,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.564523,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.457345,-99) , -10, 10916.1, 0, 0, 0.482088,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.189627,-99) , -5, 2.02149, 1, 0, 0.471726,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.519774,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.374715,-99) , -4, 1.40595, 0, 0, 0.43284,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.312847,-99) , -1, 10.5, 0, 0, 0.389043,-99) , -8, 0.864511, 1, 0, 0.448386,-99) , -10, -14838.5, 1, 0, 0.46081,-99) , -3, 0.990011, 1, 0, 0.492689,-99) ); - // itree = 1244 - fBoostWeights.push_back(0.00373221); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.61268,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.570598,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.476149,-99) , -7, 0.0167008, 1, 0, 0.524886,-99) , -2, 20.5, 0, 0, 0.549702,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.439939,-99) , -15, 1.15424, 1, 0, 0.537795,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.423888,-99) , -8, -0.797215, 0, 0, 0.521712,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489908,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.328605,-99) , -14, -5.35767, 0, 0, 0.484567,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.352085,-99) , -2, 7.5, 0, 0, 0.478813,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.226464,-99) , -13, 0.0793784, 1, 0, 0.475693,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.310499,-99) , -3, 0.774557, 0, 0, 0.468872,-99) , -11, 1.5, 0, 0, 0.487194,-99) ); - // itree = 1245 - fBoostWeights.push_back(0.00531426); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.676198,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.534349,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.445979,-99) , -12, 0.0388713, 0, 0, 0.518633,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.465673,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.28502,-99) , -4, 1.67637, 1, 0, 0.44742,-99) , -12, 0.197529, 1, 0, 0.499436,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.264784,-99) , -2, 6.5, 0, 0, 0.494896,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.582243,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.39966,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.233186,-99) , -6, 0.358805, 0, 0, 0.326077,-99) , -5, 2.11184, 0, 0, 0.390361,-99) , -14, -4.67499, 0, 0, 0.486269,-99) , -12, 0.525387, 0, 0, 0.492723,-99) ); - // itree = 1246 - fBoostWeights.push_back(0.00503897); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.622644,-99) , -new BDTNode( -0, -0, --1, 0, 1, 1, 0.532762,-99) , -10, 3798.63, 1, 0, 0.583127,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.495712,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.412269,-99) , -6, 0.870916, 1, 0, 0.471608,-99) , -13, 0.00395468, 0, 0, 0.531164,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.607654,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.469327,-99) , -9, -8.48724, 1, 0, 0.477896,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.55276,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.273217,-99) , -12, 0.397643, 0, 0, 0.351775,-99) , -13, 0.0139882, 1, 0, 0.466497,-99) , -5, 1.37106, 1, 0, 0.489934,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.364926,-99) , -5, 0.570454, 0, 0, 0.483842,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.15548,-99) , -5, 2.56973, 1, 0, 0.482511,-99) ); - // itree = 1247 - fBoostWeights.push_back(0.00314249); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.589316,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.510677,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.454816,-99) , -8, 0.718639, 1, 0, 0.488356,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.225668,-99) , -4, 2.16193, 1, 0, 0.485756,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.302103,-99) , -3, 0.736853, 0, 0, 0.481107,-99) , -4, 0.0654309, 1, 0, 0.489641,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.34337,-99) , -5, 0.44466, 0, 0, 0.48332,-99) ); - // itree = 1248 - fBoostWeights.push_back(0.00303527); - fForest.push_back( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.634513,-99) , -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.528948,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.436656,-99) , -8, -0.871959, 0, 0, 0.51825,-99) , -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, -1, 0.489056,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.372576,-99) , -5, 1.92656, 1, 0, 0.473443,-99) , -16, 992.322, 1, 0, 0.493949,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.301059,-99) , -2, 6.5, 0, 0, 0.490344,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.343643,-99) , -13, 0.0340396, 1, 0, 0.485307,-99) , -12, 0.526826, 0, 0, 0.490787,-99) ); - // itree = 1249 - fBoostWeights.push_back(0.00279527); - fForest.push_back( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -new BDTNode( -0, -0, --1, 0, 1, 1, 0.523347,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.473698,-99) , -1, 9.5, 0, 0, 0.512184,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.383482,-99) , -1, 67.5, 1, 0, 0.508403,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.385026,-99) , -8, -0.982444, 0, 0, 0.502981,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.27458,-99) , -2, 6.5, 0, 0, 0.4992,-99) , -new BDTNode( -0, -0, --1, 0, 1, -1, 0.183813,-99) , -4, 2.07717, 1, 0, 0.495393,-99) ); - return; -} - -// Clean up -inline void ReadBDT::Clear() -{ - for (unsigned int itree=0; itree& inputValues ) const - { - // classifier response value - double retval = 0; - - // classifier response, sanity check first - if (!IsStatusClean()) { - std::cout << "Problem in class \"" << fClassName << "\": cannot return classifier response" - << " because status is dirty" << std::endl; - retval = 0; - } - else { - if (IsNormalised()) { - // normalise variables - std::vector iV; - iV.reserve(inputValues.size()); - int ivar = 0; - for (std::vector::const_iterator varIt = inputValues.begin(); - varIt != inputValues.end(); varIt++, ivar++) { - iV.push_back(NormVariable( *varIt, fVmin[ivar], fVmax[ivar] )); - } - retval = GetMvaValue__( iV ); - } - else { - retval = GetMvaValue__( inputValues ); - } - } - - return retval; - } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h b/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h index cebce3c00..5fc17b351 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h @@ -41,7 +41,9 @@ /* - * Get Labels & prepare vector maps + * + * Construct vectors and maps from Labels; + * */ namespace single_photon @@ -92,33 +94,34 @@ namespace single_photon std::vector> mcTruthVector; std::vector> matchedMCParticleVector; -/* - * The overload constructor 1 takes care of the following maps. - * - */ - std::map< size_t, art::Ptr> IDToPFParticleMap; + /* + * The overload constructor 1 takes care of the following maps. + * + */ + std::map< size_t , art::Ptr> IDToPFParticleMap; // std::map< art::Ptr> PFParticleToIDMap;//This makse more consistant, but it needs works! - std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; - std::map< art::Ptr , std::vector> > PFParticleToMetadataMap;//old name pfParticleToMetadataMap; - std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; - std::map< art::Ptr , std::vector> > PFParticleToClustersMap; - std::map< art::Ptr , std::vector> > ClusterToHitsMap; - std::map, art::Ptr> PFParticlesToShowerReco3DMap; - std::map, art::Ptr> PFParticlesToShowerKalmanMap; - std::map,std::vector>> kalmanTrackToCaloMap; - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; - std::map< art::Ptr, std::vector> > sliceToHitsMap; - std::map> > sliceIDToPFParticlesMap; - std::map> > sliceIDToHitsMap; + std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; + std::map< art::Ptr , std::vector> > + PFParticleToMetadataMap;//old name pfParticleToMetadataMap; + std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; + std::map< art::Ptr , std::vector> > PFParticleToClustersMap; + std::map< art::Ptr , std::vector> > ClusterToHitsMap; + std::map , art::Ptr> PFParticlesToShowerReco3DMap; + std::map , art::Ptr> PFParticlesToShowerKalmanMap; + std::map , std::vector>> kalmanTrackToCaloMap; + std::map< art::Ptr , std::vector> > sliceToPFParticlesMap; + std::map< art::Ptr , std::vector> > sliceToHitsMap; + std::map< int , std::vector> > sliceIDToPFParticlesMap; + std::map< int , std::vector> > sliceIDToHitsMap; /* * Initially empty variables to be filled from other parts of the code. * */ //The followings are taken care by the CollectTracksAndShowers_v2() in BobbyVertexBuilder.h - std::vector< art::Ptr > selected_tracks; - std::vector< art::Ptr > selected_showers; - std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. - std::vector< art::Ptr > more_showers; + std::vector< art::Ptr > selected_tracks; + std::vector< art::Ptr > selected_showers; + std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. + std::vector< art::Ptr > more_showers; //Maps for more pandora objects. std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h index c74a81432..730831536 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h @@ -295,7 +295,7 @@ namespace single_photon void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); /** - * @brief: get vertex for particle + * @brief:get vertex for particle and fill in reco. vertex information * @param: particle: a primary neutrino */ void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); @@ -679,6 +679,7 @@ namespace single_photon * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] */ void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h index ec0af9b45..9c6c00f70 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h @@ -1,5 +1,3 @@ -#include "SinglePhoton_module.h" - namespace single_photon { void SinglePhoton::ClearEventWeightBranches(){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h index d941ff752..eefd55f31 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h @@ -1,5 +1,3 @@ -#include "SinglePhoton_module.h" - namespace single_photon { void SinglePhoton::ClearGeant4Branches(){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index a97c88a5f..8a64a3b39 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -1,5 +1,3 @@ -#include "SinglePhoton_module.h" - namespace single_photon { void SinglePhoton::ClearMCTruths(){ @@ -242,8 +240,7 @@ namespace single_photon //CHECK how is this different from MCReco matching? void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."<Origin(); - if(m_is_verbose) std::cout<<"Getting origin "<Origin()<Origin()<NeutrinoSet()){ if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<Origin()<GetNeutrino().CCNC(); - if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().CCNC()<GetNeutrino().Mode(); - if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); - if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); - if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); - if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); - if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); - if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); - if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); // get corrected lepton position // CHECK, turn simb::mcparticle to art::PtrNParticles(); //MCTruth_NParticles - if(m_is_verbose) std::cout<ResizeMCTruths(m_mctruth_num_daughter_particles); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h index 70f54b1c4..4967530ba 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h @@ -1,5 +1,3 @@ -#include "SinglePhoton_module.h" - namespace single_photon { void SinglePhoton::ClearFlashes(){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index ed5284edd..07aea04f9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -1,6 +1,3 @@ -#include "SinglePhoton_module.h" -#include "reco_truth_matching.h" - namespace single_photon { void SinglePhoton::ClearShowers(){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index 63e5e7c0b..d61ad914c 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -1,5 +1,3 @@ -#include "SinglePhoton_module.h" - namespace single_photon { void SinglePhoton::ClearSlices(){ @@ -238,7 +236,7 @@ namespace single_photon primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); //primaryToSliceIdMap[pfp] = temp_ind; sliceIdToNuScoreMap[temp_ind] = temp_score; - if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()<Self()<<" at slice Index "< 0){ @@ -309,10 +307,11 @@ namespace single_photon //store original pfp and it's slice id if(slice_id < 0 ){ - if(m_is_verbose)std::cout<<"no matching slice found for this PFP with primary id "<Self()<Self()<Self()<<"pdg: ("<PdgCode()<<") at slice "<Self()<Self()<<", isNeutrino = "<Self()<<", isNeutrino = "<, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){} std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); @@ -776,7 +777,6 @@ namespace single_photon //std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); - /* for(unsigned int i= 0; i, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap){ - - std::vector matched_reco_slice_shower_overlay_fraction; - std::vector> matched_reco_slice_shower_MCP; - //std::vector matched_reco_slice_track_matched; - std::vector> matched_reco_slice_track_MCP; - - - //first check if in the event there's a match to a given signal - if(signal_def == "ncdelta"){ - //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; - // std::cout<<"found sim photon shower with track ID "< 0){ - //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); - matched_reco_slice_shower_MCP.push_back(mcp); - - //save the overlay fraction and whether it's matched - matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); - //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; - - if (m_sim_track_matched[k] > 0){ - if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ - - matched_reco_slice_track_MCP.push_back(mcp); - - // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); - - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ - //get the recob shower - art::Ptr this_shr; - for(auto pair: showerToMCParticleMap){ - if (pair.second == mcp){ - this_shr = pair.first; - } - } - art::Ptr this_pfp; - if(!this_shr.isNull()){ - this_pfp = showerToPFParticleMap[this_shr]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ - //get the recob track - art::Ptr this_trk; - for(auto pair: trackToMCParticleMap){ - if (pair.second == mcp){ - this_trk = pair.first; - } - } - art::Ptr this_pfp; - if(!this_trk.isNull()){ - this_pfp = trackToNuPFParticleMap[this_trk]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()< matched_reco_slice_shower_overlay_fraction; +// std::vector> matched_reco_slice_shower_MCP; +// //std::vector matched_reco_slice_track_matched; +// std::vector> matched_reco_slice_track_MCP; +// +// +// //first check if in the event there's a match to a given signal +// if(signal_def == "ncdelta"){ +// //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; +// // std::cout<<"found sim photon shower with track ID "< 0){ +// //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); +// matched_reco_slice_shower_MCP.push_back(mcp); +// +// //save the overlay fraction and whether it's matched +// matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); +// //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; +// +// if (m_sim_track_matched[k] > 0){ +// if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ +// +// matched_reco_slice_track_MCP.push_back(mcp); +// +// // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); +// +// +// std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ +// //get the recob shower +// art::Ptr this_shr; +// for(auto pair: showerToMCParticleMap){ +// if (pair.second == mcp){ +// this_shr = pair.first; +// } +// } +// art::Ptr this_pfp; +// if(!this_shr.isNull()){ +// this_pfp = showerToPFParticleMap[this_shr]; +// } +// +// //get the slice +// if(!this_pfp.isNull()){ +// for(auto pair :allPFPSliceIdVec){ +// art::Ptr pfp = pair.first; +// if (this_pfp == pfp){ +// if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); +// } +// } +// } else{ +// if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ +// //get the recob track +// art::Ptr this_trk; +// for(auto pair: trackToMCParticleMap){ +// if (pair.second == mcp){ +// this_trk = pair.first; +// } +// } +// art::Ptr this_pfp; +// if(!this_trk.isNull()){ +// this_pfp = trackToNuPFParticleMap[this_trk]; +// } +// +// //get the slice +// if(!this_pfp.isNull()){ +// for(auto pair :allPFPSliceIdVec){ +// art::Ptr pfp = pair.first; +// if (this_pfp == pfp){ +// if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); +// } +// } +// } else{ +// if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<,double> p1, const std::pair, double> p2){ return (p1.second < p2.second); diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index dfe055ed8..f920f4dcd 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,8 +1,9 @@ #include "SinglePhoton_module.h" +#include "Libraries/reco_truth_matching.h" +//#include "analyze_Template.h" #include "Libraries/analyze_OpFlashes.h" #include "Libraries/analyze_Tracks.h" #include "Libraries/analyze_Showers.h" -//#include "analyze_Template.h" #include "Libraries/analyze_MCTruth.h" #include "Libraries/analyze_EventWeight.h" #include "Libraries/analyze_Slice.h" @@ -373,18 +374,16 @@ namespace single_photon // Produce two PFParticle vectors containing final-state particles: // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis - std::vector< art::Ptr > crParticles; std::vector< art::Ptr > nuParticles; - std::cout<<"CHECK "<<__LINE__<<" sort out neutrinos among PFParticles"< > crParticles; this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); //CHECK potential upgrade: // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? //if not running over neutrino slice only, use all pfp's in event - if (m_run_all_pfps ==true){ - nuParticles = pfParticleVector; - } + if (m_run_all_pfps ==true) nuParticles = pfParticleVector; + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); //Track Calorimetry. Bit odd here but bear with me, good to match and fill here + //Keng, use pandoraCalo to get the correct Calorimetry; art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); std::map, std::vector> > trackToCalorimetryMap; //So a cross check @@ -681,14 +681,15 @@ namespace single_photon std::map,double> PFPToTrackScoreMap; std::map sliceIdToNumPFPsMap; - std::cout<<"\nSinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); + std::cout<<"Finish AnalyzeSlices.\n"<Self()<Self()<<"th pfp in nuslice w. Pdgcode "<PdgCode()<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); @@ -788,7 +789,7 @@ namespace single_photon //******************************* Showers **************************************************************/ //******************************* Showers **************************************************************/ - std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap, trigger_offset(detClocks), theDetector); @@ -885,17 +886,17 @@ namespace single_photon //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); //photoNuclearTesting(matchedMCParticleVector); - std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); - std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); @@ -928,6 +929,7 @@ namespace single_photon std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); if (m_print_out_event){ if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ @@ -1015,7 +1017,6 @@ namespace single_photon - //******************************* Isolation (SSV precursor) **************************************************************/ //******************************* Isolation (SSV precursor) **************************************************************/ if(!m_run_all_pfps && ! m_run_pi0_filter) this->IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); @@ -1024,9 +1025,6 @@ namespace single_photon // ################################################### SEAview SEAview ######################################################### - // ################################################### SEAview SEAview ######################################################### - - // ################################################### Proton Stub ########################################### // ------------- stub clustering --------------------------- std::cout << "----------------- Stub clustering --------------------------- " << std::endl; @@ -1409,7 +1407,7 @@ namespace single_photon int found = 0; //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; // Check if this particle is identified as the neutrino @@ -1815,15 +1813,14 @@ namespace single_photon vertex->XYZ(xyz); n_vert++; - //std::cout<<"Vertex!"<<"\t "< tmp = {xyz[0],xyz[1],xyz[2]}; - m_reco_vertex_in_SCB = 0;//CHECK this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = 0;//CHECK this->distToTPCActive(tmp); + m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); //CHECK // if(!m_run_pi0_filter){ // m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); @@ -1858,12 +1855,16 @@ namespace single_photon } + + //Classify PFParticles into crParticles or nuParticles. void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) { + if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\tSort out PFPParticles."< pParticle(it->second); @@ -1877,18 +1878,18 @@ namespace single_photon // Check if this particle is identified as the neutrino const int pdg(pParticle->PdgCode()); // const bool isNeutrino = (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - const bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); + //CHECK + bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); //const bool isNeutrino = (std::abs(pdg) == 14 ); // If it is, lets get the vertex position if(isNeutrino){ - if(found>0){ - std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not good but ok."<0){ + std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not good but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<GetVertex(pfParticlesToVerticesMap, pParticle ); } @@ -1915,7 +1916,8 @@ namespace single_photon nuParticles.push_back(pfParticleMap.at(daughterId)); } } - std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\t Found "<CollectSimChannels(evt, label, simChannelVector); this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); // CHECK -// lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); -// lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + //Collect the links from reconstructed hits to their true energy deposits. + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); + //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); } diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 72543b9bd..73be61452 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -8,7 +8,7 @@ singlephoton_analyzer:{ TrackLabel: "pandoraTrack" ShowerLabel: "pandoraShower" ParticleIDLabel:"pandoraSCEPid" - CaloLabel: "pandoraSCECalo" + CaloLabel: "pandoraCalo" FlashLabel: "opflashtpc0" POTLabel: "generator" @@ -18,7 +18,7 @@ singlephoton_analyzer:{ input_param: "optional" - Verbose: false + Verbose: true runSEAviewShower: true SEAviewShowerHitThreshold: 25 diff --git a/sbncode/SinglePhotonAnalysis/ref/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/ref/CMakeLists.txt deleted file mode 100644 index d34d1e075..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) - -art_make( BASENAME_ONLY - LIB_LIBRARIES - ubraw_RawData - ubobj_Trigger - larcorealg_Geometry - larcore_Geometry_Geometry_service - ubana_BasicTool_GeoAlgo - lardata_Utilities - larevt_Filters - larpandoraobj - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larsim_MCCheater_ParticleInventoryService_service - larpandora_LArPandoraInterface - ubana_SinglePhotonAnalysis_SEAview - ${PANDORASDK} - ${PANDORAMONITORING} - LArPandoraContent - nusimdata_SimulationBase - ${UB_DATA_TYPES} - ${Boost_SERIALIZATION_LIBRARY} - nutools_RandomUtils_NuRandomService_service - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} - MODULE_LIBRARIES - ubraw_RawData - larcorealg_Geometry - larcore_Geometry_Geometry_service - ubana_BasicTool_GeoAlgo - lardata_Utilities - larevt_Filters - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larpandora_LArPandoraInterface - SignalShapingServiceMicroBooNE_service - nusimdata_SimulationBase - ubana_LEEPhotonAnalysis - ubana_SinglePhotonAnalysis_SEAview - ${UB_DATA_TYPES} - ${Boost_SERIALIZATION_LIBRARY} - nutools_RandomUtils_NuRandomService_service - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} ) - -add_subdirectory(SEAview) -add_subdirectory(job) -install_headers() -install_fhicl() -install_source() diff --git a/sbncode/SinglePhotonAnalysis/ref/DBSCAN.h b/sbncode/SinglePhotonAnalysis/ref/DBSCAN.h deleted file mode 100644 index d9a83488b..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/DBSCAN.h +++ /dev/null @@ -1,149 +0,0 @@ -/** - * \file DBSCAN.h - * - * - * \brief Class def header for a class DBSCAN - * - * @author mark ross-lonergan markrl@nevis.columbia.edu - * Written 20th May 2019. - */ - -#ifndef DBSCAN_H -#define DBSCAN_H - -#include -#include -#include -#include -#include -#include - - -class DBSCAN{ - - public: - double m_eps; - int m_minpts; - - /// constructor - DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - - /// Default destructor - // Guanqun: probably not needed - ~DBSCAN(){} - - // scan over points, and group them into different clusters - std::vector Scan2D(std::vector> &pts); - // grab neighbours of point i. - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - // merge neighbours in seed and pts together into seed - int UnionSets(std::vector> &seed, std::vector> &pts); -}; - -std::vector DBSCAN::Scan2D(std::vector> &pts){ - - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - this->UnionSets(seed_set, new_neighbours); - } - } - } - return label; - -} - - - -std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; - - //VERY simple, will update soon to a DB - - - for(size_t ip=0; ip p = pts[ip]; - - double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); - - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - - } - } - return neighbours; -} - - -int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - - //VERY simple, will update soon if it works - for(auto &p:pts){ - - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } - - } - - - - return 0; -} - - -#endif diff --git a/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc b/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc deleted file mode 100644 index 58f00d8eb..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/NCRadiativeResonant_module.cc +++ /dev/null @@ -1,207 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// Class: NCRadiativeResonant -// Plugin Type: filter (art v2_05_00) -// File: NCRadiativeResonant_module.cc -// -// Generated at Fri Jun 23 10:33:44 2017 by Robert Murrells using cetskelgen -// from cetlib version v1_21_00. -//////////////////////////////////////////////////////////////////////// - - -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Principal/Run.h" -#include "art/Framework/Principal/SubRun.h" -#include "canvas/Utilities/InputTag.h" -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" - - -#include "art/Framework/Services/Optional/TFileService.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Optional/TFileDirectory.h" - -#include "nusimdata/SimulationBase/MCTruth.h" - -#include "TTree.h" - -#include - -class NCRadiativeResonant : public art::EDFilter { - - TTree * ftree; - - int frun; - int fsubrun; - int fevent; - int fnu_pdg; - int fccnc; - int fmode; - int finteraction_type; - int fis_nc_delta_radiative; - int fparent_status_code; - int fparent_pdg; - -public: - explicit NCRadiativeResonant(fhicl::ParameterSet const & p); - - NCRadiativeResonant(NCRadiativeResonant const &) = delete; - NCRadiativeResonant(NCRadiativeResonant &&) = delete; - NCRadiativeResonant & operator = (NCRadiativeResonant const &) = delete; - NCRadiativeResonant & operator = (NCRadiativeResonant &&) = delete; - - void cout_stuff(art::Event & e, bool passed); - void FillTree(art::Event & e, - size_t const mct_index, - size_t const parent_index, - bool const is_nc_delta_radiative); - void Reset(); - bool filter(art::Event & e) override; - -}; - - -NCRadiativeResonant::NCRadiativeResonant(fhicl::ParameterSet const & p) : - ftree(nullptr) { - - if(true) { - - art::ServiceHandle tfs; - ftree = tfs->make("NCRadiativeResonantFilter", ""); - - ftree->Branch("run", &frun, "run/I"); - ftree->Branch("subrun", &fsubrun, "subrun/I"); - ftree->Branch("event", &fevent, "event/I"); - ftree->Branch("nu_pdg", &fnu_pdg, "nu_pdg/I"); - ftree->Branch("ccnc", &fccnc, "ccnc/I"); - ftree->Branch("mode", &fmode, "mode/I"); - ftree->Branch("is_nc_delta_radiative", &fis_nc_delta_radiative, "is_nc_delta_radiative/I"); - ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); - ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); - - } - -} - - -void NCRadiativeResonant::cout_stuff(art::Event & e, bool passed = false) { - - art::ValidHandle> const & ev_mct = - e.getValidHandle>("generator"); - - std::cout << passed << "\n" - << "==========================\n"; - for(simb::MCTruth const & mct : *ev_mct) { - std::cout << "----------------------------\n"; - for(int i = 0; i < mct.NParticles(); ++i) { - simb::MCParticle const & mcp = mct.GetParticle(i); - std::cout <<"FULL: "<< mcp.TrackId() << " " << mcp.PdgCode() << " " << mcp.Mother() << " " << mcp.StatusCode() << "\n"; - } - } - -} - - -void NCRadiativeResonant::Reset() { - - frun = -1; - fsubrun = -1; - fevent = -1; - fnu_pdg = 0; - fccnc = -1; - fmode = -2; - finteraction_type = -2; - fis_nc_delta_radiative = -1; - fparent_status_code = -1; - fparent_pdg = 0; - -} - - -void NCRadiativeResonant::FillTree(art::Event & e, - size_t mct_index, - size_t const parent_index, - bool const is_nc_delta_radiative) { - - Reset(); - - frun = e.id().run(); - fsubrun = e.id().subRun(); - fevent = e.id().event(); - - art::ValidHandle> const & ev_mct = - e.getValidHandle>("generator"); - simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); - - fnu_pdg = mcn.Nu().PdgCode(); - fccnc = mcn.CCNC(); - fmode = mcn.Mode(); - finteraction_type = mcn.InteractionType(); - - fis_nc_delta_radiative = is_nc_delta_radiative; - if(parent_index != SIZE_MAX) { - fparent_status_code = ev_mct->at(mct_index).GetParticle(parent_index).StatusCode(); - fparent_pdg = ev_mct->at(mct_index).GetParticle(parent_index).PdgCode(); - } - - ftree->Fill(); - -} - - -bool NCRadiativeResonant::filter(art::Event & e) { - - art::ValidHandle> const & ev_mct = - e.getValidHandle>("generator"); - - cout_stuff(e,true); - - for(size_t i = 0; i < ev_mct->size(); ++i) { - - simb::MCTruth const & mct = ev_mct->at(i); - if(mct.GetNeutrino().CCNC() != 1) continue; - - std::vector exiting_photon_parents; - for(int i = 0; i < mct.NParticles(); ++i) { - simb::MCParticle const & mcp = mct.GetParticle(i); - if(mcp.TrackId() != i) { - std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; - exit(1); - } - if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; - exiting_photon_parents.push_back(mcp.Mother()); - } - - std::vector in_nucleus_photons; - for(size_t const s : exiting_photon_parents) { - simb::MCParticle const & mcp = mct.GetParticle(s); - if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) { - if(ftree) FillTree(e, i, mcp.PdgCode(), true); - std::cout<<"YES: "< -#include - -namespace seaview{ - - int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ - - const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); - bool found_hit_in_slice = false, found_hit_not_in_slice = false; - for(auto hit : f_hits){ - auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); - if( iter == slice_hits.end()) - found_hit_not_in_slice = true; - else{ - found_hit_in_slice = true; - } - - if(found_hit_in_slice && found_hit_not_in_slice) return 0; - } - - return found_hit_in_slice ? 1 : -1; - } - - void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ - - //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC - double max_ioc_to_shower_start = DBL_MIN; - size_t num_hits = cl.f_hits.size(); - - - for(size_t i = 0; i!= num_hits; ++i){ - auto &h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - //geometric properties - double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); - double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); - double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; - cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); - cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); - - //remember two hits with min/max IOC - if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ - cl.f_min_ioc_to_shower_start = ioc_to_shower_start; - cl.start_hit_idx = i; - } - if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. - max_ioc_to_shower_start = ioc_to_shower_start; - cl.end_hit_idx = i; - } - - - } //end of hit loop - - - // second round: group hits in two categories, first half and second half - // get the direction of the cluster - auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); - std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; - std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; - std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; - std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; - cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); - - cl.f_hit_group.resize(num_hits); - for(size_t i = 0; i!=num_hits; ++i){ - auto h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; - - if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ - cl.f_hit_group[i] = 1; - cl.f_mean_ADC_first_half += h->SummedADC(); - } - else{ - cl.f_hit_group[i] = 2; - cl.f_mean_ADC_second_half += h->SummedADC(); - } - } - cl.f_track_treated = true; - - size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); - size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); - if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; - if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; - cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); - - if( num_hits < 2){ - std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; - return; - } - - //angle between the track cluster and the shower direction - //cluster direction unit vector - double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); - std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; - //shower direction unit vector - double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); - std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; - //angle between two unit vector, in radian - cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); - - - if(cl.f_score.min_wire == cl.f_score.max_wire){ - std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; - return; - } - //fit to wire-tick plot of the cluster, see how straight cluster is - TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); - //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); - //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - if(fit_status == 0){ - //f1 = graph_copy->GetFunction("f1"); - f1 = cl.f_graph.GetFunction("f1"); - cl.f_fit_chi2 = f1->GetChisquare(); - } - //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; - } - - - // constructor - SEAviewer::SEAviewer(std::string intag, geo::GeometryCore const * ingeom, detinfo::DetectorProperties const * intheDetector ): tag(intag), geom(ingeom), theDetector(intheDetector){ - chan_max = {-9999,-9999,-9999}; - chan_min = {9999,9999,9999}; - tick_max = -99999; - tick_min = 99999; - - plot_true_vertex = false; - vertex_tick.resize(3); - vertex_chan.resize(3); - vertex_graph.resize(3); - - true_vertex_tick.resize(3); - true_vertex_chan.resize(3); - true_vertex_graph.resize(3); - - tick_shift = 350; - chan_shift = 100; - - n_showers=0; - n_pfps = 0; - has_been_clustered = false; - hit_threshold = -10; - - rangen = new TRandom3(0); //same seed everytime - } - - - int SEAviewer::setBadChannelList(std::vector> &in){ - m_bad_channel_list = in; - return 0; - } - - int SEAviewer::addHitsToConsider(std::vector>& hits){ - for(auto &h: hits){ - map_unassociated_hits[h] = true; - map_considered_hits[h] = true; - } - return 0; - } - - int SEAviewer::filterConsideredHits(double dist_to_vertex){ - - //collect all hits that are under consideration for clustering - std::vector> current_hits; - for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ - current_hits.push_back(map_iter->first); - } - - //remove hits that are too far from vertex - for(auto &h: current_hits){ - int p = h->View(); - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); - - if(dist > dist_to_vertex){ - map_unassociated_hits.erase(h); - map_considered_hits.erase(h); - } - } - return 0; - } - - int SEAviewer::setHitThreshold(double h){ - hit_threshold = h; - return 0; - } - int SEAviewer::addAllHits(std::vector>& hits){ - - std::vector> vec_tick(3); - std::vector> vec_chan(3); - - for(auto&h: hits){ - if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - //tick_max = std::max(tick_max, (double)h->PeakTime()); - //tick_min = std::min(tick_min, (double)h->PeakTime()); - //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - } - - for(int i=0; i<3; i++){ - vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph - } - - vec_all_ticks = vec_tick; - vec_all_chans = vec_chan; - - return 0; - } - - std::vector SEAviewer::calcUnassociatedHits(){ - int n_unassoc=0; - int n_below_thresh = 0; - std::vector> vec_tick(3); - std::vector> vec_chan(3); - std::vector>> vec_pts(3); - std::vector>> vec_hits(3); - - - int n_all =map_considered_hits.size(); - - for(const auto &pair: map_considered_hits ){ - auto& h = pair.first; //type of h: recob::Hit - if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ - - if(h->SummedADC() < hit_threshold){ - n_below_thresh++; - continue; - } - - // if summed ADC of the hit passes threshold - n_unassoc++; - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back(tick); - - vec_pts[(int)h->View()].push_back({wire,tick}); - vec_hits[(int)h->View()].push_back(h); - tick_max = std::max(tick_max, tick); - tick_min = std::min(tick_min, tick); - //chan_max, chan_min stores: max, min unassociated channel for each plane - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - } - - } - - for(int i=0; i<3; i++){ - vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } - - vec_unass_ticks = vec_tick; - vec_unass_chans = vec_chan; - vec_unass_pts = vec_pts; - vec_unass_hits = vec_hits; - - return {n_all,n_unassoc,n_below_thresh}; - } - - - int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ - n_pfps++; - - format_legend(legend, arg1, arg2, arg3); - - vec_pfp_legend.push_back(legend); - - std::vector> vec_tick(3); - std::vector> vec_chan(3); - - for(auto &h: hits){ - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - //remove from unassociated hits - map_unassociated_hits[h] = false; - } - - std::vector t_graphs; - for(int i=0; i<3; i++){ - t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } - vec_graphs.push_back(t_graphs); - vec_ticks.push_back(vec_tick); - vec_chans.push_back(vec_chan); - return 0; - } - - int SEAviewer::addShower(art::Ptr&shr){ - n_showers++; - - vec_showers.push_back(shr); - - return 0; - } - - int SEAviewer::addTrack(art::Ptr&trk){ - n_tracks++; - - vec_tracks.push_back(trk); - - return 0; - } - - - std::vector> SEAviewer::to2D(std::vector & threeD){ - - auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - std::vector> ans(3); - - for(int i=0; i<3; i++){ - double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); - double time = calcTime(threeD[0], i, fTPC,fCryostat, *theDetector); - - ans[i] = {wire,time}; - } - - return ans; - } - - - - int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - for(int i=0; i<3; i++){ - - // use vector here, so that to plot the single point using TGraph - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; - - vertex_tick[i] = time[0]; - vertex_chan[i] = wire[0]; - - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); - - TGraph gtmp(1, &wire[0], &time[0]); - vertex_graph[i] = gtmp; - } - - return 0; - } - - - int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - - plot_true_vertex = true; - - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - for(int i=0; i<3; i++){ - - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, *theDetector)}; - - true_vertex_tick[i] = time[0]; - true_vertex_chan[i] = wire[0]; - - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); - - TGraph gtmp(1, &wire[0], &time[0]); - true_vertex_graph[i] = gtmp; - } - - return 0; - } - - - int SEAviewer::Print(double plot_distance){ - - - std::string print_name = "SEAview_"+tag; - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); - can->Divide(4,1,0,0.1); - - double plot_point_size=0.4; - - //******************************* First plot "Vertex" *************************************** - - //Calculate some things - //Guanqun: what does tick_min - tick_shift actually mean? - double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; - double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; - //double real_tick_min = tick_min-tick_shift ; - //double real_tick_max = tick_max+tick_shift ; - - - std::vector real_wire_min(3); //real x axis edges for 3 planes - std::vector real_wire_max(3); - - for(int i=0; i<3; i++){ - TPad * pader = (TPad*)can->cd(i+1); - - if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); - - //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) - real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; - real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; - - //fix the area to show, always show area large enough to hold all track/showers - //real_wire_min[i] = chan_min[i]-chan_shift ; - //real_wire_max[i] = chan_max[i]+chan_shift ; - - vertex_graph[i].SetMarkerStyle(29); - vertex_graph[i].SetMarkerSize(2); - vertex_graph[i].SetMarkerColor(kMagenta-3); - vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); - vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); - vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); - vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); - vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - vertex_graph[i].Draw("ap"); - - if(i>0){ - vertex_graph[i].GetYaxis()->SetLabelOffset(999); - vertex_graph[i].GetYaxis()->SetLabelSize(0); - } - } - - /********************************* Non Slice Hits ****************************/ - - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - vec_all_graphs[i].Draw("p same"); - vec_all_graphs[i].SetMarkerColor(kGray); - vec_all_graphs[i].SetFillColor(kWhite); - vec_all_graphs[i].SetMarkerStyle(20); - vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); - } - } - - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< m_bad_channel_list.size(); i++){ - int badchan = m_bad_channel_list[i].first; - int ok = m_bad_channel_list[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - - if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ - //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){ - can->cd(thisp+1); - TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); - //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); - l->SetLineColor(kGray+1); - l->Draw("same"); - //can->cd(thisp+5);// Guanqun: how many values can plane ID take? - //l->Draw("same"); - //can->cd(thisp+9); - //l->Draw("same"); - } - } - - - ///******************************** Plotting all PFP's *********************************8 - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - - if(n_pfps > (int)tcols.size()){ - for(int i =0; i< (int)(n_pfps +2); i++){ - //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - tcols.push_back(kRed); - } - } - - - for(int p=0; pcd(i+1); - if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_graphs[p][i].Draw("p same"); - vec_graphs[p][i].SetMarkerColor(tcol); - vec_graphs[p][i].SetFillColor(tcol); - vec_graphs[p][i].SetMarkerStyle(20); - vec_graphs[p][i].SetMarkerSize(plot_point_size); - } - } - } - - - //Plot all Shower lines. Might need a bit of work here.. - std::vector lines; - - for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - - //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); - - for(int i=0; i<3; i++){ - //std::cout<cd(i+1); - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; - - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; - - double x2_plot; - if(other_pt[i][0]cd(i+1); - TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); - lines.push_back(l); - l->SetLineColorAlpha(tcols[s],0.5); - l->SetLineWidth(1); - l->SetLineStyle(2); - l->Draw(); - - } - - } - - /********************************* Unassociated Hits ****************************/ - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_unass_graphs[i].Draw("p same"); - vec_unass_graphs[i].SetMarkerColor(kBlack); - vec_unass_graphs[i].SetFillColor(kBlack); - vec_unass_graphs[i].SetMarkerStyle(20); - vec_unass_graphs[i].SetMarkerSize(plot_point_size); - } - } - - /******************************* Clustered Hits ***********************************/ - // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. - if(has_been_clustered){ - - std::vector cluster_colors(vec_clusters.size()+1,0); - std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; - - for(size_t j=0; j< vec_clusters.size()+1; j++){ - int b = (int)rangen->Uniform(0,11); - int mod = (int)rangen->Uniform(-10,+3); - - cluster_colors[j] = base_col[b]+mod; - } - int c_offset = 0; - - for(auto &c: vec_clusters){ - int pl = c.getPlane(); - can->cd(pl+1); - if (c.getGraph()->GetN()>0){ - c.getGraph()->Draw("p same"); - c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); - c.getGraph()->SetFillColor(cluster_colors[c_offset]); - c.getGraph()->SetMarkerStyle(20); - //c.getGraph()->SetMarkerSize(plot_point_size); - c.getGraph()->SetMarkerSize(plot_point_size*1.5); - //std::cout<<"Printing cluster "<cd(i+1); - vertex_graph[i].Draw("p same"); - - double rad_cm = 12.0; - TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); - ell_p.SetLineColor(kRed); - ell_p.SetFillStyle(0); - ell_p.Draw("same"); - } - - //**************************** INFO ***************************/ - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - /*TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - */ - TLegend l_top(0.1,0.0,0.9,1.0); - l_top.SetTextSize(0.05); - - for(int p=0; p0){ - l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][1].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][2].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); - } - - } - - // draw legend for clustered hits if there is any - for(const auto &cluster : vec_clusters){ - - // only consider clusters that are second shower candidates - if(cluster.getLegend().empty()) continue; - - // if the cluster is out of the plotting range, do not include it in the legend - if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ - l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); - } - } - - l_top.SetHeader(print_name.c_str(),"C"); - l_top.SetLineWidth(0); - l_top.SetLineColor(kWhite); - l_top.Draw("same"); - - - - can->Update(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); - - - return 0; - } - - int SEAviewer::runseaDBSCAN(double min_pts, double eps){ - - has_been_clustered = true; - num_clusters = {0,0,0}; - cluster_labels.resize(3); - - for(int i=0; i<3; i++){ - - std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; - std::vector> hitz; - - - for(size_t p=0; p< vec_unass_pts[i].size(); p++){ - if(cluster_labels[i][p] == 0) continue;//noise - if(cluster_labels[i][p] == c){ - - t_pts.push_back(vec_unass_pts[i][p]); - hitz.push_back(vec_unass_hits[i][p]); - } - - } - - if(hitz.size()!=0){ - std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - - - // Grab the shower start and shower direction - std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); - - - - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ - - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); - - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); - - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - vec_clusters[c].setShowerRemerge(is_in_shower); - - std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); - std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - - /* - std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); - for(size_t c=0; c< vec_clusters.size(); c++){ - //Loop over all hits in this clusters - for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ - int n2_hits = vec_clusters[c2].getHits().size(); - int n2_matched = 0; - if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane - for(auto &h : vec_clusters[c].getHits()){ - //get time spread of this hit. - double pp = h->PeakTimePlusRMS(1.0); - double pm = h->PeakTimeMinusRMS(1.0); - for(auto &h2 : vec_clusters[c2].getHits()){ - if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; - } - } - percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; - std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); - - - - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ - - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); - - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - - std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); - std::cout<0){ - - - TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); - - int Npts = 20; - //TODO need to write this function - TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); - - core->Draw("p same"); - tmp->Draw("p same"); - - double fmax = -999; - double fmin = 99999; - for(int b=0; bGetN(); b++){ - double ttx=0; - double tty=0; - core->GetPoint(b,ttx,tty); - fmax = std::max(fmax, ttx); - fmin = std::min(fmin,ttx); - } - - //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad - con = core->GetFunction("pol1")->GetParameter(0); - slope = core->GetFunction("pol1")->GetParameter(1); - } - - double impact_parameter = 1e10; - - //rudimentary! - for(double k=chan_min[pl]; k< chan_max[pl];k++){ - double y = slope*k+con; - double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); - impact_parameter = std::min(impact_parameter,dist); - } - - //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower - //vertex_wire[i] vertex_tick[i] (already calcuated) - //cluster closest point )ssscorz.close_wire and close_tick - //recob::Shower start point, convered to wire tick. - std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; - std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; - double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); - double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); - double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); - - - std::cout<<"SSSNEW "<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - - std::vector> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); - - for(int i=0; i<3; i++){ - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; - - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; - - double x2_plot; - if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; - double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); - - if(dist< min_d){ - min_p = (int)p; - min_d = dist; - } - } - - } - - - - } - - } - */ - - return {0}; - - - } - - double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ - // convert {wire, tick} coordinate to [cm, cm] coordinate - double x1 =X1.at(0)*wire_con; - double y1 =X1.at(1)*tick_con; - - double x2 =X2.at(0)*wire_con; - double y2 =X2.at(1)*tick_con; - - double x0 =point.at(0)*wire_con; - double y0 =point.at(1)*tick_con; - - double x10 = x1-x0; - double y10 = y1-y0; - - double x21 = x2-x1; - double y21 = y2-y1; - - double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); - - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); - - - return sqrt(d2); - - } - - cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - cluster_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; - - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; - - score.pass = true; - - // ************* Some simple metrics relative to study point (usually vertex) *************** - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; - - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; - - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; - - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; - - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; - - score.n_wires = 0; - score.n_ticks = 0; - - score.impact_parameter = -99; - - score.close_tick = -99; - score.close_wire = -99; - - std::map wire_count; - std::map tick_count; - - - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - score.mean_wire += h_wire; - score.mean_tick += h_tick; - - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); - - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); - - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); - - //wierd dits - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } - - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); - - - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); - - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - - } - - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; - - score.mean_dist = score.mean_dist/(double)score.n_hits; - - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA - - - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; - - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); - - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); - - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } - - - - - delete principal; - - return score; - } - - int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error - std::vector> showerhits = pfParticleToHitsMap.at(pfp); - - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - - for(auto &sh: showerhits){ - - if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? - - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); - - double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); - - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } - - } - - } // end of hitz loop - - if(in_primary_shower){ - return (int)s; - } - } - - - return -1; - } - - - - TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ - - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; - - std::vectorall_wire; - std::vectorall_tick; - std::vectorall_dist; - - - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - // sorted_in has indices of elements in all_dist in descending order - std::vector sorted_in = seaview_sort_indexes(all_dist); - size_t max_e = std::min((size_t)Npts,hitz.size()); - - for(size_t i =0; i>& hitz = cl.getHits(); - cl.f_ADC_hist.StatOverflows(kTRUE); - - for(auto& h : hitz){ - cl.f_ADC_hist.Fill(h->SummedADC()); - } - - cl.f_meanADC = cl.f_ADC_hist.GetMean(); - cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); - return; - } - - - - void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ - - //grab the plane number, and impact parameter of the cluster - int plane = vec_clusters.at(cluster).getPlane(); - double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); - - //need to use stringstream to control the number of digits.. - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << energy; - ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; - ss3 << std::setprecision(2) << std::fixed << overlay_fraction; - - std::string legend; - //add the truth information to the legend if the cluster is matched to a MCParticle - if(is_matched == 1){ - legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " - + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " - + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; - } - else{ - legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); - } - vec_clusters.at(cluster).setLegend(legend); - } - - - void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << arg1; - ss2 << std::setprecision(2) << std::fixed << arg2; - ss3 << std::setprecision(1) << std::fixed << arg3; - - if(leg == "Shower"){ - leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " - + ss3.str() + " impact par.}"; - //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; - - }else{ - //for tracks, 3rd argument is not used - leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; - } - } - -} diff --git a/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h b/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h deleted file mode 100644 index 6e8df27fc..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/SEAview/SEAviewer.h +++ /dev/null @@ -1,453 +0,0 @@ -#ifndef SEAVIEWER_H -#define SEAVIEWER_H - -#include - -#include "art/Framework/Core/EDProducer.h" -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Principal/Run.h" -#include "art/Framework/Principal/SubRun.h" -#include "canvas/Utilities/InputTag.h" -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include - -#include - -#include "larevt/SpaceChargeServices/SpaceChargeService.h" -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" -#include "larcore/Geometry/Geometry.h" - -#include "canvas/Utilities/ensurePointer.h" -#include "canvas/Persistency/Common/FindManyP.h" -#include "canvas/Persistency/Common/FindMany.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "canvas/Persistency/Common/FindOne.h" - -#include "TCanvas.h" -#include "TGraph.h" -#include "TFile.h" -#include "TAxis.h" -#include "TLine.h" -#include "TLatex.h" -#include "TLegend.h" -#include "TPrincipal.h" -#include "TFitResultPtr.h" -#include "TVectorD.h" -#include "TMatrixD.h" -#include "TF1.h" -#include "TH1D.h" -#include "TEllipse.h" -#include "TRandom3.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "seaDBSCAN.h" -namespace seaview { - - class SEAviewer; - - template - std::vector seaview_sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); //fill the range with sequentially increasing values - - // sort indexes based on comparing values in v (descending order) - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - - return idx; - } - - - - struct cluster_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; /* number of wires spanned by the cluster */ - int n_ticks; /* number of ticks spanned by the cluster */ - - bool pass; - - cluster_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of cluster_score class - - - - - class cluster { - friend class SEAviewer; - public: - - - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){ - - f_npts = f_pts.size(); - if(pts.size() != hits.size()){ - std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts, &wires[0], &ticks[0]); - f_graph = af_graph; - - }; - int setScore(cluster_score &in_score){ f_score = in_score;return 0;} - void setLegend(const std::string &in_leg){ - f_legend = in_leg; - } - - void setWireTickBasedLength( double d) { f_wire_tick_based_length = d;} - double getWireTickBasedLength() const {return f_wire_tick_based_length; } - bool isTrackAnalyzed() const {return f_track_treated; } - cluster_score * getScore(){return &f_score;}; - int getID() const {return f_ID;} - int getPlane() const {return f_plane; } - std::vector> getPTS() const {return f_pts;} - TGraph * getGraph(){ return &f_graph;} - TH1D* getADCHist() {return &f_ADC_hist;} - const TGraph * getGraph() const { return &f_graph;} - const std::string &getLegend() const {return f_legend; } - const std::vector>& getHits(){return f_hits;} - int getShowerRemerge() const {return f_shower_remerge;} - int setShowerRemerge(int remerge_in){ - f_shower_remerge = remerge_in; - return f_shower_remerge; - } - double getMeanADC() const { return f_meanADC; } - double getADCrms() const {return f_ADC_RMS;} - - //----------------------- second-shower relatd function ----------------------- - void setImpactParam(double d) {f_ImpactParameter = d; } - - /* brief: set the angle between direction of second shower candidate cluster and direction of the primary shower*/ - void setAngleWRTShower(double d) {f_AngleWRTShower = d;} - void setFitSlope(double d) { f_FitSlope = d;} - void setFitCons(double d) { f_FitCons = d;} - double getAngleWRTShower() const {return f_AngleWRTShower;} - double getFitSlope() const {return f_FitSlope; } - double getFitCons() const {return f_FitCons;} - double getImpactParam() const {return f_ImpactParameter; } - - - // ----------------------- track search related function ----------------------- - double getMinHitImpactParam() const {return f_min_impact_parameter_to_shower; } - double getMinHitConvDist() const { return f_min_conversion_dist_to_shower_start; } - double getMinHitIOC() const {return f_min_ioc_to_shower_start;} - double getIOCbasedLength() const {return f_ioc_based_length; } - size_t getTrackStartIdx() const {return start_hit_idx; } - size_t getTrackEndIdx() const {return end_hit_idx;} - double getMeanADCFirstHalf() const { return f_mean_ADC_first_half; } - double getMeanADCSecondHalf() const {return f_mean_ADC_second_half; } - double getMeanADCRatio() const {return f_mean_ADC_first_to_second_ratio; } - double getTrackAngleToShowerDirection() const {return f_angle_wrt_shower_direction; } - double getLinearChi() const {return f_fit_chi2; } - - /* brief: check if this cluster is fully in given slice or not - * return: 1 -> Fully in given Slice; -1 --> Fully not in given slice; 0: parts in given slices, parts not - */ - int InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID); - - // determine if the cluster is within the plot range - // tick_max, tick_min, wire_max, and wire_min are the edges of the X axis(wire) and Y axis(tick) - bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const{ - return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max; - } - - - private: - int f_ID; - int f_npts; - int f_plane; - bool f_track_treated = false; //boolean indicating whether the hits have been analyzed as track candidate - - std::vector> f_pts; //vector of {wire, tick} pairs of all the hits - std::vector> f_hits; - std::vector f_hit_group; //group the hits in two groups: first half, second half (directionality-wise) - cluster_score f_score; - int f_shower_remerge = -1; //index of the reco shower if the cluseter is close enough to a reco shower, otherwise -1. - TGraph f_graph; //2D {wire, tick} graph - TH1D f_ADC_hist; // histograms of ADC of every hit - std::string f_legend; //legend of the f_graph - - - // -------- track-like properties ------------------------- - - //add a few parameters that are useful to find tracks in no recob::track events - double f_min_impact_parameter_to_shower = 1e10; // mininum impact parameter of hits to the recob::shower direction - // will be default value if the cluster didn't pass cut on ssscore - double f_min_conversion_dist_to_shower_start = 1e10; //minimum distance of hits to the recob::shower start - double f_min_ioc_to_shower_start = 1e10; //minimum ioc of all hits to the recob::shower direction - double f_ioc_based_length = -1.0; // length of the cluster, calculated based on the IOC of hits - double f_wire_tick_based_length = -1.0; - - size_t start_hit_idx = SIZE_MAX; //index of the start hit - size_t end_hit_idx = SIZE_MAX; //index of the end hit - double f_mean_ADC_first_half = 0.0; - double f_mean_ADC_second_half = 0.0; - double f_mean_ADC_first_to_second_ratio = 0.0; - - double f_angle_wrt_shower_direction = -1.0; // angle between the cluster direction and the shower direction, in radian - // for track search, for proton track veto - double f_fit_chi2 = 0.0; //chi2 of the linear fit to the cluster (2D) - double f_ADC_RMS = -1.0; //RMS of the summed ADC of hits - double f_meanADC = -1.0; // mean of hits ADC - - - //-------- shower-like properties ------------------------------- - - double f_ImpactParameter = -1.0; //impact parameter of the vertex wrt to the cluster - double f_FitSlope = 0.0; //slope of the fitted shower/cluster direction - double f_FitCons = 0.0; //intercept of the fitted shower/cluster direction - - double f_AngleWRTShower = -1.0; //angle between cluster-vertex direction and primary_shower_start-vertex direction, assuming cluster and primary shower both point back to the vertex - // specific for second shower search for 1g1p analysis - - }; // end of class cluster - - - class SEAviewer { - - public: - - //constructor - SEAviewer(std::string tag,geo::GeometryCore const * geom,detinfo::DetectorProperties const * theDetector ); - - void configure(const fhicl::ParameterSet& pset){}; - - int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z); - int addTrueVertex(double x, double y,double z); - - /* @brief: add all the given hits to be considered for clustering - * @note: these hits are subject to further selection by filterConsideredHits() before clustering - */ - int addHitsToConsider(std::vector>& hits); - int addAllHits(std::vector>& hits); - - /* @brief: filter given hits before further clustering - only use hits near vertex for clustering - * @param: dist_to_vertex - distance to vertex in cm - */ - int filterConsideredHits(double dist_to_vertex); - - /* @brief: add hits for PFParticles - * @param: leg - legend for this PFParticle, for plotting purposes - * @param: if leg is 'shower', arg1 expects shower energy; arg2 expects conversion distance; arg3 expects impact parameter - * @param: if leg is 'track', arg1 expects track length; arg2 expects PCA; arg3 currently not used - */ - int addPFParticleHits(std::vector>& hits, std::string leg , double arg1 = 0.0, double arg2 = 0.0, double arg3=0.0); - int setBadChannelList(std::vector> &in); - int addShower(art::Ptr&shr); - int addTrack(art::Ptr&trk); - std::vector calcUnassociatedHits(); - int setHitThreshold(double); - int Print(double plot_distance); - int runseaDBSCAN(double min_pts, double eps); - - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - //WireCoordinate returns the index of the nearest wire to the specified position. - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } - - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ - double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } - - /* @brief: given a 3D space point, calculate the [wire, tick] of the point on 3 planes */ - std::vector> to2D(std::vector & threeD); - - - /* @brief: given two points on a line, and another point (in 2D space), calculate the impact parameter - * @param: 3 parameter of std::vector are {wire, tick} vectors - */ - double dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point); - - - //distance between two {wire, tick} points, in cm - double dist_point_point(double w1, double t1, double w2, double t2) const{ - return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); - } - - - //@brief: given a cluster, loop through all its hits, calc and update info on mean ADC, ADC RMS. - void BasicClusterCalorimetry(cluster& cl); - - // @brief: given primary shower, analyze all the clusters in a track-like way with the assumtion that primary shower will point back to the cluster - // @param: vec_c: vector of clusters to be filled - std::vector analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); - - - // @brief: given primary shower, analyze all the clusters, draw them on the canvas, together with fitted direction of the cluseter (with the assumption that the cluster and primary shower both pointing back to the vertex) - // @param: vec_c: vector of clusters to be filled - std::vector analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); - - - // @brief: analyze cluster cl as a track candidate, and save track-related information in the cluster object - // @param: shower_start_pt_2D, shower_other_pt_2D: {wire, tick} coordinate of shower start, and another point on shower direction line, projected to the plane cl is on. - void TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D); - - - // @brief: check if there is a hit in hitz close enought to one of the reco showers, if so return the index of that reco shower - // @param: hitz is usually a cluster of unassociated hits - int SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); - - // Guanqun: @brief: analyze a cluster of hits and summarize its property into an cluster_score - // argument shower is not used in the function body - cluster_score SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); - - //@ brief: as name says, get Npts hits that're nearest from vertex - // return the {wire, tick} info of these hits as a TGraph - TGraph* SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); - - void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction); - - - - //conversion from wire, tick to cm - static constexpr double wire_con = 0.3; - static constexpr double tick_con = 1.0/25.0; - - protected: - - int n_pfps; // num of PFParticles (including shower & track) - int n_showers; //num of showers - int n_tracks; //num of tracks - - std::string tag; - double hit_threshold; - bool has_been_clustered; - // PFP, Plane: index - std::vector> vec_graphs; //vector of graphs of [tick vs. wire] for hits of PFParticles. - - std::vector vec_pfp_legend; //legend for each PFParticle, for plotting purpose - // PFP, Plane: index - std::vector>> vec_ticks; //vector of ticks on each plane for all PFParticles - std::vector>> vec_chans; //vector of wires on each plane for all PFParticle - - geo::GeometryCore const * geom; - detinfo::DetectorProperties const * theDetector ; - - double tick_shift; - double chan_shift; - - double tick_max; //min, max tick of all hits - double tick_min; - std::vector chan_max; //min, max wire of all (including vertex) - std::vector chan_min; - - std::vector> m_bad_channel_list; - - //Vertex, size of 3 (on 3 planes) - std::vector vertex_tick; - std::vector vertex_chan; - std::vector vertex_graph; - - bool plot_true_vertex; - //True vertex, size of 3 - std::vector true_vertex_tick; - std::vector true_vertex_chan; - std::vector true_vertex_graph; - - //std::vector> considered_hits; //all hits considered for clustering - //std::vector> all_hits; - std::map,bool> map_unassociated_hits; - std::map, bool> map_considered_hits; - - //Plane: index - std::vector vec_unass_graphs; //graph of [tick vs wire] for unassociated hits that pass the hit threshold - std::vector> vec_unass_ticks; //tick of unassso hits that pass threshold - std::vector> vec_unass_chans; - std::vector>> vec_unass_pts; // [wire, tick] pair for unassociatd hits that pass threshold on each plane - std::vector>> vec_unass_hits; //vector of unasso hits that pss hit threshold on each plane - - - //Plane: index - std::vector vec_all_graphs; //graph of [tick vs wire] for all hits that are not in the slice - std::vector> vec_all_ticks; //tick of all hits that are not in the slice (grouped by plane #) - std::vector> vec_all_chans; //wire of all hits that are not in the slice on each plane. - - std::vector num_clusters; //number of clusters for unassociated hits on each plane - std::vector> cluster_labels; //one-to-one mapped cluster labels for unassociated hits in `vec_unass_pts` - TRandom3 *rangen; - - // all clusters on all 3 planes, each cluster includes points/hits identified for that cluster - std::vector vec_clusters; - std::vector> vec_showers; //vector of recob::Shower contained in this class - std::vector> vec_tracks; - - //-----helper function----------- - - // form legend for recob::shower and recob::track objects - void format_legend(std::string &leg, double arg1 = 0.0, double arg2 = 0.0, double arg3 = 0.0); - - }; - - //define wire conversion, tick conversion factor - constexpr double SEAviewer::wire_con; - constexpr double SEAviewer::tick_con; - -}// namespace - -#endif - diff --git a/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h deleted file mode 100644 index 3bd274140..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/SEAview/seaDBSCAN.h +++ /dev/null @@ -1,159 +0,0 @@ -/** - * \file seaDBSCAN.h - * - * - * \brief Class def header for a class seaDBSCAN - * - * @author mark ross-lonergan markrl@nevis.columbia.edu - * Written 20th May 2019. - */ - -#ifndef seaDBSCAN_H -#define seaDBSCAN_H - -#include -#include -#include -#include -#include -#include - - -class seaDBSCAN{ - - public: - double m_eps; - int m_minpts; - - /// constructor - seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - - /// Default destructor - ~seaDBSCAN(){} - - // identify each hit to a certain cluster, or identify as noise - std::vector Scan2D(std::vector> &pts); - // get neighbour points for point i from vector pts - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - // combine elements in pts to seed if not found in seed - int UnionSets(std::vector> &seed, std::vector> &pts); - // calculate distance between (w1, t1) and (w2, t2) - double SimpleDist(double w1, double t1, double w2, double t2); - -}; - -std::vector seaDBSCAN::Scan2D(std::vector> &pts){ - - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - //Guanqun: change vector while looping over its elements - //new elements are pushed back to seed_set - this->UnionSets(seed_set, new_neighbours); - } - } - } - return label; - -} - - - -std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; - - //VERY simple, will update soon to a DB - - - for(size_t ip=0; ip p = pts[ip]; - - double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); - - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - - } - } - return neighbours; -} - -int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - - //VERY simple, will update soon if it works - for(auto &p:pts){ - - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } - - } - - - - return 0; -} - -double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ - // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 - double wire_con = 0.3; - double tick_con = 1.0/25.0; - - return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); - -} - -#endif diff --git a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc deleted file mode 100644 index 65ee207c3..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.cc +++ /dev/null @@ -1,2248 +0,0 @@ -#include "SinglePhoton_module.h" -#include "analyze_OpFlashes.h" -#include "analyze_Tracks.h" -#include "analyze_Showers.h" -#include "analyze_Template.h" -#include "analyze_MCTruth.h" -#include "analyze_EventWeight.h" -#include "analyze_Slice.h" -#include "analyze_Geant4.h" -#include "fiducial_volume.h" -#include "second_shower_search.h" -#include "isolation.h" - -namespace single_photon -{ - - //Constructor from .fcl parameters - SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) - { - this->reconfigure(pset); - //Set up some detector, timing, spacecharge and geometry services - theDetector = lar::providerFrom(); - detClocks = lar::providerFrom(); - SCE = lar::providerFrom(); - geom = lar::providerFrom(); - - } - - //Reconfigure the internal class parameters from .fcl parameters - void SinglePhoton::reconfigure(fhicl::ParameterSet const &pset) - { - //input parameters for what file/mode were running in - m_print_out_event = pset.get("PrintOut", false); - m_is_verbose = pset.get("Verbose",false); - m_is_data = pset.get("isData",false); - m_is_overlayed = pset.get("isOverlayed",false); - m_is_textgen = pset.get("isTextGen",false); - - //some specific additonal info, default not include - m_use_PID_algorithms = pset.get("usePID",false); - m_use_delaunay = pset.get("useDelaunay",false); - m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); - - //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) - m_fill_trees = pset.get("FillTrees",true); - m_run_pi0_filter = pset.get("RunPi0Filter",false); - m_run_pi0_filter_2g1p = pset.get("FilterMode2g1p",false); - m_run_pi0_filter_2g0p = pset.get("FilterMode2g0p",false); - - if(m_run_pi0_filter) m_is_data = true;// If running in filter mode, treat all as data - - //Some output for logging - std::cout<<"SinglePhoton::reconfigure || whats configured? "<("SelectEvent", false); - m_selected_event_list = pset.get("SelectEventList", ""); - - //Studies for photo nuclear EventWeights - m_runPhotoNuTruth = pset.get("RunPhotoNu",false); - - //Ability to save some FULL eventweight components, rather than run later. Useful for systematic studies. Harcoded to two currently (TODO) - m_runTrueEventweight = pset.get("RunTrueEventWeight",false); - m_true_eventweight_label = pset.get("true_eventweight_label","eventweight"); - m_Spline_CV_label = pset.get("SplineCVLabel", "eventweight");//4to4aFix"); - - - //Input ArtRoot data products - m_pandoraLabel = pset.get("PandoraLabel"); - m_trackLabel = pset.get("TrackLabel"); - m_sliceLabel = pset.get("SliceLabel","pandora"); - m_showerLabel = pset.get("ShowerLabel"); - m_caloLabel = pset.get("CaloLabel"); - m_flashLabel = pset.get("FlashLabel"); - m_potLabel = pset.get("POTLabel"); - m_hitfinderLabel = pset.get("HitFinderModule", "gaushit"); - m_badChannelLabel = pset.get("BadChannelLabel","badmasks"); - m_showerKalmanLabel = pset.get("ShowerTrackFitter","pandoraKalmanShower"); - m_showerKalmanCaloLabel = pset.get("ShowerTrackFitterCalo","pandoraKalmanShowercali"); - m_generatorLabel = pset.get("GeneratorLabel","generator"); - m_mcTrackLabel = pset.get("MCTrackLabel","mcreco"); - m_mcShowerLabel = pset.get("MCShowerLabel","mcreco"); - m_geantModuleLabel = pset.get("GeantModule","largeant"); - m_backtrackerLabel = pset.get("BackTrackerModule","gaushitTruthMatch"); - m_hitMCParticleAssnsLabel = pset.get("HitMCParticleAssnLabel","gaushitTruthMatch"); - m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); - m_shower3dLabel = pset.get("Shower3DLabel","shrreco3d"); - - //Flash related variables. - m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change - m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); - - // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); - m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); - - //CRT related variables, should run only for RUN3+ enabled - m_runCRT = pset.get("runCRT",false); - m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); - m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); - m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); - m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); - - //Some track calorimetry parameters - m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); - m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); - m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? - m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); - - //Some shower calorimetry parameters - m_work_function = pset.get("work_function"); - m_recombination_factor =pset.get("recombination_factor"); - m_gain_mc =pset.get>("gain_mc"); - m_gain_data =pset.get>("gain_data"); - m_wire_spacing = pset.get("wire_spacing"); - m_width_dqdx_box = pset.get("width_box"); - m_length_dqdx_box = pset.get("length_box"); - m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); - - //A seperate mode to run over AllPFPs and not just slice particles - m_run_all_pfps = pset.get("runAllPFPs",false); - - - //Some paramaters for counting protons & photons - m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); - m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); - m_mass_pi0_mev = 139.57; - - //SEAviwer Settings for shower clustering and proton stub finding - //Have two sets: - //Base SEAview is for Second Shower Veto - m_runSEAview = pset.get("runSEAviewShower", false); - m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); - m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); - m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); - m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); - m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); - m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); - m_SEAviewNumRecoShower = pset.get("SEAviewShowerNumRecoShower", -1); - m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); - - // Second set is for Proton Stub finding - m_runSEAviewStub = pset.get("runSEAviewStub", false); - m_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); - m_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); - m_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); - m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); - m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); - m_SEAviewStubNumRecoShower = pset.get("SEAviewStubNumRecoShower", -1); - m_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); - - bool_make_sss_plots = true; - - //Misc setup - this->setTPCGeom(); - rangen = new TRandom3(22); - - //Whats a Delta? - std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; - std::vector delta_pdg_list = {2224,2214,1114,2114}; - for(size_t i=0; i< delta_pdg_list.size(); ++i){ - is_delta_map[delta_pdg_list[i]] = delta_names[i]; - is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; - } - - - //Text print event? Depreciated at the moment. - if (m_print_out_event ){ - out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); - if (!out_stream.is_open()){ - std::cout<<"ERROR output file not open"< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; - //sssVetov1 = new ReadBDT(inputVars); - - } - - //------------------------------------------------------------------------------------------------------------------------------------------ - - - - //--------------------------------------- Primary Filter------------------------------------------------------------------------------------ - // Runs over every artroot event - bool SinglePhoton::filter(art::Event &evt) - { - - std::cout<<"---------------------------------------------------------------------------------"<ClearVertex(); - - //Some event based properties - m_subrun_counts++; - m_number_of_events++; - m_run_number = evt.run(); - m_subrun_number = evt.subRun(); - m_event_number = evt.id().event(); - - - //if module is run in selected-event mode, and current event is not in the list, skip it - if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ - std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; - return true; - } - - //Timing and TPC info - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - m_Cryostat = ID.Cryostat; - m_TPC = ID.TPC; - _time2cm = theDetector->SamplingRate() / 1000.0 * theDetector->DriftVelocity( theDetector->Efield(), theDetector->Temperature() );//found in ProtoShowerPandora_tool.cc - - - //******************************Setup*****************Setup**************************************/ - //******************************Setup*****************Setup**************************************/ - // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. - // Make sure under the hood you understand this! - // ------------------------ - // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g - // tracks->pfparticles->hits - // tracks->pfparticles->spacepoints ..etc.. - // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. - //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. - - - // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. - art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); - std::vector> hitVector; - art::fill_ptr_vector(hitVector,hitHandle); - - //Lets do "THE EXACT SAME STUFF" for Optical Flashes - art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); - std::vector> flashVector; - art::fill_ptr_vector(flashVector,flashHandle); - - //tracks - art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); - std::vector> trackVector; - art::fill_ptr_vector(trackVector,trackHandle); - - //BadChannels// Fill later - art::Handle > badChannelHandle; - std::vector badChannelVector; - if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ - badChannelVector = *(badChannelHandle); - } - - //Collect the PFParticles from the event. This is the core! - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> pfParticleVector; - art::fill_ptr_vector(pfParticleVector,pfParticleHandle); - //So a cross check - if (!pfParticleHandle.isValid()) - { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; - return (m_run_pi0_filter ? false : true) ; - } - - //get the cluster handle for the dQ/dx calc - art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector< art::Ptr > clusterVector; - art::fill_ptr_vector(clusterVector,clusterHandle); - - // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; - // typedef std::map< size_t, art::Ptr> - // Produce a map of the PFParticle IDs for fast navigation through the hierarchy - PFParticleIdMap pfParticleMap; - this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); - - //Slices - art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> sliceVector; - art::fill_ptr_vector(sliceVector,sliceHandle); - - //And some associations - art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); - art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); - - //Slice to PFParticle - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; - std::map> > sliceIDToPFParticlesMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; - sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); - sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); - } - - //Slice to Hits - std::map< art::Ptr, std::vector> > sliceToHitsMap; - std::map> > sliceIDToHitsMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; - sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); - sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); - } - - //And some verticies. - art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> vertexVector; - art::fill_ptr_vector(vertexVector,vertexHandle); - if(vertexVector.size()>0) m_number_of_vertices++; - - //PFParticle to Vertices - art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); - } - - //------- 3D showers - art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); - std::map, art::Ptr> pfParticlesToShowerReco3DMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ - pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); - } - - } - //---------Kalman Track Showers - art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); - std::map, art::Ptr> pfParticlesToShowerKalmanMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ - pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); - } - } - - //----- kalmon Cali - art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); - std::vector> kalmanTrackVector; - art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); - - art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); - std::map,std::vector>> kalmanTrackToCaloMap; - for(size_t i=0; i< kalmanTrackVector.size(); ++i){ - auto trk = kalmanTrackVector[i]; - if(cali_per_kalmantrack.at(trk.key()).size()!=0){ - kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); - } - } - - // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: - //-------------------------------- - // Produce two PFParticle vectors containing final-state particles: - // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis - // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis - std::vector< art::Ptr > crParticles; - std::vector< art::Ptr > nuParticles; - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); - - - //if not running over neutrino slice only, use all pfp's in event - if (m_run_all_pfps ==true){ - nuParticles = pfParticleVector; - } - - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - std::map, std::vector> > pfParticleToSpacePointsMap; - for(size_t i=0; i< nuParticles.size(); ++i){ - const art::Ptr pfp = nuParticles[i]; - pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); - } - - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); - std::map, std::vector> > pfParticleToMetadataMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - const art::Ptr pfp = pfParticleVector[i]; - pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); - } - - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); - std::map, std::vector> > pfParticleToClustersMap; - std::map, std::vector> > clusterToHitsMap; - //fill map PFP to Clusters - for(size_t i=0; i< nuParticles.size(); ++i){ - auto pfp = nuParticles[i]; - pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - } - //fill map Cluster to Hits - for(size_t i=0; i< clusterVector.size(); ++i){ - auto cluster = clusterVector[i]; - clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); - } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; - - - //use pfp->cluster and cluster->hit to build pfp->hit map - //for each PFP - for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; - - //make empty vector to store hits - std::vector> hits_for_pfp = {}; - - - //for each cluster, get the associated hits - for (art::Ptr cluster: clusters_vec){ - std::vector> hits_vec = clusterToHitsMap[cluster]; - - //insert hits into vector - hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); - } - - //fill the map - pfParticleToHitsMap[pfp] = hits_for_pfp; - - }//for each pfp - - - - /************************************************************************** - * For SEAview: grab cosmic-related PFPaticles and recob::Hits - * - **************************************************************************/ - std::map, std::vector> > cr_pfParticleToClustersMap; - std::map, std::vector> > cr_pfParticleToHitsMap; - - //first, collect all daughters of primary cosmic - int num_primary_cosmic_particle = crParticles.size(); - for(int i =0; i!=num_primary_cosmic_particle; ++i){ - auto& pParticle = crParticles[i]; - for(const size_t daughterId : pParticle->Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - crParticles.push_back(pfParticleMap.at(daughterId)); - } - } - - //second, build PFP to hits map for cosmic-related PFParticles - for(size_t i=0; i< crParticles.size(); ++i){ - auto pfp = crParticles[i]; - cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - } - for(size_t i=0; i< crParticles.size(); ++i){ - auto pfp = crParticles[i]; - - // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; - - //make empty vector to store hits - std::vector> hits_for_pfp = {}; - - // std::cout<<"-- there are "< cluster: clusters_vec){ - std::vector> hits_vec = clusterToHitsMap[cluster]; - - // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()< nu_scores; - bool isSelectedSlice = false; - int primaries = 0; - int primary_pdg = 0; - - for(auto &pfp: pfps){ - std::vector> metadatas = pfParticleToMetadataMap[pfp]; - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - //for each of the things in the list - if(propertiesmap.count("NuScore")==1){ - nu_scores.push_back(propertiesmap["NuScore"]); - } - if(propertiesmap.count("IsNeutrino")==1){ - isSelectedSlice = true; - } - } - - if (pfp->IsPrimary()) { - primaries++; - primary_pdg = (pfp->PdgCode()); - } - /*if (!pfp->IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - if(isNeutrino){ - isSelectedSlice = true; - }*/ - } - - if(nu_scores.size()>0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<> of the PFParticles that we are interested in. - //tracks is a vector of recob::Tracks and same for showers. - //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. - std::vector< art::Ptr > tracks; - std::vector< art::Ptr > showers; - std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; - std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; - - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - - //Track Calorimetry. Bit odd here but bear with me, good to match and fill here - art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); - std::map, std::vector> > trackToCalorimetryMap; - //So a cross check - if (!calo_per_track.isValid()) - { - mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; - return (m_run_pi0_filter ? false : true); - } - - //Loop over all tracks we have to fill calorimetry map - for(size_t i=0; i< tracks.size(); ++i){ - if(calo_per_track.at(tracks[i].key()).size() ==0){ - std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, m_pidLabel); - std::map, art::Ptr > trackToPIDMap; - - // If we want PID algorithms to run. do so here - // Build a map to get PID from PFParticles, then call PID collection function - if(m_use_PID_algorithms){ - for(size_t i=0; i< tracks.size(); ++i){ - trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); - } - } - - - - //**********************************************************************************************/ - //**********************************************************************************************/ - //---------------------------------- MC TRUTH, MC Only--------------------------- - //**********************************************************************************************/ - //**********************************************************************************************/ - - //Get the MCtruth handles and vectors - std::vector> mcTruthVector; - std::vector> mcParticleVector; - - //Then build a map from MCparticles to Hits and vice versa - std::map< art::Ptr, std::vector > > mcParticleToHitsMap; - std::map< art::Ptr, art::Ptr > hitToMCParticleMap; - - //Apparrently a MCParticle doesn't know its origin (thanks Andy!) - //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa - //Note which map is which! //First is one-to-many. //Second is one-to-one - std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; - std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; - std::map > MCParticleToTrackIdMap; - - std::vector> mcTrackVector; - std::vector> mcShowerVector; - - std::vector> matchedMCParticleVector; - std::map, art::Ptr > trackToMCParticleMap; - std::map, art::Ptr > showerToMCParticleMap; - - //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower - std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; - std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; - - if(m_is_verbose){ - std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; - } - - //**********************************************************************************************/ - //**********************************************************************************************/ - - //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). - if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); - badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); - - - //*******************************Slices***************************************************************/ - //*******************************Slices***************************************************************/ - - //these are all filled in analyze slice - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind - std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score - std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise - std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's - std::map,bool> PFPToNuSliceMap; - std::map,double> PFPToTrackScoreMap; - std::map sliceIdToNumPFPsMap; - std::cout<<"SinglePhoton::analyze::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); - - if (PFPToSliceIdMap.size() < 1) std::cout<<"ERROR, not storing PFP's in PFPToSliceIdMap"<Self()<> pfp_vec = pair.second; - int slice_id = pair.first; - //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) - for(auto pfp: pfp_vec){ - if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ - std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; - - if(m_runCRT){ - art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); - for(size_t i=0; i< flashVector.size(); ++i){ - crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); - } - } - - art::Handle> crthit_h; //only filled when there are hits, otherwise empty - art::Handle rawHandle_DAQHeader; - double evt_timeGPS_nsec = -999 ; - if(m_runCRT){ - evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); - evt.getByLabel(m_CRTHitProducer, crthit_h); - raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); - art::Timestamp evtTimeGPS = my_DAQHeader.gps_time(); - evt_timeGPS_nsec = evtTimeGPS.timeLow(); - std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); - - - - //******************************* Common Optical Filter **************************************************************/ - //******************************* Common Optical Filter **************************************************************/ - //Raw Optical fltr - art::Handle uBooNE_common_optFltr; - if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ - m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); - m_flash_optfltr_pe_beam_tot = uBooNE_common_optFltr->PE_Beam_Total(); - m_flash_optfltr_pe_veto = uBooNE_common_optFltr->PE_Veto(); - m_flash_optfltr_pe_veto_tot = uBooNE_common_optFltr->PE_Veto_Total(); - }else{ - m_flash_optfltr_pe_beam = -999; - m_flash_optfltr_pe_beam_tot = -999; - m_flash_optfltr_pe_veto = -999; - m_flash_optfltr_pe_veto_tot = -999; - std::cout<<"No opfiltercommon product:"<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); - this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); - - //Run over PID? - if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); - - - //******************************* Showers **************************************************************/ - //******************************* Showers **************************************************************/ - std::cout<<"SinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap); - this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap); - - - //Some misc things thrown in here rather than in a proper helper function. TODO. fix - //Calc a fake shower "end" distance. How to define an end distance? good question - for(size_t i_shr = 0; i_shr s = showers[i_shr]; - const art::Ptr pfp = showerToNuPFParticleMap[s]; - const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; - - m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; - m_reco_shower_end_dist_to_SCB[i_shr] = 99999; - - for(auto &sp: shr_spacepoints){ - std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; - m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); - double tmo; - this->distToSCB(tmo,tmp_spt); - m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); - - //This section runs for only 1 shower events for purpose of testing delta specifics - if(showers.size()==1){ - m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); - m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); - m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); - } - - } - } - - - //******************************* MCTruth **************************************************************/ - //******************************* MCTruth **************************************************************/ - - //Grab the backtracker info for MCTruth Matching - art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); - - // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. - // MCShower and MCTrack come from energy depositions in GEANT4 - - //Only run if its not data :) - if(!m_is_data){ - - std::vector> gTruthVector; - if(!m_is_textgen){ - - // if Text is in the generator label, skip it. TODO this is a bit simple but works, maybe add a boolean - art::ValidHandle> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); - art::fill_ptr_vector(gTruthVector,gTruthHandle); - if(m_is_verbose){ - for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); - art::fill_ptr_vector(mcTruthVector,mcTruthHandle); - - //get MCPartilces (GEANT4) - art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); - art::fill_ptr_vector(mcParticleVector,mcParticleHandle); - - //Found inanalyze_Geant4.h - //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! - this->AnalyzeGeant4(mcParticleVector); - - - //Get the MCParticles (move to do this ourselves later) - this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); - - - //mcc9 march miniretreat fix - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - m_test_matched_hits = 0; - - for(size_t j=0; j hit = hitVector[j]; - - particle_vec.clear(); match_vec.clear(); //only store per hit - mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); - if(particle_vec.size() > 0){ - m_test_matched_hits++; - } - } - - - //Important map, given a MCparticle, whats the "hits" associated - this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); - - - //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); - std::cout<<"SinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); - - //photoNuclearTesting(matchedMCParticleVector); - - std::cout<<"Starting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); - - std::cout<<"Starting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); - - - std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); - - - //added since last time? - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); - std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ - std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); - - //if(!m_run_pi0_filter){ - // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); - //} - - std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); - - if (m_print_out_event){ - if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ - out_stream <<"run subrunevent "<> ev_evw ; - if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ - - std::map> const & weight_map = ev_evw->front().fWeight; - if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; - - for (auto const& x : weight_map){ - std::cout << x.first // string (key) - << ':' - << x.second.size() << std::endl ; - if(x.second.size()==1 && x.first == "splines_general_Spline"){ - m_genie_spline_weight = x.second.front(); - std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; - if( evt.getByLabel("eventweight",ev_evw_ph)){ - std::map> const & weight_map = ev_evw_ph->front().fWeight; - for (auto const& x : weight_map){ - std::cout << x.first // string (key) - << ':' - << x.second.size() << std::endl ; - if(x.first == "photonuclear_photon_PhotoNuclear"){ - auto vec = x.second; - double ph_low = vec[1]; - double ph_high = vec[0]; - std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); - std::map> const & weight_map = ev_evw_true->front().fWeight; - if(ev_evw_true->size() > 1) { - std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" - << "WARNING: eventweight has more than one entry\n"; - } - fmcweight=weight_map; - } - - }//end NOT textgen - - - - std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"< IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap); - - - - - // ################################################### SEAview SEAview ######################################################### - // ################################################### SEAview SEAview ######################################################### - - - // ################################################### Proton Stub ########################################### - // ------------- stub clustering --------------------------- - std::cout << "----------------- Stub clustering --------------------------- " << std::endl; - std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - - if(!m_run_pi0_filter && m_runSEAviewStub && (m_SEAviewStubNumRecoShower == -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ - - // grab all hits in the slice of the reco shower - art::Ptr p_shr = showers.front(); - art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; - std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - - int p_sliceid = PFPToSliceIdMap[p_pfp]; - auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; - - std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - - //Setup seaviewr object - seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector ); - //Pass in any bad channels you like - sevd.setBadChannelList(bad_channel_list_fixed_mcc9); - //Give it a vertex to center around - sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); - - //Add the hits from just this slice, as well as hits within 150cm of the vertex - sevd.addHitsToConsider(hitVector); // std::vector> - sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view - sevd.addHitsToConsider(p_slice_hits); - - sevd.addAllHits(hitVector); // std::vector> - sevd.setHitThreshold(m_SEAviewStubHitThreshold); - - - //Add all the "nice " PFParticle Hits, as well as what to label - //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string - sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string - - //and add the SingleShower we like - sevd.addShower(p_shr); // art::Ptr - - //Add all track PFP - int i_trk = 0; - for(auto &trk: tracks){ - art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; - std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; - //sevd.addPFParticleHits(p_hits_trk,"track"); - sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); - sevd.addTrack(trk); - ++i_trk; - } - - //Add all cosmic-relatd PFP - for(auto &cr: crParticles){ - std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; - sevd.addPFParticleHits(p_hits_cr,"cosmic"); - } - - - //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. - auto vnh= sevd.calcUnassociatedHits(); - m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; - m_trackstub_unassociated_hits_below_threshold = vnh[2]; - m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; - - //Recluster, group unassociated hits into different clusters - sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); - - //And some plotting - // If we want to plot pdfs again later, then we can't plot here - //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); - - //Analyze formed clusters and save info - std::vector vec_SEAclusters ; - sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); - - - //And save to file. - std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); - int remerge = clu.getShowerRemerge(); - seaview::cluster_score * ssscorz = clu.getScore(); - - std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ - //decide not to add energy of the cluster to reco shower if it's matched - // - //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; - //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; - //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; - - continue;// Dont include this as a viable cluster! - } - - ++m_trackstub_num_candidates; - //determine if this cluster is in neutrino slice - m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); - - //Fill All the bits - m_trackstub_candidate_num_hits.push_back((int)hitz.size()); - m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); - m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); - m_trackstub_candidate_plane.push_back(pl); - m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); - m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); - m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); - m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); - m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); - m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); - m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); - m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); - m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); - m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); - m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); - m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); - m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); - m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); - m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); - m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); - m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); - m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); - m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); - m_trackstub_candidate_energy.push_back(Ep); - m_trackstub_candidate_remerge.push_back(remerge); - - - //MCTruth matching for pi0's - if(m_is_data){ - m_trackstub_candidate_matched.push_back(-1); - m_trackstub_candidate_pdg.push_back(-1); - m_trackstub_candidate_parent_pdg.push_back(-1); - m_trackstub_candidate_trackid.push_back(-1); - m_trackstub_candidate_true_energy.push_back(-1); - m_trackstub_candidate_overlay_fraction.push_back(-1); - m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); - }else{ - - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); - m_trackstub_candidate_matched.push_back(ssmatched[0]); - m_trackstub_candidate_pdg.push_back(ssmatched[1]); - m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); - m_trackstub_candidate_trackid.push_back(ssmatched[3]); - m_trackstub_candidate_true_energy.push_back(ssmatched[4]); - m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); - m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); - - //Guanqun: print out (best-matched) truth information of the cluster - std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; - std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; - std::cout << "===============================================================" << std::endl; - } - - sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); - - - } //end of cluster loop - - // Plot the event - if(m_SEAviewStubMakePDF){ - sevd.Print(m_SEAviewStubPlotDistance); - } - - //group clusters HERE - std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); - m_trackstub_num_candidate_groups = group_result.first; - m_grouped_trackstub_candidate_indices = group_result.second.first; - m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; - } - - - // --------------- shower clustering -------------------------- - std::cout << "------------- Shower clustering --------------------" << std::endl; - std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - - if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ - - art::Ptr p_shr = showers.front(); - art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; - std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - - - int p_sliceid = PFPToSliceIdMap[p_pfp]; - auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; - - std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - - //Setup seaviewr object - seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); - //Pass in any bad channels you like - sevd.setBadChannelList(bad_channel_list_fixed_mcc9); - //Give it a vertex to center around - sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); - - //Add hits to consider for clustering - //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV - //sevd.filterConsideredHits(150); - sevd.addHitsToConsider(p_slice_hits); - - //Add all hits in the events - sevd.addAllHits(hitVector); // std::vector> - sevd.setHitThreshold(m_SEAviewHitThreshold); - - //Add all the "nice " PFParticle Hits, as well as what to label - //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string - sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string - - //and add the SingleShower we like - sevd.addShower(p_shr); // art::Ptr - - //Add all track PFP - int i_trk = 0; - for(auto &trk: tracks){ - art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; - std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; - //sevd.addPFParticleHits(p_hits_trk,"track"); - sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); - sevd.addTrack(trk); - ++i_trk; - } - - //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 - /*for(auto &cr: crParticles){ - std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; - sevd.addPFParticleHits(p_hits_cr,"cosmic"); - } - */ - - //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. - auto vnh= sevd.calcUnassociatedHits(); - m_sss_num_unassociated_hits =vnh[1]+vnh[2]; - m_sss_num_unassociated_hits_below_threshold = vnh[2]; - m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; - - //Recluster, group unassociated hits into different clusters - sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); - - - //This is the place I will put the new Second Shower Search - std::vector vec_SEAclusters ; - sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); - - //And save to file. - std::cout<<"After SEAview we have "<CalcEShowerPlane(hitz,pl); - int remerge = clu.getShowerRemerge(); - seaview::cluster_score * ssscorz = clu.getScore(); - - std::cout<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ - if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; - if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; - if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; - - continue;// Dont include this as a viable cluster! - } - - ++m_sss_num_candidates; - - //determine if this cluster is in neutrino slice - m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); - - //Fill All the bits - m_sss_candidate_num_hits.push_back((int)hitz.size()); - m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); - m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); - m_sss_candidate_plane.push_back(pl); - m_sss_candidate_PCA.push_back(ssscorz->pca_0); - m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); - m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); - m_sss_candidate_fit_constant.push_back(clu.getFitCons()); - m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); - m_sss_candidate_max_tick.push_back(ssscorz->max_tick); - m_sss_candidate_min_tick.push_back(ssscorz->min_tick); - m_sss_candidate_min_wire.push_back(ssscorz->min_wire); - m_sss_candidate_max_wire.push_back(ssscorz->max_wire); - m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); - m_sss_candidate_min_dist.push_back(ssscorz->min_dist); - m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); - m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); - m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); - m_sss_candidate_energy.push_back(Ep); - m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); - m_sss_candidate_remerge.push_back(remerge); - - - //MCTruth matching for pi0's - if(m_is_data){ - m_sss_candidate_matched.push_back(-1); - m_sss_candidate_pdg.push_back(-1); - m_sss_candidate_parent_pdg.push_back(-1); - m_sss_candidate_trackid.push_back(-1); - m_sss_candidate_true_energy.push_back(-1); - m_sss_candidate_overlay_fraction.push_back(-1); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); - }else{ - - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); - m_sss_candidate_matched.push_back(ssmatched[0]); - m_sss_candidate_pdg.push_back(ssmatched[1]); - m_sss_candidate_parent_pdg.push_back(ssmatched[2]); - m_sss_candidate_trackid.push_back(ssmatched[3]); - m_sss_candidate_true_energy.push_back(ssmatched[4]); - m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); - - //Guanqun: print out (best-matched) truth information of the cluster - std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; - std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; - std::cout << "===============================================================" << std::endl; - } - - - sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); - - } //end of cluster loop - - // Plot the event - if(m_SEAviewMakePDF){ - sevd.Print(m_SEAviewPlotDistance); - } - - } - - for(int i =0; i<(int)showers.size(); i++){ - m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); - } - - // ################################################### END SEAview END SEAview ######################################################### - // ##################################################################################################################################### - - - - // PandoraAllOutComes - // I.e This runs over all 3D reco showers in the whole event and find second shower candidates - if(!m_run_pi0_filter){ - std::cout<<"------------ Shower3D --------------"<Self()<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); - - - //And cluster the 2d and 3d second showers. Very simple TODO - this->SimpleSecondShowerCluster(); - - } - - - // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### - - size_t n_neutrino_slice=0; - size_t n_neutrino_candidate_pfp_id=0; - - for(size_t s=0; s< sliceVector.size(); s++){ - auto slice = sliceVector[s]; - std::vector> pfps = sliceToPFParticlesMap[slice]; - - int primaries=0; - int n_dau=0; - int found = 0; - //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - primaries++; - // If it is, lets get the vertex position - if(isNeutrino){ - found++; - //Ok this is neutrino candidate. - - std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); - for (const size_t daughterId : pfp->Daughters()){ - n_dau++; - auto dau = pfParticleMap[daughterId]; - std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ - while(tmp->NumDaughters()>0 && n_gen < 4){ - for(int k=0; k< n_gen; k++){ - std::cout<<"---> "; - } - auto grandau = pfParticleMap[granDaughterId]; - std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; - } - - } - std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ - std::cout<<"We're Missing Something!."<1){ - throw cet::exception("DetachedVertexFinder") << " This event contains multiple reconstructed neutrinos! Size: "<Fill(); - ncdelta_slice_tree->Fill(); - eventweight_tree->Fill(); - true_eventweight_tree->Fill(); - geant4_tree->Fill(); - } - - - //Rest the vertex after filling - this->ClearVertex(); - - if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; - else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; - - //if not in filter mode pass all - return true; - - }// end filter_module main class - - - - //------------------------------------------------------------------------------------------- - void SinglePhoton::endJob() - { - if (m_print_out_event){ - out_stream.close(); - } - pot_tree->Fill(); - } - - //------------------------------------------------------------------------------------------- - - //This runs ONCE at the start of the job and sets up all the necessary services and TTrees - void SinglePhoton::beginJob() - { - mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; - art::ServiceHandle tfs; - - vertex_tree = tfs->make("vertex_tree", "vertex_tree"); - pot_tree = tfs->make("pot_tree", "pot_tree"); - eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); - ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); - run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); - geant4_tree = tfs->make("geant4_tree","geant4_tree"); - - //run_subrun_tree, reset some POT - m_run = 0; - m_subrun = 0; - m_subrun_pot = 0; - run_subrun_tree->Branch("run",&m_run,"run/I"); - run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); - run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); - run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); - - true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); - true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); - - // --------------------- POT Releated variables ----------------- - m_number_of_events = 0; - m_number_of_vertices = 0; - m_pot_count=0; - m_pot_per_event = 0; - m_pot_per_subrun = 0; - m_number_of_events_in_subrun=0; - - - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); - - // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); - - vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); - vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); - vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); - - - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); - - vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); - vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); - - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); - - // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); - vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); - vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); - vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); - vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); - vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); - - //create branches as found in individual analyze_XXX.h - this->CreateIsolationBranches(); - this->CreateSecondShowerBranches(); - this->CreateSecondShowerBranches3D(); - this->CreateStubBranches(); - this->CreateFlashBranches(); - this->CreateShowerBranches(); - this->CreateSliceBranches(); - this->CreateMCTruthBranches(); - this->CreateEventWeightBranches(); - this->CreateGeant4Branches(); - this->CreateTrackBranches(); - - //hardcode some info (TODO change) - std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; - - //Get the info for length->energy conversion from PSTAR database. - TFile *fileconv; - struct stat buffer; - - //some useful input data - if(!m_run_pi0_filter){ - if(stat("proton_conversion.root", &buffer) == 0){ - fileconv = new TFile("proton_conversion.root", "read"); - }else{ - fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); - } - - proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); - proton_length2energy_tgraph.GetMean(); - fileconv->Close(); - } - - //bad channels - std::string bad_channel_file = "MCC9_channel_list.txt"; - - if(!m_run_pi0_filter){ - if(stat(bad_channel_file.c_str(), &buffer) != 0){ - bad_channel_file = gpvm_location+bad_channel_file; - } - - std::ifstream bc_file(bad_channel_file); - - if (bc_file.is_open()) - { - std::string line; - while ( getline (bc_file,line) ) - { - std::vector res; - std::istringstream iss(line); - for(std::string s; iss >> s; ) - res.push_back( std::stof(s)); - - std::pair t(res[0],res[1]); - bad_channel_list_fixed_mcc9.push_back(t); - } - bc_file.close(); - } - } - - - //------------------- List of Selected Events to run -------- - if(m_runSelectedEvent){ - std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; - - std::ifstream infile(m_selected_event_list); - if(!infile){ - std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; - return; - } - - //read from file, run number, subrun number ,event number that should be run - m_selected_set.clear(); - std::string line; - while(std::getline(infile, line)){ - std::istringstream ss(line); - - std::vector event_info; - for(int i; ss >> i; ) event_info.push_back(i); - - m_selected_set.insert(event_info); - } - - infile.close(); - - if(m_is_verbose){ - std::cout << "Selected Events: " << std::endl; - std::cout << "Run \t SubRun \t Event" << std::endl; - for(auto & v: m_selected_set){ - std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); - std::cout << std::endl; - } - } - } - - std::cout<<"SinglePhoton \t||\t beginJob() is complete"<ClearIsolation(); - this->ClearSecondShowers(); - this->ClearSecondShowers3D(); - this->ClearStubs(); - this->ClearFlashes(); - this->ClearTracks(); - this->ClearShowers(); - this->ClearMCTruths(); - this->ClearEventWeightBranches(); - fmcweight.clear(); - this->ClearGeant4Branches(); - this->ClearSlices(); - - - } - - - bool SinglePhoton::beginSubRun(art::SubRun& sr) { - - - m_run = sr.run(); - m_subrun = sr.subRun(); - - double this_pot = 0; - - //reset subrun count - m_subrun_counts = 0; - - - if(m_potLabel != ""){ - if(m_potLabel == "generator"){ - - art::Handle gen_pot_hand; - if(sr.getByLabel(m_potLabel,gen_pot_hand)){ - this_pot = gen_pot_hand->totgoodpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; - if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ - this_pot =potSummaryHandlebnbETOR875->totpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<Fill(); - return true; - } - - - - - - - //----------------------------------------------------------------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------------------------------------------------------------- - - void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Starting to analyze recob::Vertex\n"; - int n_vert =0; - - //std::cout<<"There are "<second; - if (!vertexVector.empty()) - { - if (vertexVector.size() !=1) - std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; - - const art::Ptr vertex = *(vertexVector.begin()); - double xyz[3] = {0.0, 0.0, 0.0} ; - vertex->XYZ(xyz); - - n_vert++; - //std::cout<<"Vertex!"<<"\t "< tmp = {xyz[0],xyz[1],xyz[2]}; - m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); - - if(!m_run_pi0_filter){ - m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); - m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); - m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); - } - - }else{ - std::cout << " Error: vertexVector associated with this particle is empty " << "\n"; - std::cerr << " Error: vertexVector associated with this particle is empty " << "\n"; - //exit(0); - - } - } - - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) - { - const art::Ptr pParticle(pfParticleHandle, i); - // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) - { - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - } - - - void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles ) - { - - int found = 0; - int primaries = 0; - int full = 0; - for (PFParticleIdMap::const_iterator it = pfParticleMap.begin(); it != pfParticleMap.end(); ++it) - { - const art::Ptr pParticle(it->second); - - full++; - // Only look for primary particles - if (!pParticle->IsPrimary()) continue; - - // Check if this particle is identified as the neutrino - const int pdg(pParticle->PdgCode()); - const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - - - primaries++; - // If it is, lets get the vertex position - if(isNeutrino){ - found++; - this->GetVertex(pfParticlesToVerticesMap, pParticle ); - - } - - // All non-neutrino primary particles are reconstructed under the cosmic hypothesis - if (!isNeutrino) - { - crParticles.push_back(pParticle); - continue; - } - - // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. - // If this is not the case please handle accordingly - if (!nuParticles.empty()) - { - throw cet::exception("SinglePhoton") << " This event contains multiple reconstructed neutrinos!"; - } - - // Add the daughters of the neutrino PFParticle to the nuPFParticles vector - for (const size_t daughterId : pParticle->Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - nuParticles.push_back(pfParticleMap.at(daughterId)); - } - } - std::cout<<"SinglePhoton::GetFinalStatePFParticleVectors()\t||\t Found "< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - - - // Get the associations between PFParticles and tracks/showers from the event - art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); - art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); - - //if running over the neutrino slice only - if (m_run_all_pfps == false){ - for (const art::Ptr &pParticle : particles) { - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - } - } else{ //if running over all slices - std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; - - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - - } - } - - - } - - void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - - const unsigned int nTracks(associatedTracks.size()); - const unsigned int nShowers(associatedShowers.size()); - - - // Check if the PFParticle has no associated tracks or showers - if (nTracks == 0 && nShowers == 0) - { - // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; - return; - } - - // Check if there is an associated track - if (nTracks == 1 && nShowers == 0) - { - - tracks.push_back(associatedTracks.front()); - trackToNuPFParticleMap[tracks.back()]= pParticle; - //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); - - } - - - - - double SinglePhoton::triangle_area(double a1, double a2, double b1, double b2, double c1, double c2){ - double m1 = 0.3; - double m2 = 1.0/25.0; - - return fabs((a1*m1*(b2*m2-c2*m2)+b1*m1*(c2*m2-a2*m2)+c1*m1*(a2*m2-b2*m2))/2.0); - } - - int SinglePhoton::quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area){ - - std::vector z(n,0.0); - - TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); - TGraphDelaunay delan(g); - delan.SetMarginBinsContent(0); - delan.ComputeZ(0,0); - delan.FindAllTriangles(); - (*num_triangles)=delan.GetNdt(); // number of Delaunay triangles found - - //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays - Int_t *MT = delan.GetMTried(); - Int_t *NT = delan.GetNTried(); - Int_t *PT = delan.GetPTried(); - - (*area)=0.0; - for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ - - int n = hits.size(); - std::vector C0,T0; - std::vector C1,T1; - std::vector C2,T2; - size_t n_0=0; - size_t n_1=0; - size_t n_2=0; - - for(int i=0;i hit = hits[i]; - switch(hit->View()){ - case 0: - C0.push_back((double)hit->WireID().Wire); - T0.push_back(hit->PeakTime()); - n_0++; - break; - case 1: - C1.push_back((double)hit->WireID().Wire); - T1.push_back(hit->PeakTime()); - n_1++; - break; - case 2: - C2.push_back((double)hit->WireID().Wire); - T2.push_back(hit->PeakTime()); - n_2++; - break; - default: - break; - } - } - if(m_use_delaunay){ - if(n_0>0 && (int)n_0 < m_delaunay_max_hits) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); - if(n_1>0 && (int)n_1 < m_delaunay_max_hits) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); - if(n_2>0 && (int)n_2 < m_delaunay_max_hits) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); - } - num_hits[0] = n_0; - num_hits[1] = n_1; - num_hits[2] = n_2; - - //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ - corrected.resize(3); - - double kx = input[0]; - double ky = input[1]; - double kz = input[2]; - - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - // double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); - - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & mcparticle, std::vector & corrected){ - corrected.resize(3); - - double kx = mcparticle->Vx(); - double ky = mcparticle->Vy(); - double kz = mcparticle->Vz(); - - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - //double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = scecorr.Y(); - double zOffset = scecorr.Z(); - - corrected[0]=kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<TriggerOffset()< & corrected){ - corrected.resize(3); - //Space Charge Effect! functionize this soon. - double kx = mcparticle.Vx(); - double ky = mcparticle.Vy(); - double kz = mcparticle.Vz(); - auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->TriggerOffset(); - - double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - corrected[0]=kx - scecorr.X() +xtimeoffset+0.6; - corrected[1]=ky + scecorr.Y(); - corrected[2]=kz + scecorr.Z(); - return 0; - } - - void SinglePhoton::CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr > & MCParticleToTrackIdMap) - { - - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; - - art::Handle< std::vector< simb::MCParticle> > theParticles; - evt.getByLabel(label, theParticles); - - if (!theParticles.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; - } - - art::FindOneP theTruthAssns(theParticles, evt, label); - - for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) - { - const art::Ptr particle(theParticles, i); - const art::Ptr truth(theTruthAssns.at(i)); - truthToParticles[truth].push_back(particle); - particlesToTruth[particle] = truth; - MCParticleToTrackIdMap[particle->TrackId()] = particle; - } - - std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) - { - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; - - art::Handle< std::vector > theSimChannels; - evt.getByLabel(label, theSimChannels); - - if (!theSimChannels.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; - } - - for (unsigned int i = 0; i < theSimChannels->size(); ++i) - { - const art::Ptr channel(theSimChannels, i); - simChannelVector.push_back(channel); - } - } - - - void SinglePhoton::BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap) - { - std::vector< art::Ptr > simChannelVector; - std::map< art::Ptr, std::vector> > truthToParticles; - std::map< art::Ptr, art::Ptr > particlesToTruth; - std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; - - this->CollectSimChannels(evt, label, simChannelVector); - this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitVector, simChannelVector, hitsToTrackIDEs); - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); - - - } - - bool SinglePhoton::Pi0PreselectionFilter() - { - - if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; - if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; - if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=1) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_conversion_distance.size()!=2) return false; - if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; - - return true; - } - - - - bool SinglePhoton::Pi0PreselectionFilter2g0p() - { - - if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; - if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; - if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=0) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_energy_max.size()!=2) return false; - //if the maximum energy of all showers on all planes is smaller than 30 - if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; - - return true; - } - - bool SinglePhoton::IsEventInList(int run, int subrun, int event){ - if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ - if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ - if(m_selected_set.find({run}) == m_selected_set.end()) - return false; - } - } - return true; - } - -} //namespace diff --git a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h deleted file mode 100644 index f44a08373..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/SinglePhoton_module.h +++ /dev/null @@ -1,1998 +0,0 @@ -#ifndef SINGLE_PHOTON_ANALYSIS -#define SINGLE_PHOTON_ANALYSIS - -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Optional/TFileService.h" -#include "art/Framework/Services/Optional/TFileDirectory.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/OpFlash.h" -#include "ubobj/CRT/CRTHit.hh" -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/MCBase/MCShower.h" -#include "lardataobj/AnalysisBase/Calorimetry.h" -#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" -#include "lardataobj/AnalysisBase/ParticleID.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/GeneratedParticleInfo.h" - -#include "larsim/EventWeight/Base/MCEventWeight.h" - -#include "larevt/SpaceChargeServices/SpaceChargeService.h" - -#include "larcoreobj/SummaryData/POTSummary.h" - -#include "nusimdata/SimulationBase/MCParticle.h" -#include "nusimdata/SimulationBase/MCTruth.h" -#include "nusimdata/SimulationBase/simb.h" -#include "nusimdata/SimulationBase/MCFlux.h" -#include "nusimdata/SimulationBase/GTruth.h" -#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" - -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" - -#include "larcore/Geometry/Geometry.h" - -#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" - -#include "canvas/Utilities/ensurePointer.h" -#include "canvas/Persistency/Common/FindManyP.h" -#include "canvas/Persistency/Common/FindMany.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "canvas/Persistency/Common/FindOne.h" - -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" -#include "cetlib_except/exception.h" - -#include "ubobj/Optical/UbooneOpticalFilter.h" - -// Helper function for PID stuff -#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" - -#include "TCanvas.h" -#include "TTree.h" -#include "TFile.h" -#include "TGraph.h" -#include "TGraph2D.h" -#include "TGraphDelaunay.h" -#include "TRandom3.h" -#include "TGeoPolygon.h" - -#include "Pandora/PdgTable.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "bad_channel_matching.h" -//#include "sssVeto_BDT.class.h" -#include "DBSCAN.h" - -#include "SEAview/SEAviewer.h" - -//------------------------------------------------------------------------------------------------------------------------------------------ - -namespace single_photon -{ - - // distance between point (x, y, z) and the shower direction line - double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ - - std::vector vert = {x,y,z}; - std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; - std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; - - return dist_line_point(start, abit, vert); - - } - - // invariant mass of a particle that decays to two showers - double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->ShowerStart().X()-vx; - double s1y = s1->ShowerStart().Y()-vy; - double s1z = s1->ShowerStart().Z()-vz; - double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); - s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) - s1y = s1y/norm1; - s1z = s1z/norm1; - - double s2x = s2->ShowerStart().X()-vx; - double s2y = s2->ShowerStart().Y()-vy; - double s2z = s2->ShowerStart().Z()-vz; - double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); - s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) - s2y = s2y/norm2; - s2z = s2z/norm2; - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - - } - - // invariant mass of two showers, calculated directly from shower directions - double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->Direction().X(); - double s1y = s1->Direction().Y(); - double s1z = s1->Direction().Z(); - - double s2x = s2->Direction().X(); - double s2y = s2->Direction().Y(); - double s2z = s2->Direction().Z(); - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - } - - - - // sort indices in descending order - template - std::vector sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - - return idx; - } - - // sort indices such that elements in v are in ascending order - template - std::vector sort_indexes_rev(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); - - return idx; - } - - - // check if two vectors have same elements (regardless of the order), and arrange their elements in order - template - bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) - { - std::sort(v1.begin(), v1.end()); - std::sort(v2.begin(), v2.end()); - return v1 == v2; - } - - - - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } - - - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorProperties const& detprop){ - double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } - - - struct sss_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; /* wire of hit that's closest to vertex */ - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; /* number of wires hits correspond to */ - int n_ticks; - - bool pass; - - sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of class sss_score - - class cluster { - - public: - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - f_npts = f_pts.size(); - if(pts.size() != hits.size()){ - std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts,&wires[0],&ticks[0]); - f_graph = af_graph; - - }; - - int getID() {return f_ID;} - int getN() {return f_npts;} - int getPlane(){ return f_plane;} - TGraph * getGraph(){ return &f_graph;} - std::vector> getHits(){return f_hits;} - int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} - sss_score * getSSScore(){return f_SSScore;} - private: - - int f_ID; - int f_npts; - int f_plane; - std::vector> f_pts; - std::vector> f_hits; - TGraph f_graph; - sss_score *f_SSScore; - }; // end of class cluster - - - - /** - * @brief SinglePhoton class - */ - class SinglePhoton : public art::EDFilter - { - public: - // name alias from pandora - typedef art::ValidHandle< std::vector > PFParticleHandle; - typedef std::vector< art::Ptr > PFParticleVector; - typedef std::vector< art::Ptr > TrackVector; - typedef std::vector< art::Ptr > ShowerVector; - typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - /** - * @brief Constructor - * - * @param pset the set of input fhicl parameters - */ - SinglePhoton(fhicl::ParameterSet const &pset); - - /** - * @brief Configure memeber variables using FHiCL parameters - * - * @param pset the set of input fhicl parameters - */ - void reconfigure(fhicl::ParameterSet const &pset); - - /** - * @brief Analyze an event! - * - * @param evt the art event to analyze - */ - bool filter(art::Event &evt) override; - - /** - * @brief Begin the job, setting up ! - * - */ - void beginJob() override; - - /** - * @brief End the job, setting down ! - * - */ - void endJob() override; - /** - * @brief: grab run, subrun number, and subrun POT, fill the TTree */ - bool beginSubRun(art::SubRun& sr) override; - bool endSubRun(art::SubRun& sr) override; - - private: - /** - * @brief: reset/clear data members - */ - void ClearVertex(); - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleHandle the handle for the PFParticle collection - * @param pfParticleMap the mapping from ID to PFParticle - */ - void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); - - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ - void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; - - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleMap the mapping from ID to PFParticle - * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis - * @param nuParticles a vector to hold the final-states of the reconstruced neutrino - */ - void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); - - /** - * @brief Collect associated tracks and showers to particles in an input particle vector - * - * @param particles a vector holding PFParticles from which to find the associated tracks and showers - * @param pfParticleHandle the handle for the PFParticle collection - * @param evt the art event to analyze - * @param tracks a vector to hold the associated tracks - * @param showers a vector to hold the associated showers - */ - void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief: analyze associated tracks/showers for an PFParticle - * @param: pParticle: PFParticle to be analyzed - * @param: associatedTracks: a vector of asso track for pParticle - * @param: associatedShowers: a vector of asso shower for pParticle - * @param: tracks: associated track will be added into tracks - * @param: showers: associated shower will be added into showers - * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle - */ - void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief: get vertex for particle - * @param: particle: a primary neutrino - */ - void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); - - void CollectCalo(const art::Event &evt,const art::Ptr &shower); - - - /* - *@brief Calculated the shower energy by looping over all the hits and summing the charge - *@param hits - an art pointer of all the hits in a shower - * */ - double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ - double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ - - int getNHitsPlane(std::vector> hits, int this_plane); - double getMeanHitWidthPlane(std::vector> hits, int this_plane); - - - /** - *@brief Takes a hit and multiplies the charge by the gain - *@param thishitptr art pointer to a hit - *@param plane the plane the hit is on - **/ - double GetQHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV for a given hit - * @param thishit - an individual hit - * - * - * */ - double QtoEConversionHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV from a given Q value - * @param q - the charge value - * - * */ - double QtoEConversion(double q); - - - /** - *@brief Takes a vector of dQ/dx values and converts to dE/dx - *@param dqdx - vector of dqdx points - * - * */ - std::vector CalcdEdxFromdQdx(std::vector dqdx); - - /** - * - *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane - *@param shower - a Pandora shower - *@param clusters - all of the clusters in the shower - *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster - *@param plane - a single plane - * * */ - - std::vector CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane); - /** - *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) - *@param shower_dir - the 3D shower direction - *@param plane - a single plane - * */ - double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ - double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - - double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ - int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - - double degToRad(double deg); - double radToDeg(double rad); - /** - *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction - *@param cluster_start - the start position of a cluster in CM - *@param cluster_axis - calculated from the cluster end minus the cluster start - *@param width - typically ~1cm - *@param length - typically a few cm - * - * */ - std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); - - /** - *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle - *@param thishit_pos - 2d location of a hit in cm - *@param rectangle - vector of the positions of the four corners of the rectangle - * - * */ - bool insideBox(std::vector thishit_pos, std::vector> rectangle); - - /** - * - *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary - *uses triangle area check - * - * */ - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - - double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); - - /*** - *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 - *@param thisvector - vector of doubles - * - * */ - double getMedian(std::vector thisvector); - - - //---------------- Templatees ---------------------------- - void AnalyzeTemplates(); - void ClearTemplates(); - void ResizeTemplates(size_t); - void CreateTemplateBranches(); - - //---------------- Potential Track Stub -------------------- - void ClearStubs(); - void CreateStubBranches(); - - /* @brief: given indices of clusters, determine if they overlap in time - * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters - * candidate_indices provided the indices of clusters of which we'd like to check the overlap - */ - std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information - * @brief: candidate clusters on different plane that overlap in time tick will be grouped together - * @return: return.first -> number of possible matches - * return.second.first -> 2D vector, indices of clusters in every possible match - * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match - */ - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - - //---------------- SecondShower---- - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ - - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ - - void SimpleSecondShowerCluster(); - - - void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); - - - /* this function is now redundant, not in use anymore */ - void SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - - /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits - * and return a vector of 7 elements: - * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} - */ - std::vectorSecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - - /* analyze a cluster of hits, and return corresponding sss_score */ - sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); - - /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits - * This function is currently used in function 'SecondShowerSearch' - * @parameter: plane, cluster are not in use - * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire - */ - TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); - - - /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ - int CompareToShowers(int,int,std::vector>& hitz,double,double, - const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); - //---------------- Isolation ----------------- - - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ - - /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ - void IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap); - - - - //---------------- Flashes ---------------------------- - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); - - // void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h); - - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ - - //---------------- Tracks ---------------------------- - /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ - void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, - std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap - ); - - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ - void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); - - - /* @brief: analyze MCParticle related to recob::Track if it has one - * variables starting with 'm_sim_track_' will be updated - * */ - void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector& vec); - - - /* collect information from anab::sParticleIDAlgScores of reco track */ - void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); - TGraph proton_length2energy_tgraph; - - //---------------- Showers ---------------------------- - - void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap - ); - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, - std::map,art::Ptr> & pfptotrkmap, - std::map,std::vector>> & trktocalomap, - std::map, std::vector>> & pfParticleToHitMap - ); - - void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector); - - /** - * @brief: match showers to MCParticles - * @arguments filled during function execution: - * mcParticleVector: vector of mother particles of showers - * objectToMCParticleMap: map of shower to its mother particle - */ - void showerRecoMCmatching(std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap); - - - /* tranverse through mcParticleVector, and print out infos for photons */ - int photoNuclearTesting(std::vector>& mcParticleVector); - - // ------------ Fid Volume and SCB------------------------- // - double m_tpc_active_x_low; - double m_tpc_active_x_high; - double m_tpc_active_y_low; - double m_tpc_active_y_high; - double m_tpc_active_z_low ; - double m_tpc_active_z_high; - - double m_SCB_YX_TOP_y1_array; - std::vector m_SCB_YX_TOP_x1_array; - std::vector m_SCB_YX_TOP_y2_array; - double m_SCB_YX_TOP_x2_array; - double m_SCB_YX_BOT_y1_array; - std::vector m_SCB_YX_BOT_x1_array; - std::vector m_SCB_YX_BOT_y2_array; - double m_SCB_YX_BOT_x2_array; - - double m_SCB_ZX_Up_z1_array ; - double m_SCB_ZX_Up_x1_array ; - double m_SCB_ZX_Up_z2_array ; - double m_SCB_ZX_Up_x2_array ; - - double m_SCB_ZX_Dw_z1_array; - std::vector m_SCB_ZX_Dw_x1_array; - std::vector m_SCB_ZX_Dw_z2_array; - double m_SCB_ZX_Dw_x2_array; - - int isInTPCActive(std::vector&); /* if point is in active TPC volume */ - int isInTPCActive(double cut,std::vector&); - double distToTPCActive(std::vector&vec); /* if point in active TPC, returns distance from point to closest TPC wall - * otherwise, returns -999 */ - - int isInSCB(std::vector&); /* if point is inside SCB */ - int isInSCB(double cut,std::vector&); - int distToSCB(double & dist, std::vector &vec); /* calc the minimum distance from point to the SC boundary,save to dist. - * return value (0, or 1) indicates whether the point is in SCB */ - int setTPCGeom(); - /* This function is wrong, and Not used */ - bool loadSCB_YX(std::vector&zpolygons); - - //---------------- MCTruths ---------------------------- - - /** - * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) - */ - void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); - - std::map is_delta_map; - - //---------------- EventWeight ---------------------------- - - /** - * @brief: fill event weight related variables */ - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ - - //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. - - - //---------------- Geant4 ---------------------------- - - /** - * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); - - - - - - /** - * @brief: given an event and a label, collect all the SimChannel with that label - * @ param: simChannelVector: a vector of SimChannel [to be filled] - */ - void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); - - /** - * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use - * @param: evt: event, label: given label - * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] - * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] - * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] - */ - void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); - void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); - - - //-------------- Slices/Pandora Metadata ---------------// - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - //void CreateMatchedSliceBranches(); - - - /** - * brief: analyze metadata of PFParticles, and fill in all these maps - * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap - * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby - */ - void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> & primaryPFPSliceIdVec, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap); - - // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumPFPsMap ); - - std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ - //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); - - /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ - int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - - int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - //can also look at things like shower energy, conversion length, etc. - - - /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ - std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap ); - // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - // std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumShowersMap ); - - - /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ - std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap); - - /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info - * to determine how many eligible tracks and showers there are in the event - */ - void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap, - std::map, int>& PFPToSliceIdMap); - - - void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); - - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - //------- matched shower ------------------------------------- - - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - - - - //------------------ Delaunay triangle tools -----------// - - double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ - int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found - * and total area of these triangles, - * save to num_triangles & area */ - int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ - - // given a MCParticle, get its corrected vertex - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); - int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); - // given a particle, and input location calculate its corrected true position, so we can compare it to reco - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); - - //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 - std::vector> bad_channel_list_fixed_mcc9; - std::map bad_channel_map_fixed_mcc9; - - - /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ - bool IsEventInList(int run, int subrun, int event); - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - std::string m_badChannelLabel; - std::string m_badChannelProducer; - std::string m_mcTrackLabel; - std::string m_mcShowerLabel; - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer; - std::ofstream out_stream; - - double m_mass_pi0_mev; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - detinfo::DetectorProperties const * theDetector ;// = lar::providerFrom(); - detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); - spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - //double m_gain; - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - - int m_Cryostat; - int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - - bool bool_make_sss_plots; - - - //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - - - int m_reco_asso_showers; - - double m_reco_vertex_to_nearest_dead_wire_plane0; - double m_reco_vertex_to_nearest_dead_wire_plane1; - double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - int m_reco_num_templates; - std::vector m_reco_template; /* temp comment: does not seem to be used */ - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - - double m_CRT_dt; //time between flash and nearest CRT hit - - //------------ Track related Variables ------------- - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - // ---- corresponding variables on the best plane of reco track, which is defined as such------ - // if plane 2 have good hits, then plane 2 is the best-plane - // otherwise, which plane of plane 0 and 1 has more good hits will be best plane - // if none of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - - std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ - std::vector m_reco_track_end_to_nearest_dead_wire_plane1; - std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - /* event origin types: - * kUnknown: ??? - * kBeamNeutrino: Beam neutrinos. - * kCosmicRay: Cosmic rays. - * kSuperNovaNeutrino: Supernova neutrinos. - * kSingleParticle: single particles thrown at the detector - */ - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - * if there is no shower hits, set to 999 - * if there is shower hits but no track hits, set to -999 - */ - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - * set to -999 if there is no unassociated hits or track hits on plane - */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - * on each plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - - /*-------------------------------------------------------------------------------------*/ - - //------------ Shower related Variables ------------- - - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - - std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ - std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - //end flash matching - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - - - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - - - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - * plane 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - - - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - - double m_mctruth_leading_exiting_proton_energy; - - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - - - int m_mctruth_num_reconstructable_protons; - - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - * close enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - - - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - - - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - - double _time2cm;//value modeled from David's shower code - - // PID-related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - //Geant4 - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; - - - - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ - bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ - }; - - DEFINE_ART_MODULE(SinglePhoton) - -} // namespace lar_pandora -#endif -//------------------------------------------------------------------------------------------------------------------------------------------ -// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/ref/TruncMean.h b/sbncode/SinglePhotonAnalysis/ref/TruncMean.h deleted file mode 100644 index b8dbf1d09..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/TruncMean.h +++ /dev/null @@ -1,260 +0,0 @@ -/** - * \file TruncMean.h - * - * \ingroup 3DMichel - * - * \brief Class def header for a class TruncMean - * - * @author david caratelli [davidc@fnal.gov] - * Written 08/02/2018. - */ - -#ifndef TRUNCMEAN_H -#define TRUNCMEAN_H - -#include -#include -#include -#include -#include -#include - -/** - \class TruncMean - The truncated mean class allows to compute the following quantities - 1) the truncated mean profile of an ordered vector of values, such as - the charge profile along a particle's track. - To create such a profile use the function CalcTruncMeanProfile() - 2) Get the truncated mean value of a distribution. This function - iteratively hones in on the truncated mean of a distribution by - updating the mean and cutting the tails after each iteration. - For this functionality use CalcIterativeTruncMean() - doxygen documentation! -*/ - -static const double kINVALID_FLOAT = std::numeric_limits::max(); - -class TruncMean{ - - public: - - /// Default constructor - TruncMean(){} - - /// Default destructor - ~TruncMean(){} - - /** - @brief Given residual range and dq vectors return truncated local dq. - Input vectors are assumed to be match pair-wise (nth entry in rr_v - corresponds to nth entry in dq_v vector). - Input rr_v values are also assumed to be ordered: monotonically increasing - or decreasing. - For every dq value a truncated linear dq value is calculated as follows: - 0) all dq values within a rr range set by the class variable _rad are selected. - 1) the median and rms of these values is calculated. - 2) the subset of local dq values within the range [median-rms, median+rms] is selected. - 3) the resulting local truncated dq is the average of this truncated subset. - @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) - @input std::vector dq_v -> vector of measured values for which truncated profile is requested - (i.e. charge profile of a track) - @input std::vector dq_trunc_v -> passed by reference -> output stored here - @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation - */ - void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma = 1); - - /** - @brief Iteratively calculate the truncated mean of a distribution - @brief: mean is returned if vecter's size is too small, or reach the max iteration, or median has converged - @input std::vector v -> vector of values for which truncated mean is asked - @input size_t nmin -> minimum number of iterations to converge on truncated mean - @input size_t nmax -> maximum number of iterations to converge on truncated mean - @input size_t lmin -> minimum number of entries in vector before exiting and returning current value - @input size_t currentiteration -> current iteration - @input double convergencelimit -> fractional difference between successive iterations - under which the iteration is completed, provided nmin iterations have occurred. - @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. - */ - double CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed = kINVALID_FLOAT); - - /** - @brief Set the smearing radius over which to take hits for truncated mean computaton. - */ - void setRadius(const double& rad) { _rad = rad; } - - private: - - double Mean (const std::vector& v); - double Median(const std::vector& v); - double RMS (const std::vector& v); - - /** - Smearing radius over which charge from neighboring hits is scanned to calculate local - truncated mean - */ - double _rad; - -}; - -double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed) -{ - - auto const& mean = Mean(v); - auto const& med = Median(v); - auto const& rms = RMS(v); - - // if the vector length is below the lower limit -> return - if (v.size() < lmin) - return mean; - - // if we have passed the maximum number of iterations -> return - if (currentiteration >= nmax) - return mean; - - // if we passed the minimum number of iterations and the mean is close enough to the old value - double fracdiff = fabs(med-oldmed) / oldmed; - if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) - return mean; - - // if reached here it means we have to go on for another iteration - - // cutoff tails of distribution surrounding the mean - // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom - // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions - v.erase( std::remove_if( v.begin(), v.end(), - [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed - v.end()); - - return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); -} - -void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma) -{ - - // how many points to sample - int Nneighbor = (int)(_rad * 3 * 2); - - dq_trunc_v.clear(); - dq_trunc_v.reserve( rr_v.size() ); - - int Nmax = dq_v.size()-1; - - for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size - - // current residual range - double rr = rr_v.at(n); - - int nmin = n - Nneighbor; - int nmax = n + Nneighbor; - - if (nmin < 0) nmin = 0; - if (nmax > Nmax) nmax = Nmax; - - // vector for local dq values - std::vector dq_local_v; - - for (int i=nmin; i < nmax; i++) { - - double dr = rr - rr_v[i]; - if (dr < 0) dr *= -1; - - if (dr > _rad) continue; - - dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough - - }// for all ticks we want to scan - - if (dq_local_v.size() == 0 ) { - dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself - continue; - } - - // calculate median and rms - double median = Median(dq_local_v); - double rms = RMS(dq_local_v); - - double truncated_dq = 0.; - int npts = 0; - for (auto const& dq : dq_local_v) { - if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ - truncated_dq += dq; - npts += 1; - } - } - - dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma - - if(dq_trunc_v.back() != dq_trunc_v.back()){ - std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) -{ - - double mean = 0.; - for (auto const& n : v) mean += n; - mean /= v.size(); - - return mean; -} - -double TruncMean::Median(const std::vector& v) -{ - - if (v.size() == 1) return v[0]; - - std::vector vcpy = v; - - std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order - - double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice - - return median; -} - -double TruncMean::RMS(const std::vector& v) -{ - - if(v.size()==1) return v.front(); - - double avg = 0.; - for (auto const& val : v) avg += val; - avg /= v.size(); - double rms = 0.; - for (auto const& val : v) rms += (val-avg)*(val-avg); - rms = sqrt( rms / ( v.size() - 1 ) ); - - - if(rms!=rms){ - std::cout<<"ERROR || TruncMean::RMS || is returning nan."<Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); - //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); - //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); - - //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); - eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); - eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); - eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); - eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); - eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); - eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); - eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); - eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); - std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"< > mcFluxHandle; - e.getByLabel("generator", mcFluxHandle); - if (!mcFluxHandle.isValid()) return; - std::vector< art::Ptr > mcFluxVec; - art::fill_ptr_vector(mcFluxVec, mcFluxHandle); - if (mcFluxVec.size() == 0){ - std::cout << ">> No MCFlux information" << std::endl; - return; - } - - art::Handle< std::vector > mcTruthHandle; - e.getByLabel("generator", mcTruthHandle); - if (!mcTruthHandle.isValid()) return; - std::vector< art::Ptr > mcTruthVec; - art::fill_ptr_vector(mcTruthVec, mcTruthHandle); - if (mcTruthVec.size() == 0){ - std::cout << ">> No MCTruth information" << std::endl; - return; - } - - art::Handle< std::vector< simb::GTruth > > gTruthHandle; - e.getByLabel("generator", gTruthHandle); - if (!gTruthHandle.isValid()) return; - std::vector< art::Ptr > gTruthVec; - art::fill_ptr_vector(gTruthVec, gTruthHandle); - if (gTruthVec.size() == 0){ - std::cout << ">> No GTruth information" << std::endl; - return; - } - - const art::Ptr mcFlux = mcFluxVec.at(0); - const art::Ptr mcTruth = mcTruthVec.at(0); - const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); - const art::Ptr gTruth = gTruthVec.at(0); - - m_run_number_eventweight = e.run(); - m_subrun_number_eventweight = e.subRun(); - m_event_number_eventweight = e.event(); - - // possibly the wrong variables, but let's see for now... - //m_mcflux_evtno = mcFlux->fevtno; - m_mcflux_nu_pos_x = nu.Vx(); - m_mcflux_nu_pos_y = nu.Vy(); - m_mcflux_nu_pos_z = nu.Vz(); - m_mcflux_nu_mom_x = nu.Px(); - m_mcflux_nu_mom_y = nu.Py(); - m_mcflux_nu_mom_z = nu.Pz(); - m_mcflux_nu_mom_E = nu.E(); - m_mcflux_ntype = mcFlux->fntype; - m_mcflux_ptype = mcFlux->fptype; - m_mcflux_nimpwt = mcFlux->fnimpwt; - m_mcflux_dk2gen = mcFlux->fdk2gen; - m_mcflux_nenergyn = mcFlux->fnenergyn; - m_mcflux_tpx = mcFlux->ftpx; - m_mcflux_tpy = mcFlux->ftpy; - m_mcflux_tpz = mcFlux->ftpz; - m_mcflux_tptype = mcFlux->ftptype; - m_mcflux_vx = mcFlux->fvx; - m_mcflux_vy = mcFlux->fvy; - m_mcflux_vz = mcFlux->fvz; - - // loop MCParticle info for m_mctruth object - - m_mctruth_nparticles = mcTruth->NParticles(); - - for (int i = 0; i < m_mctruth_nparticles; i++){ - - const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); - - m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); - m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); - m_mctruth_particles_mother[i] = mcParticle.Mother(); - m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); - m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); - - for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ - - const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); - m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); - - } - - m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); - m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); - m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); - m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); - m_mctruth_particles_px0[i] = mcParticle.Px(0); - m_mctruth_particles_py0[i] = mcParticle.Py(0); - m_mctruth_particles_pz0[i] = mcParticle.Pz(0); - m_mctruth_particles_e0[i] = mcParticle.E(0); - m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); - m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); - m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); - m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); - } - - const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); - - m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); - m_mctruth_neutrino_mode = mcNeutrino.Mode(); - m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); - m_mctruth_neutrino_target = mcNeutrino.Target(); - m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); - m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); - m_mctruth_neutrino_w = mcNeutrino.W(); - m_mctruth_neutrino_x = mcNeutrino.X(); - m_mctruth_neutrino_y = mcNeutrino.Y(); - m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); - - m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; - m_gtruth_tgt_pdg = gTruth->ftgtPDG; - m_gtruth_tgt_A = gTruth->ftgtA; - m_gtruth_tgt_Z = gTruth->ftgtZ; - m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); - m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); - m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); - m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); - - m_gtruth_weight = gTruth->fweight; - m_gtruth_probability = gTruth->fprobability; - m_gtruth_xsec = gTruth->fXsec; - m_gtruth_diff_xsec = gTruth->fDiffXsec; - m_gtruth_gphase_space = gTruth->fGPhaseSpace; - - m_gtruth_vertex_x = gTruth->fVertex.X(); - m_gtruth_vertex_y = gTruth->fVertex.Y(); - m_gtruth_vertex_z = gTruth->fVertex.Z(); - m_gtruth_vertex_T = gTruth->fVertex.T(); - m_gtruth_gscatter = gTruth->fGscatter; - m_gtruth_gint = gTruth->fGint; - m_gtruth_res_num = gTruth->fResNum; - m_gtruth_num_piplus = gTruth->fNumPiPlus; - m_gtruth_num_pi0 = gTruth->fNumPi0; - m_gtruth_num_piminus = gTruth->fNumPiMinus; - m_gtruth_num_proton = gTruth->fNumProton; - m_gtruth_num_neutron = gTruth->fNumNeutron; - m_gtruth_is_charm = gTruth->fIsCharm; - m_gtruth_is_strange = gTruth->fIsStrange; - m_gtruth_decay_mode = gTruth->fDecayMode; - m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; - m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; - m_gtruth_gx = gTruth->fgX; - m_gtruth_gy = gTruth->fgY; - m_gtruth_gt = gTruth->fgT; - m_gtruth_gw = gTruth->fgW; - m_gtruth_gQ2 = gTruth->fgQ2; - m_gtruth_gq2 = gTruth->fgq2; - m_gtruth_probe_pdg = gTruth->fProbePDG; - m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); - m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); - m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); - m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); - m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); - m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); - m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); - m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); - m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; - m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); - m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); - m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); - m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); - - //moved to inside singlphoontmodule.cc for filter reasons - //eventweight_tree->Fill(); - std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<Branch("geant4_pdg",&m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_geant4_px); - geant4_tree->Branch("geant4_py", &m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_geant4_process); - - - } - - void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< mcp = mcParticleVector[j]; - std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()); - m_geant4_trackid.push_back(mcp->TrackId()); - m_geant4_statuscode.push_back(mcp->StatusCode()); - m_geant4_mother.push_back(mcp->Mother()); - m_geant4_E.push_back(mcp->E()); - m_geant4_mass.push_back(mcp->Mass()); - m_geant4_px.push_back(mcp->Px()); - m_geant4_py.push_back(mcp->Py()); - m_geant4_pz.push_back(mcp->Pz()); - m_geant4_vx.push_back(mcp->Vx()); - m_geant4_vy.push_back(mcp->Vy()); - m_geant4_vz.push_back(mcp->Vz()); - m_geant4_end_process.push_back(mcp->EndProcess()); - m_geant4_process.push_back(mcp->Process()); - m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - - - - if(j>2)break; - - } - - - } -} diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h deleted file mode 100644 index c15ef16b7..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/analyze_MCTruth.h +++ /dev/null @@ -1,685 +0,0 @@ -#include "SinglePhoton_module.h" - -namespace single_photon -{ - void SinglePhoton::ClearMCTruths(){ - m_mctruth_num = 0; - m_mctruth_origin = -99; - m_mctruth_mode = -99; - m_mctruth_interaction_type = -99; - m_mctruth_nu_vertex_x = -9999; - m_mctruth_nu_vertex_y = -9999; - m_mctruth_nu_vertex_z = -9999; - m_mctruth_reco_vertex_dist = -9999; - m_mctruth_ccnc = -99; - m_mctruth_qsqr = -99; - m_mctruth_nu_E = -99; - m_mctruth_nu_pdg = 0; - m_mctruth_lepton_pdg = 0; - m_mctruth_num_daughter_particles = -99; - m_mctruth_daughters_pdg.clear(); - m_mctruth_daughters_E.clear(); - - m_mctruth_daughters_status_code.clear(); - m_mctruth_daughters_trackID.clear(); - m_mctruth_daughters_mother_trackID.clear(); - m_mctruth_daughters_px.clear(); - m_mctruth_daughters_py.clear(); - m_mctruth_daughters_pz.clear(); - m_mctruth_daughters_startx.clear(); - m_mctruth_daughters_starty.clear(); - m_mctruth_daughters_startz.clear(); - m_mctruth_daughters_time.clear(); - m_mctruth_daughters_endx.clear(); - m_mctruth_daughters_endy.clear(); - m_mctruth_daughters_endz.clear(); - m_mctruth_daughters_endtime.clear(); - m_mctruth_daughters_process.clear(); - m_mctruth_daughters_end_process.clear(); - - - m_mctruth_is_delta_radiative = 0; - m_mctruth_delta_radiative_1g1p_or_1g1n = -999; - - m_mctruth_delta_photon_energy=-999; - m_mctruth_delta_proton_energy=-999; - m_mctruth_delta_neutron_energy=-999; - - m_mctruth_num_exiting_photons =0; - m_mctruth_num_exiting_protons =0; - m_mctruth_num_exiting_pi0 =0; - m_mctruth_num_exiting_pipm =0; - m_mctruth_num_exiting_neutrons=0; - m_mctruth_num_exiting_delta0=0; - m_mctruth_num_exiting_deltapm=0; - m_mctruth_num_exiting_deltapp=0; - - m_mctruth_num_reconstructable_protons = 0; - - m_mctruth_is_reconstructable_1g1p = 0; - m_mctruth_is_reconstructable_1g0p = 0; - - m_mctruth_leading_exiting_proton_energy = -9999; - - m_mctruth_exiting_pi0_E.clear(); - m_mctruth_exiting_pi0_mom.clear(); - m_mctruth_exiting_pi0_px.clear(); - m_mctruth_exiting_pi0_py.clear(); - m_mctruth_exiting_pi0_pz.clear(); - - m_mctruth_pi0_leading_photon_energy = -9999; - m_mctruth_pi0_subleading_photon_energy = -9999; - m_mctruth_pi0_leading_photon_end_process = "none"; - m_mctruth_pi0_subleading_photon_end_process = "none"; - m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_exiting_TPC = -999; - m_mctruth_pi0_subleading_photon_exiting_TPC = -999; - m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; - - m_mctruth_exiting_delta0_num_daughters.clear(); - - m_mctruth_exiting_photon_mother_trackID.clear(); - m_mctruth_exiting_photon_trackID.clear(); - m_mctruth_exiting_photon_from_delta_decay.clear(); - m_mctruth_exiting_photon_energy.clear(); - m_mctruth_exiting_photon_px.clear(); - m_mctruth_exiting_photon_py.clear(); - m_mctruth_exiting_photon_pz.clear(); - - m_mctruth_exiting_proton_mother_trackID.clear(); - m_mctruth_exiting_proton_trackID.clear(); - m_mctruth_exiting_proton_from_delta_decay.clear(); - m_mctruth_exiting_proton_energy.clear(); - m_mctruth_exiting_proton_px.clear(); - m_mctruth_exiting_proton_py.clear(); - m_mctruth_exiting_proton_pz.clear(); - - m_mctruth_exiting_neutron_mother_trackID.clear(); - m_mctruth_exiting_neutron_trackID.clear(); - m_mctruth_exiting_neutron_from_delta_decay.clear(); - m_mctruth_exiting_neutron_energy.clear(); - m_mctruth_exiting_neutron_px.clear(); - m_mctruth_exiting_neutron_py.clear(); - m_mctruth_exiting_neutron_pz.clear(); - - } - - void SinglePhoton::ResizeMCTruths(size_t size){ - m_mctruth_daughters_pdg.resize(size); - m_mctruth_daughters_E.resize(size); - m_mctruth_daughters_status_code.resize(size); - m_mctruth_daughters_trackID.resize(size); - m_mctruth_daughters_mother_trackID.resize(size); - m_mctruth_daughters_px.resize(size); - m_mctruth_daughters_py.resize(size); - m_mctruth_daughters_pz.resize(size); - m_mctruth_daughters_startx.resize(size); - m_mctruth_daughters_starty.resize(size); - m_mctruth_daughters_startz.resize(size); - m_mctruth_daughters_time.resize(size); - m_mctruth_daughters_endx.resize(size); - m_mctruth_daughters_endy.resize(size); - m_mctruth_daughters_endz.resize(size); - m_mctruth_daughters_endtime.resize(size); - m_mctruth_daughters_end_process.resize(size); - m_mctruth_daughters_process.resize(size); - - } - - //add into vertex tree? - void SinglePhoton::CreateMCTruthBranches(){ - vertex_tree->Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); - vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); - vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); - vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); - vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); - vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); - vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); - vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); - vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); - vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); - vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); - vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); - vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); - vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); - vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); - vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); - - - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); - vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); - vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); - vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); - vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); - - vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); - vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); - vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); - vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); - - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); - vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); - vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); - vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); - vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); - vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); - - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); - } - - void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ - m_mctruth_num = mcTruthVector.size(); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Starting to analyze "<1){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< truth = mcTruthVector[i]; - - - m_mctruth_origin = truth->Origin(); - if(m_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ - if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); - if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); - if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); - if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); - if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); - if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); - if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); - if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); - if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); - // get corrected lepton position - this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); - - m_mctruth_nu_vertex_x = corrected[0]; - m_mctruth_nu_vertex_y = corrected[1]; - m_mctruth_nu_vertex_z = corrected[2]; - m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); - - } - - - - if(m_is_verbose) std::cout<<"We are working with : "; - m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles - if(m_is_verbose) std::cout<ResizeMCTruths(m_mctruth_num_daughter_particles); - - - //some temp variables to see if its 1g1p or 1g1n - int tmp_n_photons_from_delta = 0; - int tmp_n_protons_from_delta = 0; - int tmp_n_neutrons_from_delta = 0; - - - m_mctruth_leading_exiting_proton_energy = -9999; - - for(int j=0; j< m_mctruth_num_daughter_particles; j++){ - - const simb::MCParticle par = truth->GetParticle(j); - m_mctruth_daughters_pdg[j] = par.PdgCode(); - m_mctruth_daughters_E[j] = par.E(); - - m_mctruth_daughters_status_code[j] = par.StatusCode(); - m_mctruth_daughters_trackID[j] = par.TrackId(); - m_mctruth_daughters_mother_trackID[j] = par.Mother(); - m_mctruth_daughters_px[j] = par.Px(); - m_mctruth_daughters_py[j] = par.Py(); - m_mctruth_daughters_pz[j] = par.Pz(); - m_mctruth_daughters_startx[j] = par.Vx(); - m_mctruth_daughters_starty[j] = par.Vy(); - m_mctruth_daughters_startz[j] = par.Vz(); - m_mctruth_daughters_time[j] = par.T(); - m_mctruth_daughters_endx[j] = par.EndX(); - m_mctruth_daughters_endy[j] = par.EndY(); - m_mctruth_daughters_endz[j] = par.EndZ(); - m_mctruth_daughters_endtime[j] = par.EndT(); - m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string - m_mctruth_daughters_end_process[j] = par.EndProcess(); - - if(m_is_textgen) continue; //quick hack, fix in files - - switch(m_mctruth_daughters_pdg[j]){ - case(22): // if it's a gamma - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_photons++; - m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); - m_mctruth_exiting_photon_energy.push_back(par.E()); - m_mctruth_exiting_photon_px.push_back(par.Px()); - m_mctruth_exiting_photon_py.push_back(par.Py()); - m_mctruth_exiting_photon_pz.push_back(par.Pz()); - } - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); - - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_photon_energy = par.E(); - tmp_n_photons_from_delta ++; - m_mctruth_is_delta_radiative++; - } - } - } - break; - case(111): // if it's a pi0 - { - // Make sure the pi0 actually exits the nucleus - if (par.StatusCode() == 1) { - m_mctruth_exiting_pi0_E.push_back(par.E()); - m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); - m_mctruth_exiting_pi0_px.push_back(par.Px()); - m_mctruth_exiting_pi0_py.push_back(par.Py()); - m_mctruth_exiting_pi0_pz.push_back(par.Pz()); - m_mctruth_num_exiting_pi0++; - } - break; - } - case(211): - case(-211): // it's pi+ or pi- - if (par.StatusCode() == 1) { - m_mctruth_num_exiting_pipm++; - } - break; - case(2212): // if it's a proton - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_protons++; - m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); - m_mctruth_exiting_proton_energy.push_back(par.E()); - m_mctruth_exiting_proton_px.push_back(par.Px()); - m_mctruth_exiting_proton_py.push_back(par.Py()); - m_mctruth_exiting_proton_pz.push_back(par.Pz()); - } - - - if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_proton_energy = par.E(); - tmp_n_protons_from_delta ++; - } - } - - - break; - } - case(2112): // if it's a neutron - { - - m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it - m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); - m_mctruth_exiting_neutron_energy.push_back(par.E()); - m_mctruth_exiting_neutron_px.push_back(par.Px()); - m_mctruth_exiting_neutron_py.push_back(par.Py()); - m_mctruth_exiting_neutron_pz.push_back(par.Pz()); - - if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_neutron_energy = par.E(); - tmp_n_neutrons_from_delta ++; - } - } - } - - break; - case(-2224): - case(2224): - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } - break; - case(-2214): - case(2214): - case(-1114): - case(1114): // if it's delta-, or delta+ - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } - break; - case(-2114): - case(2114): // if it's delta0 - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_delta0++; - m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ - m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; - } - } - - - - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t This event is "; - if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ - m_mctruth_delta_radiative_1g1p_or_1g1n = 1; - std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ - m_mctruth_num_reconstructable_protons++; - - }//if g above threshold - } - - //if it's a true delta radiative event, check the energies - - - - if (m_mctruth_is_delta_radiative==true){ - for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ - m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. - - }//if g above threshold - }//for all exiting g - for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ - if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ - //if it's already 1g1p then we've found a 1g2p which we aren't counting - // Guanqun: limit to only 1 reconstructable proton? - if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ - m_mctruth_is_reconstructable_1g1p = false; - } - //if there's a photon then it's actually a 1g1p - if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ - m_mctruth_is_reconstructable_1g1p = true; - m_mctruth_is_reconstructable_1g0p = false; - } - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); - - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); - - if(m_is_verbose){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; - mymap[mcp->TrackId()] = k; - } - - - //Just some VERY hacky pi^0 photon stuff - int npi0check = 0; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; - - if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; - - // if it's a pi0, its mother trackID is 0 and it has two daughters - if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ - npi0check++; - // get its two daughters - const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; - const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; - - if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); - double e2 = dau2->E(); - - std::vector raw_1_End ={dau1->EndX(), dau1->EndY(), dau1->EndZ()}; - std::vector raw_1_Start ={dau1->Vx(), dau1->Vy(), dau1->Vz()}; - - std::vector raw_2_End ={dau2->EndX(), dau2->EndY(), dau2->EndZ()}; - std::vector raw_2_Start ={dau2->Vx(), dau2->Vy(), dau2->Vz()}; - - std::vector corrected_1_start(3), corrected_2_start(3); - std::vector corrected_1_end(3), corrected_2_end(3); - - this->spacecharge_correction(dau1, corrected_1_start, raw_1_Start); - this->spacecharge_correction(dau1, corrected_1_end, raw_1_End); - - this->spacecharge_correction(dau2, corrected_2_start, raw_2_Start); - this->spacecharge_correction(dau2, corrected_2_end, raw_2_End); - - for(int p1=0; p1NumberDaughters();p1++){ - auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; - std::cout<<"Post1 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<NumberDaughters();p1++){ - auto dd = mcParticleVector[mymap[dau2->Daughter(p1)]]; - std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<isInTPCActive(corrected_1_end); - int exit2 = this->isInTPCActive(corrected_2_end); - - if(e2EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_1_start; - m_mctruth_pi0_leading_photon_end = corrected_1_end; - m_mctruth_pi0_subleading_photon_start = corrected_2_start; - m_mctruth_pi0_subleading_photon_end = corrected_2_end; - //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! - m_mctruth_pi0_leading_photon_exiting_TPC =exit1; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; - m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; - - }else{ - m_mctruth_pi0_leading_photon_energy = e2; - m_mctruth_pi0_subleading_photon_energy = e1; - m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_2_start; - m_mctruth_pi0_leading_photon_end = corrected_2_end; - m_mctruth_pi0_subleading_photon_start = corrected_1_start; - m_mctruth_pi0_subleading_photon_end = corrected_1_end; - m_mctruth_pi0_leading_photon_exiting_TPC = exit2; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; - m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; - - } - - } - } - - if(npi0check>1) std::cout<<"WARNING WARNING!!!! there are "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); - vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); - } - - - void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ - - // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){ - - - for(auto pair: crtvetoToFlashMap){ - std::cout<<"for flash at time "<< pair.first->Time()<<" has "<< pair.second.size() << " associated CRT hits "< 0){ - for (auto hit: pair.second){ - std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); - } - - } - m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits - } - - size_t flash_size = flashes.size(); - m_reco_num_flashes = flash_size; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; - - this->ResizeFlashes(flash_size); - - for(size_t i = 0; i < flash_size; ++i) { - - - art::Ptr const & flash = flashes[i]; - - m_reco_flash_total_pe[i]=(flash->TotalPE()); - m_reco_flash_time[i]=(flash->Time()); - m_reco_flash_time_width[i]=flash->TimeWidth(); - m_reco_flash_abs_time[i]=flash->AbsTime(); - m_reco_flash_frame[i]=flash->Frame(); - m_reco_flash_ycenter[i]=flash->YCenter(); - m_reco_flash_ywidth[i]=flash->YWidth(); - m_reco_flash_zcenter[i]=flash->ZCenter(); - m_reco_flash_zwidth[i]=flash->ZWidth(); - - // m_beamgate_flash_end/m_beamgate_flash_start are read from pset - if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ - m_reco_num_flashes_in_beamgate++; - m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); - m_reco_flash_time_in_beamgate[i]=(flash->Time()); - m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); - m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); - } - - - - } - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); - - double _dt_abs = 100000.0; - // double _within_resolution = 0; - double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? - - // Loop over the CRT hits. - for (int j = 0; j < _nCRThits_in_event; j++) - { - /* - if (verbose) - std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; - */ - double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); - - // Fill the vector variables. - m_CRT_hits_time.push_back(_crt_time_temp); - m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); - m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); - m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); - m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); - - if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) - { - _dt_abs = fabs(_beam_flash_time - _crt_time_temp); - m_CRT_dt = _beam_flash_time - _crt_time_temp; - m_CRT_min_hit_time = _crt_time_temp; - // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. - if (_dt_abs < m_Resolution) - { - //_within_resolution = 1; - // Set the position information and the intensity of the CRT hit. - m_CRT_min_hit_PE = crthit_h->at(j).peshit; - m_CRT_min_hit_x = crthit_h->at(j).x_pos; - m_CRT_min_hit_y = crthit_h->at(j).y_pos; - m_CRT_min_hit_z = crthit_h->at(j).z_pos; - - - // if (verbose) - // { - std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; - std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; - std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; - std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; - // } - break; - } - } // End of conditional for closest CRT hit time. - } // End of loop over CRT hits. - } //if there is 1 flash in beamgate - }//if runCRT - - - }//analyze flashes - - - } diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h deleted file mode 100644 index 9da6ec348..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/analyze_Showers.h +++ /dev/null @@ -1,1658 +0,0 @@ -#include "SinglePhoton_module.h" -#include "reco_truth_matching.h" - -namespace single_photon -{ - void SinglePhoton::ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_start_dist_to_active_TPC.clear(); - m_reco_shower_start_dist_to_SCB.clear(); - m_reco_shower_start_in_SCB.clear(); - m_reco_shower_end_dist_to_active_TPC.clear(); - m_reco_shower_end_dist_to_SCB.clear(); - - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - - m_reco_shower_reclustered_energy_plane0.clear(); - m_reco_shower_reclustered_energy_plane1.clear(); - m_reco_shower_reclustered_energy_plane2.clear(); - m_reco_shower_reclustered_energy_max.clear(); - - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - m_reco_shower_plane0_meanRMS.clear(); - m_reco_shower_plane1_meanRMS.clear(); - m_reco_shower_plane2_meanRMS.clear(); - - m_reco_shower_hit_tick.clear(); - m_reco_shower_hit_wire.clear(); - m_reco_shower_hit_plane.clear(); - m_reco_shower_spacepoint_x.clear(); - m_reco_shower_spacepoint_y.clear(); - m_reco_shower_spacepoint_z.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - - m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - m_reco_shower_pfparticle_pdg.clear(); - - } - - void SinglePhoton::ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower_reclustered_energy_plane0.resize(size); - m_reco_shower_reclustered_energy_plane1.resize(size); - m_reco_shower_reclustered_energy_plane2.resize(size); - m_reco_shower_reclustered_energy_max.resize(size); - - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - m_reco_shower_start_dist_to_active_TPC.resize(size); - m_reco_shower_start_dist_to_SCB.resize(size); - m_reco_shower_start_in_SCB.resize(size); - - m_reco_shower_end_dist_to_active_TPC.resize(size); - m_reco_shower_end_dist_to_SCB.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - m_reco_shower_plane0_meanRMS.resize(size); - m_reco_shower_plane1_meanRMS.resize(size); - m_reco_shower_plane2_meanRMS.resize(size); - - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - - m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - m_reco_shower_pfparticle_pdg.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); - - - - - - } - - void SinglePhoton::CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); - vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); - vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); - - - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); - //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); - vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); - vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); - - vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); - vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); - vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); - vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); - - vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); - vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); - vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); - - vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); - vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); - vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); - } - - void SinglePhoton::AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap, std::map, std::vector> > & pfParticleToClusterMap,std::map, std::vector> > & clusterToHitMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap - ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); - - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - - const art::Ptr shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; - - art::Ptr shower3d; - if(PFPtoShowerReco3DMap.count(pfp)==0){ - //std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; - const std::vector> clusters = pfParticleToClusterMap[pfp]; - - - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); - - TVector3 shr_start = shower->ShowerStart(); - TVector3 shr_dir = shower->Direction(); - - TVector3 shr3d_start = shower3d->ShowerStart(); - TVector3 shr3d_dir = shower3d->Direction(); - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; - m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); - m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); - - m_reco_shower_dirx[i_shr] = shr_dir.X(); - m_reco_shower_diry[i_shr] = shr_dir.Y(); - m_reco_shower_dirz[i_shr] = shr_dir.Z(); - m_reco_shower_length[i_shr] = m_length; - m_reco_shower_openingangle[i_shr] = m_open_angle; - - m_reco_shower3d_startx[i_shr] = shr3d_start.X(); - m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); - m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); - m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); - m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); - m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); - m_reco_shower3d_length[i_shr] = shower3d->Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - - - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); - - //pandroa shower - std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; - std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; - - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; - - //now 3D shower - std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; - std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - - - - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); - - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); - - - m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - std::vector t_num(3,0); // num of triangles on each plane - std::vector t_numhits(3,0); // num of hits on each plane - std::vector t_area(3,0.0); - - //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - - //auto finish = std::chrono::high_resolution_clock::now(); - //auto microseconds = std::chrono::duration_cast(finish-start); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); - const std::vector< double > shr3d_dEdx = shower3d->dEdx(); - //const int shr3d_bestplane = shower3d->best_plane(); - - // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); - int wire = h->WireID().Wire; - int tick = h->PeakTime(); - - m_reco_shower_hit_tick.push_back(tick); - m_reco_shower_hit_plane.push_back(plane); - m_reco_shower_hit_wire.push_back(wire); - - - - - } - - } - - - - //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); - - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; - if(ymin > ymax) std::swap(ymin, ymax); - - //Code property of Gray Yarbrough (all rights reserved) - //int optical_flash_in_beamgate_counter=0; - double shortest_dist_to_flash_z=DBL_MAX; - double shortest_dist_to_flash_y=DBL_MAX; - double shortest_dist_to_flash_yz=DBL_MAX; - //-999 my nonsenese int can change - int shortest_dist_to_flash_index_z=-999; - int shortest_dist_to_flash_index_y=-999; - int shortest_dist_to_flash_index_yz=-999; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { - dist_z = zcenter - zmax; - } - else { - dist_z = 0; - } - if(dist_z < shortest_dist_to_flash_z){ - shortest_dist_to_flash_z = dist_z; - shortest_dist_to_flash_index_z=i_flash; - } - - - //y plane - - double dist_y=DBL_MAX; - if(ycenter < ymin) { - dist_y = ymin - ycenter; - } - else if(ycenter > ymax) { - dist_y = ycenter - ymax; - } - else { - dist_y= 0; - } - if(dist_y < shortest_dist_to_flash_y){ - shortest_dist_to_flash_y = dist_y; - shortest_dist_to_flash_index_y=i_flash; - } - - double dist_yz=DBL_MAX; - dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); - if(dist_yzNumDaughters(); //corresponding PFParticle - if(m_reco_shower_num_daughters[i_shr]>0){ - //currently just look at 1 daughter - m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - } - - - //------------and finally some slice info----------------- - - m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; - //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; - //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<PdgCode(); - } else{ - m_reco_shower_trackscore[i_shr] = -999; - m_reco_shower_pfparticle_pdg[i_shr] = -999; - } - - if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap){ - - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; - for(int plane =0; plane < 3; plane++){ - if (m_is_data == false && m_is_overlayed == false){ - gains[plane] = m_gain_mc[plane] ; - } if (m_is_data == true || m_is_overlayed == true){ - gains[plane] = m_gain_data[plane] ; - } - } - - - int i_shr=0; - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - const art::Ptr shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; - std::vector> hitz = pfParticleToHitMap[pfp]; - - if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; - - if(kalmanTrackToCaloMap.count(kalman)==0){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; - - if(calo.size()!=3){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; - if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? - - std::vector t_dEdx; //in XX cm only (4 for now) - std::vector t_res; - - - for(size_t ix=0; ixResidualRange().size(); ++ix){ - - double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; - if(rr <= res_range_lim){ - // Guanqun: why is here a gains[plane], it's not converting ADC to E? - t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); - //t_dQdx.push_back(*calo[p]->dQdx()[x]); - t_res.push_back(rr); - } - } - /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); - if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); - - switch(plane){ - case 0: - m_reco_shower_kalman_mean_dEdx_plane0[i_shr] = tmean ; - m_reco_shower_kalman_median_dEdx_plane0[i_shr] = tmedian ; - break; - case 1: - m_reco_shower_kalman_mean_dEdx_plane1[i_shr] = tmean; - m_reco_shower_kalman_median_dEdx_plane1[i_shr] = tmedian; - break; - case 2: - m_reco_shower_kalman_mean_dEdx_plane2[i_shr] = tmean; - m_reco_shower_kalman_median_dEdx_plane2[i_shr] = tmedian; - break; - default: - break; - } - - - const std::vector< anab::Point_t > kal_pts = calo[p]->XYZ(); - double circle = 1.0;//in cm - std::vector pts_within; - std::vector pts_x; - - for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); - - double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); - double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, *theDetector); - - //loop over all hits - for(auto &hit: hitz){ - if(plane != hit->View())continue; - double this_w = (double)hit->WireID().Wire; - double this_t = (double)hit->PeakTime(); - double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); - if(dist<=circle) pts_within.back()++; - } - //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ - TCanvas *c = new TCanvas(); - c->cd(); - - TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); - g->SetLineColor(kRed); - g->SetLineWidth(2); - g->Draw("alp"); - g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); - c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); - } - } - - - // some kalman averaging - double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; - double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; - double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; - double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); - double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); - double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); - - double thresh = 0.01; - - if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ - tmp_kal_2 = 0; - wei_2 = 0.0; - } - if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ - tmp_kal_1 = 0; - wei_1 = 0.0; - } - if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ - tmp_kal_0 = 0; - wei_0 = 0.0; - } - double kal_norm = wei_0+wei_1+wei_2; - - if(kal_norm!=0.0){ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); - }else{ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; - } - - - - - - - i_shr++; - } - return; - } - - - //----------------------------------------------------------------------------------------------------------------------------------------- - void SinglePhoton::RecoMCShowers(const std::vector>& showers, - std::map, art::Ptr> & showerToPFParticleMap, - std::map, art::Ptr > & showerToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector - ){ - //OBSOLETE OBSOLETE - - - if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; - m_sim_shower_matched[i_shr] = 0; - if(showerToMCParticleMap.count(shower) > 0){ - - - - const art::Ptr mcparticle = showerToMCParticleMap[shower]; - const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; - - std::vector corrected(3); - this->spacecharge_correction(mcparticle, corrected); - m_sim_shower_matched[i_shr] = 1; - m_sim_shower_energy[i_shr] = mcparticle->E(); - m_sim_shower_mass[i_shr] = mcparticle->Mass(); - m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); - m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); - m_sim_shower_process[i_shr] = mcparticle->Process(); - m_sim_shower_start_x[i_shr] = corrected[0]; - m_sim_shower_start_y[i_shr] = corrected[1]; - m_sim_shower_start_z[i_shr] =corrected[2]; - - m_sim_shower_origin[i_shr] = mctruth->Origin(); - //so this might be broken still due to mcparticle. must chcek - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_shower_parent_pdg[i_shr] = -999; - }else{ - m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } - - //OK is this photon matched to a delta? - - /* - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ - - nth_mother = crap_map[nth_mother->Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]< &shower) - { - - } - - double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ - double energy = 0.; - - //for each hit in the shower - for (auto &thishitptr : hits){ - //check the plane - int plane= thishitptr->View(); - - //skip invalid planes - if (plane != this_plane ) continue; - - //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - - //add the energy to the plane - energy += E; - }//for each hit - - return energy; - - } - - double SinglePhoton::CalcEShower(const std::vector> &hits){ - double energy[3] = {0., 0., 0.}; - - //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ - double gain; - //choose gain based on whether data/mc and by plane - if (m_is_data == false && m_is_overlayed == false){ - gain = m_gain_mc[plane] ; - //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; - return Q; - } - - double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ - return QtoEConversion(GetQHit(thishitptr, plane)); - - } - - double SinglePhoton::QtoEConversion(double Q){ - //return the energy value converted to MeV (the factor of 1e-6) - double E = Q* m_work_function *1e-6 /m_recombination_factor; - return E; - - } - - - std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ - int n = dqdx.size(); - std::vector dedx(n,0.0); - for (int i = 0; i < n; i++){ - //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane){ - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; - - //get the 3D shower direction - //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented - TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); - - //calculate the pitch for this plane - double pitch = getPitch(shower_dir, plane); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ - //keep only clusters on the plane - if(thiscluster->View() != plane) continue; - - //calculate the cluster direction - std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; - - //get the cluster start and and in CM - //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - theDetector->TriggerOffset())* _time2cm}; - std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - theDetector->TriggerOffset())* _time2cm }; - - //check that the cluster has non-zero length - double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; - - - //int m_matched_signal_total_num_slices; - - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); - */ - } - - //resizes the branches that are filled for every slice int the event - void SinglePhoton::ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size); - m_reco_slice_num_pfps.resize(size); - m_reco_slice_num_showers.resize(size); - m_reco_slice_num_tracks.resize(size); - - } - - /* - //resize the branches that are filled for matched track and shower objects - void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ - m_reco_slice_shower_matched_sliceId.resize(size_shower); - m_reco_slice_track_matched_sliceId.resize( size_track); - m_reco_slice_shower_matched_energy.resize(size_shower); - m_reco_slice_track_matched_energy.resize( size_track); - m_reco_slice_shower_matched_conversion.resize(size_shower); - m_reco_slice_shower_matched_overlay_frac.resize(size_shower); - - } - */ - - - void SinglePhoton::CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); - - - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); - - } - - /* - void SinglePhoton::CreateMatchedSliceBranches(){ - vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); - vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); - vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); - vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); - vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); - vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); - } - */ - - //called once per event to get all the slice info - //fills a map between the neutrino score for the slice and the primary reco PFP - //loops over all PFP's to find the primary and then associate to a slice - void SinglePhoton::AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> &primaryPFPSliceIdVec, - std::map &sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap){ - - - //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index - // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score - std::vector> clearCosmicPFP; - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - - std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event - std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event - //std::vector> primary_pfps; //store the primary PFP for each slice - // sliceIdToPFPMap.clear(); //clear between events - - /* - * Grabbed this info from Giuseppe: - * Here's the structure of these Metadata - * Primary PfParticles are either - * 1) IsClearCosmic = 1 (for unambiguous cosmics) - * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) - * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) - * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: - * 4) TrackScore = 0.671488 - * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata - */ - - - //for all PFP metadata in the event - for (auto pair: pfParticleToMetadataMap){ - std::vector> metadatalist= pair.second; //get the metadata - art::Ptr pfp = pair.first; //get the corresponding PFP - - //will be empty in circumstances outlined above, not every PFP has stored metadata - if (!metadatalist.empty()){ - - //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ - - //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); - - //get the metadata properties - std::map propertiesmap = data->GetPropertiesMap(); - //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; - PFPToTrackScoreMap[pfp] = it.second; - } - - }//for each item in properties map - - //if there is a neutrino score it's the primary PFP, so save the score+slice info - if(temp_score != -1.0){ - primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); - //primaryToSliceIdMap[pfp] = temp_ind; - sliceIdToNuScoreMap[temp_ind] = temp_score; - if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()< 0){ - //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - //for all pfp's in the event - //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; - - //for (unsigned int i = 0; i< pfParticleVector.size(); i++){ - for(auto item: pfParticleMap){ - art::Ptr start_pfp = item.second; - //no longer skipping pfp's that are clear cosmics - //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); - //if(iter != clearCosmicPFP.end()) continue; - - // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; - art::Ptr parent_pfp ; - - //if this is a primary particle, skip next part - if(!this_pfp->IsPrimary()){ - parent_pfp = pfParticleMap[this_pfp->Parent()]; - //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ - // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; - this_pfp = parent_pfp; - }//while not primary, iterate up chain - } else{ - parent_pfp = start_pfp; - } - - //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); - m_reco_slice_nuscore = nuscore_slices; - /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); - // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); - m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice - m_reco_slice_num_showers; //the subset of PFP's that are showers - m_reco_slice_num_tracks; - - */ - - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; - //for(auto item: allPFPSliceIdVec){ - //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); - // } - } - - // void SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){ - std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); - //return sliceIdToNumPFPsvec; - - //std::cout<<"starting to look at the PFP's per slice"<Self()<<" in slice "< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); - - /* - int max_pfp = -1; - for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { - int this_pfp = it->first->Self(); - if (this_pfp> max_pfp) { - max_pfp = this_pfp; - } - - } - std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; - - //check if this is a valid PFP - //if (pfp->self() > PFPToSliceIdMap.size()){ - // std::cout<<"ERROR, this pfp is out of bounds " - - // } - - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< pfp = pair.second; - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ - std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap){ - - std::vector matched_reco_slice_shower_overlay_fraction; - std::vector> matched_reco_slice_shower_MCP; - //std::vector matched_reco_slice_track_matched; - std::vector> matched_reco_slice_track_MCP; - - - //first check if in the event there's a match to a given signal - if(signal_def == "ncdelta"){ - //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; - // std::cout<<"found sim photon shower with track ID "< 0){ - //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); - matched_reco_slice_shower_MCP.push_back(mcp); - - //save the overlay fraction and whether it's matched - matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); - //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; - - if (m_sim_track_matched[k] > 0){ - if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ - - matched_reco_slice_track_MCP.push_back(mcp); - - // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); - - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ - //get the recob shower - art::Ptr this_shr; - for(auto pair: showerToMCParticleMap){ - if (pair.second == mcp){ - this_shr = pair.first; - } - } - art::Ptr this_pfp; - if(!this_shr.isNull()){ - this_pfp = showerToPFParticleMap[this_shr]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ - //get the recob track - art::Ptr this_trk; - for(auto pair: trackToMCParticleMap){ - if (pair.second == mcp){ - this_trk = pair.first; - } - } - art::Ptr this_pfp; - if(!this_trk.isNull()){ - this_pfp = trackToNuPFParticleMap[this_trk]; - } - - //get the slice - if(!this_pfp.isNull()){ - for(auto pair :allPFPSliceIdVec){ - art::Ptr pfp = pair.first; - if (this_pfp == pfp){ - if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); - } - } - } else{ - if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<Branch("reco_template",&m_reco_template); - } - - void SinglePhoton::AnalyzeTemplates(){ - m_reco_num_templates = 1; - this->ResizeTemplates(m_reco_num_templates); - - m_reco_template[0]=99; - - } -} diff --git a/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h deleted file mode 100644 index e377491f6..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/analyze_Tracks.h +++ /dev/null @@ -1,1275 +0,0 @@ -#include "SinglePhoton_module.h" -#include "TPrincipal.h" -#include "TVectorD.h" -#include "TruncMean.h" - - -namespace single_photon -{ - - - void SinglePhoton::ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_length.clear(); - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - m_reco_track_end_dist_to_active_TPC.clear(); - m_reco_track_start_dist_to_active_TPC.clear(); - m_reco_track_end_dist_to_SCB.clear(); - m_reco_track_start_dist_to_SCB.clear(); - m_reco_track_end_in_SCB.clear(); - m_reco_track_start_in_SCB.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_calo_energy_plane0.clear(); - m_reco_track_calo_energy_plane1.clear(); - m_reco_track_calo_energy_plane2.clear(); - m_reco_track_calo_energy_max.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_endx.clear(); - m_sim_track_endy.clear(); - m_sim_track_endz.clear(); - m_sim_track_length.clear(); - - m_sim_track_px.clear(); - m_sim_track_py.clear(); - m_sim_track_pz.clear(); - m_sim_track_trackID.clear(); - - // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - - m_reco_track_end_to_nearest_dead_wire_plane0.clear(); - m_reco_track_end_to_nearest_dead_wire_plane1.clear(); - m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_pfparticle_pdg.clear(); - m_reco_track_is_nuslice.clear(); - - - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); - - - } - - void SinglePhoton::ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - m_reco_track_end_dist_to_active_TPC.resize(size); - m_reco_track_start_dist_to_active_TPC.resize(size); - m_reco_track_end_dist_to_SCB.resize(size); - m_reco_track_start_dist_to_SCB.resize(size); - m_reco_track_end_in_SCB.resize(size); - m_reco_track_start_in_SCB.resize(size); - - m_reco_track_calo_energy_plane0.resize(size); - m_reco_track_calo_energy_plane1.resize(size); - m_reco_track_calo_energy_plane2.resize(size); - m_reco_track_calo_energy_max.resize(size); - - - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_endx.resize(size); - m_sim_track_endy.resize(size); - m_sim_track_endz.resize(size); - m_sim_track_length.resize(size); - - m_sim_track_px.resize(size); - m_sim_track_py.resize(size); - m_sim_track_pz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - - m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_pfparticle_pdg.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); - } - - void SinglePhoton::CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); - vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); - vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); - vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); - vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); - vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); - - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); - vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); - vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); - vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - vertex_tree->Branch("sim_track_px",&m_sim_track_px); - vertex_tree->Branch("sim_track_py",&m_sim_track_py); - vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); - vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); - vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); - vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); - vertex_tree->Branch("sim_track_length",&m_sim_track_length); - - vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); - - - } - - - - - - - void SinglePhoton::AnalyzeTracks(const std::vector>& tracks, - std::map, art::Ptr> & trackToNuPFParticleMap, - std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfParticleToSpacePointsMap, - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int> &PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap){ - - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); - - //const double adc2eU(5.1e-3); - //const double adc2eV(5.2e-3); - // const double adc2eW(5.4e-3); - - - // const double tau(theDetector->ElectronLifetime()); - - - //loop over each recob::Track - for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) - { - - const art::Ptr track = *iter; - const art::Ptr pfp = trackToNuPFParticleMap[track]; - const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; - const std::vector> trk_hits = pfParticleToHitsMap[pfp]; - - int m_trkid = track->ID(); - double m_length = track->Length(); - auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector - //first: direction of first point, second: direction of the end of track - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); - m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); - m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); - m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); - - m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); - - - m_reco_track_startx[i_trk]= track->Start().X(); - m_reco_track_starty[i_trk]= track->Start().Y(); - m_reco_track_startz[i_trk]= track->Start().Z(); - - m_reco_track_length[i_trk] =m_length; - m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); - m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); - m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); - - m_reco_track_endx[i_trk] = track->End().X(); - m_reco_track_endy[i_trk]= track->End().Y(); - m_reco_track_endz[i_trk]= track->End().Z(); - - std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - - m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); - m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); - - m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); - m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); - - - m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); - m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); - - std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - double max_dist_from_line = -9999999; - - m_reco_track_spacepoint_chi[i_trk] = 0.0; - //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; - principal->AddRow(&tmp_spacepoints[0]); - - // distance between track direction and spacepoint - double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); - if(dist> max_dist_from_line) max_dist_from_line = dist; - m_reco_track_spacepoint_chi[i_trk] += dist*dist; - } - m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; - - principal->MakePrincipals(); - TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); - - m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); - m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); - m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); - - delete principal; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<Self()<<" is: "<NumDaughters(); - if(m_reco_track_num_daughters[i_trk]>0){ - //currently just look at 1 daughter - m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - } - - - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); - } else{ - m_reco_track_trackscore[i_trk] = -999; - m_reco_track_pfparticle_pdg[i_trk] = -999; - } - - //A loop over the trajectory points - size_t const traj_size = track->CountValidPoints(); - m_reco_track_num_trajpoints[i_trk] = (int)traj_size; - - for(unsigned int p = 0; p < traj_size; ++p) { - //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); - //recob::Track::Point_t const & pos = trajp.position; - //recob::Track::Vector_t const & mom = trajp.momentum; - - } - - - i_trk++; - - } // end of recob::Track loop - - //Lets sort and order the showers - m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); - m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); - - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, - std::map, art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector & vfrac - ){ - - - //if(m_is_verbose) - std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; - m_sim_track_matched[i_trk] = 0; - - if(trackToMCParticleMap.count(track)>0){ - - const art::Ptr mcparticle = trackToMCParticleMap[track]; - std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - const art::Ptr pfp = trackToPFParticleMap[track]; - - std::vector correctedstart(3); - std::vector correctedend(3); - std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; - // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); - this->spacecharge_correction(mcparticle, correctedend, raw_End); - - //std::cout<<"the corrected end of this mcparticle is "<E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = correctedstart[0]; - m_sim_track_starty[i_trk] = correctedstart[1]; - m_sim_track_startz[i_trk] = correctedstart[2]; - - m_sim_track_endx[i_trk]= correctedend[0]; - m_sim_track_endy[i_trk]= correctedend[1]; - m_sim_track_endz[i_trk]= correctedend[2]; - - m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); - - m_sim_track_px[i_trk]= mcparticle->Px(); - m_sim_track_py[i_trk]= mcparticle->Py(); - m_sim_track_pz[i_trk]= mcparticle->Pz(); - - - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; - - m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; - - - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_track_parent_pdg[i_trk] = -1; - }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } - - - - } - i_trk++; - } - - return; - } - - - - - - void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::map,std::vector> > &trackToCaloMap) - { - - if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; - - if(trackToCaloMap[track].size()!=3){ - std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; - const art::Ptr calo_p1 = trackToCaloMap[track][1]; - const art::Ptr calo_p2 = trackToCaloMap[track][2]; - - - size_t calo_length_p0 = calo_p0->dEdx().size(); - size_t calo_length_p1 = calo_p1->dEdx().size(); - size_t calo_length_p2 = calo_p2->dEdx().size(); - - TruncMean tm_p0; - TruncMean tm_p1; - TruncMean tm_p2; - - std::vector trunc_dEdx_p0; - std::vector res_range_good_p0; - std::vector dEdx_good_p0; - - std::vector trunc_dEdx_p1; - std::vector res_range_good_p1; - std::vector dEdx_good_p1; - - std::vector trunc_dEdx_p2; - std::vector res_range_good_p2; - std::vector dEdx_good_p2; - - m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; - m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; - m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; - - m_reco_track_best_calo_plane[i_trk]=-1; - - // guanqun: vectors have been clear and resized, so probably not need to reset their values? - m_reco_track_good_calo_p0[i_trk] = 0; - m_reco_track_mean_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; - - m_reco_track_good_calo_p1[i_trk] = 0; - m_reco_track_mean_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; - - m_reco_track_good_calo_p2[i_trk] = 0; - m_reco_track_mean_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; - - - - //First off look over ALL points - //--------------------------------- plane 0 ----------- Induction - for (size_t k = 0; k < calo_length_p0; ++k) { - double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track - double dEdx = calo_p0->dEdx()[k]; - - m_reco_track_mean_dEdx_p0[i_trk] += dEdx; - if(k <= calo_length_p0/2){ - m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; // != has higher precedence than = - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ - res_range_good_p0.push_back(res_range); - dEdx_good_p0.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p0.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p0.setRadius(rad); - tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ - double dEdx = trunc_dEdx_p0[k]; - m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; - if(k <= trunc_dEdx_p0.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p1->dEdx()[k]; - - m_reco_track_mean_dEdx_p1[i_trk] += dEdx; - if(k <= calo_length_p1/2){ - m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ - res_range_good_p1.push_back(res_range); - dEdx_good_p1.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p1.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p1.setRadius(rad); - tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ - double dEdx = trunc_dEdx_p1[k]; - m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; - if(k <= trunc_dEdx_p1.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p2->dEdx()[k]; - - m_reco_track_mean_dEdx_p2[i_trk] += dEdx; - if(k <= calo_length_p2/2){ - m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ - res_range_good_p2.push_back(res_range); - dEdx_good_p2.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p2.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p2.setRadius(rad); - tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ - double dEdx = trunc_dEdx_p2[k]; - m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; - if(k <= trunc_dEdx_p2.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ - m_reco_track_best_calo_plane[i_trk] = 0; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; - - - }else if(m_reco_track_good_calo_p1[i_trk]!=0){ - m_reco_track_best_calo_plane[i_trk] = 1; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; - - - - }else{ - m_reco_track_best_calo_plane[i_trk] = -1; - } - - - } - } - - - - void SinglePhoton::CollectPID( std::vector> & tracks, - std::map< art::Ptr, art::Ptr> & trackToPIDMap){ - - for(size_t i_trk=0; i_trk track = tracks[i_trk]; - art::Ptr pid = trackToPIDMap[track]; - if (!pid) { - std::cout << "[analyze_Tracks] bad PID object" << std::endl; - continue; - } - - // For each PID object, create vector of PID scores for each algorithm - // Loop over this and get scores for algorithm of choice - // But first, prepare garbage values, just in case - std::vector AlgScoresVec = pid->ParticleIDAlgScores(); - double pidScore_BL_mu_plane0 = -999; - double pidScore_BL_mu_plane1 = -999; - double pidScore_BL_mu_plane2 = -999; - double pidScore_BL_p_plane0 = -999; - double pidScore_BL_p_plane1 = -999; - double pidScore_BL_p_plane2 = -999; - double pidScore_BL_mip_plane0 = -999; - double pidScore_BL_mip_plane1 = -999; - double pidScore_BL_mip_plane2 = -999; - double pidScore_PIDA_plane0 = -999; - double pidScore_PIDA_plane1 = -999; - double pidScore_PIDA_plane2 = -999; - double pidScore_chi2_mu_plane0 = -999; - double pidScore_chi2_mu_plane1 = -999; - double pidScore_chi2_mu_plane2 = -999; - double pidScore_chi2_p_plane0 = -999; - double pidScore_chi2_p_plane1 = -999; - double pidScore_chi2_p_plane2 = -999; - double pidScore_three_plane_proton = -999; - - //int planeid = 2; - for (size_t i_algscore=0; i_algscore&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; - - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; - - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - - // right, but can be simplified - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - - - return sqrt(d2); - - } - - - // minimum distance between point and dead wire - double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9 ){ - - double min_dist = 999999; - - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int channel = bad_channel_list_fixed_mcc9[i].first; - int is_ok = bad_channel_list_fixed_mcc9[i].second; - if(is_ok>1)continue; - - auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel - auto result = geom->WireEndPoints(wireids[0]); - - //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - std::vector end = {0.0,result.end().Y(),result.end().Z()}; - std::vector point = {0.0,Ypoint,Zpoint}; - double dist = dist_line_point(start,end,point); - min_dist = std::min(dist,min_dist); - } - - return min_dist; - - } - - - //Typenamed for recob::Track and recob::Shower - //Guanqun: this function didn't do anything? - template - int badChannelMatching(std::vector& badchannels, - std::vector& objects, - std::map< T, art::Ptr > & objectToPFParticleMap, - std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9){ - - - - - for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; - const std::vector> hits = pfParticleToHitsMap[pfp]; - - int min_dist_from_bad_channel = 99999; - - for(size_t h=0; h hit = hits[h]; - - - //int nch = (int)badchannels.size()/3; - //for(int i=0; i1)continue; - int dist =hit->Channel()-bc; - auto hs = geom->ChannelToWire(bc); - //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); - std::vector end(3); - auto result = geom->WireEndPoints(hs[0]); - - // std::cout<<"KNK: "< & vec){ - return isInTPCActive(0.0,vec); - } - - /* determine if point vec is inside TPC active volume, returns 1 - in TPC active, 0 - out of TPC active */ - int SinglePhoton::isInTPCActive(double cut,std::vector & vec){ - bool is_x = (vec[0] > m_tpc_active_x_low+cut && vec[0]< m_tpc_active_x_high-cut ); - bool is_y = (vec[1] > m_tpc_active_y_low+cut && vec[1]< m_tpc_active_y_high-cut); - bool is_z = (vec[2] > m_tpc_active_z_low+cut && vec[2]&vec){ - if(isInTPCActive(vec)==0) return -999; - double min_x = std::min( fabs(vec[0] - m_tpc_active_x_low) , fabs(vec[0] - m_tpc_active_x_high)); - double min_y = std::min( fabs(vec[1] - m_tpc_active_y_low) , fabs(vec[1] - m_tpc_active_y_high)); - double min_z = std::min( fabs(vec[2] - m_tpc_active_z_low) , fabs(vec[2] - m_tpc_active_z_high)); - - return ( (min_x& zpolygons){ - //TGeoManager *geom = new TGeoManager("save scb", "save scb"); - //cout << "size of " << zpolygons.size() << endl; - - //DEPRECIATED SHOULD NOT BE USED!!! - std::cout<<"ERROR ERROR ERROR DEPRECIATED DEPRECIATED. "<SetXY(ptX,ptY); - polyXY->FinishPolygon(); - zpolygons.push_back(polyXY); // Guanqun: not sure pushing pack pointers works as expect?? - } - - //cout << "size of " < & vec){ - return isInSCB(0.0,vec); - } - - int SinglePhoton::distToSCB(double & dist, std::vector &vec){ - //this one returns the distance to the boundary - bool ans = false; - double dist_yx = 999999; - - int iseg = 0; - if (!isInTPCActive(vec)){ - dist=-1; - return 0; // is it in active volume? - } - double cut = 0.0; - - TVector3 pt(&vec[0]); - - Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes - - Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); - polyXY->FinishPolygon(); - double testpt[2] = {pt.X(), pt.Y()}; - - //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; - - //polyXY->Draw(); - - Bool_t XY_contain = polyXY->Contains(testpt); - dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. - - if(0-116.5) y_idx = 0; //just the 0.5cm - if(y_idx<0 || y_idx>9) { - dist = -1; - delete polyXY; - return 0; - } - - Bool_t ZX_contain = false; - double arbit_out = 55555; - - double d_dist = -1; - - //upstream - if(z_idx==0){ - double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; - double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; - - TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); - polyXZ_Up->SetXY(ptX_Up,ptZ_Up); - polyXZ_Up->FinishPolygon(); - - double testpt_Up[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Up->Contains(testpt_Up); - d_dist = polyXZ_Up->Safety(testpt_Up,iseg); - delete polyXZ_Up; - - } - if (z_idx==10){ - double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; - double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; - - ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; - ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; - - TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); - polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); - polyXZ_Dw->FinishPolygon(); - - double testpt_Dw[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Dw->Contains(testpt_Dw); - d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); - delete polyXZ_Dw; - } - - delete polyXY; - - ans = XY_contain && ZX_contain; - ans ? dist = std::min(d_dist,min_y) : dist=-1; - - return (ans ? 1 : 0); - } - - - int SinglePhoton::isInSCB(double cut, std::vector &vec){ - - if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? - TVector3 pt(&vec[0]); - - Int_t z_idx = (Int_t)pt.Z()/100; - - Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); - polyXY->FinishPolygon(); - double testpt[2] = {pt.X(), pt.Y()}; - - //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; - - //polyXY->Draw(); - - Bool_t XY_contain = polyXY->Contains(testpt); - - if(0-116.5) y_idx = 0; //just the 0.5cm - - if(y_idx<0 || y_idx>9) { - delete polyXY; - return 0; - } - - Bool_t ZX_contain = false; - - if(z_idx==0){ - double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; - double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; - - TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); - polyXZ_Up->SetXY(ptX_Up,ptZ_Up); - polyXZ_Up->FinishPolygon(); - - double testpt_Up[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Up->Contains(testpt_Up); - delete polyXZ_Up; - } - - else if (z_idx==10){ - double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; - double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; - - ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; - ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; - - TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); - polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); - polyXZ_Dw->FinishPolygon(); - - double testpt_Dw[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Dw->Contains(testpt_Dw); - delete polyXZ_Dw; - } - - delete polyXY; - return (XY_contain && ZX_contain); - - } - -} diff --git a/sbncode/SinglePhotonAnalysis/ref/isolation.h b/sbncode/SinglePhotonAnalysis/ref/isolation.h deleted file mode 100644 index 160b8db28..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/isolation.h +++ /dev/null @@ -1,662 +0,0 @@ -#include "SinglePhoton_module.h" -#include "TCanvas.h" -#include "TGraph.h" -#include "TFile.h" -#include "TAxis.h" -#include "TLine.h" -#include "TLatex.h" -#include "TLegend.h" -#include "TPrincipal.h" -#include "TVectorD.h" -#include "TMatrixD.h" -#include "TF1.h" -#include "TEllipse.h" - -#include "TH1.h" - -// override function of sorts for max_element function comparison -bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second < p2.second); -} - -// override function of sorts for min_element function comparison -bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second > p2.second); -} - -namespace single_photon{ - -void SinglePhoton::ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); - - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); - - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); - - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); -} - -void SinglePhoton::CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); - - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); - - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); - - - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); - - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); - -} - - -/* Arguments to Function IsolationStudy (all are const): - * 1. vector named tracks of art ptr to recob track - * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle - * 3. vector named showers of art ptr to recob showers - * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle - * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit - * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int - * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit -*/ -void SinglePhoton::IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap) -{ - - int total_track_hits =0; - int total_shower_hits =0; - int nu_slice_id = -999; - - std::vector< art::Ptr > associated_hits; - std::vector< art::Ptr > unassociated_hits; - std::vector< art::Ptr > unassociated_hits_plane0; - std::vector< art::Ptr > unassociated_hits_plane1; - std::vector< art::Ptr > unassociated_hits_plane2; - - std::vector< std::map >> > v_newClusterToHitsMap(3); - -// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - - int sliceid = pfParticleToSliceIDMap.at(pfp); - - std::vector> slicehits = sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = pfParticleToHitsMap.at(pfp); - - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; - total_track_hits += trackhits.size(); - - if(nu_slice_id != sliceid && nu_slice_id != -999){ - std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "< shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - - int sliceid = pfParticleToSliceIDMap.at(pfp); - - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; - total_shower_hits+=showerhits.size(); - - if(nu_slice_id != sliceid && nu_slice_id!=-999){ - std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ - std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); - for(auto &h: slicehits){ - - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - // Creation of canvas and histograms to hold hit distance data - TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); - histcan->Divide(3, 2, 0.005, 0.1); - - TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); - TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); - TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); - std::vector s_hists = {s_hist0, s_hist1, s_hist2}; - - TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); - TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); - TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); - std::vector u_hists = {u_hist0, u_hist1, u_hist2}; - - -std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; -// saving wire and time coordinates - std::vector> pts_trk( tracks.size(), std::vector(3) ); - - art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); - auto trackhits = pfParticleToHitsMap.at(pfpt); - - std::vector t_pts(3); - std::vector> t_vec_t(3); // peak time of track hits on 3 planes. - std::vector> t_vec_c(3); // wire number of track hits on 3 planes. - - for(auto &th: trackhits){ - double wire = (double)th->WireID().Wire; - t_vec_c[(int)th->View()].push_back(wire); - - double time = (double)th->PeakTime(); - t_vec_t[(int)th->View()].push_back(time); - - tick_max = std::max(tick_max, time); - tick_min = std::min(tick_min, time); - chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); - chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); - - } - - t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); - t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); - t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); - pts_trk[0] = t_pts; - -std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; -std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; -std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; - - -std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) - std::vector, double >> sh_dist(3); - // vector to save hit with largest minimum distance (in sh_dist) on each plane - std::vector< std::pair, double > > max_min_hit(3); - - art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); - auto showerhits = pfParticleToHitsMap.at(pfp_s); - - std::vector t_pts_s(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - std::vector num_shr_hits(3); - - for(auto &sh: showerhits){ - int plane = (int)sh->View(); - num_shr_hits[plane] += 1; - - double minDist = 999.9; //minimum distance between this shower hit and all track hits - double dist; - // only do if there are track hits on this plane with which to compare - if (t_vec_c[(int)sh->View()].size() != 0){ - double wire = (double)sh->WireID().Wire; - vec_c[(int)sh->View()].push_back(wire); - double time = (double)sh->PeakTime(); - vec_t[(int)sh->View()].push_back(time); - - for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); - if (dist < minDist) { - minDist = dist; - } - - } // end of track hits for - s_hists[(int)sh->View()]->Fill(minDist); - - // keep track of 10 smallest distances and their corresponding hits - if (sh_dist[plane].size() < 10){ - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } - else{ if (minDist < max_min_hit[plane].second){ - sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } } - - // finds the necessary plot boundaries to fit the shower - tick_max = std::max(tick_max, (double)sh->PeakTime()); - tick_min = std::min(tick_min, (double)sh->PeakTime()); - chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); - chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); - } // end if stmnt t_vec_c - } // end looping shower hits - - // create graphs from newly compiled shower coordinates - t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - // save new graphs for this shower into vector containing all showers - pts_shr[0] = t_pts_s; - - // place data into approriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); - } - else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance - auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); - } - else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); - } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); - } - - /* DRAW SHOWER HISTOGRAM */ - histcan->cd(1); - s_hists[0]->Draw(); - s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(2); - s_hists[1]->Draw(); - s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(3); - s_hists[2]->Draw(); - s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - - -//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower -std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - - // create vector of three layers for unassoc hits - std::vector g_unass(3); - - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - std::vector minDist_tot(3); - std::vector minWire(3); - std::vector minTime(3); - - for(int plane = 0; plane < 3; plane++){ - minDist_tot[plane] = 999; - std::vector vec_t; - std::vector vec_c; - - for(auto &uh: unassociated_hits_all[plane]){ - - if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane - - double wire = (double)uh->WireID().Wire; - vec_c.push_back(wire); - double time = (double)uh->PeakTime(); - vec_t.push_back(time); - - double minDist = 999.9; - double dist; - for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); - if (dist < minDist) { minDist = dist; } - } - u_hists[(int)uh->View()]->Fill(minDist); - - if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits - minDist_tot[plane] = minDist; - minWire[plane] = wire; - minTime[plane] = time; - } - - // for reclustering - std::vector pt = {wire, vec_t.back()}; - pts_to_recluster[(int)uh->View()].push_back(pt); - mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - - } // end looping unassociated_hits_all - - g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - } // end looping planes - - // place data into appropriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); - } - else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); - } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); - } - - /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ - histcan->cd(4); - u_hists[0]->Draw(); - u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(5); - u_hists[1]->Draw(); - u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(6); - u_hists[2]->Draw(); - u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - -/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ -/* histcan->Update(); - histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); -*/ - - delete histcan; - - -//PLOTTING NOW -//SET-UP - double plot_point_size = 0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - - } - -// ******************************** DeadWireRegions ******************************************** - //plot dead wire - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - // std::cout<<"WIRE "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); - l->SetLineColor(kGray+1); - l->Draw("same"); - } - } - - // plot track - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - // plot shower hits - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - // plot unassociated hits - for(int i=0; i<3; i++){ - can->cd(i+1); - if (g_unass[i]->GetN() > 0){ - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - } - - - - -//******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - -// PLOTTING SHOWER? - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - -// PLOTTING - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - can->Update(); - // can->SaveAs((print_name+".pdf").c_str(),"pdf"); - std::cout<<"*PRINTING"< Nieves CCQE default, 1 --> RPA off - NormCCMEC: 0.52 # GENIE knob setting, gives scaling factor of 1.26 - XSecShape_CCMEC: 0.22 # 0 --> Nieves CCMEC default, 1 --> GENIE empirical - } - - # Load calculator configurations - @table::microboone_eventweight_flux - @table::microboone_eventweight_genie - @table::microboone_eventweight_xs - @table::microboone_eventweight_reint - @table::microboone_eventweight_spline -} - -# All available weight functions -microboone_eventweight.weight_functions: [ - @sequence::microboone_eventweight.weight_functions_flux, - @sequence::microboone_eventweight.weight_functions_genie, - @sequence::microboone_eventweight.weight_functions_xs, - @sequence::microboone_eventweight.weight_functions_reint, - @sequence::microboone_eventweight.weight_functions_spline -] - -#event weighting for LEE -microboone_eventweight_LEE: { - module_type: "EventWeight" - - min_weight: -0.001 - max_weight: 100 - - genie_module_label: "generator" - @table::microboone_eventweight_eLEE - -} - -#just the eLEE weight function -microboone_eventweight_LEE.weight_functions: [ eLEE_Combined_Oct2018 ] - -#event weighting for switching between splines -microboone_eventweight_justSplines: { - module_type: "EventWeight" - - min_weight: 0.0 - max_weight: 100 - - genie_module_label: "generator" - @table::microboone_eventweight_spline -} - -#just the spline weight function -microboone_eventweight_justSplines.weight_functions: [ splines_general ] - -#event weighting for reinteraction -microboone_eventweight_justreint: { - module_type: "EventWeight" - - min_weight: 0.0 - max_weight: 100 - @table::microboone_eventweight_reint -} - -#just the reinteraction weight function -microboone_eventweight_justreint.weight_functions: [ reinteractions_piplus, reinteractions_piminus, reinteractions_proton ] - -END_PROLOG diff --git a/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl b/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl deleted file mode 100644 index 18065b731..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/eventweight_microboone_genie_gLEE_2022_incl_knobs.fcl +++ /dev/null @@ -1,649 +0,0 @@ -# Reweightable GENIE cross section model uncertainties -# Revised 18 March 2020 -# See supporting note (docDB #27018) for details -# -# Maintainer: Steven Gardiner -# Modified for gLEE to add some singleknobs (Mark Ross-Lonergan) -microboone_eventweight_genie: { - - weight_functions_genie: [ - RPA_CCQE, XSecShape_CCMEC, AxFFCCQEshape, - VecFFCCQEshape, DecayAngMEC, Theta_Delta2Npi, - ThetaDelta2NRad, RPA_CCQE_Reduced, NormCCCOH, - NormNCCOH, TunedCentralValue, All, RootinoFix, #end offical - MaCCQE, MaNCEL, EtaNCEL, NormNCMEC, FracPN_CCMEC, - FracDelta_CCMEC, MaCCRES, MvCCRES, MaNCRES, MvNCRES, - NonRESBGvpCC1pi, NonRESBGvpCC2pi, NonRESBGvpNC1pi, NonRESBGvpNC2pi, - NonRESBGvnCC1pi, NonRESBGvnCC2pi, NonRESBGvnNC1pi, NonRESBGvnNC2pi, - NonRESBGvbarpCC1pi, NonRESBGvbarpCC2pi, NonRESBGvbarpNC1pi, NonRESBGvbarpNC2pi, - NonRESBGvbarnCC1pi, NonRESBGvbarnCC2pi, NonRESBGvbarnNC1pi, - NonRESBGvbarnNC2pi, AhtBY, BhtBY, CV1uBY, CV2uBY, AGKYxF1pi, AGKYpT1pi, - MFP_pi, MFP_N, FrCEx_pi, FrInel_pi, FrAbs_pi, FrCEx_N, FrInel_N, FrAbs_N, - RDecBR1gamma, RDecBR1eta, FrPiProd_pi, FrPiProd_N, - CoulombCCQE - ] - - - # INDIVIDUAL WEIGHT CALCULATORS - # Thse use "minmax" mode and represent a variation between two extremes. The - # recommended uncertainty is the full spread between them. - RPA_CCQE: { - type: UBGenie - random_seed: 2 - parameter_list: [ "RPA_CCQE" ] - parameter_sigma: [ 0.4 ] - parameter_min: [ 0.0 ] - parameter_max: [ 0.8 ] - mode: minmax - number_of_multisims: 2 - } - - XSecShape_CCMEC: { - type: UBGenie - random_seed: 4 - parameter_list: [ "XSecShape_CCMEC" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - AxFFCCQEshape: { - type: UBGenie - random_seed: 5 - parameter_list: [ "AxFFCCQEshape" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - VecFFCCQEshape: { - type: UBGenie - random_seed: 6 - parameter_list: [ "VecFFCCQEshape" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - DecayAngMEC: { - type: UBGenie - random_seed: 7 - parameter_list: [ "DecayAngMEC" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - Theta_Delta2Npi: { - type: UBGenie - random_seed: 53 - parameter_list: [ "Theta_Delta2Npi" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - # New angular distribution variation for radiative Delta decays - ThetaDelta2NRad: { - type: UBGenie - random_seed: 54 - parameter_list: [ "ThetaDelta2Rad" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] - parameter_max: [ 1.0 ] - mode: minmax - number_of_multisims: 2 - } - - # 60% of the previous RPA uncertainty (see RPA_CCQE) - RPA_CCQE_Reduced: { - type: UBGenie - random_seed: 55 - parameter_list: [ "RPA_CCQE" ] - parameter_sigma: [ 0.24 ] - parameter_min: [ 0.16 ] - parameter_max: [ 0.64 ] - mode: minmax - number_of_multisims: 2 - } - - # Unisim variation of CC COH normalization (still finalizing approach) - NormCCCOH: { - type: UBGenie - random_seed: 56 - parameter_list: [ "NormCCCOH" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] # MCC9 nominal (Berger-Sehgal) - parameter_max: [ 1.0 ] # +100% normalization - mode: minmax - number_of_multisims: 2 - } - - # Unisim variation of NC COH normalization (still finalizing approach) - NormNCCOH: { - type: UBGenie - random_seed: 57 - parameter_list: [ "NormNCCOH" ] - parameter_sigma: [ 1 ] - parameter_min: [ 0.0 ] # MCC9 nominal (Berger-Sehgal) - parameter_max: [ 1.0 ] # +100% normalization - mode: minmax - number_of_multisims: 2 - } - - # Single function that applies all weights needed to obtain - # a new tuned central value - # NOTE: For samples generated with GENIE v3.0.4 splines, the - # spline weight to convert v3.0.4 --> v3.0.4a cross sections - # still needs to be applied as well. - TunedCentralValue: { - type: UBGenie - random_seed: 99 - parameter_list: [ "MaCCQE", "RPA_CCQE", "NormCCMEC", "XSecShape_CCMEC" ] - # Dummy sigmas (central values are specified in EventWeight module configuration - # to ensure consistency across all weight calculators) - parameter_sigma: [ 1, 1, 1, 1 ] - mode: central_value - number_of_multisims: 1 - } - - # ALL OTHER RECOMMENDED SYSTEMATIC VARIATIONS THROWN TOGETHER - All: { - type: UBGenie - random_seed: 100 - - parameter_list: [ - - # QE - "MaCCQE", "CoulombCCQE", "MaNCEL", "EtaNCEL", - - # MEC - "NormCCMEC", "NormNCMEC", "FracPN_CCMEC", "FracDelta_CCMEC", - - # RES - "MaCCRES", "MvCCRES", "MaNCRES", "MvNCRES", - - # Non-resonant background - "NonRESBGvpCC1pi", "NonRESBGvpCC2pi", "NonRESBGvpNC1pi", "NonRESBGvpNC2pi", - "NonRESBGvnCC1pi", "NonRESBGvnCC2pi", "NonRESBGvnNC1pi", "NonRESBGvnNC2pi", - "NonRESBGvbarpCC1pi", "NonRESBGvbarpCC2pi", "NonRESBGvbarpNC1pi", - "NonRESBGvbarpNC2pi", "NonRESBGvbarnCC1pi", "NonRESBGvbarnCC2pi", "NonRESBGvbarnNC1pi", - "NonRESBGvbarnNC2pi", "AhtBY", "BhtBY", "CV1uBY", "CV2uBY", - - # Hadronization - "AGKYxF1pi", "AGKYpT1pi", - - # FSI - "MFP_pi", "MFP_N", "FrCEx_pi", "FrInel_pi", "FrAbs_pi", - "FrCEx_N", "FrInel_N", "FrAbs_N", - - # eta, remove BR1gamma - "RDecBR1eta" - ] - parameter_sigma: [ - 4.16128, # MaCCQE uses +/-0.12 GeV about the tuned central value - 1.5, # CoulombCCQE uses +/- 30% - 1, 1, - 1.4, # NormCCMEC uses +/-70% - 2.0, # NormNCMEC uses +/-100% - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - ] - mode: multisim - number_of_multisims: 1000 - } - - # Special weight that zeros out events that suffer from the "RES ROOTino" bug - # See, e.g., docDB #27564 - RootinoFix: { - type: UBGenie - random_seed: 101 - parameter_list: [ "RESRootino" ] - # Dummy sigma provided here to keep the framework happy. - # The knob value associated with this calculator is not - # actually used. All affected events are assigned a weight of - # zero. All other events are assigned a weight of one. - parameter_sigma: [ 1 ] - mode: multisim - number_of_multisims: 1 - } - - - - - #-------------------- Below here individual Knobs ---------------------------------# - MaCCQE: { - type: UBGenie - random_seed: 1001 - parameter_list: [ "MaCCQE" ] - - # MaCCQE uses +/-0.12 GeV about the tuned central value - parameter_sigma: [ 4.16128 ] - mode: pm1sigma - number_of_multisims: 2 - } - - - NormCCMEC: { - type: UBGenie - random_seed: 1002 - parameter_list: [ "NormCCMEC" ] - - parameter_sigma: [ 1.4 ] # +/- 70% - mode: pm1sigma - number_of_multisims: 2 - } - - - MaNCEL: { - type: UBGenie - random_seed: 1003 - parameter_list: [ "MaNCEL" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - EtaNCEL: { - type: UBGenie - random_seed: 1004 - parameter_list: [ "EtaNCEL" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NormNCMEC: { - type: UBGenie - random_seed: 1005 - parameter_list: [ "NormNCMEC" ] - parameter_sigma: [ 2 ] # +/-100% - mode: pm1sigma - number_of_multisims: 2 - } - - FracPN_CCMEC: { - type: UBGenie - random_seed: 1006 - parameter_list: [ "FracPN_CCMEC" ] - parameter_sigma: [ 1 ] # +/-20% - mode: pm1sigma - number_of_multisims: 2 - } - - FracDelta_CCMEC: { - type: UBGenie - random_seed: 1007 - parameter_list: [ "FracDelta_CCMEC" ] - parameter_sigma: [ 1.5 ] # +/-30% - mode: pm1sigma - number_of_multisims: 2 - } - - MaCCRES: { - type: UBGenie - random_seed: 1008 - parameter_list: [ "MaCCRES" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - MvCCRES: { - type: UBGenie - random_seed: 1009 - parameter_list: [ "MvCCRES" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - MaNCRES: { - type: UBGenie - random_seed: 1010 - parameter_list: [ "MaNCRES" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - MvNCRES: { - type: UBGenie - random_seed: 1011 - parameter_list: [ "MvNCRES" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvpCC1pi: { - type: UBGenie - random_seed: 1012 - parameter_list: [ "NonRESBGvpCC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvpCC2pi: { - type: UBGenie - random_seed: 1013 - parameter_list: [ "NonRESBGvpCC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvpNC1pi: { - type: UBGenie - random_seed: 1014 - parameter_list: [ "NonRESBGvpNC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvpNC2pi: { - type: UBGenie - random_seed: 1015 - parameter_list: [ "NonRESBGvpNC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvnCC1pi: { - type: UBGenie - random_seed: 1016 - parameter_list: [ "NonRESBGvnCC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvnCC2pi: { - type: UBGenie - random_seed: 1017 - parameter_list: [ "NonRESBGvnCC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvnNC1pi: { - type: UBGenie - random_seed: 1018 - parameter_list: [ "NonRESBGvnNC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvnNC2pi: { - type: UBGenie - random_seed: 1019 - parameter_list: [ "NonRESBGvnNC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarpCC1pi: { - type: UBGenie - random_seed: 1020 - parameter_list: [ "NonRESBGvbarpCC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarpCC2pi: { - type: UBGenie - random_seed: 1021 - parameter_list: [ "NonRESBGvbarpCC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarpNC1pi: { - type: UBGenie - random_seed: 1022 - parameter_list: [ "NonRESBGvbarpNC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarpNC2pi: { - type: UBGenie - random_seed: 1023 - parameter_list: [ "NonRESBGvbarpNC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarnCC1pi: { - type: UBGenie - random_seed: 1024 - parameter_list: [ "NonRESBGvbarnCC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarnCC2pi: { - type: UBGenie - random_seed: 1025 - parameter_list: [ "NonRESBGvbarnCC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarnNC1pi: { - type: UBGenie - random_seed: 1026 - parameter_list: [ "NonRESBGvbarnNC1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - NonRESBGvbarnNC2pi: { - type: UBGenie - random_seed: 1027 - parameter_list: [ "NonRESBGvbarnNC2pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - AhtBY: { - type: UBGenie - random_seed: 1028 - parameter_list: [ "AhtBY" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - BhtBY: { - type: UBGenie - random_seed: 1029 - parameter_list: [ "BhtBY" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - CV1uBY: { - type: UBGenie - random_seed: 1030 - parameter_list: [ "CV1uBY" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - CV2uBY: { - type: UBGenie - random_seed: 1031 - parameter_list: [ "CV2uBY" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - AGKYxF1pi: { - type: UBGenie - random_seed: 1032 - parameter_list: [ "AGKYxF1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - AGKYpT1pi: { - type: UBGenie - random_seed: 1033 - parameter_list: [ "AGKYpT1pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - MFP_pi: { - type: UBGenie - random_seed: 1034 - parameter_list: [ "MFP_pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - MFP_N: { - type: UBGenie - random_seed: 1035 - parameter_list: [ "MFP_N" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrCEx_pi: { - type: UBGenie - random_seed: 1036 - parameter_list: [ "FrCEx_pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrInel_pi: { - type: UBGenie - random_seed: 1037 - parameter_list: [ "FrInel_pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrAbs_pi: { - type: UBGenie - random_seed: 1038 - parameter_list: [ "FrAbs_pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrCEx_N: { - type: UBGenie - random_seed: 1039 - parameter_list: [ "FrCEx_N" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrInel_N: { - type: UBGenie - random_seed: 1040 - parameter_list: [ "FrInel_N" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrAbs_N: { - type: UBGenie - random_seed: 1041 - parameter_list: [ "FrAbs_N" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - RDecBR1gamma: { - type: UBGenie - random_seed: 1042 - parameter_list: [ "RDecBR1gamma" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - RDecBR1eta: { - type: UBGenie - random_seed: 1043 - parameter_list: [ "RDecBR1eta" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrPiProd_pi: { - type: UBGenie - random_seed: 1044 - parameter_list: [ "FrPiProd_pi" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - FrPiProd_N: { - type: UBGenie - random_seed: 1045 - parameter_list: [ "FrPiProd_N" ] - parameter_sigma: [ 1 ] - mode: pm1sigma - number_of_multisims: 2 - } - - CoulombCCQE: { - type: UBGenie - random_seed: 1046 - parameter_list: [ "CoulombCCQE" ] - - # CoulombCCQE uses +/- 30% - parameter_sigma: [ 1.5 ] - mode: pm1sigma - number_of_multisims: 2 - } - - - - -} diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl deleted file mode 100644 index cccb96750..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v1.fcl +++ /dev/null @@ -1,125 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" -#include "reco_uboone_mcc9_8.fcl" - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - ParticleIDLabel:"pandoracalipidSCE" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - SEAviewHitThreshold: 25 - SEAviewDBSCANMinPts: 8 - SEAviewDBSCANEps: 4 - SEAviewPlotDistance: 80 - SEAviewMaxHitsLinFit: 20.0 - SEAviewMakePDF: false - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - usePID: true - work_function: 23.6 - recombination_factor: 0.62 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -process_name : SinglePhoton #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - @table::microboone_services -} - -outputs: { - # optionalout: { module_type: RootOutput - # fileName: "output_file.root" - # fastCloning: false } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - #pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - allShr: @local::microboone_pandoraShowerCreation - } - analyzers: {} - filters : { - singlephotonana: @local::singlephoton_analyzer #run in ana mode - } - pathana : [allShr, singlephotonana] #path for analysis - trigger_paths : [pathana] - end_paths: [ ] - -} -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.19 -physics.filters.singlephotonana.beamgateEndTime: 4.87 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl deleted file mode 100644 index 1c1dfb69f..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_1g1p_far_sideband_Data_v2.fcl +++ /dev/null @@ -1,133 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" -#include "reco_uboone_mcc9_8.fcl" - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - ParticleIDLabel:"pandoracalipidSCE" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - SEAviewHitThreshold: 25 - SEAviewDBSCANMinPts: 8 - SEAviewDBSCANEps: 4 - SEAviewPlotDistance: 80 - SEAviewMaxHitsLinFit: 20.0 - SEAviewMakePDF: false - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - usePID: true - work_function: 23.6 - recombination_factor: 0.62 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -process_name : SinglePhoton #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc - @table::microboone_services -} - - -outputs: { - # optionalout: { module_type: RootOutput - # fileName: "output_file.root" - # fastCloning: false } -} - -physics:{ - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - #pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - allShr: @local::microboone_pandoraShowerCreation - } - analyzers: { - } - filters : { - singlephotonana: @local::singlephoton_analyzer #run in ana mode - } - pathana : [allShr, singlephotonana] #path for analysis - trigger_paths : [pathana] - end_paths: [] - -} -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -microboone_tfile_metadata: { - GenerateTFileMetadata: true - JSONFileName: "vertexed_singlephoton_hist.root.json" - dataTier: "root-tuple" - fileFormat: "root" -} -physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.19 -physics.filters.singlephotonana.beamgateEndTime: 4.87 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl deleted file mode 100644 index 3cbd041d0..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_BNBext_hist_v2.fcl +++ /dev/null @@ -1,147 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - #ShowerLabel: "showerreco3dpandora" - ParticleIDLabel:"pid" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - usePID: "true" - work_function: 23 - recombination_factor: 0.62 - #gain : 197 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -singlephoton_filter: @local::singlephoton_analyzer -singlephoton_filter.FillTrees: false -singlephoton_filter.RunPi0Filter: true -singlephoton_filter.FilterMode2g1p: true -singlephoton_filter.FilterMode2g0p: false -singlephoton_filter.isData: true -singlephoton_filter.usePID: false - -singlephoton_filter_2g0p: @local::singlephoton_filter -singlephoton_filter_2g0p.FilterMode2g1p: false -singlephoton_filter_2g0p.FilterMode2g0p: true - -process_name : SinglePhotonFilter #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc - @table::microboone_services -} - -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "%ifb_%tc_NCpi0filter.root" - SelectEvents: [ filtering ] - dataTier: "reconstructed" - compressionLevel: 1 - outputCommands: ["keep *_*_*_*"] - } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - - analyzers: {} - filters : { - singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p - #singlephotonfil: @local::singlephoton_filter #run in 2g1p - #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode - } - - stream1: [ out1 ] - filtering: [pid, singlephotonfil ] - - trigger_paths: [ filtering ] - end_paths: [ stream1 ] - -} - - -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -# PID stuff -physics.producers.pid.ProducerLabels.TrackLabel: "pandora" -physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.65 -physics.filters.singlephotonfil.beamgateEndTime: 5.25 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl b/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl deleted file mode 100644 index 906e9fb39..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/merged_run_SinglePhoton_NCpi0Filter_2g0p_Data_hist_v2.fcl +++ /dev/null @@ -1,147 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - #ShowerLabel: "showerreco3dpandora" - ParticleIDLabel:"pid" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - usePID: "true" - work_function: 23 - recombination_factor: 0.62 - #gain : 197 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -singlephoton_filter: @local::singlephoton_analyzer -singlephoton_filter.FillTrees: false -singlephoton_filter.RunPi0Filter: true -singlephoton_filter.FilterMode2g1p: true -singlephoton_filter.FilterMode2g0p: false -singlephoton_filter.isData: true -singlephoton_filter.usePID: false - -singlephoton_filter_2g0p: @local::singlephoton_filter -singlephoton_filter_2g0p.FilterMode2g1p: false -singlephoton_filter_2g0p.FilterMode2g0p: true - -process_name : SinglePhotonFilter #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc - @table::microboone_services -} - -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "%ifb_%tc_NCpi0filter.root" - SelectEvents: [ filtering ] - dataTier: "reconstructed" - compressionLevel: 1 - outputCommands: ["keep *_*_*_*"] - } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - - analyzers: {} - filters : { - singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p - #singlephotonfil: @local::singlephoton_filter #run in 2g1p - #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode - } - - stream1: [ out1 ] - filtering: [pid, singlephotonfil ] - - trigger_paths: [ filtering ] - end_paths: [ stream1 ] - -} - - -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -# PID stuff -physics.producers.pid.ProducerLabels.TrackLabel: "pandora" -physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.3 -physics.filters.singlephotonfil.beamgateEndTime: 4.9 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl b/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl deleted file mode 100644 index 7afed5812..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/microboone_singlephoton.fcl +++ /dev/null @@ -1,78 +0,0 @@ -BEGIN_PROLOG - -singlephoton_analyzer:{ - - module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandora" - ShowerLabel: "pandora" - ParticleIDLabel:"pandoracalipidSCE" - CaloLabel: "pandoracaliSCE" - FlashLabel: "simpleFlashBeam" - POTLabel: "generator" - input_param: "optional" - - Verbose: false - - runSEAviewShower: true - SEAviewShowerHitThreshold: 25 - SEAviewShowerDBSCANMinPts: 8 - SEAviewShowerDBSCANEps: 4 - SEAviewShowerPlotDistance: 80 - SEAviewShowerMaxHitsLinFit: 20.0 - SEAviewShowerMakePDF: false - SEAviewShowerNumRecoShower: 1 - SEAviewShowerNumRecoTrack: -1 - - runSEAviewStub: true - SEAviewStubHitThreshold: 25 - SEAviewStubDBSCANMinPts: 1 - SEAviewStubDBSCANEps: 1 - SEAviewStubPlotDistance: 80 - SEAviewStubMakePDF: false - SEAviewStubNumRecoShower: 1 - SEAviewStubNumRecoTrack: 0 - - FillTrees: true - RunPi0Filter: false - FilterMode2g1p: false - FilterMode2g0p: false - - SelectEvent: false - SelectEventList:"" - - usePID: true - work_function: 23.6 - recombination_factor: 0.62 - gain_mc: [235.5, 249.7, 237.6] #DocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb - wire_spacing : 0.3 - width_box : 1. - length_box : 4. - - truthmatching_signaldef : "ncdelta" - runAllPFPs: "false" - exiting_photon_energy: 0.02 - exiting_proton_energy: 0.978 #40Mev + proton mass - - runCRT: "false" - DTOffset: 68600.0 #us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - Resolution: 1.0 #same as above - DAQHeaderProducer: "daq" #ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - - } - -singlephoton_filter: @local::singlephoton_analyzer -singlephoton_filter.FillTrees: false -singlephoton_filter.RunPi0Filter: true -singlephoton_filter.FilterMode2g1p: true -singlephoton_filter.FilterMode2g0p: false -singlephoton_filter.isData: true -singlephoton_filter.usePID: false -singlephoton_filter.work_function: 23 - -singlephoton_filter_2g0p: @local::singlephoton_filter -singlephoton_filter_2g0p.FilterMode2g1p: false -singlephoton_filter_2g0p.FilterMode2g0p: true - -END_PROLOG diff --git a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl deleted file mode 100644 index cfadc32ce..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCDeltaRadFiltered.fcl +++ /dev/null @@ -1,93 +0,0 @@ -#include "services_microboone.fcl" -#include "genie_microboone_default+MEC.fcl" -#include "filters.fcl" - -process_name: GenieGenFiltered - -services: -{ - scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - # Load the service that manages root files for histograms. - TFileService: { fileName: "genie_hist.root" } - TimeTracker: {} - MemoryTracker: {} # default is one - RandomNumberGenerator: {} #ART native random number generator - FileCatalogMetadata: @local::art_file_catalog_mc - @table::microboone_gen_services -} - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - timestampPlugin: { plugin_type: "GeneratedEventTimestamp" } - maxEvents: 5000 # Number of events to create - firstRun: 1 # Run number to use for this file - firstEvent: 1 # number of first event in the file -} - -# Define and configure some modules to do work on each event. -# First modules are defined; they are scheduled later. -# Modules are grouped by type. -physics: -{ - - producers: - { - generator: @local::microboone_genie_simple - rns: { module_type: "RandomNumberSaver" } - } - - filters: - { - - NCDeltaRadFilter: - { - module_type: "NCDeltaRadiative" - } - - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ rns, generator, NCDeltaRadFilter] - - #define the output stream, there could be more than one if using filters - stream1: [ out1 ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [simulate] - - #end_paths is a keyword and contains the paths that do not modify the art::Event, - #ie analyzers and output streams. these all run simultaneously - end_paths: [stream1] -} - -#block to define where the output goes. if you defined a filter in the physics -#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} -#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "prodgenie_bnb_nu_filtered_NCDeltaRad_uboone_%tc_gen.root" - dataTier: "generated" - SelectEvents: [ simulate ] - compressionLevel: 1 - } -} - -outputs.out1.fileName: "prodgenie_bnb_nu_filtered_NCDeltaRad_uboone_%tc_gen.root" - -source.maxEvents: 100 - -physics.producers.generator: @local::microboone_genie_simple -physics.producers.generator.GlobalTimeOffset: 3125. -physics.producers.generator.RandomTimeOffset: 1600. -physics.producers.generator.TopVolume: "volTPC" -physics.producers.generator.BeamName: "booster" -physics.producers.generator.EventGeneratorList: "NCRES" -physics.producers.generator.GeomScan: "flux: 10000 1.3 1" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl b/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl deleted file mode 100644 index 4e6201eb2..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/prodgenie_common_uboone_NCRadiativeResonant_volActiveTPC.fcl +++ /dev/null @@ -1,94 +0,0 @@ -#include "services_microboone.fcl" -#include "genie_microboone_default+MEC.fcl" -#include "filters.fcl" - -process_name: GenieGenFiltered - -services: -{ - scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - # Load the service that manages root files for histograms. - TFileService: { fileName: "genie_hist.root" } - TimeTracker: {} - IFDH: {} - MemoryTracker: {} # default is one - RandomNumberGenerator: {} #ART native random number generator - FileCatalogMetadata: @local::art_file_catalog_mc - @table::microboone_gen_services -} - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - timestampPlugin: { plugin_type: "GeneratedEventTimestamp" } - maxEvents: 5000 # Number of events to create - firstRun: 1 # Run number to use for this file - firstEvent: 1 # number of first event in the file -} - -# Define and configure some modules to do work on each event. -# First modules are defined; they are scheduled later. -# Modules are grouped by type. -physics: -{ - - producers: - { - generator: @local::microboone_genie_simple - rns: { module_type: "RandomNumberSaver" } - } - - filters: - { - - NCRadResFilter: - { - module_type: "NCRadiativeResonant" - } - - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ rns, generator, NCRadResFilter] - - #define the output stream, there could be more than one if using filters - stream1: [ out1 ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [simulate] - - #end_paths is a keyword and contains the paths that do not modify the art::Event, - #ie analyzers and output streams. these all run simultaneously - end_paths: [stream1] -} - -#block to define where the output goes. if you defined a filter in the physics -#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} -#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "prodgenie_bnb_nu_filtered_NCRadRes_uboone_%tc_gen.root" - dataTier: "generated" - SelectEvents: [ simulate ] - compressionLevel: 1 - } -} - -outputs.out1.fileName: "prodgenie_bnb_nu_filtered_NCRadRes_uboone_%tc_gen.root" - -source.maxEvents: 100 - -physics.producers.generator: @local::microboone_genie_simple -physics.producers.generator.GlobalTimeOffset: 3125. -physics.producers.generator.RandomTimeOffset: 1600. -physics.producers.generator.TopVolume: "volTPCActive" -physics.producers.generator.BeamName: "booster" -physics.producers.generator.EventGeneratorList: "NCRES" -physics.producers.generator.GeomScan: "flux: 10000 1.3 1" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl deleted file mode 100644 index d2694edd5..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton.fcl +++ /dev/null @@ -1,77 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" -#include "reco_uboone_mcc9_8.fcl" -#include "microboone_singlephoton.fcl" - -process_name : SinglePhoton #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - @table::microboone_services -} - -outputs: { - # optionalout: { module_type: RootOutput - # fileName: "output_file.root" - # fastCloning: false } -} - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - #pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - allShr: @local::microboone_pandoraShowerCreation - } - analyzers: {} - filters : { - #singlephotonfil: @local::singlephoton_filter #run in filtering mode - singlephotonana: @local::singlephoton_analyzer #run in ana mode - } - pathana : [allShr, singlephotonana] #path for analysis - trigger_paths : [pathana] - end_paths: [ ] - -} -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -physics.producers.allShr.PFParticleLabel: "pandoraPatRec:allOutcomes" - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl deleted file mode 100644 index 98a8eec35..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl deleted file mode 100644 index b36e4e71f..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_BNBext_CRT.fcl +++ /dev/null @@ -1,8 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -physics.filters.singlephotonana.runCRT: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl deleted file mode 100644 index f16341fc8..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.19 -physics.filters.singlephotonana.beamgateEndTime: 4.87 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl deleted file mode 100644 index 36acbbcee..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_CRT.fcl +++ /dev/null @@ -1,8 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.19 -physics.filters.singlephotonana.beamgateEndTime: 4.87 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -physics.filters.singlephotonana.runCRT: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl deleted file mode 100644 index 4a169c591..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Data_calo.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "beamdata" -physics.filters.singlephotonana.beamgateStartTime: 3.19 -physics.filters.singlephotonana.beamgateEndTime: 4.87 -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" - -physics.filters.singlephotonana.CaloLabel: "pandoracalo" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl deleted file mode 100644 index 99191dc06..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl deleted file mode 100644 index 2f3ef6bf6..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Dirt_CRT.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" -physics.filters.singlephotonana.runCRT: "true" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl deleted file mode 100644 index d807f7562..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_FakeData.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "run_SinglePhoton.fcl" - -physics.filters.singlephotonana.isData: "true" -physics.filters.singlephotonana.POTLabel: "generator" - -#No not data! use overlay -#physics.filters.singlephotonana.beamgateStartTime: 3.19 -#physics.filters.singlephotonana.beamgateEndTime: 4.87 - -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 - -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl deleted file mode 100644 index 4e7f978fe..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_MC.fcl +++ /dev/null @@ -1,4 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.beamgateStartTime: 3.16 -physics.filters.singlephotonana.beamgateEndTime: 4.84 - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl deleted file mode 100644 index 96d1bbb68..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter.fcl +++ /dev/null @@ -1,95 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" - -#include "microboone_singlephoton.fcl" - -process_name : SinglePhotonFilter #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc - @table::microboone_services -} - -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "%ifb_%tc_NCpi0filter.root" - SelectEvents: [ filtering ] - dataTier: "reconstructed" - compressionLevel: 1 - outputCommands: ["keep *_*_*_*"] - } -} - - - - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - - analyzers: {} - filters : { - #singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p - singlephotonfil: @local::singlephoton_filter #run in 2g1p - #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode - } - - stream1: [ out1 ] - filtering: [pid, singlephotonfil ] - - trigger_paths: [ filtering ] - end_paths: [ stream1 ] - -} - - -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -# PID stuff -physics.producers.pid.ProducerLabels.TrackLabel: "pandora" -physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl deleted file mode 100644 index d32f897cd..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p.fcl +++ /dev/null @@ -1,95 +0,0 @@ -#include "services_microboone.fcl" -#include "detectorclocks.fcl" -#include "detectorproperties.fcl" -#include "geometry.fcl" -#include "larproperties.fcl" -#include "services_microboone_basic.fcl" -#include "config_particle_identification.fcl" -#include "config_particle_identification_fiducialvolume.fcl" -#include "config_particle_identification_braggalgo.fcl" -#include "config_particle_identification_producerlabels.fcl" -#include "shrreco3d.fcl" - -#include "microboone_singlephoton.fcl" - -process_name : SinglePhotonFilter #The process name must NOT contain any underscores - -source : { - module_type : RootInput - maxEvents : -1 -} - -services : -{ - # scheduler: { defaultExceptions: false } # Make all uncaught exceptions fatal. - TFileService: { fileName: "vertexed_singlephoton_%tc_hist.root" } - ExptGeoHelperInterface: @local::standard_geometry_helper - Geometry: @local::standard_geo - LArPropertiesService: @local::standard_properties - DetectorClocksService: @local::standard_detectorclocks - DetectorPropertiesService: @local::standard_detproperties - FileCatalogMetadata: @local::art_file_catalog_data # or @local::art_file_catalog_mc - @table::microboone_services -} - -outputs: -{ - out1: - { - module_type: RootOutput - fileName: "%ifb_%tc_NCpi0filter.root" - SelectEvents: [ filtering ] - dataTier: "reconstructed" - compressionLevel: 1 - outputCommands: ["keep *_*_*_*"] - } -} - - - - -physics: { - - producers : { - # ParameterSets for zero or more producer modules - #pidcalibration: @local::microboone_calibrationdedx - #dedxcalibration: @local::simulation_calibration - pid: @local::particleidconfig - #pid: @local::producerlabels_mcc9 - #showerreco3dpandora : @local::ShrReco3DPandora - } - - analyzers: {} - filters : { - singlephotonfil: @local::singlephoton_filter_2g0p #run in 2g0p - #singlephotonfil: @local::singlephoton_filter #run in 2g1p - #singlephotonana: @local::singlephoton_analyzer #run in analyzing mode - } - - stream1: [ out1 ] - filtering: [pid, singlephotonfil ] - - trigger_paths: [ filtering ] - end_paths: [ stream1 ] - -} - - -#physics.producers.showerreco3dpandora.BacktrackTag: "gaushitTruthMatch" -#physics.producers.showerreco3dpandora.ADCtoE: [240,240,240] # e-/ADC -#physics.producers.showerreco3dpandora.NeutrinoEvent: true - -services.SpaceCharge.EnableCorrSCE: true -services.SpaceCharge.EnableSimEfieldSCE: true -services.SpaceCharge.EnableSimSpatialSCE: true - -services.DetectorPropertiesService.NumberTimeSamples: 6400 -services.DetectorPropertiesService.ReadOutWindowSize: 6400 -services.DetectorClocksService.InheritClockConfig: false -services.DetectorClocksService.TriggerOffsetTPC: -0.400e3 -services.DetectorClocksService.TrigModuleName: "daq" -services.DetectorClocksService.InheritClockConfig: false - -# PID stuff -physics.producers.pid.ProducerLabels.TrackLabel: "pandora" -physics.producers.pid.ProducerLabels.CalorimetryLabel: "pandoracaliSCE" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl deleted file mode 100644 index e2447ada7..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_BNBext.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.65 -physics.filters.singlephotonfil.beamgateEndTime: 5.25 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl deleted file mode 100644 index 59f2437ea..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Data.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.3 -physics.filters.singlephotonfil.beamgateEndTime: 4.9 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl deleted file mode 100644 index c1ec3f595..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_2g0p_Overlay.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter_2g0p.fcl" -physics.filters.singlephotonfil.isData: "false" -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonfil.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonfil.isOverlayed: "true" -physics.filters.singlephotonfil.beamgateStartTime: 3.6 -physics.filters.singlephotonfil.beamgateEndTime: 5.2 -physics.filters.singlephotonfil.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl deleted file mode 100644 index f6c6cf9b5..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_BNBext.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter.fcl" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.65 -physics.filters.singlephotonfil.beamgateEndTime: 5.25 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl deleted file mode 100644 index 5b0bb7038..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Data.fcl +++ /dev/null @@ -1,7 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter.fcl" - -physics.filters.singlephotonfil.isData: "true" -physics.filters.singlephotonfil.POTLabel: "beamdata" -physics.filters.singlephotonfil.beamgateStartTime: 3.3 -physics.filters.singlephotonfil.beamgateEndTime: 4.9 -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl deleted file mode 100644 index bc53152eb..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_NCpi0Filter_Overlay.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "run_SinglePhoton_NCpi0Filter.fcl" -physics.filters.singlephotonfil.isData: "false" -physics.filters.singlephotonfil.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonfil.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonfil.isOverlayed: "true" -physics.filters.singlephotonfil.beamgateStartTime: 3.6 -physics.filters.singlephotonfil.beamgateEndTime: 5.2 -physics.filters.singlephotonfil.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl deleted file mode 100644 index b5bdff4dd..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay.fcl +++ /dev/null @@ -1,10 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl deleted file mode 100644 index 75c65176c..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_CRT.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" - -physics.filters.singlephotonana.runCRT: "true" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl deleted file mode 100644 index c0705254f..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys.fcl +++ /dev/null @@ -1,15 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" - -physics.filters.singlephotonana.RunTrueEventWeight: "true" -physics.filters.singlephotonana.true_eventweight_label: "eventweightglee" -physics.filters.singlephotonana.SplineCVLabel: "eventweightglee" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl deleted file mode 100644 index c27870752..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_FullSys_CRT.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "run_SinglePhoton_Overlay_FullSys.fcl" -physics.filters.singlephotonana.runCRT: "true" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl deleted file mode 100644 index 5d2113ab6..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_Overlay_calo.fcl +++ /dev/null @@ -1,11 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 - -physics.filters.singlephotonana.CaloLabel: "pandoracalo" - -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl deleted file mode 100644 index 7b7ef2758..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu.fcl +++ /dev/null @@ -1,12 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" - -physics.filters.singlephotonana.RunPhotoNu: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl deleted file mode 100644 index d56affe0a..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_PhotoNu_CRT.fcl +++ /dev/null @@ -1,13 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.isData: "false" -physics.filters.singlephotonana.BadChannelProducer: "nfspl1" -#physics.filters.singlephotonana.BadChannelProducer: "simnfspl1" -physics.filters.singlephotonana.isOverlayed: "true" -physics.filters.singlephotonana.beamgateStartTime: 3.57 -physics.filters.singlephotonana.beamgateEndTime: 5.25 -physics.filters.singlephotonana.TruncMeanFraction: 10.0 -#This is needed in order to help with wierd offset (4049.969 us) -services.DetectorClocksService.TrigModuleName: "triggersim" - -physics.filters.singlephotonana.runCRT: "true" -physics.filters.singlephotonana.RunPhotoNu: "true" diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl deleted file mode 100644 index a1f0712e7..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "run_SinglePhoton.fcl" -physics.filters.singlephotonana.beamgateStartTime: 3.16 -physics.filters.singlephotonana.beamgateEndTime: 4.84 - -physics.filters.singlephotonana.isTextGen: "true" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl deleted file mode 100644 index 97ee64224..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_SinglePhoton_TextGen_CRT.fcl +++ /dev/null @@ -1,3 +0,0 @@ -#include "run_SinglePhoton_TextGen.fcl" -physics.filters.singlephotonana.runCRT: "true" - diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl deleted file mode 100644 index b3f96f7f3..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_gLEE_2022.fcl +++ /dev/null @@ -1,45 +0,0 @@ -#include "services_microboone.fcl" -#include "microboone_eventweight_service.fcl" -#include "seedservice_microboone.fcl" -#include "eventweight_microboone_gLEE_2022.fcl" - -process_name: EventWeight - -services: { - TimeTracker: {} - MemoryTracker: {} - RandomNumberGenerator: {} - FileCatalogMetadata: @local::art_file_catalog_mc - NuRandomService: @local::microboone_seedservice - UBEventWeight: @local::microboone_eventweight_service - TFileService: { fileName: "microboone_reint_hist.root" } - ExptGeoHelperInterface: @local::microboone_geometry_helper - Geometry: @local::microboone_geo -} - -source: { - module_type: RootInput -} - -physics: { - producers: { - eventweightglee: @local::microboone_eventweight - rns: { - module_type: "RandomNumberSaver" - } - } - - simulate: [ rns, eventweightglee ] - stream1: [ out1 ] - trigger_paths: [ simulate ] - end_paths: [ stream1 ] -} - -outputs: { - out1: { - module_type: RootOutput - fileName: "%ifb_%tc_eventweight.root" - dataTier: "detector-simulated" - compressionLevel: 1 - } -} diff --git a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl b/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl deleted file mode 100644 index 7cb74c8cd..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/job/run_eventweight_microboone_singlephoton_Splines_and_CV.fcl +++ /dev/null @@ -1,65 +0,0 @@ -#include "services_microboone.fcl" -#include "microboone_eventweight_service.fcl" -#include "seedservice_microboone.fcl" -#include "eventweight_microboone.fcl" - -process_name: EventWeight4to4aFix - - -#event weighting for switching between splines as well as CV -microboone_eventweight_Splines_and_CV: { - module_type: "EventWeight" - - min_weight: 0.0 - max_weight: 100 - - genie_central_values: { - MaCCQE: 7.55 # GENIE knob setting, gives Ma = 1.18 GeV - RPA_CCQE: 0.4 # 0 --> Nieves CCQE default, 1 --> RPA off - NormCCMEC: 0.52 # GENIE knob setting, gives scaling factor of 1.26 - XSecShape_CCMEC: 0.22 # 0 --> Nieves CCMEC default, 1 --> GENIE empirical - } - - genie_module_label: "generator" - @table::microboone_eventweight_spline - @table::microboone_eventweight_genie -} -microboone_eventweight_Splines_and_CV.weight_functions: [ splines_general, TunedCentralValue ] - - -services: { - TimeTracker: {} - MemoryTracker: {} - RandomNumberGenerator: {} - FileCatalogMetadata: @local::art_file_catalog_mc - NuRandomService: @local::microboone_seedservice - UBEventWeight: @local::microboone_eventweight_service -} - -source: { - module_type: RootInput -} - -physics: { - producers: { - eventweight4to4aFix: @local::microboone_eventweight_Splines_and_CV - rns: { - module_type: "RandomNumberSaver" - } - } - - simulate: [ rns, eventweight4to4aFix ] - stream1: [ out1 ] - trigger_paths: [ simulate ] - end_paths: [ stream1 ] -} - -outputs: { - out1: { - module_type: RootOutput - fileName: "%ifb_%tc_eventweight.root" - dataTier: "simulated" - compressionLevel: 1 - } -} - diff --git a/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h b/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h deleted file mode 100644 index ae9861a28..000000000 --- a/sbncode/SinglePhotonAnalysis/ref/reco_truth_matching.h +++ /dev/null @@ -1,868 +0,0 @@ -#include "SinglePhoton_module.h" -#include -//#include - -namespace single_photon -{ - - //recoMCmatching but specifically for recob::showers - void SinglePhoton::showerRecoMCmatching(std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap){ - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - if(reco_verbose) std::cout<<"Strting "< pfp = objectToPFParticleMap[object]; - - if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); - if (parentIterator == pfParticleIdMap.end()){ - std::cout<<"error: no parent but not primary"<second->PdgCode(); - std::cout<<"the parent pdg code is "<Daughters(); - //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; - // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); - //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - - /** - * - * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower - * - **/ - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - - bool found_a_match = false; - - //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<View(); - - particle_vec.clear(); match_vec.clear(); //only store per hit - - //for the hit, fill the backtracker info - mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); - // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - - } // end loop over hits - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; // a vector of mother MCP - std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; // number of associated MCP that has mothers - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - //Guanqun: this line here doesn't really cosider other break cases than finding primary particle - if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } - - } - - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - if(match->PdgCode()==22){ // if it's a gamma - std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; - this->spacecharge_correction(match, corrected_start, tmp ); - m_sim_shower_is_true_shower[i] = 1; - }else if(abs(match->PdgCode())==11){ // if it's e+/e- - this->spacecharge_correction(match, corrected_start); - m_sim_shower_is_true_shower[i] = 1; - }else{ - corrected_start = {-999,-999,-999}; - m_sim_shower_is_true_shower[i] = 0; - } - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - - if (match_mother.isNull()){ - m_sim_shower_parent_pdg[i] = -1; - m_sim_shower_parent_trackID[i] = -1; - - }else{ - m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); - m_sim_shower_parent_trackID[i] = match_mother->TrackId(); - } - - - - m_sim_shower_matched[i] = 1; - m_sim_shower_energy[i] = match->E(); - m_sim_shower_mass[i] = match->Mass(); - m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); - m_sim_shower_pdg[i] = match->PdgCode(); - m_sim_shower_trackID[i] = match->TrackId(); - m_sim_shower_process[i] = match->Process(); - m_sim_shower_end_process[i] = match->EndProcess(); - m_sim_shower_vertex_x[i] = corrected_vertex[0]; - m_sim_shower_vertex_y[i] = corrected_vertex[1]; - m_sim_shower_vertex_z[i] =corrected_vertex[2]; - - m_sim_shower_start_x[i] = corrected_start[0]; - m_sim_shower_start_y[i] = corrected_start[1]; - m_sim_shower_start_z[i] =corrected_start[2]; - - m_sim_shower_px[i] = match->Px(); - m_sim_shower_py[i] = match->Py(); - m_sim_shower_pz[i] = match->Pz(); - - // should've use 'best_mother_plane' here - m_sim_shower_best_matched_plane[i] = best_mother_index; - m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; - m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; - m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - - m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; - - mcParticleVector.push_back(match); - objectToMCParticleMap[object] = mcParticleVector.back(); - - m_sim_shower_sliceId[i] = PFPToSliceIdMap[pfp]; - m_sim_shower_nuscore[i] = sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; - m_sim_shower_isclearcosmic[i] = PFPToClearCosmicMap[pfp]; - if (m_sim_shower_isclearcosmic[i]== false){ - std::cout<<"sim shower is matched to non-clear cosmic PFP "<Self()<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<> mother_contributing_MCP; //stores all the MCP's in the chain for all mothers-> this can probably be modified to only store ones which contribute to the reco shower - std::vector all_contributing_MCP; //all the MCP's in the chain for this mother - - //for each of the mother particles - for(auto pair: mother_MCP_map){ - all_contributing_MCP.clear(); - art::Ptr particle = pair.second;//get the mother MCP - all_contributing_MCP.push_back(pair.first);//save the MCP track id - int numDaughters = -1;//the number of daughters for the current generation - std::vector current_ids; //the track id's for the current generation - std::vector next_ids;//the track id's for the next generation (daughters of current generatiob) - - //std::cout<<"starting from mother particle at head of chain with pdg code "<PdgCode()<<" and track id "<NumberDaughters();//start with the number of daughters for the mother mother particle - - //std::cout<<"this particle has "<Daughter(i); //get the track id of the MCP - current_ids.push_back(id);//save the id to the list of the current generation - all_contributing_MCP.push_back(id);//save it to the list of all of the MCP's in the chain - } - - - //while there are more generations of daughter particles (not at the end of the chain) - while(numDaughters>0){ - //for each MCP in the current generation - for(int id:current_ids){ - //get the particle and check it's valid - art::Ptr particle = MCParticleToTrackIdMap[id]; - if (particle.isNull()) continue; - - //get the number of daughters - int n = particle->NumberDaughters(); - - //loop over the daughters - for (int i = 0; i < n; i++){ - int daughterId = particle->Daughter(i); - - //save daughters to list of all contributing mcps - all_contributing_MCP.push_back(daughterId); - - //add daughters to list for next gen - next_ids.push_back(daughterId); - - } - } - - numDaughters = current_ids.size(); //update the number of daughters in the next generation - - //std::cout<<"num daughters after this generation is "< count_vec(mother_contributing_MCP.size()); //stores the number of MCP's in the chain from each mother which match to the reco shower - std::vector energy_contributing_MCP(mother_contributing_MCP.size()); //the total energy of all the MCP's in the chain from the mother which contribute to the shower - //for each MCP from the chain of mother mother particle and daughters, check how much it overlaps with the MCP's that contribute to the shower - for (unsigned int i = 0; i< mother_contributing_MCP.size(); i++){ - std::vector mcp_vec = mother_contributing_MCP[i]; - int count = 0; - - std::cout<<"SinglePhoton::recoMC()\t||\t on mother_contributing_MCP: "<0){ - //check the total number of contributing MCP - std::cout<<"SinglePhoton::recoMC()\t||\t the number of MCP associated with the first mother mother particle that also deposit hits in the recob::shower is "< - std::vector recoMCmatching(std::vector& objectVector, - std::map>& objectToMCParticleMap, - std::map>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector){ - - std::vector trk_overlay_vec; - std::vector vec_fraction_matched; - bool reco_verbose = false; - //for each recob::track/shower in the event - for(size_t i=0; i pfp = objectToPFParticleMap[object]; - - // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - bool found_a_match = false; - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; - found_a_match = true; - } - }//end loop over particles per hit - } - - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - trk_overlay_vec.push_back(fraction_num_hits_overlay); - if(n_associated_mcparticle_hits == 0){ - //This will only occur if the whole recob::PFParticle is associated with an overlay object - //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" - << " pdg=" << best_matched_mcparticle->PdgCode() - << " trkid=" << best_matched_mcparticle->TrackId() - << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; - } - - }//end vector loop. - //return vec_fraction_matched; - return trk_overlay_vec; - } - - - //Typenamed for simb::MCTrack and sim::MCShower - /* @brief: tranverse through mcParticleVector, for each mcParticle, if an mcObject is found with same track ID - * put the particle and object in the mcParticleToMCObjectMap as a pair - */ - template - void perfectRecoMatching( - std::vector>& mcParticleVector, - std::vector& mcObjectVector, - std::map,T>& mcParticleToMCObjectMap - ){ - - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); - std::cout<<"KRANK: "< particle = mcParticleVector[ip]; - int particle_trackID = particle->TrackId(); - - std::vector id_matches; - std::vector mother_id_matches; - std::vector ancestor_id_matches; - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - - if(object_trackID == particle_trackID ) id_matches.push_back(io); - if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); - if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); - } - - int num_id_matches=id_matches.size(); - int num_mother_id_matches=mother_id_matches.size(); - int num_ancestor_id_matches=ancestor_id_matches.size(); - - //So im not sure how this works but something like this - if(num_id_matches > 1){ - std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; - }else if(num_ancestor_id_matches == 1){ - //We have a mother match? I guess this is like Neutron->photon->e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; - }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ - std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector){ - - - for(auto &mcp: mcParticleVector){ - int pdg = mcp->PdgCode(); - std::string end_process = mcp->EndProcess(); - int status = mcp->StatusCode() ; - - - if(pdg==22){ - std::cout<<"PHOTO: "<>& mcParticleVector, const art::Event &evt){ - - std::map > crap_map; - for(size_t j=0;j< mcParticleVector.size();j++){ - const art::Ptr mcp = mcParticleVector[j]; -//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; -} -art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); -art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); - -std::vector> GenieMCTruth; -std::vector geninfo; - - - -for(size_t i=0; i< mcParticleVector.size();i++){ - - -art::Ptr nth_mother = mcParticleVector[i]; - -//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; - -std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother() != 0){ - -nth_mother = crap_map[nth_mother->Mother()]; -std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ -std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); -std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); - vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); - - - vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); - vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); - vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); - vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); - vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); - vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); - vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); - vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); - - vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); - vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); - vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); - vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); - vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); - vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); - vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); - vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); - - - vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); - vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); - vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); - vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); - vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); - vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); - - vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); - vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); - vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); - vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); - vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); - vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); - - vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); - vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); - vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); - vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); - vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); - vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); - - } - - void SinglePhoton::CreateStubBranches(){ - - vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); - vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); - vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); - vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); - vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); - vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); - vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); - vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); - vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); - vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); - vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); - vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); - vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); - vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); - vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); - vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); - vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); - vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); - vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); - vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); - vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); - vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); - vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); - vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); - vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); - vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); - vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); - vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); - vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); - vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); - vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); - vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); - vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); - vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); - vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); - - - vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); - vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); - vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); - - } - - - - void SinglePhoton::SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ - - - - std::cout<<"ERROR! SecondShowerSearch has been made redundant by SEAview methodology. see SEAview/SEAview.h for details. This shouldnt be running at all"<> associated_hits; - std::vector> unassociated_hits; - std::vector> unassociated_hits_plane0; - std::vector> unassociated_hits_plane1; - std::vector> unassociated_hits_plane2; - - std::vector< std::map>>> v_newClusterToHitsMap(3);//one for each plane - - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - int sliceid = pfParticleToSliceIDMap.at(pfp); - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto trackhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"SinglePhoton::SSS\t||\ttrack "< shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - int sliceid = pfParticleToSliceIDMap.at(pfp); - auto slicehits = sliceIDToHitsMap.at(sliceid); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::cout<<"SinglePhoton::SSS\t||\tshower "<=0){ - std::cout<<"SinglePhoton::SSS\t||\t So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); - for(auto &h: slicehits){ - - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<"SinglePhoton::SSS\t||\tassociated_hits.size() "<0){ - - //TFile *f = new TFile("t.root","recreate"); - //f->cd(); - - std::string print_name = "sss_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,2400); - can->Divide(4,3,0,0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr pfp = showerToPFParticleMap.at(showers[s]); - auto showerhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: showerhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - //vec_c[(int)h->View()].push_back((double)h->Channel()); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_shr[s] = t_pts; - } - - - std::vector> pts_trk( tracks.size(), std::vector(3) ); - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr pfp = trackToPFParticleMap.at(tracks[t]); - auto trackhits = pfParticleToHitsMap.at(pfp); - - std::vector t_pts(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - - for(auto &h: trackhits){ - double wire = (double)h->WireID().Wire; - vec_c[(int)h->View()].push_back(wire); - vec_t[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - } - t_pts[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - - pts_trk[t] = t_pts; - } - //Now the "Unassociated Hits" - - std::vector g_unass(3); - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - for(int i=0; i<3; i++){ - - std::vector vec_t; - std::vector vec_c; - - for(auto &h: unassociated_hits_all[i]){ - - double wire = (double)h->WireID().Wire; - vec_c.push_back(wire); - vec_t.push_back((double)h->PeakTime()); - - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - //for reclustering - std::vector pt = {wire,vec_t.back()}; - pts_to_recluster[(int)h->View()].push_back(pt); - mapPointIndexToHit[(int)h->View()][pts_to_recluster[(int)h->View()].size()-1] = h; - } - - g_unass[i] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - - - } - //Plotting now - double plot_point_size=0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"SinglePhoton::SSS\t||\tTick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - can->cd(i+5); - g_vertex[i]->Draw("ap"); - - can->cd(i+9); - g_vertex[i]->Draw("ap"); - - - } - - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - //std::cout<<"KNK: "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.98,bc,tick_max*1.02); - l->SetLineColor(kGray+1); - l->Draw("same"); - can->cd(thisp+5); - l->Draw("same"); - can->cd(thisp+9); - l->Draw("same"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - for(int i=0; i<3; i++){ - can->cd(i+1); - - if(g_unass[i]->GetN()>0){ - g_unass[i]->Draw("p same"); - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - can->cd(i+5); - g_vertex[i]->Draw("p same"); - can->cd(i+9); - g_vertex[i]->Draw("p same"); - - double rad_cm = 12.0; - TEllipse * ell_p = new TEllipse(vertex_wire[i],vertex_time[i],rad_cm/0.3,rad_cm*25); - ell_p->SetLineColor(kRed); - ell_p->SetFillStyle(0); - ell_p->Draw("same"); - - } - - - - - - - //*****************************DBSCAN*********************************** - int min_pts = m_SEAviewDbscanMinPts; - double eps = m_SEAviewDbscanEps; - std::vector num_clusters(3,0); - - std::vector> g_clusters(3); - std::vector> cluster_labels(3); - - - std::vector vec_clusters; - - for(int i=0; i<3; i++){ - - std::cout<<"SinglePhoton::SSS\t||\tStarting to run DBSCAN for plane: "<> pts; - std::vector> hitz; - for(size_t p=0; p< pts_to_recluster[i].size(); p++){ - if(cluster_labels[i][p] == 0) continue;//noise - if(cluster_labels[i][p] == c){ - - pts.push_back(pts_to_recluster[i][p]); - hitz.push_back(mapPointIndexToHit[i].at(p)); - } - - } - if(hitz.size()!=0){ - vec_clusters.emplace_back(c,i,pts,hitz); - std::cout<<"SinglePhoton::SSS\t||\t Cluster "< h = mapPointIndexToHit[i].at(p);// Get the hit - size_t cluster_label = cluster_labels[i][p];//get the cluster index, 0 = noise - - //std::cout<> t_hs= {h}; - v_newClusterToHitsMap[i][cluster_label] = t_hs; - }else{ - v_newClusterToHitsMap[i].at(cluster_label).push_back(h);//add it to list - } - } - } - - - //for(size_t i=0; i<3; i++){ - // for(int c=0; c cluster_colors(max_n_clusters,0); - std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; - - for(int j=0; j< max_n_clusters; j++){ - int b = (int)rangen->Uniform(0,11); - int mod = (int)rangen->Uniform(-10,+3); - - cluster_colors[j] = base_col[b]+mod; - } - int c_offset = 0; - - //Step next, loop over and make plots again - for(int i=0; i<3; i++){ - std::vector> vec_time(num_clusters[i]+1); - std::vector> vec_wire(num_clusters[i]+1); - std::vector tmp_g_clusters(num_clusters[i]+1); - - if(cluster_labels[i].size() != pts_to_recluster[i].size()){ - std::cout<<"SinglePhoton::SSS\t||\tERROR!! someting amiss cluster labels of size "<0) tcol = cluster_colors[c+c_offset]; - tmp_g_clusters[c] = new TGraph(vec_wire[c].size(),&(vec_wire[c])[0],&(vec_time[c])[0] ); - can->cd(i+5); - if( - tmp_g_clusters[c]->GetN()>0){ - tmp_g_clusters[c]->Draw("p same"); - tmp_g_clusters[c]->SetMarkerColor(tcol); - tmp_g_clusters[c]->SetFillColor(tcol); - tmp_g_clusters[c]->SetMarkerStyle(20); - tmp_g_clusters[c]->SetMarkerSize(plot_point_size); - } - } - g_clusters[i] = tmp_g_clusters; - c_offset += num_clusters[i]; - } - - //******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - //Clusters - - /* if(m_is_data==false){ - for(auto &c: vec_clusters){ - //auto ssscor = this->ScoreCluster(c.getPlane(),c.getID(), c.getHits() ,vertex_wire[c.getPlane()], vertex_time[c.getPlane()], showers[0]); - //c.setSSScore(ssscor); - - int thisid = m_sim_shower_trackID[0]; - - for(auto &h: c.getHits()){ - - - } - } - } - */ - - - can->cd(8); - for(int i=0; i<3; i++){ - TLegend * l_bot = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); - - TLegend * l_bot2 = new TLegend(0.1+i*0.25,0.1,0.1+i*0.25+0.25,0.89); - - for(int c=0; c< num_clusters[i]+1; c++){ - if(c==0)continue; - - int num_hits_in_cluster = v_newClusterToHitsMap[i][c].size(); - auto hitz = v_newClusterToHitsMap[i][c]; - auto ssscorz = this->ScoreCluster(i,c, hitz ,vertex_wire[i], vertex_time[i], showers[0]); - int is_in_shower = this->CompareToShowers(i,c, hitz ,vertex_wire[i], vertex_time[i], showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - - double mean_summed_ADC = 0.0; - for(auto &h:hitz){ - mean_summed_ADC +=h->SummedADC(); - } - mean_summed_ADC = mean_summed_ADC/(double)num_hits_in_cluster; - - - - // std::string sname = makeSplitlineString({"Cluster: ","Hits: ","PCA: ","Theta: "},{c,num_hits_in_cluster}); - - std::string sname = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Hits: "+std::to_string(num_hits_in_cluster)+"}{#splitline{PCA "+std::to_string(ssscorz.pca_0)+"}{#splitline{Theta:" +std::to_string(ssscorz.pca_theta)+"}{#splitline{Wires: "+std::to_string(ssscorz.n_wires)+ "}{#splitline{Ticks: "+std::to_string(ssscorz.n_ticks)+"}{#splitline{ReMerged: "+std::to_string(is_in_shower)+"}{}}}}}}}"; - l_bot->AddEntry(g_clusters[i][c],sname.c_str(),"f"); - - //Here we will only plot those that pass in bottom: - //We are also going to put a hard threshold of 70cm? - // - if(ssscorz.pass && is_in_shower ==-1 ){ - can->cd(i+9); - if(g_clusters[i][c]->GetN()>0){ - TGraph * tmp = (TGraph*)g_clusters[i][c]->Clone(("tmp_"+std::to_string(i)+std::to_string(c)).c_str()); - - int Npts =m_SEAviewMaxPtsLinFit; - TGraph * core = (TGraph*)this->GetNearestNpts(i,c,hitz,vertex_wire[i],vertex_time[i],Npts); - - core->Draw("p same"); - tmp->Draw("p same"); - - double fmax = -999; - double fmin = 99999; - for(int b=0; bGetN(); b++){ - double ttx=0; - double tty=0; - core->GetPoint(b,ttx,tty); - fmax = std::max(fmax, ttx); - fmin = std::min(fmin,ttx); - } - -// std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); - core->GetFunction("pol1")->SetLineWidth(1); - core->GetFunction("pol1")->SetLineStyle(3); - core->GetFunction("pol1")->SetLineColor(g_clusters[i][c]->GetMarkerColor()); - con = core->GetFunction("pol1")->GetParameter(0); - slope = core->GetFunction("pol1")->GetParameter(1); - } - //lets map (wire,tick) to a rudamentary (cm,cm); - //double slope2 = slope*25*0.3; - //double con2 = con*25; - - double impact_parameter = 1e10;// fabs(slope*vertex_wire[i] +vertex_time[i]+con)/sqrt(slope*slope+1.0*1.0); - - //rudimentary! - for(double k=chan_min[i]; k< chan_max[i];k++){ - double y = slope*k+con; - double dist = sqrt(pow(k*0.3-vertex_wire[i]*0.3,2)+pow(y/25.0-vertex_time[i]/25.0,2)); - impact_parameter = std::min(impact_parameter,dist); - } - - //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower - //vertex_wire[i] vertex_tick[i] (already calcuated) - //cluster closest point )ssscorz.close_wire and close_tick - //recob::Shower start point, convered to wire tick. - - double shr_wire = (double)calcWire(m_reco_shower_starty[0], m_reco_shower_startz[0], i, fTPC, fCryostat, *geom); - double shr_time = calcTime(m_reco_shower_startx[0], i, fTPC,fCryostat, *theDetector); - - std::vector vec_c = {(double)(vertex_wire[i]-ssscorz.close_wire), (double)(vertex_time[i]-ssscorz.close_tick)}; - std::vector vec_s = {(double)vertex_wire[i]-shr_wire, (double)vertex_time[i]-shr_time}; - double l_c = sqrt(pow(0.3*vec_c[0],2)+pow(vec_c[1]/25.0,2)); - double l_s = sqrt(pow(0.3*vec_s[0],2)+pow(vec_s[1]/25.0,2)); - double kinda_angle = acos((0.3*vec_s[0]*0.3*vec_c[0]+vec_c[1]*vec_s[1]/(25.0*25.0) )/(l_c*l_s)); - //std::cout<<"KINDA "<CalcEShowerPlane(hitz,(int)i)); - m_sss_candidate_angle_to_shower.push_back(kinda_angle); - - - if(m_is_data){ - m_sss_candidate_matched.push_back(-1); - m_sss_candidate_pdg.push_back(-1); - m_sss_candidate_parent_pdg.push_back(-1); - m_sss_candidate_trackid.push_back(-1); - m_sss_candidate_overlay_fraction.push_back(-1); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); - }else{ - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleIdMap, MCParticleToTrackIdMap); - m_sss_candidate_matched.push_back(ssmatched[0]); - m_sss_candidate_pdg.push_back(ssmatched[1]); - m_sss_candidate_parent_pdg.push_back(ssmatched[2]); - m_sss_candidate_trackid.push_back(ssmatched[3]); - m_sss_candidate_overlay_fraction.push_back(ssmatched[4]); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[5]); - } - - - std::string sname2 = "#splitline{Cluster "+std::to_string(c)+"}{#splitline{Impact: "+std::to_string(impact_parameter)+"}{MinDist: "+std::to_string(ssscorz.min_dist)+"}}"; - l_bot2->AddEntry(tmp,sname2.c_str(),"f"); - } - } - - } - - //Some time matching - - - //Closest neightor - for(int l=0; l< m_sss_num_candidates; l++){ - int this_p = m_sss_candidate_plane[l]; - double close = 1e10; - for(int m=0; m< m_sss_num_candidates;m++){ - if(this_p == m_sss_candidate_plane[m]) continue; - double dup = fabs(m_sss_candidate_mean_tick[l] - m_sss_candidate_mean_tick[m]); - close = std::min(dup,close); - } - m_sss_candidate_closest_neighbour.push_back(close); - } - - for(int l=0; l< m_sss_num_candidates; l++){ - - std::vector thisvars = { (double)m_sss_candidate_num_hits[l], (double)m_sss_candidate_num_wires[l], (double)m_sss_candidate_num_ticks[l], (double)m_sss_candidate_PCA[l], log10((double)m_sss_candidate_impact_parameter[l]), log10((double)m_sss_candidate_min_dist[l]), (double)m_sss_candidate_impact_parameter[l]/(double)m_sss_candidate_min_dist[l], (double)m_sss_candidate_energy[l]*0.001, cos((double)m_sss_candidate_angle_to_shower[l]), (double)m_sss_candidate_fit_slope[l], (double)m_sss_candidate_fit_constant[l], (double)m_sss_candidate_plane[l],m_reco_shower_energy_max[0]*0.001, 2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l])) , log10(2*0.001*0.001*m_sss_candidate_energy[l]*m_reco_shower_energy_max[0]*(1.0-cos(m_sss_candidate_angle_to_shower[l]))),m_sss_candidate_energy[l]/m_reco_shower_energy_max[0], (double)m_sss_candidate_closest_neighbour[l] }; - - - //double score = sssVetov1->GetMvaValue(thisvars); - double score = -1; - m_sss_candidate_veto_score.push_back(score); - - } - - - can->cd(8); - l_bot->SetLineWidth(0); - l_bot->SetLineColor(kWhite); - l_bot->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); - l_bot->Draw("same"); - - can->cd(12); - l_bot2->SetLineWidth(0); - l_bot2->SetLineColor(kWhite); - l_bot2->SetHeader(("Plane "+std::to_string(i)).c_str(),"C"); - l_bot2->Draw("same"); - - - - - - - - - } - //********** Some Error Checking ********************// - - /*for(int i=0; i<3; i++){ - - std::cout<<"Plane "<GetN()<GetN()<GetN()<GetN()<Update(); - //can->Write(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); - //f->Close(); - std::cout<<"SinglePhoton::SSS\t||\tPRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ - - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; - - std::vectorall_wire; // wire of all hits - std::vectorall_tick; - std::vectorall_dist; // distance to vertex of all hits - - - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order - size_t max_e = std::min((size_t)Npts,hitz.size()); - - for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - sss_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; - - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; - - score.pass = true; - - // ************* Some simple metrics relative to study point (usually vertex) *************** - // this can be moved to inclass initializer - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; - - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; - - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; - - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; - - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; - - score.n_wires = 0; - score.n_ticks = 0; - - score.impact_parameter = -99; - - score.close_tick = -99; - score.close_wire = -99; - - std::map wire_count; - std::map tick_count; - - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - score.mean_wire += h_wire; - score.mean_tick += h_tick; - - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); - - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); - - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); - - //wierd dits - //requires that hit in hits has to be on the same plane as vertex_wire. - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } - - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); - - - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); - - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - - } - - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; - - score.mean_dist = score.mean_dist/(double)score.n_hits; - - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA - - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; - - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); - - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); - - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } - - - - - delete principal; - - return score; - } - - int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - std::vector> showerhits = pfParticleToHitsMap.at(pfp); - - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - - for(auto &sh: showerhits){ - - if(sh->View() != hit->View()) continue; - - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); - - - double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); - - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } - - } - - } - - if(in_primary_shower){ - return (int)s; - } - } - - - return -1; - } - - - - std::vectorSinglePhoton::SecondShowerMatching( - std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr> & MCParticleToTrackIdMap - ){ - - - std::vector ans; //matched,pdg,parentpdg,trkid - - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - bool found_a_match = false; - - //loop only over hits associated to this reco PFP - for(size_t i_h=0; i_h < hitz.size(); ++i_h){ - int which_plane = (int)hitz[i_h]->View(); - particle_vec.clear(); match_vec.clear(); //only store per hit - //for the hit, fill the backtracker info - mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); - - //if there is an MCParticle associated to this hit - if(particle_vec.size()>0) n_associated_mcparticle_hits++; - if(particle_vec.size()==0) n_not_associated_hits++; - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - } // end loop over hit - if(found_a_match){ - std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; - std::map, std::vector> marks_mother_energy_fraction_map; - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP - - bool is_old = false; - - for(size_t k=0; k< marks_mother_vector.size(); k++){ - //if its in it before, just run with it - if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ - marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; - is_old = true; - break; - } - } - if(is_old==false){ - marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); - marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; - marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; - } - - - num_bt_mothers++; - } else{ - if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } - - } - - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - int par_pdg = -1; - if (match_mother.isNull()){ - par_pdg = -1; - - }else{ - par_pdg = match_mother->PdgCode(); - } - - ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; - - return ans; - }//end sss matching; - - - - - - - //************************************************ Shower Search Slice Second SSS3D ********** / - - void SinglePhoton::ClearSecondShowers3D(){ - - m_sss3d_num_showers = 0; - m_sss3d_shower_start_x.clear(); - m_sss3d_shower_start_y.clear(); - m_sss3d_shower_start_z.clear(); - m_sss3d_shower_dir_x.clear(); - m_sss3d_shower_dir_y.clear(); - m_sss3d_shower_dir_z.clear(); - m_sss3d_shower_length.clear(); - m_sss3d_shower_conversion_dist.clear(); - m_sss3d_shower_invariant_mass.clear(); - m_sss3d_shower_implied_invariant_mass.clear(); - m_sss3d_shower_impact_parameter.clear(); - m_sss3d_shower_energy_max.clear(); - m_sss3d_shower_score.clear(); - m_sss3d_slice_nu.clear(); - m_sss3d_slice_clear_cosmic.clear(); - m_sss3d_shower_ioc_ratio.clear(); - } - - - void SinglePhoton::CreateSecondShowerBranches3D(){ - vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); - - vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); - vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); - vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); - vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); - vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); - vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); - - vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); - vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); - vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); - vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); - vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); - vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); - vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); - vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); - //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); - //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); - } - - - void SinglePhoton::SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ - - std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" - double max_conv_dist = 80.0; - - art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); - std::vector> allShowerVector; - art::fill_ptr_vector(allShowerVector,allShowerHandle); - std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, std::vector> > showerToHitsMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); - } - - art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, art::Ptr > showerToPFParticleMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); - } - - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); - std::vector> allPFParticleVector; - art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); - - //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); - //pfPartToMetadataAssoc.at(pfp.key()); - - size_t n_all_shr = allShowerVector.size(); - m_sss3d_num_showers = (int)n_all_shr-showers.size(); - - if(showers.size()==0) return; - - auto primary_shower = showers.front(); - - std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); - if(dist>max_conv_dist) continue; - - auto pfp = showerToPFParticleMap[shr]; - //for(auto &prr: allPFParticleVector){ - // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; - - /* - std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - - for (auto it:propertiesmap ){ - std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); - //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); - //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"<CalcEShower(showerToHitsMap[shr]); - double invar = implied_invar_mass(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, primary_shower, m_reco_shower_energy_max[0], shr, senergy); - double implied_invar = invar_mass(primary_shower, m_reco_shower_energy_max[0], shr, senergy) ; - double shr_score = 0.0; //need pfp and metadata to get score, and might give slice! (This will be harder..) but on reflection, kinda important. PCA spread might be a good rplacement. - int is_clear_cosmic_slice = 0 ; - int is_nu_slice = 0; - - - m_sss3d_shower_start_x.push_back(shr->ShowerStart().X()); - m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); - m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); - m_sss3d_shower_dir_x.push_back(shr->Direction().X()); - m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); - m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); - m_sss3d_shower_length.push_back(shr->Length()); - m_sss3d_shower_conversion_dist.push_back(dist); - m_sss3d_shower_invariant_mass.push_back(invar); - m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); - double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); - m_sss3d_shower_impact_parameter.push_back(imp); - - if(dist!=0) { - m_sss3d_shower_ioc_ratio.push_back(imp/dist); - }else{ - m_sss3d_shower_ioc_ratio.push_back(0); - - } - m_sss3d_shower_energy_max.push_back(senergy);// - m_sss3d_shower_score.push_back(shr_score); - m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); - m_sss3d_slice_nu.push_back(is_nu_slice); - } - - return; - } - - - - void SinglePhoton::SimpleSecondShowerCluster(){ - - std::string base = "sss3d_"; - std::vector mod = {"ioc_ranked","invar_ranked"}; - - m_sss3d_ioc_ranked_en = -9; - m_sss3d_ioc_ranked_conv = -9; - m_sss3d_ioc_ranked_invar = -9; - m_sss3d_ioc_ranked_implied_invar = -9; - m_sss3d_ioc_ranked_ioc = -9; - m_sss3d_ioc_ranked_opang = -9; - m_sss3d_ioc_ranked_implied_opang = -9; - m_sss3d_ioc_ranked_id = -9; - - m_sss3d_invar_ranked_en = -9; - m_sss3d_invar_ranked_conv = -9; - m_sss3d_invar_ranked_invar = -9; - m_sss3d_invar_ranked_implied_invar = -9; - m_sss3d_invar_ranked_ioc = -9; - m_sss3d_invar_ranked_opang = -9; - m_sss3d_invar_ranked_implied_opang = -9; - m_sss3d_invar_ranked_id = -9; - - - std::string base2d = "sss_"; - std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; - - m_sss2d_ioc_ranked_en = -9; - m_sss2d_ioc_ranked_conv = -9; - m_sss2d_ioc_ranked_ioc = -9; - m_sss2d_ioc_ranked_pca = -9; - m_sss2d_ioc_ranked_invar = -9; - m_sss2d_ioc_ranked_angle_to_shower = -9; - m_sss2d_ioc_ranked_num_planes = -9; - - m_sss2d_conv_ranked_en = -9; - m_sss2d_conv_ranked_conv = -9; - m_sss2d_conv_ranked_ioc = -9; - m_sss2d_conv_ranked_pca = -9; - m_sss2d_conv_ranked_invar = -9; - m_sss2d_conv_ranked_angle_to_shower = -9; - m_sss2d_conv_ranked_num_planes = -9; - - m_sss2d_invar_ranked_en = -9; - m_sss2d_invar_ranked_conv = -9; - m_sss2d_invar_ranked_ioc = -9; - m_sss2d_invar_ranked_pca = -9; - m_sss2d_invar_ranked_invar = -9; - m_sss2d_invar_ranked_angle_to_shower = -9; - m_sss2d_invar_ranked_num_planes = -9; - - //--------------------------------------- - //First off, the 3D showers - //First some 3D shower information - if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ - //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; - for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); - - std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); - std::vector ranked_invar = sort_indexes_rev((inv)); - std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); - std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); - - int to_consider = m_sss3d_shower_conversion_dist.size(); - - if(false){ - std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ - //std::cout<<"2D clusters: "< nplans(3,0); - std::vector> indexmap(3); - - - for(int i=0; i< m_sss_num_candidates; i++){ - //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; - - for(int i=0; i< m_sss_num_candidates; i++){ - int ip = m_sss_candidate_plane.at(i); - //int nhits = sss_candidate_num_hits.at(i); - nplans[ip]++; - indexmap[ip].push_back(i); - - //Two passes to build up all "Candidates" for 2 and 3 plane matches - for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; - if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; - // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - - //If this matches well with Either last candidate, include as a possibility - if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ - uniq_candidates[i].push_back(k); - } - - } - } - } - //Check which candidates have been used where - std::vector used_candidates(m_sss_num_candidates); - for(int i = 0; i< (int)uniq_candidates.size(); i++){ - for(auto &j: uniq_candidates[i]){ - used_candidates[j]++; - } - } - - //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own - for(int i = 0; i< (int)used_candidates.size(); i++){ - if(used_candidates[i]==0) uniq_candidates.push_back({i}); - } - - //Now lets delete any permutations - std::vector> uniq_candidates2; - uniq_candidates2.push_back(uniq_candidates.front()); - - for(int i = 1; i< (int)uniq_candidates.size(); i++){ - - bool perm = false; - for(int j = 0; j< (int)uniq_candidates2.size(); j++){ - perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); - if(perm) break; - } - if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); - } - - //Printing candidates (After perm check) - std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); - std::vector candidates_en(uniq_candidates2.size(),0); - std::vector candidates_ioc(uniq_candidates2.size(),0); - std::vector candidates_conv(uniq_candidates2.size(),0); - std::vector candidates_pca(uniq_candidates2.size(),0); - std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); - std::vector candidates_num_planes(uniq_candidates2.size(),0); - std::vector candidates_eff_invar(uniq_candidates2.size(),0); - std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); - - //rank by min_impat/max_min_dist and select - //rank by Energy energy - - for(int j=0; j<(int)uniq_candidates2.size();j++){ - int nt=uniq_candidates2[j].size(); - //std::cout<<"Candidate #: "< is_in_slice; - - for(int c=0; c< nt;++c){ - int ic = uniq_candidates2[j][c]; - - //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); - std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); - std::vector ranked_conv = sort_indexes_rev(candidates_conv); - - std::cout<<"========== Ranking ======== "<> SinglePhoton::clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ - - size_t size = candidate_indices.size(); - if(size == 0){ - throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); - } - - // at most 3 cluster indices (for 3 planes) - std::vector planes; - std::vector max_ticks; - std::vector min_ticks; - std::vector tick_length; - - for(auto i : candidate_indices){ - planes.push_back(cluster_planes[i]); - - max_ticks.push_back(cluster_max_ticks[i]); - min_ticks.push_back(cluster_min_ticks[i]); - tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); - } - - - //if candidates are not on different planes - if( size == 2 && planes[0] == planes[1]) - return {false, std::vector(2, -1.0)}; - if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) - return {false, std::vector(3, -1.0)}; - - //calculate the overlapping tick-span - double tick_overlap = DBL_MAX; - - //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction - for(auto max_e : max_ticks) - for(auto min_e : min_ticks) - if(max_e - min_e < tick_overlap) - tick_overlap = max_e - min_e; - - // if tick overlap is negative, meaning these clusters are not overlapping - if(tick_overlap < 0) - return {false, std::vector(size, -1.0)}; - else{ - std::vector overlap_fraction; - for(auto l: tick_length){ - overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); - } - return {true, overlap_fraction}; - } - } - - - std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ - std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; - - int num_cluster_groups=0; // number of matched cluster groups in total - std::vector> grouped_cluster_indices; - std::vector cluster_group_timeoverlap_fraction; - if(num_clusters <= 1) - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - - for(int i = 0; i != num_clusters -1; ++i){ - for(int j = i+1; j != num_clusters; ++j){ - - //first, look at candidate pairs - auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if( pair_result.first){ - - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j}); - double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; - - // if the pair is succefully grouped, look at possible trios - for(int k = j+1; k!= num_clusters; ++k){ - auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if(tri_result.first){ - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); - min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; - } - } //k loop - } - }//j loop - }//i loop - - std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; - - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - } - -} diff --git a/ups/product_deps b/ups/product_deps index 432cb4a68..7b8daafef 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -35,7 +35,7 @@ fwdir product_dir scripts product version larsoft v09_44_00 -sbnobj v09_13_06 +sbnobj v09_13_05 sbnanaobj v09_17_12 sbndaq_artdaq_core v1_00_00of2 genie_xsec v3_00_04a From 92a0bfac57d191ce9f84f533d7f51f0148dae944 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 11 Mar 2022 20:42:02 -0600 Subject: [PATCH 11/54] add flowchart in README --- sbncode/SinglePhotonAnalysis/README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index a0be4c4c7..6511c473e 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -5,12 +5,21 @@ The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repos ## Whats in the directories -`App` contains the main code. - `Libraries` contains essential headers for this module. `SEAview` is an additional module runs inside this module. `job` contains jobs for running the module. -`Utilities` contains helper functions for simple calculations. +`HelperFunctions` contains helper functions for simple calculations. + +Header structure +```mermaid + Flowchart TB + A--first formost-->C; + A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; + C[SinglePhoton_module.h]-->D[helper_functions.h]; + C-->E[Atlas.h]; + C-->F[SBSCAN.h]; + C-->G[SEAviewer.h]; +``` From 1f425f8ab8d1bc0dea933f2cf65c3cda334492b5 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 11 Mar 2022 20:50:32 -0600 Subject: [PATCH 12/54] update mermaid format for README --- sbncode/SinglePhotonAnalysis/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 6511c473e..fa9052293 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -14,8 +14,9 @@ The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repos `HelperFunctions` contains helper functions for simple calculations. Header structure + ```mermaid - Flowchart TB + Flowchart TD; A--first formost-->C; A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; C[SinglePhoton_module.h]-->D[helper_functions.h]; From ba722e9dd15ab5de23c714abdd685fda8bbdc5ae Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 11 Mar 2022 20:51:30 -0600 Subject: [PATCH 13/54] working flowchart for README --- sbncode/SinglePhotonAnalysis/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index fa9052293..57fb5fb44 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -16,7 +16,7 @@ The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repos Header structure ```mermaid - Flowchart TD; + flowchart TD; A--first formost-->C; A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; C[SinglePhoton_module.h]-->D[helper_functions.h]; From 42038e30542e7c118a2de8748c0838779a7ce739 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 17 Mar 2022 14:29:56 -0500 Subject: [PATCH 14/54] so far so good, no problems seen with small sample test --- .../Libraries/SinglePhoton_module.h | 1909 ----------------- .../Libraries/analyze_MCTruth.h | 2 +- .../Libraries/analyze_Showers.h | 86 +- .../Libraries/fiducial_volume.h | 2 - .../Libraries/isolation.h | 11 +- .../Libraries/reco_truth_matching.h | 1 - .../Libraries/second_shower_search.h | 15 - sbncode/SinglePhotonAnalysis/README.md | 10 +- .../SinglePhoton_module.cc | 237 +- .../SinglePhoton_module.h | 10 +- .../jobs/singlephoton_sbnd.fcl | 8 +- 11 files changed, 192 insertions(+), 2099 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h diff --git a/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h deleted file mode 100644 index 730831536..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/SinglePhoton_module.h +++ /dev/null @@ -1,1909 +0,0 @@ -#ifndef SINGLE_PHOTON_ANALYSIS -#define SINGLE_PHOTON_ANALYSIS - -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" - -//KENG, should use these in sbndcode -//#include "art/Framework/Services/Optional/TFileService.h" -//#include "art/Framework/Services/Optional/TFileDirectory.h" -#include "art_root_io/TFileService.h" -#include "art_root_io/TFileDirectory.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/OpFlash.h" -//KENG -#include "sbnobj/Common/CRT/CRTHit.hh" -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/MCBase/MCShower.h" -#include "lardataobj/AnalysisBase/Calorimetry.h" -#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" -#include "lardataobj/AnalysisBase/ParticleID.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/GeneratedParticleInfo.h" - -#include "larsim/EventWeight/Base/MCEventWeight.h" - -#include "larevt/SpaceChargeServices/SpaceChargeService.h" - -#include "larcoreobj/SummaryData/POTSummary.h" - -#include "nusimdata/SimulationBase/MCParticle.h" -#include "nusimdata/SimulationBase/MCTruth.h" -#include "nusimdata/SimulationBase/simb.h" -#include "nusimdata/SimulationBase/MCFlux.h" -#include "nusimdata/SimulationBase/GTruth.h" -#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" - -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" - -#include "larcore/Geometry/Geometry.h" - -//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" - -#include "canvas/Utilities/ensurePointer.h" -#include "canvas/Persistency/Common/FindManyP.h" -#include "canvas/Persistency/Common/FindMany.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "canvas/Persistency/Common/FindOne.h" - -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" -#include "cetlib_except/exception.h" - -//#include "ubobj/Optical/UbooneOpticalFilter.h" - -// Helper function for PID stuff -//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" - -#include "TCanvas.h" -#include "TTree.h" -#include "TFile.h" -#include "TGraph.h" -#include "TGraph2D.h" -#include "TGraphDelaunay.h" -#include "TRandom3.h" -#include "TGeoPolygon.h" - -//#include "Pandora/PdgTable.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "helper_functions.h" - -#include "bad_channel_matching.h" -#include "DBSCAN.h" - -#include "SEAview/SEAviewer.h" - - -//------------------------------------------------------------------------------------------------------------------------------------------ - -namespace single_photon -{ - - struct sss_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; /* wire of hit that's closest to vertex */ - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; /* number of wires hits correspond to */ - int n_ticks; - - bool pass; - - sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of class sss_score - - class cluster { - - public: - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) - :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - f_npts = f_pts.size(); - if(pts.size() != hits.size()){ - std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts,&wires[0],&ticks[0]); - f_graph = af_graph; - - }; - - int getID() {return f_ID;} - int getN() {return f_npts;} - int getPlane(){ return f_plane;} - TGraph * getGraph(){ return &f_graph;} - std::vector> getHits(){return f_hits;} - int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} - sss_score * getSSScore(){return f_SSScore;} - private: - - int f_ID; - int f_npts; - int f_plane; - std::vector> f_pts; - std::vector> f_hits; - TGraph f_graph; - sss_score *f_SSScore; - }; // end of class cluster - - - - /** - * @brief SinglePhoton class - */ - class SinglePhoton : public art::EDFilter - { - public: - // name alias from pandora - typedef art::ValidHandle< std::vector > PFParticleHandle; - typedef std::vector< art::Ptr > PFParticleVector; - typedef std::vector< art::Ptr > TrackVector; - typedef std::vector< art::Ptr > ShowerVector; - typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - /** - * @brief Constructor - * - * @param pset the set of input fhicl parameters - */ - SinglePhoton(fhicl::ParameterSet const &pset); - - /** - * @brief Configure memeber variables using FHiCL parameters - * - * @param pset the set of input fhicl parameters - */ - void reconfigure(fhicl::ParameterSet const &pset); - - /** - * @brief Analyze an event! - * - * @param evt the art event to analyze - */ - bool filter(art::Event &evt) override; - - /** - * @brief Begin the job, setting up ! - * - */ - void beginJob() override; - - /** - * @brief End the job, setting down ! - * - */ - void endJob() override; - /** - * @brief: grab run, subrun number, and subrun POT, fill the TTree */ - bool beginSubRun(art::SubRun& sr) override; - bool endSubRun(art::SubRun& sr) override; - - private: - /** - * @brief: reset/clear data members - */ - void ClearVertex(); - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleHandle the handle for the PFParticle collection - * @param pfParticleMap the mapping from ID to PFParticle - */ - void GetPFParticleIdMap(const PFParticleHandle &pfParticleHandle, PFParticleIdMap &pfParticleMap); - - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ - void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; - - /** - * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation - * - * @param pfParticleMap the mapping from ID to PFParticle - * @param crParticles a vector to hold the top-level PFParticles reconstructed under the cosmic hypothesis - * @param nuParticles a vector to hold the final-states of the reconstruced neutrino - */ - void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap,const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, PFParticleVector &nuParticles); - - /** - * @brief Collect associated tracks and showers to particles in an input particle vector - * - * @param particles a vector holding PFParticles from which to find the associated tracks and showers - * @param pfParticleHandle the handle for the PFParticle collection - * @param evt the art event to analyze - * @param tracks a vector to hold the associated tracks - * @param showers a vector to hold the associated showers - */ - void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief: analyze associated tracks/showers for an PFParticle - * @param: pParticle: PFParticle to be analyzed - * @param: associatedTracks: a vector of asso track for pParticle - * @param: associatedShowers: a vector of asso shower for pParticle - * @param: tracks: associated track will be added into tracks - * @param: showers: associated shower will be added into showers - * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle - */ - void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief:get vertex for particle and fill in reco. vertex information - * @param: particle: a primary neutrino - */ - void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); - - void CollectCalo(const art::Event &evt,const art::Ptr &shower); - - - /* - *@brief Calculated the shower energy by looping over all the hits and summing the charge - *@param hits - an art pointer of all the hits in a shower - * */ - double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ - double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ - - int getNHitsPlane(std::vector> hits, int this_plane); - double getMeanHitWidthPlane(std::vector> hits, int this_plane); - - - /** - *@brief Takes a hit and multiplies the charge by the gain - *@param thishitptr art pointer to a hit - *@param plane the plane the hit is on - **/ - double GetQHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV for a given hit - * @param thishit - an individual hit - * - * - * */ - double QtoEConversionHit(art::Ptr thishitptr, int plane); - - /** - * @brief Calculate the E value in MeV from a given Q value - * @param q - the charge value - * - * */ - double QtoEConversion(double q); - - - /** - *@brief Takes a vector of dQ/dx values and converts to dE/dx - *@param dqdx - vector of dqdx points - * - * */ - std::vector CalcdEdxFromdQdx(std::vector dqdx); - - /** - * - *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane - *@param shower - a Pandora shower - *@param clusters - all of the clusters in the shower - *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster - *@param plane - a single plane - * * */ - - std::vector CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane); - /** - *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) - *@param shower_dir - the 3D shower direction - *@param plane - a single plane - * */ - double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ - double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - - double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ - int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - - double degToRad(double deg); - double radToDeg(double rad); - /** - *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction - *@param cluster_start - the start position of a cluster in CM - *@param cluster_axis - calculated from the cluster end minus the cluster start - *@param width - typically ~1cm - *@param length - typically a few cm - * - * */ - std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); - - /** - *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle - *@param thishit_pos - 2d location of a hit in cm - *@param rectangle - vector of the positions of the four corners of the rectangle - * - * */ - bool insideBox(std::vector thishit_pos, std::vector> rectangle); - - /** - * - *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary - *uses triangle area check - * - * */ - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - - double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); - - /*** - *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 - *@param thisvector - vector of doubles - * - * */ - double getMedian(std::vector thisvector); - - - //---------------- Templatees ---------------------------- - void AnalyzeTemplates(); - void ClearTemplates(); - void ResizeTemplates(size_t); - void CreateTemplateBranches(); - - //---------------- Potential Track Stub -------------------- - void ClearStubs(); - void CreateStubBranches(); - - /* @brief: given indices of clusters, determine if they overlap in time - * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters - * candidate_indices provided the indices of clusters of which we'd like to check the overlap - */ - std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information - * @brief: candidate clusters on different plane that overlap in time tick will be grouped together - * @return: return.first -> number of possible matches - * return.second.first -> 2D vector, indices of clusters in every possible match - * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match - */ - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - - //---------------- SecondShower---- - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ - - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ - - void SimpleSecondShowerCluster(); - - - void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); - - - /* this function is now redundant, not in use anymore */ - void SecondShowerSearch( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - detinfo::DetectorPropertiesData const & theDetector); - - - /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits - * and return a vector of 7 elements: - * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} - */ - std::vectorSecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - - /* analyze a cluster of hits, and return corresponding sss_score */ - sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); - - /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits - * This function is currently used in function 'SecondShowerSearch' - * @parameter: plane, cluster are not in use - * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire - */ - TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); - - - /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ - int CompareToShowers(int,int,std::vector>& hitz,double,double, - const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); - //---------------- Isolation ----------------- - - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ - - /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ - void IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector); - - - - //---------------- Flashes ---------------------------- - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); - - - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ - - //---------------- Tracks ---------------------------- - /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ - void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, - std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap - ); - - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ - void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); - - - /* @brief: analyze MCParticle related to recob::Track if it has one - * variables starting with 'm_sim_track_' will be updated - * */ - void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector& vec); - - - /* collect information from anab::sParticleIDAlgScores of reco track */ - void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); - TGraph proton_length2energy_tgraph; - - //---------------- Showers ---------------------------- - - void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap); - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, - std::map,art::Ptr> & pfptotrkmap, - std::map,std::vector>> & trktocalomap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector); - - void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector); - - /** - * @brief: match showers to MCParticles - * @arguments filled during function execution: - * mcParticleVector: vector of mother particles of showers - * objectToMCParticleMap: map of shower to its mother particle - */ - void showerRecoMCmatching(std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap); - - - /* tranverse through mcParticleVector, and print out infos for photons */ - int photoNuclearTesting(std::vector>& mcParticleVector); - - // ------------ Fid Volume and SCB------------------------- // - double m_tpc_active_x_low; - double m_tpc_active_x_high; - double m_tpc_active_y_low; - double m_tpc_active_y_high; - double m_tpc_active_z_low ; - double m_tpc_active_z_high; - - double m_SCB_YX_TOP_y1_array; - std::vector m_SCB_YX_TOP_x1_array; - std::vector m_SCB_YX_TOP_y2_array; - double m_SCB_YX_TOP_x2_array; - double m_SCB_YX_BOT_y1_array; - std::vector m_SCB_YX_BOT_x1_array; - std::vector m_SCB_YX_BOT_y2_array; - double m_SCB_YX_BOT_x2_array; - - double m_SCB_ZX_Up_z1_array ; - double m_SCB_ZX_Up_x1_array ; - double m_SCB_ZX_Up_z2_array ; - double m_SCB_ZX_Up_x2_array ; - - double m_SCB_ZX_Dw_z1_array; - std::vector m_SCB_ZX_Dw_x1_array; - std::vector m_SCB_ZX_Dw_z2_array; - double m_SCB_ZX_Dw_x2_array; - - int isInTPCActive(std::vector&); /* if point is in active TPC volume */ - int isInTPCActive(double cut,std::vector&); - double distToTPCActive(std::vector&vec); - /* if point in active TPC, returns distance from point to closest TPC wall - * otherwise, returns -999 */ - - int isInSCB(std::vector&); /* if point is inside SCB */ - int isInSCB(double cut,std::vector&); - int distToSCB(double & dist, std::vector &vec); - /* calc the minimum distance from point to the SC boundary,save to dist. - * return value (0, or 1) indicates whether the point is in SCB */ - int setTPCGeom(); - /* This function is wrong, and Not used */ - bool loadSCB_YX(std::vector&zpolygons); - - //---------------- MCTruths ---------------------------- - - /** - * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) - */ - void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); - - std::map is_delta_map; - - //---------------- EventWeight ---------------------------- - - /** - * @brief: fill event weight related variables */ - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ - - //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. - - - //---------------- Geant4 ---------------------------- - - /** - * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); - - - - - - /** - * @brief: given an event and a label, collect all the SimChannel with that label - * @ param: simChannelVector: a vector of SimChannel [to be filled] - */ - void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); - - /** - * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use - * @param: evt: event, label: given label - * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] - * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] - * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] - */ - void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); - - void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); - - - //-------------- Slices/Pandora Metadata ---------------// - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - //void CreateMatchedSliceBranches(); - - - /** - * brief: analyze metadata of PFParticles, and fill in all these maps - * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap - * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby - */ - void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> & primaryPFPSliceIdVec, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap); - - // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumPFPsMap ); - - std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ - //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); - - /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ - int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - - int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - //can also look at things like shower energy, conversion length, etc. - - - /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ - std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap ); - // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - // std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumShowersMap ); - - - /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ - std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap); - - /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info - * to determine how many eligible tracks and showers there are in the event - */ - void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap, - std::map, int>& PFPToSliceIdMap); - - - void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); - - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - //------- matched shower ------------------------------------- - - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - - - - //------------------ Delaunay triangle tools -----------// - - double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ - int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found - * and total area of these triangles, - * save to num_triangles & area */ - int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ - - // given a MCParticle, get its corrected vertex - //CHECK can merge three in one? - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); - int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); - // given a particle, and input location calculate its corrected true position, so we can compare it to reco - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); - - //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 - std::vector> bad_channel_list_fixed_mcc9; - std::map bad_channel_map_fixed_mcc9; - - - /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ - bool IsEventInList(int run, int subrun, int event); - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - std::string m_badChannelLabel; - std::string m_badChannelProducer; - std::string m_mcTrackLabel; - std::string m_mcShowerLabel; - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer;//"daq" - std::ofstream out_stream; - - double m_mass_pi0_mev; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - //Keng, DetectorClocks now is declared in each event -// detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); -// detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); - spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - //double m_gain; - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - - int m_Cryostat; - int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - - bool bool_make_sss_plots; - - - //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - - - int m_reco_asso_showers; - - double m_reco_vertex_to_nearest_dead_wire_plane0; - double m_reco_vertex_to_nearest_dead_wire_plane1; - double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - int m_reco_num_templates; - std::vector m_reco_template; /* temp comment: does not seem to be used */ - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - - double m_CRT_dt; //time between flash and nearest CRT hit - - //------------ Track related Variables ------------- - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - // ---- corresponding variables on the best plane of reco track, which is defined as such------ - // if plane 2 have good hits, then plane 2 is the best-plane - // otherwise, which plane of plane 0 and 1 has more good hits will be best plane - // if none of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - - std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ - std::vector m_reco_track_end_to_nearest_dead_wire_plane1; - std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - /* event origin types: - * kUnknown: ??? - * kBeamNeutrino: Beam neutrinos. - * kCosmicRay: Cosmic rays. - * kSuperNovaNeutrino: Supernova neutrinos. - * kSingleParticle: single particles thrown at the detector - */ - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - * if there is no shower hits, set to 999 - * if there is shower hits but no track hits, set to -999 - */ - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - * set to -999 if there is no unassociated hits or track hits on plane - */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - * on each plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - - /*-------------------------------------------------------------------------------------*/ - - //------------ Shower related Variables ------------- - - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - - std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ - std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - //end flash matching - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - - - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - - - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - * plane 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - - - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - - double m_mctruth_leading_exiting_proton_energy; - - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - - - int m_mctruth_num_reconstructable_protons; - - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - * close enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - - - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - - - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - - double _time2cm;//value modeled from David's shower code - - // PID-related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - //Geant4 - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; - - - - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ - bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ - }; - - DEFINE_ART_MODULE(SinglePhoton) - -} // namespace lar_pandora -#endif -//------------------------------------------------------------------------------------------------------------------------------------------ -// implementation follows diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 8a64a3b39..58476aa84 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -250,7 +250,7 @@ namespace single_photon //one mctruth per event. contains list of all particles for(int i=0; i truth = mcTruthVector[i]; - std::cout<<"\nCHECK THIS MCTruth!! "<<*truth<Origin(); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 07aea04f9..835cd2c33 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -892,9 +892,9 @@ namespace single_photon for(int i_flash = 0; i_flash < m_reco_num_flashes; ++i_flash) { double const zcenter=m_reco_flash_zcenter[i_flash]; - if(m_is_verbose) std::cout<< "SinglePhoton::AnalyzeShowers()\t||\tflash z center:" < z(n,0.0); + + TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); + TGraphDelaunay delan(g); + delan.SetMarginBinsContent(0); + delan.ComputeZ(0,0); + delan.FindAllTriangles(); + (*num_triangles)=delan.GetNdt(); // number of Delaunay triangles found + + //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays + Int_t *MT = delan.GetMTried(); + Int_t *NT = delan.GetNTried(); + Int_t *PT = delan.GetPTried(); + + (*area)=0.0; + for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ + + int n = hits.size(); + std::vector C0,T0; + std::vector C1,T1; + std::vector C2,T2; + size_t n_0=0; + size_t n_1=0; + size_t n_2=0; + + for(int i=0;i hit = hits[i]; + switch(hit->View()){ + case 0: + C0.push_back((double)hit->WireID().Wire); + T0.push_back(hit->PeakTime()); + n_0++; + break; + case 1: + C1.push_back((double)hit->WireID().Wire); + T1.push_back(hit->PeakTime()); + n_1++; + break; + case 2: + C2.push_back((double)hit->WireID().Wire); + T2.push_back(hit->PeakTime()); + n_2++; + break; + default: + break; + } + } + if(m_use_delaunay){ + if(n_0>0 && (int)n_0 < m_delaunay_max_hits) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); + if(n_1>0 && (int)n_1 < m_delaunay_max_hits) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); + if(n_2>0 && (int)n_2 < m_delaunay_max_hits) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); + } + num_hits[0] = n_0; + num_hits[1] = n_1; + num_hits[2] = n_2; + + //std::cout<<"Plane 0: "<, std::vector> > & pfParticleToHitsMap, const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector) + detinfo::DetectorPropertiesData const & theDetector, + int slice_w_bestnuID) { int total_track_hits =0; @@ -91,6 +92,9 @@ void SinglePhoton::IsolationStudy( art::Ptr pfp = trackToPFParticleMap[track]; int sliceid = pfParticleToSliceIDMap.at(pfp); + //CHECK temp. solution only work with best nuscore slice Keng + std::cout<<"Looking at slice "<> slicehits = sliceIDToHitsMap.at(sliceid); std::vector> trackhits = pfParticleToHitsMap.at(pfp); @@ -98,7 +102,8 @@ void SinglePhoton::IsolationStudy( std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; total_track_hits += trackhits.size(); -//CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs, need to fix this; +//CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; +//CHECK temporary solution is to skip tracks[1]; if(nu_slice_id != sliceid && nu_slice_id != -999){ std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< pfp = showerToPFParticleMap.at(shower); int sliceid = pfParticleToSliceIDMap.at(pfp); + + if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng if(sliceid<0) continue; //negative sliceid is bad CHECK //CHECK ID not found? std::cout<<"CHECK "<<__LINE__<<" find hits at ID "< //#include diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h index 0578aac8a..c698ee336 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h @@ -1,21 +1,6 @@ -#include "SinglePhoton_module.h" -#include "TCanvas.h" -#include "TGraph.h" -#include "TFile.h" -#include "TAxis.h" -#include "TLine.h" -#include "TLatex.h" -#include "TLegend.h" -#include "TPrincipal.h" -#include "TVectorD.h" -#include "TMatrixD.h" -#include "TF1.h" -#include "TEllipse.h" namespace single_photon { - - void SinglePhoton::ClearSecondShowers(){ m_sss_num_unassociated_hits=0; m_sss_num_unassociated_hits_below_threshold=0; diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 57fb5fb44..5e5dadd3c 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -1,10 +1,11 @@ # SinglePhotonModule -Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` froen on Jan. 18 2022 +Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` in Mar. 2022 -The code can be found here: (https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge)[https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge] +The original code can be found [here](https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge) +NEED INTRODUCTION HERE. -## Whats in the directories +## Overview `Libraries` contains essential headers for this module. `SEAview` is an additional module runs inside this module. @@ -18,9 +19,10 @@ Header structure ```mermaid flowchart TD; A--first formost-->C; - A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; + A[SinglePhoton_module.cc]--also contains-->B[analyze*.h that look like *.cxx]; C[SinglePhoton_module.h]-->D[helper_functions.h]; C-->E[Atlas.h]; C-->F[SBSCAN.h]; C-->G[SEAviewer.h]; ``` + diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index f920f4dcd..0878097f3 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -188,10 +188,6 @@ namespace single_photon } std::cout<<">>>> CHECK finish reconfigure() at line"<<__LINE__< inputVars = { "sss_candidate_num_hits", "sss_candidate_num_wires", "sss_candidate_num_ticks", "sss_candidate_PCA", "log10(sss_candidate_impact_parameter)", "log10(sss_candidate_min_dist)", "sss_candidate_impact_parameter/sss_candidate_min_dist", "sss_candidate_energy*0.001", "cos(sss_candidate_angle_to_shower)", "sss_candidate_fit_slope", "sss_candidate_fit_constant", "sss_candidate_plane", "sss_reco_shower_energy*0.001", "2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower))", "log10(2*0.001*0.001*sss_reco_shower_energy*sss_candidate_energy*(1-cos(sss_candidate_angle_to_shower)))", "sss_candidate_energy*0.001/(sss_reco_shower_energy*0.001)", "sss_candidate_closest_neighbour" }; - //sssVetov1 = new ReadBDT(inputVars); - } //------------------------------------------------------------------------------------------------------------------------------------------ @@ -216,9 +212,9 @@ namespace single_photon //Some event based properties m_subrun_counts++; m_number_of_events++; - m_run_number = evt.run(); + m_run_number = evt.run(); m_subrun_number = evt.subRun(); - m_event_number = evt.id().event(); + m_event_number = evt.id().event(); //if module is run in selected-event mode, and current event is not in the list, skip it @@ -236,7 +232,6 @@ namespace single_photon _time2cm = sampling_rate(detClocks) / 1000.0 * theDetector.DriftVelocity( theDetector.Efield(), theDetector.Temperature() );//found in ProtoShowerPandora_tool.cc - //******************************Setup*****************Setup**************************************/ //******************************Setup*****************Setup**************************************/ // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. // Make sure under the hood you understand this! @@ -368,6 +363,73 @@ namespace single_photon kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); } } + // Test ground for some slice stuff, dont have it run automatically, ignore for now, mark + + if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToMetadataMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + const art::Ptr pfp = pfParticleVector[i]; + pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + } + + size_t pfp_w_bestnuID = 0; + int slice_w_bestnuID = 0; + if(true){ + std::cout<<"SliceTest: there are "< nu_scores; + bool isSelectedSlice = false; + int primaries = 0; + int primary_pdg = 0; + + for(auto &pfp: pfps){ + std::vector> metadatas = pfParticleToMetadataMap[pfp]; + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + //for each of the things in the list + if(propertiesmap.count("NuScore")==1){ + double tmp_nuscore = propertiesmap["NuScore"]; + nu_scores.push_back(tmp_nuscore); + if( tmp_nuscore > ref_nuscore){ + ref_nuscore = tmp_nuscore; + pfp_w_bestnuID = pfp->Self(); + slice_w_bestnuID = s; + } + } + if(propertiesmap.count("IsNeutrino")==1){ + isSelectedSlice = true; + } + } + + if (pfp->IsPrimary()) { + primaries++; + primary_pdg = (pfp->PdgCode()); + } + } + + if(nu_scores.size()>0){ + double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); + if(mean!=nu_scores.front()){ + std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."< > nuParticles; std::vector< art::Ptr > crParticles; - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); //CHECK potential upgrade: // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? @@ -394,15 +456,6 @@ namespace single_photon pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); - std::map, std::vector> > pfParticleToMetadataMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - const art::Ptr pfp = pfParticleVector[i]; - pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); - } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< nu_scores; - bool isSelectedSlice = false; - int primaries = 0; - int primary_pdg = 0; - - for(auto &pfp: pfps){ - std::vector> metadatas = pfParticleToMetadataMap[pfp]; - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - //for each of the things in the list - if(propertiesmap.count("NuScore")==1){ - nu_scores.push_back(propertiesmap["NuScore"]); - } - if(propertiesmap.count("IsNeutrino")==1){ - isSelectedSlice = true; - } - } - - if (pfp->IsPrimary()) { - primaries++; - primary_pdg = (pfp->PdgCode()); - } - } - - if(nu_scores.size()>0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles); + this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); if (m_print_out_event){ if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ @@ -1018,7 +1021,7 @@ namespace single_photon //******************************* Isolation (SSV precursor) **************************************************************/ - if(!m_run_all_pfps && ! m_run_pi0_filter) this->IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + if(!m_run_all_pfps && ! m_run_pi0_filter) this->IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector, slice_w_bestnuID); std::cout<<"CHECK "<<__LINE__<<" for a finished isolation study"< pParticle(it->second); - full++; // Only look for primary particles if (!pParticle->IsPrimary()) continue; primaries++; @@ -1886,11 +1889,15 @@ namespace single_photon // If it is, lets get the vertex position if(isNeutrino){ if(found>0){ - std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not good but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<GetVertex(pfParticlesToVerticesMap, pParticle ); + if(pParticle->Self() == fpfp_w_bestnuID){ + std::cout<<"Take this PFParticle's vertex as event vertex, bc of it has highest nu score"<GetVertex(pfParticlesToVerticesMap, pParticle ); + } } // All non-neutrino primary particles are reconstructed under the cosmic hypothesis @@ -1916,7 +1923,6 @@ namespace single_photon nuParticles.push_back(pfParticleMap.at(daughterId)); } } - std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\t Found "< z(n,0.0); - - TGraph2D *g = new TGraph2D(n,X,Y,&z[0]); - TGraphDelaunay delan(g); - delan.SetMarginBinsContent(0); - delan.ComputeZ(0,0); - delan.FindAllTriangles(); - (*num_triangles)=delan.GetNdt(); // number of Delaunay triangles found - - //Grab the locations of all the trianges. These will be intergers referencing to position in X,Y arrays - Int_t *MT = delan.GetMTried(); - Int_t *NT = delan.GetNTried(); - Int_t *PT = delan.GetPTried(); - - (*area)=0.0; - for(int i = 0; i>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area){ - - int n = hits.size(); - std::vector C0,T0; - std::vector C1,T1; - std::vector C2,T2; - size_t n_0=0; - size_t n_1=0; - size_t n_2=0; - - for(int i=0;i hit = hits[i]; - switch(hit->View()){ - case 0: - C0.push_back((double)hit->WireID().Wire); - T0.push_back(hit->PeakTime()); - n_0++; - break; - case 1: - C1.push_back((double)hit->WireID().Wire); - T1.push_back(hit->PeakTime()); - n_1++; - break; - case 2: - C2.push_back((double)hit->WireID().Wire); - T2.push_back(hit->PeakTime()); - n_2++; - break; - default: - break; - } - } - if(m_use_delaunay){ - if(n_0>0 && (int)n_0 < m_delaunay_max_hits) this->quick_delaunay_fit(n_0, &C0[0] , &T0[0] , &num_triangles[0],&area[0]); - if(n_1>0 && (int)n_1 < m_delaunay_max_hits) this->quick_delaunay_fit(n_1, &C1[0] , &T1[0] , &num_triangles[1],&area[1]); - if(n_2>0 && (int)n_2 < m_delaunay_max_hits) this->quick_delaunay_fit(n_2, &C2[0] , &T2[0] , &num_triangles[2],&area[2]); - } - num_hits[0] = n_0; - num_hits[1] = n_1; - num_hits[2] = n_2; - - //std::cout<<"Plane 0: "< & mcparticle, std::vector & corrected, std::vector & input){ corrected.resize(3); diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 0a7749969..90c76da7d 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -96,7 +96,7 @@ #include #include "HelperFunctions/helper_functions.h" -//#include "Libraries/Atlas.h" PENDING IN USE CHECK +//#include "Libraries/Atlas.h" //#include "Libraries/bad_channel_matching.h" #include "Libraries/DBSCAN.h" @@ -274,7 +274,8 @@ namespace single_photon void GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &particlesToVertices, PFParticleVector &crParticles, - PFParticleVector &nuParticles); + PFParticleVector &nuParticles, + size_t fpfp_w_bestnuID); /** * @brief Collect associated tracks and showers to particles in an input particle vector @@ -493,7 +494,8 @@ namespace single_photon const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector); + detinfo::DetectorPropertiesData const & theDetector, + int slice_w_bestnuID); @@ -1022,7 +1024,7 @@ namespace single_photon //ReadBDT * sssVetov1; int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_in_nu_slice; std::vector m_sss_candidate_num_hits; std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster std::vector m_sss_candidate_num_ticks; diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 73be61452..8aa0d1c99 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -12,9 +12,9 @@ singlephoton_analyzer:{ FlashLabel: "opflashtpc0" POTLabel: "generator" - ShowerTrackFitter: "pandoraTrack" - ShowerTrackFitterCalo: "pandoraCalo" - Shower3DLabel: "pandoraShower" + ShowerTrackFitter: "pandoraTrack" + ShowerTrackFitterCalo: "pandoraCalo" + Shower3DLabel: "pandoraShower" input_param: "optional" @@ -73,7 +73,7 @@ singlephoton_filter.FillTrees: false singlephoton_filter.RunPi0Filter: true singlephoton_filter.FilterMode2g1p: true singlephoton_filter.FilterMode2g0p: false -singlephoton_filter.isData: true +singlephoton_filter.isData: false singlephoton_filter.usePID: false singlephoton_filter.work_function: 23 From 784ea031758cf9d23456e29bda6cd0da49eecf6d Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 7 Apr 2022 00:28:17 -0500 Subject: [PATCH 15/54] fix the problem of crashing the code with mis-allocated memory --- .../Libraries/analyze_Slice.h | 444 ++---------------- .../SinglePhoton_module.cc | 64 ++- .../SinglePhoton_module.h | 20 +- .../jobs/singlephoton_sbnd.fcl | 2 +- 4 files changed, 103 insertions(+), 427 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index d61ad914c..12c1bf3a6 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -339,20 +339,12 @@ namespace single_photon * store stuff in the output tree */ - m_reco_slice_num = nuscore_slices.size();//the number of slices also corresponds to the number of neutrino scores + m_reco_slice_num = nuscore_slices.size()+1;//the number of slices also corresponds to the number of neutrino scores //currently this is junk, just a placeholder //std::cout<<"saving the info for "<ResizeSlices(m_reco_slice_num); m_reco_slice_nuscore = nuscore_slices; - /* std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 1); - // GetPFPsPerSlice(PFPToSliceIdMap , sliceIdToNumPFPsvec); - m_reco_slice_num_pfps = sliceIdToNumPFPsvec; //the total number of PFP's per slice - m_reco_slice_num_showers; //the subset of PFP's that are showers - m_reco_slice_num_tracks; - - */ - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<, int>& PFPToSliceIdMap, std::vector &sliceIdToNumPFPsvec){} std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); - //return sliceIdToNumPFPsvec; //std::cout<<"starting to look at the PFP's per slice"< -1){ - // std::cout<<"error, invalid slice id"<Self()<<" in slice "< 1) m_multiple_matched_showers = true; + if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; + if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; - } - //std::cout<<"matched showers == "<< m_matched_signal_shower_num<<" and tracks =="<< m_matched_signal_track_num<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ - std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ + std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap){ - std::cout<<"FUNCTION "<<__FUNCTION__<<" NOT IN USE, exit the code"< matched_reco_slice_shower_overlay_fraction; -// std::vector> matched_reco_slice_shower_MCP; -// //std::vector matched_reco_slice_track_matched; -// std::vector> matched_reco_slice_track_MCP; -// -// -// //first check if in the event there's a match to a given signal -// if(signal_def == "ncdelta"){ -// //std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t looking for signal def "< mcp = MCParticleToTrackIDMap[id]; -// // std::cout<<"found sim photon shower with track ID "< 0){ -// //matched_reco_slice_shower_matched.push_back(m_sim_shower_matched[j]); -// matched_reco_slice_shower_MCP.push_back(mcp); -// -// //save the overlay fraction and whether it's matched -// matched_reco_slice_shower_overlay_fraction.push_back(m_sim_shower_overlay_fraction[j]); -// //std::cout<<"saving sim photon shower with track ID "< mcp = MCParticleToTrackIDMap[id]; -// -// if (m_sim_track_matched[k] > 0){ -// if(std::find(matched_reco_slice_track_MCP.begin(),matched_reco_slice_track_MCP.end(),mcp) == matched_reco_slice_track_MCP.end()){ -// -// matched_reco_slice_track_MCP.push_back(mcp); -// -// // std::cout<<"found a candiate proton track"<ResizeMatchedSlices(m_reco_slice_shower_num_matched_signal ,m_reco_slice_track_num_matched_signal); -// -// -// std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of sim tracks-MCP matches associated to the true ncdelta is "< mcp: matched_reco_slice_shower_MCP){ -// //get the recob shower -// art::Ptr this_shr; -// for(auto pair: showerToMCParticleMap){ -// if (pair.second == mcp){ -// this_shr = pair.first; -// } -// } -// art::Ptr this_pfp; -// if(!this_shr.isNull()){ -// this_pfp = showerToPFParticleMap[this_shr]; -// } -// -// //get the slice -// if(!this_pfp.isNull()){ -// for(auto pair :allPFPSliceIdVec){ -// art::Ptr pfp = pair.first; -// if (this_pfp == pfp){ -// if(m_is_verbose) std::cout<<"found recob shower - MCP at track id "<TrackId()<<" in slice "<E(); -// } -// } -// } else{ -// if(m_is_verbose) std::cout<<"no corresponding slice found for recob shower - MCP at track id "<TrackId()< mcp: matched_reco_slice_track_MCP){ -// //get the recob track -// art::Ptr this_trk; -// for(auto pair: trackToMCParticleMap){ -// if (pair.second == mcp){ -// this_trk = pair.first; -// } -// } -// art::Ptr this_pfp; -// if(!this_trk.isNull()){ -// this_pfp = trackToNuPFParticleMap[this_trk]; -// } -// -// //get the slice -// if(!this_pfp.isNull()){ -// for(auto pair :allPFPSliceIdVec){ -// art::Ptr pfp = pair.first; -// if (this_pfp == pfp){ -// if(m_is_verbose) std::cout<<"found recob track - MCP at track id "<TrackId()<<" in slice "<E(); -// } -// } -// } else{ -// if(m_is_verbose)std::cout<<"no corresponding slice found for recob track - MCP at track id "<TrackId()<(); + for (auto const &cryo: geometry->IterateCryostats()) { + geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), + tend = geometry->end_TPC(cryo.ID()); + std::vector this_tpc_volumes; + while (iTPC != tend) { + geo::TPCGeo const& TPC = *iTPC; + this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); + iTPC++; + } + fTPCVolumes.push_back(std::move(this_tpc_volumes)); + } + + // then combine them into active volumes + for (const std::vector &tpcs: fTPCVolumes) { + m_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); + m_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); + m_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + + m_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); + m_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); + m_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + std::cout<<"CHECK geo X:"<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<("PrintOut", false); @@ -198,13 +226,11 @@ namespace single_photon // Runs over every artroot event bool SinglePhoton::filter(art::Event &evt) { - std::cout<<"---------------------------------------------------------------------------------"<()->DataFor(evt);//it is detinfo::DetectorClocksData auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData + std::cout<<"CHECK BEGINNING "<<__LINE__<ClearVertex(); @@ -423,7 +449,7 @@ namespace single_photon std::cout<<"SliceTest: -- and has a nu_score of "<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - /* std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::map>> sliceIdToPFPMap; //this is an alternative, stores all the PFP's but organized by slice ID - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices( pfParticleToMetadataMap, pfParticleMap, allPFPSliceIdVec, sliceIdToPFPMap); - std::cout<<"There are "<< allPFPSliceIdVec.size()<<" pfp-slice id matches stored in the vector"<0){ - std::cout<<"the shower at 0 is in slice "<GetShowerSlice(showers[0], showerToNuPFParticleMap, allPFPSliceIdVec)<FindSignalSlice( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap); - - //if(!m_run_pi0_filter){ - // this->SecondShowerSearch(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap,mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap); - //} std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); @@ -2166,9 +2178,9 @@ namespace single_photon bool SinglePhoton::Pi0PreselectionFilter() { - if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; - if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; - if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + if(m_vertex_pos_x < m_XMin|| m_vertex_pos_x > m_XMax) return false; + if(m_vertex_pos_y < m_YMin || m_vertex_pos_y > m_YMax) return false; + if(m_vertex_pos_z < m_ZMin|| m_vertex_pos_z > m_ZMax) return false; if(m_reco_asso_showers!=2) return false; if(m_reco_asso_tracks!=1) return false; @@ -2185,9 +2197,9 @@ namespace single_photon bool SinglePhoton::Pi0PreselectionFilter2g0p() { - if(m_vertex_pos_x < 5.0 || m_vertex_pos_x > 251.) return false; - if(m_vertex_pos_y < -112. || m_vertex_pos_y > 112.) return false; - if(m_vertex_pos_z < 5.0 || m_vertex_pos_z > 1031.8) return false; + if(m_vertex_pos_x < m_XMin|| m_vertex_pos_x > m_XMax) return false; + if(m_vertex_pos_y < m_YMin || m_vertex_pos_y > m_YMax) return false; + if(m_vertex_pos_z < m_ZMin|| m_vertex_pos_z > m_ZMax) return false; if(m_reco_asso_showers!=2) return false; if(m_reco_asso_tracks!=0) return false; diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 90c76da7d..788078314 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -706,13 +706,7 @@ namespace single_photon // std::map& sliceIdToNumPFPsMap ); std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ - //void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap , std::vector &sliceIdToNumPFPsvec); - /* brief: returns slice index corresponding to this shower, or -1 if it's clear cosmic */ - int GetShowerSlice(art::Ptr& this_shower, std::map< art::Ptr , art::Ptr>& showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - - int GetTrackSlice(art::Ptr& this_track, std::map< art::Ptr , art::Ptr>& trackToPFParticleMap, std::vector,int>> & allPFPSliceIdVec); - //can also look at things like shower energy, conversion length, etc. /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ @@ -739,8 +733,6 @@ namespace single_photon std::map, int>& PFPToSliceIdMap); - void FindSignalSlice(std::string signal_def, std::map> & MCParticleToTrackIDMap,std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, std::map,art::Ptr > & trackToNuPFParticleMap, std::map, art::Ptr > &trackToMCParticleMap); - int m_reco_slice_num; //total number of slices in the event std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def @@ -848,6 +840,18 @@ namespace single_photon // std::string m_badChannelProducer; // std::string m_mcTrackLabel; // std::string m_mcShowerLabel; + //Geometry dimensions; + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + double m_XMin; + double m_YMin; + double m_ZMin; + double m_XMax; + double m_YMax; + double m_ZMax; + + + std::string m_pidLabel; ///< For PID stuff std::string m_CRTVetoLabel; std::string m_CRTTzeroLabel; diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 8aa0d1c99..4bdd33eea 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -18,7 +18,7 @@ singlephoton_analyzer:{ input_param: "optional" - Verbose: true + Verbose: false runSEAviewShower: true SEAviewShowerHitThreshold: 25 From a28230c3907e8655c2f7a69948ff6844376b6455 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 15 Apr 2022 13:51:29 -0500 Subject: [PATCH 16/54] remove ub dependency --- .../Libraries/analyze_Slice.h | 4 +- .../SinglePhoton_module.cc | 92 +++++++++---------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index 12c1bf3a6..3092b261f 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -383,8 +383,6 @@ namespace single_photon return sliceIdToNumPFPsvec; } -// int cosmic = 0; - //for all PFP's //CHECK the following block crashes the code //FIXED by fixing m_reco_slice_num (add 1) @@ -393,7 +391,7 @@ namespace single_photon //get the slice and increment the vector int slice_id = pair.second; if(slice_id > -1) sliceIdToNumPFPsvec[slice_id]++; - std::cout<<"CHECK found 1 pfp particle at slice id "<CreateEventWeightBranches(); this->CreateGeant4Branches(); this->CreateTrackBranches(); - +//CHECK, remove bad chanel related varaibles? & ub dependent path //hardcode some info (TODO change) - std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; - - //Get the info for length->energy conversion from PSTAR database. - TFile *fileconv; - struct stat buffer; - - //some useful input data - if(!m_run_pi0_filter){ - if(stat("proton_conversion.root", &buffer) == 0){ - fileconv = new TFile("proton_conversion.root", "read"); - }else{ - fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); - } - - proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); - proton_length2energy_tgraph.GetMean(); - fileconv->Close(); - } - - //bad channels - std::string bad_channel_file = "MCC9_channel_list.txt"; - - if(!m_run_pi0_filter){ - if(stat(bad_channel_file.c_str(), &buffer) != 0){ - bad_channel_file = gpvm_location+bad_channel_file; - } - - std::ifstream bc_file(bad_channel_file); - - if (bc_file.is_open()) - { - std::string line; - while ( getline (bc_file,line) ) - { - std::vector res; - std::istringstream iss(line); - for(std::string s; iss >> s; ) - res.push_back( std::stof(s)); - - std::pair t(res[0],res[1]); - bad_channel_list_fixed_mcc9.push_back(t); - } - bc_file.close(); - } - } +// std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; +// +// //Get the info for length->energy conversion from PSTAR database. +// TFile *fileconv; +// struct stat buffer; +// +// //some useful input data +// if(!m_run_pi0_filter){ +// if(stat("proton_conversion.root", &buffer) == 0){ +// fileconv = new TFile("proton_conversion.root", "read"); +// }else{ +// fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); +// } +// +// proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); +// proton_length2energy_tgraph.GetMean(); +// fileconv->Close(); +// } +// +// //bad channels +// std::string bad_channel_file = "MCC9_channel_list.txt"; +// +// if(!m_run_pi0_filter){ +// if(stat(bad_channel_file.c_str(), &buffer) != 0){ +// bad_channel_file = gpvm_location+bad_channel_file; +// } +// +// std::ifstream bc_file(bad_channel_file); +// +// if (bc_file.is_open()) +// { +// std::string line; +// while ( getline (bc_file,line) ) +// { +// std::vector res; +// std::istringstream iss(line); +// for(std::string s; iss >> s; ) +// res.push_back( std::stof(s)); +// +// std::pair t(res[0],res[1]); +// bad_channel_list_fixed_mcc9.push_back(t); +// } +// bc_file.close(); +// } +// } //------------------- List of Selected Events to run -------- if(m_runSelectedEvent){ From 2f6f923da44dd6f1df67deb8530e68cee7be2071 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 15 Apr 2022 14:33:49 -0500 Subject: [PATCH 17/54] add NCDeltaRadiatieve event generation module --- .../NCRadiativeResonant_module.cc | 209 ++++++++++++++++++ sbncode/SinglePhotonAnalysis/README.md | 2 + 2 files changed, 211 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc diff --git a/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc new file mode 100644 index 000000000..ed8f09acd --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc @@ -0,0 +1,209 @@ +//////////////////////////////////////////////////////////////////////// +// Class: NCRadiativeResonant +// Plugin Type: filter (art v2_05_00) +// File: NCRadiativeResonant_module.cc +// +// Generated at Fri Jun 23 10:33:44 2017 by Robert Murrells using cetskelgen +// from cetlib version v1_21_00. +//////////////////////////////////////////////////////////////////////// + + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + + +#include "art_root_io/TFileService.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art_root_io/TFileDirectory.h" + +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "TTree.h" + +#include + +class NCRadiativeResonant : public art::EDFilter { + + TTree * ftree; + + int frun; + int fsubrun; + int fevent; + int fnu_pdg; + int fccnc; + int fmode; + int finteraction_type; + int fis_nc_delta_radiative; + int fparent_status_code; + int fparent_pdg; + +public: + explicit NCRadiativeResonant(fhicl::ParameterSet const & p); + + NCRadiativeResonant(NCRadiativeResonant const &) = delete; + NCRadiativeResonant(NCRadiativeResonant &&) = delete; + NCRadiativeResonant & operator = (NCRadiativeResonant const &) = delete; + NCRadiativeResonant & operator = (NCRadiativeResonant &&) = delete; + + void cout_stuff(art::Event & e, bool passed); + void FillTree(art::Event & e, + size_t const mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative); + void Reset(); + bool filter(art::Event & e) override; + +}; + + +//CHECK ????? FIX THIS? +NCRadiativeResonant::NCRadiativeResonant(fhicl::ParameterSet const & p) : + art::EDFilter(p), + ftree(nullptr) { + + if(true) { + + art::ServiceHandle tfs; + ftree = tfs->make("NCRadiativeResonantFilter", ""); + + ftree->Branch("run", &frun, "run/I"); + ftree->Branch("subrun", &fsubrun, "subrun/I"); + ftree->Branch("event", &fevent, "event/I"); + ftree->Branch("nu_pdg", &fnu_pdg, "nu_pdg/I"); + ftree->Branch("ccnc", &fccnc, "ccnc/I"); + ftree->Branch("mode", &fmode, "mode/I"); + ftree->Branch("is_nc_delta_radiative", &fis_nc_delta_radiative, "is_nc_delta_radiative/I"); + ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); + ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); + + } + +} + + +void NCRadiativeResonant::cout_stuff(art::Event & e, bool passed = false) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + std::cout << passed << "\n" + << "==========================\n"; + for(simb::MCTruth const & mct : *ev_mct) { + std::cout << "----------------------------\n"; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + std::cout <<"FULL: "<< mcp.TrackId() << " " << mcp.PdgCode() << " " << mcp.Mother() << " " << mcp.StatusCode() << "\n"; + } + } + +} + + +void NCRadiativeResonant::Reset() { + + frun = -1; + fsubrun = -1; + fevent = -1; + fnu_pdg = 0; + fccnc = -1; + fmode = -2; + finteraction_type = -2; + fis_nc_delta_radiative = -1; + fparent_status_code = -1; + fparent_pdg = 0; + +} + + +void NCRadiativeResonant::FillTree(art::Event & e, + size_t mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative) { + + Reset(); + + frun = e.id().run(); + fsubrun = e.id().subRun(); + fevent = e.id().event(); + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); + + fnu_pdg = mcn.Nu().PdgCode(); + fccnc = mcn.CCNC(); + fmode = mcn.Mode(); + finteraction_type = mcn.InteractionType(); + + fis_nc_delta_radiative = is_nc_delta_radiative; + if(parent_index != SIZE_MAX) { + fparent_status_code = ev_mct->at(mct_index).GetParticle(parent_index).StatusCode(); + fparent_pdg = ev_mct->at(mct_index).GetParticle(parent_index).PdgCode(); + } + + ftree->Fill(); + +} + + +bool NCRadiativeResonant::filter(art::Event & e) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + cout_stuff(e,true); + + for(size_t i = 0; i < ev_mct->size(); ++i) { + + simb::MCTruth const & mct = ev_mct->at(i); + if(mct.GetNeutrino().CCNC() != 1) continue; + + std::vector exiting_photon_parents; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + if(mcp.TrackId() != i) { + std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; + exit(1); + } + if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; + exiting_photon_parents.push_back(mcp.Mother()); + } + + std::vector in_nucleus_photons; + for(size_t const s : exiting_photon_parents) { + simb::MCParticle const & mcp = mct.GetParticle(s); + if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) { + if(ftree) FillTree(e, i, mcp.PdgCode(), true); + std::cout<<"YES: "< Date: Wed, 8 Jun 2022 15:29:33 -0500 Subject: [PATCH 18/54] add fhicls for productions --- .../Libraries/analyze_MCTruth.h | 4 +- .../Libraries/analyze_Showers.h | 2 +- .../NCDeltaRadiative_module.cc | 207 ++++++++++++++++++ .../NCRadiativeResonant_module.cc | 132 ++++++----- ...ion_tpc_NCDeltaRadiative_filtered_sbnd.fcl | 112 ++++++++++ ..._tpc_NCRadiativeResonant_filtered_sbnd.fcl | 106 +++++++++ ups/product_deps | 6 +- 7 files changed, 512 insertions(+), 57 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc create mode 100644 sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl create mode 100644 sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCRadiativeResonant_filtered_sbnd.fcl diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 58476aa84..f0be85e28 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -435,9 +435,9 @@ namespace single_photon if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } break; case(-2214): - case(2214): + case(2214)://delta + case(-1114): - case(1114): // if it's delta-, or delta+ + case(1114): // if it's delta- if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } break; case(-2114): diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 835cd2c33..fdc061ce1 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -1085,7 +1085,7 @@ namespace single_photon if(t_dEdx.size()>0) tmedian = this->getMedian(t_dEdx); if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); - + std::cout<<"CHECK "<<__LINE__<<" in analyze_Showers.h to see why dEdx does not work"< + +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "TTree.h" + +class NCDeltaRadiative : public art::EDFilter { + + TTree * ftree; + + int frun; + int fsubrun; + int fevent; + int fnu_pdg; + int fccnc; + int fmode; + int finteraction_type; + int fis_nc_delta_radiative; + int fparent_status_code; + int fparent_pdg; + +public: + explicit NCDeltaRadiative(fhicl::ParameterSet const & p); + + NCDeltaRadiative(NCDeltaRadiative const &) = delete; + NCDeltaRadiative(NCDeltaRadiative &&) = delete; + NCDeltaRadiative & operator = (NCDeltaRadiative const &) = delete; + NCDeltaRadiative & operator = (NCDeltaRadiative &&) = delete; + + void cout_stuff(art::Event & e, bool passed); + void FillTree(art::Event & e, + size_t const mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative); + void Reset(); + bool filter(art::Event & e) override; + +}; + +//CHECK modified +NCDeltaRadiative::NCDeltaRadiative(fhicl::ParameterSet const & p) : + art::EDFilter(p), + ftree(nullptr) { + + if(true) { + + art::ServiceHandle tfs; + ftree = tfs->make("NCDeltaRadiativeFilter", ""); + + ftree->Branch("run", &frun, "run/I"); + ftree->Branch("subrun", &fsubrun, "subrun/I"); + ftree->Branch("event", &fevent, "event/I"); + ftree->Branch("nu_pdg", &fnu_pdg, "nu_pdg/I"); + ftree->Branch("ccnc", &fccnc, "ccnc/I"); + ftree->Branch("mode", &fmode, "mode/I"); + ftree->Branch("is_nc_delta_radiative", &fis_nc_delta_radiative, "is_nc_delta_radiative/I"); + ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); + ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); + + } + +} + + +void NCDeltaRadiative::cout_stuff(art::Event & e, bool passed = false) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + std::cout << passed << "\n" + << "==========================\n"; + for(simb::MCTruth const & mct : *ev_mct) { + std::cout << "----------------------------\n"; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + std::cout << mcp.TrackId() << " " << mcp.PdgCode() << " " << mcp.Mother() << " " << mcp.StatusCode() << "\n"; + } + } + +} + + +void NCDeltaRadiative::Reset() { + + frun = -1; + fsubrun = -1; + fevent = -1; + fnu_pdg = 0; + fccnc = -1; + fmode = -2; + finteraction_type = -2; + fis_nc_delta_radiative = -1; + fparent_status_code = -1; + fparent_pdg = 0; + +} + + +void NCDeltaRadiative::FillTree(art::Event & e, + size_t mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative) { + + Reset(); + + frun = e.id().run(); + fsubrun = e.id().subRun(); + fevent = e.id().event(); + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); + + fnu_pdg = mcn.Nu().PdgCode(); + fccnc = mcn.CCNC(); + fmode = mcn.Mode(); + finteraction_type = mcn.InteractionType(); + + fis_nc_delta_radiative = is_nc_delta_radiative; + if(parent_index != SIZE_MAX) { + fparent_status_code = ev_mct->at(mct_index).GetParticle(parent_index).StatusCode(); + fparent_pdg = ev_mct->at(mct_index).GetParticle(parent_index).PdgCode(); + } + + ftree->Fill(); + +} + + +bool NCDeltaRadiative::filter(art::Event & e) { + + art::ValidHandle> const & ev_mct = + e.getValidHandle>("generator"); + + for(size_t i = 0; i < ev_mct->size(); ++i) { + + simb::MCTruth const & mct = ev_mct->at(i); + if(mct.GetNeutrino().CCNC() != 1) continue; + + std::vector exiting_photon_parents; + for(int i = 0; i < mct.NParticles(); ++i) { + simb::MCParticle const & mcp = mct.GetParticle(i); + if(mcp.TrackId() != i) { + std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; + exit(1); + } + if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; + exiting_photon_parents.push_back(mcp.Mother()); + } + + std::vector in_nucleus_photons; + for(size_t const s : exiting_photon_parents) { + simb::MCParticle const & mcp = mct.GetParticle(s); + //CHEKC hardcode, TPC filter: + if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ + std::cout<<"OUTSIDE TPC x y z ="<> const & ev_mct = e.getValidHandle>("generator"); std::cout << passed << "\n" - << "==========================\n"; + << "===========Summary of Truth info===============\n"; for(simb::MCTruth const & mct : *ev_mct) { - std::cout << "----------------------------\n"; + std::cout<> const & ev_mct = - e.getValidHandle>("generator"); + e.getValidHandle>("generator"); simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); fnu_pdg = mcn.Nu().PdgCode(); @@ -143,6 +153,7 @@ void NCRadiativeResonant::FillTree(art::Event & e, finteraction_type = mcn.InteractionType(); fis_nc_delta_radiative = is_nc_delta_radiative; + if(parent_index != SIZE_MAX) { fparent_status_code = ev_mct->at(mct_index).GetParticle(parent_index).StatusCode(); fparent_pdg = ev_mct->at(mct_index).GetParticle(parent_index).PdgCode(); @@ -153,55 +164,74 @@ void NCRadiativeResonant::FillTree(art::Event & e, } +//true - pass; false - reject; bool NCRadiativeResonant::filter(art::Event & e) { - art::ValidHandle> const & ev_mct = - e.getValidHandle>("generator"); - - cout_stuff(e,true); - - for(size_t i = 0; i < ev_mct->size(); ++i) { - - simb::MCTruth const & mct = ev_mct->at(i); - if(mct.GetNeutrino().CCNC() != 1) continue; - - std::vector exiting_photon_parents; - for(int i = 0; i < mct.NParticles(); ++i) { - simb::MCParticle const & mcp = mct.GetParticle(i); - if(mcp.TrackId() != i) { - std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; - exit(1); - } - if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; - exiting_photon_parents.push_back(mcp.Mother()); - } - - std::vector in_nucleus_photons; - for(size_t const s : exiting_photon_parents) { - simb::MCParticle const & mcp = mct.GetParticle(s); - if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) { - if(ftree) FillTree(e, i, mcp.PdgCode(), true); - std::cout<<"YES: "<> const & ev_mct = + e.getValidHandle>("generator"); + + + //looking for resonant photons... + // - Particles from NC interaction + // - Particles contian photons with StatusCode 1 + // - the parent of a photon is not delta0 & delta+ ---> pass + // - if the parent of a photon is a photon + // - the grandparent of a photon is not delta0 & delta+ ---> pass + for(size_t ith = 0; ith < ev_mct->size(); ++ith) {//loop through MCTruth + + simb::MCTruth const & mct = ev_mct->at(ith); +// std::cout<<"Looking at the "< exiting_photon_parents; + for(int jth = 0; jth < mct.NParticles(); ++jth) {//loop through MCParticles + simb::MCParticle const & mcp = mct.GetParticle(jth); + + //CHEKC hardcode, TPC filter: + if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ + std::cout<<"OUTSIDE TPC x y z ="< in_nucleus_photons; + for(size_t const s : exiting_photon_parents) { + simb::MCParticle const & mcp = mct.GetParticle(s); + //2114 delta0; 2214 delta+ + if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) {//Want mcp as any particles but not delta0+ +// if(ftree){ +// FillTree(e, ith, mcp.Mother(), true); +// } + cout_stuff(e,true); + std::cout<<"\nYES a resonant evt: "< Date: Sat, 11 Jun 2022 17:19:39 -0500 Subject: [PATCH 19/54] some migration stuff --- .../HelperFunctions/helper_functions.h | 175 --- .../SinglePhotonAnalysis/Libraries/Atlas.h | 428 ------ .../Libraries/analyze_EventWeight.h | 218 --- .../Libraries/analyze_Geant4.h | 51 - .../Libraries/analyze_MCTruth.h | 240 +--- .../Libraries/analyze_OpFlashes.h | 92 -- .../Libraries/analyze_Showers.h | 1203 ++++------------- .../Libraries/analyze_Slice.h | 140 -- .../Libraries/analyze_Tracks.h | 495 ------- .../Libraries/bad_channel_matching.h | 131 -- .../Libraries/fiducial_volume.h | 538 ++++---- .../Libraries/isolation.h | 45 - .../Libraries/second_shower_search.h | 284 +--- .../SinglePhoton_module.cc | 763 ++--------- .../SinglePhoton_module.h | 189 ++- .../jobs/singlephoton_sbnd.fcl | 7 +- ups/product_deps | 6 +- 17 files changed, 777 insertions(+), 4228 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/Atlas.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h deleted file mode 100644 index 362d63536..000000000 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_functions.h +++ /dev/null @@ -1,175 +0,0 @@ - -namespace single_photon -{ -//-----------------HELPER FUNCTIONS ----------- - //CHECK Copy from bad_channel_matching.h - ////line between x1 and x2, point x0; - double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; - - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; - - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - - // right, but can be simplified - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - - - return sqrt(d2); - - } - // minimum distance between point and dead wire - double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9 ){ - - double min_dist = 999999; - - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int channel = bad_channel_list_fixed_mcc9[i].first; - int is_ok = bad_channel_list_fixed_mcc9[i].second; - if(is_ok>1)continue; - - auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel - auto result = geom->WireEndPoints(wireids[0]); - - //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - std::vector end = {0.0,result.end().Y(),result.end().Z()}; - std::vector point = {0.0,Ypoint,Zpoint}; - double dist = dist_line_point(start,end,point); - min_dist = std::min(dist,min_dist); - } - - return min_dist; - - } - -//--------------- end of copying from bad_channel_matching.h - - double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ - - std::vector vert = {x,y,z}; - std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; - std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; - - return dist_line_point(start, abit, vert); - - } - - // invariant mass of a particle that decays to two showers - double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->ShowerStart().X()-vx; - double s1y = s1->ShowerStart().Y()-vy; - double s1z = s1->ShowerStart().Z()-vz; - double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); - s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) - s1y = s1y/norm1; - s1z = s1z/norm1; - - double s2x = s2->ShowerStart().X()-vx; - double s2y = s2->ShowerStart().Y()-vy; - double s2z = s2->ShowerStart().Z()-vz; - double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); - s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) - s2y = s2y/norm2; - s2z = s2z/norm2; - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - - } - - // invariant mass of two showers, calculated directly from shower directions - double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->Direction().X(); - double s1y = s1->Direction().Y(); - double s1z = s1->Direction().Z(); - - double s2x = s2->Direction().X(); - double s2y = s2->Direction().Y(); - double s2z = s2->Direction().Z(); - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - } - - - - // sort indices in descending order - template - std::vector sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - - return idx; - } - - // sort indices such that elements in v are in ascending order - template - std::vector sort_indexes_rev(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); - - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); - - return idx; - } - - - // check if two vectors have same elements (regardless of the order), and arrange their elements in order - template - bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) - { - std::sort(v1.begin(), v1.end()); - std::sort(v2.begin(), v2.end()); - return v1 == v2; - } - - - - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } - - -// double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ -// -// double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); -// return time; -// } - - -//----------- END OF HELPER FUNCTIONS ----------- - - -} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h b/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h deleted file mode 100644 index 5fc17b351..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/Atlas.h +++ /dev/null @@ -1,428 +0,0 @@ -#ifndef __ATLAS_H__ -#define __ATLAS_H__ - -//NOTE: pending in-use; -//this only moves some preparing functions into a file -//with additional structure; -//it DOES NOT really factor out common functions. - -//#include "larsim/MCCheater/BackTrackerService.h" -//#include "larsim/MCCheater/ParticleInventoryService.h" -//#include "SinglePhoton_module.h" -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/OpFlash.h" - -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/MCBase/MCShower.h" -#include "lardataobj/AnalysisBase/Calorimetry.h" -#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" -#include "lardataobj/AnalysisBase/ParticleID.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/GeneratedParticleInfo.h" - - - - -/* - * - * Construct vectors and maps from Labels; - * - */ - -namespace single_photon -{ /*************** - * A class that designed for storing addresses for all associated (to an event) tracks, showers, - * and their cooresponding PFParticles. - * evt (input) - the event that we currently look at. - * *************/ - -// typedef std::vector< art::Ptr > PFParticleVector; -// typedef std::vector< art::Ptr > TrackVector; -// typedef std::vector< art::Ptr > ShowerVector; -// typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - class Atlas{//Initialize this with event address; - friend class SinglePhoton;//private as default - - public: - //Constructor - Atlas();//this might be useless; - //Overflow constructor 1; - Atlas( const art::Event &evt, - std::vector< std::string > labels, - bool is_data);//this initialize vectors and maps below - -// ~Atlas(){ -// MCParticleToTrackIdMap.clear(); -// }; -// //main stuffs that we feed into the vertex builder. - -/* - * The constructor takes care of the following basic recob objects. - * - */ - //the following recob objects are created through the overflow constructor 1 (see above); - std::vector< art::Ptr > particles;//this is loaded depends on the option m_run_all_pfps, configurable in the .fcl file. - std::vector< art::Ptr > all_pfparticles; - std::vector< art::Ptr > all_tracks; - std::vector< art::Ptr > all_showers; - std::vector< art::Ptr > all_hits; - std::vector< art::Ptr > all_opflashes; - //get the cluster handle for the dQ/dx calc - std::vector< art::Ptr > all_clusters; - std::vector> kalmanTrackVector; - std::vector> sliceVector; - - //MCTruth (only initialized when the sample is not data) - std::vector> mcTruthVector; - std::vector> matchedMCParticleVector; - - /* - * The overload constructor 1 takes care of the following maps. - * - */ - std::map< size_t , art::Ptr> IDToPFParticleMap; -// std::map< art::Ptr> PFParticleToIDMap;//This makse more consistant, but it needs works! - std::map< art::Ptr , std::vector> > PFParticlesToVerticesMap;//old name pfParticlesToVerticesMap; - std::map< art::Ptr , std::vector> > - PFParticleToMetadataMap;//old name pfParticleToMetadataMap; - std::map< art::Ptr , std::vector> > PFParticleToSpacePointsMap; - std::map< art::Ptr , std::vector> > PFParticleToClustersMap; - std::map< art::Ptr , std::vector> > ClusterToHitsMap; - std::map , art::Ptr> PFParticlesToShowerReco3DMap; - std::map , art::Ptr> PFParticlesToShowerKalmanMap; - std::map , std::vector>> kalmanTrackToCaloMap; - std::map< art::Ptr , std::vector> > sliceToPFParticlesMap; - std::map< art::Ptr , std::vector> > sliceToHitsMap; - std::map< int , std::vector> > sliceIDToPFParticlesMap; - std::map< int , std::vector> > sliceIDToHitsMap; -/* - * Initially empty variables to be filled from other parts of the code. - * - */ -//The followings are taken care by the CollectTracksAndShowers_v2() in BobbyVertexBuilder.h - std::vector< art::Ptr > selected_tracks; - std::vector< art::Ptr > selected_showers; - std::vector< art::Ptr > more_tracks;//non-cosmic objects, but not selected nu objects. - std::vector< art::Ptr > more_showers; - //Maps for more pandora objects. - std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; - std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; - - std::map< art::Ptr , double > trackToDistMap; - std::map< art::Ptr , double > showerToDistMap; - -//The followings are taken care by the AnalyzeSlices() in analyze_Slice.h - std::map sliceIdToNuScoreMap; - //Pairs that connect PFParticle to sliceID. - std::vector,int>> primaryPFPSliceIdVec; - std::map< art::Ptr, int> PFPToSliceIdMap; - std::map< art::Ptr, bool> PFPToClearCosmicMap; - std::map< art::Ptr, bool> PFPToNuSliceMap; - std::map< art::Ptr, double> PFPToTrackScoreMap; - -//Maps for simb objects; for MC sample, not applied to data - - - //Filled in the CollectMCParticles_v2() in Singlephoton_module.cc - std::map> MCParticleToTrackIdMap; - std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; - std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; - std::map< art::Ptr, int> MCParticleToAncestorPdgMap; - - //Filled in the showerRecoMCmatching() in reco_truth_matching.h -// std::vector> matchedMCParticleVector; - std::map< art::Ptr, art::Ptr > showerToMCParticleMap; - - //Filled in the RecoMCTracks() in analyze_Tracks.h - std::map< art::Ptr, art::Ptr > trackToMCParticleMap; - - - //FindManyP's! - //specially for the number of coorresponding recob (pandora_objects) to a PFParticle; - // example: PFParticleIsATrack[particles.key()] gives the vector that containts all - // cooresponding tracks; - art::FindManyP< recob::Track >* PFParticleAsATrack; - art::FindManyP< recob::Shower >* PFParticleAsAShower; - -// art::FindManyP< recob::Track > PFParticleAsATrack(PFParticleHandle, evt, m_trackLabel); -// art::FindManyP< recob::Shower > PFParticleAsAShower(PFParticleHandle, evt, m_showerLabel); - - private: - /*********************** - * - * Wigets for constructing the different types of varaibels.in this class - * 1. HandleToVector; - * - * **********************/ - //1. Scratch from Handle, and return a equivalently useful vector. - //sample usage: - // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; - // recob::Hit dummy_hit;//This is to specify the template; - // std::vector> hitVector = HandleToVector(dummy_hit, evt, m_hitfinderLabel); - template //A helper template that allows you to make compliated types. - struct temporary_types{ - using type1 = std::vector>; - using type2 = art::ValidHandle>; - using type3 = std::vector; - }; - template //ref_type is only used to identify the temporary_types late. - typename temporary_types::type1 HandleToVector(recob_object ref_type, const art::Event &evt, std::string &label){ - - typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); - typename temporary_types::type1 Vector; - art::fill_ptr_vector(Vector,Handle); - return Vector; - } - - //2. Wiget 2 comes here.. - - }; - - -//sth similar to class DetectorObjects - -//create struct for Track and Shower to add more detail to them, i.e. the geoalgo class; - -//struct Track -//struct Shower - - - - - - - - -//THE HEADER FILE IS THE ABOVE - - - - //Constructor - Atlas::Atlas (){} - //Overloaded Constructor 1, initialize the essential variables - Atlas::Atlas ( const art::Event &evt, - std::vector labels, - bool is_data){ - - //PREPARE some recob objects; - //vector labels = {m_trackLabel, m_showerLabel, m_hitfinderLabel, m_flashLabel, m_pandoraLabel,m_shower3dLabel,m_showerKalmanLabel,m_showerKalmanCaloLabel,m_generatorLabel, m_geantModuleLabel} - recob::PFParticle dummy_PFParticle; - all_pfparticles = HandleToVector(dummy_PFParticle, evt, labels[4]); - recob::Track dummy_track;//This is to specify the template; - all_tracks = HandleToVector(dummy_track, evt, labels[0]);//m_trackLabel - kalmanTrackVector = HandleToVector(dummy_track,evt,labels[6]);//m_showerKalmanLabel - - recob::Shower dummy_shower;//This is to specify the template; - all_showers = HandleToVector(dummy_shower, evt, labels[1]);//m_showerLabel - recob::Hit dummy_hit; - all_hits = HandleToVector(dummy_hit, evt, labels[2]);//m_hitfinderLabel - - recob::OpFlash dummy_opflash; - all_opflashes = HandleToVector(dummy_opflash, evt, labels[3]);//m_flashLabel - - recob::Cluster dummy_cluster; - all_clusters = HandleToVector(dummy_cluster, evt, labels[4]);//m_pandoraLabel - - recob::Slice dummy_slice; - sliceVector = HandleToVector(dummy_slice, evt, labels[4]); - - if(!is_data){ - //MCTruth Handle - simb::MCTruth dummy_geant; //for Geant info. - mcTruthVector = HandleToVector(dummy_geant, evt, labels[8]); - - simb::MCParticle dummy_genie; //for Genie info. - matchedMCParticleVector = HandleToVector(dummy_genie, evt, labels[9]); - } - //CREATE maps! - //Ingredient 1: Handles; I temporary define it here for mapping purpose; - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(labels[4]);//This is useful for FindManyP< reco::Track/Shower> - art::ValidHandle> const & clusterHandle = evt.getValidHandle>(labels[4]); - art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(labels[6]); - art::ValidHandle> const & sliceHandle = evt.getValidHandle>(labels[4]); - //a cross check - if (!pfParticleHandle.isValid()) - { - mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; - return; - } - - - //Ingredient 2: FindManyPs; these will be gone when construction finished - art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, labels[4]); - art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP spacePoints_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, labels[4]); - art::FindManyP hits_per_cluster(clusterHandle, evt, labels[4]); - art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, labels[5]); - art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, labels[6]); - art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, labels[7]); - art::FindManyP pfparticles_per_slice(sliceHandle, evt, labels[4]); - art::FindManyP hits_per_slice(sliceHandle, evt, labels[4]); - - //make maps here; - for(size_t i=0; i< all_pfparticles.size(); ++i){ - const art::Ptr pfp = all_pfparticles[i]; - PFParticlesToVerticesMap[pfp] = vertices_per_pfparticle.at(pfp.key());//old name: pfParticlesToVerticesMap; - - PFParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); - IDToPFParticleMap[pfp->Self()] = pfp; - PFParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); - PFParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - - //3D Showers - if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ - PFParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); - } - //---------Kalman Track Showers - if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ - PFParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); - } - } - //other maps not on pfParticles; - for(size_t i=0; i< all_clusters.size(); ++i){ - auto cluster = all_clusters[i]; - ClusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); - } - - //----- kalmon Cali - for(size_t i=0; i< kalmanTrackVector.size(); ++i){ - auto trk = kalmanTrackVector[i]; - if(cali_per_kalmantrack.at(trk.key()).size()!=0){ - kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); - } - } - - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; - sliceToPFParticlesMap[slice] = pfparticles_per_slice.at(slice.key()); - sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); - sliceToHitsMap[slice] =hits_per_slice.at(slice.key()); - sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); - } - -//------- trackToMCParticleMap -------- -// if(!is_data){ -// //Fill in trackToMCParticleMap; -// //https://indico.fnal.gov/event/20453/session/6/contribution/4/material/slides/0.pdf -// //BackTrackerService and ParticleInventoryService -// art::ServiceHandle bt_serv; -// art::ServiceHandle pi_serv; -// //Get tracks -// art::Handle< std::vector > trackListHandle; -// std::vector > tracklist; -// if (evt.getByLabel(labels[0],trackListHandle)) art::fill_ptr_vector(tracklist, trackListHandle); -// //Get hit-track association -// art::FindManyP fmth(trackListHandle, evt, labels[0]); -// //Loop over all tracks -// for(size_t i=0; i > allHits = fmth.at(i); -// std::map trkide; -// cout<<"Size of hits "< hit = allHits[h]; -// //TrackIDE saves the energy deposition for each Geant particle ID -// std::vector TrackIDs = bt_serv->HitToEveTrackIDEs(hit); -// cout<<"Size of TrackIDs "<::iterator ii = trkide.begin(); ii!=trkide.end(); ++ii){ -// cout<<"Possible IDs "<first<second; -// if ((ii->second)>maxe){ -// TrackID = ii->first; //TrackID maxe = ii->second; //Energy -// } } -// // Now have trackID, so get PdG code. -// -// // const simb::MCParticle *particle = pi_serv->TrackIdToParticle_P(TrackID); -// -// cout<<"Ptr::MCP CHECK "< mcp : matchedMCParticleVector){ -// //cout<<"Match ID "<TrackId()<TrackId() == TrackID){ cout<<"Yes"<Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); - //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); - //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); - - //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); - eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); - eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); - eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); - eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); - eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); - eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); - eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); - eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); - std::cout<<"SinglePhoton:analyze_Eventweigh:eventweight_tree make branches end"<Branch("geant4_pdg",&m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_geant4_px); - geant4_tree->Branch("geant4_py", &m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_geant4_process); - - - } void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index f0be85e28..83a2ff43e 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -1,243 +1,7 @@ namespace single_photon { - void SinglePhoton::ClearMCTruths(){ - m_mctruth_num = 0; - m_mctruth_origin = -99; - m_mctruth_mode = -99; - m_mctruth_interaction_type = -99; - m_mctruth_nu_vertex_x = -9999; - m_mctruth_nu_vertex_y = -9999; - m_mctruth_nu_vertex_z = -9999; - m_mctruth_reco_vertex_dist = -9999; - m_mctruth_ccnc = -99; - m_mctruth_qsqr = -99; - m_mctruth_nu_E = -99; - m_mctruth_nu_pdg = 0; - m_mctruth_lepton_pdg = 0; - m_mctruth_num_daughter_particles = -99; - m_mctruth_daughters_pdg.clear(); - m_mctruth_daughters_E.clear(); - - m_mctruth_daughters_status_code.clear(); - m_mctruth_daughters_trackID.clear(); - m_mctruth_daughters_mother_trackID.clear(); - m_mctruth_daughters_px.clear(); - m_mctruth_daughters_py.clear(); - m_mctruth_daughters_pz.clear(); - m_mctruth_daughters_startx.clear(); - m_mctruth_daughters_starty.clear(); - m_mctruth_daughters_startz.clear(); - m_mctruth_daughters_time.clear(); - m_mctruth_daughters_endx.clear(); - m_mctruth_daughters_endy.clear(); - m_mctruth_daughters_endz.clear(); - m_mctruth_daughters_endtime.clear(); - m_mctruth_daughters_process.clear(); - m_mctruth_daughters_end_process.clear(); - - - m_mctruth_is_delta_radiative = 0; - m_mctruth_delta_radiative_1g1p_or_1g1n = -999; - - m_mctruth_delta_photon_energy=-999; - m_mctruth_delta_proton_energy=-999; - m_mctruth_delta_neutron_energy=-999; - - m_mctruth_num_exiting_photons =0; - m_mctruth_num_exiting_protons =0; - m_mctruth_num_exiting_pi0 =0; - m_mctruth_num_exiting_pipm =0; - m_mctruth_num_exiting_neutrons=0; - m_mctruth_num_exiting_delta0=0; - m_mctruth_num_exiting_deltapm=0; - m_mctruth_num_exiting_deltapp=0; - - m_mctruth_num_reconstructable_protons = 0; - - m_mctruth_is_reconstructable_1g1p = 0; - m_mctruth_is_reconstructable_1g0p = 0; - - m_mctruth_leading_exiting_proton_energy = -9999; - - m_mctruth_exiting_pi0_E.clear(); - m_mctruth_exiting_pi0_mom.clear(); - m_mctruth_exiting_pi0_px.clear(); - m_mctruth_exiting_pi0_py.clear(); - m_mctruth_exiting_pi0_pz.clear(); - - m_mctruth_pi0_leading_photon_energy = -9999; - m_mctruth_pi0_subleading_photon_energy = -9999; - m_mctruth_pi0_leading_photon_end_process = "none"; - m_mctruth_pi0_subleading_photon_end_process = "none"; - m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_exiting_TPC = -999; - m_mctruth_pi0_subleading_photon_exiting_TPC = -999; - m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; - - m_mctruth_exiting_delta0_num_daughters.clear(); - - m_mctruth_exiting_photon_mother_trackID.clear(); - m_mctruth_exiting_photon_trackID.clear(); - m_mctruth_exiting_photon_from_delta_decay.clear(); - m_mctruth_exiting_photon_energy.clear(); - m_mctruth_exiting_photon_px.clear(); - m_mctruth_exiting_photon_py.clear(); - m_mctruth_exiting_photon_pz.clear(); - - m_mctruth_exiting_proton_mother_trackID.clear(); - m_mctruth_exiting_proton_trackID.clear(); - m_mctruth_exiting_proton_from_delta_decay.clear(); - m_mctruth_exiting_proton_energy.clear(); - m_mctruth_exiting_proton_px.clear(); - m_mctruth_exiting_proton_py.clear(); - m_mctruth_exiting_proton_pz.clear(); - - m_mctruth_exiting_neutron_mother_trackID.clear(); - m_mctruth_exiting_neutron_trackID.clear(); - m_mctruth_exiting_neutron_from_delta_decay.clear(); - m_mctruth_exiting_neutron_energy.clear(); - m_mctruth_exiting_neutron_px.clear(); - m_mctruth_exiting_neutron_py.clear(); - m_mctruth_exiting_neutron_pz.clear(); - - } - - void SinglePhoton::ResizeMCTruths(size_t size){ - m_mctruth_daughters_pdg.resize(size); - m_mctruth_daughters_E.resize(size); - m_mctruth_daughters_status_code.resize(size); - m_mctruth_daughters_trackID.resize(size); - m_mctruth_daughters_mother_trackID.resize(size); - m_mctruth_daughters_px.resize(size); - m_mctruth_daughters_py.resize(size); - m_mctruth_daughters_pz.resize(size); - m_mctruth_daughters_startx.resize(size); - m_mctruth_daughters_starty.resize(size); - m_mctruth_daughters_startz.resize(size); - m_mctruth_daughters_time.resize(size); - m_mctruth_daughters_endx.resize(size); - m_mctruth_daughters_endy.resize(size); - m_mctruth_daughters_endz.resize(size); - m_mctruth_daughters_endtime.resize(size); - m_mctruth_daughters_end_process.resize(size); - m_mctruth_daughters_process.resize(size); - - } - - //add into vertex tree? - void SinglePhoton::CreateMCTruthBranches(){ - vertex_tree->Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); - vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); - vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); - vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); - vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); - vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); - vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); - vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); - vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); - vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); - vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); - vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); - vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); - vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); - vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); - vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); - - - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); - vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); - vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); - vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); - vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); - - vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); - vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); - vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); - vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); - - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); - vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); - vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); - vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); - vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); - vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); - - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); - } - - //CHECK how is this different from MCReco matching? + + //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tTotal "<Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); - vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); - } - - void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index fdc061ce1..42d1cc733 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -1,573 +1,19 @@ namespace single_photon { - void SinglePhoton::ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_start_dist_to_active_TPC.clear(); - m_reco_shower_start_dist_to_SCB.clear(); - m_reco_shower_start_in_SCB.clear(); - m_reco_shower_end_dist_to_active_TPC.clear(); - m_reco_shower_end_dist_to_SCB.clear(); - - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - - m_reco_shower_reclustered_energy_plane0.clear(); - m_reco_shower_reclustered_energy_plane1.clear(); - m_reco_shower_reclustered_energy_plane2.clear(); - m_reco_shower_reclustered_energy_max.clear(); - - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - m_reco_shower_plane0_meanRMS.clear(); - m_reco_shower_plane1_meanRMS.clear(); - m_reco_shower_plane2_meanRMS.clear(); - - m_reco_shower_hit_tick.clear(); - m_reco_shower_hit_wire.clear(); - m_reco_shower_hit_plane.clear(); - m_reco_shower_spacepoint_x.clear(); - m_reco_shower_spacepoint_y.clear(); - m_reco_shower_spacepoint_z.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - - m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - m_reco_shower_pfparticle_pdg.clear(); - - } - - void SinglePhoton::ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower_reclustered_energy_plane0.resize(size); - m_reco_shower_reclustered_energy_plane1.resize(size); - m_reco_shower_reclustered_energy_plane2.resize(size); - m_reco_shower_reclustered_energy_max.resize(size); - - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - m_reco_shower_start_dist_to_active_TPC.resize(size); - m_reco_shower_start_dist_to_SCB.resize(size); - m_reco_shower_start_in_SCB.resize(size); - - m_reco_shower_end_dist_to_active_TPC.resize(size); - m_reco_shower_end_dist_to_SCB.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - m_reco_shower_plane0_meanRMS.resize(size); - m_reco_shower_plane1_meanRMS.resize(size); - m_reco_shower_plane2_meanRMS.resize(size); - - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - - m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - m_reco_shower_pfparticle_pdg.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); - - - - - - } - - void SinglePhoton::CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); - vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); - vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); - - - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); - //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); - vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); - vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); - - vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); - vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); - vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); - vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); - - vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); - vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); - vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); - - vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); - vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); - vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); - } - - void SinglePhoton::AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap, std::map, std::vector> > & pfParticleToClusterMap,std::map, std::vector> > & clusterToHitMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap, + void SinglePhoton::AnalyzeShowers( + const std::vector>& showers, + std::map, + art::Ptr> & showerToPFParticleMap, + std::map, std::vector>> & pfParticleToHitMap, + std::map, std::vector> > & pfParticleToClusterMap, + std::map, std::vector> > & clusterToHitMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr>& PFPtoShowerReco3DMap, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector ){ @@ -669,7 +115,6 @@ namespace single_photon m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); @@ -865,9 +310,25 @@ namespace single_photon m_reco_shower_dEdx_plane1_nhits[i_shr] = m_reco_shower_dEdx_plane1[i_shr].size(); m_reco_shower_dEdx_plane2_nhits[i_shr] = m_reco_shower_dEdx_plane2[i_shr].size(); - m_reco_shower_dEdx_amalgamated[i_shr] = getAmalgamateddEdx( m_reco_shower_angle_wrt_wires_plane0[i_shr], m_reco_shower_angle_wrt_wires_plane1[i_shr], m_reco_shower_angle_wrt_wires_plane2[i_shr], m_reco_shower_dEdx_plane0_median[i_shr], m_reco_shower_dEdx_plane1_median[i_shr], m_reco_shower_dEdx_plane2_median[i_shr],m_reco_shower_dEdx_plane0_nhits[i_shr], m_reco_shower_dEdx_plane1_nhits[i_shr], m_reco_shower_dEdx_plane2_nhits[i_shr] ); - - m_reco_shower_dEdx_amalgamated_nhits[i_shr] = getAmalgamateddEdxNHits(m_reco_shower_dEdx_amalgamated[i_shr], m_reco_shower_dEdx_plane0_median[i_shr], m_reco_shower_dEdx_plane1_median[i_shr], m_reco_shower_dEdx_plane2_median[i_shr],m_reco_shower_dEdx_plane0_nhits[i_shr], m_reco_shower_dEdx_plane1_nhits[i_shr], m_reco_shower_dEdx_plane2_nhits[i_shr] ); + m_reco_shower_dEdx_amalgamated[i_shr] = getAmalgamateddEdx( + m_reco_shower_angle_wrt_wires_plane0[i_shr], + m_reco_shower_angle_wrt_wires_plane1[i_shr], + m_reco_shower_angle_wrt_wires_plane2[i_shr], + m_reco_shower_dEdx_plane0_median[i_shr], + m_reco_shower_dEdx_plane1_median[i_shr], + m_reco_shower_dEdx_plane2_median[i_shr], + m_reco_shower_dEdx_plane0_nhits[i_shr], + m_reco_shower_dEdx_plane1_nhits[i_shr], + m_reco_shower_dEdx_plane2_nhits[i_shr] ); + + m_reco_shower_dEdx_amalgamated_nhits[i_shr] = getAmalgamateddEdxNHits( + m_reco_shower_dEdx_amalgamated[i_shr], + m_reco_shower_dEdx_plane0_median[i_shr], + m_reco_shower_dEdx_plane1_median[i_shr], + m_reco_shower_dEdx_plane2_median[i_shr], + m_reco_shower_dEdx_plane0_nhits[i_shr], + m_reco_shower_dEdx_plane1_nhits[i_shr], + m_reco_shower_dEdx_plane2_nhits[i_shr] ); //-------------- Flashes : Was there a flash in the beam_time and if so was it near in Z? -------------------- double zmin = m_reco_shower_startz[i_shr]; @@ -989,280 +450,234 @@ namespace single_photon if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<>& showers, std::map,art::Ptr> &showerToPFParticleMap, std::map,art::Ptr> & pfParticlesToShowerKalmanMap, std::map,std::vector>>& kalmanTrackToCaloMap, std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector){ - - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tStarting to Analyze Showers ("< gains = {0,0,0}; - for(int plane =0; plane < 3; plane++){ - if (m_is_data == false && m_is_overlayed == false){ - gains[plane] = m_gain_mc[plane] ; - } if (m_is_data == true || m_is_overlayed == true){ - gains[plane] = m_gain_data[plane] ; - } - } - - - int i_shr=0; - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - const art::Ptr shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; - std::vector> hitz = pfParticleToHitMap[pfp]; - - if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; - - if(kalmanTrackToCaloMap.count(kalman)==0){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; - - if(calo.size()!=3){ - std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; - if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? - - std::vector t_dEdx; //in XX cm only (4 for now) - std::vector t_res; - - - for(size_t ix=0; ixResidualRange().size(); ++ix){ - - double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; - if(rr <= res_range_lim){ - // Guanqun: why is here a gains[plane], it's not converting ADC to E? - t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); - //t_dQdx.push_back(*calo[p]->dQdx()[x]); - t_res.push_back(rr); - } - } - /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); - if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); - std::cout<<"CHECK "<<__LINE__<<" in analyze_Showers.h to see why dEdx does not work"< kal_pts = calo[p]->XYZ(); - double circle = 1.0;//in cm - std::vector pts_within; - std::vector pts_x; - - for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); - - double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); -// double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); - double time = theDetector.ConvertXToTicks(kal_pts[ix].X(), plane, m_TPC,m_Cryostat); - - //loop over all hits - for(auto &hit: hitz){ - if(plane != hit->View())continue; - double this_w = (double)hit->WireID().Wire; - double this_t = (double)hit->PeakTime(); - double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); - if(dist<=circle) pts_within.back()++; - } - //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ - TCanvas *c = new TCanvas(); - c->cd(); - - TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); - g->SetLineColor(kRed); - g->SetLineWidth(2); - g->Draw("alp"); - g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); - c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); - } - } - - - // some kalman averaging - double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; - double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; - double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; - double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); - double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); - double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); - - double thresh = 0.01; - - if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ - tmp_kal_2 = 0; - wei_2 = 0.0; - } - if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ - tmp_kal_1 = 0; - wei_1 = 0.0; - } - if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ - tmp_kal_0 = 0; - wei_0 = 0.0; - } - double kal_norm = wei_0+wei_1+wei_2; - - if(kal_norm!=0.0){ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); - }else{ - m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; - } - - - - - - i_shr++; - } - return; + void SinglePhoton::AnalyzeKalmanShowers( + const std::vector>& showers, + std::map,art::Ptr> &showerToPFParticleMap, + std::map,art::Ptr> & pfParticlesToShowerKalmanMap, + std::map,std::vector>>& kalmanTrackToCaloMap, + std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesData const & theDetector){ + std::cout<<"NO Kalman stuff in SBND" < gains = {0,0,0}; +// for(int plane =0; plane < 3; plane++){ +// if (m_is_data == false && m_is_overlayed == false){ +// gains[plane] = m_gain_mc[plane] ; +// } if (m_is_data == true || m_is_overlayed == true){ +// gains[plane] = m_gain_data[plane] ; +// } +// } +// +// +// int i_shr=0; +// for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) +// { +// const art::Ptr shower = *iter; +// const art::Ptr pfp = showerToPFParticleMap[shower]; +// std::vector> hitz = pfParticleToHitMap[pfp]; +// +// if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ +// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; +// +// if(kalmanTrackToCaloMap.count(kalman)==0){ +// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; +// +// if(calo.size()!=3){ +// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; +// if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? +// +// std::vector t_dEdx; //in XX cm only (4 for now) +// std::vector t_res; +// +// +// for(size_t ix=0; ixResidualRange().size(); ++ix){ +// +// double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; +// if(rr <= res_range_lim){ +// // Guanqun: why is here a gains[plane], it's not converting ADC to E? +// t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); +// //t_dQdx.push_back(*calo[p]->dQdx()[x]); +// t_res.push_back(rr); +// } +// } +// /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); +// if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); +// std::cout<<"CHECK "<<__LINE__<<" in analyze_Showers.h to see why dEdx does not work"< kal_pts = calo[p]->XYZ(); +// double circle = 1.0;//in cm +// std::vector pts_within; +// std::vector pts_x; +// +// for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); +// +// double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); +//// double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); +// double time = theDetector.ConvertXToTicks(kal_pts[ix].X(), plane, m_TPC,m_Cryostat); +// +// //loop over all hits +// for(auto &hit: hitz){ +// if(plane != hit->View())continue; +// double this_w = (double)hit->WireID().Wire; +// double this_t = (double)hit->PeakTime(); +// double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); +// if(dist<=circle) pts_within.back()++; +// } +// //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ +// TCanvas *c = new TCanvas(); +// c->cd(); +// +// TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); +// g->SetLineColor(kRed); +// g->SetLineWidth(2); +// g->Draw("alp"); +// g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); +// c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); +// } +// } +// +// +// // some kalman averaging +// double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; +// double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; +// double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; +// double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); +// double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); +// double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); +// +// double thresh = 0.01; +// +// +// if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ +// tmp_kal_2 = 0; +// wei_2 = 0.0; +// } +// if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ +// tmp_kal_1 = 0; +// wei_1 = 0.0; +// } +// if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ +// tmp_kal_0 = 0; +// wei_0 = 0.0; +// } +// double kal_norm = wei_0+wei_1+wei_2; +// +// if(kal_norm!=0.0){ +// m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); +// }else{ +// m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; +// } +// +// std::cout<<"CHECK wei0 "<> &hits){ + double energy[3] = {0., 0., 0.}; - //----------------------------------------------------------------------------------------------------------------------------------------- - void SinglePhoton::RecoMCShowers(const std::vector>& showers, - std::map, art::Ptr> & showerToPFParticleMap, - std::map, art::Ptr > & showerToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector - ){ - //OBSOLETE OBSOLETE - - - if(m_is_verbose) std::cout<<"SinglePhoton::RecoMCShowers()\t||\t Begininning recob::Shower Reco-MC suite"< shower = *iter; - m_sim_shower_matched[i_shr] = 0; - if(showerToMCParticleMap.count(shower) > 0){ - - - - const art::Ptr mcparticle = showerToMCParticleMap[shower]; - const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; - - std::vector corrected(3); - this->spacecharge_correction(mcparticle, corrected); - m_sim_shower_matched[i_shr] = 1; - m_sim_shower_energy[i_shr] = mcparticle->E(); - m_sim_shower_mass[i_shr] = mcparticle->Mass(); - m_sim_shower_kinetic_energy[i_shr] = mcparticle->E()-mcparticle->Mass(); - m_sim_shower_pdg[i_shr] = mcparticle->PdgCode(); - m_sim_shower_process[i_shr] = mcparticle->Process(); - m_sim_shower_start_x[i_shr] = corrected[0]; - m_sim_shower_start_y[i_shr] = corrected[1]; - m_sim_shower_start_z[i_shr] =corrected[2]; - - m_sim_shower_origin[i_shr] = mctruth->Origin(); - //so this might be broken still due to mcparticle. must chcek - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_shower_parent_pdg[i_shr] = -999; - }else{ - m_sim_shower_parent_pdg[i_shr] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } - - //OK is this photon matched to a delta? - - /* - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t -- gamma ("<TrackId()<<"| pdg: "<PdgCode()<<") of status_code "<StatusCode()< nth_mother = crap_map[mcparticle->Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- with mother "<PdgCode()<<" ("<TrackId()<<") status_code "<StatusCode()<StatusCode() != 0){ + //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<Mother()]; - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ---- and "<PdgCode()<<" ("<TrackId()<<") and status_code "<StatusCode()<PdgCode())>0 && nth_mother->StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()]<View(); - } - n_generation++; - } - */ + //skip invalid planes + if (plane > 2 || plane < 0) continue; + //calc the energy of the hit + double E = QtoEConversion(GetQHit(thishitptr, plane)); + //add the energy to the plane + energy[plane] += E; + }//for each hiti + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; } - i_shr++; } + // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< &shower) - { + //return the highest energy on any of the planes + return max; } - double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ + double SinglePhoton::CalcEShowerPlane(const std::vector>& hits, int this_plane){ double energy = 0.; //for each hit in the shower @@ -1274,8 +689,7 @@ namespace single_photon if (plane != this_plane ) continue; //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - + double E = QtoEConversion(GetQHit(thishitptr, plane)); //add the energy to the plane energy += E; }//for each hit @@ -1284,39 +698,8 @@ namespace single_photon } - double SinglePhoton::CalcEShower(const std::vector> &hits){ - double energy[3] = {0., 0., 0.}; - //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversionHit(thishitptr, plane); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "< thishitptr, int plane){ double gain; @@ -1334,10 +717,6 @@ namespace single_photon return Q; } - double SinglePhoton::QtoEConversionHit(art::Ptr thishitptr, int plane){ - return QtoEConversion(GetQHit(thishitptr, plane)); - - } double SinglePhoton::QtoEConversion(double Q){ //return the energy value converted to MeV (the factor of 1e-6) @@ -1441,40 +820,17 @@ namespace single_photon return m_wire_spacing/cos; } - TVector3 SinglePhoton::getWireVec(int plane){ - TVector3 wire_dir; - if (plane == 0){ - wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; - } else if (plane == 1){ - wire_dir = {0., sqrt(3) / 2., 1 / 2.}; - } else if (plane == 2) { - wire_dir = {0., 0., 1.}; - } - return wire_dir; - - } - - double SinglePhoton::getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ - //take the dot product between the wire direction and the shower direction - double cos = wire_dir.Dot(shower_dir); - return cos; - } - - - // shower_dir needs to be unit vector - double SinglePhoton::getAnglewrtWires(TVector3 shower_dir,int plane){ - TVector3 wire_dir = getWireVec(plane); - double cos_theta = getCoswrtWires(shower_dir, wire_dir); - - double theta = acos(cos_theta); - // return abs(theta); - return abs(M_PI/2 - theta); - - } - - - double SinglePhoton::getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits){ + double SinglePhoton::getAmalgamateddEdx( + double angle_wrt_plane0, + double angle_wrt_plane1, + double angle_wrt_plane2, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 if(angle_wrt_plane2< degToRad(10)){ //if it's too close to the wires on either of the planes, then stick with plane 2 @@ -1488,17 +844,24 @@ namespace single_photon } } if (plane2_nhits< 2){ - if (plane1_nhits >=2 ){ + if (plane1_nhits >=2 ){ return median_plane1; } else if (plane0_nhits >=2 ){ return median_plane0; } } - return median_plane2; } - int SinglePhoton::getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits){ + + int SinglePhoton::getAmalgamateddEdxNHits( + double amalgamateddEdx, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ if (amalgamateddEdx == median_plane0){ return plane0_nhits; } @@ -1509,16 +872,8 @@ namespace single_photon return plane2_nhits; } return -999; - - } - - double SinglePhoton::degToRad(double deg){ - return deg * M_PI/180; } - double SinglePhoton::radToDeg(double rad){ - return rad * 180/M_PI; - } double SinglePhoton::getMeanHitWidthPlane(std::vector> hits, int this_plane){ @@ -1533,11 +888,8 @@ namespace single_photon widths += thishitptr->RMS(); // recob::Hit->RMS() returns RMS of the hit shape in tick units nhits++; - - }//for each hiti return widths/(double)nhits; - } @@ -1552,10 +904,8 @@ namespace single_photon if (plane != this_plane) continue; nhits++; - }//for each hiti return nhits; - } std::vector> SinglePhoton::buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ @@ -1613,7 +963,9 @@ namespace single_photon //for each pair of vertices for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { //calculate the area of a triangle with the point and two vertices - double this_area = areaTriangle(rectangle[i][0], rectangle[i][1], rectangle[j][0], rectangle[j][1], thishit_pos[0], thishit_pos[1]); + double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) + + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) + + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); areas += this_area; } //calc area of the rectangle @@ -1627,35 +979,14 @@ namespace single_photon } //area of a triangle given three vertices - double SinglePhoton::areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3){ - double num = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2); - return abs(num)/2; - } - double SinglePhoton::getMedian(std::vector thisvector){ - //So return median if odd, average of median in even, if size==0, return the point. - - //here the size corresponds to the max index - - int size = thisvector.size() - 1; - //if no entries, return nonsense value - if (size < 0) return NAN; - if (size==0) return thisvector[size]; - - //find index of median location - double median; - if (size%2 == 0){ // if vector has odd elements - int ind = size/2; - median = thisvector[ind]; - } else{ // if vector has even number of elements - int ind1 = size/2; - int ind2 = size/2-1; - median = (thisvector[ind1]+thisvector[ind2])/2.0; - } +// double this_area = areaTriangle(rectangle[i][0], rectangle[i][1], rectangle[j][0], rectangle[j][1], thishit_pos[0], thishit_pos[1]); +// double SinglePhoton::areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3){ +// double num = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2); +// return abs(num)/2; +// } + - //return the value at median index - return median; - } //CHECK below are moved from SinglePhoton_module.cc diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index 3092b261f..eb664e895 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -1,145 +1,5 @@ namespace single_photon { - void SinglePhoton::ClearSlices(){ - m_reco_slice_num = 0; - m_reco_slice_nuscore.clear(); - m_matched_signal_shower_overlay_fraction.clear(); - //std::vector m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; - - - //int m_matched_signal_total_num_slices; - - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); - */ - } - - //resizes the branches that are filled for every slice int the event - void SinglePhoton::ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size); - m_reco_slice_num_pfps.resize(size); - m_reco_slice_num_showers.resize(size); - m_reco_slice_num_tracks.resize(size); - - } - - /* - //resize the branches that are filled for matched track and shower objects - void SinglePhoton::ResizeMatchedSlices(size_t size_shower ,size_t size_track){ - m_reco_slice_shower_matched_sliceId.resize(size_shower); - m_reco_slice_track_matched_sliceId.resize( size_track); - m_reco_slice_shower_matched_energy.resize(size_shower); - m_reco_slice_track_matched_energy.resize( size_track); - m_reco_slice_shower_matched_conversion.resize(size_shower); - m_reco_slice_shower_matched_overlay_frac.resize(size_shower); - - } - */ - - - void SinglePhoton::CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); - - - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); - - } - - /* - void SinglePhoton::CreateMatchedSliceBranches(){ - vertex_tree->Branch("reco_slice_shower_matched_sliceId", & m_reco_slice_shower_matched_sliceId); - vertex_tree->Branch("reco_slice_track_matched_sliceId", & m_reco_slice_track_matched_sliceId); - vertex_tree->Branch("reco_slice_shower_matched_energy",& m_reco_slice_shower_matched_energy); - vertex_tree->Branch("reco_slice_track_matched_energy",& m_reco_slice_track_matched_energy); - vertex_tree->Branch("reco_slice_shower_matched_conversion",& m_reco_slice_shower_matched_conversion); - vertex_tree->Branch("reco_slice_shower_matched_overlay_frac",& m_reco_slice_shower_matched_overlay_frac); - } - */ - //called once per event to get all the slice info //fills a map between the neutrino score for the slice and the primary reco PFP //loops over all PFP's to find the primary and then associate to a slice diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h index 9cc997d66..ad4056dbf 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h @@ -5,501 +5,6 @@ namespace single_photon { - - - void SinglePhoton::ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_length.clear(); - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - m_reco_track_end_dist_to_active_TPC.clear(); - m_reco_track_start_dist_to_active_TPC.clear(); - m_reco_track_end_dist_to_SCB.clear(); - m_reco_track_start_dist_to_SCB.clear(); - m_reco_track_end_in_SCB.clear(); - m_reco_track_start_in_SCB.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_calo_energy_plane0.clear(); - m_reco_track_calo_energy_plane1.clear(); - m_reco_track_calo_energy_plane2.clear(); - m_reco_track_calo_energy_max.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_endx.clear(); - m_sim_track_endy.clear(); - m_sim_track_endz.clear(); - m_sim_track_length.clear(); - - m_sim_track_px.clear(); - m_sim_track_py.clear(); - m_sim_track_pz.clear(); - m_sim_track_trackID.clear(); - - // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - - m_reco_track_end_to_nearest_dead_wire_plane0.clear(); - m_reco_track_end_to_nearest_dead_wire_plane1.clear(); - m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_pfparticle_pdg.clear(); - m_reco_track_is_nuslice.clear(); - - - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); - - - } - - void SinglePhoton::ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - m_reco_track_end_dist_to_active_TPC.resize(size); - m_reco_track_start_dist_to_active_TPC.resize(size); - m_reco_track_end_dist_to_SCB.resize(size); - m_reco_track_start_dist_to_SCB.resize(size); - m_reco_track_end_in_SCB.resize(size); - m_reco_track_start_in_SCB.resize(size); - - m_reco_track_calo_energy_plane0.resize(size); - m_reco_track_calo_energy_plane1.resize(size); - m_reco_track_calo_energy_plane2.resize(size); - m_reco_track_calo_energy_max.resize(size); - - - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_endx.resize(size); - m_sim_track_endy.resize(size); - m_sim_track_endz.resize(size); - m_sim_track_length.resize(size); - - m_sim_track_px.resize(size); - m_sim_track_py.resize(size); - m_sim_track_pz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - - m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_pfparticle_pdg.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); - } - - void SinglePhoton::CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); - vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); - vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); - vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); - vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); - vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); - - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); - vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); - vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); - vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - vertex_tree->Branch("sim_track_px",&m_sim_track_px); - vertex_tree->Branch("sim_track_py",&m_sim_track_py); - vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); - vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); - vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); - vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); - vertex_tree->Branch("sim_track_length",&m_sim_track_length); - - vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); - - - } - - - - - - void SinglePhoton::AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & trackToNuPFParticleMap, std::map, std::vector>> & pfParticleToHitsMap, diff --git a/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h b/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h deleted file mode 100644 index d7c5a44f5..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/bad_channel_matching.h +++ /dev/null @@ -1,131 +0,0 @@ -#include "SinglePhoton_module.h" - - -namespace single_photon -{ - - //line between x1 and x2, point x0; - //Keng: have move this -// double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ -// double x1 =X1.at(0); -// double y1 =X1.at(1); -// double z1 =X1.at(2); -// -// double x2 =X2.at(0); -// double y2 =X2.at(1); -// double z2 =X2.at(2); -// -// double x0 =point.at(0); -// double y0 =point.at(1); -// double z0 =point.at(2); -// -// double x10 = x1-x0; -// double y10 = y1-y0; -// double z10 = z1-z0; -// -// double x21 = x2-x1; -// double y21 = y2-y1; -// double z21 = z2-z1; -// -// double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); -// -// // right, but can be simplified -// double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); -// -// -// return sqrt(d2); -// -// } - - - // minimum distance between point and dead wire - // Keng, have moved this; -// double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, -// const geo::GeometryCore * geom, -// std::vector> & bad_channel_list_fixed_mcc9 ){ -// -// double min_dist = 999999; -// -// for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ -// int channel = bad_channel_list_fixed_mcc9[i].first; -// int is_ok = bad_channel_list_fixed_mcc9[i].second; -// if(is_ok>1)continue; -// -// auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel -// auto result = geom->WireEndPoints(wireids[0]); -// -// //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; -// std::vector end = {0.0,result.end().Y(),result.end().Z()}; -// std::vector point = {0.0,Ypoint,Zpoint}; -// double dist = dist_line_point(start,end,point); -// min_dist = std::min(dist,min_dist); -// } -// -// return min_dist; -// -// } - - - //Typenamed for recob::Track and recob::Shower - //Guanqun: this function didn't do anything? - template - int badChannelMatching(std::vector& badchannels, - std::vector& objects, - std::map< T, art::Ptr > & objectToPFParticleMap, - std::map< art::Ptr, std::vector> > & pfParticleToHitsMap, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9){ - - - - - for(size_t i_trk=0; i_trk pfp = objectToPFParticleMap[object]; - const std::vector> hits = pfParticleToHitsMap[pfp]; - - int min_dist_from_bad_channel = 99999; - - for(size_t h=0; h hit = hits[h]; - - - //int nch = (int)badchannels.size()/3; - //for(int i=0; i1)continue; - int dist =hit->Channel()-bc; - auto hs = geom->ChannelToWire(bc); - //std::cout<<"AG: "<Channel()<<"): "<WireID()< start(3); - std::vector end(3); - auto result = geom->WireEndPoints(hs[0]); - - // std::cout<<"KNK: "<(); + for (auto const &cryo: geometry->IterateCryostats()) { + geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), + tend = geometry->end_TPC(cryo.ID()); + + std::vector this_tpc_volumes; + while (iTPC != tend) { + geo::TPCGeo const& TPC = *iTPC; + this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); + iTPC++; + } + fTPCVolumes.push_back(std::move(this_tpc_volumes)); + } + + // then combine them into active volumes + for (const std::vector &tpcs: fTPCVolumes) { + m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); + m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); + m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + + m_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); + m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); + m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + if(m_is_verbose){ + std::cout<<"SinglePhoton::"<<__FUNCTION__<<" || Active TPC info: X:("< & vec){ - return isInTPCActive(0.0,vec); - } + if( vec.size() != 3){ + throw cet::exception("SinglePhoton") << " The coordinate dimension is not 3!"; + } - /* determine if point vec is inside TPC active volume, returns 1 - in TPC active, 0 - out of TPC active */ - int SinglePhoton::isInTPCActive(double cut,std::vector & vec){ - bool is_x = (vec[0] > m_tpc_active_x_low+cut && vec[0]< m_tpc_active_x_high-cut ); - bool is_y = (vec[1] > m_tpc_active_y_low+cut && vec[1]< m_tpc_active_y_high-cut); - bool is_z = (vec[2] > m_tpc_active_z_low+cut && vec[2] m_tpc_active_XMin && vec[0]< m_tpc_active_XMax ); + bool is_y = (vec[1] > m_tpc_active_YMin && vec[1]< m_tpc_active_YMax ); + bool is_z = (vec[2] > m_tpc_active_ZMin && vec[2]< m_tpc_active_ZMax ); + bool inside = is_x&&is_y&&is_z; + return inside; } + /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ double SinglePhoton::distToTPCActive(std::vector&vec){ if(isInTPCActive(vec)==0) return -999; - double min_x = std::min( fabs(vec[0] - m_tpc_active_x_low) , fabs(vec[0] - m_tpc_active_x_high)); - double min_y = std::min( fabs(vec[1] - m_tpc_active_y_low) , fabs(vec[1] - m_tpc_active_y_high)); - double min_z = std::min( fabs(vec[2] - m_tpc_active_z_low) , fabs(vec[2] - m_tpc_active_z_high)); + double min_x = std::min( fabs(vec[0] - m_tpc_active_XMin) , fabs(vec[0] - m_tpc_active_XMax)); + double min_y = std::min( fabs(vec[1] - m_tpc_active_YMin) , fabs(vec[1] - m_tpc_active_YMax)); + double min_z = std::min( fabs(vec[2] - m_tpc_active_ZMin) , fabs(vec[2] - m_tpc_active_ZMax)); return ( (min_x& zpolygons){ - //TGeoManager *geom = new TGeoManager("save scb", "save scb"); - //cout << "size of " << zpolygons.size() << endl; - - //DEPRECIATED SHOULD NOT BE USED!!! - std::cout<<"ERROR ERROR ERROR DEPRECIATED DEPRECIATED. "<SetXY(ptX,ptY); - polyXY->FinishPolygon(); - zpolygons.push_back(polyXY); // Guanqun: not sure pushing pack pointers works as expect?? - } - //cout << "size of " < & vec){ - return isInSCB(0.0,vec); - } +// int SinglePhoton::isInSCB(std::vector & vec){ +// return isInSCB(0.0,vec); +// } int SinglePhoton::distToSCB(double & dist, std::vector &vec){ - //this one returns the distance to the boundary - bool ans = false; - double dist_yx = 999999; - - int iseg = 0; - if (!isInTPCActive(vec)){ - dist=-1; - return 0; // is it in active volume? - } - double cut = 0.0; - - TVector3 pt(&vec[0]); - - Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes - - Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); - polyXY->FinishPolygon(); - double testpt[2] = {pt.X(), pt.Y()}; - - //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; - - //polyXY->Draw(); - - Bool_t XY_contain = polyXY->Contains(testpt); - dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. - - if(0-116.5) y_idx = 0; //just the 0.5cm - if(y_idx<0 || y_idx>9) { - dist = -1; - delete polyXY; - return 0; - } - - Bool_t ZX_contain = false; - double arbit_out = 55555; - - double d_dist = -1; - - //upstream - if(z_idx==0){ - double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; - double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; - - TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); - polyXZ_Up->SetXY(ptX_Up,ptZ_Up); - polyXZ_Up->FinishPolygon(); - - double testpt_Up[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Up->Contains(testpt_Up); - d_dist = polyXZ_Up->Safety(testpt_Up,iseg); - delete polyXZ_Up; - - } - if (z_idx==10){ - double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; - double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; - - ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; - ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; - - TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); - polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); - polyXZ_Dw->FinishPolygon(); - - double testpt_Dw[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Dw->Contains(testpt_Dw); - d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); - delete polyXZ_Dw; - } - - delete polyXY; - - ans = XY_contain && ZX_contain; - ans ? dist = std::min(d_dist,min_y) : dist=-1; - - return (ans ? 1 : 0); + //CHECK! + dist = distToTPCActive( vec ); + return isInTPCActive( vec); + //NOT USE SCB YET, bring it back later! +// +// //this one returns the distance to the boundary +// bool ans = false; +// double dist_yx = 999999; +// +// int iseg = 0; +// if (!isInTPCActive(vec)){ +// dist=-1; +// return 0; // is it in active volume? +// } +// double cut = 0.0; +// +// TVector3 pt(&vec[0]); +// +// Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes +// +// Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); +// polyXY->FinishPolygon(); +// double testpt[2] = {pt.X(), pt.Y()}; +// +// //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; +// +// //polyXY->Draw(); +// +// Bool_t XY_contain = polyXY->Contains(testpt); +// dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. +// +// if(0-116.5) y_idx = 0; //just the 0.5cm +// if(y_idx<0 || y_idx>9) { +// dist = -1; +// delete polyXY; +// return 0; +// } +// +// Bool_t ZX_contain = false; +// double arbit_out = 55555; +// +// double d_dist = -1; +// +// //upstream +// if(z_idx==0){ +// double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; +// double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; +// +// TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); +// polyXZ_Up->SetXY(ptX_Up,ptZ_Up); +// polyXZ_Up->FinishPolygon(); +// +// double testpt_Up[2] = {pt.X(), pt.Z()}; +// ZX_contain = polyXZ_Up->Contains(testpt_Up); +// d_dist = polyXZ_Up->Safety(testpt_Up,iseg); +// delete polyXZ_Up; +// +// } +// if (z_idx==10){ +// double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; +// double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; +// +// ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; +// ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; +// +// TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); +// polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); +// polyXZ_Dw->FinishPolygon(); +// +// double testpt_Dw[2] = {pt.X(), pt.Z()}; +// ZX_contain = polyXZ_Dw->Contains(testpt_Dw); +// d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); +// delete polyXZ_Dw; +// } +// +// delete polyXY; +// +// ans = XY_contain && ZX_contain; +// ans ? dist = std::min(d_dist,min_y) : dist=-1; +// +// return (ans ? 1 : 0); } - int SinglePhoton::isInSCB(double cut, std::vector &vec){ - - if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? - TVector3 pt(&vec[0]); - - Int_t z_idx = (Int_t)pt.Z()/100; - - Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); - polyXY->FinishPolygon(); - double testpt[2] = {pt.X(), pt.Y()}; - - //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; - - //polyXY->Draw(); - - Bool_t XY_contain = polyXY->Contains(testpt); - - if(0-116.5) y_idx = 0; //just the 0.5cm - - if(y_idx<0 || y_idx>9) { - delete polyXY; - return 0; - } - - Bool_t ZX_contain = false; - - if(z_idx==0){ - double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; - double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; - - TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); - polyXZ_Up->SetXY(ptX_Up,ptZ_Up); - polyXZ_Up->FinishPolygon(); - - double testpt_Up[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Up->Contains(testpt_Up); - delete polyXZ_Up; - } - - else if (z_idx==10){ - double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; - double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; - - ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; - ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; - - TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); - polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); - polyXZ_Dw->FinishPolygon(); - - double testpt_Dw[2] = {pt.X(), pt.Z()}; - ZX_contain = polyXZ_Dw->Contains(testpt_Dw); - delete polyXZ_Dw; - } - - delete polyXY; - return (XY_contain && ZX_contain); - - } +// int SinglePhoton::isInSCB(double cut, std::vector &vec){ +// +// if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? +// TVector3 pt(&vec[0]); +// +// Int_t z_idx = (Int_t)pt.Z()/100; +// +// Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); +// polyXY->FinishPolygon(); +// double testpt[2] = {pt.X(), pt.Y()}; +// +// //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; +// +// //polyXY->Draw(); +// +// Bool_t XY_contain = polyXY->Contains(testpt); +// +// if(0-116.5) y_idx = 0; //just the 0.5cm +// +// if(y_idx<0 || y_idx>9) { +// delete polyXY; +// return 0; +// } +// +// Bool_t ZX_contain = false; +// +// if(z_idx==0){ +// double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; +// double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; +// +// TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); +// polyXZ_Up->SetXY(ptX_Up,ptZ_Up); +// polyXZ_Up->FinishPolygon(); +// +// double testpt_Up[2] = {pt.X(), pt.Z()}; +// ZX_contain = polyXZ_Up->Contains(testpt_Up); +// delete polyXZ_Up; +// } +// +// else if (z_idx==10){ +// double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; +// double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; +// +// ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; +// ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; +// +// TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); +// polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); +// polyXZ_Dw->FinishPolygon(); +// +// double testpt_Dw[2] = {pt.X(), pt.Z()}; +// ZX_contain = polyXZ_Dw->Contains(testpt_Dw); +// delete polyXZ_Dw; +// } +// +// delete polyXY; +// return (XY_contain && ZX_contain); +// +// } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h index ebabfa649..98a8e0a63 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h @@ -10,51 +10,6 @@ bool map_min_fn(const std::pair,double> p1, const std::pai namespace single_photon{ -void SinglePhoton::ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); - - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); - - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); - - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); -} - -void SinglePhoton::CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); - - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); - - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); - - - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); - - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); - -} - - /* Arguments to Function IsolationStudy (all are const): * 1. vector named tracks of art ptr to recob track * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h index c698ee336..5db9cfc4f 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h @@ -1,235 +1,5 @@ namespace single_photon { - - void SinglePhoton::ClearSecondShowers(){ - m_sss_num_unassociated_hits=0; - m_sss_num_unassociated_hits_below_threshold=0; - m_sss_num_associated_hits=0; - - m_sss_num_candidates = 0; - - m_sss_candidate_in_nu_slice.clear(); - m_sss_candidate_num_hits.clear(); - m_sss_candidate_num_wires.clear(); - m_sss_candidate_num_ticks.clear(); - m_sss_candidate_plane.clear(); - m_sss_candidate_PCA.clear(); - m_sss_candidate_mean_ADC.clear(); - m_sss_candidate_ADC_RMS.clear(); - m_sss_candidate_impact_parameter.clear(); - m_sss_candidate_fit_slope.clear(); - m_sss_candidate_veto_score.clear(); - m_sss_candidate_fit_constant.clear(); - m_sss_candidate_mean_tick.clear(); - m_sss_candidate_max_tick.clear(); - m_sss_candidate_min_tick.clear(); - m_sss_candidate_min_wire.clear(); - m_sss_candidate_max_wire.clear(); - m_sss_candidate_mean_wire.clear(); - m_sss_candidate_min_dist.clear(); - m_sss_candidate_wire_tick_based_length.clear(); - m_sss_candidate_energy.clear(); - m_sss_candidate_angle_to_shower.clear(); - m_sss_candidate_closest_neighbour.clear(); - m_sss_candidate_matched.clear(); - m_sss_candidate_matched_energy_fraction_best_plane.clear(); - m_sss_candidate_pdg.clear(); - m_sss_candidate_parent_pdg.clear(); - m_sss_candidate_trackid.clear(); - m_sss_candidate_true_energy.clear(); - m_sss_candidate_overlay_fraction.clear(); - m_sss_candidate_remerge.clear(); - } - - void SinglePhoton::ClearStubs(){ - m_trackstub_num_unassociated_hits = 0; - m_trackstub_unassociated_hits_below_threshold = 0; - m_trackstub_associated_hits=0; - m_trackstub_num_candidates=0; - m_trackstub_candidate_in_nu_slice.clear(); - m_trackstub_candidate_num_hits.clear(); - m_trackstub_candidate_num_wires.clear(); - m_trackstub_candidate_num_ticks.clear(); - m_trackstub_candidate_plane.clear(); - m_trackstub_candidate_PCA.clear(); - m_trackstub_candidate_mean_ADC.clear(); - m_trackstub_candidate_ADC_RMS.clear(); - m_trackstub_candidate_veto_score.clear(); - m_trackstub_candidate_mean_tick.clear(); - m_trackstub_candidate_max_tick.clear(); - m_trackstub_candidate_min_tick.clear(); - m_trackstub_candidate_min_wire.clear(); - m_trackstub_candidate_max_wire.clear(); - m_trackstub_candidate_mean_wire.clear(); - m_trackstub_candidate_min_dist.clear(); - m_trackstub_candidate_min_impact_parameter_to_shower.clear(); - m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); - m_trackstub_candidate_min_ioc_to_shower_start.clear(); - m_trackstub_candidate_ioc_based_length.clear(); - m_trackstub_candidate_wire_tick_based_length.clear(); - m_trackstub_candidate_mean_ADC_first_half.clear(); - m_trackstub_candidate_mean_ADC_second_half.clear(); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); - m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); - m_trackstub_candidate_linear_fit_chi2.clear(); - m_trackstub_candidate_energy.clear(); - m_trackstub_candidate_remerge.clear(); - m_trackstub_candidate_matched.clear(); - m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); - m_trackstub_candidate_pdg.clear(); - m_trackstub_candidate_parent_pdg.clear(); - m_trackstub_candidate_trackid.clear(); - m_trackstub_candidate_true_energy.clear(); - m_trackstub_candidate_overlay_fraction.clear(); - - m_trackstub_num_candidate_groups = 0; - m_grouped_trackstub_candidate_indices.clear(); - m_trackstub_candidate_group_timeoverlap_fraction.clear(); - } - - void SinglePhoton::ResizeSecondShowers(size_t size){ - - } - - - void SinglePhoton::CreateSecondShowerBranches(){ - vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); - vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); - - - vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); - vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); - vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); - vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); - vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); - vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); - vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); - vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); - - vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); - vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); - vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); - vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); - vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); - vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); - vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); - vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); - - - vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); - vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); - vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); - vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); - vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); - vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); - - vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); - vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); - vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); - vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); - vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); - vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); - - vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); - vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); - vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); - vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); - vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); - vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); - - } - - void SinglePhoton::CreateStubBranches(){ - - vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); - vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); - vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); - vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); - vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); - vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); - vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); - vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); - vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); - vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); - vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); - vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); - vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); - vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); - vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); - vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); - vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); - vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); - vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); - vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); - vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); - vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); - vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); - vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); - vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); - vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); - vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); - vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); - vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); - vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); - vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); - vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); - vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); - vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); - vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); - - - vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); - vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); - vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); - - } - - - - - TGraph* SinglePhoton::GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ std::vectort_wire; @@ -725,56 +495,22 @@ namespace single_photon //************************************************ Shower Search Slice Second SSS3D ********** / - void SinglePhoton::ClearSecondShowers3D(){ - - m_sss3d_num_showers = 0; - m_sss3d_shower_start_x.clear(); - m_sss3d_shower_start_y.clear(); - m_sss3d_shower_start_z.clear(); - m_sss3d_shower_dir_x.clear(); - m_sss3d_shower_dir_y.clear(); - m_sss3d_shower_dir_z.clear(); - m_sss3d_shower_length.clear(); - m_sss3d_shower_conversion_dist.clear(); - m_sss3d_shower_invariant_mass.clear(); - m_sss3d_shower_implied_invariant_mass.clear(); - m_sss3d_shower_impact_parameter.clear(); - m_sss3d_shower_energy_max.clear(); - m_sss3d_shower_score.clear(); - m_sss3d_slice_nu.clear(); - m_sss3d_slice_clear_cosmic.clear(); - m_sss3d_shower_ioc_ratio.clear(); - } - void SinglePhoton::CreateSecondShowerBranches3D(){ - vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); - - vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); - vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); - vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); - vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); - vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); - vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); - - vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); - vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); - vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); - vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); - vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); - vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); - vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); - vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); - //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); - //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); - } - void SinglePhoton::SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ + + + void SinglePhoton::SecondShowerSearch3D( + std::vector> & showers, + std::map, art::Ptr> & NormalShowerToPFParticleMap, + std::vector> & tracks, + std::map, + art::Ptr> & NormalTrackToPFParticleMap, + art::Event const & evt ){ std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" //Keng std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" - double max_conv_dist = 80.0; art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); std::vector> allShowerVector; @@ -811,7 +547,7 @@ namespace single_photon for(auto &shr: allShowerVector){ //lets look at 3D distance to "vertex", and only go further with things that are within 80cm [default] double dist = sqrt(pow(m_vertex_pos_x - shr->ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); - if(dist>max_conv_dist) continue; + if(dist>m_max_conv_dist) continue; auto pfp = showerToPFParticleMap[shr]; //for(auto &prr: allPFParticleVector){ diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index ec68b9f89..8a416b544 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,4 +1,5 @@ #include "SinglePhoton_module.h" +#include "Libraries/init_branches.h" #include "Libraries/reco_truth_matching.h" //#include "analyze_Template.h" #include "Libraries/analyze_OpFlashes.h" @@ -11,7 +12,7 @@ #include "Libraries/fiducial_volume.h" #include "Libraries/second_shower_search.h" #include "Libraries/isolation.h" - +#include "HelperFunctions/helper_connectors.h" //now it can use variables defined in singlephoton.h namespace single_photon { @@ -19,7 +20,7 @@ namespace single_photon //Constructor from .fcl parameters SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) { - std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<reconfigure(pset); //Set up some detector, timing, spacecharge and geometry services //Keng, grab theDetector and detClocks in each event. @@ -27,7 +28,7 @@ namespace single_photon // detClocks = lar::providerFrom(); SCE = lar::providerFrom();//Get space charge service geom = lar::providerFrom(); - std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<(); - for (auto const &cryo: geometry->IterateCryostats()) { - geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), - tend = geometry->end_TPC(cryo.ID()); - std::vector this_tpc_volumes; - while (iTPC != tend) { - geo::TPCGeo const& TPC = *iTPC; - this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); - iTPC++; - } - fTPCVolumes.push_back(std::move(this_tpc_volumes)); - } - - // then combine them into active volumes - for (const std::vector &tpcs: fTPCVolumes) { - m_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); - m_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); - m_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + std::cout<<"SinglePhoton::"<<__FUNCTION__<<" starts ------------------------------"<MaxX(); - m_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); - m_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); - std::cout<<"CHECK geo X:"<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<("PrintOut", false); - m_is_verbose = pset.get("Verbose",false); - m_is_data = pset.get("isData",false); - m_is_overlayed = pset.get("isOverlayed",false); - m_is_textgen = pset.get("isTextGen",false); + m_is_verbose = pset.get("Verbose",false); + m_is_data = pset.get("isData",false); + m_is_overlayed = pset.get("isOverlayed",false); + m_is_textgen = pset.get("isTextGen",false); //some specific additonal info, default not include - m_use_PID_algorithms = pset.get("usePID",false); - m_use_delaunay = pset.get("useDelaunay",false); - m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); + m_use_PID_algorithms = pset.get("usePID",false); + m_use_delaunay = pset.get("useDelaunay",false); + m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) m_fill_trees = pset.get("FillTrees",true); @@ -113,10 +89,10 @@ namespace single_photon m_flashLabel = pset.get("FlashLabel"); m_potLabel = pset.get ("POTLabel"); m_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); -//CHECK no such labels in sbnd? -//CHECK m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); - m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); - m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); +//KENG no such labels in sbnd? +//KENG m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); +//KENG m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); +//KENG m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); m_generatorLabel = pset.get ("GeneratorLabel","generator"); //KENG m_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); //KENG m_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); @@ -135,12 +111,12 @@ namespace single_photon // m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); //CRT related variables, should run only for RUN3+ enabled - m_runCRT = pset.get("runCRT",false); - m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); - m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); - m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); - m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_runCRT = pset.get("runCRT",false); + m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); + m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl // m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); //Some track calorimetry parameters @@ -150,13 +126,13 @@ namespace single_photon m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); //Some shower calorimetry parameters - m_work_function = pset.get("work_function"); - m_recombination_factor =pset.get("recombination_factor"); - m_gain_mc =pset.get>("gain_mc"); - m_gain_data =pset.get>("gain_data"); - m_wire_spacing = pset.get("wire_spacing"); - m_width_dqdx_box = pset.get("width_box"); - m_length_dqdx_box = pset.get("length_box"); + m_work_function = pset.get("work_function"); + m_recombination_factor = pset.get("recombination_factor"); + m_gain_mc = pset.get>("gain_mc"); + m_gain_data = pset.get>("gain_data"); + m_wire_spacing = pset.get("wire_spacing"); + m_width_dqdx_box = pset.get("width_box"); + m_length_dqdx_box = pset.get("length_box"); m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); //A seperate mode to run over AllPFPs and not just slice particles @@ -166,19 +142,20 @@ namespace single_photon //Some paramaters for counting protons & photons m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); + m_max_conv_dist = pset.get("convention_distance_cutoff", 999); m_mass_pi0_mev = 139.57; //SEAviwer Settings for shower clustering and proton stub finding //Have two sets: //Base SEAview is for Second Shower Veto - m_runSEAview = pset.get("runSEAviewShower", false); + m_runSEAview = pset.get("runSEAviewShower", false); m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); - m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); + m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); - m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); - m_SEAviewNumRecoShower = pset.get("SEAviewShowerNumRecoShower", -1); + m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); + m_SEAviewNumRecoShower= pset.get("SEAviewShowerNumRecoShower", -1); m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); // Second set is for Proton Stub finding @@ -186,9 +163,9 @@ namespace single_photon m_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); m_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); m_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); - m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); - m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); - m_SEAviewStubNumRecoShower = pset.get("SEAviewStubNumRecoShower", -1); + m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); + m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); + m_SEAviewStubNumRecoShower =pset.get("SEAviewStubNumRecoShower", -1); m_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); bool_make_sss_plots = true; @@ -214,7 +191,7 @@ namespace single_photon exit(0); } } - std::cout<<">>>> CHECK finish reconfigure() at line"<<__LINE__<()->DataFor(evt);//it is detinfo::DetectorClocksData auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData - std::cout<<"CHECK BEGINNING "<<__LINE__<ClearVertex(); + this->ClearMeta(); + this->ClearIsolation(); + this->ClearSecondShowers(); + this->ClearSecondShowers3D(); + this->ClearStubs(); + this->ClearFlashes(); + this->ClearTracks(); + this->ClearShowers(); + this->ClearMCTruths(); + this->ClearEventWeightBranches(); + fmcweight.clear(); + this->ClearGeant4Branches(); + this->ClearSlices(); + //Some event based properties m_subrun_counts++; @@ -271,8 +260,12 @@ namespace single_photon // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); - std::vector> hitVector; - art::fill_ptr_vector(hitVector,hitHandle); +// std::vector> hitVector; +// art::fill_ptr_vector(hitVector,hitHandle); + recob::Hit dummy_hit; + std::vector> hitVector = VectorFromLabel( dummy_hit, evt, m_hitfinderLabel); + //CHECK, how useful are the above lines? + //Lets do "THE EXACT SAME STUFF" for Optical Flashes art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); @@ -367,28 +360,30 @@ namespace single_photon } //---------Kalman Track Showers - art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); - std::map, art::Ptr> pfParticlesToShowerKalmanMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ - pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); - } - } +//CHECK art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); + //CHECK this label is not available in sbnd? use an alternative now; +// std::cout<<"Getting Kalman label "<, art::Ptr> pfParticlesToShowerKalmanMap; +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// auto pfp = pfParticleVector[i]; +// if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ +// pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); +// } +// } //----- kalmon Cali - art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); - std::vector> kalmanTrackVector; - art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); - - art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); - std::map,std::vector>> kalmanTrackToCaloMap; - for(size_t i=0; i< kalmanTrackVector.size(); ++i){ - auto trk = kalmanTrackVector[i]; - if(cali_per_kalmantrack.at(trk.key()).size()!=0){ - kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); - } - } +//CHECK art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); +// std::vector> kalmanTrackVector; +// art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); +// +// art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); +// std::map,std::vector>> kalmanTrackToCaloMap; +// for(size_t i=0; i< kalmanTrackVector.size(); ++i){ +// auto trk = kalmanTrackVector[i]; +// if(cali_per_kalmantrack.at(trk.key()).size()!=0){ +// kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); +// } +// } // Test ground for some slice stuff, dont have it run automatically, ignore for now, mark if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< nu_scores; bool isSelectedSlice = false; int primaries = 0; @@ -436,22 +439,27 @@ namespace single_photon if (pfp->IsPrimary()) { primaries++; - primary_pdg = (pfp->PdgCode()); - } - } + primary_pdg = (pfp->PdgCode()); + } + } + std::cout<0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<0){ + double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); + if(mean!=nu_scores.front()){ + std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap, trigger_offset(detClocks), theDetector); -//CHECK, not KalmanShowers in SBND? -// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); +//KENG no KalmanShowers in SBND? +// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); //Some misc things thrown in here rather than in a proper helper function. TODO. fix @@ -1482,15 +1486,8 @@ namespace single_photon } } - - - //---------------------- END OF LOOP, fill vertex --------------------- - - - - //CHECK - std::cout<<"CHECK! Filling in Pi0 events with MicroBooNE TPC dimensinos "<Fill(); } - //Rest the vertex after filling - this->ClearVertex(); - +// this->ClearMeta(); if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; @@ -1526,24 +1521,19 @@ namespace single_photon art::ServiceHandle tfs;//output ROOT - vertex_tree = tfs->make("vertex_tree", "vertex_tree"); + run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); + true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); pot_tree = tfs->make("pot_tree", "pot_tree"); + eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); - run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); geant4_tree = tfs->make("geant4_tree","geant4_tree"); + vertex_tree = tfs->make("vertex_tree", "vertex_tree"); //run_subrun_tree, reset some POT m_run = 0; m_subrun = 0; m_subrun_pot = 0; - run_subrun_tree->Branch("run",&m_run,"run/I"); - run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); - run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); - run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); - - true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); - true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); // --------------------- POT Releated variables ----------------- m_number_of_events = 0; @@ -1554,47 +1544,7 @@ namespace single_photon m_number_of_events_in_subrun=0; - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); - - // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); - - vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); - vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); - vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); - - - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); - - vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); - vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); - - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); - - // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); - vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); - vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); - vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); - vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); - vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); - + this->CreateMetaBranches(); //create branches as found in individual analyze_XXX.h this->CreateIsolationBranches(); this->CreateSecondShowerBranches(); @@ -1602,11 +1552,12 @@ namespace single_photon this->CreateStubBranches(); this->CreateFlashBranches(); this->CreateShowerBranches(); - this->CreateSliceBranches(); this->CreateMCTruthBranches(); + this->CreateTrackBranches(); + this->CreateEventWeightBranches(); + this->CreateSliceBranches(); this->CreateGeant4Branches(); - this->CreateTrackBranches(); //CHECK, remove bad chanel related varaibles? & ub dependent path //hardcode some info (TODO change) // std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; @@ -1688,7 +1639,6 @@ namespace single_photon } } } - std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<Fill(); return true; } @@ -1750,476 +1699,10 @@ namespace single_photon out_stream.close(); } pot_tree->Fill(); - } - //------------------------------------------------------------------------------------------- - void SinglePhoton::ClearVertex(){ - //Clears and resets all output verticies in TTree - - //------------ Event related Variables ------------- - m_event_number = -99; - m_subrun_number = -99; - m_run_number = -99; - m_test_matched_hits = 0; - - m_pot_per_event = 0; - m_pot_per_subrun = m_subrun_pot; - m_number_of_events_in_subrun = 0; - - m_genie_spline_weight = 1.0; - - //------------ Vertex related Variables ------------- - m_reco_vertex_size = 0; - m_vertex_pos_x=-99999; - m_vertex_pos_y=-99999; - m_vertex_pos_z=-99999; - m_vertex_pos_tick=-9999; - m_vertex_pos_wire_p0=-9999; - m_vertex_pos_wire_p1=-9999; - m_vertex_pos_wire_p2=-9999; - m_reco_vertex_in_SCB = -9999; - m_reco_vertex_dist_to_SCB = -9999; - m_reco_vertex_dist_to_active_TPC= -9999; - - m_reco_vertex_to_nearest_dead_wire_plane0=-99999; - m_reco_vertex_to_nearest_dead_wire_plane1=-99999; - m_reco_vertex_to_nearest_dead_wire_plane2=-99999; - - m_reco_slice_objects = 0; - - this->ClearIsolation(); - this->ClearSecondShowers(); - this->ClearSecondShowers3D(); - this->ClearStubs(); - this->ClearFlashes(); - this->ClearTracks(); - this->ClearShowers(); - this->ClearMCTruths(); - this->ClearEventWeightBranches(); - fmcweight.clear(); - this->ClearGeant4Branches(); - this->ClearSlices(); - - } - - - - //----------------------------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------------------------- - void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"()\t||\t Starting to analyze recob::Vertex\n"; - int n_vert =0; - - //std::cout<<"There are "<second; - if (!vertexVector.empty()) - { - if (vertexVector.size() !=1) - std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; - - const art::Ptr vertex = *(vertexVector.begin()); - double xyz[3] = {0.0, 0.0, 0.0} ; - vertex->XYZ(xyz); - - n_vert++; - - m_vertex_pos_x = xyz[0]; - m_vertex_pos_y = xyz[1]; - m_vertex_pos_z = xyz[2]; - std::cout<<"CHECK Vertex position: ("< tmp = {xyz[0],xyz[1],xyz[2]}; - m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); -//CHECK -// if(!m_run_pi0_filter){ -// m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// } - - }else{ - throw art::Exception(art::errors::StdException) - << " Pandor did not have an associated vertex for a particle. "; -// << " Error: vertexVector associated with this particle is empty " << "\n"; - - } - } - - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) - { - const art::Ptr pParticle(pfParticleHandle, i); - // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) - { - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - } - - - - //Classify PFParticles into crParticles or nuParticles. - void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles, size_t fpfp_w_bestnuID ) - { - if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\tSort out PFPParticles."< pParticle(it->second); - - // Only look for primary particles - if (!pParticle->IsPrimary()) continue; - primaries++; - - - // Check if this particle is identified as the neutrino - const int pdg(pParticle->PdgCode()); -// const bool isNeutrino = (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - //CHECK - bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); - //const bool isNeutrino = (std::abs(pdg) == 14 ); - - - // If it is, lets get the vertex position - if(isNeutrino){ - if(found>0){ - std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not expected as in MicroBooNE but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<Self() == fpfp_w_bestnuID){ - std::cout<<"Take this PFParticle's vertex as event vertex, bc of it has highest nu score"<GetVertex(pfParticlesToVerticesMap, pParticle ); - } - } - - // All non-neutrino primary particles are reconstructed under the cosmic hypothesis - if (!isNeutrino) - { - crParticles.push_back(pParticle); - continue; - } - - // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. - // If this is not the case please handle accordingly -//CHECK if (!nuParticles.empty()) -// { -// throw cet::exception("SinglePhoton") << " This event contains "<Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - nuParticles.push_back(pfParticleMap.at(daughterId)); - } - } - std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\t Found "< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - - - // Get the associations between PFParticles and tracks/showers from the event - art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); - art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); - - //if running over the neutrino slice only - if (m_run_all_pfps == false){ - for (const art::Ptr &pParticle : particles) { - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - } - } else{ //if running over all slices - std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; - - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - - } - } - - - } - - void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - - const unsigned int nTracks(associatedTracks.size()); - const unsigned int nShowers(associatedShowers.size()); - - - // Check if the PFParticle has no associated tracks or showers - if (nTracks == 0 && nShowers == 0) - { - // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; - return; - } - - // Check if there is an associated track - if (nTracks == 1 && nShowers == 0) - { - - tracks.push_back(associatedTracks.front()); - trackToNuPFParticleMap[tracks.back()]= pParticle; - //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); - - } - - - - - - int SinglePhoton::spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input){ - corrected.resize(3); - -//CHECK double kx = input[0]; - double ky = input[1]; - double kz = input[2]; -//CHECK -// auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - // CHECK - // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - // double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = 0;//CHECK scecorr.Y(); - double zOffset = 0;//CHECK scecorr.Z(); - - corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & mcparticle, std::vector & corrected){ - corrected.resize(3); - - double kx = mcparticle->Vx(); - double ky = mcparticle->Vy(); - double kz = mcparticle->Vz(); - -//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - //double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = 0;//CHECK scecorr.Y(); - double zOffset = 0;//CHECK scecorr.Z(); - - corrected[0]= kx;//CHECK- scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & corrected){ - corrected.resize(3); - //Space Charge Effect! functionize this soon. - double kx = mcparticle.Vx(); - double ky = mcparticle.Vy(); - double kz = mcparticle.Vz(); -//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - corrected[0]=kx;//CHECK - scecorr.X() +xtimeoffset+0.6; - corrected[1]=ky;//CHECK + scecorr.Y(); - corrected[2]=kz;//CHECK + scecorr.Z(); - return 0; - } - - void SinglePhoton::CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr > & MCParticleToTrackIdMap) - { - - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; - - art::Handle< std::vector< simb::MCParticle> > theParticles; - evt.getByLabel(label, theParticles); - - if (!theParticles.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; - } - - art::FindOneP theTruthAssns(theParticles, evt, label); - - for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) - { - const art::Ptr particle(theParticles, i); - const art::Ptr truth(theTruthAssns.at(i)); - truthToParticles[truth].push_back(particle); - particlesToTruth[particle] = truth; - MCParticleToTrackIdMap[particle->TrackId()] = particle; - } - - std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) - { - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; - - art::Handle< std::vector > theSimChannels; - evt.getByLabel(label, theSimChannels); - - if (!theSimChannels.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; - } - - for (unsigned int i = 0; i < theSimChannels->size(); ++i) - { - const art::Ptr channel(theSimChannels, i); - simChannelVector.push_back(channel); - } - } - - - void SinglePhoton::BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap) - { - std::vector< art::Ptr > simChannelVector; - std::map< art::Ptr, std::vector> > truthToParticles; - std::map< art::Ptr, art::Ptr > particlesToTruth; - std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; - - this->CollectSimChannels(evt, label, simChannelVector); - this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); -// CHECK - //Collect the links from reconstructed hits to their true energy deposits. - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); - //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); - - - } - - bool SinglePhoton::Pi0PreselectionFilter() - { - - if(m_vertex_pos_x < m_XMin|| m_vertex_pos_x > m_XMax) return false; - if(m_vertex_pos_y < m_YMin || m_vertex_pos_y > m_YMax) return false; - if(m_vertex_pos_z < m_ZMin|| m_vertex_pos_z > m_ZMax) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=1) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_conversion_distance.size()!=2) return false; - if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; - - return true; - } - - - - bool SinglePhoton::Pi0PreselectionFilter2g0p() - { - - if(m_vertex_pos_x < m_XMin|| m_vertex_pos_x > m_XMax) return false; - if(m_vertex_pos_y < m_YMin || m_vertex_pos_y > m_YMax) return false; - if(m_vertex_pos_z < m_ZMin|| m_vertex_pos_z > m_ZMax) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=0) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_energy_max.size()!=2) return false; - //if the maximum energy of all showers on all planes is smaller than 30 - if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; - - return true; - } - - bool SinglePhoton::IsEventInList(int run, int subrun, int event){ - if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ - if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ - if(m_selected_set.find({run}) == m_selected_set.end()) - return false; - } - } - return true; - } } //namespace diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 788078314..799c7e79d 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -95,7 +95,7 @@ #include #include -#include "HelperFunctions/helper_functions.h" +#include "HelperFunctions/helper_math.h" //#include "Libraries/Atlas.h" //#include "Libraries/bad_channel_matching.h" @@ -247,7 +247,8 @@ namespace single_photon /** * @brief: reset/clear data members */ - void ClearVertex(); + void ClearMeta(); + void CreateMetaBranches(); /** * @brief Produce a mapping from PFParticle ID to the art ptr to the PFParticle itself for fast navigation * @@ -305,19 +306,15 @@ namespace single_photon */ void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); - void CollectCalo(const art::Event &evt,const art::Ptr &shower); + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ /* *@brief Calculated the shower energy by looping over all the hits and summing the charge *@param hits - an art pointer of all the hits in a shower - * */ + * + */ double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ - double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ - - int getNHitsPlane(std::vector> hits, int this_plane); - double getMeanHitWidthPlane(std::vector> hits, int this_plane); - /** *@brief Takes a hit and multiplies the charge by the gain @@ -326,13 +323,17 @@ namespace single_photon **/ double GetQHit(art::Ptr thishitptr, int plane); + + int getNHitsPlane(std::vector> hits, int this_plane); + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + /** * @brief Calculate the E value in MeV for a given hit * @param thishit - an individual hit * * * */ - double QtoEConversionHit(art::Ptr thishitptr, int plane); /** * @brief Calculate the E value in MeV from a given Q value @@ -370,16 +371,13 @@ namespace single_photon *@param plane - a single plane * */ double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - TVector3 getWireVec(int plane); /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir); /* dot product of wire_dir and shower direction vectors */ - double getAnglewrtWires(TVector3 shower_dir, int plane); /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ - int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + /* returns (generally) best median dEdx of all 3 + * planes, usually plane 2 */ + double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); + /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); - double degToRad(double deg); - double radToDeg(double rad); /** *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction *@param cluster_start - the start position of a cluster in CM @@ -406,14 +404,6 @@ namespace single_photon * */ bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - double areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3); - - /*** - *@brief returns the value at the median position in a vector of doubles, returns nan for vector of size <= 0 - *@param thisvector - vector of doubles - * - * */ - double getMedian(std::vector thisvector); //---------------- Templatees ---------------------------- @@ -540,28 +530,35 @@ namespace single_photon TGraph proton_length2energy_tgraph; //---------------- Showers ---------------------------- - - void AnalyzeShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, std::vector>> & pfParticleToHitMap,std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, - std::map, art::Ptr> &PFPtoShowerReco3DMap, - double samplerate, + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + + void AnalyzeShowers( + const std::vector>& showers, + std::map, + art::Ptr> & showerToPFParticleMap, + std::map, std::vector>> & pfParticleToHitMap, + std::map, std::vector> > & pfParticleToClusterMap, + std::map, std::vector> > & clusterToHitMap , + std::map& sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool> &PFPToNuSliceMap, + std::map,double> &PFPToTrackScoreMap, + PFParticleIdMap &pfParticleMap, + std::map, art::Ptr>& PFPtoShowerReco3DMap, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ); + + void AnalyzeKalmanShowers( + const std::vector>& showers, + std::map,art::Ptr> &showerToPFParticleMap, + std::map,art::Ptr> & pfParticlesToShowerKalmanMap, + std::map,std::vector>>& kalmanTrackToCaloMap, + std::map, std::vector>> & pfParticleToHitMap, detinfo::DetectorPropertiesData const & theDetector); - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - void AnalyzeKalmanShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, - std::map,art::Ptr> & pfptotrkmap, - std::map,std::vector>> & trktocalomap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector); - - void RecoMCShowers(const std::vector>& showers, std::map,art::Ptr> & showerToPFParticleMap, std::map, art::Ptr > & showerToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector); /** * @brief: match showers to MCParticles @@ -586,47 +583,58 @@ namespace single_photon /* tranverse through mcParticleVector, and print out infos for photons */ int photoNuclearTesting(std::vector>& mcParticleVector); - // ------------ Fid Volume and SCB------------------------- // - double m_tpc_active_x_low; - double m_tpc_active_x_high; - double m_tpc_active_y_low; - double m_tpc_active_y_high; - double m_tpc_active_z_low ; - double m_tpc_active_z_high; - - double m_SCB_YX_TOP_y1_array; - std::vector m_SCB_YX_TOP_x1_array; - std::vector m_SCB_YX_TOP_y2_array; - double m_SCB_YX_TOP_x2_array; - double m_SCB_YX_BOT_y1_array; - std::vector m_SCB_YX_BOT_x1_array; - std::vector m_SCB_YX_BOT_y2_array; - double m_SCB_YX_BOT_x2_array; - - double m_SCB_ZX_Up_z1_array ; - double m_SCB_ZX_Up_x1_array ; - double m_SCB_ZX_Up_z2_array ; - double m_SCB_ZX_Up_x2_array ; - - double m_SCB_ZX_Dw_z1_array; - std::vector m_SCB_ZX_Dw_x1_array; - std::vector m_SCB_ZX_Dw_z2_array; - double m_SCB_ZX_Dw_x2_array; - - int isInTPCActive(std::vector&); /* if point is in active TPC volume */ - int isInTPCActive(double cut,std::vector&); + //KENG Geometry dimensions; Fiducial volume and SCB (no SCB yet?) + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + double m_tpc_active_XMin; + double m_tpc_active_YMin; + double m_tpc_active_ZMin; + double m_tpc_active_XMax; + double m_tpc_active_YMax; + double m_tpc_active_ZMax; + + int setTPCGeom(); + int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ double distToTPCActive(std::vector&vec); + int distToSCB(double & dist, std::vector &vec); /* if point in active TPC, returns distance from point to closest TPC wall * otherwise, returns -999 */ - int isInSCB(std::vector&); /* if point is inside SCB */ - int isInSCB(double cut,std::vector&); - int distToSCB(double & dist, std::vector &vec); + + // ------------ Fid Volume and SCB------------------------- // +//CHECK, no SCB stuff yet; +// double m_tpc_active_x_low; +// double m_tpc_active_x_high; +// double m_tpc_active_y_low; +// double m_tpc_active_y_high; +// double m_tpc_active_z_low ; +// double m_tpc_active_z_high; +// +// double m_SCB_YX_TOP_y1_array; +// std::vector m_SCB_YX_TOP_x1_array; +// std::vector m_SCB_YX_TOP_y2_array; +// double m_SCB_YX_TOP_x2_array; +// double m_SCB_YX_BOT_y1_array; +// std::vector m_SCB_YX_BOT_x1_array; +// std::vector m_SCB_YX_BOT_y2_array; +// double m_SCB_YX_BOT_x2_array; +// +// double m_SCB_ZX_Up_z1_array ; +// double m_SCB_ZX_Up_x1_array ; +// double m_SCB_ZX_Up_z2_array ; +// double m_SCB_ZX_Up_x2_array ; +// +// double m_SCB_ZX_Dw_z1_array; +// std::vector m_SCB_ZX_Dw_x1_array; +// std::vector m_SCB_ZX_Dw_z2_array; +// double m_SCB_ZX_Dw_x2_array; + + + //Fiducial stuff? +// int isInSCB(std::vector&); /* if point is inside SCB */ +// int isInSCB(double cut,std::vector&); /* calc the minimum distance from point to the SC boundary,save to dist. * return value (0, or 1) indicates whether the point is in SCB */ - int setTPCGeom(); - /* This function is wrong, and Not used */ - bool loadSCB_YX(std::vector&zpolygons); //---------------- MCTruths ---------------------------- @@ -683,9 +691,7 @@ namespace single_photon //-------------- Slices/Pandora Metadata ---------------// void ClearSlices(); /* reset and clear variables/vectors related to slice */ void ResizeSlices(size_t size); /* resize vectors related to slice */ - //void ResizeMatchedSlices(size_t size_shower ,size_t size_track); void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - //void CreateMatchedSliceBranches(); /** @@ -840,16 +846,7 @@ namespace single_photon // std::string m_badChannelProducer; // std::string m_mcTrackLabel; // std::string m_mcShowerLabel; - //Geometry dimensions; - std::vector> fTPCVolumes; - std::vector fActiveVolumes; - double m_XMin; - double m_YMin; - double m_ZMin; - double m_XMax; - double m_YMax; - double m_ZMax; - + std::string m_pidLabel; ///< For PID stuff @@ -860,7 +857,7 @@ namespace single_photon bool m_use_PID_algorithms; bool m_use_delaunay; - int m_delaunay_max_hits; + int m_delaunay_max_hits; bool m_is_verbose; bool m_print_out_event; bool m_is_data; // value provided by pset @@ -908,6 +905,8 @@ namespace single_photon std::string m_DAQHeaderProducer;//"daq" std::ofstream out_stream; + //SSS parameters + double m_max_conv_dist; double m_mass_pi0_mev; double m_exiting_photon_energy_threshold ; diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 4bdd33eea..b458adfa1 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -12,8 +12,8 @@ singlephoton_analyzer:{ FlashLabel: "opflashtpc0" POTLabel: "generator" - ShowerTrackFitter: "pandoraTrack" - ShowerTrackFitterCalo: "pandoraCalo" + #ShowerTrackFitter: "pandoraTrack" + #ShowerTrackFitterCalo: "pandoraCalo" Shower3DLabel: "pandoraShower" input_param: "optional" @@ -53,12 +53,13 @@ singlephoton_analyzer:{ gain_mc: [235.5, 249.7, 237.6] #ubDocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 gain_data: [230.3, 237.6, 243.7] #see above docdb wire_spacing : 0.3 - width_box : 1. + width_box : 1. #2d dEdx is calcualted with a box of 1cmx4cm length_box : 4. truthmatching_signaldef : "ncdelta" runAllPFPs: "false" exiting_photon_energy: 0.02 + convention_distance_cutoff: 80.0 exiting_proton_energy: 0.978 #40Mev + proton mass runCRT: "false" diff --git a/ups/product_deps b/ups/product_deps index 39427b9a7..7b8daafef 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -34,9 +34,9 @@ fwdir product_dir scripts # Add the dependent product and version product version -larsoft v09_48_01 -sbnobj v09_13_11 -sbnanaobj v09_18_02 +larsoft v09_44_00 +sbnobj v09_13_05 +sbnanaobj v09_17_12 sbndaq_artdaq_core v1_00_00of2 genie_xsec v3_00_04a sbndata v01_03 From 8de241cd552e367ad908003277799bc8722f1254 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Sat, 11 Jun 2022 17:20:11 -0500 Subject: [PATCH 20/54] forgot to add files --- .../HelperFunctions/helper_connectors.h | 453 ++++ .../HelperFunctions/helper_math.h | 239 ++ .../Libraries/init_branches.h | 2148 +++++++++++++++++ 3 files changed, 2840 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/init_branches.h diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h new file mode 100644 index 000000000..b2e304dc7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h @@ -0,0 +1,453 @@ +namespace single_photon +{ + //--------------------- a template to get vectors from labels ------------------------- + //1. Scratch from Handle, and return a equivalently useful vector. + // Sample usage: + // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; + // recob::Hit dummy_hit;//This is to specify the template; + // std::vector> hitVector = VectorFromLabel(dummy_hit, evt, m_hitfinderLabel); + + template //A helper template that allows you to make compliated types. + struct temporary_types{ + using type1 = std::vector>; + using type2 = art::ValidHandle>; + using type3 = std::vector; + }; + + template //ref_type is only used to identify the temporary_types late. + typename temporary_types::type1 VectorFromLabel(recob_object ref_type, const art::Event &evt, std::string &label){ + + typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); + typename temporary_types::type1 Vector; + art::fill_ptr_vector(Vector,Handle); + return Vector; + } + + //--------------------- a template to get vectors from labels ------------------------- + //-------- Only use this once for now, potentially 13+ more lines can be saved -------- + + +//----------- Below are migrated from Singlephoton_module.cc + void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ + + if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"()\t||\t Starting to analyze recob::Vertex\n"; + int n_vert =0; + + //std::cout<<"There are "<second; + if (!vertexVector.empty()) + { + if (vertexVector.size() !=1) + std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; + + const art::Ptr vertex = *(vertexVector.begin()); + double xyz[3] = {0.0, 0.0, 0.0} ; + vertex->XYZ(xyz); + + n_vert++; + + m_vertex_pos_x = xyz[0]; + m_vertex_pos_y = xyz[1]; + m_vertex_pos_z = xyz[2]; + std::cout<<"CHECK Vertex position: ("< tmp = {xyz[0],xyz[1],xyz[2]}; + m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); +//CHECK +// if(!m_run_pi0_filter){ +// m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); +// } + + }else{ + throw art::Exception(art::errors::StdException) + << " Pandor did not have an associated vertex for a particle. "; +// << " Error: vertexVector associated with this particle is empty " << "\n"; + + } + } + + if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) + { + const art::Ptr pParticle(pfParticleHandle, i); + // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) + { + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + } + + + + //Classify PFParticles into crParticles or nuParticles. + void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles, size_t fpfp_w_bestnuID ) + { + if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\tSort out PFPParticles."< pParticle(it->second); + + // Only look for primary particles + if (!pParticle->IsPrimary()) continue; + primaries++; + + + // Check if this particle is identified as the neutrino + const int pdg(pParticle->PdgCode()); +// const bool isNeutrino = (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); + //CHECK + bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); + //const bool isNeutrino = (std::abs(pdg) == 14 ); + + + // If it is, lets get the vertex position + if(isNeutrino){ + if(found>0){ + std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not expected as in MicroBooNE but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<Self() == fpfp_w_bestnuID){ + std::cout<<"Take this PFParticle's vertex as event vertex, bc of it has highest nu score"<GetVertex(pfParticlesToVerticesMap, pParticle ); + } + } + + // All non-neutrino primary particles are reconstructed under the cosmic hypothesis + if (!isNeutrino) + { + crParticles.push_back(pParticle); + continue; + } + + // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. + // If this is not the case please handle accordingly +//CHECK if (!nuParticles.empty()) +// { +// throw cet::exception("SinglePhoton") << " This event contains "<Daughters()) + { + if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + + nuParticles.push_back(pfParticleMap.at(daughterId)); + } + } + std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\t Found "< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + // Get the associations between PFParticles and tracks/showers from the event + art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + + //if running over the neutrino slice only + if (m_run_all_pfps == false){ + for (const art::Ptr &pParticle : particles) { + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + } + } else{ //if running over all slices + std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; + + const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); + const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); + + FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + } + } + } + + + + void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + { + + const unsigned int nTracks(associatedTracks.size()); + const unsigned int nShowers(associatedShowers.size()); + + + // Check if the PFParticle has no associated tracks or showers + if (nTracks == 0 && nShowers == 0) + { + // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; + return; + } + + // Check if there is an associated track + if (nTracks == 1 && nShowers == 0) + { + + tracks.push_back(associatedTracks.front()); + trackToNuPFParticleMap[tracks.back()]= pParticle; + //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); + + } + + + + + + int SinglePhoton::spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input){ + corrected.resize(3); + +//CHECK double kx = input[0]; + double ky = input[1]; + double kz = input[2]; +//CHECK +// auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + // CHECK + // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + +//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + // double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); + + corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & mcparticle, std::vector & corrected){ + corrected.resize(3); + + double kx = mcparticle->Vx(); + double ky = mcparticle->Vy(); + double kz = mcparticle->Vz(); + +//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + +//CHECK double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + //double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); + + corrected[0]= kx;//CHECK- scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & corrected){ + corrected.resize(3); + //Space Charge Effect! functionize this soon. + double kx = mcparticle.Vx(); + double ky = mcparticle.Vy(); + double kz = mcparticle.Vz(); +//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); +//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + +//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + corrected[0]=kx;//CHECK - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky;//CHECK + scecorr.Y(); + corrected[2]=kz;//CHECK + scecorr.Z(); + return 0; + } + + void SinglePhoton::CollectMCParticles( + const art::Event &evt, + const std::string &label, + std::map< art::Ptr, std::vector>> &truthToParticles, + std::map< art::Ptr, art::Ptr> &particlesToTruth, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(label, theParticles); + + if (!theParticles.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, label); + + for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) + { + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + truthToParticles[truth].push_back(particle); + particlesToTruth[particle] = truth; + MCParticleToTrackIdMap[particle->TrackId()] = particle; + } + + std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) + { + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + + art::Handle< std::vector > theSimChannels; + evt.getByLabel(label, theSimChannels); + + if (!theSimChannels.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; + } + + for (unsigned int i = 0; i < theSimChannels->size(); ++i) + { + const art::Ptr channel(theSimChannels, i); + simChannelVector.push_back(channel); + } + } + + + void SinglePhoton::BuildMCParticleHitMaps( + const art::Event &evt, + const std::string &label, + const std::vector> &hitVector, + std::map< art::Ptr, std::vector > > &particlesToHits, + std::map< art::Ptr, art::Ptr > &hitsToParticles, + const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + std::vector< art::Ptr > simChannelVector; + std::map< art::Ptr, std::vector> > truthToParticles; + std::map< art::Ptr, art::Ptr > particlesToTruth; + std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; + + this->CollectSimChannels(evt, label, simChannelVector); + this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); +// CHECK + //Collect the links from reconstructed hits to their true energy deposits. + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); + //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + + + } + + bool SinglePhoton::Pi0PreselectionFilter() + { + + if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; + if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; + if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=1) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_conversion_distance.size()!=2) return false; + if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; + + return true; + } + + + + bool SinglePhoton::Pi0PreselectionFilter2g0p() + { + if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; + if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; + if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=0) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_energy_max.size()!=2) return false; + //if the maximum energy of all showers on all planes is smaller than 30 + if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; + + return true; + } + + bool SinglePhoton::IsEventInList(int run, int subrun, int event){ + if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ + if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ + if(m_selected_set.find({run}) == m_selected_set.end()) + return false; + } + } + return true; + } + +//----------- Above are migrated from Singlephoton_module.cc + + +} diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h new file mode 100644 index 000000000..5879869f2 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -0,0 +1,239 @@ +namespace single_photon +{ +//-----------------HELPER FUNCTIONS ----------- + //CHECK Copy from bad_channel_matching.h + ////line between x1 and x2, point x0; + double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + return sqrt(d2); + } + + // minimum distance between point and dead wire + double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + const geo::GeometryCore * geom, + std::vector> & bad_channel_list_fixed_mcc9 ){ + + double min_dist = 999999; + + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int channel = bad_channel_list_fixed_mcc9[i].first; + int is_ok = bad_channel_list_fixed_mcc9[i].second; + if(is_ok>1)continue; + + auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel + auto result = geom->WireEndPoints(wireids[0]); + + //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + std::vector end = {0.0,result.end().Y(),result.end().Z()}; + std::vector point = {0.0,Ypoint,Zpoint}; + double dist = dist_line_point(start,end,point); + min_dist = std::min(dist,min_dist); + } + + return min_dist; + + } + +//--------------- end of copying from bad_channel_matching.h + + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); + + } + + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; + + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + + } + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); + + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + } + + + + // sort indices in descending order + template + std::vector sort_indexes(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + + return idx; + } + + // sort indices such that elements in v are in ascending order + template + std::vector sort_indexes_rev(const std::vector &v) { + + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); + + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); + + return idx; + } + + + // check if two vectors have same elements (regardless of the order), and arrange their elements in order + template + bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + return v1 == v2; + } + + + + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } + +/* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + TVector3 getWireVec(int plane){ + TVector3 wire_dir; + if (plane == 0){ + wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; + } else if (plane == 1){ + wire_dir = {0., sqrt(3) / 2., 1 / 2.}; + } else if (plane == 2) { + wire_dir = {0., 0., 1.}; + } + return wire_dir; + } + + /* dot product of wire_dir and shower direction vectors */ + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ + return wire_dir.Dot(shower_dir); + } + + /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + double getAnglewrtWires(TVector3 shower_dir,int plane){ + + TVector3 wire_dir = getWireVec(plane); + double cos_theta = getCoswrtWires(shower_dir, wire_dir); + + double theta = acos(cos_theta); + // return abs(theta); + return abs(M_PI/2 - theta); + + } + + double degToRad(double deg){ return deg * M_PI/180; } + double radToDeg(double rad){ return rad * 180/M_PI; } + + double getMedian(std::vector thisvector){ + size_t len = thisvector.size(); + if(len < 1) return NAN; + + std::sort(thisvector.begin(), thisvector.end()); + if(len % 2 != 0){//even - return average of two at median + return 0.5*(thisvector[len/2]+thisvector[len/2+1]); + }else{//odd - return the median + return thisvector[len/2]; + } + } +// //So return median if odd, average of median in even, if size==0, return the point. +// +// //here the size corresponds to the max index +// +// int size = thisvector.size() - 1; +// //if no entries, return nonsense value +// if (size < 0) return NAN; +// if (size==0) return thisvector[size]; +// +// //find index of median location +// double median; +// if (size%2 == 0){ // if vector has odd elements +// int ind = size/2; +// median = thisvector[ind]; +// } else{ // if vector has even number of elements +// int ind1 = size/2; +// int ind2 = size/2-1; +// median = (thisvector[ind1]+thisvector[ind2])/2.0; +// } +// +// //return the value at median index +// return median; +// } + +// double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ +// +// double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); +// return time; +// } + + +//----------- END OF HELPER FUNCTIONS ----------- +} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h new file mode 100644 index 000000000..46d8cc026 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -0,0 +1,2148 @@ +//how about intialize all branches in one place; +namespace single_photon +{ + //Process of initialize branches: + //ClearBranches, ResizeBranches, CreateBranches + + void SinglePhoton::ClearMeta(){ + //------------ Event related Variables ------------- + m_event_number = -99; + m_subrun_number = -99; + m_run_number = -99; + m_test_matched_hits = 0; + + m_pot_per_event = 0; + m_pot_per_subrun = m_subrun_pot; + m_number_of_events_in_subrun = 0; + + m_genie_spline_weight = 1.0; + + //------------ Vertex related Variables ------------- + m_reco_vertex_size = 0; + m_vertex_pos_x=-99999; + m_vertex_pos_y=-99999; + m_vertex_pos_z=-99999; + m_vertex_pos_tick=-9999; + m_vertex_pos_wire_p0=-9999; + m_vertex_pos_wire_p1=-9999; + m_vertex_pos_wire_p2=-9999; + m_reco_vertex_in_SCB = -9999; + m_reco_vertex_dist_to_SCB = -9999; + m_reco_vertex_dist_to_active_TPC= -9999; + + m_reco_vertex_to_nearest_dead_wire_plane0=-99999; + m_reco_vertex_to_nearest_dead_wire_plane1=-99999; + m_reco_vertex_to_nearest_dead_wire_plane2=-99999; + + m_reco_slice_objects = 0; + } + + + void SinglePhoton::CreateMetaBranches(){ + + //true_eventweight_tree + true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); + + //run_subrun_tree + run_subrun_tree->Branch("run",&m_run,"run/I"); + run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); + run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); + run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + + //pot_tree + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + //vertex_tree -- part of it + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); + vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); + vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + + vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); + vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); + vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); + vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); + vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); + vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); + vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + } + + //isolation.h + void SinglePhoton::ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); + } + + void SinglePhoton::CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + + } + + //second_shower_search.h + void SinglePhoton::ClearSecondShowers(){ + m_sss_num_unassociated_hits=0; + m_sss_num_unassociated_hits_below_threshold=0; + m_sss_num_associated_hits=0; + + m_sss_num_candidates = 0; + + m_sss_candidate_in_nu_slice.clear(); + m_sss_candidate_num_hits.clear(); + m_sss_candidate_num_wires.clear(); + m_sss_candidate_num_ticks.clear(); + m_sss_candidate_plane.clear(); + m_sss_candidate_PCA.clear(); + m_sss_candidate_mean_ADC.clear(); + m_sss_candidate_ADC_RMS.clear(); + m_sss_candidate_impact_parameter.clear(); + m_sss_candidate_fit_slope.clear(); + m_sss_candidate_veto_score.clear(); + m_sss_candidate_fit_constant.clear(); + m_sss_candidate_mean_tick.clear(); + m_sss_candidate_max_tick.clear(); + m_sss_candidate_min_tick.clear(); + m_sss_candidate_min_wire.clear(); + m_sss_candidate_max_wire.clear(); + m_sss_candidate_mean_wire.clear(); + m_sss_candidate_min_dist.clear(); + m_sss_candidate_wire_tick_based_length.clear(); + m_sss_candidate_energy.clear(); + m_sss_candidate_angle_to_shower.clear(); + m_sss_candidate_closest_neighbour.clear(); + m_sss_candidate_matched.clear(); + m_sss_candidate_matched_energy_fraction_best_plane.clear(); + m_sss_candidate_pdg.clear(); + m_sss_candidate_parent_pdg.clear(); + m_sss_candidate_trackid.clear(); + m_sss_candidate_true_energy.clear(); + m_sss_candidate_overlay_fraction.clear(); + m_sss_candidate_remerge.clear(); + } + + void SinglePhoton::ClearSecondShowers3D(){ + + m_sss3d_num_showers = 0; + m_sss3d_shower_start_x.clear(); + m_sss3d_shower_start_y.clear(); + m_sss3d_shower_start_z.clear(); + m_sss3d_shower_dir_x.clear(); + m_sss3d_shower_dir_y.clear(); + m_sss3d_shower_dir_z.clear(); + m_sss3d_shower_length.clear(); + m_sss3d_shower_conversion_dist.clear(); + m_sss3d_shower_invariant_mass.clear(); + m_sss3d_shower_implied_invariant_mass.clear(); + m_sss3d_shower_impact_parameter.clear(); + m_sss3d_shower_energy_max.clear(); + m_sss3d_shower_score.clear(); + m_sss3d_slice_nu.clear(); + m_sss3d_slice_clear_cosmic.clear(); + m_sss3d_shower_ioc_ratio.clear(); + } + + void SinglePhoton::ClearStubs(){ + m_trackstub_num_unassociated_hits = 0; + m_trackstub_unassociated_hits_below_threshold = 0; + m_trackstub_associated_hits=0; + m_trackstub_num_candidates=0; + m_trackstub_candidate_in_nu_slice.clear(); + m_trackstub_candidate_num_hits.clear(); + m_trackstub_candidate_num_wires.clear(); + m_trackstub_candidate_num_ticks.clear(); + m_trackstub_candidate_plane.clear(); + m_trackstub_candidate_PCA.clear(); + m_trackstub_candidate_mean_ADC.clear(); + m_trackstub_candidate_ADC_RMS.clear(); + m_trackstub_candidate_veto_score.clear(); + m_trackstub_candidate_mean_tick.clear(); + m_trackstub_candidate_max_tick.clear(); + m_trackstub_candidate_min_tick.clear(); + m_trackstub_candidate_min_wire.clear(); + m_trackstub_candidate_max_wire.clear(); + m_trackstub_candidate_mean_wire.clear(); + m_trackstub_candidate_min_dist.clear(); + m_trackstub_candidate_min_impact_parameter_to_shower.clear(); + m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); + m_trackstub_candidate_min_ioc_to_shower_start.clear(); + m_trackstub_candidate_ioc_based_length.clear(); + m_trackstub_candidate_wire_tick_based_length.clear(); + m_trackstub_candidate_mean_ADC_first_half.clear(); + m_trackstub_candidate_mean_ADC_second_half.clear(); + m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); + m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); + m_trackstub_candidate_linear_fit_chi2.clear(); + m_trackstub_candidate_energy.clear(); + m_trackstub_candidate_remerge.clear(); + m_trackstub_candidate_matched.clear(); + m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); + m_trackstub_candidate_pdg.clear(); + m_trackstub_candidate_parent_pdg.clear(); + m_trackstub_candidate_trackid.clear(); + m_trackstub_candidate_true_energy.clear(); + m_trackstub_candidate_overlay_fraction.clear(); + + m_trackstub_num_candidate_groups = 0; + m_grouped_trackstub_candidate_indices.clear(); + m_trackstub_candidate_group_timeoverlap_fraction.clear(); + } + + void SinglePhoton::CreateSecondShowerBranches(){ + vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); + vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); + + + vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); + vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); + vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); + vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); + vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); + vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); + vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); + vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); + + vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); + vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); + vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); + vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); + vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); + vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); + vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); + vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); + + + vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); + vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); + vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); + vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); + vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); + vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); + + vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); + vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); + vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); + vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); + vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); + vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); + + vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); + vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); + vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); + vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); + vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); + vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + + } + + void SinglePhoton::CreateSecondShowerBranches3D(){ + vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); + + vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); + vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); + vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); + vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); + vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); + vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); + + vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); + vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); + vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); + vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); + vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); + vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); + vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); + vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); + //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); + //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + } + + void SinglePhoton::CreateStubBranches(){ + + vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); + vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); + vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); + vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); + vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); + vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); + vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); + vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); + vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); + vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); + vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); + vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); + vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); + vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); + vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); + vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); + vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); + vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); + vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); + vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); + vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); + vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); + vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); + vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); + vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); + vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); + vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); + vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); + vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); + vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); + vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); + + + vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); + vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + + } + + void SinglePhoton::ResizeSecondShowers(size_t size){} + + //analyze_OpFlashes.h + void SinglePhoton::ClearFlashes(){ + m_reco_num_flashes =0; + m_reco_num_flashes_in_beamgate =0; + m_reco_flash_total_pe.clear(); + m_reco_flash_time.clear(); + m_reco_flash_time_width.clear(); + m_reco_flash_abs_time.clear(); + m_reco_flash_frame.clear(); + m_reco_flash_ycenter.clear(); + m_reco_flash_ywidth.clear(); + m_reco_flash_zcenter.clear(); + m_reco_flash_zwidth.clear(); + m_reco_flash_total_pe_in_beamgate.clear(); + m_reco_flash_time_in_beamgate.clear(); + m_reco_flash_ycenter_in_beamgate.clear(); + m_reco_flash_zcenter_in_beamgate.clear(); + m_CRT_veto_nhits = -999; + m_CRT_veto_hit_PE.clear(); + m_CRT_min_hit_time = -999; + m_CRT_min_hit_PE = -999; + m_CRT_min_hit_x = -999; + m_CRT_min_hit_y = -999; + m_CRT_min_hit_z = -999; + m_CRT_hits_time.clear(); + m_CRT_hits_PE.clear(); + m_CRT_hits_x.clear(); + m_CRT_hits_y.clear(); + m_CRT_hits_z.clear(); + m_CRT_dt = -999; + + } + + void SinglePhoton::CreateFlashBranches(){ + vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + } + + void SinglePhoton::ResizeFlashes(size_t size){ + m_reco_flash_total_pe.resize(size); + m_reco_flash_time.resize(size); + m_reco_flash_time_width.resize(size); + m_reco_flash_abs_time.resize(size); + m_reco_flash_frame.resize(size); + m_reco_flash_ycenter.resize(size); + m_reco_flash_ywidth.resize(size); + m_reco_flash_zcenter.resize(size); + m_reco_flash_zwidth.resize(size); + m_reco_flash_total_pe_in_beamgate.resize(size); + m_reco_flash_time_in_beamgate.resize(size); + m_reco_flash_ycenter_in_beamgate.resize(size); + m_reco_flash_zcenter_in_beamgate.resize(size); + m_CRT_veto_hit_PE.resize(size); + + m_CRT_hits_time.resize(size); + m_CRT_hits_PE.resize(size); + m_CRT_hits_x.resize(size); + m_CRT_hits_y.resize(size); + m_CRT_hits_z.resize(size); + } + + //analyze_Tracks.h + void SinglePhoton::ClearTracks(){ + m_reco_asso_tracks=0; + m_reco_track_length.clear(); + m_reco_track_num_daughters.clear(); + m_reco_track_daughter_trackscore.clear(); + m_reco_track_dirx.clear(); + m_reco_track_diry.clear(); + m_reco_track_dirz.clear(); + m_reco_track_startx.clear(); + m_reco_track_starty.clear(); + m_reco_track_startz.clear(); + m_reco_track_endx.clear(); + m_reco_track_endy.clear(); + m_reco_track_endz.clear(); + m_reco_track_end_dist_to_active_TPC.clear(); + m_reco_track_start_dist_to_active_TPC.clear(); + m_reco_track_end_dist_to_SCB.clear(); + m_reco_track_start_dist_to_SCB.clear(); + m_reco_track_end_in_SCB.clear(); + m_reco_track_start_in_SCB.clear(); + + m_reco_track_theta_yz.clear(); + m_reco_track_phi_yx.clear(); + + m_reco_track_calo_energy_plane0.clear(); + m_reco_track_calo_energy_plane1.clear(); + m_reco_track_calo_energy_plane2.clear(); + m_reco_track_calo_energy_max.clear(); + + m_reco_track_num_trajpoints.clear(); + m_reco_track_num_spacepoints.clear(); + m_reco_track_proton_kinetic_energy.clear(); + m_reco_track_ordered_energy_index.clear(); + m_reco_track_ordered_displacement_index.clear(); + + m_reco_track_spacepoint_principal0.clear(); + m_reco_track_spacepoint_principal1.clear(); + m_reco_track_spacepoint_principal2.clear(); + + m_reco_track_spacepoint_chi.clear(); + m_reco_track_spacepoint_max_dist.clear(); + + m_reco_track_best_calo_plane.clear(); + + m_reco_track_mean_dEdx_best_plane.clear(); + m_reco_track_mean_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_dEdx_end_half_best_plane.clear(); + m_reco_track_good_calo_best_plane.clear(); + m_reco_track_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + m_reco_track_trunc_PIDA_best_plane.clear(); + m_reco_track_resrange_best_plane.clear(); + m_reco_track_dEdx_best_plane.clear(); + + + m_reco_track_mean_dEdx_p0.clear(); + m_reco_track_mean_dEdx_start_half_p0.clear(); + m_reco_track_mean_dEdx_end_half_p0.clear(); + m_reco_track_good_calo_p0.clear(); + m_reco_track_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + m_reco_track_trunc_PIDA_p0.clear(); + m_reco_track_resrange_p0.clear(); + m_reco_track_dEdx_p0.clear(); + + m_reco_track_mean_dEdx_p1.clear(); + m_reco_track_mean_dEdx_start_half_p1.clear(); + m_reco_track_mean_dEdx_end_half_p1.clear(); + m_reco_track_good_calo_p1.clear(); + m_reco_track_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + m_reco_track_trunc_PIDA_p1.clear(); + m_reco_track_resrange_p1.clear(); + m_reco_track_dEdx_p1.clear(); + + m_reco_track_mean_dEdx_p2.clear(); + m_reco_track_mean_dEdx_start_half_p2.clear(); + m_reco_track_mean_dEdx_end_half_p2.clear(); + m_reco_track_good_calo_p2.clear(); + m_reco_track_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + m_reco_track_trunc_PIDA_p2.clear(); + m_reco_track_resrange_p2.clear(); + m_reco_track_dEdx_p2.clear(); + + m_reco_track_num_calo_hits_p1.clear(); + m_reco_track_num_calo_hits_p0.clear(); + m_reco_track_num_calo_hits_p2.clear(); + + m_sim_track_matched.clear(); + m_sim_track_overlay_fraction.clear(); + m_sim_track_energy.clear(); + m_sim_track_kinetic_energy.clear(); + m_sim_track_mass.clear(); + m_sim_track_pdg.clear(); + m_sim_track_origin.clear(); + m_sim_track_parent_pdg.clear(); + m_sim_track_process.clear(); + m_sim_track_startx.clear(); + m_sim_track_starty.clear(); + m_sim_track_startz.clear(); + m_sim_track_endx.clear(); + m_sim_track_endy.clear(); + m_sim_track_endz.clear(); + m_sim_track_length.clear(); + + m_sim_track_px.clear(); + m_sim_track_py.clear(); + m_sim_track_pz.clear(); + m_sim_track_trackID.clear(); + + // PID + m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + m_reco_track_pid_chi2_mu_plane0.clear(); + m_reco_track_pid_chi2_mu_plane1.clear(); + m_reco_track_pid_chi2_mu_plane2.clear(); + m_reco_track_pid_chi2_p_plane0.clear(); + m_reco_track_pid_chi2_p_plane1.clear(); + m_reco_track_pid_chi2_p_plane2.clear(); + m_reco_track_pid_pida_plane0.clear(); + m_reco_track_pid_pida_plane1.clear(); + m_reco_track_pid_pida_plane2.clear(); + m_reco_track_pid_three_plane_proton_pid.clear(); + + m_reco_track_end_to_nearest_dead_wire_plane0.clear(); + m_reco_track_end_to_nearest_dead_wire_plane1.clear(); + m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + m_reco_track_sliceId.clear(); + m_reco_track_nuscore.clear(); + m_reco_track_isclearcosmic.clear(); + m_reco_track_trackscore.clear(); + m_reco_track_pfparticle_pdg.clear(); + m_reco_track_is_nuslice.clear(); + + m_sim_track_sliceId.clear(); + m_sim_track_nuscore.clear(); + m_sim_track_isclearcosmic.clear(); + } + + void SinglePhoton::CreateTrackBranches(){ + vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); + vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); + vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); + vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); + vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); + + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); + vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); + vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); + vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + vertex_tree->Branch("sim_track_px",&m_sim_track_px); + vertex_tree->Branch("sim_track_py",&m_sim_track_py); + vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); + vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); + vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); + vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); + vertex_tree->Branch("sim_track_length",&m_sim_track_length); + + vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + } + + void SinglePhoton::ResizeTracks(size_t size){ + m_reco_track_length.resize(size); + m_reco_track_dirx.resize(size); + m_reco_track_num_daughters.resize(size); + m_reco_track_daughter_trackscore.resize(size); + + m_reco_track_diry.resize(size); + m_reco_track_dirz.resize(size); + m_reco_track_endx.resize(size); + m_reco_track_endy.resize(size); + m_reco_track_endz.resize(size); + m_reco_track_end_dist_to_active_TPC.resize(size); + m_reco_track_start_dist_to_active_TPC.resize(size); + m_reco_track_end_dist_to_SCB.resize(size); + m_reco_track_start_dist_to_SCB.resize(size); + m_reco_track_end_in_SCB.resize(size); + m_reco_track_start_in_SCB.resize(size); + + m_reco_track_calo_energy_plane0.resize(size); + m_reco_track_calo_energy_plane1.resize(size); + m_reco_track_calo_energy_plane2.resize(size); + m_reco_track_calo_energy_max.resize(size); + + + + m_reco_track_startx.resize(size); + m_reco_track_starty.resize(size); + m_reco_track_startz.resize(size); + m_reco_track_num_trajpoints.resize(size); + m_reco_track_num_spacepoints.resize(size); + m_reco_track_proton_kinetic_energy.resize(size); + m_reco_track_ordered_energy_index.resize(size); + m_reco_track_ordered_displacement_index.resize(size); + + + m_reco_track_spacepoint_principal0.resize(size); + m_reco_track_spacepoint_principal1.resize(size); + m_reco_track_spacepoint_principal2.resize(size); + + m_reco_track_spacepoint_chi.resize(size); + m_reco_track_spacepoint_max_dist.resize(size); + + m_reco_track_theta_yz.resize(size); + m_reco_track_phi_yx.resize(size); + + m_reco_track_best_calo_plane.resize(size); + + m_reco_track_mean_dEdx_best_plane.resize(size); + m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + m_reco_track_good_calo_best_plane.resize(size); + m_reco_track_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + m_reco_track_trunc_PIDA_best_plane.resize(size); + m_reco_track_resrange_best_plane.resize(size); + m_reco_track_dEdx_best_plane.resize(size); + + + m_reco_track_mean_dEdx_p0.resize(size); + m_reco_track_mean_dEdx_start_half_p0.resize(size); + m_reco_track_mean_dEdx_end_half_p0.resize(size); + m_reco_track_good_calo_p0.resize(size); + m_reco_track_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + m_reco_track_trunc_PIDA_p0.resize(size); + m_reco_track_resrange_p0.resize(size); + m_reco_track_dEdx_p0.resize(size); + + m_reco_track_mean_dEdx_p1.resize(size); + m_reco_track_mean_dEdx_start_half_p1.resize(size); + m_reco_track_mean_dEdx_end_half_p1.resize(size); + m_reco_track_good_calo_p1.resize(size); + m_reco_track_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + m_reco_track_trunc_PIDA_p1.resize(size); + m_reco_track_resrange_p1.resize(size); + m_reco_track_dEdx_p1.resize(size); + + m_reco_track_mean_dEdx_p2.resize(size); + m_reco_track_mean_dEdx_start_half_p2.resize(size); + m_reco_track_mean_dEdx_end_half_p2.resize(size); + m_reco_track_good_calo_p2.resize(size); + m_reco_track_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + m_reco_track_trunc_PIDA_p2.resize(size); + m_reco_track_resrange_p2.resize(size); + m_reco_track_dEdx_p2.resize(size); + + m_reco_track_num_calo_hits_p1.resize(size); + m_reco_track_num_calo_hits_p0.resize(size); + m_reco_track_num_calo_hits_p2.resize(size); + + + + m_sim_track_matched.resize(size); + m_sim_track_energy.resize(size); + m_sim_track_mass.resize(size); + m_sim_track_kinetic_energy.resize(size); + m_sim_track_pdg.resize(size); + m_sim_track_parent_pdg.resize(size); + m_sim_track_origin.resize(size); + m_sim_track_process.resize(size); + m_sim_track_startx.resize(size); + m_sim_track_starty.resize(size); + m_sim_track_startz.resize(size); + m_sim_track_endx.resize(size); + m_sim_track_endy.resize(size); + m_sim_track_endz.resize(size); + m_sim_track_length.resize(size); + + m_sim_track_px.resize(size); + m_sim_track_py.resize(size); + m_sim_track_pz.resize(size); + m_sim_track_trackID.resize(size); + m_sim_track_overlay_fraction.resize(size); + + m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + m_reco_track_pid_chi2_mu_plane0.resize(size); + m_reco_track_pid_chi2_mu_plane1.resize(size); + m_reco_track_pid_chi2_mu_plane2.resize(size); + m_reco_track_pid_chi2_p_plane0.resize(size); + m_reco_track_pid_chi2_p_plane1.resize(size); + m_reco_track_pid_chi2_p_plane2.resize(size); + m_reco_track_pid_pida_plane0.resize(size); + m_reco_track_pid_pida_plane1.resize(size); + m_reco_track_pid_pida_plane2.resize(size); + m_reco_track_pid_three_plane_proton_pid.resize(size); + + m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + m_reco_track_sliceId.resize(size); + m_reco_track_nuscore.resize(size); + m_reco_track_isclearcosmic.resize(size); + m_reco_track_trackscore.resize(size); + m_reco_track_pfparticle_pdg.resize(size); + m_reco_track_is_nuslice.resize(size); + + m_sim_track_sliceId.resize(size); + m_sim_track_nuscore.resize(size); + m_sim_track_isclearcosmic.resize(size); + } + + //analyze_Shower.h + void SinglePhoton::ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_SCB.clear(); + m_reco_shower_start_in_SCB.clear(); + m_reco_shower_end_dist_to_active_TPC.clear(); + m_reco_shower_end_dist_to_SCB.clear(); + + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + + m_reco_shower_reclustered_energy_plane0.clear(); + m_reco_shower_reclustered_energy_plane1.clear(); + m_reco_shower_reclustered_energy_plane2.clear(); + m_reco_shower_reclustered_energy_max.clear(); + + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + m_reco_shower_plane0_meanRMS.clear(); + m_reco_shower_plane1_meanRMS.clear(); + m_reco_shower_plane2_meanRMS.clear(); + + m_reco_shower_hit_tick.clear(); + m_reco_shower_hit_wire.clear(); + m_reco_shower_hit_plane.clear(); + m_reco_shower_spacepoint_x.clear(); + m_reco_shower_spacepoint_y.clear(); + m_reco_shower_spacepoint_z.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + + m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + m_reco_shower_pfparticle_pdg.clear(); + + } + + void SinglePhoton::CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); + vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); + vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); + + + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); + vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); + vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); + + vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); + vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); + vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); + vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); + + vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); + vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); + vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); + + vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); + vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); + vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void SinglePhoton::ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower_reclustered_energy_plane0.resize(size); + m_reco_shower_reclustered_energy_plane1.resize(size); + m_reco_shower_reclustered_energy_plane2.resize(size); + m_reco_shower_reclustered_energy_max.resize(size); + + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_SCB.resize(size); + m_reco_shower_start_in_SCB.resize(size); + + m_reco_shower_end_dist_to_active_TPC.resize(size); + m_reco_shower_end_dist_to_SCB.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + m_reco_shower_plane0_meanRMS.resize(size); + m_reco_shower_plane1_meanRMS.resize(size); + m_reco_shower_plane2_meanRMS.resize(size); + + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + + m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + m_reco_shower_pfparticle_pdg.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + } + + //analyze_MCTruth.h + void SinglePhoton::ClearMCTruths(){ + m_mctruth_num = 0; + m_mctruth_origin = -99; + m_mctruth_mode = -99; + m_mctruth_interaction_type = -99; + m_mctruth_nu_vertex_x = -9999; + m_mctruth_nu_vertex_y = -9999; + m_mctruth_nu_vertex_z = -9999; + m_mctruth_reco_vertex_dist = -9999; + m_mctruth_ccnc = -99; + m_mctruth_qsqr = -99; + m_mctruth_nu_E = -99; + m_mctruth_nu_pdg = 0; + m_mctruth_lepton_pdg = 0; + m_mctruth_num_daughter_particles = -99; + m_mctruth_daughters_pdg.clear(); + m_mctruth_daughters_E.clear(); + + m_mctruth_daughters_status_code.clear(); + m_mctruth_daughters_trackID.clear(); + m_mctruth_daughters_mother_trackID.clear(); + m_mctruth_daughters_px.clear(); + m_mctruth_daughters_py.clear(); + m_mctruth_daughters_pz.clear(); + m_mctruth_daughters_startx.clear(); + m_mctruth_daughters_starty.clear(); + m_mctruth_daughters_startz.clear(); + m_mctruth_daughters_time.clear(); + m_mctruth_daughters_endx.clear(); + m_mctruth_daughters_endy.clear(); + m_mctruth_daughters_endz.clear(); + m_mctruth_daughters_endtime.clear(); + m_mctruth_daughters_process.clear(); + m_mctruth_daughters_end_process.clear(); + + + m_mctruth_is_delta_radiative = 0; + m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + m_mctruth_delta_photon_energy=-999; + m_mctruth_delta_proton_energy=-999; + m_mctruth_delta_neutron_energy=-999; + + m_mctruth_num_exiting_photons =0; + m_mctruth_num_exiting_protons =0; + m_mctruth_num_exiting_pi0 =0; + m_mctruth_num_exiting_pipm =0; + m_mctruth_num_exiting_neutrons=0; + m_mctruth_num_exiting_delta0=0; + m_mctruth_num_exiting_deltapm=0; + m_mctruth_num_exiting_deltapp=0; + + m_mctruth_num_reconstructable_protons = 0; + + m_mctruth_is_reconstructable_1g1p = 0; + m_mctruth_is_reconstructable_1g0p = 0; + + m_mctruth_leading_exiting_proton_energy = -9999; + + m_mctruth_exiting_pi0_E.clear(); + m_mctruth_exiting_pi0_mom.clear(); + m_mctruth_exiting_pi0_px.clear(); + m_mctruth_exiting_pi0_py.clear(); + m_mctruth_exiting_pi0_pz.clear(); + + m_mctruth_pi0_leading_photon_energy = -9999; + m_mctruth_pi0_subleading_photon_energy = -9999; + m_mctruth_pi0_leading_photon_end_process = "none"; + m_mctruth_pi0_subleading_photon_end_process = "none"; + m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_exiting_TPC = -999; + m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + m_mctruth_exiting_delta0_num_daughters.clear(); + + m_mctruth_exiting_photon_mother_trackID.clear(); + m_mctruth_exiting_photon_trackID.clear(); + m_mctruth_exiting_photon_from_delta_decay.clear(); + m_mctruth_exiting_photon_energy.clear(); + m_mctruth_exiting_photon_px.clear(); + m_mctruth_exiting_photon_py.clear(); + m_mctruth_exiting_photon_pz.clear(); + + m_mctruth_exiting_proton_mother_trackID.clear(); + m_mctruth_exiting_proton_trackID.clear(); + m_mctruth_exiting_proton_from_delta_decay.clear(); + m_mctruth_exiting_proton_energy.clear(); + m_mctruth_exiting_proton_px.clear(); + m_mctruth_exiting_proton_py.clear(); + m_mctruth_exiting_proton_pz.clear(); + + m_mctruth_exiting_neutron_mother_trackID.clear(); + m_mctruth_exiting_neutron_trackID.clear(); + m_mctruth_exiting_neutron_from_delta_decay.clear(); + m_mctruth_exiting_neutron_energy.clear(); + m_mctruth_exiting_neutron_px.clear(); + m_mctruth_exiting_neutron_py.clear(); + m_mctruth_exiting_neutron_pz.clear(); + } + + void SinglePhoton::CreateMCTruthBranches(){ + vertex_tree->Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); + vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); + vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); + vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); + vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); + vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); + vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); + vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); + vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); + vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); + vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); + vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); + vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); + vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); + vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); + vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); + + + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); + vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); + vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); + vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); + vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); + + vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); + vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); + vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); + vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); + + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); + vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); + vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); + vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); + vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); + vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void SinglePhoton::ResizeMCTruths(size_t size){ + m_mctruth_daughters_pdg.resize(size); + m_mctruth_daughters_E.resize(size); + m_mctruth_daughters_status_code.resize(size); + m_mctruth_daughters_trackID.resize(size); + m_mctruth_daughters_mother_trackID.resize(size); + m_mctruth_daughters_px.resize(size); + m_mctruth_daughters_py.resize(size); + m_mctruth_daughters_pz.resize(size); + m_mctruth_daughters_startx.resize(size); + m_mctruth_daughters_starty.resize(size); + m_mctruth_daughters_startz.resize(size); + m_mctruth_daughters_time.resize(size); + m_mctruth_daughters_endx.resize(size); + m_mctruth_daughters_endy.resize(size); + m_mctruth_daughters_endz.resize(size); + m_mctruth_daughters_endtime.resize(size); + m_mctruth_daughters_end_process.resize(size); + m_mctruth_daughters_process.resize(size); + } + + //analyze_EventWeight.h + void SinglePhoton::ClearEventWeightBranches(){ + m_mcflux_nu_pos_x=-9999; + m_mcflux_nu_pos_y=-9999; + m_mcflux_nu_pos_z=-9999; + m_mcflux_nu_mom_x=-9999; + m_mcflux_nu_mom_y=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_E=-9999; + m_mcflux_ntype=0; + m_mcflux_ptype=0; + m_mcflux_nimpwt=-9999; + m_mcflux_dk2gen=-9999; + m_mcflux_nenergyn=-9999; + m_mcflux_tpx=-9999; + m_mcflux_tpy=-9999; + m_mcflux_tpz=-9999; + m_mcflux_vx=-9999; + m_mcflux_vy=-9999; + m_mcflux_vz=-9999; + m_mcflux_tptype=0; + m_mctruth_nparticles=0; + /* + // m_mctruth_particles_track_ID[]; + // m_mctruth_particles_pdg_code[]; + // m_mctruth_particles_mother[]; + // m_mctruth_particles_status_code[]; + // m_mctruth_particles_num_daughters[]; //other similar variables + // m_mctruth_particles_daughters[]; + //m_mctruth_particles_Gvx.clear(); + //m_mctruth_particles_Gvy.clear(); + m_mctruth_particles_Gvz.clear(); + m_mctruth_particles_Gvt.clear(); + m_mctruth_particles_px0.clear(); + m_mctruth_particles_py0.clear(); + m_mctruth_particles_pz0.clear(); + m_mctruth_particles_e0.clear(); + //int m_mctruth_particles_rescatter.clear(); + m_mctruth_particles_polx.clear(); + m_mctruth_particles_poly.clear(); + m_mctruth_particles_polz.clear(); + + //int m_mctruth_neutrino_CCNC; + //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars + //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" + int m_mctruth_neutrino_target.clear(); + int m_mctruth_neutrino_nucleon.clear(); + int m_mctruth_neutrino_quark.clear(); + m_mctruth_neutrino_w.clear(); + m_mctruth_neutrino_x.clear(); + m_mctruth_neutrino_y.clear(); + */ + //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" + m_gtruth_is_sea_quark=false; + m_gtruth_tgt_pdg=0; + m_gtruth_tgt_Z = -9999; + m_gtruth_tgt_A = -9999; + m_gtruth_tgt_p4_x = -9999; + m_gtruth_tgt_p4_y = -9999; + m_gtruth_tgt_p4_z = -9999; + m_gtruth_tgt_p4_E = -9999; + m_gtruth_weight=-9999; + m_gtruth_probability=-9999; + m_gtruth_xsec=-9999; + m_gtruth_diff_xsec=-9999; + m_gtruth_gphase_space=-9999; + m_gtruth_vertex_x=-9999; + m_gtruth_vertex_y=-9999; + m_gtruth_vertex_z=-9999; + m_gtruth_vertex_T=-9999; + m_gtruth_gscatter=-9999; + m_gtruth_gint=-9999; + m_gtruth_res_num=-9999; + m_gtruth_num_piplus=-9999; + m_gtruth_num_pi0=-9999; + m_gtruth_num_piminus=-9999; + m_gtruth_num_proton=-9999; + m_gtruth_num_neutron=-9999; + m_gtruth_is_charm=false; + m_gtruth_is_strange=false; + m_gtruth_charm_hadron_pdg = -9999; + m_gtruth_strange_hadron_pdg = -9999; + m_gtruth_decay_mode = -9999; + m_gtruth_gx=-9999; + m_gtruth_gy=-9999; + m_gtruth_gy=-9999; + m_gtruth_gt=-9999; + m_gtruth_gw=-9999; + m_gtruth_gQ2=-9999; + m_gtruth_gq2=-9999; + m_gtruth_probe_pdg=0; + m_gtruth_probe_p4_x=-9999; + m_gtruth_probe_p4_y=-9999; + m_gtruth_probe_p4_z=-9999; + m_gtruth_probe_p4_E=-9999; + m_gtruth_hit_nuc_p4_x=-9999; + m_gtruth_hit_nuc_p4_y=-9999; + m_gtruth_hit_nuc_p4_z=-9999; + m_gtruth_hit_nuc_p4_E=-9999; + m_gtruth_hit_nuc_pos=-9999; + m_gtruth_fs_had_syst_p4_x=-9999; + m_gtruth_fs_had_syst_p4_y=-9999; + m_gtruth_fs_had_syst_p4_z=-9999; + m_gtruth_fs_had_syst_p4_E=-9999; + } + + void SinglePhoton::CreateEventWeightBranches(){ + //-----------------run info + eventweight_tree->Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); + eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); + eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); + eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); + eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); + eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); + eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); + eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); + eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + } + + //analyze_Geant4.h + void SinglePhoton::ClearGeant4Branches(){ + + m_geant4_pdg.clear(); + m_geant4_trackid.clear(); + m_geant4_mother.clear(); + m_geant4_statuscode.clear(); + m_geant4_E.clear(); + m_geant4_mass.clear(); + m_geant4_px.clear(); + m_geant4_py.clear(); + m_geant4_pz.clear(); + m_geant4_dx.clear(); + m_geant4_dy.clear(); + m_geant4_dz.clear(); + + m_geant4_vx.clear(); + m_geant4_vy.clear(); + m_geant4_vz.clear(); + m_geant4_process.clear(); + m_geant4_end_process.clear(); + + m_geant4_costheta.clear(); + } + + void SinglePhoton::CreateGeant4Branches(){ + geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_geant4_px); + geant4_tree->Branch("geant4_py", &m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_geant4_process); + } + + //analyze_Slice.h + void SinglePhoton::ClearSlices(){ + m_reco_slice_num = 0; + m_reco_slice_nuscore.clear(); + m_matched_signal_shower_overlay_fraction.clear(); + //std::vector m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + + void SinglePhoton::CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + } + + void SinglePhoton::ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size); + m_reco_slice_num_pfps.resize(size); + m_reco_slice_num_showers.resize(size); + m_reco_slice_num_tracks.resize(size); + } +} From 7f0f5a58fedb657a392570d466253a3440e346cc Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Mon, 13 Jun 2022 23:55:08 -0500 Subject: [PATCH 21/54] fix singlephoton.fcl --- .../HelperFunctions/helper_connectors.h | 25 ++++ .../HelperFunctions/helper_math.h | 113 ++++++++++++---- .../Libraries/analyze_Showers.h | 125 +----------------- .../Libraries/second_shower_search.h | 1 + .../SinglePhoton_module.cc | 16 +-- .../SinglePhoton_module.h | 23 ---- .../jobs/singlephoton_sbnd.fcl | 8 +- 7 files changed, 130 insertions(+), 181 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h index b2e304dc7..3aec5cd3a 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h @@ -449,5 +449,30 @@ namespace single_photon //----------- Above are migrated from Singlephoton_module.cc + //determines if a point is inside the rectangle by summing the areas of the four triangles made by + //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle + //also returns true if the point is on the boundary + bool SinglePhoton::isInsidev2(std::vector thishit_pos, std::vector> rectangle){ + int n_vertices = (int)rectangle.size(); + //bool inside = false; + int i, j = 0; + double areas = 0; + //for each pair of vertices + for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { + //calculate the area of a triangle with the point and two vertices + double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) + + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) + + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); + areas += this_area; + } + //calc area of the rectangle + double area_rectangle = m_width_dqdx_box* m_length_dqdx_box; + + //check the sum of areas match + if (abs(areas - area_rectangle) <= 0.001 ){ + return true; + } + return false; + } } diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h index 5879869f2..9e55b8dd8 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -204,29 +204,96 @@ namespace single_photon return thisvector[len/2]; } } -// //So return median if odd, average of median in even, if size==0, return the point. -// -// //here the size corresponds to the max index -// -// int size = thisvector.size() - 1; -// //if no entries, return nonsense value -// if (size < 0) return NAN; -// if (size==0) return thisvector[size]; -// -// //find index of median location -// double median; -// if (size%2 == 0){ // if vector has odd elements -// int ind = size/2; -// median = thisvector[ind]; -// } else{ // if vector has even number of elements -// int ind1 = size/2; -// int ind2 = size/2-1; -// median = (thisvector[ind1]+thisvector[ind2])/2.0; -// } -// -// //return the value at median index -// return median; -// } + + /* returns (generally) best median dEdx of all 3 + * planes, usually plane 2 */ + double getAmalgamateddEdx( + double angle_wrt_plane0, + double angle_wrt_plane1, + double angle_wrt_plane2, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ + //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 + if(angle_wrt_plane2< degToRad(10)){ + //if it's too close to the wires on either of the planes, then stick with plane 2 + if (angle_wrt_plane1> degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ + //but if it's outside of the range on plane 1, choose that + if(angle_wrt_plane1> angle_wrt_plane0){ + return median_plane1; + } else{ + return median_plane0; + } + } + } + if (plane2_nhits< 2){ + if (plane1_nhits >=2 ){ + return median_plane1; + } else if (plane0_nhits >=2 ){ + return median_plane0; + } + } + return median_plane2; + } + + /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + int getAmalgamateddEdxNHits( + double amalgamateddEdx, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ + if (amalgamateddEdx == median_plane0){ + return plane0_nhits; + } + if (amalgamateddEdx == median_plane1){ + return plane1_nhits; + } + if (amalgamateddEdx == median_plane2){ + return plane2_nhits; + } + return -999; + } + + +/** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ + std::vector> corners; + + //get the axis perpedicular to the cluster axis + double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; + + //create a vector for each corner of the rectangle on the plane + //c1 = bottom left corner + std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; + //c2 = top left corner + std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; + //c3 = bottom right corner + std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; + //c4 = top right corner + std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; + + //save each of the vectors + corners.push_back(c1); + corners.push_back(c2); + corners.push_back(c4); + corners.push_back(c3); + return corners; + } + + // double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ // diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 42d1cc733..1a5e3ebcd 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -32,8 +32,8 @@ namespace single_photon art::Ptr shower3d; if(PFPtoShowerReco3DMap.count(pfp)==0){ - //std::cout<<"SHOWER_3D : < degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ - //but if it's outside of the range on plane 1, choose that - if(angle_wrt_plane1> angle_wrt_plane0){ - return median_plane1; - } else{ - return median_plane0; - } - } - } - if (plane2_nhits< 2){ - if (plane1_nhits >=2 ){ - return median_plane1; - } else if (plane0_nhits >=2 ){ - return median_plane0; - } - } - return median_plane2; - } - - - int SinglePhoton::getAmalgamateddEdxNHits( - double amalgamateddEdx, - double median_plane0, - double median_plane1, - double median_plane2, - int plane0_nhits, - int plane1_nhits, - int plane2_nhits){ - if (amalgamateddEdx == median_plane0){ - return plane0_nhits; - } - if (amalgamateddEdx == median_plane1){ - return plane1_nhits; - } - if (amalgamateddEdx == median_plane2){ - return plane2_nhits; - } - return -999; - } - - double SinglePhoton::getMeanHitWidthPlane(std::vector> hits, int this_plane){ int nhits = 0; @@ -908,75 +854,8 @@ namespace single_photon return nhits; } - std::vector> SinglePhoton::buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ - std::vector> corners; - - //get the axis perpedicular to the cluster axis - double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; - - //create a vector for each corner of the rectangle on the plane - //c1 = bottom left corner - std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; - //c2 = top left corner - std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; - //c3 = bottom right corner - std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; - //c4 = top right corner - std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; - - //save each of the vectors - corners.push_back(c1); - corners.push_back(c2); - corners.push_back(c4); - corners.push_back(c3); - return corners; - } - bool SinglePhoton::insideBox(std::vector thishit_pos, std::vector> rectangle){ - //for a rectangle this is a known value but this is the most general - int n_vertices = (int)rectangle.size(); - bool inside = false; - int i, j = 0; - //for each pair of vertices - for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { - //if the hit y coordinate is between the y and x coordinates of two vertices - if ( ((rectangle[i][1]> thishit_pos[1]) != (rectangle[j][1]>thishit_pos[1])) - &&(thishit_pos[0] < (rectangle[j][0]-rectangle[i][0]) * (thishit_pos[1]-rectangle[i][1]) / (rectangle[j][1]-rectangle[i][1]) + rectangle[i][0]) ){ - if (inside == false){ - inside = true; - } else{ - inside = false; - } - } - } - return inside; - } - //determines if a point is inside the rectangle by summing the areas of the four triangles made by - //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle - //also returns true if the point is on the boundary - bool SinglePhoton::isInsidev2(std::vector thishit_pos, std::vector> rectangle){ - int n_vertices = (int)rectangle.size(); - //bool inside = false; - int i, j = 0; - double areas = 0; - //for each pair of vertices - for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { - //calculate the area of a triangle with the point and two vertices - double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) - + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) - + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); - areas += this_area; - } - //calc area of the rectangle - double area_rectangle = m_width_dqdx_box* m_length_dqdx_box; - - //check the sum of areas match - if (abs(areas - area_rectangle) <= 0.001 ){ - return true; - } - return false; - } //area of a triangle given three vertices diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h index 5db9cfc4f..c31531840 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h @@ -509,6 +509,7 @@ namespace single_photon art::Ptr> & NormalTrackToPFParticleMap, art::Event const & evt ){ + //CHECK, may manually pick out "AllShr" label in sbnd; which are showers not in nu slice; std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" //Keng std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 8a416b544..813a95ac2 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -351,14 +351,14 @@ namespace single_photon //------- 3D showers art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); - std::map, art::Ptr> pfParticlesToShowerReco3DMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ - pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); - } - - } + std::map, art::Ptr> pfParticlesToShowerReco3DMap;//CHECK, 3d shower object is not something stand alone; maybe hidden within some of the pandorSCEShower in SBND? +// for(size_t i=0; i< pfParticleVector.size(); ++i){ +// auto pfp = pfParticleVector[i]; +// if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ +// pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); +// } +// +// } //---------Kalman Track Showers //CHECK art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); //CHECK this label is not available in sbnd? use an alternative now; diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 799c7e79d..0fea817de 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -372,29 +372,6 @@ namespace single_photon * */ double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - /* returns (generally) best median dEdx of all 3 - * planes, usually plane 2 */ - double getAmalgamateddEdx(double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); - /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits); - - /** - *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction - *@param cluster_start - the start position of a cluster in CM - *@param cluster_axis - calculated from the cluster end minus the cluster start - *@param width - typically ~1cm - *@param length - typically a few cm - * - * */ - std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); - - /** - *@brief For a 2d point on a plane in cm and a rectangle, returns true if the point is inside of the rectangle - *@param thishit_pos - 2d location of a hit in cm - *@param rectangle - vector of the positions of the four corners of the rectangle - * - * */ - bool insideBox(std::vector thishit_pos, std::vector> rectangle); /** * diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index b458adfa1..2df4cde82 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -4,9 +4,9 @@ singlephoton_analyzer:{ module_type: SinglePhoton - PandoraLabel: "pandora" - TrackLabel: "pandoraTrack" - ShowerLabel: "pandoraShower" + PandoraLabel: "pandoraSCE" + TrackLabel: "pandoraTrack" #pandoraSCETrack does not have enough objects; + ShowerLabel: "pandoraSCEShower" ParticleIDLabel:"pandoraSCEPid" CaloLabel: "pandoraCalo" FlashLabel: "opflashtpc0" @@ -14,7 +14,7 @@ singlephoton_analyzer:{ #ShowerTrackFitter: "pandoraTrack" #ShowerTrackFitterCalo: "pandoraCalo" - Shower3DLabel: "pandoraShower" + Shower3DLabel: "pandoraSCEShower" input_param: "optional" From 2a97b86d6c6bc585132597f519a754c6207b9511 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 16 Jun 2022 10:00:29 -0500 Subject: [PATCH 22/54] update gain constants according to SBN-doc-19505 --- .../SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 2df4cde82..d988db6b0 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -48,10 +48,13 @@ singlephoton_analyzer:{ SelectEventList:"" usePID: true - work_function: 23.6 - recombination_factor: 0.62 - gain_mc: [235.5, 249.7, 237.6] #ubDocDB 20227-v7 using dE/dx calibration method for all planes, updated on 9/13/19 - gain_data: [230.3, 237.6, 243.7] #see above docdb + work_function: 23.6 # eV, average energy needed to produce an ionization electron + recombination_factor: 0.62 # the electron recombination survival rate + gain_mc: [49.774521418, 49.9600319744, 49.6788263874] #for SBND +# also documented at SBN-doc-19505-v1 from Varunna Meddage +# formula used in SBN-doc-18701-v1 NOTE:origin values are in MicroBooNE-doc-20227 with inversed units; +#see SBN-doc-25161 for ICARUS? + gain_data: [230.3, 237.6, 243.7] #not used yet, to be updated; wire_spacing : 0.3 width_box : 1. #2d dEdx is calcualted with a box of 1cmx4cm length_box : 4. From b3325dbc20e1ee7584687f395722c88ad76f22a4 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Sun, 19 Jun 2022 16:05:44 -0500 Subject: [PATCH 23/54] going to create a class spin-off from a single PFParticle --- .../HelperFunctions/helper_connectors.h | 20 +++++++++++++++---- .../Libraries/analyze_Slice.h | 5 +++-- .../SinglePhoton_module.cc | 17 ++++++++-------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h index 3aec5cd3a..994bc4dee 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h @@ -92,8 +92,12 @@ namespace single_photon //Classify PFParticles into crParticles or nuParticles. - void SinglePhoton::GetFinalStatePFParticleVectors(const PFParticleIdMap &pfParticleMap, const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, PFParticleVector &crParticles, PFParticleVector &nuParticles, size_t fpfp_w_bestnuID ) - { + void SinglePhoton::GetFinalStatePFParticleVectors( + const PFParticleIdMap &pfParticleMap, + const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, + PFParticleVector &crParticles, + PFParticleVector &nuParticles, + size_t fpfp_w_bestnuID ) { if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\tSort out PFPParticles."< , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) + void SinglePhoton::CollectTracksAndShowers( + const PFParticleVector &particles, + const PFParticleIdMap pfParticleMap, + const PFParticleHandle &pfParticleHandle, + const art::Event &evt, + TrackVector &tracks, + ShowerVector &showers, + std::map< art::Ptr , + art::Ptr> &trackToNuPFParticleMap, + std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) { // Get the associations between PFParticles and tracks/showers from the event art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index eb664e895..eb8c40ef9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -310,8 +310,9 @@ namespace single_photon return sliceIdToNumShowersvec; } - std::vector SinglePhoton::GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap){ + std::vector SinglePhoton::GetNumTracksPerSlice( + std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap){ std::vector sliceIdToNumTracksvec(m_reco_slice_num, 0); // std::cout<<"looking at number of tracks per slice"< nu_scores; bool isSelectedSlice = false; - int primaries = 0; + int primaries_num = 0; int primary_pdg = 0; - for(auto &pfp: pfps){ + for(auto &pfp: pfps){//loop through PFparticles of a slice std::vector> metadatas = pfParticleToMetadataMap[pfp]; for(auto &meta: metadatas){ std::map propertiesmap = meta->GetPropertiesMap(); @@ -438,13 +438,13 @@ namespace single_photon } if (pfp->IsPrimary()) { - primaries++; + primaries_num++; primary_pdg = (pfp->PdgCode()); } } std::cout< > nuParticles; std::vector< art::Ptr > crParticles; this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); + //CHECK pfp_w_bestnuID was calculated in the previous "test" lines above? //CHECK potential upgrade: // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? From 8000c66dd0f7f1c5d60fcb2a5bab11b13cf4d91f Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Mon, 27 Jun 2022 13:35:44 -0500 Subject: [PATCH 24/54] update the PandoraPFParticle class --- .../HelperFunctions/helper_connectors.h | 118 ++++++++- .../HelperFunctions/helper_gadget.h | 32 +++ .../Libraries/analyze_Showers.h | 84 ++++--- .../Libraries/analyze_Slice.h | 3 +- .../SinglePhoton_module.cc | 236 ++++++++++++------ .../SinglePhoton_module.h | 142 +++++++++-- 6 files changed, 478 insertions(+), 137 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h index 994bc4dee..c9959194d 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h @@ -27,6 +27,120 @@ namespace single_photon //-------- Only use this once for now, potentially 13+ more lines can be saved -------- + + //of each PandoraPFParticle + //find pAncestor & pAncesotrID + void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs){ + + std::map< size_t, art::Ptr> pfParticleMap; + int pfp_size = PPFPs.size(); + //build ID-PFParticle map; + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_pfp = PPFPs[index]; + if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + + //trace up parents + for(int jndex = 0; jndex < pfp_size; jndex++){ + PandoraPFParticle temp_ppfp = PPFPs[jndex]; + art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; + + temp_ppfp.pAncestorID = temp_pfp->Self(); + temp_ppfp.pAncestor = pfParticleMap[temp_pfp->Self()]; + if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself + + while(!(temp_ppfp.pAncestor)->IsPrimary()){//1+ gen. parent + + int temp_parent_id = temp_ppfp.pAncestor->Parent(); + temp_ppfp.pAncestorID = temp_parent_id; + temp_ppfp.pAncestor = pfParticleMap[temp_parent_id]; + // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ + + int pfp_size = PPFPs.size(); + for( auto pfp : PFP_in_slice){ + for(int index = 0; index < pfp_size; index++){ + //std::cout<<"CHECK slice match"<<(PPFPs[index].pPFParticle)->Self()<< " and "<Self()< -1 ) continue;//slice# is found already + if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ + PPFPs[index].pSlice = slice; + PPFPs[index].pHits = Hit_inslice; + PPFPs[index].pSliceID = slice.key(); + break; + } + } + } + } + + + + PandoraPFParticle *PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].pHasShower != 1 ) continue; +// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs){ + + int pfp_size = PPFPs.size(); + std::map< int, double > temp_ID_nuscore_map; + double best_nuscore = 0; + int best_nuscore_SliceID = 0; + + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_p = PPFPs[index]; + if(temp_p.pIsNeutrino){ + + temp_ID_nuscore_map[ temp_p.pSliceID] = temp_p.pNuScore; + if(best_nuscore < temp_p.pNuScore){ + best_nuscore = temp_p.pNuScore; + best_nuscore_SliceID = temp_p.pSliceID; + std::cout<<"CHECK Best nu score "<< best_nuscore< & particle ){ @@ -124,9 +238,9 @@ namespace single_photon if(found>0){ std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not expected as in MicroBooNE but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<Self() == fpfp_w_bestnuID){ std::cout<<"Take this PFParticle's vertex as event vertex, bc of it has highest nu score"<GetVertex(pfParticlesToVerticesMap, pParticle ); diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h new file mode 100644 index 000000000..eb36bd1d7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h @@ -0,0 +1,32 @@ +namespace single_photon +{ + //table printers + std::vector Printer_header( std::vector< std::string> headings){ + + std::vector spacers; + for( size_t index = 0; index < headings.size(); index++){ + std::cout< nums, std::vector spacers){ + + // std::cout<<"CHECK "< all_PPFPs, const std::vector>& showers, - std::map, - art::Ptr> & showerToPFParticleMap, - std::map, std::vector>> & pfParticleToHitMap, - std::map, std::vector> > & pfParticleToClusterMap, +// std::map, art::Ptr> & showerToPFParticleMap, +// std::map, std::vector>> & pfParticleToHitMap, +// std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, +// std::map& sliceIdToNuScoreMap, +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,bool> &PFPToNuSliceMap, +// std::map,double> &PFPToTrackScoreMap, +// PFParticleIdMap &pfParticleMap, std::map, art::Ptr>& PFPtoShowerReco3DMap, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"< shower = *iter; - const art::Ptr pfp = showerToPFParticleMap[shower]; +// const art::Ptr pfp = showerToPFParticleMap[shower]; + //CHECK I think I can take care of all pfpmaps here; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + + const art::Ptr pfp = ppfp->pPFParticle; +// std::cout<<"CHECK SHower pfparticle "<Self()<<" and "<Self()< shower3d; if(PFPtoShowerReco3DMap.count(pfp)==0){ - std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; - const std::vector> clusters = pfParticleToClusterMap[pfp]; +// const std::vector> hits = pfParticleToHitMap[pfp]; +// const std::vector> clusters = pfParticleToClusterMap[pfp]; + const std::vector> hits = ppfp->pHits; + const std::vector> clusters = ppfp->pClusters; //int m_shrid = shower->ID(); This is an used variable, always -999 double m_length = shower->Length(); @@ -425,28 +433,40 @@ namespace single_photon m_reco_shower_num_daughters[i_shr] = pfp->NumDaughters(); //corresponding PFParticle + std::cout<<" CHECK numebr "<0){ //currently just look at 1 daughter - m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + int pfp_size = all_PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + std::cout<<"CHECK Compare "<Daughters().front()<< + " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); + m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].pTrackScore; + break; + } } //------------and finally some slice info----------------- - m_reco_shower_sliceId[i_shr] = PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = PFPToNuSliceMap[pfp]; - //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; - //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<PdgCode(); - } else{ - m_reco_shower_trackscore[i_shr] = -999; - m_reco_shower_pfparticle_pdg[i_shr] = -999; - } + m_reco_shower_sliceId[i_shr] = ppfp->pSliceID;//PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = ppfp->pNuScore;//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = ppfp->pIsClearCosmic;//PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = ppfp->pIsNuSlice;//PFPToNuSliceMap[pfp]; + //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; + //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<pTrackScore; + m_reco_shower_pfparticle_pdg[i_shr] = ppfp->pPdgCode; + // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + // m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; + // m_reco_shower_pfparticle_pdg[i_shr] = pfp->PdgCode(); + // } else{ + // m_reco_shower_trackscore[i_shr] = -999; + // m_reco_shower_pfparticle_pdg[i_shr] = -999; + // } if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); std::vector> pfParticleVector; art::fill_ptr_vector(pfParticleVector,pfParticleHandle); //So a cross check @@ -305,35 +305,7 @@ namespace single_photon PFParticleIdMap pfParticleMap; this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); - //Slices - art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> sliceVector; - art::fill_ptr_vector(sliceVector,sliceHandle); - - //And some associations - art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); - art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); - //Slice to PFParticle - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; - std::map> > sliceIDToPFParticlesMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; - sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); - sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); - } - - //Slice to Hits -//Keng std::map< art::Ptr, std::vector> > sliceToHitsMap; - std::map> > sliceIDToHitsMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - - //std::cout<<"CHECK "<<__LINE__<ID()<<" to hits!"<ID()] = hits_per_slice.at(slice.key()); - } //And some verticies. art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); @@ -389,78 +361,168 @@ namespace single_photon if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); + + //PFPartciles -->Showers/Tracks + art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + //Assign Cluster here; + art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + std::map, std::vector> > pfParticleToMetadataMap; for(size_t i=0; i< pfParticleVector.size(); ++i){ const art::Ptr pfp = pfParticleVector[i]; pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); } + //CHECK, try the new class, Keng + std::vector spacers = Printer_header({"pfpID", "Parent ", "prim?","Vertex(x, "," y, ",", z )", " nu_score","nu?","cosmic?"}); + + std::vector allPFParticles; + for(size_t index=0; index< pfParticleVector.size(); ++index){ +// std::cout<<"CHECKING"<<__LINE__<Self())<Parent())<IsPrimary())? std::cout<<"T"<Self()), + std::to_string(pfp->Parent()) , + (pfp->IsPrimary())?"T":"F", + std::to_string(temp_pf.pVertex_pos[0]), + std::to_string(temp_pf.pVertex_pos[1]), + std::to_string(temp_pf.pVertex_pos[2]), + std::to_string(temp_pf.pNuScore), + (temp_pf.pIsNeutrino)?"T":"F", + (temp_pf.pIsClearCosmic)?"T":"F" + }, spacers); + allPFParticles.push_back(temp_pf); + } + PPFP_FindAncestor(allPFParticles); + + + //Add slices & hits info. + //Slices + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); + std::vector> sliceVector; + art::fill_ptr_vector(sliceVector,sliceHandle); + + //And some associations + art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); + + //Slice to PFParticle + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map> > sliceIDToPFParticlesMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + PPFP_FindSliceIDandHits(allPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); + sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + } + DefineNuSlice(allPFParticles); + + std::cout<<"\nFinish preparing PandoraPFParticles at Line "<<__LINE__<<" CHECK! Now we have "<, std::vector> > sliceToHitsMap; + std::map> > sliceIDToHitsMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + + //std::cout<<"CHECK "<<__LINE__<ID()<<" to hits!"<ID()] = hits_per_slice.at(slice.key()); + } + size_t pfp_w_bestnuID = 0; int slice_w_bestnuID = 0; if(true){ std::cout<<"SliceTest: there are "< spacers2 = Printer_header({ + "Slice#", + "nu?", + "#pfPart.", + "nu_score ", + "best_at", + "#primary", + "prim_pdg"}); double ref_nuscore = 0; - for(size_t s =0; s nu_scores; - bool isSelectedSlice = false; - int primaries_num = 0; - int primary_pdg = 0; - - for(auto &pfp: pfps){//loop through PFparticles of a slice - std::vector> metadatas = pfParticleToMetadataMap[pfp]; - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - //for each of the things in the list - if(propertiesmap.count("NuScore")==1){ + for(size_t s_index =0; s_index nu_scores; + bool isSelectedSlice = false; + int primaries_num = 0; + int primary_pdg = 0; + + for(auto &pfp: pfps){//loop through PFparticles of a slice + std::vector> metadatas = pfParticleToMetadataMap[pfp]; + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + //for each of the things in the list + if(propertiesmap.count("NuScore")==1){ double tmp_nuscore = propertiesmap["NuScore"]; - nu_scores.push_back(tmp_nuscore); + nu_scores.push_back(tmp_nuscore); if( tmp_nuscore > ref_nuscore){ ref_nuscore = tmp_nuscore; pfp_w_bestnuID = pfp->Self(); - slice_w_bestnuID = s; + slice_w_bestnuID = s_index; } - } - if(propertiesmap.count("IsNeutrino")==1){ - isSelectedSlice = true; - } - } + } + if(propertiesmap.count("IsNeutrino")==1){ + isSelectedSlice = true; + } + } - if (pfp->IsPrimary()) { - primaries_num++; + if (pfp->IsPrimary()) { + primaries_num++; primary_pdg = (pfp->PdgCode()); } } - std::cout<0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<0)?nu_scores.front():-9), + std::to_string(pfp_w_bestnuID), + std::to_string(primaries_num), + std::to_string(primary_pdg) + }, spacers2); + } }// End test of slice metadata @@ -494,7 +556,6 @@ namespace single_photon if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"< clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); std::map, std::vector> > pfParticleToClustersMap; std::map, std::vector> > clusterToHitsMap; @@ -825,9 +886,24 @@ namespace single_photon //******************************* Showers **************************************************************/ std::cout<<"\nSinglePhoton::analyze \t||\t Start on Shower Analysis "<AnalyzeShowers(showers,showerToNuPFParticleMap, pfParticleToHitsMap, pfParticleToClustersMap, clusterToHitsMap,sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap,pfParticleMap,pfParticlesToShowerReco3DMap, trigger_offset(detClocks), theDetector); + //found in analyze_Showers.h + this->AnalyzeShowers(allPFParticles, showers, + // showerToNuPFParticleMap, + // pfParticleToHitsMap, + // pfParticleToClustersMap, + clusterToHitsMap, + // sliceIdToNuScoreMap, + // PFPToClearCosmicMap, + // PFPToSliceIdMap, + // PFPToNuSliceMap, + // PFPToTrackScoreMap, + // pfParticleMap, + pfParticlesToShowerReco3DMap, + trigger_offset(detClocks), + theDetector); + + std::cout<<"\nSinglePhoton::analyze \t||\t Finish Shower Analysis "<AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 0fea817de..582190e38 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -96,6 +96,7 @@ #include #include "HelperFunctions/helper_math.h" +#include "HelperFunctions/helper_gadget.h" //#include "Libraries/Atlas.h" //#include "Libraries/bad_channel_matching.h" @@ -109,6 +110,103 @@ namespace single_photon { + //Create a class based on PFParticle, connected to other Pandora objects + //CHECK, blending this to the code; not active yet; + class PandoraPFParticle{ + + public: + //constructor: + PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) + { + pPFParticleID = pPFParticle->Self(); + pPdgCode = pPFParticle->PdgCode(); + + //Get recob::Shower/Track + const unsigned int nShowers(input_Showers.size()); + const unsigned int nTracks(input_Tracks.size()); + if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; + + pHasShower = nShowers; + pHasTrack = nTracks; + if(pHasShower == 1) pShower=input_Showers.front(); + if(pHasTrack == 1) pTrack=input_Tracks.front(); + + //set vertex + if (!pVertex.empty()){ + const art::Ptr vertex = * (pVertex.begin()); + vertex->XYZ(pVertex_pos); + } + //else{ + // throw art::Exception(art::errors::StdException) + // << " Pandor did not have an associated vertex for a particle. "; + //} + + + //(pVertex.begin()).XYZ(pVertex_pos); +// std::cout<<"CHECK Vertex position: ("<IsPrimary()){ + pAncestor = pPFParticle; + pAncestorID = -1; + } + + //fill in some booleans + for(auto &meta: pMetaData){ + std::map propertiesmap = meta->GetPropertiesMap(); + if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; + if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; + if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; + if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; + } + + }; + + art::Ptr< recob::PFParticle > pPFParticle;//d + art::Ptr< recob::Shower> pShower;//d with 0 or 1 element + art::Ptr< recob::Track > pTrack;//d with 0 or 1 element + art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + art::Ptr< simb::MCTruth > pMCTruth; + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d + std::vector< art::Ptr< recob::Vertex > > pVertex;//d + std::vector< art::Ptr< recob::Hit > > pHits;//d + std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; + std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + + double pVertex_pos[3] = {-9999,-9999,-9999};//d + + double pNuScore = -999 ;//d + double pTrackScore = -999;//d + + bool pIsNeutrino = false;//d + bool pIsClearCosmic = false;//d + bool pIsNuSlice = false;//d + + int pHasShower = 0;//d + int pHasTrack = 0;//d + int pPdgCode = -999;//d + int pPFParticleID = -9;//d + int pAncestorID = -9;//d + int pSliceID = -9;//d + }; + + + //this is for second_shower_search.h struct sss_score{ int plane; int cluster_label; @@ -151,13 +249,15 @@ namespace single_photon sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; }; //end of class sss_score + //this works with SEAview/SEAviewer.h class cluster { public: cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - + + std::cout<<"\n\n\nCHECK !! Do we need this?"<> getHits(){return f_hits;} - int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} - sss_score * getSSScore(){return f_SSScore;} - private: - +// int getID() {return f_ID;} +// int getN() {return f_npts;} +// int getPlane(){ return f_plane;} +// TGraph * getGraph(){ return &f_graph;} +// std::vector> getHits(){return f_hits;} +// int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} +// sss_score * getSSScore(){return f_SSScore;} +// private: +// int f_ID; int f_npts; int f_plane; std::vector> f_pts; std::vector> f_hits; TGraph f_graph; - sss_score *f_SSScore; +// sss_score *f_SSScore; }; // end of class cluster @@ -512,18 +612,18 @@ namespace single_photon void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ void AnalyzeShowers( + std::vector all_PPFPs, const std::vector>& showers, - std::map, - art::Ptr> & showerToPFParticleMap, - std::map, std::vector>> & pfParticleToHitMap, - std::map, std::vector> > & pfParticleToClusterMap, +// std::map,art::Ptr> & showerToPFParticleMap, +// std::map, std::vector>> & pfParticleToHitMap, +// std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool> &PFPToNuSliceMap, - std::map,double> &PFPToTrackScoreMap, - PFParticleIdMap &pfParticleMap, +// std::map& sliceIdToNuScoreMap, +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,bool> &PFPToNuSliceMap, +// std::map,double> &PFPToTrackScoreMap, +// PFParticleIdMap &pfParticleMap, std::map, art::Ptr>& PFPtoShowerReco3DMap, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector From 26f18cf36410eff91f6d46c40622260b76ea445a Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 28 Jun 2022 12:48:42 -0500 Subject: [PATCH 25/54] correct products_deps for now --- ups/product_deps | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ups/product_deps b/ups/product_deps index 7b8daafef..39427b9a7 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -34,9 +34,9 @@ fwdir product_dir scripts # Add the dependent product and version product version -larsoft v09_44_00 -sbnobj v09_13_05 -sbnanaobj v09_17_12 +larsoft v09_48_01 +sbnobj v09_13_11 +sbnanaobj v09_18_02 sbndaq_artdaq_core v1_00_00of2 genie_xsec v3_00_04a sbndata v01_03 From 7541d907131ac9f54d64792c9c07c870ae7cd618 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 28 Jun 2022 13:29:00 -0500 Subject: [PATCH 26/54] fix a bug in updating nu score --- .../HelperFunctions/helper_connectors.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h index c9959194d..ea3cc70f3 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_connectors.h @@ -44,18 +44,17 @@ namespace single_photon //trace up parents for(int jndex = 0; jndex < pfp_size; jndex++){ - PandoraPFParticle temp_ppfp = PPFPs[jndex]; art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; - temp_ppfp.pAncestorID = temp_pfp->Self(); - temp_ppfp.pAncestor = pfParticleMap[temp_pfp->Self()]; + PPFPs[jndex].pAncestorID = temp_pfp->Self(); + PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself - while(!(temp_ppfp.pAncestor)->IsPrimary()){//1+ gen. parent + while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent - int temp_parent_id = temp_ppfp.pAncestor->Parent(); - temp_ppfp.pAncestorID = temp_parent_id; - temp_ppfp.pAncestor = pfParticleMap[temp_parent_id]; + int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); + PPFPs[jndex].pAncestorID = temp_parent_id; + PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; // std::cout< & PPFPs){ int pfp_size = PPFPs.size(); @@ -115,14 +115,15 @@ namespace single_photon } } } + //now markdown all particles in slice with best ID; - + //re-set pNuScore and pIsNuSlice for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_p = PPFPs[index]; - if( temp_p.pSliceID == best_nuscore_SliceID){ - temp_p.pIsNuSlice = true; - std::cout<<"CHECK Set nu slice "< Date: Fri, 1 Jul 2022 11:01:57 -0500 Subject: [PATCH 27/54] add some lines in README --- .../HelperFunctions/helper_gadget.h | 4 +- ...elper_connectors.h => helper_processors.h} | 26 ++- .../Libraries/analyze_MCTruth.h | 14 +- .../Libraries/analyze_Showers.h | 69 ++++---- .../Libraries/analyze_Tracks.h | 59 ++++--- sbncode/SinglePhotonAnalysis/README.md | 152 ++++++++++++++++-- .../SinglePhoton_module.cc | 50 ++++-- .../SinglePhoton_module.h | 30 ++-- 8 files changed, 303 insertions(+), 101 deletions(-) rename sbncode/SinglePhotonAnalysis/HelperFunctions/{helper_connectors.h => helper_processors.h} (95%) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h index eb36bd1d7..4c2558ae0 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h @@ -5,8 +5,8 @@ namespace single_photon std::vector spacers; for( size_t index = 0; index < headings.size(); index++){ - std::cout<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()){ + if((pShower->ShowerStart() == PPFPs[index].pShower->ShowerStart()) + && (pShower->Direction() == PPFPs[index].pShower->Direction())){ return &PPFPs[index]; } } @@ -95,6 +96,21 @@ namespace single_photon return &PPFPs[0]; } + PandoraPFParticle *PPFP_GetPPFPFromTrack( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pTrack){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].pHasTrack != 1 ) continue; + if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) + && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs){ @@ -111,7 +127,7 @@ namespace single_photon if(best_nuscore < temp_p.pNuScore){ best_nuscore = temp_p.pNuScore; best_nuscore_SliceID = temp_p.pSliceID; - std::cout<<"CHECK Best nu score "<< best_nuscore< tmp = {xyz[0],xyz[1],xyz[2]}; m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); @@ -237,7 +253,7 @@ namespace single_photon // If it is, lets get the vertex position if(isNeutrino){ if(found>0){ - std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not expected as in MicroBooNE but ok."< spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); for(int i=0; i truth = mcTruthVector[i]; // std::cout<<"\nCHECK THIS MCTruth!! "<<*truth< spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); + Printer_content( + {std::to_string(m_mctruth_nu_pdg), + std::to_string(m_mctruth_ccnc), + std::to_string(corrected[0]), + std::to_string(corrected[1]), + std::to_string(corrected[2]) + },spacers); + } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 768d1266b..4502b7559 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -24,10 +24,13 @@ namespace single_photon m_reco_asso_showers=showers.size(); int i_shr = 0; this->ResizeShowers(m_reco_asso_showers); - + + if(m_is_verbose) std::cout<<__FUNCTION__<<" CHECK showers found: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )"}); for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) { + const art::Ptr shower = *iter; // const art::Ptr pfp = showerToPFParticleMap[shower]; //CHECK I think I can take care of all pfpmaps here; @@ -38,8 +41,8 @@ namespace single_photon art::Ptr shower3d; if(PFPtoShowerReco3DMap.count(pfp)==0){ - std::cout<<"SHOWER_3D : <ShowerStart(); TVector3 shr3d_dir = shower3d->Direction(); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< t_area(3,0.0); //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); @@ -234,18 +237,21 @@ namespace single_photon //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]<NumDaughters(); //corresponding PFParticle - std::cout<<" CHECK numebr "<0){ //currently just look at 1 daughter //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ - std::cout<<"CHECK Compare "<Daughters().front()<< - " "<Self()<Daughters().front()<< +// " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].pTrackScore; break; @@ -468,9 +473,19 @@ namespace single_photon // m_reco_shower_pfparticle_pdg[i_shr] = -999; // } - if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )"}); +// Printer_content( +// {std::to_string(ppfp->pSliceID), +// std::to_string(ppfp->pPFParticleID), +// std::to_string(shr_start.X()), +// std::to_string(shr_start.Y()), +// std::to_string(shr_start.Z()) +// },spacers); + } //Lets sort and order the showers diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h index ad4056dbf..81b462129 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h @@ -5,17 +5,20 @@ namespace single_photon { - void SinglePhoton::AnalyzeTracks(const std::vector>& tracks, - std::map, art::Ptr> & trackToNuPFParticleMap, - std::map, std::vector>> & pfParticleToHitsMap, + void SinglePhoton::AnalyzeTracks( + std::vector all_PPFPs, + const std::vector>& tracks, +// std::map, art::Ptr> & trackToNuPFParticleMap, +// std::map, std::vector>> & pfParticleToHitsMap, std::map, std::vector>> & pfParticleToSpacePointsMap, std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int> &PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap){ + std::map &sliceIdToNuScoreMap +// std::map,bool> &PFPToClearCosmicMap, +// std::map, int> &PFPToSliceIdMap, +// std::map,double> &PFPToTrackScoreMap, +// std::map,bool> &PFPToNuSliceMap, +// PFParticleIdMap &pfParticleMap + ){ if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"< track = *iter; - const art::Ptr pfp = trackToNuPFParticleMap[track]; +// const art::Ptr pfp = trackToNuPFParticleMap[track]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + const art::Ptr pfp = ppfp->pPFParticle; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; - const std::vector> trk_hits = pfParticleToHitsMap[pfp]; + const std::vector> trk_hits = ppfp->pHits;//pfParticleToHitsMap[pfp]; int m_trkid = track->ID(); double m_length = track->Length(); @@ -132,31 +138,40 @@ namespace single_photon m_reco_track_end_to_nearest_dead_wire_plane1[i_trk] = distanceToNearestDeadWire(1, m_reco_track_endy[i_trk], m_reco_track_endz[i_trk],geom,bad_channel_list_fixed_mcc9); m_reco_track_end_to_nearest_dead_wire_plane2[i_trk] = distanceToNearestDeadWire(2, m_reco_track_endy[i_trk], m_reco_track_endz[i_trk],geom,bad_channel_list_fixed_mcc9); - m_reco_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; + m_reco_track_sliceId[i_trk] = ppfp->pSliceID;//PFPToSliceIdMap[pfp]; // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; - m_reco_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; + m_reco_track_isclearcosmic[i_trk] = ppfp->pIsClearCosmic;//PFPToClearCosmicMap[pfp]; //std::cout<<"checking track nuslice"<Self()<<" is: "<pIsNuSlice;//PFPToNuSliceMap[pfp]; m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); if(m_reco_track_num_daughters[i_trk]>0){ //currently just look at 1 daughter - m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; +// m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + int pfp_size = all_PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); + m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].pTrackScore; + break; + } + } + m_reco_track_trackscore[i_trk] = ppfp->pTrackScore; + m_reco_track_pfparticle_pdg[i_trk] = ppfp->pPdgCode; // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); - } else{ - m_reco_track_trackscore[i_trk] = -999; - m_reco_track_pfparticle_pdg[i_trk] = -999; - } +// if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { +// m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; +// m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); +// } else{ +// m_reco_track_trackscore[i_trk] = -999; +// m_reco_track_pfparticle_pdg[i_trk] = -999; +// } //A loop over the trajectory points size_t const traj_size = track->CountValidPoints(); diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 4d3673c17..f60cb4708 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -5,26 +5,152 @@ The original code can be found [here](https://cdcvs.fnal.gov/redmine/projects/ub NEED INTRODUCTION HERE. +* [Quick Start](#quick-start) +* [Update Log](#update-log) +* [Overview](#overview) +* [Glossary](#glossary) + +## Quick Start +`mrb i -j4` +`lar -c run_singlephoton_ub.fcl -s ` + +## Update Log +The module does not work out of the box, so there are some modifications to make it fit into the SBND. + +- New electric gains for SBND MC, see SBN-doc-19505-v1; +- + + +### Pandora features updates +|Items|Pandora @ MicroBooNE|Pandora @ SBND| +|---|---|---| +|Neutrino Slice|One nu slice in each event | Multiple nu slices in each event| +|Kalman Fitter| In-use | Not in-use| +|3dShowers| Available | Unavailable| + + + + + +### Code adjustments + + ## Overview -`NCRadiativeResonant_module.cc` provides module `NCDeltaRadiative` for NCDeltaRadiative events production -`Libraries` contains essential headers for this module. +Three sub-modules are included in the Single Photon Analysis Module: +- `SinglePhoton_module.cc` impements the `SinglePhoton` module to read reco2 files and produce n-tuples with varaibles targeting photon reconstructions. +- `NCRadiativeResonant_module.cc` implements the `NCRadiativeResonant` filter to select events with photons coming out from the nucleus. +- `NCDeltaRadiative_module.cc` implements the `NCDeltaRadiative` filter for NCDeltaRadiative events + +### Code Structure +- `Libraries/` contains essential headers for the `SinglePhoton` module. + +- `SEAview/` is an additional module runs inside the `SinglePhoton` module. + +- `jobs/` contains FHiCL files for running these modules -`SEAview` is an additional module runs inside this module. +- `HelperFunctions` contains some useful functions to simplify the code -`job` contains jobs for running the module. +### Headers structure -`HelperFunctions` contains helper functions for simple calculations. +```mermaid +flowchart TD; +A--first formost-->C; +A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; +C[SinglePhoton_module.h]-->D[helper_*.h]; +C-->F[DBSCAN.h]; +C-->G[SEAviewer.h]; +``` -Header structure +### Flows of the `SinglePhoton` module ```mermaid - flowchart TD; - A--first formost-->C; - A[SinglePhoton_module.cc]--also contains-->B[analyze*.h that look like *.cxx]; - C[SinglePhoton_module.h]-->D[helper_functions.h]; - C-->E[Atlas.h]; - C-->F[SBSCAN.h]; - C-->G[SEAviewer.h]; +flowchart TB +A[ClearVertex & prepare PFParticles objects]-->AA; +subgraph AA[1. Gather Objects] +direction TB +B[AnalyzeSlices]-->C; +C[AnalyzeFlashes]-->D; +D[AnalyzeTracks]-->E; +E[AnalyzeShowers]-->F; +F[AnalyzeGeant4]-->G; +G[BuildParticleHitMaps]; +end + +subgraph BB[2. Reco MC Matching] +direction TB +H[Match Reco. Showers to MCParticles]-->I; +I[Match Reco. Tracks to MCParticles]-->J; +J[CollectMCTruth Information]; +end + +subgraph CC[3. Gather Other Info. ] +direction TB +K[AnalyzeEventWeight]-->L; +L[AnalyzeRecoSlices]; +end + +subgraph DD[4. 2nd Shower earch] +direction TB +M[Isolation Study for 2nd Shower Veto]-->N; +N[Match 2nd Shower]-->O[Search 2nd Shower]; +end + +subgraph THIS[flow chart] +direction LR +AA-->BB +CC-->DD; +end +DD-->End[Output ROOT]; ``` + +### Pandora Dependency +Objects are obtained from Pandora reconstruction, and they are connected via the following: +```mermaid +graph TD +PF[PFParticle];T[Track];Sh[Shower]; +H[Hit]; C[Cluster]; S[Slice];MCT[MCTruth];MCP[MCParticle];ID[ID#'s];M[Metadata];SP[SpacePoint]; +PF-->ID; +PF-->M; +PF-->SP; +PF-->C; +C-->H; +PF-->Sh; +PF-->T; +PF-->S; +S-->H; +Sh-->MCP; +T-->MCP; +MCP-->MCT; +``` + +These objects are connected via labels shown as the following: +|Alias|Objects|Label| +|---|---|---| +|PandoraLabel|`std::vector`
`std::vector`
`std::vector`
`std::vector`|pandora| +|TrackLabel|`std::vector`|pandoraTrack| +|ShowerLabel|`std::vector`|pandoraShower| +|ParticleIDLabel|`anab::ParticleID`(`art::FindOneP`)|pandoraSCEPid| +|CaloLabel|`anab::Calorimetry`(`art::FindManyP`)|pandoraSCECalo| +|FlashLabel|`std::vector`|opflashtpc0| +|POTLabel|`sumdata::POTSummary`|generator| + +Below alias auto-configured by default +|Alias|Objects|Label| +|---|---|---| +|HitFinderModule|`std::vector`|gaushit| +|BadChannelLabel|`std::vector`|badmasks(REMOVED)| +|ShowerTrackFitter|`art::Assns`|pandoraTrack| +|ShowerTrackFitterCalo|`anab::Calorimetry`(`art::FindManyP`)|pandoraCalo| +|GeneratorLabel|`std::vector`
`std::vector`|generator| +|GeantModule|`simb::MCParticle>`(`art::FindManyP`)|largeant| +|HitMCParticleAssnLabel|`simb::MCParticle,anab::BackTrackerHitMatchingData`
(`art::FindManyP`)|gaushitTruthMatch| +|Shower3DLabel|`recob::Shower`(`art::FindOneP`)|pandoraShower| + + +## Glossary + +### Parameters in FHiCl + +### Variables diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 5a126b575..266269076 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,5 +1,5 @@ #include "SinglePhoton_module.h" -#include "HelperFunctions/helper_connectors.h" //now it can use variables defined in singlephoton.h +#include "HelperFunctions/helper_processors.h" //now it can use variables defined in singlephoton.h #include "Libraries/init_branches.h" #include "Libraries/reco_truth_matching.h" //#include "analyze_Template.h" @@ -375,7 +375,6 @@ namespace single_photon } //CHECK, try the new class, Keng - std::vector spacers = Printer_header({"pfpID", "Parent ", "prim?","Vertex(x, "," y, ",", z )", " nu_score","nu?","cosmic?"}); std::vector allPFParticles; for(size_t index=0; index< pfParticleVector.size(); ++index){ @@ -405,17 +404,6 @@ namespace single_photon // (temp_pf.pIsClearCosmic)? std::cout<<"T"<Self()), - std::to_string(pfp->Parent()) , - (pfp->IsPrimary())?"T":"F", - std::to_string(temp_pf.pVertex_pos[0]), - std::to_string(temp_pf.pVertex_pos[1]), - std::to_string(temp_pf.pVertex_pos[2]), - std::to_string(temp_pf.pNuScore), - (temp_pf.pIsNeutrino)?"T":"F", - (temp_pf.pIsClearCosmic)?"T":"F" - }, spacers); allPFParticles.push_back(temp_pf); } PPFP_FindAncestor(allPFParticles); @@ -874,7 +862,13 @@ namespace single_photon std::cout<<"\nSinglePhoton::analyze \t||\t Start on Track Analysis "<AnalyzeTracks(tracks, trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap); + this->AnalyzeTracks( + allPFParticles, + tracks, +// trackToNuPFParticleMap, pfParticleToHitsMap, + pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap +// PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap + ); this->AnalyzeTrackCalo(tracks, trackToCalorimetryMap); @@ -904,6 +898,32 @@ namespace single_photon theDetector); std::cout<<"\nSinglePhoton::analyze \t||\t Finish Shower Analysis "< spacers = Printer_header({"pfpID", "Parent ", "Vertex(x, "," y, ",", z )", "slice"," nu_score"," trk_score"," prim?"," nu?"," cos?"," S#"," T#"}); + for(size_t jndex=0; jndex< allPFParticles.size(); ++jndex){ + PandoraPFParticle temp_pf = allPFParticles[jndex]; + art::Ptr pfp = temp_pf.pPFParticle; + + Printer_content( + {std::to_string(pfp->Self()), + std::to_string(pfp->Parent()) , + std::to_string(temp_pf.pVertex_pos[0]), + std::to_string(temp_pf.pVertex_pos[1]), + std::to_string(temp_pf.pVertex_pos[2]), + std::to_string(temp_pf.pSliceID), + std::to_string(temp_pf.pNuScore), + std::to_string(temp_pf.pTrackScore), + (pfp->IsPrimary())? "T":" ", + (temp_pf.pIsNeutrino)? "T":" ", + (temp_pf.pIsClearCosmic)? "T":" ", + (temp_pf.pHasShower>0)? "1":" ", + (temp_pf.pHasTrack>0)? "1":" " + }, spacers); + + } + //KENG no KalmanShowers in SBND? // this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); @@ -949,7 +969,7 @@ namespace single_photon std::vector> gTruthVector; if(!m_is_textgen){ - + std::cout<<"CHECK Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); art::fill_ptr_vector(gTruthVector,gTruthHandle); diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 582190e38..411ed20d6 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -143,19 +143,12 @@ namespace single_photon if(pHasShower == 1) pShower=input_Showers.front(); if(pHasTrack == 1) pTrack=input_Tracks.front(); - //set vertex + //fill the vertex info. if (!pVertex.empty()){ const art::Ptr vertex = * (pVertex.begin()); vertex->XYZ(pVertex_pos); } - //else{ - // throw art::Exception(art::errors::StdException) - // << " Pandor did not have an associated vertex for a particle. "; - //} - - //(pVertex.begin()).XYZ(pVertex_pos); -// std::cout<<"CHECK Vertex position: ("<IsPrimary()){ @@ -576,14 +569,19 @@ namespace single_photon //---------------- Tracks ---------------------------- /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ - void AnalyzeTracks(const std::vector>& tracks, std::map, art::Ptr> & tracktopfparticlemap, - std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, - std::map,bool> &PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,double> &PFPToTrackScoreMap, - std::map,bool> &PFPToNuSliceMap, - PFParticleIdMap &pfParticleMap + void AnalyzeTracks( + std::vector all_PPFPs, + const std::vector>& tracks, +// std::map, art::Ptr> & tracktopfparticlemap, +// std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfparticletospacepointmap , + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap +// std::map,bool> &PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,double> &PFPToTrackScoreMap, +// std::map,bool> &PFPToNuSliceMap, +// PFParticleIdMap &pfParticleMap ); void ClearTracks(); /* clear track related variable and vectors */ From ecd7157a7278bcca1329aa92cf6162e7edf35ca3 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 1 Jul 2022 11:09:29 -0500 Subject: [PATCH 28/54] edit --- sbncode/SinglePhotonAnalysis/README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index f60cb4708..e4b200100 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -10,9 +10,12 @@ NEED INTRODUCTION HERE. * [Overview](#overview) * [Glossary](#glossary) +--- ## Quick Start -`mrb i -j4` -`lar -c run_singlephoton_ub.fcl -s ` +``` +mrb i -j4 +lar -c run_singlephoton_ub.fcl -s +``` ## Update Log The module does not work out of the box, so there are some modifications to make it fit into the SBND. @@ -29,12 +32,7 @@ The module does not work out of the box, so there are some modifications to make |3dShowers| Available | Unavailable| - - - -### Code adjustments - - +--- ## Overview Three sub-modules are included in the Single Photon Analysis Module: @@ -149,8 +147,16 @@ Below alias auto-configured by default |Shower3DLabel|`recob::Shower`(`art::FindOneP`)|pandoraShower| +--- ## Glossary -### Parameters in FHiCl +### Parameters in FHiCL ### Variables + +In `TTree vertex_tree`, variables prefix have the following meaning: +- `sss_*` +- `trackstub_*` +- `reco_*` +- `sim_*` +- `mctruth_*` From 9e85dc017a4092e82eb5fd6abc6c63c288bafe23 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 1 Jul 2022 11:22:25 -0500 Subject: [PATCH 29/54] edit2 --- sbncode/SinglePhotonAnalysis/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index e4b200100..2f8fbcc4f 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -1,7 +1,7 @@ # SinglePhotonModule Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` in Mar. 2022 -The original code can be found [here](https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge) +The original code can be found at [ubana](https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge) NEED INTRODUCTION HERE. @@ -14,14 +14,16 @@ NEED INTRODUCTION HERE. ## Quick Start ``` mrb i -j4 -lar -c run_singlephoton_ub.fcl -s +lar -c run_singlephoton_sbnd.fcl -s ``` ## Update Log The module does not work out of the box, so there are some modifications to make it fit into the SBND. -- New electric gains for SBND MC, see SBN-doc-19505-v1; -- +- New electric gains for SBND MC at `singlephoton_sbnd.fcl`, see SBN-doc-19505-v1; +- Update on geometry variables such as ... +- Disable Kalman dEdx variables +- Disable Second Shower Search 3D (`sss3d`) variables ### Pandora features updates @@ -29,7 +31,8 @@ The module does not work out of the box, so there are some modifications to make |---|---|---| |Neutrino Slice|One nu slice in each event | Multiple nu slices in each event| |Kalman Fitter| In-use | Not in-use| -|3dShowers| Available | Unavailable| +|3dShowers Objects| Available | Unavailable| +|MVA Method|Support Vector Machines|Boosted Decision Trees| --- @@ -47,7 +50,7 @@ Three sub-modules are included in the Single Photon Analysis Module: - `jobs/` contains FHiCL files for running these modules -- `HelperFunctions` contains some useful functions to simplify the code +- `HelperFunctions/` contains some useful functions to simplify the code ### Headers structure From 5b7ccd0cc75dbadcfd2039294429267bc1879793 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 6 Jul 2022 14:52:17 -0500 Subject: [PATCH 30/54] add private members for PandoraPFParticle --- .../helper_PandoraPFParticles.h | 122 ++++++++ .../HelperFunctions/helper_gadget.h | 4 - .../HelperFunctions/helper_processors.h | 107 ------- .../Libraries/analyze_Showers.h | 14 +- .../Libraries/analyze_Slice.h | 2 +- .../Libraries/analyze_Tracks.h | 135 ++++---- .../Libraries/isolation.h | 60 ++-- .../Libraries/reco_truth_matching.h | 53 ++-- sbncode/SinglePhotonAnalysis/README.md | 16 +- .../SinglePhoton_module.cc | 288 ++++++++++-------- .../SinglePhoton_module.h | 180 +++++++---- 11 files changed, 549 insertions(+), 432 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h new file mode 100644 index 000000000..badfd003c --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -0,0 +1,122 @@ +namespace single_photon +{//helper functions exclusively for PandoraPFParticles + +//1. Filler for each PandoraPFParticle + //find pAncestor & pAncesotrID + void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs){ + + std::map< size_t, art::Ptr> pfParticleMap; + int pfp_size = PPFPs.size(); + //build ID-PFParticle map; + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_pfp = PPFPs[index]; + if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + + //trace up parents + for(int jndex = 0; jndex < pfp_size; jndex++){ + art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; + + PPFPs[jndex].set_AncestorID(temp_pfp->Self() ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; + if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself + + while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent + + int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); + PPFPs[jndex].set_AncestorID( temp_parent_id ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; + // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ + + int pfp_size = PPFPs.size(); + for( auto pfp : PFP_in_slice){ + for(int index = 0; index < pfp_size; index++){ + //std::cout<<"CHECK slice match"<<(PPFPs[index].pPFParticle)->Self()<< " and "<Self()< -1 ) continue;//slice# is found already + if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ + PPFPs[index].pSlice = slice; + PPFPs[index].pHits = Hit_inslice; + PPFPs[index].set_SliceID( slice.key() ); + break; + } + } + } + } + + //refill pNuScore and pIsNuSlice + int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ + + int pfp_size = PPFPs.size(); + std::map< int, double > temp_ID_nuscore_map; + double best_nuscore = 0; + int best_nuscore_SliceID = 0; + + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_p = PPFPs[index]; + if(temp_p.get_IsNeutrino()){ + + temp_ID_nuscore_map[ temp_p.get_SliceID()] = temp_p.get_NuScore(); + if(best_nuscore < temp_p.get_NuScore() ){ + best_nuscore = temp_p.get_NuScore(); + best_nuscore_SliceID = temp_p.get_SliceID(); + std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "< & PPFPs, art::Ptr pShower){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasShower() != 1 ) continue; +// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) + && (pShower->Direction() == PPFPs[index].pShower->Direction())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasTrack() != 1 ) continue; + if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) + && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< nums, std::vector spacers){ - // std::cout<<"CHECK "< & PPFPs){ - - std::map< size_t, art::Ptr> pfParticleMap; - int pfp_size = PPFPs.size(); - //build ID-PFParticle map; - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_pfp = PPFPs[index]; - if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - - //trace up parents - for(int jndex = 0; jndex < pfp_size; jndex++){ - art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; - PPFPs[jndex].pAncestorID = temp_pfp->Self(); - PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; - if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself - while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent - int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); - PPFPs[jndex].pAncestorID = temp_parent_id; - PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; - // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ - - int pfp_size = PPFPs.size(); - for( auto pfp : PFP_in_slice){ - for(int index = 0; index < pfp_size; index++){ - //std::cout<<"CHECK slice match"<<(PPFPs[index].pPFParticle)->Self()<< " and "<Self()< -1 ) continue;//slice# is found already - if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ - PPFPs[index].pSlice = slice; - PPFPs[index].pHits = Hit_inslice; - PPFPs[index].pSliceID = slice.key(); - break; - } - } - } - } - PandoraPFParticle *PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].pHasShower != 1 ) continue; -// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) - && (pShower->Direction() == PPFPs[index].pShower->Direction())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].pHasTrack != 1 ) continue; - if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) - && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs){ - - int pfp_size = PPFPs.size(); - std::map< int, double > temp_ID_nuscore_map; - double best_nuscore = 0; - int best_nuscore_SliceID = 0; - - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_p = PPFPs[index]; - if(temp_p.pIsNeutrino){ - - temp_ID_nuscore_map[ temp_p.pSliceID] = temp_p.pNuScore; - if(best_nuscore < temp_p.pNuScore){ - best_nuscore = temp_p.pNuScore; - best_nuscore_SliceID = temp_p.pSliceID; - std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "<Daughters().front()<< // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].pTrackScore; + m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); break; } } @@ -455,16 +455,16 @@ namespace single_photon //------------and finally some slice info----------------- - m_reco_shower_sliceId[i_shr] = ppfp->pSliceID;//PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = ppfp->pNuScore;//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = ppfp->pIsClearCosmic;//PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = ppfp->pIsNuSlice;//PFPToNuSliceMap[pfp]; + m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<pTrackScore; - m_reco_shower_pfparticle_pdg[i_shr] = ppfp->pPdgCode; + m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); + m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { // m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; // m_reco_shower_pfparticle_pdg[i_shr] = pfp->PdgCode(); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h index dffbbbe15..be5f973c2 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h @@ -62,7 +62,7 @@ namespace single_photon //for each of the things in the list for (auto it:propertiesmap ){ // std::cout << " - " << it.first << " = " << it.second << std::endl; - if (it.first == "SliceIndex"){ + if (it.first == "SliceIndex"){//primary nu slice.key() temp_ind = it.second; std::cout << " - SiceID " << it.first << " = " << it.second << std::endl; } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h index 81b462129..241148e8b 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h @@ -138,15 +138,15 @@ namespace single_photon m_reco_track_end_to_nearest_dead_wire_plane1[i_trk] = distanceToNearestDeadWire(1, m_reco_track_endy[i_trk], m_reco_track_endz[i_trk],geom,bad_channel_list_fixed_mcc9); m_reco_track_end_to_nearest_dead_wire_plane2[i_trk] = distanceToNearestDeadWire(2, m_reco_track_endy[i_trk], m_reco_track_endz[i_trk],geom,bad_channel_list_fixed_mcc9); - m_reco_track_sliceId[i_trk] = ppfp->pSliceID;//PFPToSliceIdMap[pfp]; + m_reco_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; - m_reco_track_isclearcosmic[i_trk] = ppfp->pIsClearCosmic;//PFPToClearCosmicMap[pfp]; + m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; //std::cout<<"checking track nuslice"<Self()<<" is: "<pIsNuSlice;//PFPToNuSliceMap[pfp]; + m_reco_track_is_nuslice[i_trk] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); if(m_reco_track_num_daughters[i_trk]>0){ @@ -155,14 +155,14 @@ namespace single_photon int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].pTrackScore; + m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); break; } } - m_reco_track_trackscore[i_trk] = ppfp->pTrackScore; - m_reco_track_pfparticle_pdg[i_trk] = ppfp->pPdgCode; + m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); + m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { @@ -197,17 +197,19 @@ namespace single_photon if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."<>& tracks, - std::map, art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector & vfrac - ){ + void SinglePhoton::RecoMCTracks( + std::vector all_PPFPs, + const std::vector>& tracks, +// std::map, art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, +// std::map& sliceIdToNuScoreMap, +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, + std::vector & vfrac + ){ //if(m_is_verbose) @@ -219,62 +221,63 @@ namespace single_photon const art::Ptr track = tracks[k]; m_sim_track_matched[i_trk] = 0; - if(trackToMCParticleMap.count(track)>0){ - - const art::Ptr mcparticle = trackToMCParticleMap[track]; - std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - const art::Ptr pfp = trackToPFParticleMap[track]; - - std::vector correctedstart(3); - std::vector correctedend(3); - std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; - // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); - this->spacecharge_correction(mcparticle, correctedend, raw_End); - - //std::cout<<"the corrected end of this mcparticle is "<E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = correctedstart[0]; - m_sim_track_starty[i_trk] = correctedstart[1]; - m_sim_track_startz[i_trk] = correctedstart[2]; - - m_sim_track_endx[i_trk]= correctedend[0]; - m_sim_track_endy[i_trk]= correctedend[1]; - m_sim_track_endz[i_trk]= correctedend[2]; - - m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); - - m_sim_track_px[i_trk]= mcparticle->Px(); - m_sim_track_py[i_trk]= mcparticle->Py(); - m_sim_track_pz[i_trk]= mcparticle->Pz(); - + if(trackToMCParticleMap.count(track)>0){ - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + const art::Ptr mcparticle = trackToMCParticleMap[track]; + std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - m_sim_track_sliceId[i_trk] = PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = PFPToClearCosmicMap[pfp]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); +// const art::Ptr pfp = ppfp->pPFParticle; + // const art::Ptr pfp = //trackToPFParticleMap[track]; + std::vector correctedstart(3); + std::vector correctedend(3); + std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; + // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); + this->spacecharge_correction(mcparticle, correctedend, raw_End); - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_track_parent_pdg[i_trk] = -1; - }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } + //std::cout<<"the corrected end of this mcparticle is "<E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = correctedstart[0]; + m_sim_track_starty[i_trk] = correctedstart[1]; + m_sim_track_startz[i_trk] = correctedstart[2]; - } + m_sim_track_endx[i_trk]= correctedend[0]; + m_sim_track_endy[i_trk]= correctedend[1]; + m_sim_track_endz[i_trk]= correctedend[2]; + + m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + + m_sim_track_px[i_trk]= mcparticle->Px(); + m_sim_track_py[i_trk]= mcparticle->Py(); + m_sim_track_pz[i_trk]= mcparticle->Pz(); + + + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + + m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + + + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + } i_trk++; } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h index 98a8e0a63..13c59f4ce 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h @@ -19,14 +19,14 @@ namespace single_photon{ * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit */ -void SinglePhoton::IsolationStudy( - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, - const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector, - int slice_w_bestnuID) + void SinglePhoton::IsolationStudy( + std::vector all_PPFPs, + const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, + const std::map, std::vector> > & pfParticleToHitsMap, + const std::map, int> & pfParticleToSliceIDMap, + const std::map>>& sliceIDToHitsMap, + detinfo::DetectorPropertiesData const & theDetector) { int total_track_hits =0; @@ -43,27 +43,29 @@ void SinglePhoton::IsolationStudy( // BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - art::Ptr pfp = trackToPFParticleMap[track]; - - int sliceid = pfParticleToSliceIDMap.at(pfp); - //CHECK temp. solution only work with best nuscore slice Keng - std::cout<<"Looking at slice "<> slicehits = sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = pfParticleToHitsMap.at(pfp); + art::Ptr track = tracks[t]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + art::Ptr pfp = trackToPFParticleMap[track]; - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; - total_track_hits += trackhits.size(); + int sliceid = pfParticleToSliceIDMap.at(pfp); + //CHECK temp. solution only work with best nuscore slice Keng + // std::cout<<"Looking at slice "<get_IsNuSlice()) continue; -//CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; -//CHECK temporary solution is to skip tracks[1]; - if(nu_slice_id != sliceid && nu_slice_id != -999){ - std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "<> slicehits = sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = pfParticleToHitsMap.at(pfp); + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + //CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; + //CHECK temporary solution is to skip tracks[1]; + if(nu_slice_id != sliceid && nu_slice_id != -999){ + std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< shower = showers[s]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); art::Ptr pfp = showerToPFParticleMap.at(shower); int sliceid = pfParticleToSliceIDMap.at(pfp); - if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng +// if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng + if(!ppfp->get_IsNuSlice()) continue; if(sliceid<0) continue; //negative sliceid is bad CHECK //CHECK ID not found? std::cout<<"CHECK "<<__LINE__<<" find hits at ID "<>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, + void SinglePhoton::showerRecoMCmatching( + std::vector all_PPFPs, + std::vector>& showerVector, + std::map,art::Ptr>& showerToMCParticleMap, +// std::map,art::Ptr>& showerToPFParticleMap, +// std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap , - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap){ +// std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap +// std::map& sliceIdToNuScoreMap +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,bool>& PFPToNuSliceMap + ){ std::vector vec_fraction_matched; std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; bool reco_verbose = false; - if(reco_verbose) std::cout<<"Strting "< pfp = objectToPFParticleMap[object]; +// if(reco_verbose)std::cout<<"We have "<Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]< pfp = ppfp->pPFParticle; + +// if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]< > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + std::vector< art::Ptr > obj_hits_ptrs = ppfp->pHits; //pfParticleToHitsMap[pfp]; /** * @@ -103,7 +108,7 @@ namespace single_photon bool found_a_match = false; - //std::cout<<"SinglePhoton::RecoMC()\t||\t On object: "<Self() <<"and slice id "<Self() <<"and slice id "<get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; + m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; if (m_sim_shower_isclearcosmic[i]== false){ std::cout<<"sim shower is matched to non-clear cosmic PFP "<Self()<get_IsNuSlice();//PFPToNuSliceMap[pfp]; // if (PFPToNuSliceMap[pfp] ==true){ // std::cout<<"m_sim_shower_is_nuslice is true for sim shower matched to reco pfp id "<Self()< ## Update Log The module does not work out of the box, so there are some modifications to make it fit into the SBND. -- New electric gains for SBND MC at `singlephoton_sbnd.fcl`, see SBN-doc-19505-v1; -- Update on geometry variables such as ... -- Disable Kalman dEdx variables -- Disable Second Shower Search 3D (`sss3d`) variables +- June 2022 + - New electric gains for SBND MC at `singlephoton_sbnd.fcl`, see SBN-doc-19505-v1; + - Update the neutrino slice definition in the `Single Photon` module. + - Update on geometry variables such as, `reco_*_dist_to_CathodePlane` + - Disable Kalman dEdx variables + - Disable Second Shower Search 3D (`sss3d`) variables + - Adapate SBND FHiCLs for filters: `NCRadiativeResonant` and `NCDeltaRadiative` +These updates are to accommodate the change of Pandora features listed below: ### Pandora features updates |Items|Pandora @ MicroBooNE|Pandora @ SBND| @@ -32,7 +36,7 @@ The module does not work out of the box, so there are some modifications to make |Neutrino Slice|One nu slice in each event | Multiple nu slices in each event| |Kalman Fitter| In-use | Not in-use| |3dShowers Objects| Available | Unavailable| -|MVA Method|Support Vector Machines|Boosted Decision Trees| +|MVA Method (for track/neutrino scores)|Support Vector Machines|Boosted Decision Trees| --- diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 266269076..36be05683 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,5 +1,6 @@ #include "SinglePhoton_module.h" #include "HelperFunctions/helper_processors.h" //now it can use variables defined in singlephoton.h +#include "HelperFunctions/helper_PandoraPFParticles.h" //now it can use variables defined in singlephoton.h #include "Libraries/init_branches.h" #include "Libraries/reco_truth_matching.h" //#include "analyze_Template.h" @@ -376,7 +377,7 @@ namespace single_photon //CHECK, try the new class, Keng - std::vector allPFParticles; + std::vector allPPFParticles; for(size_t index=0; index< pfParticleVector.size(); ++index){ // std::cout<<"CHECKING"<<__LINE__<> > sliceIDToPFParticlesMap; for(size_t i=0; i< sliceVector.size(); ++i){ auto slice = sliceVector[i]; - PPFP_FindSliceIDandHits(allPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); + PPFP_FindSliceIDandHits(allPPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); } - DefineNuSlice(allPFParticles); + //Mark all Pandora neutrino slices as neutrino slices and assign the highes neutrino score. + double pfp_w_bestnuID = DefineNuSlice(allPPFParticles); - std::cout<<"\nFinish preparing PandoraPFParticles at Line "<<__LINE__<<" CHECK! Now we have "<, std::vector> > sliceToHitsMap; @@ -444,74 +446,74 @@ namespace single_photon sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); } - size_t pfp_w_bestnuID = 0; - int slice_w_bestnuID = 0; - if(true){ - std::cout<<"SliceTest: there are "< spacers2 = Printer_header({ - "Slice#", - "nu?", - "#pfPart.", - "nu_score ", - "best_at", - "#primary", - "prim_pdg"}); - - double ref_nuscore = 0; - for(size_t s_index =0; s_index nu_scores; - bool isSelectedSlice = false; - int primaries_num = 0; - int primary_pdg = 0; - - for(auto &pfp: pfps){//loop through PFparticles of a slice - std::vector> metadatas = pfParticleToMetadataMap[pfp]; - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - //for each of the things in the list - if(propertiesmap.count("NuScore")==1){ - double tmp_nuscore = propertiesmap["NuScore"]; - nu_scores.push_back(tmp_nuscore); - if( tmp_nuscore > ref_nuscore){ - ref_nuscore = tmp_nuscore; - pfp_w_bestnuID = pfp->Self(); - slice_w_bestnuID = s_index; - } - } - if(propertiesmap.count("IsNeutrino")==1){ - isSelectedSlice = true; - } - } - - if (pfp->IsPrimary()) { - primaries_num++; - primary_pdg = (pfp->PdgCode()); - } - } - - if(nu_scores.size()>0){ - double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); - if(mean!=nu_scores.front()){ - std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<0)?nu_scores.front():-9), - std::to_string(pfp_w_bestnuID), - std::to_string(primaries_num), - std::to_string(primary_pdg) - }, spacers2); - } - }// End test of slice metadata +// size_t pfp_w_bestnuID = 0; +//// int slice_w_bestnuID = 0; +// if(true){ +// std::cout<<"SliceTest: there are "< spacers2 = Printer_header({ +// "Slice#", +// "nu?", +// "#pfPart.", +// "nu_score ", +// "best_at", +// "#primary", +// "prim_pdg"}); +// +// double ref_nuscore = 0; +// for(size_t s_index =0; s_index nu_scores; +// bool isSelectedSlice = false; +// int primaries_num = 0; +// int primary_pdg = 0; +// +// for(auto &pfp: pfps){//loop through PFparticles of a slice +// std::vector> metadatas = pfParticleToMetadataMap[pfp]; +// for(auto &meta: metadatas){ +// std::map propertiesmap = meta->GetPropertiesMap(); +// //for each of the things in the list +// if(propertiesmap.count("NuScore")==1){ +// double tmp_nuscore = propertiesmap["NuScore"]; +// nu_scores.push_back(tmp_nuscore); +// if( tmp_nuscore > ref_nuscore){ +// ref_nuscore = tmp_nuscore; +// pfp_w_bestnuID = pfp->Self(); +//// slice_w_bestnuID = s_index; +// } +// } +// if(propertiesmap.count("IsNeutrino")==1){ +// isSelectedSlice = true; +// } +// } +// +// if (pfp->IsPrimary()) { +// primaries_num++; +// primary_pdg = (pfp->PdgCode()); +// } +// } +// +// if(nu_scores.size()>0){ +// double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); +// if(mean!=nu_scores.front()){ +// std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<0)?nu_scores.front():-9), +// std::to_string(pfp_w_bestnuID), +// std::to_string(primaries_num), +// std::to_string(primary_pdg) +// }, spacers2); +// } +// }// End test of slice metadata @@ -766,43 +768,43 @@ namespace single_photon if(m_is_verbose) std::cout<<"\nSinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); std::cout<<"Finish AnalyzeSlices.\n"<Self()<<"th pfp in nuslice w. Pdgcode "<PdgCode()<> pfp_vec = pair.second; - int slice_id = pair.first; - //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) - for(auto pfp: pfp_vec){ - if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ - std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<Self()<<"th pfp in nuslice w. Pdgcode "<PdgCode()<> pfp_vec = pair.second; +// int slice_id = pair.first; +// //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) +// for(auto pfp: pfp_vec){ +// if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ +// std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<, std::vector< art::Ptr>> crtvetoToFlashMap; @@ -863,7 +865,7 @@ namespace single_photon //found in analyze_Tracks.h this->AnalyzeTracks( - allPFParticles, + allPPFParticles, tracks, // trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap @@ -882,7 +884,7 @@ namespace single_photon //found in analyze_Showers.h - this->AnalyzeShowers(allPFParticles, showers, + this->AnalyzeShowers(allPPFParticles, showers, // showerToNuPFParticleMap, // pfParticleToHitsMap, // pfParticleToClustersMap, @@ -901,25 +903,25 @@ namespace single_photon std::cout< spacers = Printer_header({"pfpID", "Parent ", "Vertex(x, "," y, ",", z )", "slice"," nu_score"," trk_score"," prim?"," nu?"," cos?"," S#"," T#"}); - for(size_t jndex=0; jndex< allPFParticles.size(); ++jndex){ - PandoraPFParticle temp_pf = allPFParticles[jndex]; + std::vector spacers = Printer_header({" pfpID", " Parent ", "Vertex(x, "," y, ",", z )", "slice "," nu_score"," trk_score "," prim? "," nu? "," cos? "," S# "," T# "}); + for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ + PandoraPFParticle temp_pf = allPPFParticles[jndex]; art::Ptr pfp = temp_pf.pPFParticle; Printer_content( {std::to_string(pfp->Self()), std::to_string(pfp->Parent()) , - std::to_string(temp_pf.pVertex_pos[0]), - std::to_string(temp_pf.pVertex_pos[1]), - std::to_string(temp_pf.pVertex_pos[2]), - std::to_string(temp_pf.pSliceID), - std::to_string(temp_pf.pNuScore), - std::to_string(temp_pf.pTrackScore), + std::to_string(temp_pf.get_Vertex_pos()[0]), + std::to_string(temp_pf.get_Vertex_pos()[1]), + std::to_string(temp_pf.get_Vertex_pos()[2]), + std::to_string(temp_pf.get_SliceID()), + std::to_string(temp_pf.get_NuScore()), + std::to_string(temp_pf.get_TrackScore()), (pfp->IsPrimary())? "T":" ", - (temp_pf.pIsNeutrino)? "T":" ", - (temp_pf.pIsClearCosmic)? "T":" ", - (temp_pf.pHasShower>0)? "1":" ", - (temp_pf.pHasTrack>0)? "1":" " + (temp_pf.get_IsNeutrino() )? "T":" ", + (temp_pf.get_IsClearCosmic() )? "T":" ", + (temp_pf.get_HasShower() >0)? "1":" ", + (temp_pf.get_HasTrack() >0)? "1":" " }, spacers); } @@ -964,7 +966,7 @@ namespace single_photon // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. // MCShower and MCTrack come from energy depositions in GEANT4 - //Only run if its not data :) + //Only run if its not data, i.e. MC events :) if(!m_is_data){ std::vector> gTruthVector; @@ -976,6 +978,7 @@ namespace single_photon if(m_is_verbose){ for(size_t p=0; p< gTruthVector.size();p++) std::cout< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); + std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching(showers, showerToMCParticleMap, showerToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, pfParticleMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap); + this->showerRecoMCmatching( + allPPFParticles, + showers, + showerToMCParticleMap, +// showerToNuPFParticleMap, +// pfParticleToHitsMap, + mcparticles_per_hit, + matchedMCParticleVector, +// pfParticleMap, + MCParticleToTrackIdMap); +// (sliceIdToNuScoreMap, +// PFPToClearCosmicMap, +// PFPToSliceIdMap, +// PFPToNuSliceMap); //photoNuclearTesting(matchedMCParticleVector); std::cout<<"\nStarting outside RecoMCTracks "<RecoMCTracks(tracks, trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap,mcParticleVector, MCParticleToTrackIdMap, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap,trk_overlay_vec); + this->RecoMCTracks( + allPPFParticles, + tracks, + //trackToNuPFParticleMap, + trackToMCParticleMap, + MCParticleToMCTruthMap, + mcParticleVector, + MCParticleToTrackIdMap, + //sliceIdToNuScoreMap, + //PFPToClearCosmicMap, + //PFPToSliceIdMap, + trk_overlay_vec); std::cout<<"\nStarting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); @@ -1045,7 +1073,6 @@ namespace single_photon //CHECK the following function cause a bug that crashes the code, //figure out why. this->AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); if (m_print_out_event){ if (m_matched_signal_shower_num != 1 || m_matched_signal_track_num != 1){ @@ -1129,24 +1156,26 @@ namespace single_photon std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"<IsolationStudy(tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector, slice_w_bestnuID); + if(!m_run_all_pfps && ! m_run_pi0_filter) this->IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); std::cout<<"CHECK "<<__LINE__<<" for a finished isolation study"< p_shr = showers.front(); @@ -1323,7 +1352,10 @@ namespace single_photon std::cout << "------------- Shower clustering --------------------" << std::endl; std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - if(!m_run_pi0_filter && m_runSEAview && (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ + if(!m_run_pi0_filter && + m_runSEAview && + (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && + (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ art::Ptr p_shr = showers.front(); art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 411ed20d6..e593187be 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -97,7 +97,6 @@ #include "HelperFunctions/helper_math.h" #include "HelperFunctions/helper_gadget.h" -//#include "Libraries/Atlas.h" //#include "Libraries/bad_channel_matching.h" #include "Libraries/DBSCAN.h" @@ -114,21 +113,39 @@ namespace single_photon //CHECK, blending this to the code; not active yet; class PandoraPFParticle{ - public: - //constructor: - PandoraPFParticle( - art::Ptr input_PFParticle, - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, - std::vector< art::Ptr > input_Vertex, - std::vector< art::Ptr > input_Clusters, - std::vector< art::Ptr > input_Showers, - std::vector< art::Ptr > input_Tracks - ) - : - pPFParticle(input_PFParticle), - pMetaData(input_MetaData), - pVertex(input_Vertex), - pClusters(input_Clusters) + private: + double pVertex_pos[3] = {-9999,-9999,-9999};//d + + double pNuScore = -999 ;//d + double pTrackScore = -999;//d + + bool pIsNeutrino = false;//d + bool pIsClearCosmic = false;//d + bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. + + int pHasShower = 0;//d + int pHasTrack = 0;//d + int pPdgCode = -999;//d + int pPFParticleID = -9;//d + int pAncestorID = -9;//d + int pSliceID = -9;//d + + + public: + //constructor: + PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) { pPFParticleID = pPFParticle->Self(); pPdgCode = pPFParticle->PdgCode(); @@ -149,7 +166,7 @@ namespace single_photon vertex->XYZ(pVertex_pos); } - + //get ancestor for a 1st generation PFParticle if(pPFParticle->IsPrimary()){ pAncestor = pPFParticle; @@ -167,36 +184,68 @@ namespace single_photon }; - art::Ptr< recob::PFParticle > pPFParticle;//d - art::Ptr< recob::Shower> pShower;//d with 0 or 1 element - art::Ptr< recob::Track > pTrack;//d with 0 or 1 element - art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() - art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() - art::Ptr< simb::MCTruth > pMCTruth; - - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d - std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pHits;//d - std::vector< art::Ptr< recob::Cluster > > pClusters;//d - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; - std::vector< art::Ptr< simb::MCParticle > > pMCParticles; - - double pVertex_pos[3] = {-9999,-9999,-9999};//d - - double pNuScore = -999 ;//d - double pTrackScore = -999;//d + art::Ptr< recob::PFParticle > pPFParticle;//d + art::Ptr< recob::Shower> pShower;//d with 0 or 1 element + art::Ptr< recob::Track > pTrack;//d with 0 or 1 element + art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + art::Ptr< simb::MCTruth > pMCTruth; + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d + std::vector< art::Ptr< recob::Vertex > > pVertex;//d + std::vector< art::Ptr< recob::Hit > > pHits;//d + std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; + std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + + + //set methods + void set_NuScore (const double input_score){ pNuScore = input_score; } + void set_TrackScore (const double input_score){ pTrackScore = input_score; } + + void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } + void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } + void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } + + void set_HasShower (const int input_number){ pHasShower = input_number; } + void set_HasTrack (const int input_number){ pHasTrack = input_number; } + void set_PdgCode (const int input_number){ pPdgCode = input_number; } + void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } + void set_AncestorID (const int input_number){ pAncestorID = input_number; } + void set_SliceID (const int input_number){ pSliceID = input_number; } + + //call method + const double*get_Vertex_pos() const; + + const double get_NuScore() const; + const double get_TrackScore () const; + + const bool get_IsNeutrino () const; + const bool get_IsClearCosmic () const; + const bool get_IsNuSlice () const; + + const int get_HasShower () const; + const int get_HasTrack () const; + const int get_PdgCode() const; + const int get_PFParticleID() const; + const int get_AncestorID() const; + const int get_SliceID () const; + }; + inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } - bool pIsNeutrino = false;//d - bool pIsClearCosmic = false;//d - bool pIsNuSlice = false;//d + inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } + inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } - int pHasShower = 0;//d - int pHasTrack = 0;//d - int pPdgCode = -999;//d - int pPFParticleID = -9;//d - int pAncestorID = -9;//d - int pSliceID = -9;//d - }; + inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } + inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } + inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } + + inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } + inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } + inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } + inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } + inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } + inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } //this is for second_shower_search.h @@ -550,12 +599,12 @@ namespace single_photon /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ void IsolationStudy( + std::vector all_PPFPs, const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector, - int slice_w_bestnuID); + detinfo::DetectorPropertiesData const & theDetector); @@ -593,11 +642,18 @@ namespace single_photon /* @brief: analyze MCParticle related to recob::Track if it has one * variables starting with 'm_sim_track_' will be updated * */ - void RecoMCTracks(const std::vector>& tracks, std::map,art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap,std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::map& sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::vector& vec); + void RecoMCTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + //std::map,art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + //std::map& sliceIdToNuScoreMap, + //std::map,bool>& PFPToClearCosmicMap, + //std::map, int>& PFPToSliceIdMap, + std::vector& vec); /* collect information from anab::sParticleIDAlgScores of reco track */ @@ -641,18 +697,20 @@ namespace single_photon * mcParticleVector: vector of mother particles of showers * objectToMCParticleMap: map of shower to its mother particle */ - void showerRecoMCmatching(std::vector>& objectVector, + void showerRecoMCmatching( + std::vector all_PPFPs, + std::vector>& objectVector, std::map,art::Ptr>& objectToMCParticleMap, - std::map,art::Ptr>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, + //std::map,art::Ptr>& objectToPFParticleMap, + //std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap); + //std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + //(std::map & sliceIdToNuScoreMap, + //std::map,bool>& PFPToClearCosmicMap, + //std::map, int>& PFPToSliceIdMap, + //std::map,bool>& PFPToNuSliceMap); /* tranverse through mcParticleVector, and print out infos for photons */ From 2b49064085ffa0965fb2f21e91e1b5e9545582a3 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 8 Jul 2022 09:35:35 -0500 Subject: [PATCH 31/54] update readme --- .../helper_PandoraPFParticles.h | 37 +- .../HelperFunctions/helper_processors.h | 341 ++++- .../Libraries/analyze_EventWeight.h | 2 +- .../Libraries/analyze_Geant4.h | 21 +- .../Libraries/analyze_MCTruth.h | 35 +- .../Libraries/analyze_Showers.h | 1056 +++++--------- .../Libraries/analyze_Slice.h | 67 +- .../Libraries/analyze_Tracks.h | 1291 ++++++++--------- .../Libraries/init_branches.h | 8 +- .../Libraries/isolation.h | 910 ++++++------ .../Libraries/reco_truth_matching.h | 440 ++---- sbncode/SinglePhotonAnalysis/README.md | 124 +- .../SinglePhoton_module.cc | 121 +- .../SinglePhoton_module.h | 97 +- .../jobs/singlephoton_sbnd.fcl | 2 +- 15 files changed, 2225 insertions(+), 2327 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index badfd003c..52b399112 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -44,7 +44,7 @@ namespace single_photon if(PPFPs[index].get_SliceID() > -1 ) continue;//slice# is found already if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ PPFPs[index].pSlice = slice; - PPFPs[index].pHits = Hit_inslice; + PPFPs[index].pSliceHits = Hit_inslice; PPFPs[index].set_SliceID( slice.key() ); break; } @@ -56,31 +56,36 @@ namespace single_photon int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ int pfp_size = PPFPs.size(); - std::map< int, double > temp_ID_nuscore_map; +// std::map< int, double > temp_ID_nuscore_map; double best_nuscore = 0; int best_nuscore_SliceID = 0; + std::vector< int > IDs; for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_p = PPFPs[index]; - if(temp_p.get_IsNeutrino()){ - - temp_ID_nuscore_map[ temp_p.get_SliceID()] = temp_p.get_NuScore(); - if(best_nuscore < temp_p.get_NuScore() ){ - best_nuscore = temp_p.get_NuScore(); - best_nuscore_SliceID = temp_p.get_SliceID(); - std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "<get_IsNeutrino()){ + int temp_sliceID = temp_p->get_SliceID(); + //add one if not found; + if(!std::count(IDs.begin(), IDs.end(), temp_sliceID) ) IDs.push_back(temp_sliceID); +// temp_ID_nuscore_map[ temp_p.get_SliceID()] = temp_p.get_NuScore(); + if(best_nuscore < temp_p->get_NuScore() ){ + best_nuscore = temp_p->get_NuScore(); + best_nuscore_SliceID = temp_p->get_SliceID(); +//// std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "<get_SliceID()) ) ppfp->set_IsNuSlice(true); +// if( PPFPs[index].get_SliceID() == best_nuscore_SliceID){ +// PPFPs[index].set_IsNuSlice( true ); +// PPFPs[index].set_NuScore( best_nuscore );//CHECK over-write the original score, if there is any; +// std::cout<<__FUNCTION__<<" CHECK Set nu slice "<> hitVector = VectorFromLabel(dummy_hit, evt, m_hitfinderLabel); - template //A helper template that allows you to make compliated types. - struct temporary_types{ - using type1 = std::vector>; - using type2 = art::ValidHandle>; - using type3 = std::vector; - }; - - template //ref_type is only used to identify the temporary_types late. - typename temporary_types::type1 VectorFromLabel(recob_object ref_type, const art::Event &evt, std::string &label){ - - typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); - typename temporary_types::type1 Vector; - art::fill_ptr_vector(Vector,Handle); - return Vector; - } +// template //A helper template that allows you to make compliated types. +// struct temporary_types{ +// using type1 = std::vector>; +// using type2 = art::ValidHandle>; +// using type3 = std::vector; +// }; +// +// template //ref_type is only used to identify the temporary_types late. +// typename temporary_types::type1 VectorFromLabel(recob_object ref_type, const art::Event &evt, std::string &label){ +// +// typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); +// typename temporary_types::type1 Vector; +// art::fill_ptr_vector(Vector,Handle); +// return Vector; +// } //--------------------- a template to get vectors from labels ------------------------- //-------- Only use this once for now, potentially 13+ more lines can be saved -------- @@ -384,7 +384,7 @@ namespace single_photon MCParticleToTrackIdMap[particle->TrackId()] = particle; } - std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()<size()< > &simChannelVector) @@ -511,4 +511,313 @@ namespace single_photon return false; } + + //helpers for calculating calometry + double SinglePhoton::CalcEShower(const std::vector> &hits){ + double energy[3] = {0., 0., 0.}; + + //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); + + //skip invalid planes + if (plane > 2 || plane < 0) continue; + + //calc the energy of the hit + double E = QtoEConversion(GetQHit(thishitptr, plane)); + + //add the energy to the plane + energy[plane] += E; + }//for each hiti + + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; + } + } + // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "<>& hits, int this_plane){ + double energy = 0.; + + //for each hit in the shower + for (auto &thishitptr : hits){ + //check the plane + int plane= thishitptr->View(); + + //skip invalid planes + if (plane != this_plane ) continue; + + //calc the energy of the hit + double E = QtoEConversion(GetQHit(thishitptr, plane)); + //add the energy to the plane + energy += E; + }//for each hit + + return energy; + + } + + + + + double SinglePhoton::GetQHit(art::Ptr thishitptr, int plane){ + double gain; + //choose gain based on whether data/mc and by plane + if (m_is_data == false && m_is_overlayed == false){ + gain = m_gain_mc[plane] ; + //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; + return Q; + } + + + double SinglePhoton::QtoEConversion(double Q){ + //return the energy value converted to MeV (the factor of 1e-6) + double E = Q* m_work_function *1e-6 /m_recombination_factor; + return E; + + } + + + std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ + int n = dqdx.size(); + std::vector dedx(n,0.0); + for (int i = 0; i < n; i++){ + //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector){ + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; + + //get the 3D shower direction + //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented + TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); + + //calculate the pitch for this plane + double pitch = getPitch(shower_dir, plane); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ + //keep only clusters on the plane + if(thiscluster->View() != plane) continue; + + //calculate the cluster direction + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + + //get the cluster start and and in CM + //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; + + //check that the cluster has non-zero length + double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< > mcFluxHandle; e.getByLabel("generator", mcFluxHandle); if (!mcFluxHandle.isValid()) return; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h index 6336523f6..5f0d9a127 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h @@ -4,13 +4,28 @@ namespace single_photon void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); for(size_t j=0;j< mcParticleVector.size();j++){ const art::Ptr mcp = mcParticleVector[j]; - std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()), + std::to_string(mcp->StatusCode()), + std::to_string(mcp->TrackId()), + std::to_string(mcp->Mother()), + mcp->Process(), + mcp->EndProcess(), + std::to_string(mcp->E()), + std::to_string(mcp->Vx()), + std::to_string(mcp->Vy()), + std::to_string(mcp->Vz()) + }, + spacers); + m_geant4_pdg.push_back(mcp->PdgCode()); m_geant4_trackid.push_back(mcp->TrackId()); m_geant4_statuscode.push_back(mcp->StatusCode()); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 2cbe8c9f8..07cca1d3b 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -4,7 +4,7 @@ namespace single_photon //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tTotal "<1){ std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); + std::vector spacers = Printer_header({" NuPdg"," CC=0"," TruthVertex(x,"," y, ",", z )"}); for(int i=0; i truth = mcTruthVector[i]; // std::cout<<"\nCHECK THIS MCTruth!! "<<*truth<NParticles(); //MCTruth_NParticles - if(m_is_verbose){ - std::cout<<"We are working with :"<NParticles()<<" daughters "< spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); + + this->ResizeMCTruths(m_mctruth_num_daughter_particles); @@ -120,7 +123,7 @@ namespace single_photon m_mctruth_exiting_photon_py.push_back(par.Py()); m_mctruth_exiting_photon_pz.push_back(par.Pz()); } - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "< m_exiting_photon_energy_threshold){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 05396996b..63db40991 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -3,327 +3,301 @@ namespace single_photon void SinglePhoton::AnalyzeShowers( std::vector all_PPFPs, const std::vector>& showers, -// std::map, art::Ptr> & showerToPFParticleMap, -// std::map, std::vector>> & pfParticleToHitMap, -// std::map, std::vector> > & pfParticleToClusterMap, std::map, std::vector> > & clusterToHitMap , -// std::map& sliceIdToNuScoreMap, -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,bool> &PFPToNuSliceMap, -// std::map,double> &PFPToTrackScoreMap, -// PFParticleIdMap &pfParticleMap, std::map, art::Ptr>& PFPtoShowerReco3DMap, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector ){ -//CHECK try to use all_PPFPs to get the correct nu score. - m_is_verbose= true; // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); - if(m_is_verbose) std::cout<<__FUNCTION__<<" CHECK showers found: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )"}); +// if(m_is_verbose) std::cout<<__FUNCTION__<<" CHECK showers found: "< spacers = Printer_header({"Slice"," pfpID"," Start(x, "," y, "," z )"," trackscore"," pdg"}); for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { + { - const art::Ptr shower = *iter; -// const art::Ptr pfp = showerToPFParticleMap[shower]; + const art::Ptr shower = *iter; + // const art::Ptr pfp = showerToPFParticleMap[shower]; //CHECK I think I can take care of all pfpmaps here; PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); const art::Ptr pfp = ppfp->pPFParticle; -// std::cout<<"CHECK SHower pfparticle "<Self()<<" and "<Self()< shower3d; - if(PFPtoShowerReco3DMap.count(pfp)==0){ -// std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; -// const std::vector> clusters = pfParticleToClusterMap[pfp]; - - const std::vector> hits = ppfp->pHits; + // std::cout<<"CHECK SHower pfparticle "<Self()<<" and "<Self()< shower3d; + if(PFPtoShowerReco3DMap.count(pfp)==0){ + // std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; + // const std::vector> clusters = pfParticleToClusterMap[pfp]; + + const std::vector> hits = ppfp->pPFPHits; const std::vector> clusters = ppfp->pClusters; - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); - - TVector3 shr_start = shower->ShowerStart(); - TVector3 shr_dir = shower->Direction(); - - TVector3 shr3d_start = shower3d->ShowerStart(); - TVector3 shr3d_dir = shower3d->Direction(); - -// if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; - m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); - m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); - - m_reco_shower_dirx[i_shr] = shr_dir.X(); - m_reco_shower_diry[i_shr] = shr_dir.Y(); - m_reco_shower_dirz[i_shr] = shr_dir.Z(); - m_reco_shower_length[i_shr] = m_length; - m_reco_shower_openingangle[i_shr] = m_open_angle; - - m_reco_shower3d_startx[i_shr] = shr3d_start.X(); - m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); - m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); - m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); - m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); - m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); - m_reco_shower3d_length[i_shr] = shower3d->Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - - - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); - - //pandroa shower - std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; - std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; - - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; - - //now 3D shower - std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; - std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - - - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); - - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); - - - m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - std::vector t_num(3,0); // num of triangles on each plane - std::vector t_numhits(3,0); // num of hits on each plane - std::vector t_area(3,0.0); - - //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull -// if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - - //auto finish = std::chrono::high_resolution_clock::now(); - //auto microseconds = std::chrono::duration_cast(finish-start); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "<ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); - const std::vector< double > shr3d_energy = shower3d->Energy(); - const std::vector< double > shr3d_dEdx = shower3d->dEdx(); - //const int shr3d_bestplane = shower3d->best_plane(); + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); - // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); - int wire = h->WireID().Wire; - int tick = h->PeakTime(); - - m_reco_shower_hit_tick.push_back(tick); - m_reco_shower_hit_plane.push_back(plane); - m_reco_shower_hit_wire.push_back(wire); - - - - - } - - } + std::vector hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; + m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); + m_reco_shower_dirx[i_shr] = shr_dir.X(); + m_reco_shower_diry[i_shr] = shr_dir.Y(); + m_reco_shower_dirz[i_shr] = shr_dir.Z(); + m_reco_shower_length[i_shr] = m_length; + m_reco_shower_openingangle[i_shr] = m_open_angle; + m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + m_reco_shower3d_length[i_shr] = shower3d->Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + + double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); + m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + + + m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); + m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + + m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); + m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + + + m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + std::vector t_num(3,0); // num of triangles on each plane + std::vector t_numhits(3,0); // num of hits on each plane + std::vector t_area(3,0.0); + + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); + + //auto finish = std::chrono::high_resolution_clock::now(); + //auto microseconds = std::chrono::duration_cast(finish-start); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + //const int shr3d_bestplane = shower3d->best_plane(); + + // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); + int wire = h->WireID().Wire; + int tick = h->PeakTime(); + + m_reco_shower_hit_tick.push_back(tick); + m_reco_shower_hit_plane.push_back(plane); + m_reco_shower_hit_wire.push_back(wire); + } + } - //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); - - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; - if(ymin > ymax) std::swap(ymin, ymax); - - //Code property of Gray Yarbrough (all rights reserved) - //int optical_flash_in_beamgate_counter=0; - double shortest_dist_to_flash_z=DBL_MAX; - double shortest_dist_to_flash_y=DBL_MAX; - double shortest_dist_to_flash_yz=DBL_MAX; - //-999 my nonsenese int can change - int shortest_dist_to_flash_index_z=-999; - int shortest_dist_to_flash_index_y=-999; - int shortest_dist_to_flash_index_yz=-999; - -// if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { - dist_z = zcenter - zmax; - } - else { - dist_z = 0; - } - if(dist_z < shortest_dist_to_flash_z){ - shortest_dist_to_flash_z = dist_z; - shortest_dist_to_flash_index_z=i_flash; - } - - - //y plane - - double dist_y=DBL_MAX; - if(ycenter < ymin) { - dist_y = ymin - ycenter; - } - else if(ycenter > ymax) { - dist_y = ycenter - ymax; - } - else { - dist_y= 0; - } - if(dist_y < shortest_dist_to_flash_y){ - shortest_dist_to_flash_y = dist_y; - shortest_dist_to_flash_index_y=i_flash; - } - - double dist_yz=DBL_MAX; - dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); - if(dist_yzNumDaughters(); //corresponding PFParticle -// std::cout<<" CHECK numebr "<0){ - //currently just look at 1 daughter - //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + //-------------- Flashes : Was there a flash in the beam_time and if so was it near in Z? -------------------- + double zmin = m_reco_shower_startz[i_shr]; + double zmax = zmin + m_reco_shower_dirz[i_shr]*m_reco_shower_length[i_shr]; + if(zmin > zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); //corresponding PFParticle + // std::cout<<" CHECK numebr "<0){ + //currently just look at 1 daughter + //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ -// std::cout<<"CHECK Compare "<Daughters().front()<< -// " "<Self()<Daughters().front()<< + // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); break; } - } + } - //------------and finally some slice info----------------- - - m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - //m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; - //std::cout<<"m_reco_shower_is_nuslice[i_shr] = "<Self()<get_SliceID();//PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); - // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - // m_reco_shower_trackscore[i_shr] = PFPToTrackScoreMap[pfp]; - // m_reco_shower_pfparticle_pdg[i_shr] = pfp->PdgCode(); - // } else{ - // m_reco_shower_trackscore[i_shr] = -999; - // m_reco_shower_pfparticle_pdg[i_shr] = -999; - // } -// if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "<0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )"}); -// Printer_content( -// {std::to_string(ppfp->pSliceID), -// std::to_string(ppfp->pPFParticleID), -// std::to_string(shr_start.X()), -// std::to_string(shr_start.Y()), -// std::to_string(shr_start.Z()) -// },spacers); + //std::vector spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )", "trackScore", "Pdg"}); + Printer_content( + {std::to_string(ppfp->get_SliceID()), + std::to_string(ppfp->get_PFParticleID()), + std::to_string(shr_start.X()), + std::to_string(shr_start.Y()), + std::to_string(shr_start.Z()), + std::to_string(ppfp->get_TrackScore()), + std::to_string(ppfp->get_PdgCode()) + },spacers); - } + } //Lets sort and order the showers m_reco_shower_ordered_energy_index = sort_indexes(m_reco_shower_energy_max); @@ -501,6 +459,7 @@ namespace single_photon std::map, std::vector>> & pfParticleToHitMap, detinfo::DetectorPropertiesData const & theDetector){ std::cout<<"NO Kalman stuff in SBND" <> &hits){ - double energy[3] = {0., 0., 0.}; - - //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "<>& hits, int this_plane){ - double energy = 0.; - - //for each hit in the shower - for (auto &thishitptr : hits){ - //check the plane - int plane= thishitptr->View(); - - //skip invalid planes - if (plane != this_plane ) continue; - - //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); - //add the energy to the plane - energy += E; - }//for each hit - - return energy; - - } - - - - - double SinglePhoton::GetQHit(art::Ptr thishitptr, int plane){ - double gain; - //choose gain based on whether data/mc and by plane - if (m_is_data == false && m_is_overlayed == false){ - gain = m_gain_mc[plane] ; - //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; - return Q; - } - - - double SinglePhoton::QtoEConversion(double Q){ - //return the energy value converted to MeV (the factor of 1e-6) - double E = Q* m_work_function *1e-6 /m_recombination_factor; - return E; - - } - - - std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ - int n = dqdx.size(); - std::vector dedx(n,0.0); - for (int i = 0; i < n; i++){ - //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector){ - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; - - //get the 3D shower direction - //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented - TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); - - //calculate the pitch for this plane - double pitch = getPitch(shower_dir, plane); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ - //keep only clusters on the plane - if(thiscluster->View() != plane) continue; - - //calculate the cluster direction - std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; - - //get the cluster start and and in CM - //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; - std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; - - //check that the cluster has non-zero length - double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< all_PPFPs, std::map> & MCParticleToTrackIDMap, std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, @@ -385,9 +386,14 @@ namespace single_photon std::map, art::Ptr > &trackToMCParticleMap, std::map, int>& PFPToSliceIdMap){ - m_reco_slice_num_pfps = GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice - m_reco_slice_num_showers = GetNumShowersPerSlice(showerToPFParticleMap, PFPToSliceIdMap); //the subset of PFP's that are showers - m_reco_slice_num_tracks = GetNumTracksPerSlice(trackToNuPFParticleMap, PFPToSliceIdMap); + + for(size_t index=0; index< all_PPFPs.size(); ++index){ + PandoraPFParticle* temp_ppfp = &all_PPFPs[index]; + if(!temp_ppfp->get_IsNuSlice()) continue; + m_reco_slice_num_pfps[temp_ppfp->get_SliceID()]++;//GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice + m_reco_slice_num_showers[temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasShower();// = GetNumShowersPerSlice(showerToPFParticleMap, PFPToSliceIdMap); //the subset of PFP's that are showers + m_reco_slice_num_tracks [temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasTrack();//= GetNumTracksPerSlice(trackToNuPFParticleMap, PFPToSliceIdMap); + } //first check if in the event there's a match to a given signal @@ -497,34 +503,33 @@ namespace single_photon } //CHECK, text reports - if(m_is_verbose){ - if (m_reco_1g1p_is_nuslice){ - int nu_id = m_matched_signal_shower_sliceId[0]; - for (auto pair: PFPToSliceIdMap){ - auto pfp = pair.first; - auto id = pair.second; - if (id == nu_id){ - std::cout<<"the pfp in this nu slice with id "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ - std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ +// std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "< all_PPFPs, const std::vector>& tracks, -// std::map, art::Ptr> & trackToNuPFParticleMap, -// std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfParticleToSpacePointsMap, - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap -// std::map,bool> &PFPToClearCosmicMap, -// std::map, int> &PFPToSliceIdMap, -// std::map,double> &PFPToTrackScoreMap, -// std::map,bool> &PFPToNuSliceMap, -// PFParticleIdMap &pfParticleMap - ){ + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); + this->ResizeTracks(m_reco_asso_tracks); - //const double adc2eU(5.1e-3); - //const double adc2eV(5.2e-3); - // const double adc2eW(5.4e-3); + //const double adc2eU(5.1e-3); + //const double adc2eV(5.2e-3); + // const double adc2eW(5.4e-3); - // const double tau(theDetector->ElectronLifetime()); + // const double tau(theDetector->ElectronLifetime()); - //loop over each recob::Track - for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) - { + //loop over each recob::Track + for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) + { - const art::Ptr track = *iter; -// const art::Ptr pfp = trackToNuPFParticleMap[track]; + const art::Ptr track = *iter; + // const art::Ptr pfp = trackToNuPFParticleMap[track]; PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); const art::Ptr pfp = ppfp->pPFParticle; - const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; - const std::vector> trk_hits = ppfp->pHits;//pfParticleToHitsMap[pfp]; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; + const std::vector> trk_hits = ppfp->pPFPHits;//pfParticleToHitsMap[pfp]; + + int m_trkid = track->ID(); + double m_length = track->Length(); + auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector + //first: direction of first point, second: direction of the end of track - int m_trkid = track->ID(); - double m_length = track->Length(); - auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector - //first: direction of first point, second: direction of the end of track + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); + m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); + m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); + m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); - m_reco_track_calo_energy_plane0[i_trk] = this->CalcEShowerPlane(trk_hits, 0); - m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); - m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); - m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); + m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); - m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); + m_reco_track_startx[i_trk]= track->Start().X(); + m_reco_track_starty[i_trk]= track->Start().Y(); + m_reco_track_startz[i_trk]= track->Start().Z(); - m_reco_track_startx[i_trk]= track->Start().X(); - m_reco_track_starty[i_trk]= track->Start().Y(); - m_reco_track_startz[i_trk]= track->Start().Z(); + m_reco_track_length[i_trk] =m_length; + m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); + m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); + m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); - m_reco_track_length[i_trk] =m_length; - m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); - m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); - m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + m_reco_track_endx[i_trk] = track->End().X(); + m_reco_track_endy[i_trk]= track->End().Y(); + m_reco_track_endz[i_trk]= track->End().Z(); - m_reco_track_endx[i_trk] = track->End().X(); - m_reco_track_endy[i_trk]= track->End().Y(); - m_reco_track_endz[i_trk]= track->End().Z(); - - std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); - m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); + m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); - m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); - m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); + m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); - m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); - m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); + m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); - std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - double max_dist_from_line = -9999999; + std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + double max_dist_from_line = -9999999; - m_reco_track_spacepoint_chi[i_trk] = 0.0; - //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. + m_reco_track_spacepoint_chi[i_trk] = 0.0; + //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; - principal->AddRow(&tmp_spacepoints[0]); + TPrincipal* principal = new TPrincipal(3,"ND"); + for(int x = 0; x < m_reco_track_num_spacepoints[i_trk]; x++){ + // get the position of spacepoint in xyz + std::vector tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; + principal->AddRow(&tmp_spacepoints[0]); - // distance between track direction and spacepoint - double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); - if(dist> max_dist_from_line) max_dist_from_line = dist; - m_reco_track_spacepoint_chi[i_trk] += dist*dist; - } - m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + // distance between track direction and spacepoint + double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); + if(dist> max_dist_from_line) max_dist_from_line = dist; + m_reco_track_spacepoint_chi[i_trk] += dist*dist; + } + m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; - principal->MakePrincipals(); - TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); + principal->MakePrincipals(); + TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); - m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); - m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); - m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); - delete principal; + delete principal; - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<get_SliceID();//PFPToSliceIdMap[pfp]; - // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? - // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. - m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; - m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? + // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. + m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; + m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - //std::cout<<"checking track nuslice"<Self()<<" is: "<get_IsNuSlice();//PFPToNuSliceMap[pfp]; + //std::cout<<"checking track nuslice"<Self()<<" is: "<get_IsNuSlice();//PFPToNuSliceMap[pfp]; - m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); - if(m_reco_track_num_daughters[i_trk]>0){ - //currently just look at 1 daughter -// m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); + if(m_reco_track_num_daughters[i_trk]>0){ + //currently just look at 1 daughter + // m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); @@ -159,67 +151,67 @@ namespace single_photon break; } - } + } m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; -// if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { -// m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; -// m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); -// } else{ -// m_reco_track_trackscore[i_trk] = -999; -// m_reco_track_pfparticle_pdg[i_trk] = -999; -// } + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); + // } else{ + // m_reco_track_trackscore[i_trk] = -999; + // m_reco_track_pfparticle_pdg[i_trk] = -999; + // } - //A loop over the trajectory points - size_t const traj_size = track->CountValidPoints(); - m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + //A loop over the trajectory points + size_t const traj_size = track->CountValidPoints(); + m_reco_track_num_trajpoints[i_trk] = (int)traj_size; - for(unsigned int p = 0; p < traj_size; ++p) { - //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); - //recob::Track::Point_t const & pos = trajp.position; - //recob::Track::Vector_t const & mom = trajp.momentum; + for(unsigned int p = 0; p < traj_size; ++p) { + //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); + //recob::Track::Point_t const & pos = trajp.position; + //recob::Track::Vector_t const & mom = trajp.momentum; - } + } - i_trk++; + i_trk++; - } // end of recob::Track loop + } // end of recob::Track loop - //Lets sort and order the showers - m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); - m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + //Lets sort and order the showers + m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); + m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."< all_PPFPs, const std::vector>& tracks, -// std::map, art::Ptr> & trackToPFParticleMap, + // std::map, art::Ptr> & trackToPFParticleMap, std::map, art::Ptr > & trackToMCParticleMap, std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, -// std::map& sliceIdToNuScoreMap, -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNuScoreMap, + // std::map,bool>& PFPToClearCosmicMap, + // std::map, int>& PFPToSliceIdMap, std::vector & vfrac ){ - //if(m_is_verbose) - std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; - m_sim_track_matched[i_trk] = 0; + for(size_t k =0; k< tracks.size();++k){ + const art::Ptr track = tracks[k]; + m_sim_track_matched[i_trk] = 0; if(trackToMCParticleMap.count(track)>0){ @@ -228,7 +220,7 @@ namespace single_photon const art::Ptr mctruth = MCParticleToMCTruthMap[mcparticle]; PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); -// const art::Ptr pfp = ppfp->pPFParticle; + // const art::Ptr pfp = ppfp->pPFParticle; // const art::Ptr pfp = //trackToPFParticleMap[track]; std::vector correctedstart(3); @@ -278,521 +270,528 @@ namespace single_photon } } - i_trk++; - } + i_trk++; + } + + return; + } + + + + + + void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs){ + + if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + std::vector> Calos = ppfp->get_Calorimetries(); + + if(Calos.size()!=3){ + std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = Calos[0]; + const art::Ptr calo_p1 = Calos[1]; + const art::Ptr calo_p2 = Calos[2]; + + + size_t calo_length_p0 = calo_p0->dEdx().size(); + size_t calo_length_p1 = calo_p1->dEdx().size(); + size_t calo_length_p2 = calo_p2->dEdx().size(); + + TruncMean tm_p0; + TruncMean tm_p1; + TruncMean tm_p2; + + std::vector trunc_dEdx_p0; + std::vector res_range_good_p0; + std::vector dEdx_good_p0; + + std::vector trunc_dEdx_p1; + std::vector res_range_good_p1; + std::vector dEdx_good_p1; + + std::vector trunc_dEdx_p2; + std::vector res_range_good_p2; + std::vector dEdx_good_p2; + + m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + + m_reco_track_best_calo_plane[i_trk]=-1; + + // guanqun: vectors have been clear and resized, so probably not need to reset their values? + m_reco_track_good_calo_p0[i_trk] = 0; + m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + m_reco_track_good_calo_p1[i_trk] = 0; + m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + m_reco_track_good_calo_p2[i_trk] = 0; + m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + + + + //First off look over ALL points + //--------------------------------- plane 0 ----------- Induction + for (size_t k = 0; k < calo_length_p0; ++k) { + double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track + double dEdx = calo_p0->dEdx()[k]; + + m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + if(k <= calo_length_p0/2){ + m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + } - return; - } + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; // != has higher precedence than = + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ + res_range_good_p0.push_back(res_range); + dEdx_good_p0.push_back(dEdx); + } + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p0.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p0.setRadius(rad); + tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ + double dEdx = trunc_dEdx_p0[k]; + m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + if(k <= trunc_dEdx_p0.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<> &tracks, std::map,std::vector> > &trackToCaloMap) - { + //std::cout<<"the residual range at the start is "<ResidualRange()[k]; + double dEdx = calo_p1->dEdx()[k]; + + m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + if(k <= calo_length_p1/2){ + m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + } - for(size_t i_trk = 0; i_trk track = tracks[i_trk]; + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; - if(trackToCaloMap[track].size()!=3){ - std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = trackToCaloMap[track][0]; - const art::Ptr calo_p1 = trackToCaloMap[track][1]; - const art::Ptr calo_p2 = trackToCaloMap[track][2]; + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - size_t calo_length_p0 = calo_p0->dEdx().size(); - size_t calo_length_p1 = calo_p1->dEdx().size(); - size_t calo_length_p2 = calo_p2->dEdx().size(); - - TruncMean tm_p0; - TruncMean tm_p1; - TruncMean tm_p2; - - std::vector trunc_dEdx_p0; - std::vector res_range_good_p0; - std::vector dEdx_good_p0; - - std::vector trunc_dEdx_p1; - std::vector res_range_good_p1; - std::vector dEdx_good_p1; - - std::vector trunc_dEdx_p2; - std::vector res_range_good_p2; - std::vector dEdx_good_p2; - - m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; - m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; - m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; - - m_reco_track_best_calo_plane[i_trk]=-1; - - // guanqun: vectors have been clear and resized, so probably not need to reset their values? - m_reco_track_good_calo_p0[i_trk] = 0; - m_reco_track_mean_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; - - m_reco_track_good_calo_p1[i_trk] = 0; - m_reco_track_mean_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; - - m_reco_track_good_calo_p2[i_trk] = 0; - m_reco_track_mean_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; - - - - //First off look over ALL points - //--------------------------------- plane 0 ----------- Induction - for (size_t k = 0; k < calo_length_p0; ++k) { - double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track - double dEdx = calo_p0->dEdx()[k]; - - m_reco_track_mean_dEdx_p0[i_trk] += dEdx; - if(k <= calo_length_p0/2){ - m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; // != has higher precedence than = - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ - res_range_good_p0.push_back(res_range); - dEdx_good_p0.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p0.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p0.setRadius(rad); - tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ - double dEdx = trunc_dEdx_p0[k]; - m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; - if(k <= trunc_dEdx_p0.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p1->dEdx()[k]; - - m_reco_track_mean_dEdx_p1[i_trk] += dEdx; - if(k <= calo_length_p1/2){ - m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ - res_range_good_p1.push_back(res_range); - dEdx_good_p1.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p1.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p1.setRadius(rad); - tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ - double dEdx = trunc_dEdx_p1[k]; - m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; - if(k <= trunc_dEdx_p1.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p2->dEdx()[k]; - - m_reco_track_mean_dEdx_p2[i_trk] += dEdx; - if(k <= calo_length_p2/2){ - m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ - res_range_good_p2.push_back(res_range); - dEdx_good_p2.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p2.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p2.setRadius(rad); - tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ - double dEdx = trunc_dEdx_p2[k]; - m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; - if(k <= trunc_dEdx_p2.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ - m_reco_track_best_calo_plane[i_trk] = 0; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; - - - }else if(m_reco_track_good_calo_p1[i_trk]!=0){ - m_reco_track_best_calo_plane[i_trk] = 1; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; - - - - }else{ - m_reco_track_best_calo_plane[i_trk] = -1; - } - - - } - } - - - - void SinglePhoton::CollectPID( std::vector> & tracks, - std::map< art::Ptr, art::Ptr> & trackToPIDMap){ - - for(size_t i_trk=0; i_trk track = tracks[i_trk]; - art::Ptr pid = trackToPIDMap[track]; - if (!pid) { - std::cout << "[analyze_Tracks] bad PID object" << std::endl; - continue; - } - - // For each PID object, create vector of PID scores for each algorithm - // Loop over this and get scores for algorithm of choice - // But first, prepare garbage values, just in case - std::vector AlgScoresVec = pid->ParticleIDAlgScores(); - double pidScore_BL_mu_plane0 = -999; - double pidScore_BL_mu_plane1 = -999; - double pidScore_BL_mu_plane2 = -999; - double pidScore_BL_p_plane0 = -999; - double pidScore_BL_p_plane1 = -999; - double pidScore_BL_p_plane2 = -999; - double pidScore_BL_mip_plane0 = -999; - double pidScore_BL_mip_plane1 = -999; - double pidScore_BL_mip_plane2 = -999; - double pidScore_PIDA_plane0 = -999; - double pidScore_PIDA_plane1 = -999; - double pidScore_PIDA_plane2 = -999; - double pidScore_chi2_mu_plane0 = -999; - double pidScore_chi2_mu_plane1 = -999; - double pidScore_chi2_mu_plane2 = -999; - double pidScore_chi2_p_plane0 = -999; - double pidScore_chi2_p_plane1 = -999; - double pidScore_chi2_p_plane2 = -999; - double pidScore_three_plane_proton = -999; - - //int planeid = 2; - for (size_t i_algscore=0; i_algscore1; j--){ + double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p1.setRadius(rad); + tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ + double dEdx = trunc_dEdx_p1[k]; + m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + if(k <= trunc_dEdx_p1.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p2->dEdx()[k]; + + m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + if(k <= calo_length_p2/2){ + m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ + res_range_good_p2.push_back(res_range); + dEdx_good_p2.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p2.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p2.setRadius(rad); + tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ + double dEdx = trunc_dEdx_p2[k]; + m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + if(k <= trunc_dEdx_p2.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ + m_reco_track_best_calo_plane[i_trk] = 0; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; + + + }else if(m_reco_track_good_calo_p1[i_trk]!=0){ + m_reco_track_best_calo_plane[i_trk] = 1; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + + + + }else{ + m_reco_track_best_calo_plane[i_trk] = -1; + } + + + } + } + + + + void SinglePhoton::CollectPID(std::vector> & tracks, + std::vector all_PPFPs){ + + for(size_t i_trk=0; i_trk track = tracks[i_trk]; + + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + art::Ptr pid = ppfp->get_ParticleID();//trackToPIDMap[track]; + if (!ppfp->get_HasPID()) { + std::cout << "[analyze_Tracks] bad PID object" << std::endl; + continue; + } + + // For each PID object, create vector of PID scores for each algorithm + // Loop over this and get scores for algorithm of choice + // But first, prepare garbage values, just in case + std::vector AlgScoresVec = pid->ParticleIDAlgScores(); + double pidScore_BL_mu_plane0 = -999; + double pidScore_BL_mu_plane1 = -999; + double pidScore_BL_mu_plane2 = -999; + double pidScore_BL_p_plane0 = -999; + double pidScore_BL_p_plane1 = -999; + double pidScore_BL_p_plane2 = -999; + double pidScore_BL_mip_plane0 = -999; + double pidScore_BL_mip_plane1 = -999; + double pidScore_BL_mip_plane2 = -999; + double pidScore_PIDA_plane0 = -999; + double pidScore_PIDA_plane1 = -999; + double pidScore_PIDA_plane2 = -999; + double pidScore_chi2_mu_plane0 = -999; + double pidScore_chi2_mu_plane1 = -999; + double pidScore_chi2_mu_plane2 = -999; + double pidScore_chi2_p_plane0 = -999; + double pidScore_chi2_p_plane1 = -999; + double pidScore_chi2_p_plane2 = -999; + double pidScore_three_plane_proton = -999; + + //int planeid = 2; + for (size_t i_algscore=0; i_algscore all_PPFPs, - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, - const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector) -{ + const std::vector>& tracks, + const std::vector>& showers, + detinfo::DetectorPropertiesData const & theDetector) { int total_track_hits =0; int total_shower_hits =0; @@ -41,94 +37,100 @@ namespace single_photon{ std::vector< std::map >> > v_newClusterToHitsMap(3); + std::vector> slicehits; + // BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS for(size_t t =0; t< tracks.size(); t++){ art::Ptr track = tracks[t]; PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - art::Ptr pfp = trackToPFParticleMap[track]; +// art::Ptr pfp = ppfp->pPFParticle;//trackToPFParticleMap[track]; - int sliceid = pfParticleToSliceIDMap.at(pfp); + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); //CHECK temp. solution only work with best nuscore slice Keng // std::cout<<"Looking at slice "<get_IsNuSlice()) continue; - std::vector> slicehits = sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = pfParticleToHitsMap.at(pfp); + std::vector> tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + if(ppfp->get_IsNeutrino()) slicehits.insert(slicehits.end(), tmp_slicehits.begin(), tmp_slicehits.end());//add up all nu slice hits - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; total_track_hits += trackhits.size(); //CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; //CHECK temporary solution is to skip tracks[1]; - if(nu_slice_id != sliceid && nu_slice_id != -999){ - std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< shower = showers[s]; + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); - art::Ptr pfp = showerToPFParticleMap.at(shower); - - int sliceid = pfParticleToSliceIDMap.at(pfp); - -// if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng - if(!ppfp->get_IsNuSlice()) continue; - if(sliceid<0) continue; //negative sliceid is bad CHECK - //CHECK ID not found? - std::cout<<"CHECK "<<__LINE__<<" find hits at ID "< pfp = ppfp->pPFParticle;//showerToPFParticleMap.at(shower); - for(auto &h: showerhits){ - associated_hits.push_back(h); - } - } + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + + // if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng + if(!ppfp->get_IsNuSlice()) continue; + if(sliceid<0) continue; //negative sliceid is bad CHECK + //CHECK ID not found? + std::cout<<"CHECK "<<__LINE__<<" find hits at ID "<pSliceHits;//sliceIDToHitsMap.at(sliceid); + auto showerhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + //CHECK how nu_slice_id is updated? +// if(nu_slice_id != sliceid && nu_slice_id!=-999){ +// std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<= 0){ - std::cout<<"*SSS: So that leaves "<> slicehits = sliceIDToHitsMap.at(nu_slice_id); for(auto &h: slicehits){ bool is_associated = false; @@ -164,447 +166,449 @@ namespace single_photon{ // IF HAVE 1+G 1P AND WANT TO PLOT - if(bool_make_sss_plots && showers.size()==1 && tracks.size()==1){ - - std::string print_name = "isolation_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - TCanvas *can = new TCanvas(print_name.c_str(), print_name.c_str(),3000,800); - can->Divide(4, 1, 0.0, 0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - // Creation of canvas and histograms to hold hit distance data - TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); - histcan->Divide(3, 2, 0.005, 0.1); - - TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); - TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); - TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); - std::vector s_hists = {s_hist0, s_hist1, s_hist2}; - - TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); - TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); - TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); - std::vector u_hists = {u_hist0, u_hist1, u_hist2}; - - -std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; -// saving wire and time coordinates - std::vector> pts_trk( tracks.size(), std::vector(3) ); - - art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); - auto trackhits = pfParticleToHitsMap.at(pfpt); - - std::vector t_pts(3); - std::vector> t_vec_t(3); // peak time of track hits on 3 planes. - std::vector> t_vec_c(3); // wire number of track hits on 3 planes. - - for(auto &th: trackhits){ - double wire = (double)th->WireID().Wire; - t_vec_c[(int)th->View()].push_back(wire); - - double time = (double)th->PeakTime(); - t_vec_t[(int)th->View()].push_back(time); - - tick_max = std::max(tick_max, time); - tick_min = std::min(tick_min, time); - chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); - chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + if(bool_make_sss_plots && showers.size()==1 && tracks.size()==1){ - } + std::string print_name = "isolation_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); + TCanvas *can = new TCanvas(print_name.c_str(), print_name.c_str(),3000,800); + can->Divide(4, 1, 0.0, 0.1); - t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); - t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); - t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); - pts_trk[0] = t_pts; - -std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; -std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; -std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; - - -std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) - std::vector, double >> sh_dist(3); - // vector to save hit with largest minimum distance (in sh_dist) on each plane - std::vector< std::pair, double > > max_min_hit(3); - - art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); - auto showerhits = pfParticleToHitsMap.at(pfp_s); - - std::vector t_pts_s(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - std::vector num_shr_hits(3); - - for(auto &sh: showerhits){ - int plane = (int)sh->View(); - num_shr_hits[plane] += 1; - - double minDist = 999.9; //minimum distance between this shower hit and all track hits - double dist; - // only do if there are track hits on this plane with which to compare - if (t_vec_c[(int)sh->View()].size() != 0){ - double wire = (double)sh->WireID().Wire; - vec_c[(int)sh->View()].push_back(wire); - double time = (double)sh->PeakTime(); - vec_t[(int)sh->View()].push_back(time); - - for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); - if (dist < minDist) { - minDist = dist; - } - - } // end of track hits for - s_hists[(int)sh->View()]->Fill(minDist); - - // keep track of 10 smallest distances and their corresponding hits - if (sh_dist[plane].size() < 10){ - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); + + TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); + TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); + TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); + std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; + + + std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; + // saving wire and time coordinates + std::vector> pts_trk( tracks.size(), std::vector(3) ); + + PandoraPFParticle* ppfpt = PPFP_GetPPFPFromTrack(all_PPFPs, tracks[0]); +// art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = ppfpt->pPFPHits;//pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); // peak time of track hits on 3 planes. + std::vector> t_vec_c(3); // wire number of track hits on 3 planes. + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + + std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; + std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; + std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + + std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance (in sh_dist) on each plane + std::vector< std::pair, double > > max_min_hit(3); + + PandoraPFParticle* ppfps = PPFP_GetPPFPFromShower(all_PPFPs, showers[0]); + auto showerhits = ppfps->pPFPHits;//pfParticleToHitsMap.at(pfp_s); + // art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; //minimum distance between this shower hit and all track hits + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + + + //NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower + std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; + + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); + + for(int plane = 0; plane < 3; plane++){ + minDist_tot[plane] = 999; + std::vector vec_t; + std::vector vec_c; + + for(auto &uh: unassociated_hits_all[plane]){ + + if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane + + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); + + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); + + if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } + + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; + + } // end looping unassociated_hits_all + + g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + } // end looping planes + + // place data into appropriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + } + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); } - else{ if (minDist < max_min_hit[plane].second){ - sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } } - - // finds the necessary plot boundaries to fit the shower - tick_max = std::max(tick_max, (double)sh->PeakTime()); - tick_min = std::min(tick_min, (double)sh->PeakTime()); - chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); - chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); - } // end if stmnt t_vec_c - } // end looping shower hits - - // create graphs from newly compiled shower coordinates - t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - // save new graphs for this shower into vector containing all showers - pts_shr[0] = t_pts_s; - - // place data into approriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); - } - else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance - auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); - } - else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); - } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); - } - - /* DRAW SHOWER HISTOGRAM */ - histcan->cd(1); - s_hists[0]->Draw(); - s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(2); - s_hists[1]->Draw(); - s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(3); - s_hists[2]->Draw(); - s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - - -//NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower -std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - - // create vector of three layers for unassoc hits - std::vector g_unass(3); - - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - std::vector minDist_tot(3); - std::vector minWire(3); - std::vector minTime(3); - - for(int plane = 0; plane < 3; plane++){ - minDist_tot[plane] = 999; - std::vector vec_t; - std::vector vec_c; - - for(auto &uh: unassociated_hits_all[plane]){ - - if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane - - double wire = (double)uh->WireID().Wire; - vec_c.push_back(wire); - double time = (double)uh->PeakTime(); - vec_t.push_back(time); - - double minDist = 999.9; - double dist; - for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); - if (dist < minDist) { minDist = dist; } - } - u_hists[(int)uh->View()]->Fill(minDist); - if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits - minDist_tot[plane] = minDist; - minWire[plane] = wire; - minTime[plane] = time; - } + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - // for reclustering - std::vector pt = {wire, vec_t.back()}; - pts_to_recluster[(int)uh->View()].push_back(pt); - mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - - } // end looping unassociated_hits_all - - g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - } // end looping planes - - // place data into appropriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); - } - else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); - } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); - } - - /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ - histcan->cd(4); - u_hists[0]->Draw(); - u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(5); - u_hists[1]->Draw(); - u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(6); - u_hists[2]->Draw(); - u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - -/* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ -/* histcan->Update(); - histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); -*/ + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - delete histcan; + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); -//PLOTTING NOW -//SET-UP - double plot_point_size = 0.6; + /* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ + /* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); + */ - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } + delete histcan; - std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); + vertex_time[i] = time[0]; + vertex_wire[i] = wire[0]; - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } + if(i==0) m_vertex_pos_wire_p0 = wire[0]; + if(i==1) m_vertex_pos_wire_p1 = wire[0]; + if(i==2) m_vertex_pos_wire_p2 = wire[0]; + m_vertex_pos_tick = time[0]; + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); - } + g_vertex[i] = new TGraph(1,&wire[0],&time[0]); + g_vertex[i]->SetMarkerStyle(29); + g_vertex[i]->SetMarkerSize(4); + g_vertex[i]->SetMarkerColor(kMagenta-3); + g_vertex[i]->GetYaxis()->SetRangeUser(tick_min*0.9,tick_max*1.1); + g_vertex[i]->GetXaxis()->SetLimits(chan_min[i]*0.9,chan_max[i]*1.1); + g_vertex[i]->SetTitle(("Plane " +std::to_string(i)).c_str()); + g_vertex[i]->GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); -// ******************************** DeadWireRegions ******************************************** - //plot dead wire - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - // std::cout<<"WIRE "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); - l->SetLineColor(kGray+1); - l->Draw("same"); - } - } + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } - // plot track - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - // plot shower hits - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } + } + // ******************************** DeadWireRegions ******************************************** + //plot dead wire + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + // std::cout<<"WIRE "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + l->SetLineColor(kGray+1); + l->Draw("same"); + } + } - // plot unassociated hits - for(int i=0; i<3; i++){ - can->cd(i+1); - if (g_unass[i]->GetN() > 0){ - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - } + // plot track + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + // plot shower hits + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + // plot unassociated hits + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } -//******************* INFO Plotting ******************************* - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + //******************* INFO Plotting ******************************* -// PLOTTING SHOWER? - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); -// PLOTTING - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); - can->Update(); - // can->SaveAs((print_name+".pdf").c_str(),"pdf"); - std::cout<<"*PRINTING"<GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + // PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"< all_PPFPs, std::vector>& showerVector, std::map,art::Ptr>& showerToMCParticleMap, -// std::map,art::Ptr>& showerToPFParticleMap, -// std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, -// std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap -// std::map& sliceIdToNuScoreMap -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,bool>& PFPToNuSliceMap - ){ + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - if(reco_verbose) std::cout<<"Strting "< map_is_shower_process = {{"compt",true}, + {"FastScintillation",true}, + {"eBrem",true}, + {"phot",true}, + {"eIoni",true}, + {"conv",true}, + {"annihil",true}}; + + std::vector spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); //for each recob::track/shower in the event + bool default_verbose = m_is_verbose; + m_is_verbose = false; for(size_t i=0; i pfp = ppfp->pPFParticle; - -// if (reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t looking for a shower match to pfp "<< pfp->Self()<<" which is in slice "<< PFPToSliceIdMap[pfp]<IsPrimary()){std::cout<<"this is the primary particle"<Parent()); - if (parentIterator == pfParticleIdMap.end()){ - std::cout<<"error: no parent but not primary"<second->PdgCode(); - std::cout<<"the parent pdg code is "<Daughters(); - //std::cout<<"the number of daugter particles is "< daughters = daughterIterator->second; - // std::cout<<"the daughter pdg code is "<PdgCode()<second->PdgCode(); - //std::cout<<"the parent pdg code is "< > obj_hits_ptrs = ppfp->pHits; //pfParticleToHitsMap[pfp]; + std::vector< art::Ptr > obj_hits_ptrs = ppfp->pPFPHits; //pfParticleToHitsMap[pfp]; /** * @@ -166,8 +130,8 @@ namespace single_photon double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - if(reco_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"< "< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Process()=="primary"){ //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<EndProcess()<<"! breaking"<= 0){ //Guanqun: this line here doesn't really cosider other break cases than finding primary particle - if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ best_mother_index = p; best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; +// best_mother_plane = 0; } if( mother_energy_recod[1] > best_mother_energy){ best_mother_index = p; best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; +// best_mother_plane = 1; } if( mother_energy_recod[2] > best_mother_energy){ best_mother_index = p; best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; +// best_mother_plane = 2; } } - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; std::vector corrected_vertex(3), corrected_start(3); @@ -423,7 +379,7 @@ namespace single_photon m_sim_shower_pz[i] = match->Pz(); // should've use 'best_mother_plane' here - m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_best_matched_plane[i] = best_mother_index; m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; @@ -436,146 +392,34 @@ namespace single_photon m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - if (m_sim_shower_isclearcosmic[i]== false){ - std::cout<<"sim shower is matched to non-clear cosmic PFP "<Self()<get_IsNuSlice();//PFPToNuSliceMap[pfp]; - // if (PFPToNuSliceMap[pfp] ==true){ - // std::cout<<"m_sim_shower_is_nuslice is true for sim shower matched to reco pfp id "<Self()<Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<> mother_contributing_MCP; //stores all the MCP's in the chain for all mothers-> this can probably be modified to only store ones which contribute to the reco shower - std::vector all_contributing_MCP; //all the MCP's in the chain for this mother - - //for each of the mother particles - for(auto pair: mother_MCP_map){ - all_contributing_MCP.clear(); - art::Ptr particle = pair.second;//get the mother MCP - all_contributing_MCP.push_back(pair.first);//save the MCP track id - int numDaughters = -1;//the number of daughters for the current generation - std::vector current_ids; //the track id's for the current generation - std::vector next_ids;//the track id's for the next generation (daughters of current generatiob) - - //std::cout<<"starting from mother particle at head of chain with pdg code "<PdgCode()<<" and track id "<NumberDaughters();//start with the number of daughters for the mother mother particle - - //std::cout<<"this particle has "<Daughter(i); //get the track id of the MCP - current_ids.push_back(id);//save the id to the list of the current generation - all_contributing_MCP.push_back(id);//save it to the list of all of the MCP's in the chain - } - - - //while there are more generations of daughter particles (not at the end of the chain) - while(numDaughters>0){ - //for each MCP in the current generation - for(int id:current_ids){ - //get the particle and check it's valid - art::Ptr particle = MCParticleToTrackIdMap[id]; - if (particle.isNull()) continue; - - //get the number of daughters - int n = particle->NumberDaughters(); - - //loop over the daughters - for (int i = 0; i < n; i++){ - int daughterId = particle->Daughter(i); - - //save daughters to list of all contributing mcps - all_contributing_MCP.push_back(daughterId); - - //add daughters to list for next gen - next_ids.push_back(daughterId); - - } - } - - numDaughters = current_ids.size(); //update the number of daughters in the next generation - - //std::cout<<"num daughters after this generation is "< count_vec(mother_contributing_MCP.size()); //stores the number of MCP's in the chain from each mother which match to the reco shower - std::vector energy_contributing_MCP(mother_contributing_MCP.size()); //the total energy of all the MCP's in the chain from the mother which contribute to the shower - //for each MCP from the chain of mother mother particle and daughters, check how much it overlaps with the MCP's that contribute to the shower - for (unsigned int i = 0; i< mother_contributing_MCP.size(); i++){ - std::vector mcp_vec = mother_contributing_MCP[i]; - int count = 0; - - std::cout<<"SinglePhoton::recoMC()\t||\t on mother_contributing_MCP: "<0){ - //check the total number of contributing MCP - std::cout<<"SinglePhoton::recoMC()\t||\t the number of MCP associated with the first mother mother particle that also deposit hits in the recob::shower is "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); +// std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), + std::to_string(best_mother_index), + std::to_string(marks_mother_vector[best_mother_index]->PdgCode()), + std::to_string(total_energy_on_plane[0]), + std::to_string(total_energy_on_plane[1]), + std::to_string(total_energy_on_plane[2]), + std::to_string(ppfp->get_IsClearCosmic()) + },spacers); + + if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< - void perfectRecoMatching( - std::vector>& mcParticleVector, - std::vector& mcObjectVector, - std::map,T>& mcParticleToMCObjectMap - ){ - - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); - std::cout<<"KRANK: "< particle = mcParticleVector[ip]; - int particle_trackID = particle->TrackId(); - - std::vector id_matches; - std::vector mother_id_matches; - std::vector ancestor_id_matches; - - for(size_t io=0; ioTrackID(); - int object_mother_trackID =object->MotherTrackID(); - int object_ancestor_trackID =object->AncestorTrackID(); - - if(object_trackID == particle_trackID ) id_matches.push_back(io); - if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); - if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); - } - - int num_id_matches=id_matches.size(); - int num_mother_id_matches=mother_id_matches.size(); - int num_ancestor_id_matches=ancestor_id_matches.size(); - - //So im not sure how this works but something like this - if(num_id_matches > 1){ - std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; - }else if(num_ancestor_id_matches == 1){ - //We have a mother match? I guess this is like Neutron->photon->e+e-" - //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; - }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ - std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."< +// void perfectRecoMatching( +// std::vector>& mcParticleVector, +// std::vector& mcObjectVector, +// std::map,T>& mcParticleToMCObjectMap +// ){ +// +// +// for(size_t io=0; ioTrackID(); +// int object_mother_trackID =object->MotherTrackID(); +// int object_ancestor_trackID =object->AncestorTrackID(); +// const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); +// std::cout<<"KRANK: "< particle = mcParticleVector[ip]; +// int particle_trackID = particle->TrackId(); +// +// std::vector id_matches; +// std::vector mother_id_matches; +// std::vector ancestor_id_matches; +// +// for(size_t io=0; ioTrackID(); +// int object_mother_trackID =object->MotherTrackID(); +// int object_ancestor_trackID =object->AncestorTrackID(); +// +// if(object_trackID == particle_trackID ) id_matches.push_back(io); +// if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); +// if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); +// } +// +// int num_id_matches=id_matches.size(); +// int num_mother_id_matches=mother_id_matches.size(); +// int num_ancestor_id_matches=ancestor_id_matches.size(); +// +// //So im not sure how this works but something like this +// if(num_id_matches > 1){ +// std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" +// //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; +// }else if(num_ancestor_id_matches == 1){ +// //We have a mother match? I guess this is like Neutron->photon->e+e-" +// //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; +// }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ +// std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector){ diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index ba61fd913..70ec885e2 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -1,9 +1,9 @@ -# SinglePhotonModule +# SinglePhotonAnalysis Module Ported from `ubana` in suite `uboonecode v08_00_00_43 e17:prof` in Mar. 2022 The original code can be found at [Fermilab Readmine](https://cdcvs.fnal.gov/redmine/projects/ubana/repository?utf8=%E2%9C%93&rev=feature%2Fmarkross_Nov2021_merge) -NEED INTRODUCTION HERE. +The SinglePhotonAnalysis Module is originally developed in MicroBooNE that aids [NCDeltaRadiative singlephoton search](https://arxiv.org/abs/2110.00409). * [Quick Start](#quick-start) * [Update Log](#update-log) @@ -12,9 +12,9 @@ NEED INTRODUCTION HERE. --- ## Quick Start +Use a reco2 stage artROOT file as input: ``` -mrb i -j4 -lar -c run_singlephoton_sbnd.fcl -s +lar -c run_singlephoton_sbnd.fcl -s ``` ## Update Log @@ -47,7 +47,7 @@ Three sub-modules are included in the Single Photon Analysis Module: - `NCRadiativeResonant_module.cc` implements the `NCRadiativeResonant` filter to select events with photons coming out from the nucleus. - `NCDeltaRadiative_module.cc` implements the `NCDeltaRadiative` filter for NCDeltaRadiative events -### Code Structure +### File Structure - `Libraries/` contains essential headers for the `SinglePhoton` module. - `SEAview/` is an additional module runs inside the `SinglePhoton` module. @@ -56,6 +56,16 @@ Three sub-modules are included in the Single Photon Analysis Module: - `HelperFunctions/` contains some useful functions to simplify the code +Header goes like +```mermaid +flowchart TB +A--first formost-->C; +A[SinglePhoton_module.cc]--contains-->B[analyze*.h that works like *.cxx]; +C[SinglePhoton_module.h]-->D[helper_*.h]; +C-->F[DBSCAN.h]; +C-->G[SEAviewer.h]; +``` + ### Headers structure ```mermaid @@ -67,70 +77,97 @@ C-->F[DBSCAN.h]; C-->G[SEAviewer.h]; ``` -### Flows of the `SinglePhoton` module +### The flow of the `SinglePhoton` module + +The main flow +```mermaid +graph TD +A[art::EDFilter]-->B[beginJob]; +B-->C[beginSubRun]; +C-->F[filter: Loop over events]; +F-->F; +F-->D[endSubRun]; +D-->E[endJob]; +``` + +In each event loop: ```mermaid flowchart TB -A[ClearVertex & prepare PFParticles objects]-->AA; -subgraph AA[1. Gather Objects] + +subgraph AA[1. Collect Pandora Reco. Objects] direction TB B[AnalyzeSlices]-->C; -C[AnalyzeFlashes]-->D; -D[AnalyzeTracks]-->E; -E[AnalyzeShowers]-->F; -F[AnalyzeGeant4]-->G; -G[BuildParticleHitMaps]; +C[AnalyzeFlashes, a trivial function]-->D; +D[AnalyzeTracks]-->E[AnalyzeShowers]; end -subgraph BB[2. Reco MC Matching] +subgraph BB[2. Reco. MC Matching, non-data treatment] direction TB -H[Match Reco. Showers to MCParticles]-->I; -I[Match Reco. Tracks to MCParticles]-->J; -J[CollectMCTruth Information]; +F[Geant4 Info.]---H; +H[Match Reco. Showers and MCParticles]---I; +I[Match Reco. Tracks and MCParticles]; +J[MCTruth Info.]---K; +K[Flux Info. AnalyzeEventWeight]---L; +L[Match RecoSlices and MCParticles]; end -subgraph CC[3. Gather Other Info. ] +subgraph DD[3. 2nd Shower search] direction TB -K[AnalyzeEventWeight]-->L; -L[AnalyzeRecoSlices]; +N[Track stub study] +O[Shower cluster study] +M[Isolation Study for Second Shower Veto]-->N; +M-->O; end -subgraph DD[4. 2nd Shower earch] +subgraph THIS[The Flow] direction TB -M[Isolation Study for 2nd Shower Veto]-->N; -N[Match 2nd Shower]-->O[Search 2nd Shower]; -end - -subgraph THIS[flow chart] -direction LR -AA-->BB -CC-->DD; +A[Prepare branches]-->AA; +AA-->BB; +BB-->DD; +DD-->End[Output singlephoton ntuple]; end -DD-->End[Output ROOT]; ``` - ### Pandora Dependency -Objects are obtained from Pandora reconstruction, and they are connected via the following: +Objects are obtained from Pandora reconstruction, and they are connected with the following relation: + ```mermaid graph TD -PF[PFParticle];T[Track];Sh[Shower]; -H[Hit]; C[Cluster]; S[Slice];MCT[MCTruth];MCP[MCParticle];ID[ID#'s];M[Metadata];SP[SpacePoint]; -PF-->ID; +PF[recob::PFParticle]; +M[larpandoraobj::Metadata]; +T[recob::Track]; +Sh[recob::Shower]; +H[recob::Hit's]; +C[recob::Cluster's]; +S[recob::Slice]; +MCT[simb::MCTruth]; +MCP[simb::MCParticle]; +PID[anab::ParticleID]; +Cal[anab::Calorimetry]; +SP[recob::SpacePoint]; +ID[others]; PF-->M; PF-->SP; +PF-->ID; PF-->C; C-->H; PF-->Sh; PF-->T; +T-->PID; +T-->Cal; PF-->S; S-->H; Sh-->MCP; T-->MCP; MCP-->MCT; +Sh-->H; +T-->H; ``` -These objects are connected via labels shown as the following: +These objects are accessible via labels: + +Labels configured in `singlephoton_sbnd.fcl` |Alias|Objects|Label| |---|---|---| |PandoraLabel|`std::vector`
`std::vector`
`std::vector`
`std::vector`|pandora| @@ -141,7 +178,7 @@ These objects are connected via labels shown as the following: |FlashLabel|`std::vector`|opflashtpc0| |POTLabel|`sumdata::POTSummary`|generator| -Below alias auto-configured by default +Below alias auto-configured inside the code as a default |Alias|Objects|Label| |---|---|---| |HitFinderModule|`std::vector`|gaushit| @@ -158,12 +195,15 @@ Below alias auto-configured by default ## Glossary ### Parameters in FHiCL +Summarization in progress. ### Variables In `TTree vertex_tree`, variables prefix have the following meaning: -- `sss_*` -- `trackstub_*` -- `reco_*` -- `sim_*` -- `mctruth_*` +- Reconstructed variables valid for all types of events + - `reco_*` are reconstructed variables provided by Pandora + - `sss_*` are second shower search varaibles targeting hits/clusters that are not considered as tracks or showers by Pandora + - `trackstub_*` are track stub varaibles targeting track-like hits/clusters that are not considered as tracks or showers by Pandora +- MC variables from simulations + - `mctruth_*` are MCTruth variables provided by the event genrator GEANT4 + - `sim_*` are MCTruth variables matched to Pandora reconstructed objects diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 36be05683..6cc3fc410 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -261,10 +261,10 @@ namespace single_photon // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); -// std::vector> hitVector; -// art::fill_ptr_vector(hitVector,hitHandle); - recob::Hit dummy_hit; - std::vector> hitVector = VectorFromLabel( dummy_hit, evt, m_hitfinderLabel); + std::vector> hitVector; + art::fill_ptr_vector(hitVector,hitHandle); +// recob::Hit dummy_hit; +// std::vector> hitVector = VectorFromLabel( dummy_hit, evt, m_hitfinderLabel); //CHECK, how useful are the above lines? @@ -368,6 +368,7 @@ namespace single_photon art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); //Assign Cluster here; art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); + art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); std::map, std::vector> > pfParticleToMetadataMap; for(size_t i=0; i< pfParticleVector.size(); ++i){ @@ -379,33 +380,21 @@ namespace single_photon std::vector allPPFParticles; for(size_t index=0; index< pfParticleVector.size(); ++index){ -// std::cout<<"CHECKING"<<__LINE__<Self())<Parent())<IsPrimary())? std::cout<<"T"< hits_per_cluster(clusterHandle, evt, m_pandoraLabel); std::map, std::vector> > pfParticleToClustersMap; std::map, std::vector> > clusterToHitsMap; //fill map PFP to Clusters @@ -673,7 +661,7 @@ namespace single_photon //Track Calorimetry. Bit odd here but bear with me, good to match and fill here //Keng, use pandoraCalo to get the correct Calorimetry; art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); - std::map, std::vector> > trackToCalorimetryMap; +// std::map, std::vector> > trackToCalorimetryMap; //So a cross check if (!calo_per_track.isValid()) { @@ -681,22 +669,29 @@ namespace single_photon return (m_run_pi0_filter ? false : true); } + art::FindOneP pid_per_track(trackHandle, evt, m_pidLabel); + std::map, art::Ptr > trackToPIDMap; //Loop over all tracks we have to fill calorimetry map for(size_t i=0; i< tracks.size(); ++i){ if(calo_per_track.at(tracks[i].key()).size() ==0){ std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."<set_Calorimetries(calo_per_track.at(tracks[i].key())); + + if(m_use_PID_algorithms){ + temp_ppfp->set_HasPID(true); + temp_ppfp->set_ParticleID(pid_per_track.at(tracks[i].key())); + } } - art::FindOneP pid_per_track(trackHandle, evt, m_pidLabel); - std::map, art::Ptr > trackToPIDMap; // If we want PID algorithms to run. do so here // Build a map to get PID from PFParticles, then call PID collection function - if(m_use_PID_algorithms){ + if(m_use_PID_algorithms){//yes, as set in the FHiCL; for(size_t i=0; i< tracks.size(); ++i){ trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); } @@ -768,7 +763,7 @@ namespace single_photon if(m_is_verbose) std::cout<<"\nSinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); std::cout<<"Finish AnalyzeSlices.\n"<AnalyzeTrackCalo(tracks, trackToCalorimetryMap); + this->AnalyzeTrackCalo(tracks, allPPFParticles); //Run over PID? - if(m_use_PID_algorithms) this->CollectPID(tracks, trackToPIDMap); + if(m_use_PID_algorithms) this->CollectPID(tracks, allPPFParticles); //******************************* Showers **************************************************************/ @@ -885,16 +880,7 @@ namespace single_photon //found in analyze_Showers.h this->AnalyzeShowers(allPPFParticles, showers, - // showerToNuPFParticleMap, - // pfParticleToHitsMap, - // pfParticleToClustersMap, clusterToHitsMap, - // sliceIdToNuScoreMap, - // PFPToClearCosmicMap, - // PFPToSliceIdMap, - // PFPToNuSliceMap, - // PFPToTrackScoreMap, - // pfParticleMap, pfParticlesToShowerReco3DMap, trigger_offset(detClocks), theDetector); @@ -902,8 +888,8 @@ namespace single_photon std::cout<<"\nSinglePhoton::analyze \t||\t Finish Shower Analysis "< spacers = Printer_header({" pfpID", " Parent ", "Vertex(x, "," y, ",", z )", "slice "," nu_score"," trk_score "," prim? "," nu? "," cos? "," S# "," T# "}); + std::cout<<"SinglePhoton::Reconstruction Summary ---------------------------------------------- "< spacers = Printer_header({" pfpID", " Parent ", "Vertex(x, "," y, ",", z )", "slice "," nu_score"," trk_score "," prim? "," nu? "," nuSlice?"," cos? "," S# "," T# "}); for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ PandoraPFParticle temp_pf = allPPFParticles[jndex]; art::Ptr pfp = temp_pf.pPFParticle; @@ -919,6 +905,7 @@ namespace single_photon std::to_string(temp_pf.get_TrackScore()), (pfp->IsPrimary())? "T":" ", (temp_pf.get_IsNeutrino() )? "T":" ", + (temp_pf.get_IsNuSlice() )? "T":" ", (temp_pf.get_IsClearCosmic() )? "T":" ", (temp_pf.get_HasShower() >0)? "1":" ", (temp_pf.get_HasTrack() >0)? "1":" " @@ -969,9 +956,9 @@ namespace single_photon //Only run if its not data, i.e. MC events :) if(!m_is_data){ - std::vector> gTruthVector; if(!m_is_textgen){ - std::cout<<"CHECK Get some GTruth info."<> gTruthVector; + std::cout<<"\nCHECK Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); art::fill_ptr_vector(gTruthVector,gTruthHandle); @@ -991,6 +978,8 @@ namespace single_photon //Found inanalyze_Geant4.h //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! + + if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"<AnalyzeGeant4(mcParticleVector); @@ -1023,45 +1012,35 @@ namespace single_photon std::vector trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching( allPPFParticles, showers, showerToMCParticleMap, -// showerToNuPFParticleMap, -// pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector, -// pfParticleMap, MCParticleToTrackIdMap); -// (sliceIdToNuScoreMap, -// PFPToClearCosmicMap, -// PFPToSliceIdMap, -// PFPToNuSliceMap); //photoNuclearTesting(matchedMCParticleVector); - std::cout<<"\nStarting outside RecoMCTracks "<RecoMCTracks( allPPFParticles, tracks, - //trackToNuPFParticleMap, trackToMCParticleMap, MCParticleToMCTruthMap, mcParticleVector, MCParticleToTrackIdMap, - //sliceIdToNuScoreMap, - //PFPToClearCosmicMap, - //PFPToSliceIdMap, trk_overlay_vec); - std::cout<<"\nStarting outside AnalyzeMCTruths "<AnalyzeMCTruths(mcTruthVector, mcParticleVector); - std::cout<<"Starting AnalyzeEventWeight"<AnalyzeEventWeight(evt); @@ -1069,10 +1048,10 @@ namespace single_photon std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::cout<<"filling info in ncdelta slice tree"<AnalyzeRecoMCSlices( m_truthmatching_signaldef, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); + std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeRecoMCSlices"<AnalyzeRecoMCSlices(m_truthmatching_signaldef,allPPFParticles, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); + + std::cout<<"\nSinglePhoton\t||\tFinish AnalyzeRecoMCSlices"<IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + if(!m_run_all_pfps && ! m_run_pi0_filter){ + std::cout<<"\nSinglePhoton::analyze \t||\t Start IsolationStudy "<IsolationStudy(allPPFParticles, tracks, showers, theDetector); + std::cout<<"\nSinglePhoton::analyze \t||\t Finish IsolationStudy "<IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); - std::cout<<"CHECK "<<__LINE__<<" for a finished isolation study"< p_shr = showers.front(); art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; @@ -1687,6 +1669,7 @@ namespace single_photon this->CreateEventWeightBranches(); this->CreateSliceBranches(); this->CreateGeant4Branches(); + //CHECK, remove bad chanel related varaibles? & ub dependent path //hardcode some info (TODO change) // std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; @@ -1775,8 +1758,6 @@ namespace single_photon bool SinglePhoton::beginSubRun(art::SubRun& sr) { - std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__<Fill(); return true; } void SinglePhoton::endJob() { - std::cout<<">>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__< > input_Vertex, std::vector< art::Ptr > input_Clusters, std::vector< art::Ptr > input_Showers, - std::vector< art::Ptr > input_Tracks + std::vector< art::Ptr > input_Tracks, + art::FindManyP input_Hits ) : pPFParticle(input_PFParticle), @@ -158,7 +160,8 @@ namespace single_photon pHasShower = nShowers; pHasTrack = nTracks; if(pHasShower == 1) pShower=input_Showers.front(); - if(pHasTrack == 1) pTrack=input_Tracks.front(); + if(pHasTrack == 1) pTrack=input_Tracks.front(); + //fill the vertex info. if (!pVertex.empty()){ @@ -166,6 +169,12 @@ namespace single_photon vertex->XYZ(pVertex_pos); } + //fill pPFPHits from each clusters; + for(size_t index=0; index< pClusters.size(); ++index){ + auto cluster = pClusters[index]; + std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); + pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); + } //get ancestor for a 1st generation PFParticle if(pPFParticle->IsPrimary()){ @@ -189,48 +198,65 @@ namespace single_photon art::Ptr< recob::Track > pTrack;//d with 0 or 1 element art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + + art::Ptr pParticleID;//d for track only; art::Ptr< simb::MCTruth > pMCTruth; std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pHits;//d + std::vector< art::Ptr< recob::Hit > > pSliceHits;//d + std::vector< art::Ptr< recob::Hit > > pPFPHits;//d std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector> pCalorimetries;//d std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; std::vector< art::Ptr< simb::MCParticle > > pMCParticles; //set methods void set_NuScore (const double input_score){ pNuScore = input_score; } - void set_TrackScore (const double input_score){ pTrackScore = input_score; } +// void set_TrackScore (const double input_score){ pTrackScore = input_score; } - void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } - void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } +// void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } +// void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } + void set_HasPID (const bool input_bool){ pHasPID = input_bool; } - void set_HasShower (const int input_number){ pHasShower = input_number; } - void set_HasTrack (const int input_number){ pHasTrack = input_number; } - void set_PdgCode (const int input_number){ pPdgCode = input_number; } - void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } +// void set_HasShower (const int input_number){ pHasShower = input_number; } +// void set_HasTrack (const int input_number){ pHasTrack = input_number; } +// void set_PdgCode (const int input_number){ pPdgCode = input_number; } +// void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } void set_AncestorID (const int input_number){ pAncestorID = input_number; } void set_SliceID (const int input_number){ pSliceID = input_number; } + void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } + void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } + //call method - const double*get_Vertex_pos() const; + const art::Ptr get_ParticleID() const; + const std::vector> get_Calorimetries() const; + + + const double* get_Vertex_pos() const; - const double get_NuScore() const; - const double get_TrackScore () const; + const double get_NuScore() const; + const double get_TrackScore () const; - const bool get_IsNeutrino () const; - const bool get_IsClearCosmic () const; - const bool get_IsNuSlice () const; + const bool get_IsNeutrino () const; + const bool get_IsClearCosmic () const; + const bool get_IsNuSlice () const; + const bool get_HasPID () const; - const int get_HasShower () const; - const int get_HasTrack () const; - const int get_PdgCode() const; - const int get_PFParticleID() const; - const int get_AncestorID() const; - const int get_SliceID () const; + const int get_HasShower () const; + const int get_HasTrack () const; + const int get_PdgCode() const; + const int get_PFParticleID() const; + const int get_AncestorID() const; + const int get_SliceID () const; }; + + inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } + inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } + inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } @@ -239,6 +265,7 @@ namespace single_photon inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } + inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } @@ -600,10 +627,13 @@ namespace single_photon /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ void IsolationStudy( std::vector all_PPFPs, - const std::vector>& tracks, std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, - const std::map, std::vector> > & pfParticleToHitsMap, - const std::map, int> & pfParticleToSliceIDMap, const std::map>>& sliceIDToHitsMap, + const std::vector>& tracks, +// std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, +// std::map, art::Ptr> & showerToPFParticleMap, +// const std::map, std::vector> > & pfParticleToHitsMap, +// const std::map, int> & pfParticleToSliceIDMap, +// const std::map>>& sliceIDToHitsMap, detinfo::DetectorPropertiesData const & theDetector); @@ -636,7 +666,10 @@ namespace single_photon void ClearTracks(); /* clear track related variable and vectors */ void ResizeTracks(size_t); /* resize track related vectors */ void CreateTrackBranches(); /* create track related branch in vertex tree */ - void AnalyzeTrackCalo(const std::vector> &tracks, std::map, std::vector>> &trackToCaloMap); + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); + + + //(std::map, std::vector>> &trackToCaloMap); /* @brief: analyze MCParticle related to recob::Track if it has one @@ -657,7 +690,8 @@ namespace single_photon /* collect information from anab::sParticleIDAlgScores of reco track */ - void CollectPID(std::vector> & tracks,std::map< art::Ptr, art::Ptr> & trackToPIDMap); + void CollectPID(std::vector> & tracks, std::vector all_PPFPs); + //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); TGraph proton_length2energy_tgraph; //---------------- Showers ---------------------------- @@ -863,7 +897,10 @@ namespace single_photon /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info * to determine how many eligible tracks and showers there are in the event */ - void AnalyzeRecoMCSlices(std::string signal_def, std::map> & MCParticleToTrackIDMap, + void AnalyzeRecoMCSlices( + std::string signal_def, + std::vector all_PPFPs, + std::map> & MCParticleToTrackIDMap, std::map,art::Ptr > & showerToPFParticleMap, std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, @@ -1057,7 +1094,7 @@ namespace single_photon geo::GeometryCore const * geom; double m_work_function; //value provided by pset double m_recombination_factor; // value provided by pset - //double m_gain; + std::vector m_gain_mc; // value provided by pset std::vector m_gain_data; double m_wire_spacing; diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index d988db6b0..10208794b 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -18,7 +18,7 @@ singlephoton_analyzer:{ input_param: "optional" - Verbose: false + Verbose: true runSEAviewShower: true SEAviewShowerHitThreshold: 25 From 74cd726677518f84f9a4277778bb18be7bd6f41b Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 12 Jul 2022 14:12:59 -0500 Subject: [PATCH 32/54] start to clean up --- .../helper_PandoraPFParticles.h | 2 ++ .../HelperFunctions/helper_processors.h | 15 +++++------ .../Libraries/analyze_Showers.h | 1 + .../Libraries/analyze_Tracks.h | 3 +++ .../Libraries/fiducial_volume.h | 9 +++++++ .../Libraries/init_branches.h | 11 ++++++++ .../Libraries/output_ntuple.h | 25 +++++++++++++++++++ sbncode/SinglePhotonAnalysis/README.md | 17 +++---------- .../SinglePhoton_module.cc | 11 ++++---- .../SinglePhoton_module.h | 9 +++++++ 10 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/output_ntuple.h diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index 52b399112..18c29eabd 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -70,7 +70,9 @@ namespace single_photon // temp_ID_nuscore_map[ temp_p.get_SliceID()] = temp_p.get_NuScore(); if(best_nuscore < temp_p->get_NuScore() ){ best_nuscore = temp_p->get_NuScore(); + best_nuscore_SliceID = temp_p->get_SliceID(); + //// std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "< tmp = {xyz[0],xyz[1],xyz[2]}; - m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); + //m_vertex_pos_x = xyz[0]; + //m_vertex_pos_y = xyz[1]; + //m_vertex_pos_z = xyz[2]; + std::cout<<"CHECK Vertex position: ("< tmp = {xyz[0],xyz[1],xyz[2]}; + //m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + //m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); + //m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); //CHECK // if(!m_run_pi0_filter){ // m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 63db40991..7b267613c 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -63,6 +63,7 @@ namespace single_photon std::vector hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); m_reco_shower_dirx[i_shr] = shr_dir.X(); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h index 251e1b922..24bee3119 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h @@ -74,6 +74,9 @@ namespace single_photon m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend); + m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart); + m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h index a1cc62207..4920efbc2 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h @@ -92,6 +92,15 @@ namespace single_photon } + /* returns minimum distance to the TPCActive boundary around the Cathode Plane Assemble; returns -999 if the point is not in TPC active volume */ + double SinglePhoton::distToCPA(std::vector&vec){ + if(isInTPCActive(vec)==0) return -999; + double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45)); + + return dx; + } + + // int SinglePhoton::isInSCB(std::vector & vec){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index 31cad7439..ec425f2ed 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -29,6 +29,7 @@ namespace single_photon m_reco_vertex_in_SCB = -9999; m_reco_vertex_dist_to_SCB = -9999; m_reco_vertex_dist_to_active_TPC= -9999; + m_reco_vertex_dist_to_CPA= -9999; m_reco_vertex_to_nearest_dead_wire_plane0=-99999; m_reco_vertex_to_nearest_dead_wire_plane1=-99999; @@ -81,6 +82,7 @@ namespace single_photon vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); @@ -511,6 +513,8 @@ namespace single_photon m_reco_track_endz.clear(); m_reco_track_end_dist_to_active_TPC.clear(); m_reco_track_start_dist_to_active_TPC.clear(); + m_reco_track_end_dist_to_CPA.clear(); + m_reco_track_start_dist_to_CPA.clear(); m_reco_track_end_dist_to_SCB.clear(); m_reco_track_start_dist_to_SCB.clear(); m_reco_track_end_in_SCB.clear(); @@ -668,6 +672,8 @@ namespace single_photon vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); + vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); @@ -830,6 +836,8 @@ namespace single_photon m_reco_track_endz.resize(size); m_reco_track_end_dist_to_active_TPC.resize(size); m_reco_track_start_dist_to_active_TPC.resize(size); + m_reco_track_end_dist_to_CPA.resize(size); + m_reco_track_start_dist_to_CPA.resize(size); m_reco_track_end_dist_to_SCB.resize(size); m_reco_track_start_dist_to_SCB.resize(size); m_reco_track_end_in_SCB.resize(size); @@ -1012,6 +1020,7 @@ namespace single_photon m_reco_shower_startx.clear(); m_reco_shower_starty.clear(); m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_CPA.clear(); m_reco_shower_start_dist_to_SCB.clear(); m_reco_shower_start_in_SCB.clear(); m_reco_shower_end_dist_to_active_TPC.clear(); @@ -1178,6 +1187,7 @@ namespace single_photon vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); @@ -1393,6 +1403,7 @@ namespace single_photon m_reco_shower3d_dEdx_plane2.resize(size); m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_CPA.resize(size); m_reco_shower_start_dist_to_SCB.resize(size); m_reco_shower_start_in_SCB.resize(size); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/output_ntuple.h b/sbncode/SinglePhotonAnalysis/Libraries/output_ntuple.h new file mode 100644 index 000000000..444e3816c --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/output_ntuple.h @@ -0,0 +1,25 @@ +namespace single_photon +{ + + //set the vertex for now; + void SinglePhoton::Output_PFParticleInfo( std::vector PPFPs){ + + int pfp_size = PPFPs.size(); + + for(int index = 0; index < pfp_size; index++){ + + PandoraPFParticle* temp_p = &PPFPs[index]; + if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; + m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; + m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; + m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; + std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; + m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); + m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); + } + } + +} diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 70ec885e2..1d7906cab 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -26,7 +26,7 @@ The module does not work out of the box, so there are some modifications to make - Update on geometry variables such as, `reco_*_dist_to_CathodePlane` - Disable Kalman dEdx variables - Disable Second Shower Search 3D (`sss3d`) variables - - Adapate SBND FHiCLs for filters: `NCRadiativeResonant` and `NCDeltaRadiative` + - Update FHiCLs for filtering events in SBND: `NCRadiativeResonant` and `NCDeltaRadiative` These updates are to accommodate the change of Pandora features listed below: @@ -66,22 +66,11 @@ C-->F[DBSCAN.h]; C-->G[SEAviewer.h]; ``` -### Headers structure - -```mermaid -flowchart TD; -A--first formost-->C; -A[SinglePhoton_module.cc]--contains-->B[analyze*.h that look like *.cxx]; -C[SinglePhoton_module.h]-->D[helper_*.h]; -C-->F[DBSCAN.h]; -C-->G[SEAviewer.h]; -``` - ### The flow of the `SinglePhoton` module The main flow ```mermaid -graph TD +graph LR A[art::EDFilter]-->B[beginJob]; B-->C[beginSubRun]; C-->F[filter: Loop over events]; @@ -197,7 +186,7 @@ Below alias auto-configured inside the code as a default ### Parameters in FHiCL Summarization in progress. -### Variables +### Output Variables In `TTree vertex_tree`, variables prefix have the following meaning: - Reconstructed variables valid for all types of events diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 6cc3fc410..d2e7d466c 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -14,6 +14,8 @@ #include "Libraries/fiducial_volume.h" #include "Libraries/second_shower_search.h" #include "Libraries/isolation.h" +#include "Libraries/output_ntuple.h" + namespace single_photon { @@ -263,9 +265,6 @@ namespace single_photon art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); std::vector> hitVector; art::fill_ptr_vector(hitVector,hitHandle); -// recob::Hit dummy_hit; -// std::vector> hitVector = VectorFromLabel( dummy_hit, evt, m_hitfinderLabel); - //CHECK, how useful are the above lines? //Lets do "THE EXACT SAME STUFF" for Optical Flashes @@ -419,9 +418,11 @@ namespace single_photon sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); } //Mark all Pandora neutrino slices as neutrino slices and assign the highes neutrino score. - double pfp_w_bestnuID = DefineNuSlice(allPPFParticles); + pfp_w_bestnuID = DefineNuSlice(allPPFParticles); std::cout<<"\nFinish preparing PandoraPFParticles at Line "<<__LINE__<<" CHECK! Now we have "<, std::vector> > sliceToHitsMap; @@ -514,8 +515,6 @@ namespace single_photon std::vector< art::Ptr > nuParticles; std::vector< art::Ptr > crParticles; this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); - //CHECK pfp_w_bestnuID was calculated in the previous "test" lines above? - //CHECK potential upgrade: // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 707af6403..918b7f7ca 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -475,6 +475,8 @@ namespace single_photon */ void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); + void Output_PFParticleInfo( std::vector all_PPFPs); + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ @@ -763,6 +765,7 @@ namespace single_photon int setTPCGeom(); int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ double distToTPCActive(std::vector&vec); + double distToCPA(std::vector&vec); int distToSCB(double & dist, std::vector &vec); /* if point in active TPC, returns distance from point to closest TPC wall * otherwise, returns -999 */ @@ -1329,6 +1332,7 @@ namespace single_photon int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + double m_reco_vertex_dist_to_CPA; int m_reco_asso_showers; @@ -1509,6 +1513,8 @@ namespace single_photon std::vector m_reco_track_endz; std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_CPA; + std::vector m_reco_track_start_dist_to_CPA; std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ std::vector m_reco_track_start_dist_to_SCB; std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ @@ -1720,6 +1726,7 @@ namespace single_photon std::vector m_reco_shower_starty; std::vector m_reco_shower_startz; std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ std::vector m_reco_shower_start_dist_to_SCB; std::vector m_reco_shower_start_in_SCB; std::vector m_reco_shower_end_dist_to_active_TPC; @@ -2069,6 +2076,8 @@ namespace single_photon bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ + + int pfp_w_bestnuID; }; DEFINE_ART_MODULE(SinglePhoton) From 323079847c7b500eee969f384325de218b401631 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 12 Jul 2022 22:37:04 -0500 Subject: [PATCH 33/54] first clean up is done --- .../helper_PandoraPFParticles.h | 240 +- .../HelperFunctions/helper_gadget.h | 40 +- .../HelperFunctions/helper_math.h | 109 +- .../HelperFunctions/helper_processors.h | 344 +- .../Libraries/TruncMean.h | 204 +- .../Libraries/analyze_Geant4.h | 98 +- .../Libraries/analyze_MCTruth.h | 68 +- .../Libraries/analyze_OpFlashes.h | 2 +- .../Libraries/analyze_Showers.h | 849 ++-- .../Libraries/analyze_Slice.h | 39 +- .../Libraries/analyze_Tracks.h | 1409 +++--- .../Libraries/fiducial_volume.h | 72 +- .../Libraries/init_branches.h | 4310 ++++++++--------- .../Libraries/isolation.h | 1124 +++-- .../Libraries/output_ntuple.h | 52 +- .../Libraries/reco_truth_matching.h | 1131 ++--- .../Libraries/second_shower_search.h | 128 +- .../NCDeltaRadiative_module.cc | 42 +- .../NCRadiativeResonant_module.cc | 163 +- .../SinglePhoton_module.cc | 725 +-- .../SinglePhoton_module.h | 606 ++- ...ion_tpc_NCDeltaRadiative_filtered_sbnd.fcl | 2 +- ..._tpc_NCRadiativeResonant_filtered_sbnd.fcl | 2 +- .../jobs/run_singlephoton_sbnd.fcl | 4 +- .../jobs/singlephoton_sbnd.fcl | 8 +- 25 files changed, 5491 insertions(+), 6280 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index 18c29eabd..83dabaabd 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -1,128 +1,132 @@ namespace single_photon {//helper functions exclusively for PandoraPFParticles - + //1. Filler for each PandoraPFParticle - //find pAncestor & pAncesotrID - void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs){ - - std::map< size_t, art::Ptr> pfParticleMap; - int pfp_size = PPFPs.size(); - //build ID-PFParticle map; - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_pfp = PPFPs[index]; - if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - - //trace up parents - for(int jndex = 0; jndex < pfp_size; jndex++){ - art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; - - PPFPs[jndex].set_AncestorID(temp_pfp->Self() ); - PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; - if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself - - while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent - - int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); - PPFPs[jndex].set_AncestorID( temp_parent_id ); - PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; - // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ - - int pfp_size = PPFPs.size(); - for( auto pfp : PFP_in_slice){ - for(int index = 0; index < pfp_size; index++){ - //std::cout<<"CHECK slice match"<<(PPFPs[index].pPFParticle)->Self()<< " and "<Self()< -1 ) continue;//slice# is found already - if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ - PPFPs[index].pSlice = slice; - PPFPs[index].pSliceHits = Hit_inslice; - PPFPs[index].set_SliceID( slice.key() ); - break; - } - } - } - } - - //refill pNuScore and pIsNuSlice - int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ - - int pfp_size = PPFPs.size(); -// std::map< int, double > temp_ID_nuscore_map; - double best_nuscore = 0; - int best_nuscore_SliceID = 0; - std::vector< int > IDs; - - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle* temp_p = &PPFPs[index]; - if(temp_p->get_IsNeutrino()){ - int temp_sliceID = temp_p->get_SliceID(); - //add one if not found; - if(!std::count(IDs.begin(), IDs.end(), temp_sliceID) ) IDs.push_back(temp_sliceID); -// temp_ID_nuscore_map[ temp_p.get_SliceID()] = temp_p.get_NuScore(); - if(best_nuscore < temp_p->get_NuScore() ){ - best_nuscore = temp_p->get_NuScore(); - - best_nuscore_SliceID = temp_p->get_SliceID(); - -//// std::cout<<__FUNCTION__<<"CHECK Best nu score "<< best_nuscore<<" at slice "<get_SliceID()) ) ppfp->set_IsNuSlice(true); -// if( PPFPs[index].get_SliceID() == best_nuscore_SliceID){ -// PPFPs[index].set_IsNuSlice( true ); -// PPFPs[index].set_NuScore( best_nuscore );//CHECK over-write the original score, if there is any; -// std::cout<<__FUNCTION__<<" CHECK Set nu slice "< & PPFPs){ + + std::map< size_t, art::Ptr> pfParticleMap; + int pfp_size = PPFPs.size(); + //build ID-PFParticle map; + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_pfp = PPFPs[index]; + if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + + //trace up parents + for(int jndex = 0; jndex < pfp_size; jndex++){ + art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; + + PPFPs[jndex].set_AncestorID(temp_pfp->Self() ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; + if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself + + while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent + + int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); + PPFPs[jndex].set_AncestorID( temp_parent_id ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; + // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ + + int pfp_size = PPFPs.size(); + for( auto pfp : PFP_in_slice){ + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_SliceID() > -1 ) continue;//slice# is found already + if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ + PPFPs[index].pSlice = slice; + PPFPs[index].pSliceHits = Hit_inslice; + PPFPs[index].set_SliceID( slice.key() ); + break; + } + } + } + } + + //refill pNuScore and pIsNuSlice + int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ + + int pfp_size = PPFPs.size(); + double best_nuscore = 0; + int best_nuscore_SliceID = 0; + std::vector< int > IDs; + + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle* temp_p = &PPFPs[index]; + if(temp_p->get_IsNeutrino()){ + int temp_sliceID = temp_p->get_SliceID(); + //add one if not found; + if(!std::count(IDs.begin(), IDs.end(), temp_sliceID) ) IDs.push_back(temp_sliceID); + if(best_nuscore < temp_p->get_NuScore() ){ + best_nuscore = temp_p->get_NuScore(); + + best_nuscore_SliceID = temp_p->get_SliceID(); + + } + } + } + + //now markdown all pfparticles in slice + //re-set pNuScore and pIsNuSlice + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle* ppfp = &PPFPs[index]; + if( std::count(IDs.begin(), IDs.end(), ppfp->get_SliceID()) ) ppfp->set_IsNuSlice(true); + } + + return best_nuscore_SliceID; + } //2. Trackers to find the correct PandoraPFParticle - PandoraPFParticle *PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_HasShower() != 1 ) continue; -// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) - && (pShower->Direction() == PPFPs[index].pShower->Direction())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_HasTrack() != 1 ) continue; - if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) - && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs, art::Ptr pShower){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasShower() != 1 ) continue; +// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) + && (pShower->Direction() == PPFPs[index].pShower->Direction())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasTrack() != 1 ) continue; + if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) + && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs, int id){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_PFParticleID() == id ){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< Printer_header( std::vector< std::string> headings){ + //table printers + std::vector Printer_header( std::vector< std::string> headings){ - std::vector spacers; - for( size_t index = 0; index < headings.size(); index++){ - std::cout< spacers; + for( size_t index = 0; index < headings.size(); index++){ + std::cout< nums, std::vector spacers){ + void Printer_content( std::vector< std::string > nums, std::vector spacers){ - if(nums.size() != spacers.size()) { - std::cout<<"CANNOT PRINT!"<&X1, std::vector& X2, std::vector& point){ double x1 =X1.at(0); double y1 =X1.at(1); @@ -26,7 +25,7 @@ namespace single_photon double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - // right, but can be simplified + // right, but can be simplified double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); return sqrt(d2); @@ -51,7 +50,7 @@ namespace single_photon // std::cout< start = {0.0,result.start().Y(),result.start().Z()}; std::vector end = {0.0,result.end().Y(),result.end().Z()}; std::vector point = {0.0,Ypoint,Zpoint}; @@ -160,7 +159,7 @@ namespace single_photon } /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - TVector3 getWireVec(int plane){ + TVector3 getWireVec(int plane){ TVector3 wire_dir; if (plane == 0){ wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; @@ -173,50 +172,50 @@ namespace single_photon } /* dot product of wire_dir and shower direction vectors */ - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ - return wire_dir.Dot(shower_dir); - } + double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ + return wire_dir.Dot(shower_dir); + } - /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - double getAnglewrtWires(TVector3 shower_dir,int plane){ + /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + double getAnglewrtWires(TVector3 shower_dir,int plane){ - TVector3 wire_dir = getWireVec(plane); - double cos_theta = getCoswrtWires(shower_dir, wire_dir); + TVector3 wire_dir = getWireVec(plane); + double cos_theta = getCoswrtWires(shower_dir, wire_dir); - double theta = acos(cos_theta); - // return abs(theta); - return abs(M_PI/2 - theta); + double theta = acos(cos_theta); + // return abs(theta); + return abs(M_PI/2 - theta); - } + } double degToRad(double deg){ return deg * M_PI/180; } double radToDeg(double rad){ return rad * 180/M_PI; } - double getMedian(std::vector thisvector){ - size_t len = thisvector.size(); - if(len < 1) return NAN; - - std::sort(thisvector.begin(), thisvector.end()); - if(len % 2 != 0){//even - return average of two at median - return 0.5*(thisvector[len/2]+thisvector[len/2+1]); - }else{//odd - return the median - return thisvector[len/2]; - } - } - - /* returns (generally) best median dEdx of all 3 - * planes, usually plane 2 */ - double getAmalgamateddEdx( - double angle_wrt_plane0, - double angle_wrt_plane1, - double angle_wrt_plane2, - double median_plane0, - double median_plane1, - double median_plane2, - int plane0_nhits, - int plane1_nhits, - int plane2_nhits){ + double getMedian(std::vector thisvector){ + size_t len = thisvector.size(); + if(len < 1) return NAN; + + std::sort(thisvector.begin(), thisvector.end()); + if(len % 2 != 0){//even - return average of two at median + return 0.5*(thisvector[len/2]+thisvector[len/2+1]); + }else{//odd - return the median + return thisvector[len/2]; + } + } + + /* returns (generally) best median dEdx of all 3 + * planes, usually plane 2 */ + double getAmalgamateddEdx( + double angle_wrt_plane0, + double angle_wrt_plane1, + double angle_wrt_plane2, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 if(angle_wrt_plane2< degToRad(10)){ //if it's too close to the wires on either of the planes, then stick with plane 2 @@ -239,15 +238,15 @@ namespace single_photon return median_plane2; } - /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - int getAmalgamateddEdxNHits( - double amalgamateddEdx, - double median_plane0, - double median_plane1, - double median_plane2, - int plane0_nhits, - int plane1_nhits, - int plane2_nhits){ + /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + int getAmalgamateddEdxNHits( + double amalgamateddEdx, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ if (amalgamateddEdx == median_plane0){ return plane0_nhits; } @@ -292,15 +291,5 @@ namespace single_photon corners.push_back(c3); return corners; } - - - -// double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detpropdata){ -// -// double time = detpropdata.ConvertXToTicks(X, plane, fTPC,fCryostat); -// return time; -// } - -//----------- END OF HELPER FUNCTIONS ----------- } diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h index f55fd87d3..790959981 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h @@ -1,273 +1,7 @@ namespace single_photon { - //--------------------- a template to get vectors from labels ------------------------- - //1. Scratch from Handle, and return a equivalently useful vector. - // Sample usage: - // art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); //yea, this should be gone; - // recob::Hit dummy_hit;//This is to specify the template; - // std::vector> hitVector = VectorFromLabel(dummy_hit, evt, m_hitfinderLabel); - -// template //A helper template that allows you to make compliated types. -// struct temporary_types{ -// using type1 = std::vector>; -// using type2 = art::ValidHandle>; -// using type3 = std::vector; -// }; -// -// template //ref_type is only used to identify the temporary_types late. -// typename temporary_types::type1 VectorFromLabel(recob_object ref_type, const art::Event &evt, std::string &label){ -// -// typename temporary_types::type2 const & Handle = evt.getValidHandle::type3>(label); -// typename temporary_types::type1 Vector; -// art::fill_ptr_vector(Vector,Handle); -// return Vector; -// } - - //--------------------- a template to get vectors from labels ------------------------- - //-------- Only use this once for now, potentially 13+ more lines can be saved -------- - - - - - - - - - - - - - - - - - - - - - - - - - - //----------- Below are migrated from Singlephoton_module.cc - void SinglePhoton::GetVertex(const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, const art::Ptr & particle ){ - - if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"()\t||\t Starting to analyze recob::Vertex\n"; - int n_vert =0; - - //std::cout<<"There are "<second; - if (!vertexVector.empty()) - { - if (vertexVector.size() !=1) - std::cout << " Warning: Found particle with more than one associated vertex " << "\n"; - - const art::Ptr vertex = *(vertexVector.begin()); - double xyz[3] = {0.0, 0.0, 0.0} ; - vertex->XYZ(xyz); - - n_vert++; - - //m_vertex_pos_x = xyz[0]; - //m_vertex_pos_y = xyz[1]; - //m_vertex_pos_z = xyz[2]; - std::cout<<"CHECK Vertex position: ("< tmp = {xyz[0],xyz[1],xyz[2]}; - //m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - //m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); - //m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); -//CHECK -// if(!m_run_pi0_filter){ -// m_reco_vertex_to_nearest_dead_wire_plane0 = distanceToNearestDeadWire(0, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// m_reco_vertex_to_nearest_dead_wire_plane1 = distanceToNearestDeadWire(1, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// m_reco_vertex_to_nearest_dead_wire_plane2 = distanceToNearestDeadWire(2, m_vertex_pos_y, m_vertex_pos_z,geom,bad_channel_list_fixed_mcc9); -// } - - }else{ - throw art::Exception(art::errors::StdException) - << " Pandor did not have an associated vertex for a particle. "; -// << " Error: vertexVector associated with this particle is empty " << "\n"; - - } - } - - if(m_is_verbose) std::cout<<"SinglePhoton::Getvertex()\t||\t Finished. Found "<size()<size(); ++i) - { - const art::Ptr pParticle(pfParticleHandle, i); - // std::cout<<"Adding PFP to pfParticleMap with pfp id "<Self()<Self(), pParticle)).second) - { - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } - } - - - - //Classify PFParticles into crParticles or nuParticles. - void SinglePhoton::GetFinalStatePFParticleVectors( - const PFParticleIdMap &pfParticleMap, - const lar_pandora::PFParticlesToVertices &pfParticlesToVerticesMap, - PFParticleVector &crParticles, - PFParticleVector &nuParticles, - size_t fpfp_w_bestnuID ) { - if(m_is_verbose) std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\tSort out PFPParticles."< pParticle(it->second); - - // Only look for primary particles - if (!pParticle->IsPrimary()) continue; - primaries++; - - - // Check if this particle is identified as the neutrino - const int pdg(pParticle->PdgCode()); -// const bool isNeutrino = (std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - //CHECK - bool isNeutrino = (std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); - - - // If it is, lets get the vertex position - if(isNeutrino){ - if(found>0){ -// std::cout<<"CHECK WARNING we have more than 1 neutrinos here, not expected as in MicroBooNE but ok."<Self()<<"th PFParticle is reco. as neutrino w. pdg: "<Self() == fpfp_w_bestnuID){ - std::cout<<"Take this PFParticle's vertex as event vertex, bc of it has highest nu score"<GetVertex(pfParticlesToVerticesMap, pParticle ); - } - } - // All non-neutrino primary particles are reconstructed under the cosmic hypothesis - if (!isNeutrino) - { - crParticles.push_back(pParticle); - continue; - } - - // ATTN. We are filling nuParticles under the assumption that there is only one reconstructed neutrino identified per event. - // If this is not the case please handle accordingly -//CHECK if (!nuParticles.empty()) -// { -// throw cet::exception("SinglePhoton") << " This event contains "<Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - nuParticles.push_back(pfParticleMap.at(daughterId)); - } - } - std::cout<<"SinglePhoton::"<<__FUNCTION__<<"\t||\t Found "< , - art::Ptr> &trackToNuPFParticleMap, - std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - // Get the associations between PFParticles and tracks/showers from the event - art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); - art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); - - //if running over the neutrino slice only - if (m_run_all_pfps == false){ - for (const art::Ptr &pParticle : particles) { - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - } - } else{ //if running over all slices - std::cout<<"SinglePhoton\t||\tThe total number of PFP's in the map is "< &pParticle = pair.second; - - const std::vector< art::Ptr > associatedTracks(pfPartToTrackAssoc.at(pParticle.key())); - const std::vector< art::Ptr > associatedShowers(pfPartToShowerAssoc.at(pParticle.key())); - - FillTracksAndShowers(associatedTracks, associatedShowers, pParticle, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - - } - } - } - - - - void SinglePhoton::FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap) - { - - const unsigned int nTracks(associatedTracks.size()); - const unsigned int nShowers(associatedShowers.size()); - - - // Check if the PFParticle has no associated tracks or showers - if (nTracks == 0 && nShowers == 0) - { - // std::cout<<"ERROR No tracks or showers were associated to PFParticle " << pParticle->Self()<<" with pdg "<PdgCode() <Self() << "\n"; - return; - } - - // Check if there is an associated track - if (nTracks == 1 && nShowers == 0) - { - - tracks.push_back(associatedTracks.front()); - trackToNuPFParticleMap[tracks.back()]= pParticle; - //std::cout<<"adding to trackToNuPFParticleMap this track with id "<< associatedTracks.front()->ID() << " and PFP "<< pParticle->Self()<ID() << " and PFP "<< pParticle->Self()<Self(); - - } @@ -281,7 +15,7 @@ namespace single_photon double kz = input[2]; //CHECK // auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - // CHECK + // CHECK // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); //CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); @@ -293,10 +27,6 @@ namespace single_photon corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials corrected[1]=ky+yOffset; corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()<, std::vector>> &truthToParticles, - std::map< art::Ptr, art::Ptr> &particlesToTruth, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + const art::Event &evt, + const std::string &label, + std::map< art::Ptr, std::vector>> &truthToParticles, + std::map< art::Ptr, art::Ptr> &particlesToTruth, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ // if (evt.isRealData()) // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; @@ -414,14 +144,14 @@ namespace single_photon } - void SinglePhoton::BuildMCParticleHitMaps( - const art::Event &evt, - const std::string &label, - const std::vector> &hitVector, - std::map< art::Ptr, std::vector > > &particlesToHits, - std::map< art::Ptr, art::Ptr > &hitsToParticles, - const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + void SinglePhoton::BuildMCParticleHitMaps( + const art::Event &evt, + const std::string &label, + const std::vector> &hitVector, + std::map< art::Ptr, std::vector > > &particlesToHits, + std::map< art::Ptr, art::Ptr > &hitsToParticles, + const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ std::vector< art::Ptr > simChannelVector; std::map< art::Ptr, std::vector> > truthToParticles; std::map< art::Ptr, art::Ptr > particlesToTruth; @@ -430,9 +160,9 @@ namespace single_photon this->CollectSimChannels(evt, label, simChannelVector); this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); // CHECK - //Collect the links from reconstructed hits to their true energy deposits. + //Collect the links from reconstructed hits to their true energy deposits. lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); - //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information + //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); @@ -498,8 +228,8 @@ namespace single_photon for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { //calculate the area of a triangle with the point and two vertices double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) - + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) - + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); + + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) + + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); areas += this_area; } //calc area of the rectangle @@ -513,7 +243,7 @@ namespace single_photon } - //helpers for calculating calometry + //helpers for calculating calometry double SinglePhoton::CalcEShower(const std::vector> &hits){ double energy[3] = {0., 0., 0.}; @@ -524,8 +254,8 @@ namespace single_photon //check the plane int plane= thishitptr->View(); - //skip invalid planes - if (plane > 2 || plane < 0) continue; + //skip invalid planes + if (plane > 2 || plane < 0) continue; //calc the energy of the hit double E = QtoEConversion(GetQHit(thishitptr, plane)); @@ -556,8 +286,8 @@ namespace single_photon //check the plane int plane= thishitptr->View(); - //skip invalid planes - if (plane != this_plane ) continue; + //skip invalid planes + if (plane != this_plane ) continue; //calc the energy of the hit double E = QtoEConversion(GetQHit(thishitptr, plane)); @@ -613,8 +343,8 @@ namespace single_photon const art::Ptr& shower, const std::vector> & clusters, std::map, std::vector> > & clusterToHitMap ,int plane, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector){ + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector){ //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; @@ -623,7 +353,7 @@ namespace single_photon TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); //calculate the pitch for this plane - double pitch = getPitch(shower_dir, plane); + double pitch = getPitch(shower_dir, plane); //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "<View() != plane) continue; //calculate the cluster direction - std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; //get the cluster start and and in CM //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)<> rectangle = buildRectangle(cluster_start, cluster_axis, m_width_dqdx_box, m_length_dqdx_box); + std::vector> rectangle = buildRectangle(cluster_start, cluster_axis, m_width_dqdx_box, m_length_dqdx_box); //get all the hits for this cluster std::vector> hits = clusterToHitMap[thiscluster]; //for each hit in the cluster - for (art::Ptr &thishit: hits){ + for (art::Ptr &thishit: hits){ //get the hit position in cm from the wire and time std::vector thishit_pos ={thishit->WireID().Wire * m_wire_spacing, (thishit->PeakTime() - triggeroffset)* _time2cm}; @@ -682,7 +412,7 @@ namespace single_photon double cos = getCoswrtWires(shower_dir, wire_dir); //want only positive values so take abs, normalize by the lengths of the shower and wire - cos = abs(cos)/(wire_dir.Mag() * shower_dir.Mag()); + cos = abs(cos)/(wire_dir.Mag() * shower_dir.Mag()); //If the cos is 0 shower is perpendicular and therefore get infinite distance if (cos == 0){ return std::numeric_limits::max(); } @@ -727,20 +457,6 @@ namespace single_photon - - //area of a triangle given three vertices - -// double this_area = areaTriangle(rectangle[i][0], rectangle[i][1], rectangle[j][0], rectangle[j][1], thishit_pos[0], thishit_pos[1]); -// double SinglePhoton::areaTriangle(double x1, double y1, double x2, double y2, double x3, double y3){ -// double num = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2); -// return abs(num)/2; -// } - - - -//CHECK below are moved from SinglePhoton_module.cc - - double SinglePhoton::triangle_area(double a1, double a2, double b1, double b2, double c1, double c2){ double m1 = 0.3; double m2 = 1.0/25.0; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h index b8dbf1d09..4857e38c6 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h @@ -62,7 +62,7 @@ class TruncMean{ @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation */ void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma = 1); + std::vector& dq_trunc_v, const double& nsigma = 1); /** @brief Iteratively calculate the truncated mean of a distribution @@ -77,10 +77,10 @@ class TruncMean{ @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. */ double CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed = kINVALID_FLOAT); + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed = kINVALID_FLOAT); /** @brief Set the smearing radius over which to take hits for truncated mean computaton. @@ -102,159 +102,159 @@ class TruncMean{ }; double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed) + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed) { - auto const& mean = Mean(v); - auto const& med = Median(v); - auto const& rms = RMS(v); + auto const& mean = Mean(v); + auto const& med = Median(v); + auto const& rms = RMS(v); - // if the vector length is below the lower limit -> return - if (v.size() < lmin) - return mean; + // if the vector length is below the lower limit -> return + if (v.size() < lmin) + return mean; - // if we have passed the maximum number of iterations -> return - if (currentiteration >= nmax) - return mean; + // if we have passed the maximum number of iterations -> return + if (currentiteration >= nmax) + return mean; - // if we passed the minimum number of iterations and the mean is close enough to the old value - double fracdiff = fabs(med-oldmed) / oldmed; - if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) - return mean; + // if we passed the minimum number of iterations and the mean is close enough to the old value + double fracdiff = fabs(med-oldmed) / oldmed; + if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) + return mean; - // if reached here it means we have to go on for another iteration + // if reached here it means we have to go on for another iteration - // cutoff tails of distribution surrounding the mean - // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom - // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions - v.erase( std::remove_if( v.begin(), v.end(), - [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed - v.end()); + // cutoff tails of distribution surrounding the mean + // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom + // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions + v.erase( std::remove_if( v.begin(), v.end(), + [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed + v.end()); - return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); + return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); } void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma) + std::vector& dq_trunc_v, const double& nsigma) { - // how many points to sample - int Nneighbor = (int)(_rad * 3 * 2); + // how many points to sample + int Nneighbor = (int)(_rad * 3 * 2); - dq_trunc_v.clear(); - dq_trunc_v.reserve( rr_v.size() ); + dq_trunc_v.clear(); + dq_trunc_v.reserve( rr_v.size() ); - int Nmax = dq_v.size()-1; + int Nmax = dq_v.size()-1; - for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size + for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size - // current residual range - double rr = rr_v.at(n); + // current residual range + double rr = rr_v.at(n); - int nmin = n - Nneighbor; - int nmax = n + Nneighbor; + int nmin = n - Nneighbor; + int nmax = n + Nneighbor; - if (nmin < 0) nmin = 0; - if (nmax > Nmax) nmax = Nmax; + if (nmin < 0) nmin = 0; + if (nmax > Nmax) nmax = Nmax; - // vector for local dq values - std::vector dq_local_v; + // vector for local dq values + std::vector dq_local_v; - for (int i=nmin; i < nmax; i++) { + for (int i=nmin; i < nmax; i++) { - double dr = rr - rr_v[i]; - if (dr < 0) dr *= -1; + double dr = rr - rr_v[i]; + if (dr < 0) dr *= -1; - if (dr > _rad) continue; + if (dr > _rad) continue; - dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough + dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough - }// for all ticks we want to scan + }// for all ticks we want to scan - if (dq_local_v.size() == 0 ) { - dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself - continue; - } + if (dq_local_v.size() == 0 ) { + dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself + continue; + } - // calculate median and rms - double median = Median(dq_local_v); - double rms = RMS(dq_local_v); + // calculate median and rms + double median = Median(dq_local_v); + double rms = RMS(dq_local_v); - double truncated_dq = 0.; - int npts = 0; - for (auto const& dq : dq_local_v) { - if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ - truncated_dq += dq; - npts += 1; - } - } + double truncated_dq = 0.; + int npts = 0; + for (auto const& dq : dq_local_v) { + if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ + truncated_dq += dq; + npts += 1; + } + } - dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma + dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma - if(dq_trunc_v.back() != dq_trunc_v.back()){ - std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) { - double mean = 0.; - for (auto const& n : v) mean += n; - mean /= v.size(); + double mean = 0.; + for (auto const& n : v) mean += n; + mean /= v.size(); - return mean; + return mean; } double TruncMean::Median(const std::vector& v) { - if (v.size() == 1) return v[0]; + if (v.size() == 1) return v[0]; - std::vector vcpy = v; + std::vector vcpy = v; - std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order + std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order - double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice + double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice - return median; + return median; } double TruncMean::RMS(const std::vector& v) { - if(v.size()==1) return v.front(); + if(v.size()==1) return v.front(); - double avg = 0.; - for (auto const& val : v) avg += val; - avg /= v.size(); - double rms = 0.; - for (auto const& val : v) rms += (val-avg)*(val-avg); - rms = sqrt( rms / ( v.size() - 1 ) ); + double avg = 0.; + for (auto const& val : v) avg += val; + avg /= v.size(); + double rms = 0.; + for (auto const& val : v) rms += (val-avg)*(val-avg); + rms = sqrt( rms / ( v.size() - 1 ) ); - if(rms!=rms){ - std::cout<<"ERROR || TruncMean::RMS || is returning nan."<> &mcParticleVector){ - - - std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); - for(size_t j=0;j< mcParticleVector.size();j++){ - - const art::Ptr mcp = mcParticleVector[j]; -// std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()), - std::to_string(mcp->StatusCode()), - std::to_string(mcp->TrackId()), - std::to_string(mcp->Mother()), - mcp->Process(), - mcp->EndProcess(), - std::to_string(mcp->E()), - std::to_string(mcp->Vx()), - std::to_string(mcp->Vy()), - std::to_string(mcp->Vz()) - }, - spacers); - - m_geant4_pdg.push_back(mcp->PdgCode()); - m_geant4_trackid.push_back(mcp->TrackId()); - m_geant4_statuscode.push_back(mcp->StatusCode()); - m_geant4_mother.push_back(mcp->Mother()); - m_geant4_E.push_back(mcp->E()); - m_geant4_mass.push_back(mcp->Mass()); - m_geant4_px.push_back(mcp->Px()); - m_geant4_py.push_back(mcp->Py()); - m_geant4_pz.push_back(mcp->Pz()); - m_geant4_vx.push_back(mcp->Vx()); - m_geant4_vy.push_back(mcp->Vy()); - m_geant4_vz.push_back(mcp->Vz()); - m_geant4_end_process.push_back(mcp->EndProcess()); - m_geant4_process.push_back(mcp->Process()); - m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - - - - if(j>2)break; - - } - + void SinglePhoton::AnalyzeGeant4( const std::vector> &mcParticleVector){ + + + std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); + for(size_t j=0;j< mcParticleVector.size();j++){ + + const art::Ptr mcp = mcParticleVector[j]; + // std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()), + std::to_string(mcp->StatusCode()), + std::to_string(mcp->TrackId()), + std::to_string(mcp->Mother()), + mcp->Process(), + mcp->EndProcess(), + std::to_string(mcp->E()), + std::to_string(mcp->Vx()), + std::to_string(mcp->Vy()), + std::to_string(mcp->Vz()) + }, + spacers); + + m_geant4_pdg.push_back(mcp->PdgCode()); + m_geant4_trackid.push_back(mcp->TrackId()); + m_geant4_statuscode.push_back(mcp->StatusCode()); + m_geant4_mother.push_back(mcp->Mother()); + m_geant4_E.push_back(mcp->E()); + m_geant4_mass.push_back(mcp->Mass()); + m_geant4_px.push_back(mcp->Px()); + m_geant4_py.push_back(mcp->Py()); + m_geant4_pz.push_back(mcp->Pz()); + m_geant4_vx.push_back(mcp->Vx()); + m_geant4_vy.push_back(mcp->Vy()); + m_geant4_vz.push_back(mcp->Vz()); + m_geant4_end_process.push_back(mcp->EndProcess()); + m_geant4_process.push_back(mcp->Process()); + m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + + + + if(j>2)break; } + + + } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h index 07cca1d3b..0e5ee5e72 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h @@ -1,7 +1,7 @@ namespace single_photon { - //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; + //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); if(m_is_verbose) std::cout<<"# of simb::MCTruth: "< spacers = Printer_header({" NuPdg"," CC=0"," TruthVertex(x,"," y, ",", z )"}); + std::cout< spacers = Printer_header({" NuPdg"," CC=0"," TruthVertex(x,"," y, ",", z )"}); for(int i=0; i truth = mcTruthVector[i]; -// std::cout<<"\nCHECK THIS MCTruth!! "<<*truth<Origin(); @@ -46,8 +45,7 @@ namespace single_photon // if(m_is_verbose) std::cout<<"Getting SC corrected vertex position"< corrected(3); - // get corrected lepton position - // CHECK, turn simb::mcparticle to art::Ptrspacecharge_correction( truth->GetNeutrino().Lepton(),corrected); m_mctruth_nu_vertex_x = corrected[0]; @@ -55,14 +53,14 @@ namespace single_photon m_mctruth_nu_vertex_z = corrected[2]; m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); - //std::vector spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); - Printer_content( - {std::to_string(m_mctruth_nu_pdg), - std::to_string(m_mctruth_ccnc), - std::to_string(corrected[0]), - std::to_string(corrected[1]), - std::to_string(corrected[2]) - },spacers); + //std::vector spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); + Printer_content( + {std::to_string(m_mctruth_nu_pdg), + std::to_string(m_mctruth_ccnc), + std::to_string(corrected[0]), + std::to_string(corrected[1]), + std::to_string(corrected[2]) + },spacers); } @@ -71,10 +69,10 @@ namespace single_photon m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles - if(m_is_verbose) std::cout<<"\nThis MCTruth has "<NParticles()<<" daughters "< spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); + if(m_is_verbose) std::cout<<"\nThis MCTruth has "<NParticles()<<" daughters "< spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); - + this->ResizeMCTruths(m_mctruth_num_daughter_particles); @@ -231,14 +229,14 @@ namespace single_photon break; } -// if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "< m_exiting_photon_energy_threshold){ - m_mctruth_num_reconstructable_protons++; + // m_exiting_photon_energy_threshold is read from pset + if ( m_mctruth_exiting_photon_energy[p] > m_exiting_photon_energy_threshold){ + m_mctruth_num_reconstructable_protons++; - }//if g above threshold + }//if g above threshold } //if it's a true delta radiative event, check the energies @@ -327,8 +325,8 @@ namespace single_photon simb::MCParticle nth_mother = mother; int n_generation = 2; - // Guanqun: why not consider its first-generation mother? - // for a photon exiting nucleus, its first mother is always also a photon (photon exits the nucleus, it becomes another photon..) + // Guanqun: why not consider its first-generation mother? + // for a photon exiting nucleus, its first mother is always also a photon (photon exits the nucleus, it becomes another photon..) while(nth_mother.StatusCode() != 0 || n_generation < 4){ if(nth_mother.Mother()<0) break; @@ -390,10 +388,10 @@ namespace single_photon if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; - // if it's a pi0, its mother trackID is 0 and it has two daughters + // if it's a pi0, its mother trackID is 0 and it has two daughters if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ npi0check++; - // get its two daughters + // get its two daughters const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; @@ -440,7 +438,7 @@ namespace single_photon m_mctruth_pi0_leading_photon_end = corrected_1_end; m_mctruth_pi0_subleading_photon_start = corrected_2_start; m_mctruth_pi0_subleading_photon_end = corrected_2_end; - //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! + //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! m_mctruth_pi0_leading_photon_exiting_TPC =exit1; m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h index 738b43e2b..a9eba3d8c 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h @@ -39,7 +39,7 @@ namespace single_photon m_reco_flash_zcenter[i]=flash->ZCenter(); m_reco_flash_zwidth[i]=flash->ZWidth(); - // m_beamgate_flash_end/m_beamgate_flash_start are read from pset + // m_beamgate_flash_end/m_beamgate_flash_start are read from pset if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ m_reco_num_flashes_in_beamgate++; m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h index 7b267613c..26b78fbd4 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h @@ -1,467 +1,454 @@ namespace single_photon { - void SinglePhoton::AnalyzeShowers( - std::vector all_PPFPs, - const std::vector>& showers, - std::map, std::vector> > & clusterToHitMap , - std::map, art::Ptr>& PFPtoShowerReco3DMap, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ){ + void SinglePhoton::AnalyzeShowers( + std::vector all_PPFPs, + const std::vector>& showers, + std::map, std::vector> > & clusterToHitMap , + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ){ // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); - -// if(m_is_verbose) std::cout<<__FUNCTION__<<" CHECK showers found: "< spacers = Printer_header({"Slice"," pfpID"," Start(x, "," y, "," z )"," trackscore"," pdg"}); + + std::vector spacers = Printer_header({"Slice"," pfpID"," Start(x, "," y, "," z )"," trackscore"," pdg"}); for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { + { - const art::Ptr shower = *iter; - // const art::Ptr pfp = showerToPFParticleMap[shower]; - //CHECK I think I can take care of all pfpmaps here; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + const art::Ptr shower = *iter; + // const art::Ptr pfp = showerToPFParticleMap[shower]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); - const art::Ptr pfp = ppfp->pPFParticle; - // std::cout<<"CHECK SHower pfparticle "<Self()<<" and "<Self()< pfp = ppfp->pPFParticle; - art::Ptr shower3d; - if(PFPtoShowerReco3DMap.count(pfp)==0){ - // std::cout<<"SHOWER_3D : <> hits = pfParticleToHitMap[pfp]; - // const std::vector> clusters = pfParticleToClusterMap[pfp]; + art::Ptr shower3d; + m_reco_shower3d_exists[i_shr] = 0; + shower3d = shower; - const std::vector> hits = ppfp->pPFPHits; - const std::vector> clusters = ppfp->pClusters; + const std::vector> hits = ppfp->pPFPHits; + const std::vector> clusters = ppfp->pClusters; - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); + //int m_shrid = shower->ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); - TVector3 shr_start = shower->ShowerStart(); - TVector3 shr_dir = shower->Direction(); + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); - TVector3 shr3d_start = shower3d->ShowerStart(); - TVector3 shr3d_dir = shower3d->Direction(); + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; - m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); - m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); - m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); - - m_reco_shower_dirx[i_shr] = shr_dir.X(); - m_reco_shower_diry[i_shr] = shr_dir.Y(); - m_reco_shower_dirz[i_shr] = shr_dir.Z(); - m_reco_shower_length[i_shr] = m_length; - m_reco_shower_openingangle[i_shr] = m_open_angle; - - m_reco_shower3d_startx[i_shr] = shr3d_start.X(); - m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); - m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); - m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); - m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); - m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); - m_reco_shower3d_length[i_shr] = shower3d->Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - - - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); - - //pandroa shower - std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; - std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; - - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; - - //now 3D shower - std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; - std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - - - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); - - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); - - - m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - std::vector t_num(3,0); // num of triangles on each plane - std::vector t_numhits(3,0); // num of hits on each plane - std::vector t_area(3,0.0); - - //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - - //auto finish = std::chrono::high_resolution_clock::now(); - //auto microseconds = std::chrono::duration_cast(finish-start); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; + m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); + m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); - m_reco_shower_delaunay_num_triangles_plane0[i_shr] = t_num[0]; - m_reco_shower_delaunay_num_triangles_plane1[i_shr] = t_num[1]; - m_reco_shower_delaunay_num_triangles_plane2[i_shr] = t_num[2]; + m_reco_shower_dirx[i_shr] = shr_dir.X(); + m_reco_shower_diry[i_shr] = shr_dir.Y(); + m_reco_shower_dirz[i_shr] = shr_dir.Z(); + m_reco_shower_length[i_shr] = m_length; + m_reco_shower_openingangle[i_shr] = m_open_angle; - m_reco_shower_delaunay_area_plane0[i_shr] = t_area[0]; - m_reco_shower_delaunay_area_plane1[i_shr] = t_area[1]; - m_reco_shower_delaunay_area_plane2[i_shr] = t_area[2]; + m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + m_reco_shower3d_length[i_shr] = shower3d->Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - m_reco_shower_num_hits_plane0[i_shr] = t_numhits[0]; - m_reco_shower_num_hits_plane1[i_shr] = t_numhits[1]; - m_reco_shower_num_hits_plane2[i_shr] = t_numhits[2]; - //-------------- Calorimetry 3D -------------------- + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - const std::vector< double > shr3d_energy = shower3d->Energy(); - const std::vector< double > shr3d_dEdx = shower3d->dEdx(); - //const int shr3d_bestplane = shower3d->best_plane(); + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - // std::cout<<"SHOWER3D_ENERGY: best plane: "< t_num(3,0); // num of triangles on each plane + std::vector t_numhits(3,0); // num of hits on each plane + std::vector t_area(3,0.0); - m_reco_shower_plane0_meanRMS[i_shr] = getMeanHitWidthPlane(hits, 0); - m_reco_shower_plane1_meanRMS[i_shr] = getMeanHitWidthPlane(hits, 1); - m_reco_shower_plane2_meanRMS[i_shr] = getMeanHitWidthPlane(hits, 2); + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - //currently only run on 1 shower events - if(showers.size()==1){ - for(auto &h: hits){ - - int plane= h->View(); - int wire = h->WireID().Wire; - int tick = h->PeakTime(); - - m_reco_shower_hit_tick.push_back(tick); - m_reco_shower_hit_plane.push_back(plane); - m_reco_shower_hit_wire.push_back(wire); - } - } - - - //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); - - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; - if(ymin > ymax) std::swap(ymin, ymax); - - //Code property of Gray Yarbrough (all rights reserved) - //int optical_flash_in_beamgate_counter=0; - double shortest_dist_to_flash_z=DBL_MAX; - double shortest_dist_to_flash_y=DBL_MAX; - double shortest_dist_to_flash_yz=DBL_MAX; - //-999 my nonsenese int can change - int shortest_dist_to_flash_index_z=-999; - int shortest_dist_to_flash_index_y=-999; - int shortest_dist_to_flash_index_yz=-999; - - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { - dist_z = zcenter - zmax; - } - else { - dist_z = 0; - } - if(dist_z < shortest_dist_to_flash_z){ - shortest_dist_to_flash_z = dist_z; - shortest_dist_to_flash_index_z=i_flash; - } - - - //y plane - - double dist_y=DBL_MAX; - if(ycenter < ymin) { - dist_y = ymin - ycenter; - } - else if(ycenter > ymax) { - dist_y = ycenter - ymax; - } - else { - dist_y= 0; - } - if(dist_y < shortest_dist_to_flash_y){ - shortest_dist_to_flash_y = dist_y; - shortest_dist_to_flash_index_y=i_flash; - } - - double dist_yz=DBL_MAX; - dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); - if(dist_yzNumDaughters(); //corresponding PFParticle - // std::cout<<" CHECK numebr "<0){ - //currently just look at 1 daughter - //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - int pfp_size = all_PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - // std::cout<<"CHECK Compare "<Daughters().front()<< - // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); - break; - } - } - - - //------------and finally some slice info----------------- - - m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - - m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); - m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); - - // if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )", "trackScore", "Pdg"}); - Printer_content( - {std::to_string(ppfp->get_SliceID()), - std::to_string(ppfp->get_PFParticleID()), - std::to_string(shr_start.X()), - std::to_string(shr_start.Y()), - std::to_string(shr_start.Z()), - std::to_string(ppfp->get_TrackScore()), - std::to_string(ppfp->get_PdgCode()) - },spacers); - - } + //auto finish = std::chrono::high_resolution_clock::now(); + //auto microseconds = std::chrono::duration_cast(finish-start); + //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + //const int shr3d_bestplane = shower3d->best_plane(); + + // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); + int wire = h->WireID().Wire; + int tick = h->PeakTime(); + + m_reco_shower_hit_tick.push_back(tick); + m_reco_shower_hit_plane.push_back(plane); + m_reco_shower_hit_wire.push_back(wire); + } + } + + + //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); //corresponding PFParticle + // std::cout<<" CHECK numebr "<0){ + //currently just look at 1 daughter + //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + int pfp_size = all_PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + // std::cout<<"CHECK Compare "<Daughters().front()<< + // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); + m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); + break; + } + } + + + //------------and finally some slice info----------------- + + m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + + m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); + m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); + + // if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )", "trackScore", "Pdg"}); + Printer_content( + {std::to_string(ppfp->get_SliceID()), + std::to_string(ppfp->get_PFParticleID()), + std::to_string(shr_start.X()), + std::to_string(shr_start.Y()), + std::to_string(shr_start.Z()), + std::to_string(ppfp->get_TrackScore()), + std::to_string(ppfp->get_PdgCode()) + },spacers); + + } //Lets sort and order the showers m_reco_shower_ordered_energy_index = sort_indexes(m_reco_shower_energy_max); } - void SinglePhoton::AnalyzeKalmanShowers( - const std::vector>& showers, - std::map,art::Ptr> &showerToPFParticleMap, - std::map,art::Ptr> & pfParticlesToShowerKalmanMap, - std::map,std::vector>>& kalmanTrackToCaloMap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector){ - std::cout<<"NO Kalman stuff in SBND" <>& showers, + std::map,art::Ptr> &showerToPFParticleMap, + std::map,art::Ptr> & pfParticlesToShowerKalmanMap, + std::map,std::vector>>& kalmanTrackToCaloMap, + std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesData const & theDetector){ + std::cout<<"NO Kalman stuff in SBND" <ResidualRange().back() - calo[p]->ResidualRange()[ix]; // if(rr <= res_range_lim){ -// // Guanqun: why is here a gains[plane], it's not converting ADC to E? +// // Guanqun: why is here a gains[plane], it's not converting ADC to E? // t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); // //t_dQdx.push_back(*calo[p]->dQdx()[x]); // t_res.push_back(rr); @@ -539,7 +526,7 @@ namespace single_photon // // if(t_dEdx.size()>0) tmedian = this->getMedian(t_dEdx); // if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); -// std::cout<<"CHECK "<<__LINE__<<" in analyze_Showers.h to see why dEdx does not work"<ResizeSlices(m_reco_slice_num); m_reco_slice_nuscore = nuscore_slices; @@ -379,13 +379,8 @@ namespace single_photon void SinglePhoton::AnalyzeRecoMCSlices(std::string signal_def, std::vector all_PPFPs, std::map> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap, - std::map, int>& PFPToSliceIdMap){ - + std::map, art::Ptr > &trackToMCParticleMap){ for(size_t index=0; index< all_PPFPs.size(); ++index){ PandoraPFParticle* temp_ppfp = &all_PPFPs[index]; @@ -501,36 +496,6 @@ namespace single_photon m_is_matched_1g0p = true; } - - //CHECK, text reports -// if(m_is_verbose){ -// if (m_reco_1g1p_is_nuslice){ -// int nu_id = m_matched_signal_shower_sliceId[0]; -// for (auto pair: PFPToSliceIdMap){ -// auto pfp = pair.first; -// auto id = pair.second; -// if (id == nu_id){ -// std::cout<<"the pfp in this nu slice with id "<Self()<<" with pdg "<PdgCode()<1 || m_matched_signal_shower_showers_in_slice[0]>1) ){ -// std::cout<<"found reco 1g1p with "<< m_matched_signal_shower_showers_in_slice[0]<<" showers and "<< m_matched_signal_shower_tracks_in_slice[0]<<"tracks in the same slice in run = "< all_PPFPs, - const std::vector>& tracks, - std::map, std::vector>> & pfParticleToSpacePointsMap, - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap){ + void SinglePhoton::AnalyzeTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); + this->ResizeTracks(m_reco_asso_tracks); - //const double adc2eU(5.1e-3); - //const double adc2eV(5.2e-3); - // const double adc2eW(5.4e-3); + //const double adc2eU(5.1e-3); + //const double adc2eV(5.2e-3); + // const double adc2eW(5.4e-3); - // const double tau(theDetector->ElectronLifetime()); + // const double tau(theDetector->ElectronLifetime()); - //loop over each recob::Track - for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) - { + //loop over each recob::Track + for (TrackVector::const_iterator iter = tracks.begin(), iterEnd = tracks.end(); iter != iterEnd; ++iter) + { - const art::Ptr track = *iter; - // const art::Ptr pfp = trackToNuPFParticleMap[track]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - const art::Ptr pfp = ppfp->pPFParticle; + const art::Ptr track = *iter; + // const art::Ptr pfp = trackToNuPFParticleMap[track]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + const art::Ptr pfp = ppfp->pPFParticle; - const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; - const std::vector> trk_hits = ppfp->pPFPHits;//pfParticleToHitsMap[pfp]; + const std::vector< art::Ptr > trk_spacepoints = pfParticleToSpacePointsMap[pfp]; + const std::vector> trk_hits = ppfp->pPFPHits;//pfParticleToHitsMap[pfp]; - int m_trkid = track->ID(); - double m_length = track->Length(); - auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector - //first: direction of first point, second: direction of the end of track + int m_trkid = track->ID(); + double m_length = track->Length(); + auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector + //first: direction of first point, second: direction of the end of track - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); - m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); - m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); - m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); + m_reco_track_calo_energy_plane0[i_trk] = this->CalcEShowerPlane(trk_hits, 0); + m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); + m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); + m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); - m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); + m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); - m_reco_track_startx[i_trk]= track->Start().X(); - m_reco_track_starty[i_trk]= track->Start().Y(); - m_reco_track_startz[i_trk]= track->Start().Z(); + m_reco_track_startx[i_trk]= track->Start().X(); + m_reco_track_starty[i_trk]= track->Start().Y(); + m_reco_track_startz[i_trk]= track->Start().Z(); - m_reco_track_length[i_trk] =m_length; - m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); - m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); - m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + m_reco_track_length[i_trk] =m_length; + m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); + m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); + m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); - m_reco_track_endx[i_trk] = track->End().X(); - m_reco_track_endy[i_trk]= track->End().Y(); - m_reco_track_endz[i_trk]= track->End().Z(); + m_reco_track_endx[i_trk] = track->End().X(); + m_reco_track_endy[i_trk]= track->End().Y(); + m_reco_track_endz[i_trk]= track->End().Z(); - std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); - m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); + m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); - m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend); - m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart); + m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend); + m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart); - m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); - m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); + m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); - m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); - m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); + m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); - std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - double max_dist_from_line = -9999999; + std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + double max_dist_from_line = -9999999; - m_reco_track_spacepoint_chi[i_trk] = 0.0; - //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. + m_reco_track_spacepoint_chi[i_trk] = 0.0; + //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; - principal->AddRow(&tmp_spacepoints[0]); + TPrincipal* principal = new TPrincipal(3,"ND"); + for(int x = 0; x < m_reco_track_num_spacepoints[i_trk]; x++){ + // get the position of spacepoint in xyz + std::vector tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; + principal->AddRow(&tmp_spacepoints[0]); - // distance between track direction and spacepoint - double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); - if(dist> max_dist_from_line) max_dist_from_line = dist; - m_reco_track_spacepoint_chi[i_trk] += dist*dist; - } - m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + // distance between track direction and spacepoint + double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); + if(dist> max_dist_from_line) max_dist_from_line = dist; + m_reco_track_spacepoint_chi[i_trk] += dist*dist; + } + m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; - principal->MakePrincipals(); - TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); + principal->MakePrincipals(); + TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); - m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); - m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); - m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); - delete principal; + delete principal; - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<get_SliceID();//PFPToSliceIdMap[pfp]; - // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? - // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. - m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; - m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? + // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. + m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; + m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - //std::cout<<"checking track nuslice"<Self()<<" is: "<get_IsNuSlice();//PFPToNuSliceMap[pfp]; + //std::cout<<"checking track nuslice"<Self()<<" is: "<get_IsNuSlice();//PFPToNuSliceMap[pfp]; - m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); - if(m_reco_track_num_daughters[i_trk]>0){ - //currently just look at 1 daughter - // m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - int pfp_size = all_PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); - break; - } + m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); + if(m_reco_track_num_daughters[i_trk]>0){ + //currently just look at 1 daughter + // m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + int pfp_size = all_PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); + m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); + break; + } - } + } - m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); - m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); + m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); + m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - // m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); - // } else{ - // m_reco_track_trackscore[i_trk] = -999; - // m_reco_track_pfparticle_pdg[i_trk] = -999; - // } + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { + // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); + // } else{ + // m_reco_track_trackscore[i_trk] = -999; + // m_reco_track_pfparticle_pdg[i_trk] = -999; + // } - //A loop over the trajectory points - size_t const traj_size = track->CountValidPoints(); - m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + //A loop over the trajectory points + size_t const traj_size = track->CountValidPoints(); + m_reco_track_num_trajpoints[i_trk] = (int)traj_size; - for(unsigned int p = 0; p < traj_size; ++p) { - //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); - //recob::Track::Point_t const & pos = trajp.position; - //recob::Track::Vector_t const & mom = trajp.momentum; + for(unsigned int p = 0; p < traj_size; ++p) { + //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); + //recob::Track::Point_t const & pos = trajp.position; + //recob::Track::Vector_t const & mom = trajp.momentum; - } + } - i_trk++; + i_trk++; - } // end of recob::Track loop + } // end of recob::Track loop - //Lets sort and order the showers - m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); - m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + //Lets sort and order the showers + m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); + m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."< all_PPFPs, - const std::vector>& tracks, - // std::map, art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - // std::map& sliceIdToNuScoreMap, - // std::map,bool>& PFPToClearCosmicMap, - // std::map, int>& PFPToSliceIdMap, - std::vector & vfrac - ){ + void SinglePhoton::RecoMCTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + // std::map, art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + // std::map& sliceIdToNuScoreMap, + // std::map,bool>& PFPToClearCosmicMap, + // std::map, int>& PFPToSliceIdMap, + std::vector & vfrac + ){ - //if(m_is_verbose) - std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; - m_sim_track_matched[i_trk] = 0; + for(size_t k =0; k< tracks.size();++k){ + const art::Ptr track = tracks[k]; + m_sim_track_matched[i_trk] = 0; - if(trackToMCParticleMap.count(track)>0){ + if(trackToMCParticleMap.count(track)>0){ - const art::Ptr mcparticle = trackToMCParticleMap[track]; - std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; + const art::Ptr mcparticle = trackToMCParticleMap[track]; + std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - // const art::Ptr pfp = ppfp->pPFParticle; - // const art::Ptr pfp = //trackToPFParticleMap[track]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + // const art::Ptr pfp = ppfp->pPFParticle; + // const art::Ptr pfp = //trackToPFParticleMap[track]; - std::vector correctedstart(3); - std::vector correctedend(3); - std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; - // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); - this->spacecharge_correction(mcparticle, correctedend, raw_End); + std::vector correctedstart(3); + std::vector correctedend(3); + std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; + // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); + this->spacecharge_correction(mcparticle, correctedend, raw_End); - //std::cout<<"the corrected end of this mcparticle is "<E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = correctedstart[0]; - m_sim_track_starty[i_trk] = correctedstart[1]; - m_sim_track_startz[i_trk] = correctedstart[2]; + m_sim_track_matched[i_trk] = 1; + m_sim_track_energy[i_trk] = mcparticle->E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = correctedstart[0]; + m_sim_track_starty[i_trk] = correctedstart[1]; + m_sim_track_startz[i_trk] = correctedstart[2]; - m_sim_track_endx[i_trk]= correctedend[0]; - m_sim_track_endy[i_trk]= correctedend[1]; - m_sim_track_endz[i_trk]= correctedend[2]; + m_sim_track_endx[i_trk]= correctedend[0]; + m_sim_track_endy[i_trk]= correctedend[1]; + m_sim_track_endz[i_trk]= correctedend[2]; - m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); - m_sim_track_px[i_trk]= mcparticle->Px(); - m_sim_track_py[i_trk]= mcparticle->Py(); - m_sim_track_pz[i_trk]= mcparticle->Pz(); + m_sim_track_px[i_trk]= mcparticle->Px(); + m_sim_track_py[i_trk]= mcparticle->Py(); + m_sim_track_pz[i_trk]= mcparticle->Pz(); - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; - m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_track_parent_pdg[i_trk] = -1; - }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } - } - i_trk++; - } + } + i_trk++; + } - return; - } + return; + } - void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs){ + void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs){ - if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - std::vector> Calos = ppfp->get_Calorimetries(); + for(size_t i_trk = 0; i_trk track = tracks[i_trk]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + std::vector> Calos = ppfp->get_Calorimetries(); - if(Calos.size()!=3){ - std::cout<<"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "< calo_p0 = Calos[0]; - const art::Ptr calo_p1 = Calos[1]; - const art::Ptr calo_p2 = Calos[2]; + const art::Ptr calo_p0 = Calos[0]; + const art::Ptr calo_p1 = Calos[1]; + const art::Ptr calo_p2 = Calos[2]; - size_t calo_length_p0 = calo_p0->dEdx().size(); - size_t calo_length_p1 = calo_p1->dEdx().size(); - size_t calo_length_p2 = calo_p2->dEdx().size(); + size_t calo_length_p0 = calo_p0->dEdx().size(); + size_t calo_length_p1 = calo_p1->dEdx().size(); + size_t calo_length_p2 = calo_p2->dEdx().size(); - TruncMean tm_p0; - TruncMean tm_p1; - TruncMean tm_p2; - - std::vector trunc_dEdx_p0; - std::vector res_range_good_p0; - std::vector dEdx_good_p0; - - std::vector trunc_dEdx_p1; - std::vector res_range_good_p1; - std::vector dEdx_good_p1; - - std::vector trunc_dEdx_p2; - std::vector res_range_good_p2; - std::vector dEdx_good_p2; - - m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; - m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; - m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; - - m_reco_track_best_calo_plane[i_trk]=-1; - - // guanqun: vectors have been clear and resized, so probably not need to reset their values? - m_reco_track_good_calo_p0[i_trk] = 0; - m_reco_track_mean_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; - - m_reco_track_good_calo_p1[i_trk] = 0; - m_reco_track_mean_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; - - m_reco_track_good_calo_p2[i_trk] = 0; - m_reco_track_mean_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; - - - - //First off look over ALL points - //--------------------------------- plane 0 ----------- Induction - for (size_t k = 0; k < calo_length_p0; ++k) { - double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track - double dEdx = calo_p0->dEdx()[k]; - - m_reco_track_mean_dEdx_p0[i_trk] += dEdx; - if(k <= calo_length_p0/2){ - m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; // != has higher precedence than = - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ - res_range_good_p0.push_back(res_range); - dEdx_good_p0.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p0.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p0.setRadius(rad); - tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ - double dEdx = trunc_dEdx_p0[k]; - m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; - if(k <= trunc_dEdx_p0.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p1->dEdx()[k]; - - m_reco_track_mean_dEdx_p1[i_trk] += dEdx; - if(k <= calo_length_p1/2){ - m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ - res_range_good_p1.push_back(res_range); - dEdx_good_p1.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p1.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p1.setRadius(rad); - tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ - double dEdx = trunc_dEdx_p1[k]; - m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; - if(k <= trunc_dEdx_p1.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; - double dEdx = calo_p2->dEdx()[k]; - - m_reco_track_mean_dEdx_p2[i_trk] += dEdx; - if(k <= calo_length_p2/2){ - m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; - } - - bool is_sensible = dEdx < m_track_calo_max_dEdx; - bool is_nan =dEdx != dEdx; - bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; - - if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ - res_range_good_p2.push_back(res_range); - dEdx_good_p2.push_back(dEdx); - } - - // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); - - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; - double min_dx = 999; - for(int j = res_range_good_p2.size()-1; j>1; j--){ - double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); - if(dx < min_dx) min_dx = dx; - } - double rad = std::max( min_dx*2, tenth_track); - - //Calculate the residual range - tm_p2.setRadius(rad); - tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); - - double pida_sum_trunc=0.0; - //Calculate the mean truncated mean dEdx - for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ - double dEdx = trunc_dEdx_p2[k]; - m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; - if(k <= trunc_dEdx_p2.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; - }else{ - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; - } - - - if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ - std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ - m_reco_track_best_calo_plane[i_trk] = 0; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; - - - }else if(m_reco_track_good_calo_p1[i_trk]!=0){ - m_reco_track_best_calo_plane[i_trk] = 1; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; - - - - }else{ - m_reco_track_best_calo_plane[i_trk] = -1; - } - - - } - } - - - - void SinglePhoton::CollectPID(std::vector> & tracks, - std::vector all_PPFPs){ - - for(size_t i_trk=0; i_trk track = tracks[i_trk]; - - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - art::Ptr pid = ppfp->get_ParticleID();//trackToPIDMap[track]; - if (!ppfp->get_HasPID()) { - std::cout << "[analyze_Tracks] bad PID object" << std::endl; - continue; - } - - // For each PID object, create vector of PID scores for each algorithm - // Loop over this and get scores for algorithm of choice - // But first, prepare garbage values, just in case - std::vector AlgScoresVec = pid->ParticleIDAlgScores(); - double pidScore_BL_mu_plane0 = -999; - double pidScore_BL_mu_plane1 = -999; - double pidScore_BL_mu_plane2 = -999; - double pidScore_BL_p_plane0 = -999; - double pidScore_BL_p_plane1 = -999; - double pidScore_BL_p_plane2 = -999; - double pidScore_BL_mip_plane0 = -999; - double pidScore_BL_mip_plane1 = -999; - double pidScore_BL_mip_plane2 = -999; - double pidScore_PIDA_plane0 = -999; - double pidScore_PIDA_plane1 = -999; - double pidScore_PIDA_plane2 = -999; - double pidScore_chi2_mu_plane0 = -999; - double pidScore_chi2_mu_plane1 = -999; - double pidScore_chi2_mu_plane2 = -999; - double pidScore_chi2_p_plane0 = -999; - double pidScore_chi2_p_plane1 = -999; - double pidScore_chi2_p_plane2 = -999; - double pidScore_three_plane_proton = -999; - - //int planeid = 2; - for (size_t i_algscore=0; i_algscore trunc_dEdx_p0; + std::vector res_range_good_p0; + std::vector dEdx_good_p0; + + std::vector trunc_dEdx_p1; + std::vector res_range_good_p1; + std::vector dEdx_good_p1; + + std::vector trunc_dEdx_p2; + std::vector res_range_good_p2; + std::vector dEdx_good_p2; + + m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + + m_reco_track_best_calo_plane[i_trk]=-1; + + // guanqun: vectors have been clear and resized, so probably not need to reset their values? + m_reco_track_good_calo_p0[i_trk] = 0; + m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + m_reco_track_good_calo_p1[i_trk] = 0; + m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + m_reco_track_good_calo_p2[i_trk] = 0; + m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + + + + //First off look over ALL points + //--------------------------------- plane 0 ----------- Induction + for (size_t k = 0; k < calo_length_p0; ++k) { + double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track + double dEdx = calo_p0->dEdx()[k]; + + m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + if(k <= calo_length_p0/2){ + m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; // != has higher precedence than = + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ + res_range_good_p0.push_back(res_range); + dEdx_good_p0.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p0.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p0.setRadius(rad); + tm_p0.CalcTruncMeanProfile(res_range_good_p0,dEdx_good_p0, trunc_dEdx_p0); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ + double dEdx = trunc_dEdx_p0[k]; + m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + if(k <= trunc_dEdx_p0.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p0[k] != trunc_dEdx_p0[k] || std::isinf(trunc_dEdx_p0[k]) || trunc_dEdx_p0[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p1->dEdx()[k]; + + m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + if(k <= calo_length_p1/2){ + m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ + res_range_good_p1.push_back(res_range); + dEdx_good_p1.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p1.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p1.setRadius(rad); + tm_p1.CalcTruncMeanProfile(res_range_good_p1,dEdx_good_p1, trunc_dEdx_p1); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ + double dEdx = trunc_dEdx_p1[k]; + m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + if(k <= trunc_dEdx_p1.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p1[k] != trunc_dEdx_p1[k] || std::isinf(trunc_dEdx_p1[k]) || trunc_dEdx_p1[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "<ResidualRange()[k]; + double dEdx = calo_p2->dEdx()[k]; + + m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + if(k <= calo_length_p2/2){ + m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + } + + bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_nan =dEdx != dEdx; + bool is_inf = std::isinf(dEdx); + bool is_nonzero = dEdx> m_track_calo_min_dEdx; + + if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ + res_range_good_p2.push_back(res_range); + dEdx_good_p2.push_back(dEdx); + } + + // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ + m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + double min_dx = 999; + for(int j = res_range_good_p2.size()-1; j>1; j--){ + double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); + if(dx < min_dx) min_dx = dx; + } + double rad = std::max( min_dx*2, tenth_track); + + //Calculate the residual range + tm_p2.setRadius(rad); + tm_p2.CalcTruncMeanProfile(res_range_good_p2,dEdx_good_p2, trunc_dEdx_p2); + + double pida_sum_trunc=0.0; + //Calculate the mean truncated mean dEdx + for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ + double dEdx = trunc_dEdx_p2[k]; + m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + if(k <= trunc_dEdx_p2.size()/2){ + m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + }else{ + m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + } + + + if(trunc_dEdx_p2[k] != trunc_dEdx_p2[k] || std::isinf(trunc_dEdx_p2[k]) || trunc_dEdx_p2[k]<0){ + std::cout<<"Truncated dedx is either inf or nan (or negative) @ "< m_reco_track_good_calo_p1[i_trk] ){ + m_reco_track_best_calo_plane[i_trk] = 0; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; + + + }else if(m_reco_track_good_calo_p1[i_trk]!=0){ + m_reco_track_best_calo_plane[i_trk] = 1; + + m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; + m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; + m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; + m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; + m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; + m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + + + + }else{ + m_reco_track_best_calo_plane[i_trk] = -1; + } + + + } + } + + + + void SinglePhoton::CollectPID(std::vector> & tracks, + std::vector all_PPFPs){ + + for(size_t i_trk=0; i_trk track = tracks[i_trk]; + + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + art::Ptr pid = ppfp->get_ParticleID();//trackToPIDMap[track]; + if (!ppfp->get_HasPID()) { + std::cout << "[analyze_Tracks] bad PID object" << std::endl; + continue; + } + + // For each PID object, create vector of PID scores for each algorithm + // Loop over this and get scores for algorithm of choice + // But first, prepare garbage values, just in case + std::vector AlgScoresVec = pid->ParticleIDAlgScores(); + double pidScore_BL_mu_plane0 = -999; + double pidScore_BL_mu_plane1 = -999; + double pidScore_BL_mu_plane2 = -999; + double pidScore_BL_p_plane0 = -999; + double pidScore_BL_p_plane1 = -999; + double pidScore_BL_p_plane2 = -999; + double pidScore_BL_mip_plane0 = -999; + double pidScore_BL_mip_plane1 = -999; + double pidScore_BL_mip_plane2 = -999; + double pidScore_PIDA_plane0 = -999; + double pidScore_PIDA_plane1 = -999; + double pidScore_PIDA_plane2 = -999; + double pidScore_chi2_mu_plane0 = -999; + double pidScore_chi2_mu_plane1 = -999; + double pidScore_chi2_mu_plane2 = -999; + double pidScore_chi2_p_plane0 = -999; + double pidScore_chi2_p_plane1 = -999; + double pidScore_chi2_p_plane2 = -999; + double pidScore_three_plane_proton = -999; + + //int planeid = 2; + for (size_t i_algscore=0; i_algscore(); - for (auto const &cryo: geometry->IterateCryostats()) { - geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), - tend = geometry->end_TPC(cryo.ID()); + //copy these from CAFMaker/CAFMaker_module.c + const geo::GeometryCore *geometry = lar::providerFrom(); + for (auto const &cryo: geometry->IterateCryostats()) { + geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), + tend = geometry->end_TPC(cryo.ID()); - std::vector this_tpc_volumes; - while (iTPC != tend) { - geo::TPCGeo const& TPC = *iTPC; - this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); - iTPC++; - } - fTPCVolumes.push_back(std::move(this_tpc_volumes)); - } + std::vector this_tpc_volumes; + while (iTPC != tend) { + geo::TPCGeo const& TPC = *iTPC; + this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); + iTPC++; + } + fTPCVolumes.push_back(std::move(this_tpc_volumes)); + } - // then combine them into active volumes - for (const std::vector &tpcs: fTPCVolumes) { - m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); - m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); - m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + // then combine them into active volumes + for (const std::vector &tpcs: fTPCVolumes) { + m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); + m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); + m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); - m_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); - m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); - m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); - if(m_is_verbose){ - std::cout<<"SinglePhoton::"<<__FUNCTION__<<" || Active TPC info: X:("<MaxX(); + m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); + m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + if(m_is_verbose){ + std::cout<<"SinglePhoton::"<<__FUNCTION__<<" || Active TPC info: X:("< & vec){ - if( vec.size() != 3){ - throw cet::exception("SinglePhoton") << " The coordinate dimension is not 3!"; - } + if( vec.size() != 3){ + throw cet::exception("SinglePhoton") << " The coordinate dimension is not 3!"; + } bool is_x = (vec[0] > m_tpc_active_XMin && vec[0]< m_tpc_active_XMax ); bool is_y = (vec[1] > m_tpc_active_YMin && vec[1]< m_tpc_active_YMax ); bool is_z = (vec[2] > m_tpc_active_ZMin && vec[2]< m_tpc_active_ZMax ); - bool inside = is_x&&is_y&&is_z; + bool inside = is_x&&is_y&&is_z; return inside; } @@ -108,10 +108,10 @@ namespace single_photon // } int SinglePhoton::distToSCB(double & dist, std::vector &vec){ - //CHECK! - dist = distToTPCActive( vec ); - return isInTPCActive( vec); - //NOT USE SCB YET, bring it back later! + //CHECK! + dist = distToTPCActive( vec ); + return isInTPCActive( vec); + //NOT USE SCB YET, bring it back later! // // //this one returns the distance to the boundary // bool ans = false; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index ec425f2ed..665ef79ac 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -1,2159 +1,2159 @@ //how about intialize all branches in one place; namespace single_photon { - //Process of initialize branches: - //ClearBranches, ResizeBranches, CreateBranches - - void SinglePhoton::ClearMeta(){ - //------------ Event related Variables ------------- - m_event_number = -99; - m_subrun_number = -99; - m_run_number = -99; - m_test_matched_hits = 0; - - m_pot_per_event = 0; - m_pot_per_subrun = m_subrun_pot; - m_number_of_events_in_subrun = 0; - - m_genie_spline_weight = 1.0; - - //------------ Vertex related Variables ------------- - m_reco_vertex_size = 0; - m_vertex_pos_x=-99999; - m_vertex_pos_y=-99999; - m_vertex_pos_z=-99999; - m_vertex_pos_tick=-9999; - m_vertex_pos_wire_p0=-9999; - m_vertex_pos_wire_p1=-9999; - m_vertex_pos_wire_p2=-9999; - m_reco_vertex_in_SCB = -9999; - m_reco_vertex_dist_to_SCB = -9999; - m_reco_vertex_dist_to_active_TPC= -9999; - m_reco_vertex_dist_to_CPA= -9999; - - m_reco_vertex_to_nearest_dead_wire_plane0=-99999; - m_reco_vertex_to_nearest_dead_wire_plane1=-99999; - m_reco_vertex_to_nearest_dead_wire_plane2=-99999; - - m_reco_slice_objects = 0; - } - - - void SinglePhoton::CreateMetaBranches(){ - - //true_eventweight_tree - true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); - - //run_subrun_tree - run_subrun_tree->Branch("run",&m_run,"run/I"); - run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); - run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); - run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); - - //pot_tree - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); - - //vertex_tree -- part of it - // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); - - vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); - vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); - vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); - - - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); - - vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); - vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); - - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); - - // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); - vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); - vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); - vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); - vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); - vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); - vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); - } - - //isolation.h - void SinglePhoton::ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); - - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); - - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); - - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); - } - - void SinglePhoton::CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); - - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); - - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); - - - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); - - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); - - } - - //second_shower_search.h - void SinglePhoton::ClearSecondShowers(){ - m_sss_num_unassociated_hits=0; - m_sss_num_unassociated_hits_below_threshold=0; - m_sss_num_associated_hits=0; - - m_sss_num_candidates = 0; - - m_sss_candidate_in_nu_slice.clear(); - m_sss_candidate_num_hits.clear(); - m_sss_candidate_num_wires.clear(); - m_sss_candidate_num_ticks.clear(); - m_sss_candidate_plane.clear(); - m_sss_candidate_PCA.clear(); - m_sss_candidate_mean_ADC.clear(); - m_sss_candidate_ADC_RMS.clear(); - m_sss_candidate_impact_parameter.clear(); - m_sss_candidate_fit_slope.clear(); - m_sss_candidate_veto_score.clear(); - m_sss_candidate_fit_constant.clear(); - m_sss_candidate_mean_tick.clear(); - m_sss_candidate_max_tick.clear(); - m_sss_candidate_min_tick.clear(); - m_sss_candidate_min_wire.clear(); - m_sss_candidate_max_wire.clear(); - m_sss_candidate_mean_wire.clear(); - m_sss_candidate_min_dist.clear(); - m_sss_candidate_wire_tick_based_length.clear(); - m_sss_candidate_energy.clear(); - m_sss_candidate_angle_to_shower.clear(); - m_sss_candidate_closest_neighbour.clear(); - m_sss_candidate_matched.clear(); - m_sss_candidate_matched_energy_fraction_best_plane.clear(); - m_sss_candidate_pdg.clear(); - m_sss_candidate_parent_pdg.clear(); - m_sss_candidate_trackid.clear(); - m_sss_candidate_true_energy.clear(); - m_sss_candidate_overlay_fraction.clear(); - m_sss_candidate_remerge.clear(); - } - - void SinglePhoton::ClearSecondShowers3D(){ - - m_sss3d_num_showers = 0; - m_sss3d_shower_start_x.clear(); - m_sss3d_shower_start_y.clear(); - m_sss3d_shower_start_z.clear(); - m_sss3d_shower_dir_x.clear(); - m_sss3d_shower_dir_y.clear(); - m_sss3d_shower_dir_z.clear(); - m_sss3d_shower_length.clear(); - m_sss3d_shower_conversion_dist.clear(); - m_sss3d_shower_invariant_mass.clear(); - m_sss3d_shower_implied_invariant_mass.clear(); - m_sss3d_shower_impact_parameter.clear(); - m_sss3d_shower_energy_max.clear(); - m_sss3d_shower_score.clear(); - m_sss3d_slice_nu.clear(); - m_sss3d_slice_clear_cosmic.clear(); - m_sss3d_shower_ioc_ratio.clear(); - } - - void SinglePhoton::ClearStubs(){ - m_trackstub_num_unassociated_hits = 0; - m_trackstub_unassociated_hits_below_threshold = 0; - m_trackstub_associated_hits=0; - m_trackstub_num_candidates=0; - m_trackstub_candidate_in_nu_slice.clear(); - m_trackstub_candidate_num_hits.clear(); - m_trackstub_candidate_num_wires.clear(); - m_trackstub_candidate_num_ticks.clear(); - m_trackstub_candidate_plane.clear(); - m_trackstub_candidate_PCA.clear(); - m_trackstub_candidate_mean_ADC.clear(); - m_trackstub_candidate_ADC_RMS.clear(); - m_trackstub_candidate_veto_score.clear(); - m_trackstub_candidate_mean_tick.clear(); - m_trackstub_candidate_max_tick.clear(); - m_trackstub_candidate_min_tick.clear(); - m_trackstub_candidate_min_wire.clear(); - m_trackstub_candidate_max_wire.clear(); - m_trackstub_candidate_mean_wire.clear(); - m_trackstub_candidate_min_dist.clear(); - m_trackstub_candidate_min_impact_parameter_to_shower.clear(); - m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); - m_trackstub_candidate_min_ioc_to_shower_start.clear(); - m_trackstub_candidate_ioc_based_length.clear(); - m_trackstub_candidate_wire_tick_based_length.clear(); - m_trackstub_candidate_mean_ADC_first_half.clear(); - m_trackstub_candidate_mean_ADC_second_half.clear(); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); - m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); - m_trackstub_candidate_linear_fit_chi2.clear(); - m_trackstub_candidate_energy.clear(); - m_trackstub_candidate_remerge.clear(); - m_trackstub_candidate_matched.clear(); - m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); - m_trackstub_candidate_pdg.clear(); - m_trackstub_candidate_parent_pdg.clear(); - m_trackstub_candidate_trackid.clear(); - m_trackstub_candidate_true_energy.clear(); - m_trackstub_candidate_overlay_fraction.clear(); - - m_trackstub_num_candidate_groups = 0; - m_grouped_trackstub_candidate_indices.clear(); - m_trackstub_candidate_group_timeoverlap_fraction.clear(); - } - - void SinglePhoton::CreateSecondShowerBranches(){ - vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); - vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); - - - vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); - vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); - vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); - vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); - vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); - vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); - vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); - vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); - - vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); - vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); - vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); - vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); - vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); - vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); - vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); - vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); - - - vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); - vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); - vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); - vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); - vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); - vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); - - vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); - vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); - vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); - vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); - vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); - vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); - - vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); - vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); - vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); - vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); - vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); - vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); - - } - - void SinglePhoton::CreateSecondShowerBranches3D(){ - vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); - - vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); - vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); - vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); - vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); - vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); - vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); - - vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); - vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); - vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); - vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); - vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); - vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); - vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); - vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); - //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); - //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); - } - - void SinglePhoton::CreateStubBranches(){ - - vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); - vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); - vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); - vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); - vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); - vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); - vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); - vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); - vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); - vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); - vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); - vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); - vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); - vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); - vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); - vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); - vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); - vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); - vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); - vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); - vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); - vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); - vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); - vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); - vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); - vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); - vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); - vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); - vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); - vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); - vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); - vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); - vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); - vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); - vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); - - - vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); - vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); - vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); - - } - - void SinglePhoton::ResizeSecondShowers(size_t size){} - - //analyze_OpFlashes.h - void SinglePhoton::ClearFlashes(){ - m_reco_num_flashes =0; - m_reco_num_flashes_in_beamgate =0; - m_reco_flash_total_pe.clear(); - m_reco_flash_time.clear(); - m_reco_flash_time_width.clear(); - m_reco_flash_abs_time.clear(); - m_reco_flash_frame.clear(); - m_reco_flash_ycenter.clear(); - m_reco_flash_ywidth.clear(); - m_reco_flash_zcenter.clear(); - m_reco_flash_zwidth.clear(); - m_reco_flash_total_pe_in_beamgate.clear(); - m_reco_flash_time_in_beamgate.clear(); - m_reco_flash_ycenter_in_beamgate.clear(); - m_reco_flash_zcenter_in_beamgate.clear(); - m_CRT_veto_nhits = -999; - m_CRT_veto_hit_PE.clear(); - m_CRT_min_hit_time = -999; - m_CRT_min_hit_PE = -999; - m_CRT_min_hit_x = -999; - m_CRT_min_hit_y = -999; - m_CRT_min_hit_z = -999; - m_CRT_hits_time.clear(); - m_CRT_hits_PE.clear(); - m_CRT_hits_x.clear(); - m_CRT_hits_y.clear(); - m_CRT_hits_z.clear(); - m_CRT_dt = -999; - - } - - void SinglePhoton::CreateFlashBranches(){ - vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); - vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); - } - - void SinglePhoton::ResizeFlashes(size_t size){ - m_reco_flash_total_pe.resize(size); - m_reco_flash_time.resize(size); - m_reco_flash_time_width.resize(size); - m_reco_flash_abs_time.resize(size); - m_reco_flash_frame.resize(size); - m_reco_flash_ycenter.resize(size); - m_reco_flash_ywidth.resize(size); - m_reco_flash_zcenter.resize(size); - m_reco_flash_zwidth.resize(size); - m_reco_flash_total_pe_in_beamgate.resize(size); - m_reco_flash_time_in_beamgate.resize(size); - m_reco_flash_ycenter_in_beamgate.resize(size); - m_reco_flash_zcenter_in_beamgate.resize(size); - m_CRT_veto_hit_PE.resize(size); - - m_CRT_hits_time.resize(size); - m_CRT_hits_PE.resize(size); - m_CRT_hits_x.resize(size); - m_CRT_hits_y.resize(size); - m_CRT_hits_z.resize(size); - } - - //analyze_Tracks.h - void SinglePhoton::ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_length.clear(); - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - m_reco_track_end_dist_to_active_TPC.clear(); - m_reco_track_start_dist_to_active_TPC.clear(); - m_reco_track_end_dist_to_CPA.clear(); - m_reco_track_start_dist_to_CPA.clear(); - m_reco_track_end_dist_to_SCB.clear(); - m_reco_track_start_dist_to_SCB.clear(); - m_reco_track_end_in_SCB.clear(); - m_reco_track_start_in_SCB.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_calo_energy_plane0.clear(); - m_reco_track_calo_energy_plane1.clear(); - m_reco_track_calo_energy_plane2.clear(); - m_reco_track_calo_energy_max.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_endx.clear(); - m_sim_track_endy.clear(); - m_sim_track_endz.clear(); - m_sim_track_length.clear(); - - m_sim_track_px.clear(); - m_sim_track_py.clear(); - m_sim_track_pz.clear(); - m_sim_track_trackID.clear(); - - // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - - m_reco_track_end_to_nearest_dead_wire_plane0.clear(); - m_reco_track_end_to_nearest_dead_wire_plane1.clear(); - m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_pfparticle_pdg.clear(); - m_reco_track_is_nuslice.clear(); - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); - } - - void SinglePhoton::CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); - vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); - vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); - vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); - vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); - vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); - vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); - vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); - - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); - vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); - vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); - vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - vertex_tree->Branch("sim_track_px",&m_sim_track_px); - vertex_tree->Branch("sim_track_py",&m_sim_track_py); - vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); - vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); - vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); - vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); - vertex_tree->Branch("sim_track_length",&m_sim_track_length); - - vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); - } - - void SinglePhoton::ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - m_reco_track_end_dist_to_active_TPC.resize(size); - m_reco_track_start_dist_to_active_TPC.resize(size); - m_reco_track_end_dist_to_CPA.resize(size); - m_reco_track_start_dist_to_CPA.resize(size); - m_reco_track_end_dist_to_SCB.resize(size); - m_reco_track_start_dist_to_SCB.resize(size); - m_reco_track_end_in_SCB.resize(size); - m_reco_track_start_in_SCB.resize(size); - - m_reco_track_calo_energy_plane0.resize(size); - m_reco_track_calo_energy_plane1.resize(size); - m_reco_track_calo_energy_plane2.resize(size); - m_reco_track_calo_energy_max.resize(size); - - - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_endx.resize(size); - m_sim_track_endy.resize(size); - m_sim_track_endz.resize(size); - m_sim_track_length.resize(size); - - m_sim_track_px.resize(size); - m_sim_track_py.resize(size); - m_sim_track_pz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - - m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_pfparticle_pdg.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); - } - - //analyze_Shower.h - void SinglePhoton::ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_start_dist_to_active_TPC.clear(); - m_reco_shower_start_dist_to_CPA.clear(); - m_reco_shower_start_dist_to_SCB.clear(); - m_reco_shower_start_in_SCB.clear(); - m_reco_shower_end_dist_to_active_TPC.clear(); - m_reco_shower_end_dist_to_SCB.clear(); - - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - - m_reco_shower_reclustered_energy_plane0.clear(); - m_reco_shower_reclustered_energy_plane1.clear(); - m_reco_shower_reclustered_energy_plane2.clear(); - m_reco_shower_reclustered_energy_max.clear(); - - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - m_reco_shower_plane0_meanRMS.clear(); - m_reco_shower_plane1_meanRMS.clear(); - m_reco_shower_plane2_meanRMS.clear(); - - m_reco_shower_hit_tick.clear(); - m_reco_shower_hit_wire.clear(); - m_reco_shower_hit_plane.clear(); - m_reco_shower_spacepoint_x.clear(); - m_reco_shower_spacepoint_y.clear(); - m_reco_shower_spacepoint_z.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - - m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - m_reco_shower_pfparticle_pdg.clear(); - - } - - void SinglePhoton::CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); - vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); - vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); - vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); - - - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); - //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); - vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); - vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); - - vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); - vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); - vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); - vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); - - vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); - vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); - vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); - - vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); - vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); - vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); - } - - void SinglePhoton::ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower_reclustered_energy_plane0.resize(size); - m_reco_shower_reclustered_energy_plane1.resize(size); - m_reco_shower_reclustered_energy_plane2.resize(size); - m_reco_shower_reclustered_energy_max.resize(size); - - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - m_reco_shower_start_dist_to_active_TPC.resize(size); - m_reco_shower_start_dist_to_CPA.resize(size); - m_reco_shower_start_dist_to_SCB.resize(size); - m_reco_shower_start_in_SCB.resize(size); - - m_reco_shower_end_dist_to_active_TPC.resize(size); - m_reco_shower_end_dist_to_SCB.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - m_reco_shower_plane0_meanRMS.resize(size); - m_reco_shower_plane1_meanRMS.resize(size); - m_reco_shower_plane2_meanRMS.resize(size); - - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - - m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - m_reco_shower_pfparticle_pdg.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); - } - - //analyze_MCTruth.h - void SinglePhoton::ClearMCTruths(){ - m_mctruth_num = 0; - m_mctruth_origin = -99; - m_mctruth_mode = -99; - m_mctruth_interaction_type = -99; - m_mctruth_nu_vertex_x = -9999; - m_mctruth_nu_vertex_y = -9999; - m_mctruth_nu_vertex_z = -9999; - m_mctruth_reco_vertex_dist = -9999; - m_mctruth_ccnc = -99; - m_mctruth_qsqr = -99; - m_mctruth_nu_E = -99; - m_mctruth_nu_pdg = 0; - m_mctruth_lepton_pdg = 0; - m_mctruth_num_daughter_particles = -99; - m_mctruth_daughters_pdg.clear(); - m_mctruth_daughters_E.clear(); - - m_mctruth_daughters_status_code.clear(); - m_mctruth_daughters_trackID.clear(); - m_mctruth_daughters_mother_trackID.clear(); - m_mctruth_daughters_px.clear(); - m_mctruth_daughters_py.clear(); - m_mctruth_daughters_pz.clear(); - m_mctruth_daughters_startx.clear(); - m_mctruth_daughters_starty.clear(); - m_mctruth_daughters_startz.clear(); - m_mctruth_daughters_time.clear(); - m_mctruth_daughters_endx.clear(); - m_mctruth_daughters_endy.clear(); - m_mctruth_daughters_endz.clear(); - m_mctruth_daughters_endtime.clear(); - m_mctruth_daughters_process.clear(); - m_mctruth_daughters_end_process.clear(); - - - m_mctruth_is_delta_radiative = 0; - m_mctruth_delta_radiative_1g1p_or_1g1n = -999; - - m_mctruth_delta_photon_energy=-999; - m_mctruth_delta_proton_energy=-999; - m_mctruth_delta_neutron_energy=-999; - - m_mctruth_num_exiting_photons =0; - m_mctruth_num_exiting_protons =0; - m_mctruth_num_exiting_pi0 =0; - m_mctruth_num_exiting_pipm =0; - m_mctruth_num_exiting_neutrons=0; - m_mctruth_num_exiting_delta0=0; - m_mctruth_num_exiting_deltapm=0; - m_mctruth_num_exiting_deltapp=0; - - m_mctruth_num_reconstructable_protons = 0; - - m_mctruth_is_reconstructable_1g1p = 0; - m_mctruth_is_reconstructable_1g0p = 0; - - m_mctruth_leading_exiting_proton_energy = -9999; - - m_mctruth_exiting_pi0_E.clear(); - m_mctruth_exiting_pi0_mom.clear(); - m_mctruth_exiting_pi0_px.clear(); - m_mctruth_exiting_pi0_py.clear(); - m_mctruth_exiting_pi0_pz.clear(); - - m_mctruth_pi0_leading_photon_energy = -9999; - m_mctruth_pi0_subleading_photon_energy = -9999; - m_mctruth_pi0_leading_photon_end_process = "none"; - m_mctruth_pi0_subleading_photon_end_process = "none"; - m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_exiting_TPC = -999; - m_mctruth_pi0_subleading_photon_exiting_TPC = -999; - m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; - - m_mctruth_exiting_delta0_num_daughters.clear(); - - m_mctruth_exiting_photon_mother_trackID.clear(); - m_mctruth_exiting_photon_trackID.clear(); - m_mctruth_exiting_photon_from_delta_decay.clear(); - m_mctruth_exiting_photon_energy.clear(); - m_mctruth_exiting_photon_px.clear(); - m_mctruth_exiting_photon_py.clear(); - m_mctruth_exiting_photon_pz.clear(); - - m_mctruth_exiting_proton_mother_trackID.clear(); - m_mctruth_exiting_proton_trackID.clear(); - m_mctruth_exiting_proton_from_delta_decay.clear(); - m_mctruth_exiting_proton_energy.clear(); - m_mctruth_exiting_proton_px.clear(); - m_mctruth_exiting_proton_py.clear(); - m_mctruth_exiting_proton_pz.clear(); - - m_mctruth_exiting_neutron_mother_trackID.clear(); - m_mctruth_exiting_neutron_trackID.clear(); - m_mctruth_exiting_neutron_from_delta_decay.clear(); - m_mctruth_exiting_neutron_energy.clear(); - m_mctruth_exiting_neutron_px.clear(); - m_mctruth_exiting_neutron_py.clear(); - m_mctruth_exiting_neutron_pz.clear(); - } - - void SinglePhoton::CreateMCTruthBranches(){ - vertex_tree->Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); - vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); - vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); - vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); - vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); - vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); - vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); - vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); - vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); - vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); - vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); - vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); - vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); - vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); - vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); - vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); - - - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); - vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); - vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); - vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); - vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); - - vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); - vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); - vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); - vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); - - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); - vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); - vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); - vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); - vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); - vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); - - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); - } - - void SinglePhoton::ResizeMCTruths(size_t size){ - m_mctruth_daughters_pdg.resize(size); - m_mctruth_daughters_E.resize(size); - m_mctruth_daughters_status_code.resize(size); - m_mctruth_daughters_trackID.resize(size); - m_mctruth_daughters_mother_trackID.resize(size); - m_mctruth_daughters_px.resize(size); - m_mctruth_daughters_py.resize(size); - m_mctruth_daughters_pz.resize(size); - m_mctruth_daughters_startx.resize(size); - m_mctruth_daughters_starty.resize(size); - m_mctruth_daughters_startz.resize(size); - m_mctruth_daughters_time.resize(size); - m_mctruth_daughters_endx.resize(size); - m_mctruth_daughters_endy.resize(size); - m_mctruth_daughters_endz.resize(size); - m_mctruth_daughters_endtime.resize(size); - m_mctruth_daughters_end_process.resize(size); - m_mctruth_daughters_process.resize(size); - } - - //analyze_EventWeight.h - void SinglePhoton::ClearEventWeightBranches(){ - m_mcflux_nu_pos_x=-9999; - m_mcflux_nu_pos_y=-9999; - m_mcflux_nu_pos_z=-9999; - m_mcflux_nu_mom_x=-9999; - m_mcflux_nu_mom_y=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_E=-9999; - m_mcflux_ntype=0; - m_mcflux_ptype=0; - m_mcflux_nimpwt=-9999; - m_mcflux_dk2gen=-9999; - m_mcflux_nenergyn=-9999; - m_mcflux_tpx=-9999; - m_mcflux_tpy=-9999; - m_mcflux_tpz=-9999; - m_mcflux_vx=-9999; - m_mcflux_vy=-9999; - m_mcflux_vz=-9999; - m_mcflux_tptype=0; - m_mctruth_nparticles=0; - /* - // m_mctruth_particles_track_ID[]; - // m_mctruth_particles_pdg_code[]; - // m_mctruth_particles_mother[]; - // m_mctruth_particles_status_code[]; - // m_mctruth_particles_num_daughters[]; //other similar variables - // m_mctruth_particles_daughters[]; - //m_mctruth_particles_Gvx.clear(); - //m_mctruth_particles_Gvy.clear(); - m_mctruth_particles_Gvz.clear(); - m_mctruth_particles_Gvt.clear(); - m_mctruth_particles_px0.clear(); - m_mctruth_particles_py0.clear(); - m_mctruth_particles_pz0.clear(); - m_mctruth_particles_e0.clear(); - //int m_mctruth_particles_rescatter.clear(); - m_mctruth_particles_polx.clear(); - m_mctruth_particles_poly.clear(); - m_mctruth_particles_polz.clear(); - - //int m_mctruth_neutrino_CCNC; - //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars - //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" - int m_mctruth_neutrino_target.clear(); - int m_mctruth_neutrino_nucleon.clear(); - int m_mctruth_neutrino_quark.clear(); - m_mctruth_neutrino_w.clear(); - m_mctruth_neutrino_x.clear(); - m_mctruth_neutrino_y.clear(); - */ - //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" - m_gtruth_is_sea_quark=false; - m_gtruth_tgt_pdg=0; - m_gtruth_tgt_Z = -9999; - m_gtruth_tgt_A = -9999; - m_gtruth_tgt_p4_x = -9999; - m_gtruth_tgt_p4_y = -9999; - m_gtruth_tgt_p4_z = -9999; - m_gtruth_tgt_p4_E = -9999; - m_gtruth_weight=-9999; - m_gtruth_probability=-9999; - m_gtruth_xsec=-9999; - m_gtruth_diff_xsec=-9999; - m_gtruth_gphase_space=-9999; - m_gtruth_vertex_x=-9999; - m_gtruth_vertex_y=-9999; - m_gtruth_vertex_z=-9999; - m_gtruth_vertex_T=-9999; - m_gtruth_gscatter=-9999; - m_gtruth_gint=-9999; - m_gtruth_res_num=-9999; - m_gtruth_num_piplus=-9999; - m_gtruth_num_pi0=-9999; - m_gtruth_num_piminus=-9999; - m_gtruth_num_proton=-9999; - m_gtruth_num_neutron=-9999; - m_gtruth_is_charm=false; - m_gtruth_is_strange=false; - m_gtruth_charm_hadron_pdg = -9999; - m_gtruth_strange_hadron_pdg = -9999; - m_gtruth_decay_mode = -9999; - m_gtruth_gx=-9999; - m_gtruth_gy=-9999; - m_gtruth_gy=-9999; - m_gtruth_gt=-9999; - m_gtruth_gw=-9999; - m_gtruth_gQ2=-9999; - m_gtruth_gq2=-9999; - m_gtruth_probe_pdg=0; - m_gtruth_probe_p4_x=-9999; - m_gtruth_probe_p4_y=-9999; - m_gtruth_probe_p4_z=-9999; - m_gtruth_probe_p4_E=-9999; - m_gtruth_hit_nuc_p4_x=-9999; - m_gtruth_hit_nuc_p4_y=-9999; - m_gtruth_hit_nuc_p4_z=-9999; - m_gtruth_hit_nuc_p4_E=-9999; - m_gtruth_hit_nuc_pos=-9999; - m_gtruth_fs_had_syst_p4_x=-9999; - m_gtruth_fs_had_syst_p4_y=-9999; - m_gtruth_fs_had_syst_p4_z=-9999; - m_gtruth_fs_had_syst_p4_E=-9999; - } - - void SinglePhoton::CreateEventWeightBranches(){ - //-----------------run info - eventweight_tree->Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); - //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); - //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); - - //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); - eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); - eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); - eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); - eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); - eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); - eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); - eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); - eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); - } - - //analyze_Geant4.h - void SinglePhoton::ClearGeant4Branches(){ - - m_geant4_pdg.clear(); - m_geant4_trackid.clear(); - m_geant4_mother.clear(); - m_geant4_statuscode.clear(); - m_geant4_E.clear(); - m_geant4_mass.clear(); - m_geant4_px.clear(); - m_geant4_py.clear(); - m_geant4_pz.clear(); - m_geant4_dx.clear(); - m_geant4_dy.clear(); - m_geant4_dz.clear(); - - m_geant4_vx.clear(); - m_geant4_vy.clear(); - m_geant4_vz.clear(); - m_geant4_process.clear(); - m_geant4_end_process.clear(); - - m_geant4_costheta.clear(); - } - - void SinglePhoton::CreateGeant4Branches(){ - geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_geant4_px); - geant4_tree->Branch("geant4_py", &m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_geant4_process); - } - - //analyze_Slice.h - void SinglePhoton::ClearSlices(){ - m_reco_slice_num = 0; - m_reco_slice_nuscore.clear(); - m_matched_signal_shower_overlay_fraction.clear(); - //std::vector m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; - - - //int m_matched_signal_total_num_slices; - - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); - */ - } - - - void SinglePhoton::CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); - - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); - } - - void SinglePhoton::ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size,-999); - m_reco_slice_num_pfps.resize(size,0); - m_reco_slice_num_showers.resize(size,0); - m_reco_slice_num_tracks.resize(size,0); - } + //Process of initialize branches: + //ClearBranches, ResizeBranches, CreateBranches + + void SinglePhoton::ClearMeta(){ + //------------ Event related Variables ------------- + m_event_number = -99; + m_subrun_number = -99; + m_run_number = -99; + m_test_matched_hits = 0; + + m_pot_per_event = 0; + m_pot_per_subrun = m_subrun_pot; + m_number_of_events_in_subrun = 0; + + m_genie_spline_weight = 1.0; + + //------------ Vertex related Variables ------------- + m_reco_vertex_size = 0; + m_vertex_pos_x=-99999; + m_vertex_pos_y=-99999; + m_vertex_pos_z=-99999; + m_vertex_pos_tick=-9999; + m_vertex_pos_wire_p0=-9999; + m_vertex_pos_wire_p1=-9999; + m_vertex_pos_wire_p2=-9999; + m_reco_vertex_in_SCB = -9999; + m_reco_vertex_dist_to_SCB = -9999; + m_reco_vertex_dist_to_active_TPC= -9999; + m_reco_vertex_dist_to_CPA= -9999; + + m_reco_vertex_to_nearest_dead_wire_plane0=-99999; + m_reco_vertex_to_nearest_dead_wire_plane1=-99999; + m_reco_vertex_to_nearest_dead_wire_plane2=-99999; + + m_reco_slice_objects = 0; + } + + + void SinglePhoton::CreateMetaBranches(){ + + //true_eventweight_tree + true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); + + //run_subrun_tree + run_subrun_tree->Branch("run",&m_run,"run/I"); + run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); + run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); + run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + + //pot_tree + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + //vertex_tree -- part of it + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); + vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); + vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + + vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); + vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); + vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); + vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); + vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); + vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); + vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + } + + //isolation.h + void SinglePhoton::ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); + } + + void SinglePhoton::CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + + } + + //second_shower_search.h + void SinglePhoton::ClearSecondShowers(){ + m_sss_num_unassociated_hits=0; + m_sss_num_unassociated_hits_below_threshold=0; + m_sss_num_associated_hits=0; + + m_sss_num_candidates = 0; + + m_sss_candidate_in_nu_slice.clear(); + m_sss_candidate_num_hits.clear(); + m_sss_candidate_num_wires.clear(); + m_sss_candidate_num_ticks.clear(); + m_sss_candidate_plane.clear(); + m_sss_candidate_PCA.clear(); + m_sss_candidate_mean_ADC.clear(); + m_sss_candidate_ADC_RMS.clear(); + m_sss_candidate_impact_parameter.clear(); + m_sss_candidate_fit_slope.clear(); + m_sss_candidate_veto_score.clear(); + m_sss_candidate_fit_constant.clear(); + m_sss_candidate_mean_tick.clear(); + m_sss_candidate_max_tick.clear(); + m_sss_candidate_min_tick.clear(); + m_sss_candidate_min_wire.clear(); + m_sss_candidate_max_wire.clear(); + m_sss_candidate_mean_wire.clear(); + m_sss_candidate_min_dist.clear(); + m_sss_candidate_wire_tick_based_length.clear(); + m_sss_candidate_energy.clear(); + m_sss_candidate_angle_to_shower.clear(); + m_sss_candidate_closest_neighbour.clear(); + m_sss_candidate_matched.clear(); + m_sss_candidate_matched_energy_fraction_best_plane.clear(); + m_sss_candidate_pdg.clear(); + m_sss_candidate_parent_pdg.clear(); + m_sss_candidate_trackid.clear(); + m_sss_candidate_true_energy.clear(); + m_sss_candidate_overlay_fraction.clear(); + m_sss_candidate_remerge.clear(); + } + + void SinglePhoton::ClearSecondShowers3D(){ + + m_sss3d_num_showers = 0; + m_sss3d_shower_start_x.clear(); + m_sss3d_shower_start_y.clear(); + m_sss3d_shower_start_z.clear(); + m_sss3d_shower_dir_x.clear(); + m_sss3d_shower_dir_y.clear(); + m_sss3d_shower_dir_z.clear(); + m_sss3d_shower_length.clear(); + m_sss3d_shower_conversion_dist.clear(); + m_sss3d_shower_invariant_mass.clear(); + m_sss3d_shower_implied_invariant_mass.clear(); + m_sss3d_shower_impact_parameter.clear(); + m_sss3d_shower_energy_max.clear(); + m_sss3d_shower_score.clear(); + m_sss3d_slice_nu.clear(); + m_sss3d_slice_clear_cosmic.clear(); + m_sss3d_shower_ioc_ratio.clear(); + } + + void SinglePhoton::ClearStubs(){ + m_trackstub_num_unassociated_hits = 0; + m_trackstub_unassociated_hits_below_threshold = 0; + m_trackstub_associated_hits=0; + m_trackstub_num_candidates=0; + m_trackstub_candidate_in_nu_slice.clear(); + m_trackstub_candidate_num_hits.clear(); + m_trackstub_candidate_num_wires.clear(); + m_trackstub_candidate_num_ticks.clear(); + m_trackstub_candidate_plane.clear(); + m_trackstub_candidate_PCA.clear(); + m_trackstub_candidate_mean_ADC.clear(); + m_trackstub_candidate_ADC_RMS.clear(); + m_trackstub_candidate_veto_score.clear(); + m_trackstub_candidate_mean_tick.clear(); + m_trackstub_candidate_max_tick.clear(); + m_trackstub_candidate_min_tick.clear(); + m_trackstub_candidate_min_wire.clear(); + m_trackstub_candidate_max_wire.clear(); + m_trackstub_candidate_mean_wire.clear(); + m_trackstub_candidate_min_dist.clear(); + m_trackstub_candidate_min_impact_parameter_to_shower.clear(); + m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); + m_trackstub_candidate_min_ioc_to_shower_start.clear(); + m_trackstub_candidate_ioc_based_length.clear(); + m_trackstub_candidate_wire_tick_based_length.clear(); + m_trackstub_candidate_mean_ADC_first_half.clear(); + m_trackstub_candidate_mean_ADC_second_half.clear(); + m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); + m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); + m_trackstub_candidate_linear_fit_chi2.clear(); + m_trackstub_candidate_energy.clear(); + m_trackstub_candidate_remerge.clear(); + m_trackstub_candidate_matched.clear(); + m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); + m_trackstub_candidate_pdg.clear(); + m_trackstub_candidate_parent_pdg.clear(); + m_trackstub_candidate_trackid.clear(); + m_trackstub_candidate_true_energy.clear(); + m_trackstub_candidate_overlay_fraction.clear(); + + m_trackstub_num_candidate_groups = 0; + m_grouped_trackstub_candidate_indices.clear(); + m_trackstub_candidate_group_timeoverlap_fraction.clear(); + } + + void SinglePhoton::CreateSecondShowerBranches(){ + vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); + vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); + + + vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); + vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); + vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); + vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); + vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); + vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); + vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); + vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); + + vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); + vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); + vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); + vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); + vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); + vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); + vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); + vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); + + + vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); + vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); + vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); + vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); + vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); + vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); + + vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); + vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); + vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); + vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); + vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); + vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); + + vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); + vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); + vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); + vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); + vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); + vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + + } + + void SinglePhoton::CreateSecondShowerBranches3D(){ + vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); + + vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); + vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); + vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); + vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); + vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); + vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); + + vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); + vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); + vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); + vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); + vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); + vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); + vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); + vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); + //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); + //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + } + + void SinglePhoton::CreateStubBranches(){ + + vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); + vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); + vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); + vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); + vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); + vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); + vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); + vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); + vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); + vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); + vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); + vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); + vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); + vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); + vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); + vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); + vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); + vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); + vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); + vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); + vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); + vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); + vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); + vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); + vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); + vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); + vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); + vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); + vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); + vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); + vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); + + + vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); + vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + + } + + void SinglePhoton::ResizeSecondShowers(size_t size){} + + //analyze_OpFlashes.h + void SinglePhoton::ClearFlashes(){ + m_reco_num_flashes =0; + m_reco_num_flashes_in_beamgate =0; + m_reco_flash_total_pe.clear(); + m_reco_flash_time.clear(); + m_reco_flash_time_width.clear(); + m_reco_flash_abs_time.clear(); + m_reco_flash_frame.clear(); + m_reco_flash_ycenter.clear(); + m_reco_flash_ywidth.clear(); + m_reco_flash_zcenter.clear(); + m_reco_flash_zwidth.clear(); + m_reco_flash_total_pe_in_beamgate.clear(); + m_reco_flash_time_in_beamgate.clear(); + m_reco_flash_ycenter_in_beamgate.clear(); + m_reco_flash_zcenter_in_beamgate.clear(); + m_CRT_veto_nhits = -999; + m_CRT_veto_hit_PE.clear(); + m_CRT_min_hit_time = -999; + m_CRT_min_hit_PE = -999; + m_CRT_min_hit_x = -999; + m_CRT_min_hit_y = -999; + m_CRT_min_hit_z = -999; + m_CRT_hits_time.clear(); + m_CRT_hits_PE.clear(); + m_CRT_hits_x.clear(); + m_CRT_hits_y.clear(); + m_CRT_hits_z.clear(); + m_CRT_dt = -999; + + } + + void SinglePhoton::CreateFlashBranches(){ + vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + } + + void SinglePhoton::ResizeFlashes(size_t size){ + m_reco_flash_total_pe.resize(size); + m_reco_flash_time.resize(size); + m_reco_flash_time_width.resize(size); + m_reco_flash_abs_time.resize(size); + m_reco_flash_frame.resize(size); + m_reco_flash_ycenter.resize(size); + m_reco_flash_ywidth.resize(size); + m_reco_flash_zcenter.resize(size); + m_reco_flash_zwidth.resize(size); + m_reco_flash_total_pe_in_beamgate.resize(size); + m_reco_flash_time_in_beamgate.resize(size); + m_reco_flash_ycenter_in_beamgate.resize(size); + m_reco_flash_zcenter_in_beamgate.resize(size); + m_CRT_veto_hit_PE.resize(size); + + m_CRT_hits_time.resize(size); + m_CRT_hits_PE.resize(size); + m_CRT_hits_x.resize(size); + m_CRT_hits_y.resize(size); + m_CRT_hits_z.resize(size); + } + + //analyze_Tracks.h + void SinglePhoton::ClearTracks(){ + m_reco_asso_tracks=0; + m_reco_track_length.clear(); + m_reco_track_num_daughters.clear(); + m_reco_track_daughter_trackscore.clear(); + m_reco_track_dirx.clear(); + m_reco_track_diry.clear(); + m_reco_track_dirz.clear(); + m_reco_track_startx.clear(); + m_reco_track_starty.clear(); + m_reco_track_startz.clear(); + m_reco_track_endx.clear(); + m_reco_track_endy.clear(); + m_reco_track_endz.clear(); + m_reco_track_end_dist_to_active_TPC.clear(); + m_reco_track_start_dist_to_active_TPC.clear(); + m_reco_track_end_dist_to_CPA.clear(); + m_reco_track_start_dist_to_CPA.clear(); + m_reco_track_end_dist_to_SCB.clear(); + m_reco_track_start_dist_to_SCB.clear(); + m_reco_track_end_in_SCB.clear(); + m_reco_track_start_in_SCB.clear(); + + m_reco_track_theta_yz.clear(); + m_reco_track_phi_yx.clear(); + + m_reco_track_calo_energy_plane0.clear(); + m_reco_track_calo_energy_plane1.clear(); + m_reco_track_calo_energy_plane2.clear(); + m_reco_track_calo_energy_max.clear(); + + m_reco_track_num_trajpoints.clear(); + m_reco_track_num_spacepoints.clear(); + m_reco_track_proton_kinetic_energy.clear(); + m_reco_track_ordered_energy_index.clear(); + m_reco_track_ordered_displacement_index.clear(); + + m_reco_track_spacepoint_principal0.clear(); + m_reco_track_spacepoint_principal1.clear(); + m_reco_track_spacepoint_principal2.clear(); + + m_reco_track_spacepoint_chi.clear(); + m_reco_track_spacepoint_max_dist.clear(); + + m_reco_track_best_calo_plane.clear(); + + m_reco_track_mean_dEdx_best_plane.clear(); + m_reco_track_mean_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_dEdx_end_half_best_plane.clear(); + m_reco_track_good_calo_best_plane.clear(); + m_reco_track_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + m_reco_track_trunc_PIDA_best_plane.clear(); + m_reco_track_resrange_best_plane.clear(); + m_reco_track_dEdx_best_plane.clear(); + + + m_reco_track_mean_dEdx_p0.clear(); + m_reco_track_mean_dEdx_start_half_p0.clear(); + m_reco_track_mean_dEdx_end_half_p0.clear(); + m_reco_track_good_calo_p0.clear(); + m_reco_track_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + m_reco_track_trunc_PIDA_p0.clear(); + m_reco_track_resrange_p0.clear(); + m_reco_track_dEdx_p0.clear(); + + m_reco_track_mean_dEdx_p1.clear(); + m_reco_track_mean_dEdx_start_half_p1.clear(); + m_reco_track_mean_dEdx_end_half_p1.clear(); + m_reco_track_good_calo_p1.clear(); + m_reco_track_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + m_reco_track_trunc_PIDA_p1.clear(); + m_reco_track_resrange_p1.clear(); + m_reco_track_dEdx_p1.clear(); + + m_reco_track_mean_dEdx_p2.clear(); + m_reco_track_mean_dEdx_start_half_p2.clear(); + m_reco_track_mean_dEdx_end_half_p2.clear(); + m_reco_track_good_calo_p2.clear(); + m_reco_track_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + m_reco_track_trunc_PIDA_p2.clear(); + m_reco_track_resrange_p2.clear(); + m_reco_track_dEdx_p2.clear(); + + m_reco_track_num_calo_hits_p1.clear(); + m_reco_track_num_calo_hits_p0.clear(); + m_reco_track_num_calo_hits_p2.clear(); + + m_sim_track_matched.clear(); + m_sim_track_overlay_fraction.clear(); + m_sim_track_energy.clear(); + m_sim_track_kinetic_energy.clear(); + m_sim_track_mass.clear(); + m_sim_track_pdg.clear(); + m_sim_track_origin.clear(); + m_sim_track_parent_pdg.clear(); + m_sim_track_process.clear(); + m_sim_track_startx.clear(); + m_sim_track_starty.clear(); + m_sim_track_startz.clear(); + m_sim_track_endx.clear(); + m_sim_track_endy.clear(); + m_sim_track_endz.clear(); + m_sim_track_length.clear(); + + m_sim_track_px.clear(); + m_sim_track_py.clear(); + m_sim_track_pz.clear(); + m_sim_track_trackID.clear(); + + // PID + m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + m_reco_track_pid_chi2_mu_plane0.clear(); + m_reco_track_pid_chi2_mu_plane1.clear(); + m_reco_track_pid_chi2_mu_plane2.clear(); + m_reco_track_pid_chi2_p_plane0.clear(); + m_reco_track_pid_chi2_p_plane1.clear(); + m_reco_track_pid_chi2_p_plane2.clear(); + m_reco_track_pid_pida_plane0.clear(); + m_reco_track_pid_pida_plane1.clear(); + m_reco_track_pid_pida_plane2.clear(); + m_reco_track_pid_three_plane_proton_pid.clear(); + + m_reco_track_end_to_nearest_dead_wire_plane0.clear(); + m_reco_track_end_to_nearest_dead_wire_plane1.clear(); + m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + m_reco_track_sliceId.clear(); + m_reco_track_nuscore.clear(); + m_reco_track_isclearcosmic.clear(); + m_reco_track_trackscore.clear(); + m_reco_track_pfparticle_pdg.clear(); + m_reco_track_is_nuslice.clear(); + + m_sim_track_sliceId.clear(); + m_sim_track_nuscore.clear(); + m_sim_track_isclearcosmic.clear(); + } + + void SinglePhoton::CreateTrackBranches(){ + vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); + vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); + vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); + vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); + vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); + vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); + vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); + + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); + vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); + vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); + vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + vertex_tree->Branch("sim_track_px",&m_sim_track_px); + vertex_tree->Branch("sim_track_py",&m_sim_track_py); + vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); + vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); + vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); + vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); + vertex_tree->Branch("sim_track_length",&m_sim_track_length); + + vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + } + + void SinglePhoton::ResizeTracks(size_t size){ + m_reco_track_length.resize(size); + m_reco_track_dirx.resize(size); + m_reco_track_num_daughters.resize(size); + m_reco_track_daughter_trackscore.resize(size); + + m_reco_track_diry.resize(size); + m_reco_track_dirz.resize(size); + m_reco_track_endx.resize(size); + m_reco_track_endy.resize(size); + m_reco_track_endz.resize(size); + m_reco_track_end_dist_to_active_TPC.resize(size); + m_reco_track_start_dist_to_active_TPC.resize(size); + m_reco_track_end_dist_to_CPA.resize(size); + m_reco_track_start_dist_to_CPA.resize(size); + m_reco_track_end_dist_to_SCB.resize(size); + m_reco_track_start_dist_to_SCB.resize(size); + m_reco_track_end_in_SCB.resize(size); + m_reco_track_start_in_SCB.resize(size); + + m_reco_track_calo_energy_plane0.resize(size); + m_reco_track_calo_energy_plane1.resize(size); + m_reco_track_calo_energy_plane2.resize(size); + m_reco_track_calo_energy_max.resize(size); + + + + m_reco_track_startx.resize(size); + m_reco_track_starty.resize(size); + m_reco_track_startz.resize(size); + m_reco_track_num_trajpoints.resize(size); + m_reco_track_num_spacepoints.resize(size); + m_reco_track_proton_kinetic_energy.resize(size); + m_reco_track_ordered_energy_index.resize(size); + m_reco_track_ordered_displacement_index.resize(size); + + + m_reco_track_spacepoint_principal0.resize(size); + m_reco_track_spacepoint_principal1.resize(size); + m_reco_track_spacepoint_principal2.resize(size); + + m_reco_track_spacepoint_chi.resize(size); + m_reco_track_spacepoint_max_dist.resize(size); + + m_reco_track_theta_yz.resize(size); + m_reco_track_phi_yx.resize(size); + + m_reco_track_best_calo_plane.resize(size); + + m_reco_track_mean_dEdx_best_plane.resize(size); + m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + m_reco_track_good_calo_best_plane.resize(size); + m_reco_track_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + m_reco_track_trunc_PIDA_best_plane.resize(size); + m_reco_track_resrange_best_plane.resize(size); + m_reco_track_dEdx_best_plane.resize(size); + + + m_reco_track_mean_dEdx_p0.resize(size); + m_reco_track_mean_dEdx_start_half_p0.resize(size); + m_reco_track_mean_dEdx_end_half_p0.resize(size); + m_reco_track_good_calo_p0.resize(size); + m_reco_track_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + m_reco_track_trunc_PIDA_p0.resize(size); + m_reco_track_resrange_p0.resize(size); + m_reco_track_dEdx_p0.resize(size); + + m_reco_track_mean_dEdx_p1.resize(size); + m_reco_track_mean_dEdx_start_half_p1.resize(size); + m_reco_track_mean_dEdx_end_half_p1.resize(size); + m_reco_track_good_calo_p1.resize(size); + m_reco_track_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + m_reco_track_trunc_PIDA_p1.resize(size); + m_reco_track_resrange_p1.resize(size); + m_reco_track_dEdx_p1.resize(size); + + m_reco_track_mean_dEdx_p2.resize(size); + m_reco_track_mean_dEdx_start_half_p2.resize(size); + m_reco_track_mean_dEdx_end_half_p2.resize(size); + m_reco_track_good_calo_p2.resize(size); + m_reco_track_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + m_reco_track_trunc_PIDA_p2.resize(size); + m_reco_track_resrange_p2.resize(size); + m_reco_track_dEdx_p2.resize(size); + + m_reco_track_num_calo_hits_p1.resize(size); + m_reco_track_num_calo_hits_p0.resize(size); + m_reco_track_num_calo_hits_p2.resize(size); + + + + m_sim_track_matched.resize(size); + m_sim_track_energy.resize(size); + m_sim_track_mass.resize(size); + m_sim_track_kinetic_energy.resize(size); + m_sim_track_pdg.resize(size); + m_sim_track_parent_pdg.resize(size); + m_sim_track_origin.resize(size); + m_sim_track_process.resize(size); + m_sim_track_startx.resize(size); + m_sim_track_starty.resize(size); + m_sim_track_startz.resize(size); + m_sim_track_endx.resize(size); + m_sim_track_endy.resize(size); + m_sim_track_endz.resize(size); + m_sim_track_length.resize(size); + + m_sim_track_px.resize(size); + m_sim_track_py.resize(size); + m_sim_track_pz.resize(size); + m_sim_track_trackID.resize(size); + m_sim_track_overlay_fraction.resize(size); + + m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + m_reco_track_pid_chi2_mu_plane0.resize(size); + m_reco_track_pid_chi2_mu_plane1.resize(size); + m_reco_track_pid_chi2_mu_plane2.resize(size); + m_reco_track_pid_chi2_p_plane0.resize(size); + m_reco_track_pid_chi2_p_plane1.resize(size); + m_reco_track_pid_chi2_p_plane2.resize(size); + m_reco_track_pid_pida_plane0.resize(size); + m_reco_track_pid_pida_plane1.resize(size); + m_reco_track_pid_pida_plane2.resize(size); + m_reco_track_pid_three_plane_proton_pid.resize(size); + + m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); + m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + m_reco_track_sliceId.resize(size); + m_reco_track_nuscore.resize(size); + m_reco_track_isclearcosmic.resize(size); + m_reco_track_trackscore.resize(size); + m_reco_track_pfparticle_pdg.resize(size); + m_reco_track_is_nuslice.resize(size); + + m_sim_track_sliceId.resize(size); + m_sim_track_nuscore.resize(size); + m_sim_track_isclearcosmic.resize(size); + } + + //analyze_Shower.h + void SinglePhoton::ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_CPA.clear(); + m_reco_shower_start_dist_to_SCB.clear(); + m_reco_shower_start_in_SCB.clear(); + m_reco_shower_end_dist_to_active_TPC.clear(); + m_reco_shower_end_dist_to_SCB.clear(); + + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + + m_reco_shower_reclustered_energy_plane0.clear(); + m_reco_shower_reclustered_energy_plane1.clear(); + m_reco_shower_reclustered_energy_plane2.clear(); + m_reco_shower_reclustered_energy_max.clear(); + + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + m_reco_shower_plane0_meanRMS.clear(); + m_reco_shower_plane1_meanRMS.clear(); + m_reco_shower_plane2_meanRMS.clear(); + + m_reco_shower_hit_tick.clear(); + m_reco_shower_hit_wire.clear(); + m_reco_shower_hit_plane.clear(); + m_reco_shower_spacepoint_x.clear(); + m_reco_shower_spacepoint_y.clear(); + m_reco_shower_spacepoint_z.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + + m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); + m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + m_reco_shower_pfparticle_pdg.clear(); + + } + + void SinglePhoton::CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); + vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); + vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); + vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); + + + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); + vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); + vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); + + vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); + vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); + vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); + vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); + + vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); + vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); + vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); + + vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); + vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); + vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); + vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void SinglePhoton::ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower_reclustered_energy_plane0.resize(size); + m_reco_shower_reclustered_energy_plane1.resize(size); + m_reco_shower_reclustered_energy_plane2.resize(size); + m_reco_shower_reclustered_energy_max.resize(size); + + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_CPA.resize(size); + m_reco_shower_start_dist_to_SCB.resize(size); + m_reco_shower_start_in_SCB.resize(size); + + m_reco_shower_end_dist_to_active_TPC.resize(size); + m_reco_shower_end_dist_to_SCB.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + m_reco_shower_plane0_meanRMS.resize(size); + m_reco_shower_plane1_meanRMS.resize(size); + m_reco_shower_plane2_meanRMS.resize(size); + + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + + m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); + m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + m_reco_shower_pfparticle_pdg.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + } + + //analyze_MCTruth.h + void SinglePhoton::ClearMCTruths(){ + m_mctruth_num = 0; + m_mctruth_origin = -99; + m_mctruth_mode = -99; + m_mctruth_interaction_type = -99; + m_mctruth_nu_vertex_x = -9999; + m_mctruth_nu_vertex_y = -9999; + m_mctruth_nu_vertex_z = -9999; + m_mctruth_reco_vertex_dist = -9999; + m_mctruth_ccnc = -99; + m_mctruth_qsqr = -99; + m_mctruth_nu_E = -99; + m_mctruth_nu_pdg = 0; + m_mctruth_lepton_pdg = 0; + m_mctruth_num_daughter_particles = -99; + m_mctruth_daughters_pdg.clear(); + m_mctruth_daughters_E.clear(); + + m_mctruth_daughters_status_code.clear(); + m_mctruth_daughters_trackID.clear(); + m_mctruth_daughters_mother_trackID.clear(); + m_mctruth_daughters_px.clear(); + m_mctruth_daughters_py.clear(); + m_mctruth_daughters_pz.clear(); + m_mctruth_daughters_startx.clear(); + m_mctruth_daughters_starty.clear(); + m_mctruth_daughters_startz.clear(); + m_mctruth_daughters_time.clear(); + m_mctruth_daughters_endx.clear(); + m_mctruth_daughters_endy.clear(); + m_mctruth_daughters_endz.clear(); + m_mctruth_daughters_endtime.clear(); + m_mctruth_daughters_process.clear(); + m_mctruth_daughters_end_process.clear(); + + + m_mctruth_is_delta_radiative = 0; + m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + m_mctruth_delta_photon_energy=-999; + m_mctruth_delta_proton_energy=-999; + m_mctruth_delta_neutron_energy=-999; + + m_mctruth_num_exiting_photons =0; + m_mctruth_num_exiting_protons =0; + m_mctruth_num_exiting_pi0 =0; + m_mctruth_num_exiting_pipm =0; + m_mctruth_num_exiting_neutrons=0; + m_mctruth_num_exiting_delta0=0; + m_mctruth_num_exiting_deltapm=0; + m_mctruth_num_exiting_deltapp=0; + + m_mctruth_num_reconstructable_protons = 0; + + m_mctruth_is_reconstructable_1g1p = 0; + m_mctruth_is_reconstructable_1g0p = 0; + + m_mctruth_leading_exiting_proton_energy = -9999; + + m_mctruth_exiting_pi0_E.clear(); + m_mctruth_exiting_pi0_mom.clear(); + m_mctruth_exiting_pi0_px.clear(); + m_mctruth_exiting_pi0_py.clear(); + m_mctruth_exiting_pi0_pz.clear(); + + m_mctruth_pi0_leading_photon_energy = -9999; + m_mctruth_pi0_subleading_photon_energy = -9999; + m_mctruth_pi0_leading_photon_end_process = "none"; + m_mctruth_pi0_subleading_photon_end_process = "none"; + m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_exiting_TPC = -999; + m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + m_mctruth_exiting_delta0_num_daughters.clear(); + + m_mctruth_exiting_photon_mother_trackID.clear(); + m_mctruth_exiting_photon_trackID.clear(); + m_mctruth_exiting_photon_from_delta_decay.clear(); + m_mctruth_exiting_photon_energy.clear(); + m_mctruth_exiting_photon_px.clear(); + m_mctruth_exiting_photon_py.clear(); + m_mctruth_exiting_photon_pz.clear(); + + m_mctruth_exiting_proton_mother_trackID.clear(); + m_mctruth_exiting_proton_trackID.clear(); + m_mctruth_exiting_proton_from_delta_decay.clear(); + m_mctruth_exiting_proton_energy.clear(); + m_mctruth_exiting_proton_px.clear(); + m_mctruth_exiting_proton_py.clear(); + m_mctruth_exiting_proton_pz.clear(); + + m_mctruth_exiting_neutron_mother_trackID.clear(); + m_mctruth_exiting_neutron_trackID.clear(); + m_mctruth_exiting_neutron_from_delta_decay.clear(); + m_mctruth_exiting_neutron_energy.clear(); + m_mctruth_exiting_neutron_px.clear(); + m_mctruth_exiting_neutron_py.clear(); + m_mctruth_exiting_neutron_pz.clear(); + } + + void SinglePhoton::CreateMCTruthBranches(){ + vertex_tree->Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); + vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); + vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); + vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); + vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); + vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); + vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); + vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); + vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); + vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); + vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); + vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); + vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); + vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); + vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); + vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); + + + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); + vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); + vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); + vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); + vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); + + vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); + vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); + vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); + vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); + + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); + vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); + vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); + vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); + vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); + vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void SinglePhoton::ResizeMCTruths(size_t size){ + m_mctruth_daughters_pdg.resize(size); + m_mctruth_daughters_E.resize(size); + m_mctruth_daughters_status_code.resize(size); + m_mctruth_daughters_trackID.resize(size); + m_mctruth_daughters_mother_trackID.resize(size); + m_mctruth_daughters_px.resize(size); + m_mctruth_daughters_py.resize(size); + m_mctruth_daughters_pz.resize(size); + m_mctruth_daughters_startx.resize(size); + m_mctruth_daughters_starty.resize(size); + m_mctruth_daughters_startz.resize(size); + m_mctruth_daughters_time.resize(size); + m_mctruth_daughters_endx.resize(size); + m_mctruth_daughters_endy.resize(size); + m_mctruth_daughters_endz.resize(size); + m_mctruth_daughters_endtime.resize(size); + m_mctruth_daughters_end_process.resize(size); + m_mctruth_daughters_process.resize(size); + } + + //analyze_EventWeight.h + void SinglePhoton::ClearEventWeightBranches(){ + m_mcflux_nu_pos_x=-9999; + m_mcflux_nu_pos_y=-9999; + m_mcflux_nu_pos_z=-9999; + m_mcflux_nu_mom_x=-9999; + m_mcflux_nu_mom_y=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_E=-9999; + m_mcflux_ntype=0; + m_mcflux_ptype=0; + m_mcflux_nimpwt=-9999; + m_mcflux_dk2gen=-9999; + m_mcflux_nenergyn=-9999; + m_mcflux_tpx=-9999; + m_mcflux_tpy=-9999; + m_mcflux_tpz=-9999; + m_mcflux_vx=-9999; + m_mcflux_vy=-9999; + m_mcflux_vz=-9999; + m_mcflux_tptype=0; + m_mctruth_nparticles=0; + /* + // m_mctruth_particles_track_ID[]; + // m_mctruth_particles_pdg_code[]; + // m_mctruth_particles_mother[]; + // m_mctruth_particles_status_code[]; + // m_mctruth_particles_num_daughters[]; //other similar variables + // m_mctruth_particles_daughters[]; + //m_mctruth_particles_Gvx.clear(); + //m_mctruth_particles_Gvy.clear(); + m_mctruth_particles_Gvz.clear(); + m_mctruth_particles_Gvt.clear(); + m_mctruth_particles_px0.clear(); + m_mctruth_particles_py0.clear(); + m_mctruth_particles_pz0.clear(); + m_mctruth_particles_e0.clear(); + //int m_mctruth_particles_rescatter.clear(); + m_mctruth_particles_polx.clear(); + m_mctruth_particles_poly.clear(); + m_mctruth_particles_polz.clear(); + + //int m_mctruth_neutrino_CCNC; + //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars + //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" + int m_mctruth_neutrino_target.clear(); + int m_mctruth_neutrino_nucleon.clear(); + int m_mctruth_neutrino_quark.clear(); + m_mctruth_neutrino_w.clear(); + m_mctruth_neutrino_x.clear(); + m_mctruth_neutrino_y.clear(); + */ + //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" + m_gtruth_is_sea_quark=false; + m_gtruth_tgt_pdg=0; + m_gtruth_tgt_Z = -9999; + m_gtruth_tgt_A = -9999; + m_gtruth_tgt_p4_x = -9999; + m_gtruth_tgt_p4_y = -9999; + m_gtruth_tgt_p4_z = -9999; + m_gtruth_tgt_p4_E = -9999; + m_gtruth_weight=-9999; + m_gtruth_probability=-9999; + m_gtruth_xsec=-9999; + m_gtruth_diff_xsec=-9999; + m_gtruth_gphase_space=-9999; + m_gtruth_vertex_x=-9999; + m_gtruth_vertex_y=-9999; + m_gtruth_vertex_z=-9999; + m_gtruth_vertex_T=-9999; + m_gtruth_gscatter=-9999; + m_gtruth_gint=-9999; + m_gtruth_res_num=-9999; + m_gtruth_num_piplus=-9999; + m_gtruth_num_pi0=-9999; + m_gtruth_num_piminus=-9999; + m_gtruth_num_proton=-9999; + m_gtruth_num_neutron=-9999; + m_gtruth_is_charm=false; + m_gtruth_is_strange=false; + m_gtruth_charm_hadron_pdg = -9999; + m_gtruth_strange_hadron_pdg = -9999; + m_gtruth_decay_mode = -9999; + m_gtruth_gx=-9999; + m_gtruth_gy=-9999; + m_gtruth_gy=-9999; + m_gtruth_gt=-9999; + m_gtruth_gw=-9999; + m_gtruth_gQ2=-9999; + m_gtruth_gq2=-9999; + m_gtruth_probe_pdg=0; + m_gtruth_probe_p4_x=-9999; + m_gtruth_probe_p4_y=-9999; + m_gtruth_probe_p4_z=-9999; + m_gtruth_probe_p4_E=-9999; + m_gtruth_hit_nuc_p4_x=-9999; + m_gtruth_hit_nuc_p4_y=-9999; + m_gtruth_hit_nuc_p4_z=-9999; + m_gtruth_hit_nuc_p4_E=-9999; + m_gtruth_hit_nuc_pos=-9999; + m_gtruth_fs_had_syst_p4_x=-9999; + m_gtruth_fs_had_syst_p4_y=-9999; + m_gtruth_fs_had_syst_p4_z=-9999; + m_gtruth_fs_had_syst_p4_E=-9999; + } + + void SinglePhoton::CreateEventWeightBranches(){ + //-----------------run info + eventweight_tree->Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); + eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); + eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); + eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); + eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); + eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); + eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); + eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); + eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + } + + //analyze_Geant4.h + void SinglePhoton::ClearGeant4Branches(){ + + m_geant4_pdg.clear(); + m_geant4_trackid.clear(); + m_geant4_mother.clear(); + m_geant4_statuscode.clear(); + m_geant4_E.clear(); + m_geant4_mass.clear(); + m_geant4_px.clear(); + m_geant4_py.clear(); + m_geant4_pz.clear(); + m_geant4_dx.clear(); + m_geant4_dy.clear(); + m_geant4_dz.clear(); + + m_geant4_vx.clear(); + m_geant4_vy.clear(); + m_geant4_vz.clear(); + m_geant4_process.clear(); + m_geant4_end_process.clear(); + + m_geant4_costheta.clear(); + } + + void SinglePhoton::CreateGeant4Branches(){ + geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_geant4_px); + geant4_tree->Branch("geant4_py", &m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_geant4_process); + } + + //analyze_Slice.h + void SinglePhoton::ClearSlices(){ + m_reco_slice_num = 0; + m_reco_slice_nuscore.clear(); + m_matched_signal_shower_overlay_fraction.clear(); + //std::vector m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + + void SinglePhoton::CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + } + + void SinglePhoton::ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size,-999); + m_reco_slice_num_pfps.resize(size,0); + m_reco_slice_num_showers.resize(size,0); + m_reco_slice_num_tracks.resize(size,0); + } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h index a5f30ef75..f7f4d697d 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h @@ -1,616 +1,602 @@ // override function of sorts for max_element function comparison bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second < p2.second); + return (p1.second < p2.second); } // override function of sorts for min_element function comparison bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second > p2.second); + return (p1.second > p2.second); } namespace single_photon{ -/* Arguments to Function IsolationStudy (all are const): - * 1. vector named tracks of art ptr to recob track - * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle - * 3. vector named showers of art ptr to recob showers - * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle - * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit - * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int - * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit -*/ - void SinglePhoton::IsolationStudy( - std::vector all_PPFPs, - const std::vector>& tracks, - const std::vector>& showers, - detinfo::DetectorPropertiesData const & theDetector) { - - int total_track_hits =0; - int total_shower_hits =0; - int nu_slice_id = -999; - - std::vector< art::Ptr > associated_hits; - std::vector< art::Ptr > unassociated_hits; - std::vector< art::Ptr > unassociated_hits_plane0; - std::vector< art::Ptr > unassociated_hits_plane1; - std::vector< art::Ptr > unassociated_hits_plane2; - - std::vector< std::map >> > v_newClusterToHitsMap(3); - - std::vector> slicehits; - -// BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); -// art::Ptr pfp = ppfp->pPFParticle;//trackToPFParticleMap[track]; - - int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); - //CHECK temp. solution only work with best nuscore slice Keng - // std::cout<<"Looking at slice "<get_IsNuSlice()) continue; - - std::vector> tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); - - if(ppfp->get_IsNeutrino()) slicehits.insert(slicehits.end(), tmp_slicehits.begin(), tmp_slicehits.end());//add up all nu slice hits - - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; - total_track_hits += trackhits.size(); - - //CHECK nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; - //CHECK temporary solution is to skip tracks[1]; -// if(nu_slice_id != sliceid && nu_slice_id != -999){ -// std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< all_PPFPs, + const std::vector>& tracks, + const std::vector>& showers, + detinfo::DetectorPropertiesData const & theDetector) { + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector< art::Ptr > associated_hits; + std::vector< art::Ptr > unassociated_hits; + std::vector< art::Ptr > unassociated_hits_plane0; + std::vector< art::Ptr > unassociated_hits_plane1; + std::vector< art::Ptr > unassociated_hits_plane2; + + std::vector< std::map >> > v_newClusterToHitsMap(3); + + std::vector> slicehits; + + // BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + // art::Ptr pfp = ppfp->pPFParticle;//trackToPFParticleMap[track]; + + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + //WARNING the temp. solution only work with best nuscore slice Keng + if(!ppfp->get_IsNuSlice()) continue; + + std::vector> tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + if(ppfp->get_IsNeutrino()) slicehits.insert(slicehits.end(), tmp_slicehits.begin(), tmp_slicehits.end());//add up all nu slice hits + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + //WARNNING nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; + // temporary solution is to skip tracks[1]; + // if(nu_slice_id != sliceid && nu_slice_id != -999){ + // std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< shower = showers[s]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + // art::Ptr pfp = ppfp->pPFParticle;//showerToPFParticleMap.at(shower); + + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + + // if(sliceid != slice_w_bestnuID) continue;//WARNNING only deal with nu slice with best nu score for now Keng + if(!ppfp->get_IsNuSlice()) continue; + if(sliceid<0) continue; //negative sliceid is bad + + auto tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); + auto showerhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + for(auto &h: showerhits){ + associated_hits.push_back(h); + } + } + // END FOR LOOP COUNTING SHOWER HITS + + m_sss_num_associated_hits = total_shower_hits + total_track_hits; + + // PRINT SUMMARY OF HIT TYPES + std::cout<<"*SSS: So in total we have "<= 0){ + m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; + + std::cout<<"*SSS: So that leaves "<View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + } - std::cout<<"CHECK "<<__LINE__<<" look at shower with size "< shower = showers[s]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); - // art::Ptr pfp = ppfp->pPFParticle;//showerToPFParticleMap.at(shower); + } - int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - // if(sliceid != slice_w_bestnuID) continue;//CHECK only deal with nu slice with best nu score for now Keng - if(!ppfp->get_IsNuSlice()) continue; - if(sliceid<0) continue; //negative sliceid is bad CHECK - //CHECK ID not found? - std::cout<<"CHECK "<<__LINE__<<" find hits at ID "<pSliceHits;//sliceIDToHitsMap.at(sliceid); - auto showerhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); - std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; - total_shower_hits+=showerhits.size(); + // IF HAVE 1+G 1P AND WANT TO PLOT + if(bool_make_sss_plots && showers.size()==1 && tracks.size()==1){ - //CHECK how nu_slice_id is updated? -// if(nu_slice_id != sliceid && nu_slice_id!=-999){ -// std::cout<<"*ERROR!! In Second Shower Search, the neutrino slice ID changed? this: "<Divide(4, 1, 0.0, 0.1); - for(auto &h: showerhits){ - associated_hits.push_back(h); - } - } -// END FOR LOOP COUNTING SHOWER HITS + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); - m_sss_num_associated_hits = total_shower_hits + total_track_hits; + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); -// PRINT SUMMARY OF HIT TYPES - std::cout<<"*SSS: So in total we have "< s_hists = {s_hist0, s_hist1, s_hist2}; + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; -// IF VALID SLICE - if(nu_slice_id >= 0){ - m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; - std::cout<<"*SSS: So that leaves "<> pts_trk( tracks.size(), std::vector(3) ); - if(m_sss_num_unassociated_hits < 0){ - std::cout<<"ERROR!! Number of unassociated hits is negative, i.e: num_associated: "< pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = ppfpt->pPFPHits;//pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); // peak time of track hits on 3 planes. + std::vector> t_vec_c(3); // wire number of track hits on 3 planes. + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + + std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; + std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; + std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + + std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance (in sh_dist) on each plane + std::vector< std::pair, double > > max_min_hit(3); + + PandoraPFParticle* ppfps = PPFP_GetPPFPFromShower(all_PPFPs, showers[0]); + auto showerhits = ppfps->pPFPHits;//pfParticleToHitsMap.at(pfp_s); + // art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; //minimum distance between this shower hit and all track hits + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); -// DETERMINE UNASSOCIATED HITS BY COMPARING ALL SLICE HITS WITH LIST OF ASSOCIATED HITS - for(auto &h: slicehits){ + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - bool is_associated = false; - for(auto &a: associated_hits){ - if(h==a){ - is_associated = true; - break; - } - } - if(!is_associated){ - unassociated_hits.push_back(h); - auto plane_view = h->View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - } + //NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower + std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - } + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); - std::cout<<" *associated_hits.size() "< vec_t; + std::vector vec_c; + for(auto &uh: unassociated_hits_all[plane]){ -// IF HAVE 1+G 1P AND WANT TO PLOT - if(bool_make_sss_plots && showers.size()==1 && tracks.size()==1){ + if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane - std::string print_name = "isolation_"+std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - TCanvas *can = new TCanvas(print_name.c_str(), print_name.c_str(),3000,800); - can->Divide(4, 1, 0.0, 0.1); + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); - // Creation of canvas and histograms to hold hit distance data - TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); - histcan->Divide(3, 2, 0.005, 0.1); + if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } - TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); - TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); - TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); - std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); - TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); - TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); - std::vector u_hists = {u_hist0, u_hist1, u_hist2}; - - - std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; - // saving wire and time coordinates - std::vector> pts_trk( tracks.size(), std::vector(3) ); - - PandoraPFParticle* ppfpt = PPFP_GetPPFPFromTrack(all_PPFPs, tracks[0]); -// art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); - auto trackhits = ppfpt->pPFPHits;//pfParticleToHitsMap.at(pfpt); - - std::vector t_pts(3); - std::vector> t_vec_t(3); // peak time of track hits on 3 planes. - std::vector> t_vec_c(3); // wire number of track hits on 3 planes. - - for(auto &th: trackhits){ - double wire = (double)th->WireID().Wire; - t_vec_c[(int)th->View()].push_back(wire); - - double time = (double)th->PeakTime(); - t_vec_t[(int)th->View()].push_back(time); - - tick_max = std::max(tick_max, time); - tick_min = std::min(tick_min, time); - chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); - chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); - - } - - t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); - t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); - t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); - pts_trk[0] = t_pts; - - std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; - std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; - std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; - - - std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) - std::vector, double >> sh_dist(3); - // vector to save hit with largest minimum distance (in sh_dist) on each plane - std::vector< std::pair, double > > max_min_hit(3); - - PandoraPFParticle* ppfps = PPFP_GetPPFPFromShower(all_PPFPs, showers[0]); - auto showerhits = ppfps->pPFPHits;//pfParticleToHitsMap.at(pfp_s); - // art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); - - std::vector t_pts_s(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - std::vector num_shr_hits(3); - - for(auto &sh: showerhits){ - int plane = (int)sh->View(); - num_shr_hits[plane] += 1; - - double minDist = 999.9; //minimum distance between this shower hit and all track hits - double dist; - // only do if there are track hits on this plane with which to compare - if (t_vec_c[(int)sh->View()].size() != 0){ - double wire = (double)sh->WireID().Wire; - vec_c[(int)sh->View()].push_back(wire); - double time = (double)sh->PeakTime(); - vec_t[(int)sh->View()].push_back(time); - - for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); - if (dist < minDist) { - minDist = dist; - } - - } // end of track hits for - s_hists[(int)sh->View()]->Fill(minDist); - - // keep track of 10 smallest distances and their corresponding hits - if (sh_dist[plane].size() < 10){ - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } - else{ if (minDist < max_min_hit[plane].second){ - sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } } - - // finds the necessary plot boundaries to fit the shower - tick_max = std::max(tick_max, (double)sh->PeakTime()); - tick_min = std::min(tick_min, (double)sh->PeakTime()); - chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); - chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); - } // end if stmnt t_vec_c - } // end looping shower hits - - // create graphs from newly compiled shower coordinates - t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - // save new graphs for this shower into vector containing all showers - pts_shr[0] = t_pts_s; - - // place data into approriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); - } - else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance - auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); - } - else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); - } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); - } - - /* DRAW SHOWER HISTOGRAM */ - histcan->cd(1); - s_hists[0]->Draw(); - s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(2); - s_hists[1]->Draw(); - s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(3); - s_hists[2]->Draw(); - s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - - - //NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower - std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - - // create vector of three layers for unassoc hits - std::vector g_unass(3); - - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - std::vector minDist_tot(3); - std::vector minWire(3); - std::vector minTime(3); - - for(int plane = 0; plane < 3; plane++){ - minDist_tot[plane] = 999; - std::vector vec_t; - std::vector vec_c; - - for(auto &uh: unassociated_hits_all[plane]){ - - if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane - - double wire = (double)uh->WireID().Wire; - vec_c.push_back(wire); - double time = (double)uh->PeakTime(); - vec_t.push_back(time); - - double minDist = 999.9; - double dist; - for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); - if (dist < minDist) { minDist = dist; } - } - u_hists[(int)uh->View()]->Fill(minDist); - - if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits - minDist_tot[plane] = minDist; - minWire[plane] = wire; - minTime[plane] = time; - } - - // for reclustering - std::vector pt = {wire, vec_t.back()}; - pts_to_recluster[(int)uh->View()].push_back(pt); - mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - - } // end looping unassociated_hits_all - - g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - } // end looping planes - - // place data into appropriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); - } - else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); - } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); - } - - /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ - histcan->cd(4); - u_hists[0]->Draw(); - u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(5); - u_hists[1]->Draw(); - u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(6); - u_hists[2]->Draw(); - u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - - /* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ - /* histcan->Update(); - histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); - */ - - delete histcan; - - - //PLOTTING NOW - //SET-UP - double plot_point_size = 0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - - } - - // ******************************** DeadWireRegions ******************************************** - //plot dead wire - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - // std::cout<<"WIRE "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); - l->SetLineColor(kGray+1); - l->Draw("same"); - } - } - - // plot track - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - // plot shower hits - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - // plot unassociated hits - for(int i=0; i<3; i++){ - can->cd(i+1); - if (g_unass[i]->GetN() > 0){ - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - } - - - - - //******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - - // PLOTTING SHOWER? - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - - // PLOTTING - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - can->Update(); - // can->SaveAs((print_name+".pdf").c_str(),"pdf"); - std::cout<<"*PRINTING"< 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); } - return; + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + } + + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + + /* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ + /* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); + */ + + delete histcan; + + + //PLOTTING NOW + //SET-UP + double plot_point_size = 0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + } + + // ******************************** DeadWireRegions ******************************************** + //plot dead wire + for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + int badchan = bad_channel_list_fixed_mcc9[i].first; + int ok = bad_channel_list_fixed_mcc9[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + // std::cout<<"WIRE "<cd(thisp+1); + TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + l->SetLineColor(kGray+1); + l->Draw("same"); + } + } + + // plot track + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + // plot shower hits + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + // plot unassociated hits + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } + + + + + //******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + + // PLOTTING SHOWER? + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + // PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"< PPFPs){ - //set the vertex for now; - void SinglePhoton::Output_PFParticleInfo( std::vector PPFPs){ + int pfp_size = PPFPs.size(); - int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ - for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle* temp_p = &PPFPs[index]; + if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; + m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; + m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; + m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; +// std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; + m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); + m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); - PandoraPFParticle* temp_p = &PPFPs[index]; - if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; - m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; - m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; - m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; - std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; - m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); - m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); - } - } + if(temp_p->get_IsNeutrino() ){ + m_reco_slice_num++; + m_reco_slice_nuscore.push_back(temp_p->get_NuScore()); + + } + } + + //resize slice variables size; + this->ResizeSlices(m_reco_slice_num); + } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h index aabdb1571..8720b22c1 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h @@ -4,713 +4,576 @@ namespace single_photon { - //recoMCmatching but specifically for recob::showers - void SinglePhoton::showerRecoMCmatching( - std::vector all_PPFPs, - std::vector>& showerVector, - std::map,art::Ptr>& showerToMCParticleMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + //recoMCmatching but specifically for recob::showers + void SinglePhoton::showerRecoMCmatching( + std::vector all_PPFPs, + std::vector>& showerVector, + std::map,art::Ptr>& showerToMCParticleMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ - std::vector vec_fraction_matched; - //processes that are "showery" - std::map map_is_shower_process = {{"compt",true}, - {"FastScintillation",true}, - {"eBrem",true}, - {"phot",true}, - {"eIoni",true}, - {"conv",true}, - {"annihil",true}}; + std::vector vec_fraction_matched; + //processes that are "showery" + std::map map_is_shower_process = {{"compt",true}, + {"FastScintillation",true}, + {"eBrem",true}, + {"phot",true}, + {"eIoni",true}, + {"conv",true}, + {"annihil",true}}; - std::vector spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); - //for each recob::track/shower in the event - bool default_verbose = m_is_verbose; - m_is_verbose = false; - for(size_t i=0; i spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); + //for each recob::track/shower in the event + bool default_verbose = m_is_verbose; + m_is_verbose = false; + for(size_t i=0; i pfp = ppfp->pPFParticle; - - //putting in the PFP pdg code as a check + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + const art::Ptr pfp = ppfp->pPFParticle; - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = ppfp->pPFPHits; //pfParticleToHitsMap[pfp]; + //putting in the PFP pdg code as a check - /** - * - * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower - * - **/ + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = ppfp->pPFPHits; //pfParticleToHitsMap[pfp]; - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + /** + * + * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower + * + **/ - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - - bool found_a_match = false; - - //std::cout<<"SinglePhoton::RecoMC()\t||\t On shower: "<Self() <<"and slice id "<View(); - - particle_vec.clear(); match_vec.clear(); //only store per hit - - //for the hit, fill the backtracker info - mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); - // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit + // std::vector particle_vec; + // std::vector match_vec; + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing - } // end loop over hits + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; - if(m_is_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<Self() <<"and slice id "<View(); - m_sim_shower_start_x[i] = -9999; - m_sim_shower_start_y[i] = -9999; - m_sim_shower_start_z[i] = -9999; - m_sim_shower_px[i] = -9999; - m_sim_shower_py[i] = -9999; - m_sim_shower_pz[i] = -9999; + particle_vec.clear(); match_vec.clear(); //only store per hit - m_sim_shower_is_true_shower[i] = -999; - m_sim_shower_best_matched_plane[i] = -999; - m_sim_shower_matched_energy_fraction_plane0[i] = -999; - m_sim_shower_matched_energy_fraction_plane1[i] = -999; - m_sim_shower_matched_energy_fraction_plane2[i] = -999; + //for the hit, fill the backtracker info + mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); + // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; - /* ********** if shower has been matched to MCParticle ************************* */ - - /* - * - * Loop over each MCParticle associated to the reco shower to find the source particle - * - */ - - std::map> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; // a vector of mother MCP - std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; // number of associated MCP that has mothers - - //m_is_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(m_is_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(m_is_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - //Guanqun: this line here doesn't really cosider other break cases than finding primary particle - if(m_is_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(m_is_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; -// best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; -// best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; -// best_mother_plane = 2; - } - } + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } - // now have found the best mother of the shower - if(m_is_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit - if(match->PdgCode()==22){ // if it's a gamma - std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; - this->spacecharge_correction(match, corrected_start, tmp ); - m_sim_shower_is_true_shower[i] = 1; - }else if(abs(match->PdgCode())==11){ // if it's e+/e- - this->spacecharge_correction(match, corrected_start); - m_sim_shower_is_true_shower[i] = 1; - }else{ - corrected_start = {-999,-999,-999}; - m_sim_shower_is_true_shower[i] = 0; - } - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + } // end loop over hits + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + if(m_is_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; // a vector of mother MCP + std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; // number of associated MCP that has mothers + + //m_is_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(m_is_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(m_is_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + //Guanqun: this line here doesn't really cosider other break cases than finding primary particle + if(m_is_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()<PdgCode(); - m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; + } + num_bt_mothers++; + } else{ + if(m_is_verbose) std::cout<<"L1: error, the mother mother id was "<E(); - m_sim_shower_mass[i] = match->Mass(); - m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); - m_sim_shower_pdg[i] = match->PdgCode(); - m_sim_shower_trackID[i] = match->TrackId(); - m_sim_shower_process[i] = match->Process(); - m_sim_shower_end_process[i] = match->EndProcess(); - m_sim_shower_vertex_x[i] = corrected_vertex[0]; - m_sim_shower_vertex_y[i] = corrected_vertex[1]; - m_sim_shower_vertex_z[i] =corrected_vertex[2]; - - m_sim_shower_start_x[i] = corrected_start[0]; - m_sim_shower_start_y[i] = corrected_start[1]; - m_sim_shower_start_z[i] =corrected_start[2]; - - m_sim_shower_px[i] = match->Px(); - m_sim_shower_py[i] = match->Py(); - m_sim_shower_pz[i] = match->Pz(); - - // should've use 'best_mother_plane' here - m_sim_shower_best_matched_plane[i] = best_mother_index; - m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; - m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; - m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - - m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; - - mcParticleVector.push_back(match); - showerToMCParticleMap[shower] = mcParticleVector.back(); - - m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; - m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - -// if(marks_mother_vector.size()!=0){ -// //if(m_is_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); -// std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), - std::to_string(best_mother_index), - std::to_string(marks_mother_vector[best_mother_index]->PdgCode()), - std::to_string(total_energy_on_plane[0]), - std::to_string(total_energy_on_plane[1]), - std::to_string(total_energy_on_plane[2]), - std::to_string(ppfp->get_IsClearCosmic()) - },spacers); - - if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< - std::vector recoMCmatching(std::vector& objectVector, - std::map>& objectToMCParticleMap, - std::map>& objectToPFParticleMap, - std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector){ - - std::vector trk_overlay_vec; - std::vector vec_fraction_matched; - bool reco_verbose = false; - //for each recob::track/shower in the event - for(size_t i=0; i pfp = objectToPFParticleMap[object]; - - // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - bool found_a_match = false; - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; - found_a_match = true; - } - }//end loop over particles per hit - } + } + if(m_is_verbose) std::cout<<"-----------------------------End L1 Loop --------------------------------------------------"<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" - << " pdg=" << best_matched_mcparticle->PdgCode() - << " trkid=" << best_matched_mcparticle->TrackId() - << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; - } + for(size_t p=0; p< marks_mother_vector.size(); p++){ + art::Ptr mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(m_is_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + // best_mother_plane = 0; } + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + // best_mother_plane = 1; + } -// //Typenamed for simb::MCTrack and sim::MCShower -// /* @brief: tranverse through mcParticleVector, for each mcParticle, if an mcObject is found with same track ID -// * put the particle and object in the mcParticleToMCObjectMap as a pair -// */ -// template -// void perfectRecoMatching( -// std::vector>& mcParticleVector, -// std::vector& mcObjectVector, -// std::map,T>& mcParticleToMCObjectMap -// ){ -// -// -// for(size_t io=0; ioTrackID(); -// int object_mother_trackID =object->MotherTrackID(); -// int object_ancestor_trackID =object->AncestorTrackID(); -// const std::vector< unsigned int > object_daughters_trackID = object->DaughterTrackID(); -// std::cout<<"KRANK: "< particle = mcParticleVector[ip]; -// int particle_trackID = particle->TrackId(); -// -// std::vector id_matches; -// std::vector mother_id_matches; -// std::vector ancestor_id_matches; -// -// for(size_t io=0; ioTrackID(); -// int object_mother_trackID =object->MotherTrackID(); -// int object_ancestor_trackID =object->AncestorTrackID(); -// -// if(object_trackID == particle_trackID ) id_matches.push_back(io); -// if(object_mother_trackID == particle_trackID ) mother_id_matches.push_back(io); -// if(object_ancestor_trackID == particle_trackID ) ancestor_id_matches.push_back(io); -// } -// -// int num_id_matches=id_matches.size(); -// int num_mother_id_matches=mother_id_matches.size(); -// int num_ancestor_id_matches=ancestor_id_matches.size(); -// -// //So im not sure how this works but something like this -// if(num_id_matches > 1){ -// std::cout<<"Well hot saussage.. more than 1 id match "<e+e-" -// //mcParticleToMCObjectMap[particle] = mcObjectVector[mother_id_matches.front()]; -// }else if(num_ancestor_id_matches == 1){ -// //We have a mother match? I guess this is like Neutron->photon->e+e-" -// //mcParticleToMCObjectMap[particle] = mcObjectVector[ancestor_id_matches.front()]; -// }else if(num_ancestor_id_matches >1 || num_mother_id_matches >1){ -// std::cout<<"Well hot saussage.. more than 1 mother or ancestor. Actually thats very reasonable hehe."<>& mcParticleVector){ + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + // best_mother_plane = 2; + } + } + + + + // now have found the best mother of the shower + if(m_is_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + this->spacecharge_correction(match, corrected_vertex); + + + if(match->PdgCode()==22){ // if it's a gamma + std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; + this->spacecharge_correction(match, corrected_start, tmp ); + m_sim_shower_is_true_shower[i] = 1; + }else if(abs(match->PdgCode())==11){ // if it's e+/e- + this->spacecharge_correction(match, corrected_start); + m_sim_shower_is_true_shower[i] = 1; + }else{ + corrected_start = {-999,-999,-999}; + m_sim_shower_is_true_shower[i] = 0; + } + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + + if (match_mother.isNull()){ + m_sim_shower_parent_pdg[i] = -1; + m_sim_shower_parent_trackID[i] = -1; + + }else{ + m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + } + + + + m_sim_shower_matched[i] = 1; + m_sim_shower_energy[i] = match->E(); + m_sim_shower_mass[i] = match->Mass(); + m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + m_sim_shower_pdg[i] = match->PdgCode(); + m_sim_shower_trackID[i] = match->TrackId(); + m_sim_shower_process[i] = match->Process(); + m_sim_shower_end_process[i] = match->EndProcess(); + m_sim_shower_vertex_x[i] = corrected_vertex[0]; + m_sim_shower_vertex_y[i] = corrected_vertex[1]; + m_sim_shower_vertex_z[i] =corrected_vertex[2]; + + m_sim_shower_start_x[i] = corrected_start[0]; + m_sim_shower_start_y[i] = corrected_start[1]; + m_sim_shower_start_z[i] =corrected_start[2]; + + m_sim_shower_px[i] = match->Px(); + m_sim_shower_py[i] = match->Py(); + m_sim_shower_pz[i] = match->Pz(); + + // should've use 'best_mother_plane' here + m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - for(auto &mcp: mcParticleVector){ - int pdg = mcp->PdgCode(); - std::string end_process = mcp->EndProcess(); - int status = mcp->StatusCode() ; + m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + mcParticleVector.push_back(match); + showerToMCParticleMap[shower] = mcParticleVector.back(); - if(pdg==22){ - std::cout<<"PHOTO: "<get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; + m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + // if(marks_mother_vector.size()!=0){ + // //if(m_is_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); + // std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), + std::to_string(best_mother_index), + std::to_string(marks_mother_vector[best_mother_index]->PdgCode()), + std::to_string(total_energy_on_plane[0]), + std::to_string(total_energy_on_plane[1]), + std::to_string(total_energy_on_plane[2]), + std::to_string(ppfp->get_IsClearCosmic()) + },spacers); - return 0; + if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<>& mcParticleVector, const art::Event &evt){ - std::map > crap_map; - for(size_t j=0;j< mcParticleVector.size();j++){ - const art::Ptr mcp = mcParticleVector[j]; -//std::cout<<"PARG: "<TrackId()<<" key: "<TrackId()] = mcParticleVector[mcp.key()]; -} -art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>("largeant"); -art::FindManyP genieMCTruthHandle(mcParticleHandle, evt, "largeant"); + /* @brief: a simpler MCmatching function for track and shower + * @argument to be filled in function body: + * objectToMCParticleMap: map of object (track, shower) to its best-matching MCParticle + * mcParticleVector: a vector of best-matching MCParticle corresponding to objectVector + * @return: a vector of fraction number, which is the fraction of unassociated hits in all reco hits of PFParticle + */ + //Typenamed for recob::Track and recob::Shower + template + std::vector recoMCmatching(std::vector& objectVector, + std::map>& objectToMCParticleMap, + std::map>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector){ + + std::vector trk_overlay_vec; + std::vector vec_fraction_matched; + bool reco_verbose = false; + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<> GenieMCTruth; -std::vector geninfo; + int pdg = pfp->PdgCode(); + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing -for(size_t i=0; i< mcParticleVector.size();i++){ + bool found_a_match = false; + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "< nth_mother = mcParticleVector[i]; + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < obj_hits_ptrs.size(); ++i_h){ -//if(nth_mother->PdgCode() != 22 && nth_mother->PdgCode() != 11) continue; + particle_vec.clear(); match_vec.clear(); //only store per hit -std::cout<<"----------------------------------------------------------"<TrackId()<<") pdg: "<PdgCode()<<", status_code "<StatusCode()<<" MotherTrackID: "<Mother()<Mother()]; -std::cout<<"SinglePhoton::testbed()\t||\t -- and "<TrackId()<<" is a pdg: "<PdgCode()<<" and status_code "<StatusCode()<0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; -GenieMCTruth.clear(); geninfo.clear(); //tidy up this loop -genieMCTruthHandle.get(mcParticleVector[i].key(),GenieMCTruth,geninfo); -std::cout<<"SinglePhoton::testbed()\t||\t "<<" GenieMCTruth.size() "<NParticles()<<" particlesand geninfo_index: "<generatedParticleIndex()<generatedParticleIndex() > GenieMCTruth[k]->NParticles() || geninfo[k]->generatedParticleIndex()==ULONG_MAX){ -std::cout<<"SinglePhoton::testbed()\t||\t -- Thats way wrong.."<GetParticle(geninfo[k]->generatedParticleIndex()); -std::cout<<"SinglePhoton::testbed()\t||\t -- is a pdg: "<NParticles()<<" "<generatedParticleIndex()<TrackId()] += match_vec[i_p]->energy; //store energy per track id + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; + found_a_match = true; + } + }//end loop over particles per hit + } + + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + trk_overlay_vec.push_back(fraction_num_hits_overlay); + if(n_associated_mcparticle_hits == 0){ + //This will only occur if the whole recob::PFParticle is associated with an overlay object + //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" + << " pdg=" << best_matched_mcparticle->PdgCode() + << " trkid=" << best_matched_mcparticle->TrackId() + << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; + } + + }//end vector loop. + //return vec_fraction_matched; + return trk_overlay_vec; + } + + + int SinglePhoton::photoNuclearTesting(std::vector>& mcParticleVector){ + + + for(auto &mcp: mcParticleVector){ + int pdg = mcp->PdgCode(); + std::string end_process = mcp->EndProcess(); + int status = mcp->StatusCode() ; + + + if(pdg==22){ + std::cout<<"PHOTO: "<SinglePhoton::SecondShowerMatching( - std::vector>& hitz, + std::vector>& hitz, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, +// std::map< size_t, art::Ptr> & pfParticleIdMap, std::map< int ,art::Ptr> & MCParticleToTrackIdMap - ){ + ){ std::vector ans; //matched,pdg,parentpdg,trkid @@ -502,16 +502,14 @@ namespace single_photon void SinglePhoton::SecondShowerSearch3D( - std::vector> & showers, - std::map, art::Ptr> & NormalShowerToPFParticleMap, - std::vector> & tracks, - std::map, - art::Ptr> & NormalTrackToPFParticleMap, - art::Event const & evt ){ + std::vector> & showers, + std::map, art::Ptr> & NormalShowerToPFParticleMap, + std::vector> & tracks, + std::map, + art::Ptr> & NormalTrackToPFParticleMap, + art::Event const & evt ){ - //CHECK, may manually pick out "AllShr" label in sbnd; which are showers not in nu slice; - std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" -//Keng std::string sss3dlabel = "allShr";//"pandoraAllOutcomesShower" + std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" WARNING, should check this! art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); std::vector> allShowerVector; @@ -750,7 +748,7 @@ namespace single_photon // std::cout<<"Best invar "<<"--"<> SinglePhoton::clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ size_t size = candidate_indices.size(); - if(size == 0){ - throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); - } + if(size == 0){ + throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); + } - // at most 3 cluster indices (for 3 planes) - std::vector planes; + // at most 3 cluster indices (for 3 planes) + std::vector planes; std::vector max_ticks; std::vector min_ticks; std::vector tick_length; @@ -998,74 +996,74 @@ namespace single_photon } - //if candidates are not on different planes - if( size == 2 && planes[0] == planes[1]) + //if candidates are not on different planes + if( size == 2 && planes[0] == planes[1]) return {false, std::vector(2, -1.0)}; if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) return {false, std::vector(3, -1.0)}; - //calculate the overlapping tick-span - double tick_overlap = DBL_MAX; + //calculate the overlapping tick-span + double tick_overlap = DBL_MAX; - //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction + //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction for(auto max_e : max_ticks) for(auto min_e : min_ticks) if(max_e - min_e < tick_overlap) tick_overlap = max_e - min_e; - // if tick overlap is negative, meaning these clusters are not overlapping - if(tick_overlap < 0) + // if tick overlap is negative, meaning these clusters are not overlapping + if(tick_overlap < 0) return {false, std::vector(size, -1.0)}; else{ std::vector overlap_fraction; for(auto l: tick_length){ overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); - } + } return {true, overlap_fraction}; } } - std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ - std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; - - int num_cluster_groups=0; // number of matched cluster groups in total - std::vector> grouped_cluster_indices; - std::vector cluster_group_timeoverlap_fraction; - if(num_clusters <= 1) - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - - for(int i = 0; i != num_clusters -1; ++i){ - for(int j = i+1; j != num_clusters; ++j){ - - //first, look at candidate pairs - auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if( pair_result.first){ - - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j}); - double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; - - // if the pair is succefully grouped, look at possible trios - for(int k = j+1; k!= num_clusters; ++k){ - auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if(tri_result.first){ - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); - min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; - } - } //k loop - } - }//j loop - }//i loop + std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; + + int num_cluster_groups=0; // number of matched cluster groups in total + std::vector> grouped_cluster_indices; + std::vector cluster_group_timeoverlap_fraction; + if(num_clusters <= 1) + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + + for(int i = 0; i != num_clusters -1; ++i){ + for(int j = i+1; j != num_clusters; ++j){ + + //first, look at candidate pairs + auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if( pair_result.first){ + + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j}); + double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + + // if the pair is succefully grouped, look at possible trios + for(int k = j+1; k!= num_clusters; ++k){ + auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if(tri_result.first){ + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); + min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + } + } //k loop + } + }//j loop + }//i loop - std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; + std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - } + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + } } diff --git a/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc b/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc index 2419dd4b5..4378e32bf 100644 --- a/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc +++ b/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc @@ -52,15 +52,15 @@ class NCDeltaRadiative : public art::EDFilter { void cout_stuff(art::Event & e, bool passed); void FillTree(art::Event & e, - size_t const mct_index, - size_t const parent_index, - bool const is_nc_delta_radiative); + size_t const mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative); void Reset(); bool filter(art::Event & e) override; }; -//CHECK modified +//modified NCDeltaRadiative::NCDeltaRadiative(fhicl::ParameterSet const & p) : art::EDFilter(p), ftree(nullptr) { @@ -91,7 +91,7 @@ void NCDeltaRadiative::cout_stuff(art::Event & e, bool passed = false) { e.getValidHandle>("generator"); std::cout << passed << "\n" - << "==========================\n"; + << "==========================\n"; for(simb::MCTruth const & mct : *ev_mct) { std::cout << "----------------------------\n"; for(int i = 0; i < mct.NParticles(); ++i) { @@ -120,9 +120,9 @@ void NCDeltaRadiative::Reset() { void NCDeltaRadiative::FillTree(art::Event & e, - size_t mct_index, - size_t const parent_index, - bool const is_nc_delta_radiative) { + size_t mct_index, + size_t const parent_index, + bool const is_nc_delta_radiative) { Reset(); @@ -164,8 +164,8 @@ bool NCDeltaRadiative::filter(art::Event & e) { for(int i = 0; i < mct.NParticles(); ++i) { simb::MCParticle const & mcp = mct.GetParticle(i); if(mcp.TrackId() != i) { - std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; - exit(1); + std::cout << "ERROR: " << __LINE__ << " " << __PRETTY_FUNCTION__ << "\nTrackId does not match index\n"; + exit(1); } if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22)) continue; exiting_photon_parents.push_back(mcp.Mother()); @@ -174,25 +174,25 @@ bool NCDeltaRadiative::filter(art::Event & e) { std::vector in_nucleus_photons; for(size_t const s : exiting_photon_parents) { simb::MCParticle const & mcp = mct.GetParticle(s); - //CHEKC hardcode, TPC filter: - if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ - std::cout<<"OUTSIDE TPC x y z ="<210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ + std::cout<<"OUTSIDE TPC x y z ="<>("generator"); std::cout << passed << "\n" - << "===========Summary of Truth info===============\n"; + << "===========Summary of Truth info===============\n"; for(simb::MCTruth const & mct : *ev_mct) { std::cout<> const & ev_mct = - e.getValidHandle>("generator"); + e.getValidHandle>("generator"); simb::MCNeutrino const & mcn = ev_mct->at(mct_index).GetNeutrino(); fnu_pdg = mcn.Nu().PdgCode(); @@ -167,71 +166,71 @@ void NCRadiativeResonant::FillTree(art::Event & e, //true - pass; false - reject; bool NCRadiativeResonant::filter(art::Event & e) { - art::ValidHandle> const & ev_mct = - e.getValidHandle>("generator"); - - - //looking for resonant photons... - // - Particles from NC interaction - // - Particles contian photons with StatusCode 1 - // - the parent of a photon is not delta0 & delta+ ---> pass - // - if the parent of a photon is a photon - // - the grandparent of a photon is not delta0 & delta+ ---> pass - for(size_t ith = 0; ith < ev_mct->size(); ++ith) {//loop through MCTruth - - simb::MCTruth const & mct = ev_mct->at(ith); -// std::cout<<"Looking at the "< exiting_photon_parents; - for(int jth = 0; jth < mct.NParticles(); ++jth) {//loop through MCParticles - simb::MCParticle const & mcp = mct.GetParticle(jth); - - //CHEKC hardcode, TPC filter: - if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ - std::cout<<"OUTSIDE TPC x y z ="< in_nucleus_photons; - for(size_t const s : exiting_photon_parents) { - simb::MCParticle const & mcp = mct.GetParticle(s); - //2114 delta0; 2214 delta+ - if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) {//Want mcp as any particles but not delta0+ -// if(ftree){ -// FillTree(e, ith, mcp.Mother(), true); -// } - cout_stuff(e,true); - std::cout<<"\nYES a resonant evt: "<> const & ev_mct = + e.getValidHandle>("generator"); + + + //looking for resonant photons... + // - Particles from NC interaction + // - Particles contian photons with StatusCode 1 + // - the parent of a photon is not delta0 & delta+ ---> pass + // - if the parent of a photon is a photon + // - the grandparent of a photon is not delta0 & delta+ ---> pass + for(size_t ith = 0; ith < ev_mct->size(); ++ith) {//loop through MCTruth + + simb::MCTruth const & mct = ev_mct->at(ith); +// std::cout<<"Looking at the "< exiting_photon_parents; + for(int jth = 0; jth < mct.NParticles(); ++jth) {//loop through MCParticles + simb::MCParticle const & mcp = mct.GetParticle(jth); + + //CHEKC hardcode, TPC filter: + if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ + std::cout<<"OUTSIDE TPC x y z ="< in_nucleus_photons; + for(size_t const s : exiting_photon_parents) { + simb::MCParticle const & mcp = mct.GetParticle(s); + //2114 delta0; 2214 delta+ + if(abs(mcp.PdgCode()) != 2114 && abs(mcp.PdgCode()) != 2214 ) {//Want mcp as any particles but not delta0+ +// if(ftree){ +// FillTree(e, ith, mcp.Mother(), true); +// } + cout_stuff(e,true); + std::cout<<"\nYES a resonant evt: "<reconfigure(pset); //Set up some detector, timing, spacecharge and geometry services - //Keng, grab theDetector and detClocks in each event. + //Keng, grab theDetector and detClocks in each event. // theDetector = lar::providerFrom(); // detClocks = lar::providerFrom(); SCE = lar::providerFrom();//Get space charge service geom = lar::providerFrom(); - std::cout<<"SinglePhoton::"<<__FUNCTION__<<" now can start jobs --------------------"<("PrintOut", false); - m_is_verbose = pset.get("Verbose",false); - m_is_data = pset.get("isData",false); - m_is_overlayed = pset.get("isOverlayed",false); - m_is_textgen = pset.get("isTextGen",false); + m_is_verbose = pset.get("Verbose",false); + m_is_data = pset.get("isData",false); + m_is_overlayed = pset.get("isOverlayed",false); + m_is_textgen = pset.get("isTextGen",false); //some specific additonal info, default not include - m_use_PID_algorithms = pset.get("usePID",false); - m_use_delaunay = pset.get("useDelaunay",false); - m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); + m_use_PID_algorithms = pset.get("usePID",false); + m_use_delaunay = pset.get("useDelaunay",false); + m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) m_fill_trees = pset.get("FillTrees",true); @@ -89,20 +89,20 @@ namespace single_photon m_showerLabel = pset.get("ShowerLabel"); m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); m_caloLabel = pset.get("CaloLabel"); - m_flashLabel = pset.get("FlashLabel"); - m_potLabel = pset.get ("POTLabel"); - m_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); + m_flashLabel = pset.get("FlashLabel"); + m_potLabel = pset.get ("POTLabel"); + m_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); //KENG no such labels in sbnd? -//KENG m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); -//KENG m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); -//KENG m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); - m_generatorLabel = pset.get ("GeneratorLabel","generator"); -//KENG m_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); -//KENG m_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); - m_geantModuleLabel = pset.get ("GeantModule","largeant"); -//KENG m_backtrackerLabel = pset.get ("BackTrackerModule","gaushitTruthMatch"); - m_hitMCParticleAssnsLabel = pset.get ("HitMCParticleAssnLabel","gaushitTruthMatch"); - m_shower3dLabel = pset.get ("Shower3DLabel","shrreco3d"); +//KENG m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); +//KENG m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); +//KENG m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + m_generatorLabel = pset.get ("GeneratorLabel","generator"); +//KENG m_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); +//KENG m_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); + m_geantModuleLabel = pset.get ("GeantModule","largeant"); +//KENG m_backtrackerLabel = pset.get ("BackTrackerModule","gaushitTruthMatch"); + m_hitMCParticleAssnsLabel = pset.get ("HitMCParticleAssnLabel","gaushitTruthMatch"); + m_shower3dLabel = pset.get ("Shower3DLabel","shrreco3d"); @@ -114,12 +114,12 @@ namespace single_photon // m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); //CRT related variables, should run only for RUN3+ enabled - m_runCRT = pset.get("runCRT",false); - m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); - m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); - m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); - m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_runCRT = pset.get("runCRT",false); + m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); + m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl // m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); //Some track calorimetry parameters @@ -129,13 +129,13 @@ namespace single_photon m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); //Some shower calorimetry parameters - m_work_function = pset.get("work_function"); - m_recombination_factor = pset.get("recombination_factor"); - m_gain_mc = pset.get>("gain_mc"); - m_gain_data = pset.get>("gain_data"); - m_wire_spacing = pset.get("wire_spacing"); - m_width_dqdx_box = pset.get("width_box"); - m_length_dqdx_box = pset.get("length_box"); + m_work_function = pset.get("work_function"); + m_recombination_factor = pset.get("recombination_factor"); + m_gain_mc = pset.get>("gain_mc"); + m_gain_data = pset.get>("gain_data"); + m_wire_spacing = pset.get("wire_spacing"); + m_width_dqdx_box = pset.get("width_box"); + m_length_dqdx_box = pset.get("length_box"); m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); //A seperate mode to run over AllPFPs and not just slice particles @@ -145,19 +145,19 @@ namespace single_photon //Some paramaters for counting protons & photons m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); - m_max_conv_dist = pset.get("convention_distance_cutoff", 999); + m_max_conv_dist = pset.get("convention_distance_cutoff", 999); m_mass_pi0_mev = 139.57; //SEAviwer Settings for shower clustering and proton stub finding //Have two sets: //Base SEAview is for Second Shower Veto - m_runSEAview = pset.get("runSEAviewShower", false); + m_runSEAview = pset.get("runSEAviewShower", false); m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); - m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); + m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); - m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); + m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); m_SEAviewNumRecoShower= pset.get("SEAviewShowerNumRecoShower", -1); m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); @@ -194,7 +194,7 @@ namespace single_photon exit(0); } } - std::cout<<"SinglePhoton::"<<__FUNCTION__<<" finishes ------------------------------"<()->DataFor(evt);//it is detinfo::DetectorClocksData - auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData - std::cout<<"SinglePhoton::"<<__FUNCTION__<<" a new event ------------------------------"<()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData + std::cout<<"SinglePhoton::"<<__FUNCTION__<<" a new event ------------------------------"<ClearMeta(); @@ -226,15 +226,8 @@ namespace single_photon this->ClearGeant4Branches(); this->ClearSlices(); - - //Some event based properties - m_subrun_counts++; - m_number_of_events++; - m_run_number = evt.run(); - m_subrun_number = evt.subRun(); - m_event_number = evt.id().event(); - - + Output_EventMeta( evt ); + //if module is run in selected-event mode, and current event is not in the list, skip it if(m_runSelectedEvent && !IsEventInList(m_run_number, m_subrun_number, m_event_number)){ std::cout << "SinglePhoton::analyze()\t||\t event " << m_run_number << "/" << m_subrun_number << "/" << m_event_number << " is not in the list, skip it" << std::endl; @@ -247,45 +240,20 @@ namespace single_photon m_Cryostat = ID.Cryostat; m_TPC = ID.TPC; + //use this in calculating dQdx _time2cm = sampling_rate(detClocks) / 1000.0 * theDetector.DriftVelocity( theDetector.Efield(), theDetector.Temperature() );//found in ProtoShowerPandora_tool.cc //******************************Setup*****************Setup**************************************/ - // OK in this section we will get a bunch of stuff we need later, general associations and maps. These are either from pandora helper stuff or from direct associations. - // Make sure under the hood you understand this! - // ------------------------ - // The basic idea is that here we get every possible vector of data products we might need, along with all maps. e.g - // tracks->pfparticles->hits - // tracks->pfparticles->spacepoints ..etc.. - // And then later we just write pseudo-independant code assuming you have every objecets you want (see analyze_Tracks.h) and assume you have access to everything. - //TODO: Think about making these class members, we can access them in the pseudo-indepenant code without passing messy maps. + //Use a new PandoraPFParticle class! + //Each class has a core PFParticle member and other associated recob objects; - // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. - art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); - std::vector> hitVector; - art::fill_ptr_vector(hitVector,hitHandle); - - - //Lets do "THE EXACT SAME STUFF" for Optical Flashes - art::ValidHandle> const & flashHandle = evt.getValidHandle>(m_flashLabel); - std::vector> flashVector; - art::fill_ptr_vector(flashVector,flashHandle); - //tracks - art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); - std::vector> trackVector; - art::fill_ptr_vector(trackVector,trackHandle); - - //BadChannels// Fill later - //CHECK -// art::Handle > badChannelHandle; -// std::vector badChannelVector; -// if(evt.getByLabel(m_badChannelProducer, m_badChannelLabel, badChannelHandle)){ -// badChannelVector = *(badChannelHandle); -// } +// std::vector> trackVector; +// art::fill_ptr_vector(trackVector,trackHandle); //Collect the PFParticles from the event. This is the core! - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); std::vector> pfParticleVector; art::fill_ptr_vector(pfParticleVector,pfParticleHandle); //So a cross check @@ -302,9 +270,8 @@ namespace single_photon // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; // typedef std::map< size_t, art::Ptr> // Produce a map of the PFParticle IDs for fast navigation through the hierarchy - PFParticleIdMap pfParticleMap; - this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); - +// PFParticleIdMap pfParticleMap; +// this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); //And some verticies. @@ -323,49 +290,15 @@ namespace single_photon //------- 3D showers art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); - std::map, art::Ptr> pfParticlesToShowerReco3DMap;//CHECK, 3d shower object is not something stand alone; maybe hidden within some of the pandorSCEShower in SBND? -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// auto pfp = pfParticleVector[i]; -// if(!showerreco3D_per_pfparticle.at(pfp.key()).isNull()){ -// pfParticlesToShowerReco3DMap[pfp] = showerreco3D_per_pfparticle.at(pfp.key()); -// } -// -// } - //---------Kalman Track Showers -//CHECK art::FindOneP showerKalman_per_pfparticle(pfParticleHandle, evt, m_showerKalmanLabel); - //CHECK this label is not available in sbnd? use an alternative now; -// std::cout<<"Getting Kalman label "<, art::Ptr> pfParticlesToShowerKalmanMap; -// for(size_t i=0; i< pfParticleVector.size(); ++i){ -// auto pfp = pfParticleVector[i]; -// if(!showerKalman_per_pfparticle.at(pfp.key()).isNull()){ -// pfParticlesToShowerKalmanMap[pfp] =showerKalman_per_pfparticle.at(pfp.key()); -// } -// } - - //----- kalmon Cali -//CHECK art::ValidHandle> const & kalmanTrackHandle = evt.getValidHandle>(m_showerKalmanLabel); -// std::vector> kalmanTrackVector; -// art::fill_ptr_vector(kalmanTrackVector,kalmanTrackHandle); -// -// art::FindManyP cali_per_kalmantrack(kalmanTrackHandle, evt, m_showerKalmanCaloLabel); -// std::map,std::vector>> kalmanTrackToCaloMap; -// for(size_t i=0; i< kalmanTrackVector.size(); ++i){ -// auto trk = kalmanTrackVector[i]; -// if(cali_per_kalmantrack.at(trk.key()).size()!=0){ -// kalmanTrackToCaloMap[trk] =cali_per_kalmantrack.at(trk.key()); -// } -// } - // Test ground for some slice stuff, dont have it run automatically, ignore for now, mark if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); - - //PFPartciles -->Showers/Tracks + + //PFPartciles -->Showers/Tracks art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); - //Assign Cluster here; + //Assign Cluster here; art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); @@ -375,30 +308,30 @@ namespace single_photon pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); } - //CHECK, try the new class, Keng + //try the new class, Keng - std::vector allPPFParticles; - for(size_t index=0; index< pfParticleVector.size(); ++index){ - auto pfp = pfParticleVector[index]; - int temp_key = pfp.key(); + std::vector allPPFParticles; + for(size_t index=0; index< pfParticleVector.size(); ++index){ + auto pfp = pfParticleVector[index]; + int temp_key = pfp.key(); - PandoraPFParticle temp_pf( - pfp, - pfPartToMetadataAssoc.at(temp_key), - vertices_per_pfparticle.at(temp_key), - clusters_per_pfparticle.at(temp_key), - pfPartToShowerAssoc.at(temp_key), - pfPartToTrackAssoc.at(temp_key), - hits_per_cluster - ); + PandoraPFParticle temp_pf( + pfp, + pfPartToMetadataAssoc.at(temp_key), + vertices_per_pfparticle.at(temp_key), + clusters_per_pfparticle.at(temp_key), + pfPartToShowerAssoc.at(temp_key), + pfPartToTrackAssoc.at(temp_key), + hits_per_cluster + ); - allPPFParticles.push_back(temp_pf); + allPPFParticles.push_back(temp_pf); - } - PPFP_FindAncestor(allPPFParticles); + } + PPFP_FindAncestor(allPPFParticles); - //Add slices & hits info. + //Add slices & hits info. //Slices art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); std::vector> sliceVector; @@ -413,99 +346,24 @@ namespace single_photon std::map> > sliceIDToPFParticlesMap; for(size_t i=0; i< sliceVector.size(); ++i){ auto slice = sliceVector[i]; - PPFP_FindSliceIDandHits(allPPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); + PPFP_FindSliceIDandHits(allPPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); } - //Mark all Pandora neutrino slices as neutrino slices and assign the highes neutrino score. - pfp_w_bestnuID = DefineNuSlice(allPPFParticles); - std::cout<<"\nFinish preparing PandoraPFParticles at Line "<<__LINE__<<" CHECK! Now we have "<, std::vector> > sliceToHitsMap; std::map> > sliceIDToHitsMap; for(size_t i=0; i< sliceVector.size(); ++i){ - - //std::cout<<"CHECK "<<__LINE__<ID()<<" to hits!"<ID()] = hits_per_slice.at(slice.key()); } -// size_t pfp_w_bestnuID = 0; -//// int slice_w_bestnuID = 0; -// if(true){ -// std::cout<<"SliceTest: there are "< spacers2 = Printer_header({ -// "Slice#", -// "nu?", -// "#pfPart.", -// "nu_score ", -// "best_at", -// "#primary", -// "prim_pdg"}); -// -// double ref_nuscore = 0; -// for(size_t s_index =0; s_index nu_scores; -// bool isSelectedSlice = false; -// int primaries_num = 0; -// int primary_pdg = 0; -// -// for(auto &pfp: pfps){//loop through PFparticles of a slice -// std::vector> metadatas = pfParticleToMetadataMap[pfp]; -// for(auto &meta: metadatas){ -// std::map propertiesmap = meta->GetPropertiesMap(); -// //for each of the things in the list -// if(propertiesmap.count("NuScore")==1){ -// double tmp_nuscore = propertiesmap["NuScore"]; -// nu_scores.push_back(tmp_nuscore); -// if( tmp_nuscore > ref_nuscore){ -// ref_nuscore = tmp_nuscore; -// pfp_w_bestnuID = pfp->Self(); -//// slice_w_bestnuID = s_index; -// } -// } -// if(propertiesmap.count("IsNeutrino")==1){ -// isSelectedSlice = true; -// } -// } -// -// if (pfp->IsPrimary()) { -// primaries_num++; -// primary_pdg = (pfp->PdgCode()); -// } -// } -// -// if(nu_scores.size()>0){ -// double mean = std::accumulate(nu_scores.begin(), nu_scores.end(), 0.0)/(double)nu_scores.size(); -// if(mean!=nu_scores.front()){ -// std::cout<<"ERROR! Somehow the pfp's in this slice have different nu-scores? IMpossible."<0)?nu_scores.front():-9), -// std::to_string(pfp_w_bestnuID), -// std::to_string(primaries_num), -// std::to_string(primary_pdg) -// }, spacers2); -// } -// }// End test of slice metadata - - // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: //-------------------------------- @@ -514,13 +372,20 @@ namespace single_photon // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis std::vector< art::Ptr > nuParticles; std::vector< art::Ptr > crParticles; - this->GetFinalStatePFParticleVectors(pfParticleMap, pfParticlesToVerticesMap, crParticles, nuParticles, pfp_w_bestnuID); - // LOOP over pfParticleMap, and fill in crParticles/nuParticles here? + for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ + PandoraPFParticle* temp_pf = &allPPFParticles[jndex]; + int temp_id = temp_pf->get_AncestorID();//indentify the jndex for the ancestor PPFParticle + PandoraPFParticle* temp_ancestor_ppfp = PPFP_GetPPFPFromPFID( allPPFParticles, temp_id); + + if ( temp_ancestor_ppfp->get_IsNeutrino() || m_run_all_pfps){ + nuParticles.push_back( temp_pf->pPFParticle); +// std::cout<<"Get nuParticles from pfpID "<get_PFParticleID()<pPFParticle); + } + } - //if not running over neutrino slice only, use all pfp's in event - if (m_run_all_pfps ==true) nuParticles = pfParticleVector; - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"<, std::vector> > cr_pfParticleToHitsMap; //first, collect all daughters of primary cosmic - int num_primary_cosmic_particle = crParticles.size(); - for(int i =0; i!=num_primary_cosmic_particle; ++i){ - auto& pParticle = crParticles[i]; - for(const size_t daughterId : pParticle->Daughters()) - { - if (pfParticleMap.find(daughterId) == pfParticleMap.end()) - throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; - - crParticles.push_back(pfParticleMap.at(daughterId)); - } - } +// int num_primary_cosmic_particle = crParticles.size(); +// for(int i =0; i!=num_primary_cosmic_particle; ++i){ +// auto& pParticle = crParticles[i]; +// for(const size_t daughterId : pParticle->Daughters()) +// { +// if (pfParticleMap.find(daughterId) == pfParticleMap.end()) +// throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; +// +// crParticles.push_back(pfParticleMap.at(daughterId)); +// } +// } //second, build PFP to hits map for cosmic-related PFParticles for(size_t i=0; i< crParticles.size(); ++i){ auto pfp = crParticles[i]; cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); } - //CHECK why two for loops for the same vector? + for(size_t i=0; i< crParticles.size(); ++i){ auto pfp = crParticles[i]; @@ -633,7 +498,7 @@ namespace single_photon //std::cout<<"saving a total of "<Self()< , art::Ptr> trackToNuPFParticleMap; std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; - //CHECK so far so good, but here? if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); +// this->CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); //Track Calorimetry. Bit odd here but bear with me, good to match and fill here - //Keng, use pandoraCalo to get the correct Calorimetry; + + //tracks + art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); + //Keng, use pandoraCalo to get the correct Calorimetry; art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); // std::map, std::vector> > trackToCalorimetryMap; //So a cross check @@ -678,13 +545,13 @@ namespace single_photon //size_t calo_size = calo_per_track.at(tracks[i].key()).size(); //std::cout<<"Track Calo from producer: "<set_Calorimetries(calo_per_track.at(tracks[i].key())); + PandoraPFParticle * temp_ppfp = PPFP_GetPPFPFromTrack(allPPFParticles, tracks[i]); + temp_ppfp->set_Calorimetries(calo_per_track.at(tracks[i].key())); - if(m_use_PID_algorithms){ - temp_ppfp->set_HasPID(true); - temp_ppfp->set_ParticleID(pid_per_track.at(tracks[i].key())); - } + if(m_use_PID_algorithms){ + temp_ppfp->set_HasPID(true); + temp_ppfp->set_ParticleID(pid_per_track.at(tracks[i].key())); + } } @@ -742,64 +609,31 @@ namespace single_photon //**********************************************************************************************/ //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). -//CHECK // if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); // badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); - //*******************************Slices***************************************************************/ //*******************************Slices***************************************************************/ //these are all filled in analyze slice - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind +// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise - std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's +// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's std::map,bool> PFPToNuSliceMap; std::map,double> PFPToTrackScoreMap; std::map sliceIdToNumPFPsMap; if(m_is_verbose) std::cout<<"\nSinglePhoton::AnalyzeSlice()\t||\t Starting"<AnalyzeSlices(pfParticleToMetadataMap, pfParticleMap, primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap, PFPToSliceIdMap, PFPToNuSliceMap, PFPToTrackScoreMap); - std::cout<<"Finish AnalyzeSlices.\n"<Self()<<"th pfp in nuslice w. Pdgcode "<PdgCode()<> pfp_vec = pair.second; -// int slice_id = pair.first; -// //if (slice_vec[0]->Slice() != PFPToSliceIdMap[pfp] ) -// for(auto pfp: pfp_vec){ -// if (slice_id != PFPToSliceIdMap[pfp] && PFPToSliceIdMap[pfp]>=0){ -// std::cout<<"sliceIDToPFParticlesMap[slice->ID()] for pfp "<Self()<<" is slice "<< slice_id<< "but PFPToSliceIdMap[pfp] = "<> const & flashHandle = evt.getValidHandle>(m_flashLabel); + std::vector> flashVector; + art::fill_ptr_vector(flashVector,flashHandle); std::map, std::vector< art::Ptr>> crtvetoToFlashMap; @@ -811,25 +645,23 @@ namespace single_photon } art::Handle> crthit_h; //only filled when there are hits, otherwise empty - //CHECK //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; double evt_timeGPS_nsec = -999 ; - if(m_runCRT){ - //evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + if(m_runCRT){ + //evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); - // raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); - //Keng, time() is set to the trigger time. - art::Timestamp evtTimeGPS = evt.time();//CHECK = my_DAQHeader.gps_time(); - evt_timeGPS_nsec = evtTimeGPS.timeLow(); + // raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); + //Keng, time() is set to the trigger time. + art::Timestamp evtTimeGPS = evt.time(); + evt_timeGPS_nsec = evtTimeGPS.timeLow(); - evt.getByLabel(m_CRTHitProducer, crthit_h); - std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"<AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); @@ -859,14 +691,14 @@ namespace single_photon //found in analyze_Tracks.h this->AnalyzeTracks( - allPPFParticles, - tracks, -// trackToNuPFParticleMap, pfParticleToHitsMap, - pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap -// PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap - ); + allPPFParticles, + tracks, +// trackToNuPFParticleMap, pfParticleToHitsMap, + pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap +// PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap + ); this->AnalyzeTrackCalo(tracks, allPPFParticles); - + //Run over PID? if(m_use_PID_algorithms) this->CollectPID(tracks, allPPFParticles); @@ -879,41 +711,40 @@ namespace single_photon //found in analyze_Showers.h this->AnalyzeShowers(allPPFParticles, showers, - clusterToHitsMap, - pfParticlesToShowerReco3DMap, - trigger_offset(detClocks), - theDetector); + clusterToHitsMap, + trigger_offset(detClocks), + theDetector); std::cout<<"\nSinglePhoton::analyze \t||\t Finish Shower Analysis "< spacers = Printer_header({" pfpID", " Parent ", "Vertex(x, "," y, ",", z )", "slice "," nu_score"," trk_score "," prim? "," nu? "," nuSlice?"," cos? "," S# "," T# "}); - for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ - PandoraPFParticle temp_pf = allPPFParticles[jndex]; - art::Ptr pfp = temp_pf.pPFParticle; - - Printer_content( - {std::to_string(pfp->Self()), - std::to_string(pfp->Parent()) , - std::to_string(temp_pf.get_Vertex_pos()[0]), - std::to_string(temp_pf.get_Vertex_pos()[1]), - std::to_string(temp_pf.get_Vertex_pos()[2]), - std::to_string(temp_pf.get_SliceID()), - std::to_string(temp_pf.get_NuScore()), - std::to_string(temp_pf.get_TrackScore()), - (pfp->IsPrimary())? "T":" ", - (temp_pf.get_IsNeutrino() )? "T":" ", - (temp_pf.get_IsNuSlice() )? "T":" ", - (temp_pf.get_IsClearCosmic() )? "T":" ", - (temp_pf.get_HasShower() >0)? "1":" ", - (temp_pf.get_HasTrack() >0)? "1":" " - }, spacers); - - } + std::cout< spacers = Printer_header({" pfpID", " Parent ", "Vertex(x, "," y, ",", z )", "slice "," nu_score"," trk_score "," prim? "," nu? "," nuSlice?"," cos? "," S# "," T# "}); + for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ + PandoraPFParticle temp_pf = allPPFParticles[jndex]; + art::Ptr pfp = temp_pf.pPFParticle; + + Printer_content( + {std::to_string(pfp->Self()), + std::to_string(pfp->Parent()) , + std::to_string(temp_pf.get_Vertex_pos()[0]), + std::to_string(temp_pf.get_Vertex_pos()[1]), + std::to_string(temp_pf.get_Vertex_pos()[2]), + std::to_string(temp_pf.get_SliceID()), + std::to_string(temp_pf.get_NuScore()), + std::to_string(temp_pf.get_TrackScore()), + (pfp->IsPrimary())? "T":" ", + (temp_pf.get_IsNeutrino() )? "T":" ", + (temp_pf.get_IsNuSlice() )? "T":" ", + (temp_pf.get_IsClearCosmic() )? "T":" ", + (temp_pf.get_HasShower() >0)? "1":" ", + (temp_pf.get_HasTrack() >0)? "1":" " + }, spacers); + + } //KENG no KalmanShowers in SBND? -// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); +// this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); //Some misc things thrown in here rather than in a proper helper function. TODO. fix @@ -944,7 +775,11 @@ namespace single_photon } //******************************* MCTruth **************************************************************/ - //******************************* MCTruth **************************************************************/ + // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. + art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); + std::vector> hitVector; + art::fill_ptr_vector(hitVector,hitHandle); + //Grab the backtracker info for MCTruth Matching art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); @@ -956,15 +791,15 @@ namespace single_photon if(!m_is_data){ if(!m_is_textgen){ - std::vector> gTruthVector; - std::cout<<"\nCHECK Get some GTruth info."<> gTruthVector; + std::cout<<"\n Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); art::fill_ptr_vector(gTruthVector,gTruthHandle); if(m_is_verbose){ for(size_t p=0; p< gTruthVector.size();p++) std::cout<AnalyzeGeant4(mcParticleVector); @@ -1013,24 +848,24 @@ namespace single_photon std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching( - allPPFParticles, - showers, - showerToMCParticleMap, - mcparticles_per_hit, - matchedMCParticleVector, - MCParticleToTrackIdMap); + allPPFParticles, + showers, + showerToMCParticleMap, + mcparticles_per_hit, + matchedMCParticleVector, + MCParticleToTrackIdMap); //photoNuclearTesting(matchedMCParticleVector); std::cout<<"\nSinglePhoton\t||\tStarting RecoMCTracks "<RecoMCTracks( - allPPFParticles, - tracks, - trackToMCParticleMap, - MCParticleToMCTruthMap, - mcParticleVector, - MCParticleToTrackIdMap, - trk_overlay_vec); + allPPFParticles, + tracks, + trackToMCParticleMap, + MCParticleToMCTruthMap, + mcParticleVector, + MCParticleToTrackIdMap, + trk_overlay_vec); std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeMCTruths"<AnalyzeMCTruths(mcTruthVector, mcParticleVector); @@ -1039,18 +874,14 @@ namespace single_photon if(!m_is_textgen){// if Text is in the generator label, skip it. wont contain any //This is important for rebuilding MCFlux and GTruth to do eventweight - std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeEventWeight"<AnalyzeEventWeight(evt); - //added since last time? - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeRecoMCSlices"<AnalyzeRecoMCSlices(m_truthmatching_signaldef,allPPFParticles, MCParticleToTrackIdMap, showerToMCParticleMap, trackToMCParticleMap); - - std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeRecoMCSlices"<AnalyzeRecoMCSlices(m_truthmatching_signaldef,allPPFParticles, MCParticleToTrackIdMap, showerToNuPFParticleMap , allPFPSliceIdVec, showerToMCParticleMap, trackToNuPFParticleMap, trackToMCParticleMap, PFPToSliceIdMap); - - std::cout<<"\nSinglePhoton\t||\tFinish AnalyzeRecoMCSlices"<IsolationStudy(allPPFParticles, tracks, showers, theDetector); + this->IsolationStudy(allPPFParticles, tracks, showers, theDetector); std::cout<<"\nSinglePhoton::analyze \t||\t Finish IsolationStudy "<IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); @@ -1152,17 +983,18 @@ namespace single_photon std::cout << "----------------- Stub clustering --------------------------- " << std::endl; std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - if( !m_run_pi0_filter && - m_runSEAviewStub && - (m_SEAviewStubNumRecoShower== -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && - (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ + if( !m_run_pi0_filter && + m_runSEAviewStub && + (m_SEAviewStubNumRecoShower== -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && + (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ // grab all hits in the slice of the reco shower art::Ptr p_shr = showers.front(); - art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(allPPFParticles, p_shr); + art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - int p_sliceid = PFPToSliceIdMap[p_pfp]; + int p_sliceid = ppfp->get_SliceID();//PFPToSliceIdMap[p_pfp]; auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); @@ -1297,7 +1129,7 @@ namespace single_photon m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); }else{ - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); m_trackstub_candidate_matched.push_back(ssmatched[0]); m_trackstub_candidate_pdg.push_back(ssmatched[1]); m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); @@ -1332,18 +1164,19 @@ namespace single_photon std::cout << "------------- Shower clustering --------------------" << std::endl; std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - if(!m_run_pi0_filter && - m_runSEAview && - (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && - (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ - std::cout<<"CHECK Run SEAView "< p_shr = showers.front(); - art::Ptr p_pfp = showerToNuPFParticleMap[p_shr]; + + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(allPPFParticles, p_shr); + art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - int p_sliceid = PFPToSliceIdMap[p_pfp]; + int p_sliceid = ppfp->get_SliceID();// PFPToSliceIdMap[p_pfp]; auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); @@ -1466,7 +1299,7 @@ namespace single_photon m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); }else{ - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, pfParticleMap, MCParticleToTrackIdMap); + auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); m_sss_candidate_matched.push_back(ssmatched[0]); m_sss_candidate_pdg.push_back(ssmatched[1]); m_sss_candidate_parent_pdg.push_back(ssmatched[2]); @@ -1522,82 +1355,8 @@ namespace single_photon } - // ################################################### Some info for Slice outside of Neutrino Slices ######################################################### - - size_t n_neutrino_slice=0; - size_t n_neutrino_candidate_pfp_id=0; - - for(size_t s=0; s< sliceVector.size(); s++){ - auto slice = sliceVector[s]; - std::vector> pfps = sliceToPFParticlesMap[slice]; - - int primaries=0; - int n_dau=0; - int found = 0; - //std::cout<<"Starting a loop over "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<IsPrimary()) continue; - // Check if this particle is identified as the neutrino - const int pdg(pfp->PdgCode()); - //CHECK the correct pandora library, see https://internal.dunescience.org/doxygen/dir_7b958f4de002ca6b0ce84ad1a283e2af.html - //const bool isNeutrino(std::abs(pdg) == pandora::NU_E || std::abs(pdg) == pandora::NU_MU || std::abs(pdg) == pandora::NU_TAU); - const bool isNeutrino(std::abs(pdg) == 12 || std::abs(pdg) == 14 || std::abs(pdg) == 16); - primaries++; - // If it is, lets get the vertex position - if(isNeutrino){ - found++; - //Ok this is neutrino candidate. - - std::cout<<"Found Neutrinoi Slice "<Self()<<" Primary: "<IsPrimary()<<" PDG "<PdgCode()<<" NDau: "<NumDaughters()<<" Parent: "<Parent()<Self(); - for (const size_t daughterId : pfp->Daughters()){ - n_dau++; - auto dau = pfParticleMap[daughterId]; - std::cout<<"---> gen1 --->"<PdgCode()<<" NumDau: "<NumDaughters()<Daughters()){ - while(tmp->NumDaughters()>0 && n_gen < 4){ - for(int k=0; k< n_gen; k++){ - std::cout<<"---> "; - } - auto grandau = pfParticleMap[granDaughterId]; - std::cout<<"gen"<"<PdgCode()<<" NumDau: "<NumDaughters()<=4) break; - } - - } - std::cout<<"************ Finished hierarcy **************"<ID()<<" key "< n_dau+1){ - std::cout<<"We're Missing Something!."<1){ - throw cet::exception("DetachedVertexFinder") << " This event contains "<< found <<" reconstructed neutrinos! "<>>> CHECK "<<" "<<__FUNCTION__<<" at line"<<__LINE__< tfs;//output ROOT @@ -1654,8 +1412,7 @@ namespace single_photon m_number_of_events_in_subrun=0; - this->CreateMetaBranches(); - //create branches as found in individual analyze_XXX.h + this->CreateMetaBranches(); this->CreateIsolationBranches(); this->CreateSecondShowerBranches(); this->CreateSecondShowerBranches3D(); @@ -1669,53 +1426,6 @@ namespace single_photon this->CreateSliceBranches(); this->CreateGeant4Branches(); -//CHECK, remove bad chanel related varaibles? & ub dependent path - //hardcode some info (TODO change) -// std::string gpvm_location ="/pnfs/uboone/resilient/users/markross/tars/"; -// -// //Get the info for length->energy conversion from PSTAR database. -// TFile *fileconv; -// struct stat buffer; -// -// //some useful input data -// if(!m_run_pi0_filter){ -// if(stat("proton_conversion.root", &buffer) == 0){ -// fileconv = new TFile("proton_conversion.root", "read"); -// }else{ -// fileconv = new TFile((gpvm_location+"proton_conversion.root").c_str(), "read"); -// } -// -// proton_length2energy_tgraph = *(TGraph*)fileconv->Get("Graph"); -// proton_length2energy_tgraph.GetMean(); -// fileconv->Close(); -// } -// -// //bad channels -// std::string bad_channel_file = "MCC9_channel_list.txt"; -// -// if(!m_run_pi0_filter){ -// if(stat(bad_channel_file.c_str(), &buffer) != 0){ -// bad_channel_file = gpvm_location+bad_channel_file; -// } -// -// std::ifstream bc_file(bad_channel_file); -// -// if (bc_file.is_open()) -// { -// std::string line; -// while ( getline (bc_file,line) ) -// { -// std::vector res; -// std::istringstream iss(line); -// for(std::string s; iss >> s; ) -// res.push_back( std::stof(s)); -// -// std::pair t(res[0],res[1]); -// bad_channel_list_fixed_mcc9.push_back(t); -// } -// bc_file.close(); -// } -// } //------------------- List of Selected Events to run -------- if(m_runSelectedEvent){ @@ -1750,7 +1460,6 @@ namespace single_photon } } } - std::cout<<">>>> CHECK "<<__FUNCTION__<<" at line"<<__LINE__< input_PFParticle, - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, - std::vector< art::Ptr > input_Vertex, - std::vector< art::Ptr > input_Clusters, - std::vector< art::Ptr > input_Showers, - std::vector< art::Ptr > input_Tracks, - art::FindManyP input_Hits - ) - : - pPFParticle(input_PFParticle), - pMetaData(input_MetaData), - pVertex(input_Vertex), - pClusters(input_Clusters) - { - pPFParticleID = pPFParticle->Self(); - pPdgCode = pPFParticle->PdgCode(); - - //Get recob::Shower/Track - const unsigned int nShowers(input_Showers.size()); - const unsigned int nTracks(input_Tracks.size()); - if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; - - pHasShower = nShowers; - pHasTrack = nTracks; - if(pHasShower == 1) pShower=input_Showers.front(); - if(pHasTrack == 1) pTrack=input_Tracks.front(); - - - //fill the vertex info. - if (!pVertex.empty()){ - const art::Ptr vertex = * (pVertex.begin()); - vertex->XYZ(pVertex_pos); - } - - //fill pPFPHits from each clusters; - for(size_t index=0; index< pClusters.size(); ++index){ - auto cluster = pClusters[index]; - std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); - pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); - } - - //get ancestor for a 1st generation PFParticle - if(pPFParticle->IsPrimary()){ - pAncestor = pPFParticle; - pAncestorID = -1; - } - - //fill in some booleans - for(auto &meta: pMetaData){ - std::map propertiesmap = meta->GetPropertiesMap(); - if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; - if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; - if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; - if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; - } - - }; - - art::Ptr< recob::PFParticle > pPFParticle;//d - art::Ptr< recob::Shower> pShower;//d with 0 or 1 element - art::Ptr< recob::Track > pTrack;//d with 0 or 1 element - art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() - art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() - - art::Ptr pParticleID;//d for track only; - art::Ptr< simb::MCTruth > pMCTruth; - - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d - std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pSliceHits;//d - std::vector< art::Ptr< recob::Hit > > pPFPHits;//d - std::vector< art::Ptr< recob::Cluster > > pClusters;//d - std::vector> pCalorimetries;//d - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; - std::vector< art::Ptr< simb::MCParticle > > pMCParticles; - - - //set methods - void set_NuScore (const double input_score){ pNuScore = input_score; } -// void set_TrackScore (const double input_score){ pTrackScore = input_score; } - -// void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } -// void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } - void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } - void set_HasPID (const bool input_bool){ pHasPID = input_bool; } - -// void set_HasShower (const int input_number){ pHasShower = input_number; } -// void set_HasTrack (const int input_number){ pHasTrack = input_number; } -// void set_PdgCode (const int input_number){ pPdgCode = input_number; } -// void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } - void set_AncestorID (const int input_number){ pAncestorID = input_number; } - void set_SliceID (const int input_number){ pSliceID = input_number; } - - void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } - void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } - - //call method - const art::Ptr get_ParticleID() const; - const std::vector> get_Calorimetries() const; - - - const double* get_Vertex_pos() const; - - const double get_NuScore() const; - const double get_TrackScore () const; - - const bool get_IsNeutrino () const; - const bool get_IsClearCosmic () const; - const bool get_IsNuSlice () const; - const bool get_HasPID () const; - - const int get_HasShower () const; - const int get_HasTrack () const; - const int get_PdgCode() const; - const int get_PFParticleID() const; - const int get_AncestorID() const; - const int get_SliceID () const; - }; - - inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } - inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } - - inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } - - inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } - inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } - - inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } - inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } - inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } - inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } - - inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } - inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } - inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } - inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } - inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } - inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } - - - //this is for second_shower_search.h + //Create a class based on PFParticle, connected to other Pandora objects + //CHECK, blending this to the code; not active yet; + class PandoraPFParticle{ + + private: + double pVertex_pos[3] = {-9999,-9999,-9999};//d + + double pNuScore = -999 ;//d + double pTrackScore = -999;//d + + bool pIsNeutrino = false;//d + bool pIsClearCosmic = false;//d + bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. + bool pHasPID = false;//d + + int pHasShower = 0;//d + int pHasTrack = 0;//d + int pPdgCode = -999;//d + int pPFParticleID = -9;//d + int pAncestorID = -9;//d + int pSliceID = -9;//d + + + public: + //constructor: + PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks, + art::FindManyP input_Hits + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) + { + pPFParticleID = pPFParticle->Self(); + pPdgCode = pPFParticle->PdgCode(); + + //Get recob::Shower/Track + const unsigned int nShowers(input_Showers.size()); + const unsigned int nTracks(input_Tracks.size()); + if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; + + pHasShower = nShowers; + pHasTrack = nTracks; + if(pHasShower == 1) pShower=input_Showers.front(); + if(pHasTrack == 1) pTrack=input_Tracks.front(); + + + //fill the vertex info. + if (!pVertex.empty()){ + const art::Ptr vertex = * (pVertex.begin()); + vertex->XYZ(pVertex_pos); + } + + //fill pPFPHits from each clusters; + for(size_t index=0; index< pClusters.size(); ++index){ + auto cluster = pClusters[index]; + std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); + pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); + } + + //get ancestor for a 1st generation PFParticle + if(pPFParticle->IsPrimary()){ + pAncestor = pPFParticle; + pAncestorID = -1; + } + + //fill in some booleans + for(auto &meta: pMetaData){ + std::map propertiesmap = meta->GetPropertiesMap(); + if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; + if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; + if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; + if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; + } + + }; + + art::Ptr< recob::PFParticle > pPFParticle;//d + art::Ptr< recob::Shower> pShower;//d with 0 or 1 element + art::Ptr< recob::Track > pTrack;//d with 0 or 1 element + art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + + art::Ptr pParticleID;//d for track only; + art::Ptr< simb::MCTruth > pMCTruth; + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d + std::vector< art::Ptr< recob::Vertex > > pVertex;//d + std::vector< art::Ptr< recob::Hit > > pSliceHits;//d + std::vector< art::Ptr< recob::Hit > > pPFPHits;//d + std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector> pCalorimetries;//d + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; + std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + + + //set methods + void set_NuScore (const double input_score){ pNuScore = input_score; } +// void set_TrackScore (const double input_score){ pTrackScore = input_score; } + +// void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } +// void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } + void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } + void set_HasPID (const bool input_bool){ pHasPID = input_bool; } + +// void set_HasShower (const int input_number){ pHasShower = input_number; } +// void set_HasTrack (const int input_number){ pHasTrack = input_number; } +// void set_PdgCode (const int input_number){ pPdgCode = input_number; } +// void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } + void set_AncestorID (const int input_number){ pAncestorID = input_number; } + void set_SliceID (const int input_number){ pSliceID = input_number; } + + void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } + void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } + + //call method + const art::Ptr get_ParticleID() const; + const std::vector> get_Calorimetries() const; + + + const double* get_Vertex_pos() const; + + const double get_NuScore() const; + const double get_TrackScore () const; + + const bool get_IsNeutrino () const; + const bool get_IsClearCosmic () const; + const bool get_IsNuSlice () const; + const bool get_HasPID () const; + + const int get_HasShower () const; + const int get_HasTrack () const; + const int get_PdgCode() const; + const int get_PFParticleID() const; + const int get_AncestorID() const; + const int get_SliceID () const; + }; + + inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } + inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } + + inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } + + inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } + inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } + + inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } + inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } + inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } + inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } + + inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } + inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } + inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } + inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } + inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } + inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } + + + //this is for second_shower_search.h struct sss_score{ int plane; int cluster_label; @@ -318,15 +318,15 @@ namespace single_photon sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; }; //end of class sss_score - //this works with SEAview/SEAviewer.h + //this works with SEAview/SEAviewer.h class cluster { public: cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) - :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - std::cout<<"\n\n\nCHECK !! Do we need this?"< > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - /** - * @brief: get vertex for particle - * @param: particle: a primary neutrino - */ - void GetVertex(const lar_pandora::PFParticlesToVertices & particlestoVertices, const art::Ptr & particle ); - void Output_PFParticleInfo( std::vector all_PPFPs); + + //OUTPUT stuffs + void Output_EventMeta( art::Event &evt); + void Output_PFParticleInfo( std::vector all_PPFPs); @@ -484,7 +462,7 @@ namespace single_photon *@brief Calculated the shower energy by looping over all the hits and summing the charge *@param hits - an art pointer of all the hits in a shower * - */ + */ double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ /** @@ -534,8 +512,8 @@ namespace single_photon const art::Ptr& shower, const std::vector> & clusters, std::map, std::vector> > & clusterToHitMap ,int plane, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector); + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector); /** *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) *@param shower_dir - the 3D shower direction @@ -566,7 +544,7 @@ namespace single_photon /* @brief: given indices of clusters, determine if they overlap in time * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters - * candidate_indices provided the indices of clusters of which we'd like to check the overlap + * candidate_indices provided the indices of clusters of which we'd like to check the overlap */ std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); @@ -574,9 +552,9 @@ namespace single_photon /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information * @brief: candidate clusters on different plane that overlap in time tick will be grouped together * @return: return.first -> number of possible matches - * return.second.first -> 2D vector, indices of clusters in every possible match - * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match - */ + * return.second.first -> 2D vector, indices of clusters in every possible match + * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match + */ std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); @@ -603,7 +581,7 @@ namespace single_photon std::vectorSecondShowerMatching(std::vector>& hitz, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< size_t, art::Ptr> & pfParticleIdMap, +// std::map< size_t, art::Ptr> & pfParticleIdMap, std::map< int ,art::Ptr > & MCParticleToTrackIdMap); @@ -628,15 +606,15 @@ namespace single_photon /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ void IsolationStudy( - std::vector all_PPFPs, + std::vector all_PPFPs, const std::vector>& tracks, -// std::map, art::Ptr> & trackToPFParticleMap, +// std::map, art::Ptr> & trackToPFParticleMap, const std::vector>& showers, -// std::map, art::Ptr> & showerToPFParticleMap, +// std::map, art::Ptr> & showerToPFParticleMap, // const std::map, std::vector> > & pfParticleToHitsMap, // const std::map, int> & pfParticleToSliceIDMap, -// const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector); +// const std::map>>& sliceIDToHitsMap, + detinfo::DetectorPropertiesData const & theDetector); @@ -651,13 +629,13 @@ namespace single_photon //---------------- Tracks ---------------------------- /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ void AnalyzeTracks( - std::vector all_PPFPs, - const std::vector>& tracks, -// std::map, art::Ptr> & tracktopfparticlemap, + std::vector all_PPFPs, + const std::vector>& tracks, +// std::map, art::Ptr> & tracktopfparticlemap, // std::map, std::vector>> & pfParticleToHitsMap, std::map, std::vector>> & pfparticletospacepointmap , - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap // std::map,bool> &PFPToClearCosmicMap, // std::map, int>& PFPToSliceIdMap, // std::map,double> &PFPToTrackScoreMap, @@ -671,71 +649,71 @@ namespace single_photon void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); - //(std::map, std::vector>> &trackToCaloMap); + //(std::map, std::vector>> &trackToCaloMap); /* @brief: analyze MCParticle related to recob::Track if it has one * variables starting with 'm_sim_track_' will be updated * */ void RecoMCTracks( - std::vector all_PPFPs, - const std::vector>& tracks, - //std::map,art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - //std::map& sliceIdToNuScoreMap, - //std::map,bool>& PFPToClearCosmicMap, - //std::map, int>& PFPToSliceIdMap, - std::vector& vec); + std::vector all_PPFPs, + const std::vector>& tracks, + //std::map,art::Ptr> & trackToPFParticleMap, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + //std::map& sliceIdToNuScoreMap, + //std::map,bool>& PFPToClearCosmicMap, + //std::map, int>& PFPToSliceIdMap, + std::vector& vec); /* collect information from anab::sParticleIDAlgScores of reco track */ void CollectPID(std::vector> & tracks, std::vector all_PPFPs); - //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); + //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); TGraph proton_length2energy_tgraph; //---------------- Showers ---------------------------- - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - - void AnalyzeShowers( - std::vector all_PPFPs, - const std::vector>& showers, -// std::map,art::Ptr> & showerToPFParticleMap, -// std::map, std::vector>> & pfParticleToHitMap, -// std::map, std::vector> > & pfParticleToClusterMap, - std::map, std::vector> > & clusterToHitMap , -// std::map& sliceIdToNuScoreMap, -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,bool> &PFPToNuSliceMap, -// std::map,double> &PFPToTrackScoreMap, -// PFParticleIdMap &pfParticleMap, - std::map, art::Ptr>& PFPtoShowerReco3DMap, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ); - - void AnalyzeKalmanShowers( - const std::vector>& showers, - std::map,art::Ptr> &showerToPFParticleMap, - std::map,art::Ptr> & pfParticlesToShowerKalmanMap, - std::map,std::vector>>& kalmanTrackToCaloMap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector); + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + + void AnalyzeShowers( + std::vector all_PPFPs, + const std::vector>& showers, +// std::map,art::Ptr> & showerToPFParticleMap, +// std::map, std::vector>> & pfParticleToHitMap, +// std::map, std::vector> > & pfParticleToClusterMap, + std::map, std::vector> > & clusterToHitMap , +// std::map& sliceIdToNuScoreMap, +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,bool> &PFPToNuSliceMap, +// std::map,double> &PFPToTrackScoreMap, +// PFParticleIdMap &pfParticleMap, +// std::map, art::Ptr>& PFPtoShowerReco3DMap, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ); + + void AnalyzeKalmanShowers( + const std::vector>& showers, + std::map,art::Ptr> &showerToPFParticleMap, + std::map,art::Ptr> & pfParticlesToShowerKalmanMap, + std::map,std::vector>>& kalmanTrackToCaloMap, + std::map, std::vector>> & pfParticleToHitMap, + detinfo::DetectorPropertiesData const & theDetector); /** * @brief: match showers to MCParticles * @arguments filled during function execution: - * mcParticleVector: vector of mother particles of showers - * objectToMCParticleMap: map of shower to its mother particle + * mcParticleVector: vector of mother particles of showers + * objectToMCParticleMap: map of shower to its mother particle */ - void showerRecoMCmatching( - std::vector all_PPFPs, - std::vector>& objectVector, + void showerRecoMCmatching( + std::vector all_PPFPs, + std::vector>& objectVector, std::map,art::Ptr>& objectToMCParticleMap, //std::map,art::Ptr>& objectToPFParticleMap, //std::map, std::vector> >& pfParticleToHitsMap, @@ -752,22 +730,22 @@ namespace single_photon /* tranverse through mcParticleVector, and print out infos for photons */ int photoNuclearTesting(std::vector>& mcParticleVector); - //KENG Geometry dimensions; Fiducial volume and SCB (no SCB yet?) - std::vector> fTPCVolumes; - std::vector fActiveVolumes; - double m_tpc_active_XMin; - double m_tpc_active_YMin; - double m_tpc_active_ZMin; - double m_tpc_active_XMax; - double m_tpc_active_YMax; - double m_tpc_active_ZMax; + //KENG Geometry dimensions; Fiducial volume and SCB (no SCB yet?) + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + double m_tpc_active_XMin; + double m_tpc_active_YMin; + double m_tpc_active_ZMin; + double m_tpc_active_XMax; + double m_tpc_active_YMax; + double m_tpc_active_ZMax; int setTPCGeom(); int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ double distToTPCActive(std::vector&vec); - double distToCPA(std::vector&vec); + double distToCPA(std::vector&vec); int distToSCB(double & dist, std::vector &vec); - /* if point in active TPC, returns distance from point to closest TPC wall + /* if point in active TPC, returns distance from point to closest TPC wall * otherwise, returns -999 */ @@ -800,10 +778,10 @@ namespace single_photon // double m_SCB_ZX_Dw_x2_array; - //Fiducial stuff? + //Fiducial stuff? // int isInSCB(std::vector&); /* if point is inside SCB */ // int isInSCB(double cut,std::vector&); - /* calc the minimum distance from point to the SC boundary,save to dist. + /* calc the minimum distance from point to the SC boundary,save to dist. * return value (0, or 1) indicates whether the point is in SCB */ //---------------- MCTruths ---------------------------- @@ -901,15 +879,15 @@ namespace single_photon * to determine how many eligible tracks and showers there are in the event */ void AnalyzeRecoMCSlices( - std::string signal_def, - std::vector all_PPFPs, - std::map> & MCParticleToTrackIDMap, - std::map,art::Ptr > & showerToPFParticleMap, - std::vector,int>> & allPFPSliceIdVec, + std::string signal_def, + std::vector all_PPFPs, + std::map> & MCParticleToTrackIDMap, +// std::map,art::Ptr > & showerToPFParticleMap, +// std::vector,int>> & allPFPSliceIdVec, std::map, art::Ptr > & showerToMCParticleMap, - std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap, - std::map, int>& PFPToSliceIdMap); +// std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap); +// ,std::map, int>& PFPToSliceIdMap); int m_reco_slice_num; //total number of slices in the event @@ -985,7 +963,7 @@ namespace single_photon int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ // given a MCParticle, get its corrected vertex - //CHECK can merge three in one? + //CHECK can merge three in one? int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); // given a particle, and input location calculate its corrected true position, so we can compare it to reco @@ -1019,7 +997,7 @@ namespace single_photon // std::string m_badChannelProducer; // std::string m_mcTrackLabel; // std::string m_mcShowerLabel; - + std::string m_pidLabel; ///< For PID stuff @@ -1048,7 +1026,7 @@ namespace single_photon bool m_runSelectedEvent; //if it should run only selected events std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events + std::set> m_selected_set; //set of selected events //SEAviwer bits bool m_runSEAview; @@ -1078,8 +1056,8 @@ namespace single_photon std::string m_DAQHeaderProducer;//"daq" std::ofstream out_stream; - //SSS parameters - double m_max_conv_dist; + //SSS parameters + double m_max_conv_dist; double m_mass_pi0_mev; double m_exiting_photon_energy_threshold ; @@ -1090,7 +1068,7 @@ namespace single_photon double m_track_calo_min_dEdx_hits; double m_track_calo_trunc_fraction; - //Keng, DetectorClocks now is declared in each event + //Keng, DetectorClocks now is declared in each event // detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); // detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); spacecharge::SpaceCharge const * SCE; @@ -1147,7 +1125,7 @@ namespace single_photon int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ std::vector m_trackstub_candidate_num_hits; std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster std::vector m_trackstub_candidate_num_ticks; @@ -1166,13 +1144,13 @@ namespace single_photon std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) std::vector m_trackstub_candidate_mean_ADC_second_half; std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster std::vector m_trackstub_candidate_energy; std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ @@ -1184,7 +1162,7 @@ namespace single_photon std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ + int m_trackstub_num_candidate_groups; /* number of groups */ std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ @@ -1200,7 +1178,7 @@ namespace single_photon //ReadBDT * sssVetov1; int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_in_nu_slice; std::vector m_sss_candidate_num_hits; std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster std::vector m_sss_candidate_num_ticks; @@ -1219,7 +1197,7 @@ namespace single_photon std::vector m_sss_candidate_max_wire; std::vector m_sss_candidate_mean_wire; std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster std::vector m_sss_candidate_energy; std::vector m_sss_candidate_angle_to_shower; std::vector m_sss_candidate_closest_neighbour; @@ -1522,15 +1500,15 @@ namespace single_photon std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ std::vector m_reco_track_calo_energy_plane1; std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ std::vector m_reco_track_theta_yz; /* theta, phi of the track */ std::vector m_reco_track_phi_yx; - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track * set to -9999 if m_run_pi0_filter is set to true */ @@ -1630,7 +1608,7 @@ namespace single_photon std::vector m_sim_track_parent_pdg; /* event origin types: - * kUnknown: ??? + * kUnknown: ??? * kBeamNeutrino: Beam neutrinos. * kCosmicRay: Cosmic rays. * kSuperNovaNeutrino: Supernova neutrinos. @@ -1662,28 +1640,28 @@ namespace single_photon std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane * if there is no shower hits, set to 999 * if there is shower hits but no track hits, set to -999 - */ - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + */ + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; + * of each plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits * set to -999 if there is no unassociated hits or track hits on plane */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm * on each plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; /*-------------------------------------------------------------------------------------*/ @@ -1988,7 +1966,7 @@ namespace single_photon std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit std::vector> m_reco_shower_dQdx_plane1; std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane std::vector> m_reco_shower_dEdx_plane1; std::vector> m_reco_shower_dEdx_plane2; @@ -2077,7 +2055,7 @@ namespace single_photon bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ - int pfp_w_bestnuID; + int pfp_w_bestnuID; }; DEFINE_ART_MODULE(SinglePhoton) diff --git a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl index bb27a78e5..72716d7fd 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl @@ -97,7 +97,7 @@ outputs: { module_type: RootOutput fileName: "prodgenie_bnb_nu_filtered_NCDeltaRad_sbnd_%p-%tc.root" # default file name, can override from command line with -o or --output - SelectEvents: [simulate] + SelectEvents: [simulate] dataTier: "generated" compressionLevel: 1 } diff --git a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCRadiativeResonant_filtered_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCRadiativeResonant_filtered_sbnd.fcl index 3488feaf2..8d4f5c87d 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCRadiativeResonant_filtered_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCRadiativeResonant_filtered_sbnd.fcl @@ -91,7 +91,7 @@ outputs: { module_type: RootOutput fileName: "prodgenie_bnb_nu_filtered_NCRadRes_sbnd_%p-%tc.root" # default file name, can override from command line with -o or --output - SelectEvents: [simulate] + SelectEvents: [simulate] dataTier: "generated" compressionLevel: 1 } diff --git a/sbncode/SinglePhotonAnalysis/jobs/run_singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/run_singlephoton_sbnd.fcl index 6a8143722..ac2810074 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/run_singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/run_singlephoton_sbnd.fcl @@ -26,8 +26,8 @@ services : DetectorClocksService: @local::sbnd_detectorclocks DetectorPropertiesService: @local::sbnd_detproperties - TimeTracker: { printSummary: true } - SpaceCharge: @local::sbnd_spacecharge + TimeTracker: { printSummary: true } + SpaceCharge: @local::sbnd_spacecharge } outputs: { diff --git a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl index 10208794b..5a0bce511 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/singlephoton_sbnd.fcl @@ -12,9 +12,9 @@ singlephoton_analyzer:{ FlashLabel: "opflashtpc0" POTLabel: "generator" - #ShowerTrackFitter: "pandoraTrack" - #ShowerTrackFitterCalo: "pandoraCalo" - Shower3DLabel: "pandoraSCEShower" + #ShowerTrackFitter: "pandoraTrack" + #ShowerTrackFitterCalo: "pandoraCalo" + Shower3DLabel: "pandoraSCEShower" input_param: "optional" @@ -62,7 +62,7 @@ singlephoton_analyzer:{ truthmatching_signaldef : "ncdelta" runAllPFPs: "false" exiting_photon_energy: 0.02 - convention_distance_cutoff: 80.0 + convention_distance_cutoff: 80.0 exiting_proton_energy: 0.978 #40Mev + proton mass runCRT: "false" From 347dd5e54f76cea6171e877953fb027c4ef64ece Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 12 Jul 2022 22:39:51 -0500 Subject: [PATCH 34/54] update a little bit --- sbncode/SinglePhotonAnalysis/README.md | 4 +- .../SinglePhoton_module.h | 3458 ++++++++--------- 2 files changed, 1731 insertions(+), 1731 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 1d7906cab..3c338fb88 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -23,7 +23,7 @@ The module does not work out of the box, so there are some modifications to make - June 2022 - New electric gains for SBND MC at `singlephoton_sbnd.fcl`, see SBN-doc-19505-v1; - Update the neutrino slice definition in the `Single Photon` module. - - Update on geometry variables such as, `reco_*_dist_to_CathodePlane` + - Update add new geometry variable repsected to Cathode Plane Assemble in SBND: `reco_*_dist_to_CPA` - Disable Kalman dEdx variables - Disable Second Shower Search 3D (`sss3d`) variables - Update FHiCLs for filtering events in SBND: `NCRadiativeResonant` and `NCDeltaRadiative` @@ -35,7 +35,7 @@ These updates are to accommodate the change of Pandora features listed below: |---|---|---| |Neutrino Slice|One nu slice in each event | Multiple nu slices in each event| |Kalman Fitter| In-use | Not in-use| -|3dShowers Objects| Available | Unavailable| +|3dShower Objects| Available | Unavailable| |MVA Method (for track/neutrino scores)|Support Vector Machines|Boosted Decision Trees| diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index a61102dbe..448e1b519 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -116,38 +116,38 @@ namespace single_photon private: double pVertex_pos[3] = {-9999,-9999,-9999};//d - double pNuScore = -999 ;//d - double pTrackScore = -999;//d - - bool pIsNeutrino = false;//d - bool pIsClearCosmic = false;//d - bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. - bool pHasPID = false;//d - - int pHasShower = 0;//d - int pHasTrack = 0;//d - int pPdgCode = -999;//d - int pPFParticleID = -9;//d - int pAncestorID = -9;//d - int pSliceID = -9;//d - - - public: - //constructor: - PandoraPFParticle( - art::Ptr input_PFParticle, - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, - std::vector< art::Ptr > input_Vertex, - std::vector< art::Ptr > input_Clusters, - std::vector< art::Ptr > input_Showers, - std::vector< art::Ptr > input_Tracks, - art::FindManyP input_Hits - ) - : - pPFParticle(input_PFParticle), - pMetaData(input_MetaData), - pVertex(input_Vertex), - pClusters(input_Clusters) + double pNuScore = -999 ;//d + double pTrackScore = -999;//d + + bool pIsNeutrino = false;//d + bool pIsClearCosmic = false;//d + bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. + bool pHasPID = false;//d + + int pHasShower = 0;//d + int pHasTrack = 0;//d + int pPdgCode = -999;//d + int pPFParticleID = -9;//d + int pAncestorID = -9;//d + int pSliceID = -9;//d + + + public: + //constructor: + PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks, + art::FindManyP input_Hits + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) { pPFParticleID = pPFParticle->Self(); pPdgCode = pPFParticle->PdgCode(); @@ -161,7 +161,7 @@ namespace single_photon pHasTrack = nTracks; if(pHasShower == 1) pShower=input_Showers.front(); if(pHasTrack == 1) pTrack=input_Tracks.front(); - + //fill the vertex info. if (!pVertex.empty()){ @@ -193,261 +193,261 @@ namespace single_photon }; - art::Ptr< recob::PFParticle > pPFParticle;//d - art::Ptr< recob::Shower> pShower;//d with 0 or 1 element - art::Ptr< recob::Track > pTrack;//d with 0 or 1 element - art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() - art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() - - art::Ptr pParticleID;//d for track only; - art::Ptr< simb::MCTruth > pMCTruth; - - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d - std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pSliceHits;//d - std::vector< art::Ptr< recob::Hit > > pPFPHits;//d - std::vector< art::Ptr< recob::Cluster > > pClusters;//d - std::vector> pCalorimetries;//d - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; - std::vector< art::Ptr< simb::MCParticle > > pMCParticles; - - - //set methods - void set_NuScore (const double input_score){ pNuScore = input_score; } -// void set_TrackScore (const double input_score){ pTrackScore = input_score; } - -// void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } -// void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } - void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } - void set_HasPID (const bool input_bool){ pHasPID = input_bool; } - -// void set_HasShower (const int input_number){ pHasShower = input_number; } -// void set_HasTrack (const int input_number){ pHasTrack = input_number; } -// void set_PdgCode (const int input_number){ pPdgCode = input_number; } -// void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } - void set_AncestorID (const int input_number){ pAncestorID = input_number; } - void set_SliceID (const int input_number){ pSliceID = input_number; } - - void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } - void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } - - //call method - const art::Ptr get_ParticleID() const; - const std::vector> get_Calorimetries() const; - - - const double* get_Vertex_pos() const; - - const double get_NuScore() const; - const double get_TrackScore () const; - - const bool get_IsNeutrino () const; - const bool get_IsClearCosmic () const; - const bool get_IsNuSlice () const; - const bool get_HasPID () const; - - const int get_HasShower () const; - const int get_HasTrack () const; - const int get_PdgCode() const; - const int get_PFParticleID() const; - const int get_AncestorID() const; - const int get_SliceID () const; + art::Ptr< recob::PFParticle > pPFParticle;//d + art::Ptr< recob::Shower> pShower;//d with 0 or 1 element + art::Ptr< recob::Track > pTrack;//d with 0 or 1 element + art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + + art::Ptr pParticleID;//d for track only; + art::Ptr< simb::MCTruth > pMCTruth; + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d + std::vector< art::Ptr< recob::Vertex > > pVertex;//d + std::vector< art::Ptr< recob::Hit > > pSliceHits;//d + std::vector< art::Ptr< recob::Hit > > pPFPHits;//d + std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector> pCalorimetries;//d + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; + std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + + + //set methods + void set_NuScore (const double input_score){ pNuScore = input_score; } + // void set_TrackScore (const double input_score){ pTrackScore = input_score; } + + // void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } + // void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } + void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } + void set_HasPID (const bool input_bool){ pHasPID = input_bool; } + + // void set_HasShower (const int input_number){ pHasShower = input_number; } + // void set_HasTrack (const int input_number){ pHasTrack = input_number; } + // void set_PdgCode (const int input_number){ pPdgCode = input_number; } + // void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } + void set_AncestorID (const int input_number){ pAncestorID = input_number; } + void set_SliceID (const int input_number){ pSliceID = input_number; } + + void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } + void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } + + //call method + const art::Ptr get_ParticleID() const; + const std::vector> get_Calorimetries() const; + + + const double* get_Vertex_pos() const; + + const double get_NuScore() const; + const double get_TrackScore () const; + + const bool get_IsNeutrino () const; + const bool get_IsClearCosmic () const; + const bool get_IsNuSlice () const; + const bool get_HasPID () const; + + const int get_HasShower () const; + const int get_HasTrack () const; + const int get_PdgCode() const; + const int get_PFParticleID() const; + const int get_AncestorID() const; + const int get_SliceID () const; }; - inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } - inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } + inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } + inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } - inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } + inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } - inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } - inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } - - inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } - inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } - inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } - inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } + inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } + inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } - inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } - inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } - inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } - inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } - inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } - inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } + inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } + inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } + inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } + inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } + + inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } + inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } + inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } + inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } + inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } + inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } //this is for second_shower_search.h - struct sss_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; - double close_tick; - double close_wire; /* wire of hit that's closest to vertex */ - double angle;//w.r.t shower primary + double close_tick; + double close_wire; /* wire of hit that's closest to vertex */ + double angle;//w.r.t shower primary - double impact_parameter; + double impact_parameter; - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; - double mean_dist; - double max_dist; - double min_dist; + double mean_dist; + double max_dist; + double min_dist; - double pca_0; - double pca_1; - double pca_theta; + double pca_0; + double pca_1; + double pca_theta; - int n_wires; /* number of wires hits correspond to */ - int n_ticks; + int n_wires; /* number of wires hits correspond to */ + int n_ticks; - bool pass; + bool pass; - sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of class sss_score + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of class sss_score //this works with SEAview/SEAviewer.h - class cluster { + class cluster { - public: + public: - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - std::cout<<"\n\n\nCHECK !! Do we need this?"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts,&wires[0],&ticks[0]); - f_graph = af_graph; - - }; - -// int getID() {return f_ID;} -// int getN() {return f_npts;} -// int getPlane(){ return f_plane;} -// TGraph * getGraph(){ return &f_graph;} -// std::vector> getHits(){return f_hits;} -// int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} -// sss_score * getSSScore(){return f_SSScore;} -// private: -// - int f_ID; - int f_npts; - int f_plane; - std::vector> f_pts; - std::vector> f_hits; - TGraph f_graph; -// sss_score *f_SSScore; - }; // end of class cluster - - - - /** - * @brief SinglePhoton class - */ - class SinglePhoton : public art::EDFilter - { - public: - // name alias from pandora - typedef art::ValidHandle< std::vector > PFParticleHandle; - typedef std::vector< art::Ptr > PFParticleVector; - typedef std::vector< art::Ptr > TrackVector; - typedef std::vector< art::Ptr > ShowerVector; - typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - /** - * @brief Constructor - * - * @param pset the set of input fhicl parameters - */ - SinglePhoton(fhicl::ParameterSet const &pset); - - /** - * @brief Configure memeber variables using FHiCL parameters - * - * @param pset the set of input fhicl parameters - */ - void reconfigure(fhicl::ParameterSet const &pset); - - /** - * @brief Analyze an event! - * - * @param evt the art event to analyze - */ - bool filter(art::Event &evt) override; - - /** - * @brief Begin the job, setting up ! - * - */ - void beginJob() override; - - /** - * @brief End the job, setting down ! - * - */ - void endJob() override; - /** - * @brief: grab run, subrun number, and subrun POT, fill the TTree */ - bool beginSubRun(art::SubRun& sr) override; - bool endSubRun(art::SubRun& sr) override; - - private: - /** - * @brief: reset/clear data members - */ - void ClearMeta(); + + std::cout<<"\n\n\nCHECK !! Do we need this?"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts,&wires[0],&ticks[0]); + f_graph = af_graph; + + }; + + // int getID() {return f_ID;} + // int getN() {return f_npts;} + // int getPlane(){ return f_plane;} + // TGraph * getGraph(){ return &f_graph;} + // std::vector> getHits(){return f_hits;} + // int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} + // sss_score * getSSScore(){return f_SSScore;} + // private: + // + int f_ID; + int f_npts; + int f_plane; + std::vector> f_pts; + std::vector> f_hits; + TGraph f_graph; + // sss_score *f_SSScore; + }; // end of class cluster + + + + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDFilter + { + public: + // name alias from pandora + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + bool filter(art::Event &evt) override; + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob() override; + + /** + * @brief End the job, setting down ! + * + */ + void endJob() override; + /** + * @brief: grab run, subrun number, and subrun POT, fill the TTree */ + bool beginSubRun(art::SubRun& sr) override; + bool endSubRun(art::SubRun& sr) override; + + private: + /** + * @brief: reset/clear data members + */ + void ClearMeta(); void CreateMetaBranches(); - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ - void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; - - /** - * @brief Collect associated tracks and showers to particles in an input particle vector - * - * @param particles a vector holding PFParticles from which to find the associated tracks and showers - * @param pfParticleHandle the handle for the PFParticle collection - * @param evt the art event to analyze - * @param tracks a vector to hold the associated tracks - * @param showers a vector to hold the associated showers - */ - void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief: analyze associated tracks/showers for an PFParticle - * @param: pParticle: PFParticle to be analyzed - * @param: associatedTracks: a vector of asso track for pParticle - * @param: associatedShowers: a vector of asso shower for pParticle - * @param: tracks: associated track will be added into tracks - * @param: showers: associated shower will be added into showers - * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle - */ - void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ + void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; + + /** + * @brief Collect associated tracks and showers to particles in an input particle vector + * + * @param particles a vector holding PFParticles from which to find the associated tracks and showers + * @param pfParticleHandle the handle for the PFParticle collection + * @param evt the art event to analyze + * @param tracks a vector to hold the associated tracks + * @param showers a vector to hold the associated showers + */ + void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); + + /** + * @brief: analyze associated tracks/showers for an PFParticle + * @param: pParticle: PFParticle to be analyzed + * @param: associatedTracks: a vector of asso track for pParticle + * @param: associatedShowers: a vector of asso shower for pParticle + * @param: tracks: associated track will be added into tracks + * @param: showers: associated shower will be added into showers + * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle + */ + void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); @@ -457,205 +457,205 @@ namespace single_photon - double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ - /* - *@brief Calculated the shower energy by looping over all the hits and summing the charge - *@param hits - an art pointer of all the hits in a shower - * + double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ + /* + *@brief Calculated the shower energy by looping over all the hits and summing the charge + *@param hits - an art pointer of all the hits in a shower + * */ - double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ - - /** - *@brief Takes a hit and multiplies the charge by the gain - *@param thishitptr art pointer to a hit - *@param plane the plane the hit is on - **/ - double GetQHit(art::Ptr thishitptr, int plane); - - - int getNHitsPlane(std::vector> hits, int this_plane); - double getMeanHitWidthPlane(std::vector> hits, int this_plane); - - - /** - * @brief Calculate the E value in MeV for a given hit - * @param thishit - an individual hit - * - * - * */ - - /** - * @brief Calculate the E value in MeV from a given Q value - * @param q - the charge value - * - * */ - double QtoEConversion(double q); - - - /** - *@brief Takes a vector of dQ/dx values and converts to dE/dx - *@param dqdx - vector of dqdx points - * - * */ - std::vector CalcdEdxFromdQdx(std::vector dqdx); - - /** - * - *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane - *@param shower - a Pandora shower - *@param clusters - all of the clusters in the shower - *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster - *@param plane - a single plane - * * */ - - std::vector CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane, + double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ + + /** + *@brief Takes a hit and multiplies the charge by the gain + *@param thishitptr art pointer to a hit + *@param plane the plane the hit is on + **/ + double GetQHit(art::Ptr thishitptr, int plane); + + + int getNHitsPlane(std::vector> hits, int this_plane); + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + + /** + * @brief Calculate the E value in MeV for a given hit + * @param thishit - an individual hit + * + * + * */ + + /** + * @brief Calculate the E value in MeV from a given Q value + * @param q - the charge value + * + * */ + double QtoEConversion(double q); + + + /** + *@brief Takes a vector of dQ/dx values and converts to dE/dx + *@param dqdx - vector of dqdx points + * + * */ + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + /** + * + *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane + *@param shower - a Pandora shower + *@param clusters - all of the clusters in the shower + *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster + *@param plane - a single plane + * * */ + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector); - /** - *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) - *@param shower_dir - the 3D shower direction - *@param plane - a single plane - * */ - double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ + /** + *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) + *@param shower_dir - the 3D shower direction + *@param plane - a single plane + * */ + double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - /** - * - *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary - *uses triangle area check - * - * */ - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + /** + * + *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary + *uses triangle area check + * + * */ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - //---------------- Templatees ---------------------------- - void AnalyzeTemplates(); - void ClearTemplates(); - void ResizeTemplates(size_t); - void CreateTemplateBranches(); + //---------------- Templatees ---------------------------- + void AnalyzeTemplates(); + void ClearTemplates(); + void ResizeTemplates(size_t); + void CreateTemplateBranches(); - //---------------- Potential Track Stub -------------------- - void ClearStubs(); - void CreateStubBranches(); + //---------------- Potential Track Stub -------------------- + void ClearStubs(); + void CreateStubBranches(); - /* @brief: given indices of clusters, determine if they overlap in time - * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters - * candidate_indices provided the indices of clusters of which we'd like to check the overlap - */ - std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + /* @brief: given indices of clusters, determine if they overlap in time + * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters + * candidate_indices provided the indices of clusters of which we'd like to check the overlap + */ + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information - * @brief: candidate clusters on different plane that overlap in time tick will be grouped together - * @return: return.first -> number of possible matches - * return.second.first -> 2D vector, indices of clusters in every possible match - * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match - */ - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); + /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information + * @brief: candidate clusters on different plane that overlap in time tick will be grouped together + * @return: return.first -> number of possible matches + * return.second.first -> 2D vector, indices of clusters in every possible match + * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match + */ + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - //---------------- SecondShower---- - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + //---------------- SecondShower---- + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ - void SimpleSecondShowerCluster(); + void SimpleSecondShowerCluster(); - void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); + void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); - /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits - * and return a vector of 7 elements: - * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} - */ - std::vectorSecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, -// std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits + * and return a vector of 7 elements: + * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} + */ + std::vectorSecondShowerMatching(std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + // std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - /* analyze a cluster of hits, and return corresponding sss_score */ - sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); + /* analyze a cluster of hits, and return corresponding sss_score */ + sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); - /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits - * This function is currently used in function 'SecondShowerSearch' - * @parameter: plane, cluster are not in use - * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire - */ - TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); + /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits + * This function is currently used in function 'SecondShowerSearch' + * @parameter: plane, cluster are not in use + * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire + */ + TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); - /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ - int CompareToShowers(int,int,std::vector>& hitz,double,double, - const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); - //---------------- Isolation ----------------- + /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ + int CompareToShowers(int,int,std::vector>& hitz,double,double, + const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); + //---------------- Isolation ----------------- - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ - /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ - void IsolationStudy( + /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ + void IsolationStudy( std::vector all_PPFPs, - const std::vector>& tracks, -// std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, -// std::map, art::Ptr> & showerToPFParticleMap, -// const std::map, std::vector> > & pfParticleToHitsMap, -// const std::map, int> & pfParticleToSliceIDMap, -// const std::map>>& sliceIDToHitsMap, + const std::vector>& tracks, + // std::map, art::Ptr> & trackToPFParticleMap, + const std::vector>& showers, + // std::map, art::Ptr> & showerToPFParticleMap, + // const std::map, std::vector> > & pfParticleToHitsMap, + // const std::map, int> & pfParticleToSliceIDMap, + // const std::map>>& sliceIDToHitsMap, detinfo::DetectorPropertiesData const & theDetector); - //---------------- Flashes ---------------------------- - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + //---------------- Flashes ---------------------------- + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ - //---------------- Tracks ---------------------------- - /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ - void AnalyzeTracks( + //---------------- Tracks ---------------------------- + /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ + void AnalyzeTracks( std::vector all_PPFPs, const std::vector>& tracks, -// std::map, art::Ptr> & tracktopfparticlemap, -// std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfparticletospacepointmap , + // std::map, art::Ptr> & tracktopfparticlemap, + // std::map, std::vector>> & pfParticleToHitsMap, + std::map, std::vector>> & pfparticletospacepointmap , std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap -// std::map,bool> &PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,double> &PFPToTrackScoreMap, -// std::map,bool> &PFPToNuSliceMap, -// PFParticleIdMap &pfParticleMap - ); + // std::map,bool> &PFPToClearCosmicMap, + // std::map, int>& PFPToSliceIdMap, + // std::map,double> &PFPToTrackScoreMap, + // std::map,bool> &PFPToNuSliceMap, + // PFParticleIdMap &pfParticleMap + ); - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ - void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); //(std::map, std::vector>> &trackToCaloMap); - /* @brief: analyze MCParticle related to recob::Track if it has one - * variables starting with 'm_sim_track_' will be updated - * */ - void RecoMCTracks( + /* @brief: analyze MCParticle related to recob::Track if it has one + * variables starting with 'm_sim_track_' will be updated + * */ + void RecoMCTracks( std::vector all_PPFPs, const std::vector>& tracks, //std::map,art::Ptr> & trackToPFParticleMap, @@ -669,33 +669,33 @@ namespace single_photon std::vector& vec); - /* collect information from anab::sParticleIDAlgScores of reco track */ - void CollectPID(std::vector> & tracks, std::vector all_PPFPs); + /* collect information from anab::sParticleIDAlgScores of reco track */ + void CollectPID(std::vector> & tracks, std::vector all_PPFPs); //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); - TGraph proton_length2energy_tgraph; + TGraph proton_length2energy_tgraph; - //---------------- Showers ---------------------------- + //---------------- Showers ---------------------------- void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - void AnalyzeShowers( - std::vector all_PPFPs, - const std::vector>& showers, -// std::map,art::Ptr> & showerToPFParticleMap, -// std::map, std::vector>> & pfParticleToHitMap, -// std::map, std::vector> > & pfParticleToClusterMap, - std::map, std::vector> > & clusterToHitMap , -// std::map& sliceIdToNuScoreMap, -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,bool> &PFPToNuSliceMap, -// std::map,double> &PFPToTrackScoreMap, -// PFParticleIdMap &pfParticleMap, -// std::map, art::Ptr>& PFPtoShowerReco3DMap, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ); + void AnalyzeShowers( + std::vector all_PPFPs, + const std::vector>& showers, + // std::map,art::Ptr> & showerToPFParticleMap, + // std::map, std::vector>> & pfParticleToHitMap, + // std::map, std::vector> > & pfParticleToClusterMap, + std::map, std::vector> > & clusterToHitMap , + // std::map& sliceIdToNuScoreMap, + // std::map,bool>& PFPToClearCosmicMap, + // std::map, int>& PFPToSliceIdMap, + // std::map,bool> &PFPToNuSliceMap, + // std::map,double> &PFPToTrackScoreMap, + // PFParticleIdMap &pfParticleMap, + // std::map, art::Ptr>& PFPtoShowerReco3DMap, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ); void AnalyzeKalmanShowers( const std::vector>& showers, @@ -705,30 +705,30 @@ namespace single_photon std::map, std::vector>> & pfParticleToHitMap, detinfo::DetectorPropertiesData const & theDetector); - /** - * @brief: match showers to MCParticles - * @arguments filled during function execution: - * mcParticleVector: vector of mother particles of showers - * objectToMCParticleMap: map of shower to its mother particle - */ + /** + * @brief: match showers to MCParticles + * @arguments filled during function execution: + * mcParticleVector: vector of mother particles of showers + * objectToMCParticleMap: map of shower to its mother particle + */ void showerRecoMCmatching( std::vector all_PPFPs, std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - //std::map,art::Ptr>& objectToPFParticleMap, - //std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - //std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - //(std::map & sliceIdToNuScoreMap, - //std::map,bool>& PFPToClearCosmicMap, - //std::map, int>& PFPToSliceIdMap, - //std::map,bool>& PFPToNuSliceMap); - - - /* tranverse through mcParticleVector, and print out infos for photons */ - int photoNuclearTesting(std::vector>& mcParticleVector); + std::map,art::Ptr>& objectToMCParticleMap, + //std::map,art::Ptr>& objectToPFParticleMap, + //std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + //std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + //(std::map & sliceIdToNuScoreMap, + //std::map,bool>& PFPToClearCosmicMap, + //std::map, int>& PFPToSliceIdMap, + //std::map,bool>& PFPToNuSliceMap); + + + /* tranverse through mcParticleVector, and print out infos for photons */ + int photoNuclearTesting(std::vector>& mcParticleVector); //KENG Geometry dimensions; Fiducial volume and SCB (no SCB yet?) std::vector> fTPCVolumes; @@ -740,1325 +740,1325 @@ namespace single_photon double m_tpc_active_YMax; double m_tpc_active_ZMax; - int setTPCGeom(); - int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ - double distToTPCActive(std::vector&vec); + int setTPCGeom(); + int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ + double distToTPCActive(std::vector&vec); double distToCPA(std::vector&vec); - int distToSCB(double & dist, std::vector &vec); - /* if point in active TPC, returns distance from point to closest TPC wall - * otherwise, returns -999 */ - - - // ------------ Fid Volume and SCB------------------------- // -//CHECK, no SCB stuff yet; -// double m_tpc_active_x_low; -// double m_tpc_active_x_high; -// double m_tpc_active_y_low; -// double m_tpc_active_y_high; -// double m_tpc_active_z_low ; -// double m_tpc_active_z_high; -// -// double m_SCB_YX_TOP_y1_array; -// std::vector m_SCB_YX_TOP_x1_array; -// std::vector m_SCB_YX_TOP_y2_array; -// double m_SCB_YX_TOP_x2_array; -// double m_SCB_YX_BOT_y1_array; -// std::vector m_SCB_YX_BOT_x1_array; -// std::vector m_SCB_YX_BOT_y2_array; -// double m_SCB_YX_BOT_x2_array; -// -// double m_SCB_ZX_Up_z1_array ; -// double m_SCB_ZX_Up_x1_array ; -// double m_SCB_ZX_Up_z2_array ; -// double m_SCB_ZX_Up_x2_array ; -// -// double m_SCB_ZX_Dw_z1_array; -// std::vector m_SCB_ZX_Dw_x1_array; -// std::vector m_SCB_ZX_Dw_z2_array; -// double m_SCB_ZX_Dw_x2_array; + int distToSCB(double & dist, std::vector &vec); + /* if point in active TPC, returns distance from point to closest TPC wall + * otherwise, returns -999 */ + + + // ------------ Fid Volume and SCB------------------------- // + //CHECK, no SCB stuff yet; + // double m_tpc_active_x_low; + // double m_tpc_active_x_high; + // double m_tpc_active_y_low; + // double m_tpc_active_y_high; + // double m_tpc_active_z_low ; + // double m_tpc_active_z_high; + // + // double m_SCB_YX_TOP_y1_array; + // std::vector m_SCB_YX_TOP_x1_array; + // std::vector m_SCB_YX_TOP_y2_array; + // double m_SCB_YX_TOP_x2_array; + // double m_SCB_YX_BOT_y1_array; + // std::vector m_SCB_YX_BOT_x1_array; + // std::vector m_SCB_YX_BOT_y2_array; + // double m_SCB_YX_BOT_x2_array; + // + // double m_SCB_ZX_Up_z1_array ; + // double m_SCB_ZX_Up_x1_array ; + // double m_SCB_ZX_Up_z2_array ; + // double m_SCB_ZX_Up_x2_array ; + // + // double m_SCB_ZX_Dw_z1_array; + // std::vector m_SCB_ZX_Dw_x1_array; + // std::vector m_SCB_ZX_Dw_z2_array; + // double m_SCB_ZX_Dw_x2_array; //Fiducial stuff? -// int isInSCB(std::vector&); /* if point is inside SCB */ -// int isInSCB(double cut,std::vector&); - /* calc the minimum distance from point to the SC boundary,save to dist. - * return value (0, or 1) indicates whether the point is in SCB */ - - //---------------- MCTruths ---------------------------- + // int isInSCB(std::vector&); /* if point is inside SCB */ + // int isInSCB(double cut,std::vector&); + /* calc the minimum distance from point to the SC boundary,save to dist. + * return value (0, or 1) indicates whether the point is in SCB */ - /** - * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) - */ - void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); + //---------------- MCTruths ---------------------------- - std::map is_delta_map; + /** + * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) + */ + void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); - //---------------- EventWeight ---------------------------- + std::map is_delta_map; - /** - * @brief: fill event weight related variables */ - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + //---------------- EventWeight ---------------------------- - //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. - //---------------- Geant4 ---------------------------- - /** - * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); + //---------------- Geant4 ---------------------------- + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); - /** - * @brief: given an event and a label, collect all the SimChannel with that label - * @ param: simChannelVector: a vector of SimChannel [to be filled] - */ - void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); - /** - * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use - * @param: evt: event, label: given label - * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] - * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] - * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] - */ - void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); - void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); + /** + * @brief: given an event and a label, collect all the SimChannel with that label + * @ param: simChannelVector: a vector of SimChannel [to be filled] + */ + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + + /** + * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use + * @param: evt: event, label: given label + * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] + * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] + * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] + */ + void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); + void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); - //-------------- Slices/Pandora Metadata ---------------// - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + //-------------- Slices/Pandora Metadata ---------------// + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - /** - * brief: analyze metadata of PFParticles, and fill in all these maps - * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap - * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby - */ - void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> & primaryPFPSliceIdVec, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap); + /** + * brief: analyze metadata of PFParticles, and fill in all these maps + * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap + * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby + */ + void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, + PFParticleIdMap &pfParticleMap, + std::vector,int>> & primaryPFPSliceIdVec, + std::map & sliceIdToNuScoreMap, + std::map,bool>& PFPToClearCosmicMap, + std::map, int>& PFPToSliceIdMap, + std::map,bool>& PFPToNuSliceMap, + std::map,double>& PFPToTrackScoreMap); - // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumPFPsMap ); + // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumPFPsMap ); - std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ + std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ - /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ - std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap ); - // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - // std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumShowersMap ); + /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ + std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + std::map, int>& PFPToSliceIdMap ); + // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, + // std::map, int>& PFPToSliceIdMap, + // std::map& sliceIdToNumShowersMap ); - /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ - std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap); + /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ + std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, + std::map, int>& PFPToSliceIdMap); - /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info - * to determine how many eligible tracks and showers there are in the event - */ - void AnalyzeRecoMCSlices( + /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info + * to determine how many eligible tracks and showers there are in the event + */ + void AnalyzeRecoMCSlices( std::string signal_def, std::vector all_PPFPs, std::map> & MCParticleToTrackIDMap, -// std::map,art::Ptr > & showerToPFParticleMap, -// std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, -// std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap); -// ,std::map, int>& PFPToSliceIdMap); - - - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - //------- matched shower ------------------------------------- - - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - - - - //------------------ Delaunay triangle tools -----------// - - double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ - int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found - * and total area of these triangles, - * save to num_triangles & area */ - int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ - - // given a MCParticle, get its corrected vertex + // std::map,art::Ptr > & showerToPFParticleMap, + // std::vector,int>> & allPFPSliceIdVec, + std::map, art::Ptr > & showerToMCParticleMap, + // std::map,art::Ptr > & trackToNuPFParticleMap, + std::map, art::Ptr > &trackToMCParticleMap); + // ,std::map, int>& PFPToSliceIdMap); + + + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + //------- matched shower ------------------------------------- + + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + + //------------------ Delaunay triangle tools -----------// + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found + * and total area of these triangles, + * save to num_triangles & area */ + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ + + // given a MCParticle, get its corrected vertex //CHECK can merge three in one? - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); - int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); - // given a particle, and input location calculate its corrected true position, so we can compare it to reco - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); - - //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 - std::vector> bad_channel_list_fixed_mcc9; - std::map bad_channel_map_fixed_mcc9; - - - /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ - bool IsEventInList(int run, int subrun, int event); - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles -// std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; -// std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; -// std::string m_badChannelLabel; -// std::string m_badChannelProducer; -// std::string m_mcTrackLabel; -// std::string m_mcShowerLabel; - - - - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer;//"daq" - std::ofstream out_stream; + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + // given a particle, and input location calculate its corrected true position, so we can compare it to reco + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); + + //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 + std::vector> bad_channel_list_fixed_mcc9; + std::map bad_channel_map_fixed_mcc9; + + + /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ + bool IsEventInList(int run, int subrun, int event); + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + // std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + // std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + // std::string m_badChannelLabel; + // std::string m_badChannelProducer; + // std::string m_mcTrackLabel; + // std::string m_mcShowerLabel; + + + + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer;//"daq" + std::ofstream out_stream; //SSS parameters double m_max_conv_dist; - double m_mass_pi0_mev; + double m_mass_pi0_mev; - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; //Keng, DetectorClocks now is declared in each event -// detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); -// detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); - spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - - int m_Cryostat; - int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + // detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); + // detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); + spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + + int m_Cryostat; + int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - - bool bool_make_sss_plots; - - - //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - double m_reco_vertex_dist_to_CPA; - - - int m_reco_asso_showers; - - double m_reco_vertex_to_nearest_dead_wire_plane0; - double m_reco_vertex_to_nearest_dead_wire_plane1; - double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - int m_reco_num_templates; - std::vector m_reco_template; /* temp comment: does not seem to be used */ - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - - double m_CRT_dt; //time between flash and nearest CRT hit - - //------------ Track related Variables ------------- - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_CPA; - std::vector m_reco_track_start_dist_to_CPA; - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - // ---- corresponding variables on the best plane of reco track, which is defined as such------ - // if plane 2 have good hits, then plane 2 is the best-plane - // otherwise, which plane of plane 0 and 1 has more good hits will be best plane - // if none of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - - std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ - std::vector m_reco_track_end_to_nearest_dead_wire_plane1; - std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - /* event origin types: - * kUnknown: ??? - * kBeamNeutrino: Beam neutrinos. - * kCosmicRay: Cosmic rays. - * kSuperNovaNeutrino: Supernova neutrinos. - * kSingleParticle: single particles thrown at the detector - */ - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - * if there is no shower hits, set to 999 - * if there is shower hits but no track hits, set to -999 - */ - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - * set to -999 if there is no unassociated hits or track hits on plane - */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - * on each plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - - /*-------------------------------------------------------------------------------------*/ - - //------------ Shower related Variables ------------- - - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + + bool bool_make_sss_plots; + + + //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + double m_reco_vertex_dist_to_CPA; + + + int m_reco_asso_showers; + + double m_reco_vertex_to_nearest_dead_wire_plane0; + double m_reco_vertex_to_nearest_dead_wire_plane1; + double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + int m_reco_num_templates; + std::vector m_reco_template; /* temp comment: does not seem to be used */ + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + + double m_CRT_dt; //time between flash and nearest CRT hit + + //------------ Track related Variables ------------- + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_CPA; + std::vector m_reco_track_start_dist_to_CPA; + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + // ---- corresponding variables on the best plane of reco track, which is defined as such------ + // if plane 2 have good hits, then plane 2 is the best-plane + // otherwise, which plane of plane 0 and 1 has more good hits will be best plane + // if none of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + + std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + std::vector m_reco_track_end_to_nearest_dead_wire_plane1; + std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + /* event origin types: + * kUnknown: ??? + * kBeamNeutrino: Beam neutrinos. + * kCosmicRay: Cosmic rays. + * kSuperNovaNeutrino: Supernova neutrinos. + * kSingleParticle: single particles thrown at the detector + */ + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + * if there is no shower hits, set to 999 + * if there is shower hits but no track hits, set to -999 + */ + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + * of each plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + * set to -999 if there is no unassociated hits or track hits on plane + */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + * on each plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + + /*-------------------------------------------------------------------------------------*/ + + //------------ Shower related Variables ------------- + + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - - std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ - std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - //end flash matching - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - - - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - - - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - * plane 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - - - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - - double m_mctruth_leading_exiting_proton_energy; - - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - - - int m_mctruth_num_reconstructable_protons; - - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - * close enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - - - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - - - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - - double _time2cm;//value modeled from David's shower code - - // PID-related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - //Geant4 - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; - - - - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ - bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; + std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + //end flash matching + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + + + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + + + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + * plane 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + + + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + + double m_mctruth_leading_exiting_proton_energy; + + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + + + int m_mctruth_num_reconstructable_protons; + + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + * close enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + + + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + + + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + double _time2cm;//value modeled from David's shower code + + // PID-related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + //Geant4 + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + + + + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ + bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ int pfp_w_bestnuID; - }; + }; - DEFINE_ART_MODULE(SinglePhoton) + DEFINE_ART_MODULE(SinglePhoton) } // namespace lar_pandora #endif From e790b0794d066a14a3eeb36a376220744a5f0609 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 13 Jul 2022 22:54:01 -0500 Subject: [PATCH 35/54] this works? --- sbncode/CMakeLists.txt | 40 ++++++++++++++++++++-------------------- ups/product_deps | 8 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 051d0d3b9..dc6176464 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -6,23 +6,23 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) -add_subdirectory(SBNEventWeight) -add_subdirectory(NuMuSelection) -add_subdirectory(OpDet) -add_subdirectory(OpT0Finder) - -add_subdirectory(CAFMaker) -add_subdirectory(Metadata) - -add_subdirectory(Calibration) -add_subdirectory(FlashMatch) -add_subdirectory(LArRecoProducer) -add_subdirectory(TPCReco) - - -add_subdirectory(BeamSpillInfoRetriever) -add_subdirectory(FluxReader) -add_subdirectory(EventGenerator) -add_subdirectory(PID) -add_subdirectory(GeometryTools) -add_subdirectory(CosmicID) +#add_subdirectory(SBNEventWeight) +#add_subdirectory(NuMuSelection) +#add_subdirectory(OpDet) +#add_subdirectory(OpT0Finder) +# +#add_subdirectory(CAFMaker) +#add_subdirectory(Metadata) +# +#add_subdirectory(Calibration) +#add_subdirectory(FlashMatch) +#add_subdirectory(LArRecoProducer) +#add_subdirectory(TPCReco) +# +# +#add_subdirectory(BeamSpillInfoRetriever) +#add_subdirectory(FluxReader) +#add_subdirectory(EventGenerator) +#add_subdirectory(PID) +#add_subdirectory(GeometryTools) +#add_subdirectory(CosmicID) diff --git a/ups/product_deps b/ups/product_deps index ffc178560..70ffd6084 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -34,10 +34,10 @@ fwdir product_dir scripts # Add the dependent product and version product version -larsoft v09_54_00 -sbnobj v09_14_03 -sbnanaobj v09_18_05 -sbndaq_artdaq_core v1_01_00of0 +larsoft v09_48_01 +sbnobj v09_13_11 +sbnanaobj v09_18_02 +sbndaq_artdaq_core v1_00_00of2 genie_xsec v3_00_04a sbndata v01_03 From 1db9149a5f13634b3835d8d7cd343721a0fe1f38 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 14 Jul 2022 23:26:07 -0500 Subject: [PATCH 36/54] fix CMAKELists for SinglePhotonAnalysis Module --- sbncode/CMakeLists.txt | 40 +++--- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 134 ++++++++++-------- .../SinglePhoton_module.h | 2 + ups/product_deps | 8 +- 4 files changed, 97 insertions(+), 87 deletions(-) diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index dc6176464..051d0d3b9 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -6,23 +6,23 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) -#add_subdirectory(SBNEventWeight) -#add_subdirectory(NuMuSelection) -#add_subdirectory(OpDet) -#add_subdirectory(OpT0Finder) -# -#add_subdirectory(CAFMaker) -#add_subdirectory(Metadata) -# -#add_subdirectory(Calibration) -#add_subdirectory(FlashMatch) -#add_subdirectory(LArRecoProducer) -#add_subdirectory(TPCReco) -# -# -#add_subdirectory(BeamSpillInfoRetriever) -#add_subdirectory(FluxReader) -#add_subdirectory(EventGenerator) -#add_subdirectory(PID) -#add_subdirectory(GeometryTools) -#add_subdirectory(CosmicID) +add_subdirectory(SBNEventWeight) +add_subdirectory(NuMuSelection) +add_subdirectory(OpDet) +add_subdirectory(OpT0Finder) + +add_subdirectory(CAFMaker) +add_subdirectory(Metadata) + +add_subdirectory(Calibration) +add_subdirectory(FlashMatch) +add_subdirectory(LArRecoProducer) +add_subdirectory(TPCReco) + + +add_subdirectory(BeamSpillInfoRetriever) +add_subdirectory(FluxReader) +add_subdirectory(EventGenerator) +add_subdirectory(PID) +add_subdirectory(GeometryTools) +add_subdirectory(CosmicID) diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index eb00c17d0..43b9e2373 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -2,70 +2,78 @@ link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) art_make( BASENAME_ONLY LIB_LIBRARIES - larcorealg_Geometry - larcore_Geometry_Geometry_service - lardata_Utilities - larevt_Filters - larpandoraobj - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larsim_MCCheater_ParticleInventoryService_service - larpandora_LArPandoraInterface - ${PANDORASDK} - ${PANDORAMONITORING} - LArPandoraContent - nusimdata_SimulationBase - ${Boost_SERIALIZATION_LIBRARY} - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + larpandoraobj + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larpandora_LArPandoraInterface + ${PANDORASDK} + ${PANDORAMONITORING} + LArPandoraContent + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} MODULE_LIBRARIES - sbncode_SinglePhotonAnalysis_SEAview - larcorealg_Geometry - larcore_Geometry_Geometry_service - lardata_Utilities - larevt_Filters - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larpandora_LArPandoraInterface - nusimdata_SimulationBase - ${Boost_SERIALIZATION_LIBRARY} - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} ) - + sbncode_SinglePhotonAnalysis_SEAview + larcorealg_Geometry + larcore_Geometry_Geometry_service + lardata_Utilities + larevt_Filters + lardataobj_RawData + lardataobj_RecoBase + lardataobj_MCBase + larcoreobj_SummaryData + larsim_MCCheater_BackTrackerService_service + larpandora_LArPandoraInterface + nusimdata_SimulationBase + ${Boost_SERIALIZATION_LIBRARY} + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_PRINCIPAL} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES_OPTIONAL} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} + ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} + ${ART_ROOT_IO_TFILE_SUPPORT} ${ROOT_CORE} + ${ART_ROOT_IO_TFILESERVICE_SERVICE} + art_Persistency_Common canvas + art_Persistency_Provenance canvas + art_Utilities canvas + ${MF_MESSAGELOGGER} + + ${FHICLCPP} + cetlib cetlib_except + ${CLHEP} + ${ROOT_BASIC_LIB_LIST} + ${ROOT_GEOM} ) +cet_find_library( IFDH NAMES ifdh PATHS ENV IFDHC_LIB NO_DEFAULT_PATH ) +##include_directories( $ENV{IFDHC_FQ_DIR}/inc ) +##include_directories( $ENV{IFDH_ART_FQ_DIR}/inc ) + +include_directories( $ENV{SRPROXY_INC} ) + + add_subdirectory(SEAview) add_subdirectory(jobs) add_subdirectory(Libraries) diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index 448e1b519..a51c3d17d 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -103,6 +103,8 @@ #include "SEAview/SEAviewer.h" +//This is used to save some error messegae in fiducial_volume.h +#include "larcore/CoreUtils/ServiceUtil.h" //------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/ups/product_deps b/ups/product_deps index 70ffd6084..ffc178560 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -34,10 +34,10 @@ fwdir product_dir scripts # Add the dependent product and version product version -larsoft v09_48_01 -sbnobj v09_13_11 -sbnanaobj v09_18_02 -sbndaq_artdaq_core v1_00_00of2 +larsoft v09_54_00 +sbnobj v09_14_03 +sbnanaobj v09_18_05 +sbndaq_artdaq_core v1_01_00of0 genie_xsec v3_00_04a sbndata v01_03 From 08af7dac96d4e08c08059a6f2008aeb8f0c99d69 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Sat, 16 Jul 2022 12:54:32 -0500 Subject: [PATCH 37/54] add a pythagorean theorem function --- sbncode/CMakeLists.txt | 40 +++++++++---------- .../HelperFunctions/helper_math.h | 4 +- .../Libraries/analyze_Tracks.h | 1 - .../NCDeltaRadiative_module.cc | 4 -- .../NCRadiativeResonant_module.cc | 4 -- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index 051d0d3b9..dc6176464 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -6,23 +6,23 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) -add_subdirectory(SBNEventWeight) -add_subdirectory(NuMuSelection) -add_subdirectory(OpDet) -add_subdirectory(OpT0Finder) - -add_subdirectory(CAFMaker) -add_subdirectory(Metadata) - -add_subdirectory(Calibration) -add_subdirectory(FlashMatch) -add_subdirectory(LArRecoProducer) -add_subdirectory(TPCReco) - - -add_subdirectory(BeamSpillInfoRetriever) -add_subdirectory(FluxReader) -add_subdirectory(EventGenerator) -add_subdirectory(PID) -add_subdirectory(GeometryTools) -add_subdirectory(CosmicID) +#add_subdirectory(SBNEventWeight) +#add_subdirectory(NuMuSelection) +#add_subdirectory(OpDet) +#add_subdirectory(OpT0Finder) +# +#add_subdirectory(CAFMaker) +#add_subdirectory(Metadata) +# +#add_subdirectory(Calibration) +#add_subdirectory(FlashMatch) +#add_subdirectory(LArRecoProducer) +#add_subdirectory(TPCReco) +# +# +#add_subdirectory(BeamSpillInfoRetriever) +#add_subdirectory(FluxReader) +#add_subdirectory(EventGenerator) +#add_subdirectory(PID) +#add_subdirectory(GeometryTools) +#add_subdirectory(CosmicID) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h index 6fd66a426..1666be3ab 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -80,7 +80,7 @@ namespace single_photon double s1x = s1->ShowerStart().X()-vx; double s1y = s1->ShowerStart().Y()-vy; double s1z = s1->ShowerStart().Z()-vz; - double norm1 = sqrt(pow(s1x,2)+pow(s1y,2)+pow(s1z,2)); + double norm1 = std::hypot(s1x,s1y,s1z); s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) s1y = s1y/norm1; s1z = s1z/norm1; @@ -88,7 +88,7 @@ namespace single_photon double s2x = s2->ShowerStart().X()-vx; double s2y = s2->ShowerStart().Y()-vy; double s2z = s2->ShowerStart().Z()-vz; - double norm2 = sqrt(pow(s2x,2)+pow(s2y,2)+pow(s2z,2)); + double norm2 = std::hypot(s2x,s2y,s2z); s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) s2y = s2y/norm2; s2z = s2z/norm2; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h index 95cbac3d9..d0d981df2 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h @@ -2,7 +2,6 @@ #include "TVectorD.h" #include "TruncMean.h" - namespace single_photon { void SinglePhoton::AnalyzeTracks( diff --git a/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc b/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc index 4378e32bf..aff90eb39 100644 --- a/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc +++ b/sbncode/SinglePhotonAnalysis/NCDeltaRadiative_module.cc @@ -65,8 +65,6 @@ NCDeltaRadiative::NCDeltaRadiative(fhicl::ParameterSet const & p) : art::EDFilter(p), ftree(nullptr) { - if(true) { - art::ServiceHandle tfs; ftree = tfs->make("NCDeltaRadiativeFilter", ""); @@ -80,8 +78,6 @@ NCDeltaRadiative::NCDeltaRadiative(fhicl::ParameterSet const & p) : ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); - } - } diff --git a/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc index aa45604d0..2cba9eb13 100644 --- a/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc +++ b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc @@ -69,8 +69,6 @@ NCRadiativeResonant::NCRadiativeResonant(fhicl::ParameterSet const & p) : art::EDFilter(p), ftree(nullptr) { - if(true) { - art::ServiceHandle tfs; ftree = tfs->make("NCRadiativeResonantFilter", ""); @@ -84,8 +82,6 @@ NCRadiativeResonant::NCRadiativeResonant(fhicl::ParameterSet const & p) : ftree->Branch("parent_status_code", &fparent_status_code, "parent_status_code/I"); ftree->Branch("parent_pdg", &fparent_pdg, "parent_pdg/I"); - } - } From 387f3452ee954df7a7911b89ab64cd21b8c28d3a Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Sat, 16 Jul 2022 13:49:00 -0500 Subject: [PATCH 38/54] now can start breaking fown cxx & headers by introducing new modules --- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 44 +-- .../HelperFunctions/CMakeLists.txt | 21 +- .../helper_PandoraPFParticles.h | 285 ++++++++++++++++-- .../Libraries/CMakeLists.txt | 4 - .../SEAview/CMakeLists.txt | 6 +- .../SinglePhoton_module.cc | 1 - .../SinglePhoton_module.h | 167 +--------- 7 files changed, 286 insertions(+), 242 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index 43b9e2373..fa364baf7 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -1,7 +1,7 @@ link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) art_make( BASENAME_ONLY - LIB_LIBRARIES + LIB_LIBRARIES larcorealg_Geometry larcore_Geometry_Geometry_service lardata_Utilities @@ -29,51 +29,21 @@ art_make( BASENAME_ONLY art_Persistency_Provenance canvas art_Utilities canvas ${MF_MESSAGELOGGER} - ${FHICLCPP} cetlib cetlib_except ${CLHEP} ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} - MODULE_LIBRARIES - sbncode_SinglePhotonAnalysis_SEAview - larcorealg_Geometry - larcore_Geometry_Geometry_service - lardata_Utilities - larevt_Filters - lardataobj_RawData - lardataobj_RecoBase - lardataobj_MCBase - larcoreobj_SummaryData - larsim_MCCheater_BackTrackerService_service - larpandora_LArPandoraInterface - nusimdata_SimulationBase - ${Boost_SERIALIZATION_LIBRARY} - ${ART_FRAMEWORK_CORE} - ${ART_FRAMEWORK_PRINCIPAL} - ${ART_FRAMEWORK_SERVICES_REGISTRY} - ${ART_FRAMEWORK_SERVICES_OPTIONAL} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_RANDOMNUMBERGENERATOR_SERVICE} - ${ART_FRAMEWORK_SERVICES_OPTIONAL_TFILESERVICE_SERVICE} - ${ART_ROOT_IO_TFILE_SUPPORT} ${ROOT_CORE} + ${ROOT_CORE} + ${ART_ROOT_IO_TFILE_SUPPORT} + MODULE_LIBRARIES + HelperFunctions ${ART_ROOT_IO_TFILESERVICE_SERVICE} - art_Persistency_Common canvas - art_Persistency_Provenance canvas - art_Utilities canvas - ${MF_MESSAGELOGGER} - - ${FHICLCPP} - cetlib cetlib_except - ${CLHEP} - ${ROOT_BASIC_LIB_LIST} - ${ROOT_GEOM} ) + sbncode_SinglePhotonAnalysis_SEAview + ) cet_find_library( IFDH NAMES ifdh PATHS ENV IFDHC_LIB NO_DEFAULT_PATH ) -##include_directories( $ENV{IFDHC_FQ_DIR}/inc ) -##include_directories( $ENV{IFDH_ART_FQ_DIR}/inc ) include_directories( $ENV{SRPROXY_INC} ) - - add_subdirectory(SEAview) add_subdirectory(jobs) add_subdirectory(Libraries) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt index 4aca51a83..7c302c498 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt @@ -1,3 +1,18 @@ -install_headers() -install_fhicl() -install_source() +art_make_library( LIBRARY_NAME HelperFunctions + SOURCE helper_PandoraPFParticles.cxx + LIBRARIES + ${ART_FRAMEWORK_CORE} + ${ART_FRAMEWORK_SERVICES_REGISTRY} + ${ART_FRAMEWORK_SERVICES} + ${ART_FRAMEWORK_PRINCIPAL} + art_Persistency_Common + art_Utilities canvas + ${ROOT_BASIC_LIB_LIST} + ${MF_MESSAGELOGGER} + ${MF_UTILITIES} + ${FHICLCPP} + cetlib cetlib_except + larsim_MCCheater_BackTrackerService_service + larsim_MCCheater_ParticleInventoryService_service + larcorealg_Geometry + ) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index 83dabaabd..347f160fc 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -1,38 +1,269 @@ +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" + +//KENG, should use these in sbndcode + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +//KENG +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +//#include "ubobj/Optical/UbooneOpticalFilter.h" + +// Helper function for PID stuff +//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" +#include "TGeoPolygon.h" + +//#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + namespace single_photon -{//helper functions exclusively for PandoraPFParticles - -//1. Filler for each PandoraPFParticle - //find pAncestor & pAncesotrID - void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs){ +{ + class PandoraPFParticle{ - std::map< size_t, art::Ptr> pfParticleMap; - int pfp_size = PPFPs.size(); - //build ID-PFParticle map; - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle temp_pfp = PPFPs[index]; - if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ - throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; - } - } + private: + double pVertex_pos[3] = {-9999,-9999,-9999};//d + + double pNuScore = -999 ;//d + double pTrackScore = -999;//d + + bool pIsNeutrino = false;//d + bool pIsClearCosmic = false;//d + bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. + bool pHasPID = false;//d + + int pHasShower = 0;//d + int pHasTrack = 0;//d + int pPdgCode = -999;//d + int pPFParticleID = -9;//d + int pAncestorID = -9;//d + int pSliceID = -9;//d - //trace up parents - for(int jndex = 0; jndex < pfp_size; jndex++){ - art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; - PPFPs[jndex].set_AncestorID(temp_pfp->Self() ); - PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; - if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself + public: + //constructor: + PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks, + art::FindManyP input_Hits + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) + { + pPFParticleID = pPFParticle->Self(); + pPdgCode = pPFParticle->PdgCode(); - while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent + //Get recob::Shower/Track + const unsigned int nShowers(input_Showers.size()); + const unsigned int nTracks(input_Tracks.size()); + if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; - int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); - PPFPs[jndex].set_AncestorID( temp_parent_id ); - PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; - // std::cout< vertex = * (pVertex.begin()); + vertex->XYZ(pVertex_pos); + } + + //fill pPFPHits from each clusters; + for(size_t index=0; index< pClusters.size(); ++index){ + auto cluster = pClusters[index]; + std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); + pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); } - } - } + + //get ancestor for a 1st generation PFParticle + if(pPFParticle->IsPrimary()){ + pAncestor = pPFParticle; + pAncestorID = -1; + } + + //fill in some booleans + for(auto &meta: pMetaData){ + std::map propertiesmap = meta->GetPropertiesMap(); + if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; + if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; + if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; + if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; + } + + }; + + art::Ptr< recob::PFParticle > pPFParticle;//d + art::Ptr< recob::Shower> pShower;//d with 0 or 1 element + art::Ptr< recob::Track > pTrack;//d with 0 or 1 element + art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() + + art::Ptr pParticleID;//d for track only; + art::Ptr< simb::MCTruth > pMCTruth; + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d + std::vector< art::Ptr< recob::Vertex > > pVertex;//d + std::vector< art::Ptr< recob::Hit > > pSliceHits;//d + std::vector< art::Ptr< recob::Hit > > pPFPHits;//d + std::vector< art::Ptr< recob::Cluster > > pClusters;//d + std::vector> pCalorimetries;//d + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; + std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + + + //set methods + void set_NuScore (const double input_score){ pNuScore = input_score; } + // void set_TrackScore (const double input_score){ pTrackScore = input_score; } + + // void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } + // void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } + void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } + void set_HasPID (const bool input_bool){ pHasPID = input_bool; } + + // void set_HasShower (const int input_number){ pHasShower = input_number; } + // void set_HasTrack (const int input_number){ pHasTrack = input_number; } + // void set_PdgCode (const int input_number){ pPdgCode = input_number; } + // void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } + void set_AncestorID (const int input_number){ pAncestorID = input_number; } + void set_SliceID (const int input_number){ pSliceID = input_number; } + + void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } + void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } + + //call method + const art::Ptr get_ParticleID() const; + const std::vector> get_Calorimetries() const; + + + const double* get_Vertex_pos() const; + + const double get_NuScore() const; + const double get_TrackScore () const; + + const bool get_IsNeutrino () const; + const bool get_IsClearCosmic () const; + const bool get_IsNuSlice () const; + const bool get_HasPID () const; + + const int get_HasShower () const; + const int get_HasTrack () const; + const int get_PdgCode() const; + const int get_PFParticleID() const; + const int get_AncestorID() const; + const int get_SliceID () const; + }; + + inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } + inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } + + inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } + + inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } + inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } + + inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } + inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } + inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } + inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } + + inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } + inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } + inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } + inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } + inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } + inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } + + + + + +//helper functions exclusively for PandoraPFParticles + +//1. Filler for each PandoraPFParticle + //find pAncestor & pAncesotrID + void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs); //Fill pSlice, pHits, pSliceID void PPFP_FindSliceIDandHits(std::vector< PandoraPFParticle > & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt index efef81222..c4c3a2a33 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt @@ -64,7 +64,3 @@ art_make( BASENAME_ONLY ${CLHEP} ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} ) - -install_headers() -install_fhicl() -install_source() diff --git a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt index 7f1848ba4..198164e73 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt @@ -35,7 +35,7 @@ art_make( ${CLHEP} ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} - MODULE_LIBRARIES + MODULE_LIBRARIES larcorealg_Geometry larcore_Geometry_Geometry_service lardata_Utilities @@ -65,7 +65,3 @@ art_make( ${CLHEP} ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} ) - -install_headers() -install_fhicl() -install_source() diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index e5a4d0825..4834fa409 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,6 +1,5 @@ #include "SinglePhoton_module.h" #include "HelperFunctions/helper_processors.h" //now it can use variables defined in singlephoton.h -#include "HelperFunctions/helper_PandoraPFParticles.h" //now it can use variables defined in singlephoton.h #include "Libraries/init_branches.h" #include "Libraries/reco_truth_matching.h" //#include "analyze_Template.h" diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index a51c3d17d..de5d61013 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -1,6 +1,8 @@ #ifndef SINGLE_PHOTON_ANALYSIS #define SINGLE_PHOTON_ANALYSIS +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + #include "art/Framework/Core/ModuleMacros.h" #include "art/Framework/Core/EDFilter.h" #include "art/Framework/Core/EDAnalyzer.h" @@ -112,171 +114,6 @@ namespace single_photon { //Create a class based on PFParticle, connected to other Pandora objects - //CHECK, blending this to the code; not active yet; - class PandoraPFParticle{ - - private: - double pVertex_pos[3] = {-9999,-9999,-9999};//d - - double pNuScore = -999 ;//d - double pTrackScore = -999;//d - - bool pIsNeutrino = false;//d - bool pIsClearCosmic = false;//d - bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. - bool pHasPID = false;//d - - int pHasShower = 0;//d - int pHasTrack = 0;//d - int pPdgCode = -999;//d - int pPFParticleID = -9;//d - int pAncestorID = -9;//d - int pSliceID = -9;//d - - - public: - //constructor: - PandoraPFParticle( - art::Ptr input_PFParticle, - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, - std::vector< art::Ptr > input_Vertex, - std::vector< art::Ptr > input_Clusters, - std::vector< art::Ptr > input_Showers, - std::vector< art::Ptr > input_Tracks, - art::FindManyP input_Hits - ) - : - pPFParticle(input_PFParticle), - pMetaData(input_MetaData), - pVertex(input_Vertex), - pClusters(input_Clusters) - { - pPFParticleID = pPFParticle->Self(); - pPdgCode = pPFParticle->PdgCode(); - - //Get recob::Shower/Track - const unsigned int nShowers(input_Showers.size()); - const unsigned int nTracks(input_Tracks.size()); - if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; - - pHasShower = nShowers; - pHasTrack = nTracks; - if(pHasShower == 1) pShower=input_Showers.front(); - if(pHasTrack == 1) pTrack=input_Tracks.front(); - - - //fill the vertex info. - if (!pVertex.empty()){ - const art::Ptr vertex = * (pVertex.begin()); - vertex->XYZ(pVertex_pos); - } - - //fill pPFPHits from each clusters; - for(size_t index=0; index< pClusters.size(); ++index){ - auto cluster = pClusters[index]; - std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); - pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); - } - - //get ancestor for a 1st generation PFParticle - if(pPFParticle->IsPrimary()){ - pAncestor = pPFParticle; - pAncestorID = -1; - } - - //fill in some booleans - for(auto &meta: pMetaData){ - std::map propertiesmap = meta->GetPropertiesMap(); - if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; - if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; - if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; - if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; - } - - }; - - art::Ptr< recob::PFParticle > pPFParticle;//d - art::Ptr< recob::Shower> pShower;//d with 0 or 1 element - art::Ptr< recob::Track > pTrack;//d with 0 or 1 element - art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() - art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() - - art::Ptr pParticleID;//d for track only; - art::Ptr< simb::MCTruth > pMCTruth; - - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d - std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pSliceHits;//d - std::vector< art::Ptr< recob::Hit > > pPFPHits;//d - std::vector< art::Ptr< recob::Cluster > > pClusters;//d - std::vector> pCalorimetries;//d - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; - std::vector< art::Ptr< simb::MCParticle > > pMCParticles; - - - //set methods - void set_NuScore (const double input_score){ pNuScore = input_score; } - // void set_TrackScore (const double input_score){ pTrackScore = input_score; } - - // void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } - // void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } - void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } - void set_HasPID (const bool input_bool){ pHasPID = input_bool; } - - // void set_HasShower (const int input_number){ pHasShower = input_number; } - // void set_HasTrack (const int input_number){ pHasTrack = input_number; } - // void set_PdgCode (const int input_number){ pPdgCode = input_number; } - // void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } - void set_AncestorID (const int input_number){ pAncestorID = input_number; } - void set_SliceID (const int input_number){ pSliceID = input_number; } - - void set_ParticleID (const art::Ptr input_ParticleID){pParticleID = input_ParticleID; } - void set_Calorimetries (const std::vector> input_Calorimetries){pCalorimetries = input_Calorimetries; } - - //call method - const art::Ptr get_ParticleID() const; - const std::vector> get_Calorimetries() const; - - - const double* get_Vertex_pos() const; - - const double get_NuScore() const; - const double get_TrackScore () const; - - const bool get_IsNeutrino () const; - const bool get_IsClearCosmic () const; - const bool get_IsNuSlice () const; - const bool get_HasPID () const; - - const int get_HasShower () const; - const int get_HasTrack () const; - const int get_PdgCode() const; - const int get_PFParticleID() const; - const int get_AncestorID() const; - const int get_SliceID () const; - }; - - inline const art::Ptr PandoraPFParticle::get_ParticleID() const { return pParticleID; } - inline const std::vector> PandoraPFParticle::get_Calorimetries() const { return pCalorimetries; } - - inline const double* PandoraPFParticle::get_Vertex_pos() const { return pVertex_pos; } - - inline const double PandoraPFParticle::get_NuScore() const { return pNuScore; } - inline const double PandoraPFParticle::get_TrackScore () const { return pTrackScore; } - - inline const bool PandoraPFParticle::get_IsNeutrino () const { return pIsNeutrino; } - inline const bool PandoraPFParticle::get_IsClearCosmic () const { return pIsClearCosmic; } - inline const bool PandoraPFParticle::get_IsNuSlice () const { return pIsNuSlice; } - inline const bool PandoraPFParticle::get_HasPID () const { return pHasPID; } - - inline const int PandoraPFParticle::get_HasShower () const { return pHasShower; } - inline const int PandoraPFParticle::get_HasTrack () const { return pHasTrack; } - inline const int PandoraPFParticle::get_PdgCode() const { return pPdgCode; } - inline const int PandoraPFParticle::get_PFParticleID() const { return pPFParticleID; } - inline const int PandoraPFParticle::get_AncestorID() const { return pAncestorID; } - inline const int PandoraPFParticle::get_SliceID () const { return pSliceID; } - - //this is for second_shower_search.h struct sss_score{ int plane; From d9b9a1ee632a860c06d968f415860fd06ad05dc4 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Sat, 16 Jul 2022 14:36:26 -0500 Subject: [PATCH 39/54] going to expand other headers --- .../HelperFunctions/CMakeLists.txt | 4 +- .../helper_PandoraPFParticles.h | 257 ++++-------------- .../SinglePhoton_module.h | 2 - 3 files changed, 49 insertions(+), 214 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt index 7c302c498..f0d733206 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt @@ -1,5 +1,7 @@ +FILE( GLOB local_src_files *.cxx ) + art_make_library( LIBRARY_NAME HelperFunctions - SOURCE helper_PandoraPFParticles.cxx + SOURCE ${local_src_files} LIBRARIES ${ART_FRAMEWORK_CORE} ${ART_FRAMEWORK_SERVICES_REGISTRY} diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index 347f160fc..7fc64b61b 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -1,13 +1,10 @@ -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" +#ifndef HELPER_PANDORAPFPARTICLES_H +#define HELPER_PANDORAPFPARTICLES_H + + #include "art/Framework/Principal/Handle.h" #include "art/Framework/Services/Registry/ServiceHandle.h" -//KENG, should use these in sbndcode - #include "lardataobj/RecoBase/PFParticleMetadata.h" #include "lardataobj/RecoBase/PFParticle.h" #include "lardataobj/RecoBase/Slice.h" @@ -19,7 +16,7 @@ #include "lardataobj/RecoBase/Hit.h" #include "lardataobj/RecoBase/SpacePoint.h" #include "lardataobj/RecoBase/OpFlash.h" -//KENG + #include "sbnobj/Common/CRT/CRTHit.hh" #include "lardataobj/MCBase/MCTrack.h" #include "lardataobj/MCBase/MCShower.h" @@ -29,12 +26,8 @@ #include "lardataobj/Simulation/SimChannel.h" #include "lardataobj/Simulation/GeneratedParticleInfo.h" -#include "larsim/EventWeight/Base/MCEventWeight.h" - #include "larevt/SpaceChargeServices/SpaceChargeService.h" -#include "larcoreobj/SummaryData/POTSummary.h" - #include "nusimdata/SimulationBase/MCParticle.h" #include "nusimdata/SimulationBase/MCTruth.h" #include "nusimdata/SimulationBase/simb.h" @@ -46,10 +39,6 @@ #include "lardata/DetectorInfoServices/LArPropertiesService.h" #include "lardata/DetectorInfoServices/DetectorClocksService.h" -#include "larcore/Geometry/Geometry.h" - -//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" - #include "canvas/Utilities/ensurePointer.h" #include "canvas/Persistency/Common/FindManyP.h" #include "canvas/Persistency/Common/FindMany.h" @@ -62,17 +51,6 @@ //#include "ubobj/Optical/UbooneOpticalFilter.h" -// Helper function for PID stuff -//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" - -#include "TCanvas.h" -#include "TTree.h" -#include "TFile.h" -#include "TGraph.h" -#include "TGraph2D.h" -#include "TGraphDelaunay.h" -#include "TRandom3.h" -#include "TGeoPolygon.h" //#include "Pandora/PdgTable.h" #include @@ -95,22 +73,22 @@ namespace single_photon class PandoraPFParticle{ private: - double pVertex_pos[3] = {-9999,-9999,-9999};//d + double pVertex_pos[3] = {-9999,-9999,-9999}; - double pNuScore = -999 ;//d - double pTrackScore = -999;//d + double pNuScore = -999 ; + double pTrackScore = -999; - bool pIsNeutrino = false;//d - bool pIsClearCosmic = false;//d - bool pIsNuSlice = false;//d it is defined in the DefineNuSlice() function. - bool pHasPID = false;//d + bool pIsNeutrino = false; + bool pIsClearCosmic = false; + bool pIsNuSlice = false; //it is defined in the DefineNuSlice() function. + bool pHasPID = false; - int pHasShower = 0;//d - int pHasTrack = 0;//d - int pPdgCode = -999;//d - int pPFParticleID = -9;//d - int pAncestorID = -9;//d - int pSliceID = -9;//d + int pHasShower = 0; + int pHasTrack = 0; + int pPdgCode = -999; + int pPFParticleID = -9; + int pAncestorID = -9; + int pSliceID = -9; public: @@ -122,90 +100,32 @@ namespace single_photon std::vector< art::Ptr > input_Clusters, std::vector< art::Ptr > input_Showers, std::vector< art::Ptr > input_Tracks, - art::FindManyP input_Hits - ) - : - pPFParticle(input_PFParticle), - pMetaData(input_MetaData), - pVertex(input_Vertex), - pClusters(input_Clusters) - { - pPFParticleID = pPFParticle->Self(); - pPdgCode = pPFParticle->PdgCode(); - - //Get recob::Shower/Track - const unsigned int nShowers(input_Showers.size()); - const unsigned int nTracks(input_Tracks.size()); - if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; - - pHasShower = nShowers; - pHasTrack = nTracks; - if(pHasShower == 1) pShower=input_Showers.front(); - if(pHasTrack == 1) pTrack=input_Tracks.front(); - - - //fill the vertex info. - if (!pVertex.empty()){ - const art::Ptr vertex = * (pVertex.begin()); - vertex->XYZ(pVertex_pos); - } - - //fill pPFPHits from each clusters; - for(size_t index=0; index< pClusters.size(); ++index){ - auto cluster = pClusters[index]; - std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); - pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); - } - - //get ancestor for a 1st generation PFParticle - if(pPFParticle->IsPrimary()){ - pAncestor = pPFParticle; - pAncestorID = -1; - } - - //fill in some booleans - for(auto &meta: pMetaData){ - std::map propertiesmap = meta->GetPropertiesMap(); - if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; - if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; - if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; - if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; - } - - }; - - art::Ptr< recob::PFParticle > pPFParticle;//d - art::Ptr< recob::Shower> pShower;//d with 0 or 1 element - art::Ptr< recob::Track > pTrack;//d with 0 or 1 element - art::Ptr< recob::Slice > pSlice;//d in helper_connector.h get the id from pSlice->key() - art::Ptr< recob::PFParticle > pAncestor;//d found by tracing Parent() - - art::Ptr pParticleID;//d for track only; - art::Ptr< simb::MCTruth > pMCTruth; - - std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData;//d - std::vector< art::Ptr< recob::Vertex > > pVertex;//d - std::vector< art::Ptr< recob::Hit > > pSliceHits;//d - std::vector< art::Ptr< recob::Hit > > pPFPHits;//d - std::vector< art::Ptr< recob::Cluster > > pClusters;//d - std::vector> pCalorimetries;//d - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints; - std::vector< art::Ptr< simb::MCParticle > > pMCParticles; + art::FindManyP input_Hits ); + + art::Ptr< recob::PFParticle > pPFParticle; + art::Ptr< recob::Shower> pShower; //with 0 or 1 element + art::Ptr< recob::Track > pTrack; //with 0 or 1 element + art::Ptr< recob::Slice > pSlice; //in helper_connector.h get the id from pSlice->key() + art::Ptr< recob::PFParticle > pAncestor; //found by tracing Parent() + + art::Ptr pParticleID; //for track only; + art::Ptr< simb::MCTruth > pMCTruth;//WARNNING NOT USED YET + + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData; + std::vector< art::Ptr< recob::Vertex > > pVertex; + std::vector< art::Ptr< recob::Hit > > pSliceHits; + std::vector< art::Ptr< recob::Hit > > pPFPHits; + std::vector< art::Ptr< recob::Cluster > > pClusters; + std::vector> pCalorimetries; + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints;//WARNNING NOT USED YET + std::vector< art::Ptr< simb::MCParticle > > pMCParticles;//WARNNING NOT USED YET //set methods void set_NuScore (const double input_score){ pNuScore = input_score; } - // void set_TrackScore (const double input_score){ pTrackScore = input_score; } - - // void set_IsNeutrino (const bool input_bool){ pIsNeutrino = input_bool; } - // void set_IsClearCosmic (const bool input_bool){ pIsClearCosmic = input_bool; } void set_IsNuSlice (const bool input_bool){ pIsNuSlice = input_bool; } void set_HasPID (const bool input_bool){ pHasPID = input_bool; } - // void set_HasShower (const int input_number){ pHasShower = input_number; } - // void set_HasTrack (const int input_number){ pHasTrack = input_number; } - // void set_PdgCode (const int input_number){ pPdgCode = input_number; } - // void set_PFParticleID (const int input_number){ pPFParticleID = input_number; } void set_AncestorID (const int input_number){ pAncestorID = input_number; } void set_SliceID (const int input_number){ pSliceID = input_number; } @@ -257,108 +177,23 @@ namespace single_photon - - //helper functions exclusively for PandoraPFParticles - + //1. Filler for each PandoraPFParticle //find pAncestor & pAncesotrID void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs); //Fill pSlice, pHits, pSliceID - void PPFP_FindSliceIDandHits(std::vector< PandoraPFParticle > & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ - - int pfp_size = PPFPs.size(); - for( auto pfp : PFP_in_slice){ - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_SliceID() > -1 ) continue;//slice# is found already - if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ - PPFPs[index].pSlice = slice; - PPFPs[index].pSliceHits = Hit_inslice; - PPFPs[index].set_SliceID( slice.key() ); - break; - } - } - } - } + void PPFP_FindSliceIDandHits(std::vector< PandoraPFParticle > & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice); //refill pNuScore and pIsNuSlice - int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ - - int pfp_size = PPFPs.size(); - double best_nuscore = 0; - int best_nuscore_SliceID = 0; - std::vector< int > IDs; - - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle* temp_p = &PPFPs[index]; - if(temp_p->get_IsNeutrino()){ - int temp_sliceID = temp_p->get_SliceID(); - //add one if not found; - if(!std::count(IDs.begin(), IDs.end(), temp_sliceID) ) IDs.push_back(temp_sliceID); - if(best_nuscore < temp_p->get_NuScore() ){ - best_nuscore = temp_p->get_NuScore(); - - best_nuscore_SliceID = temp_p->get_SliceID(); - - } - } - } - - //now markdown all pfparticles in slice - //re-set pNuScore and pIsNuSlice - for(int index = 0; index < pfp_size; index++){ - PandoraPFParticle* ppfp = &PPFPs[index]; - if( std::count(IDs.begin(), IDs.end(), ppfp->get_SliceID()) ) ppfp->set_IsNuSlice(true); - } - - return best_nuscore_SliceID; - } - - - -//2. Trackers to find the correct PandoraPFParticle - PandoraPFParticle *PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_HasShower() != 1 ) continue; -// std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) - && (pShower->Direction() == PPFPs[index].pShower->Direction())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_HasTrack() != 1 ) continue; - if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) - && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs, int id){ - int pfp_size = PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - if(PPFPs[index].get_PFParticleID() == id ){ - return &PPFPs[index]; - } - } - std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs); +//2. Trackers to find the correct PandoraPFParticle based on different inputs + PandoraPFParticle *PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower); + PandoraPFParticle* PPFP_GetPPFPFromTrack( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pTrack); + PandoraPFParticle* PPFP_GetPPFPFromPFID( std::vector< PandoraPFParticle > & PPFPs, int id); } + +#endif diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h index de5d61013..dceb7f07c 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h @@ -1901,5 +1901,3 @@ namespace single_photon } // namespace lar_pandora #endif -//------------------------------------------------------------------------------------------------------------------------------------------ -// implementation follows From f3a4cb70a7a3a61880d91143fe12bbf22b163532 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 20 Jul 2022 23:28:01 -0500 Subject: [PATCH 40/54] add .cxx files paired with headers --- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 6 +- .../HelperFunctions/CMakeLists.txt | 6 +- .../helper_PandoraPFParticles.cxx | 192 + .../helper_PandoraPFParticles.h | 24 +- .../HelperFunctions/helper_gadget.cxx | 25 + .../HelperFunctions/helper_gadget.h | 35 +- .../HelperFunctions/helper_math.h | 410 +- .../HelperFunctions/helper_processors.h | 540 --- .../Libraries/CMakeLists.txt | 107 +- .../Libraries/Processors.cxx | 552 +++ .../Libraries/Processors.h | 92 + .../Libraries/analyze_EventWeight.h | 172 - .../Libraries/analyze_Geant4.h | 56 - .../{analyze_MCTruth.h => analyze_MC.cxx} | 422 ++- .../Libraries/analyze_MC.h | 37 + .../Libraries/analyze_OpFlashes.h | 118 - ...alyze_Tracks.h => analyze_PandoraReco.cxx} | 705 +++- .../Libraries/analyze_PandoraReco.h | 39 + .../Libraries/analyze_Showers.h | 627 ---- .../Libraries/analyze_Slice.h | 501 --- .../Libraries/fiducial_volume.cxx | 208 ++ .../Libraries/fiducial_volume.h | 306 +- .../Libraries/init_branches.cxx | 2201 +++++++++++ .../Libraries/init_branches.h | 3299 ++++++----------- .../Libraries/isolation.h | 602 --- .../Libraries/output_ntuple.h | 43 - .../Libraries/reco_truth_matching.cxx | 662 ++++ .../Libraries/reco_truth_matching.h | 585 +-- .../Libraries/second_shower_search.cxx | 1676 +++++++++ .../Libraries/second_shower_search.h | 1090 +----- .../Libraries/variables.h | 1134 ++++++ sbncode/SinglePhotonAnalysis/README.md | 18 +- .../SinglePhoton_module.cc | 768 +++- .../SinglePhoton_module.h | 1903 ---------- 34 files changed, 10005 insertions(+), 9156 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.cxx create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.cxx delete mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/Processors.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_Geant4.h rename sbncode/SinglePhotonAnalysis/Libraries/{analyze_MCTruth.h => analyze_MC.cxx} (52%) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h rename sbncode/SinglePhotonAnalysis/Libraries/{analyze_Tracks.h => analyze_PandoraReco.cxx} (53%) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/analyze_Slice.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/isolation.h delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/output_ntuple.h create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/variables.h delete mode 100644 sbncode/SinglePhotonAnalysis/SinglePhoton_module.h diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index fa364baf7..8bdf8d33f 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -1,4 +1,3 @@ -link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) art_make( BASENAME_ONLY LIB_LIBRARIES @@ -34,10 +33,11 @@ art_make( BASENAME_ONLY ${CLHEP} ${ROOT_BASIC_LIB_LIST} ${ROOT_GEOM} - ${ROOT_CORE} + ${ROOT_CORE} ${ART_ROOT_IO_TFILE_SUPPORT} MODULE_LIBRARIES - HelperFunctions + sbncode_SinglePhotonAnalysis_HelperFunctions + sbncode_SinglePhotonAnalysis_Libraries ${ART_ROOT_IO_TFILESERVICE_SERVICE} sbncode_SinglePhotonAnalysis_SEAview ) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt index f0d733206..42fbdb06e 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/CMakeLists.txt @@ -1,7 +1,7 @@ -FILE( GLOB local_src_files *.cxx ) +FILE( GLOB local_src_helpers *.cxx ) -art_make_library( LIBRARY_NAME HelperFunctions - SOURCE ${local_src_files} +art_make_library( LIBRARY_NAME sbncode_SinglePhotonAnalysis_HelperFunctions + SOURCE ${local_src_helpers} LIBRARIES ${ART_FRAMEWORK_CORE} ${ART_FRAMEWORK_SERVICES_REGISTRY} diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.cxx b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.cxx new file mode 100644 index 000000000..01f5845d7 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.cxx @@ -0,0 +1,192 @@ +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + +namespace single_photon +{ + PandoraPFParticle::PandoraPFParticle( + art::Ptr input_PFParticle, + std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, + std::vector< art::Ptr > input_Vertex, + std::vector< art::Ptr > input_Clusters, + std::vector< art::Ptr > input_Showers, + std::vector< art::Ptr > input_Tracks, + art::FindManyP input_Hits + ) + : + pPFParticle(input_PFParticle), + pMetaData(input_MetaData), + pVertex(input_Vertex), + pClusters(input_Clusters) + { + pPFParticleID = pPFParticle->Self(); + pPdgCode = pPFParticle->PdgCode(); + + //Get recob::Shower/Track + const unsigned int nShowers(input_Showers.size()); + const unsigned int nTracks(input_Tracks.size()); + if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n"; + + pHasShower = nShowers; + pHasTrack = nTracks; + if(pHasShower == 1) pShower=input_Showers.front(); + if(pHasTrack == 1) pTrack=input_Tracks.front(); + + + //fill the vertex info. + if (!pVertex.empty()){ + const art::Ptr vertex = * (pVertex.begin()); + vertex->XYZ(pVertex_pos); + } + + //fill pPFPHits from each clusters; + for(size_t index=0; index< pClusters.size(); ++index){ + auto cluster = pClusters[index]; + std::vector< art::Ptr > temp_hits = input_Hits.at(cluster.key()); + pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end()); + } + + //get ancestor for a 1st generation PFParticle + if(pPFParticle->IsPrimary()){ + pAncestor = pPFParticle; + pAncestorID = -1; + } + + //fill in some booleans + for(auto &meta: pMetaData){ + std::map propertiesmap = meta->GetPropertiesMap(); + if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"]; + if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"]; + if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true; + if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true; + } + + } + + //helper functions exclusively for PandoraPFParticles + void PPFP_FindAncestor ( std::vector< PandoraPFParticle > & PPFPs){ + + std::map< size_t, art::Ptr> pfParticleMap; + int pfp_size = PPFPs.size(); + //build ID-PFParticle map; + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle temp_pfp = PPFPs[index]; + if (!pfParticleMap.insert(std::map< size_t, art::Ptr>::value_type((temp_pfp.pPFParticle)->Self(), temp_pfp.pPFParticle)).second){ + throw cet::exception("SinglePhoton") << " Unable to get PFParticle ID map, the input PFParticle collection has repeat IDs!"; + } + } + + //trace up parents + for(int jndex = 0; jndex < pfp_size; jndex++){ + art::Ptr< recob::PFParticle > temp_pfp = PPFPs[jndex].pPFParticle; + + PPFPs[jndex].set_AncestorID(temp_pfp->Self() ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_pfp->Self()]; + if(temp_pfp->IsPrimary()) continue;//skip PFP without parent is a parent of itself + + while(!(PPFPs[jndex].pAncestor)->IsPrimary()){//1+ gen. parent + + int temp_parent_id = PPFPs[jndex].pAncestor->Parent(); + PPFPs[jndex].set_AncestorID( temp_parent_id ); + PPFPs[jndex].pAncestor = pfParticleMap[temp_parent_id]; + // std::cout< & PPFPs, art::Ptr< recob::Slice > slice, const std::vector > PFP_in_slice, const std::vector > Hit_inslice){ + + int pfp_size = PPFPs.size(); + for( auto pfp : PFP_in_slice){ + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_SliceID() > -1 ) continue;//slice# is found already + if( (PPFPs[index].pPFParticle)->Self() == pfp->Self() ){ + PPFPs[index].pSlice = slice; + PPFPs[index].pSliceHits = Hit_inslice; + PPFPs[index].set_SliceID( slice.key() ); + break; + } + } + } + } + + + //refill pNuScore and pIsNuSlice + int DefineNuSlice(std::vector< PandoraPFParticle > & PPFPs){ + + int pfp_size = PPFPs.size(); + double best_nuscore = 0; + int best_nuscore_SliceID = 0; + std::vector< int > IDs; + + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle* temp_p = &PPFPs[index]; + if(temp_p->get_IsNeutrino()){ + int temp_sliceID = temp_p->get_SliceID(); + //add one if not found; + if(!std::count(IDs.begin(), IDs.end(), temp_sliceID) ) IDs.push_back(temp_sliceID); + if(best_nuscore < temp_p->get_NuScore() ){ + best_nuscore = temp_p->get_NuScore(); + + best_nuscore_SliceID = temp_p->get_SliceID(); + + } + } + } + + //now markdown all pfparticles in slice + //re-set pNuScore and pIsNuSlice + for(int index = 0; index < pfp_size; index++){ + PandoraPFParticle* ppfp = &PPFPs[index]; + if( std::count(IDs.begin(), IDs.end(), ppfp->get_SliceID()) ) ppfp->set_IsNuSlice(true); + } + + return best_nuscore_SliceID; + } + + //2. Trackers to find the correct PandoraPFParticle + PandoraPFParticle* PPFP_GetPPFPFromShower( std::vector< PandoraPFParticle > & PPFPs, art::Ptr pShower){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasShower() != 1 ) continue; + // std::cout<<"CHECK Shower start "<ShowerStart().X()<<" vs "<ShowerStart().X()<ShowerStart() == PPFPs[index].pShower->ShowerStart()) + && (pShower->Direction() == PPFPs[index].pShower->Direction())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to shower, returning the first element"< & PPFPs, art::Ptr pTrack){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_HasTrack() != 1 ) continue; + if((pTrack->StartDirection() == PPFPs[index].pTrack->StartDirection()) + && (pTrack->EndDirection() == PPFPs[index].pTrack->EndDirection())){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< & PPFPs, int id){ + int pfp_size = PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + if(PPFPs[index].get_PFParticleID() == id ){ + return &PPFPs[index]; + } + } + std::cout<<"Error, no PFParticle matched to track, returning the first element"< #include #include -#include #include #include #include -#include #include -#include #include @@ -109,7 +93,7 @@ namespace single_photon art::Ptr< recob::PFParticle > pAncestor; //found by tracing Parent() art::Ptr pParticleID; //for track only; - art::Ptr< simb::MCTruth > pMCTruth;//WARNNING NOT USED YET + art::Ptr< simb::MCTruth > pMCTruth;//WARNING NOT USED YET std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData; std::vector< art::Ptr< recob::Vertex > > pVertex; @@ -117,8 +101,8 @@ namespace single_photon std::vector< art::Ptr< recob::Hit > > pPFPHits; std::vector< art::Ptr< recob::Cluster > > pClusters; std::vector> pCalorimetries; - std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints;//WARNNING NOT USED YET - std::vector< art::Ptr< simb::MCParticle > > pMCParticles;//WARNNING NOT USED YET + std::vector< art::Ptr< recob::SpacePoint > > pSpacePoints;//WARNING NOT USED YET + std::vector< art::Ptr< simb::MCParticle > > pMCParticles;//WARNING NOT USED YET //set methods diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.cxx b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.cxx new file mode 100644 index 000000000..a82d806ac --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.cxx @@ -0,0 +1,25 @@ +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" +//table printers +std::vector single_photon::Printer_header( std::vector< std::string> headings){ + + std::vector spacers; + for( size_t index = 0; index < headings.size(); index++){ + std::cout< nums, std::vector spacers){ + + if(nums.size() != spacers.size()) { + std::cout<<"CANNOT PRINT!"< Printer_header( std::vector< std::string> headings){ +#ifndef HELPER_GADGET_H +#define HELPER_GADGET_H - std::vector spacers; - for( size_t index = 0; index < headings.size(); index++){ - std::cout< +#include +#include - void Printer_content( std::vector< std::string > nums, std::vector spacers){ - if(nums.size() != spacers.size()) { - std::cout<<"CANNOT PRINT!"< Printer_header( std::vector< std::string> headings); - for( size_t index = 0; index < nums.size(); index++){ - std::cout< nums, std::vector spacers); } + +#endif diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h index 1666be3ab..46762d7a4 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -1,184 +1,189 @@ +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H +#define SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H + +#include + namespace single_photon { -//-----------------HELPER FUNCTIONS ----------- + //-----------------HELPER FUNCTIONS ----------- ////line between x1 and x2, point x0; - double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; + inline double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); - // right, but can be simplified - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; - return sqrt(d2); - } - - // minimum distance between point and dead wire - double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - const geo::GeometryCore * geom, - std::vector> & bad_channel_list_fixed_mcc9 ){ - - double min_dist = 999999; - - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int channel = bad_channel_list_fixed_mcc9[i].first; - int is_ok = bad_channel_list_fixed_mcc9[i].second; - if(is_ok>1)continue; - - auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel - auto result = geom->WireEndPoints(wireids[0]); - - //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - std::vector end = {0.0,result.end().Y(),result.end().Z()}; - std::vector point = {0.0,Ypoint,Zpoint}; - double dist = dist_line_point(start,end,point); - min_dist = std::min(dist,min_dist); - } - - return min_dist; + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; - } + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); -//--------------- end of copying from bad_channel_matching.h + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ - - std::vector vert = {x,y,z}; - std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; - std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + return sqrt(d2); + } - return dist_line_point(start, abit, vert); + // minimum distance between point and dead wire + // double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, + // const geo::GeometryCore * geom, + // std::vector> & bad_channel_list_fixed_mcc9 ){ + // + // double min_dist = 999999; + // + // for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + // int channel = bad_channel_list_fixed_mcc9[i].first; + // int is_ok = bad_channel_list_fixed_mcc9[i].second; + // if(is_ok>1)continue; + // + // auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel + // auto result = geom->WireEndPoints(wireids[0]); + // + // //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; + // std::vector end = {0.0,result.end().Y(),result.end().Z()}; + // std::vector point = {0.0,Ypoint,Zpoint}; + // double dist = dist_line_point(start,end,point); + // min_dist = std::min(dist,min_dist); + // } + // + // return min_dist; + // + // } + + //--------------- end of copying from bad_channel_matching.h + + inline double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); - } + } - // invariant mass of a particle that decays to two showers - double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + // invariant mass of a particle that decays to two showers + inline double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - double s1x = s1->ShowerStart().X()-vx; - double s1y = s1->ShowerStart().Y()-vy; - double s1z = s1->ShowerStart().Z()-vz; - double norm1 = std::hypot(s1x,s1y,s1z); - s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) - s1y = s1y/norm1; - s1z = s1z/norm1; + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = std::hypot(s1x,s1y,s1z); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; - double s2x = s2->ShowerStart().X()-vx; - double s2y = s2->ShowerStart().Y()-vy; - double s2z = s2->ShowerStart().Z()-vz; - double norm2 = std::hypot(s2x,s2y,s2z); - s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) - s2y = s2y/norm2; - s2z = s2z/norm2; + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = std::hypot(s2x,s2y,s2z); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - } + } - // invariant mass of two showers, calculated directly from shower directions - double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + // invariant mass of two showers, calculated directly from shower directions + inline double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - double s1x = s1->Direction().X(); - double s1y = s1->Direction().Y(); - double s1z = s1->Direction().Z(); + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); - double s2x = s2->Direction().X(); - double s2y = s2->Direction().Y(); - double s2z = s2->Direction().Z(); + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - } + } - // sort indices in descending order - template - std::vector sort_indexes(const std::vector &v) { + // sort indices in descending order + template + inline std::vector sort_indexes(const std::vector &v) { - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - return idx; - } + return idx; + } - // sort indices such that elements in v are in ascending order - template - std::vector sort_indexes_rev(const std::vector &v) { + // sort indices such that elements in v are in ascending order + template + inline std::vector sort_indexes_rev(const std::vector &v) { - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); - // sort indexes based on comparing values in v - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); + // sort indexes based on comparing values in v + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] < v[i2];}); - return idx; - } + return idx; + } - // check if two vectors have same elements (regardless of the order), and arrange their elements in order - template - bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) - { - std::sort(v1.begin(), v1.end()); - std::sort(v2.begin(), v2.end()); - return v1 == v2; - } + // check if two vectors have same elements (regardless of the order), and arrange their elements in order + template + inline bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + return v1 == v2; + } - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } + inline double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } -/* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - TVector3 getWireVec(int plane){ - TVector3 wire_dir; - if (plane == 0){ - wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; - } else if (plane == 1){ - wire_dir = {0., sqrt(3) / 2., 1 / 2.}; - } else if (plane == 2) { - wire_dir = {0., 0., 1.}; - } - return wire_dir; + /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + inline TVector3 getWireVec(int plane){ + TVector3 wire_dir; + if (plane == 0){ + wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; + } else if (plane == 1){ + wire_dir = {0., sqrt(3) / 2., 1 / 2.}; + } else if (plane == 2) { + wire_dir = {0., 0., 1.}; } + return wire_dir; + } - /* dot product of wire_dir and shower direction vectors */ - double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ + /* dot product of wire_dir and shower direction vectors */ + inline double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ return wire_dir.Dot(shower_dir); } /* returns angles between wire direction of plane and shower_dir) * shower_dir needs to be unit vector */ - double getAnglewrtWires(TVector3 shower_dir,int plane){ + inline double getAnglewrtWires(TVector3 shower_dir,int plane){ TVector3 wire_dir = getWireVec(plane); double cos_theta = getCoswrtWires(shower_dir, wire_dir); @@ -189,10 +194,10 @@ namespace single_photon } - double degToRad(double deg){ return deg * M_PI/180; } - double radToDeg(double rad){ return rad * 180/M_PI; } + inline double degToRad(double deg){ return deg * M_PI/180; } + inline double radToDeg(double rad){ return rad * 180/M_PI; } - double getMedian(std::vector thisvector){ + inline double getMedian(std::vector thisvector){ size_t len = thisvector.size(); if(len < 1) return NAN; @@ -204,9 +209,9 @@ namespace single_photon } } - /* returns (generally) best median dEdx of all 3 - * planes, usually plane 2 */ - double getAmalgamateddEdx( + /* returns (generally) best median dEdx of all 3 + * planes, usually plane 2 */ + inline double getAmalgamateddEdx( double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, @@ -216,30 +221,30 @@ namespace single_photon int plane0_nhits, int plane1_nhits, int plane2_nhits){ - //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 - if(angle_wrt_plane2< degToRad(10)){ - //if it's too close to the wires on either of the planes, then stick with plane 2 - if (angle_wrt_plane1> degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ - //but if it's outside of the range on plane 1, choose that - if(angle_wrt_plane1> angle_wrt_plane0){ - return median_plane1; - } else{ - return median_plane0; - } - } + //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 + if(angle_wrt_plane2< degToRad(10)){ + //if it's too close to the wires on either of the planes, then stick with plane 2 + if (angle_wrt_plane1> degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ + //but if it's outside of the range on plane 1, choose that + if(angle_wrt_plane1> angle_wrt_plane0){ + return median_plane1; + } else{ + return median_plane0; } - if (plane2_nhits< 2){ - if (plane1_nhits >=2 ){ - return median_plane1; - } else if (plane0_nhits >=2 ){ - return median_plane0; - } - } - return median_plane2; + } + } + if (plane2_nhits< 2){ + if (plane1_nhits >=2 ){ + return median_plane1; + } else if (plane0_nhits >=2 ){ + return median_plane0; + } } + return median_plane2; + } /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - int getAmalgamateddEdxNHits( + inline int getAmalgamateddEdxNHits( double amalgamateddEdx, double median_plane0, double median_plane1, @@ -247,49 +252,50 @@ namespace single_photon int plane0_nhits, int plane1_nhits, int plane2_nhits){ - if (amalgamateddEdx == median_plane0){ - return plane0_nhits; - } - if (amalgamateddEdx == median_plane1){ - return plane1_nhits; - } - if (amalgamateddEdx == median_plane2){ - return plane2_nhits; - } - return -999; + if (amalgamateddEdx == median_plane0){ + return plane0_nhits; + } + if (amalgamateddEdx == median_plane1){ + return plane1_nhits; } + if (amalgamateddEdx == median_plane2){ + return plane2_nhits; + } + return -999; + } -/** - *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction - *@param cluster_start - the start position of a cluster in CM - *@param cluster_axis - calculated from the cluster end minus the cluster start - *@param width - typically ~1cm - *@param length - typically a few cm - * - * */ - std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ - std::vector> corners; - - //get the axis perpedicular to the cluster axis - double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; - - //create a vector for each corner of the rectangle on the plane - //c1 = bottom left corner - std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; - //c2 = top left corner - std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; - //c3 = bottom right corner - std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; - //c4 = top right corner - std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; - - //save each of the vectors - corners.push_back(c1); - corners.push_back(c2); - corners.push_back(c4); - corners.push_back(c3); - return corners; - } + /** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + inline std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ + std::vector> corners; + + //get the axis perpedicular to the cluster axis + double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; + + //create a vector for each corner of the rectangle on the plane + //c1 = bottom left corner + std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; + //c2 = top left corner + std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; + //c3 = bottom right corner + std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; + //c4 = top right corner + std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; + + //save each of the vectors + corners.push_back(c1); + corners.push_back(c2); + corners.push_back(c4); + corners.push_back(c3); + return corners; + } } +#endif // SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h deleted file mode 100644 index 790959981..000000000 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_processors.h +++ /dev/null @@ -1,540 +0,0 @@ -namespace single_photon -{ -//----------- Below are migrated from Singlephoton_module.cc - - - - - - - int SinglePhoton::spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input){ - corrected.resize(3); - -//CHECK double kx = input[0]; - double ky = input[1]; - double kz = input[2]; -//CHECK -// auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); - // CHECK - // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - // double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = 0;//CHECK scecorr.Y(); - double zOffset = 0;//CHECK scecorr.Z(); - - corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - return 0; - } - - - - - - int SinglePhoton::spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected){ - corrected.resize(3); - - double kx = mcparticle->Vx(); - double ky = mcparticle->Vy(); - double kz = mcparticle->Vz(); - -//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - //double xOffset = -scecorr.X() +xtimeoffset+0.6; - double yOffset = 0;//CHECK scecorr.Y(); - double zOffset = 0;//CHECK scecorr.Z(); - - corrected[0]= kx;//CHECK- scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials - corrected[1]=ky+yOffset; - corrected[2]=kz+zOffset; - - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & corrected){ - corrected.resize(3); - //Space Charge Effect! functionize this soon. - double kx = mcparticle.Vx(); - double ky = mcparticle.Vy(); - double kz = mcparticle.Vz(); -//CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); -//CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); - -//CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); - - corrected[0]=kx;//CHECK - scecorr.X() +xtimeoffset+0.6; - corrected[1]=ky;//CHECK + scecorr.Y(); - corrected[2]=kz;//CHECK + scecorr.Z(); - return 0; - } - - void SinglePhoton::CollectMCParticles( - const art::Event &evt, - const std::string &label, - std::map< art::Ptr, std::vector>> &truthToParticles, - std::map< art::Ptr, art::Ptr> &particlesToTruth, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ - - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; - - art::Handle< std::vector< simb::MCParticle> > theParticles; - evt.getByLabel(label, theParticles); - - if (!theParticles.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; - } - - art::FindOneP theTruthAssns(theParticles, evt, label); - - for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) - { - const art::Ptr particle(theParticles, i); - const art::Ptr truth(theTruthAssns.at(i)); - truthToParticles[truth].push_back(particle); - particlesToTruth[particle] = truth; - MCParticleToTrackIdMap[particle->TrackId()] = particle; - } - -// std::cout<<"SinglePhoton::CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) - { - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; - - art::Handle< std::vector > theSimChannels; - evt.getByLabel(label, theSimChannels); - - if (!theSimChannels.isValid()) - { - mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; - return; - } - else - { - mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; - } - - for (unsigned int i = 0; i < theSimChannels->size(); ++i) - { - const art::Ptr channel(theSimChannels, i); - simChannelVector.push_back(channel); - } - } - - - void SinglePhoton::BuildMCParticleHitMaps( - const art::Event &evt, - const std::string &label, - const std::vector> &hitVector, - std::map< art::Ptr, std::vector > > &particlesToHits, - std::map< art::Ptr, art::Ptr > &hitsToParticles, - const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ - std::vector< art::Ptr > simChannelVector; - std::map< art::Ptr, std::vector> > truthToParticles; - std::map< art::Ptr, art::Ptr > particlesToTruth; - std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; - - this->CollectSimChannels(evt, label, simChannelVector); - this->CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); -// CHECK - //Collect the links from reconstructed hits to their true energy deposits. - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); - //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information - lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); - - - } - - bool SinglePhoton::Pi0PreselectionFilter() - { - - if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; - if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; - if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=1) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_conversion_distance.size()!=2) return false; - if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; - - return true; - } - - - - bool SinglePhoton::Pi0PreselectionFilter2g0p() - { - if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; - if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; - if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; - - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=0) return false; - if(m_reco_vertex_size<1) return false; - - if(m_reco_shower_energy_max.size()!=2) return false; - //if the maximum energy of all showers on all planes is smaller than 30 - if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; - - return true; - } - - bool SinglePhoton::IsEventInList(int run, int subrun, int event){ - if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ - if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ - if(m_selected_set.find({run}) == m_selected_set.end()) - return false; - } - } - return true; - } - -//----------- Above are migrated from Singlephoton_module.cc - - //determines if a point is inside the rectangle by summing the areas of the four triangles made by - //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle - //also returns true if the point is on the boundary - bool SinglePhoton::isInsidev2(std::vector thishit_pos, std::vector> rectangle){ - int n_vertices = (int)rectangle.size(); - //bool inside = false; - int i, j = 0; - double areas = 0; - //for each pair of vertices - for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { - //calculate the area of a triangle with the point and two vertices - double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) - + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) - + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); - areas += this_area; - } - //calc area of the rectangle - double area_rectangle = m_width_dqdx_box* m_length_dqdx_box; - - //check the sum of areas match - if (abs(areas - area_rectangle) <= 0.001 ){ - return true; - } - return false; - } - - - //helpers for calculating calometry - double SinglePhoton::CalcEShower(const std::vector> &hits){ - double energy[3] = {0., 0., 0.}; - - //std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The energy on each plane for this shower is "<>& hits, int this_plane){ - double energy = 0.; - - //for each hit in the shower - for (auto &thishitptr : hits){ - //check the plane - int plane= thishitptr->View(); - - //skip invalid planes - if (plane != this_plane ) continue; - - //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); - //add the energy to the plane - energy += E; - }//for each hit - - return energy; - - } - - - - - double SinglePhoton::GetQHit(art::Ptr thishitptr, int plane){ - double gain; - //choose gain based on whether data/mc and by plane - if (m_is_data == false && m_is_overlayed == false){ - gain = m_gain_mc[plane] ; - //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; - return Q; - } - - - double SinglePhoton::QtoEConversion(double Q){ - //return the energy value converted to MeV (the factor of 1e-6) - double E = Q* m_work_function *1e-6 /m_recombination_factor; - return E; - - } - - - std::vector SinglePhoton::CalcdEdxFromdQdx(std::vector dqdx){ - int n = dqdx.size(); - std::vector dedx(n,0.0); - for (int i = 0; i < n; i++){ - //std::cout<<"The dQ/dx is "< SinglePhoton::CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector){ - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; - - //get the 3D shower direction - //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented - TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); - - //calculate the pitch for this plane - double pitch = getPitch(shower_dir, plane); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ - //keep only clusters on the plane - if(thiscluster->View() != plane) continue; - - //calculate the cluster direction - std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; - - //get the cluster start and and in CM - //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; - std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; - - //check that the cluster has non-zero length - double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers() \t||\t The cluster length is "< & mcparticle, std::vector & corrected, std::vector & input){ + corrected.resize(3); + + //CHECK double kx = input[0]; + double ky = input[1]; + double kz = input[2]; + //CHECK + // auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + // CHECK + // double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + + //CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + // double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); + + corrected[0]=0;//CHECK kx - scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + return 0; + } + + + + + + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected){ + corrected.resize(3); + + double kx = mcparticle->Vx(); + double ky = mcparticle->Vy(); + double kz = mcparticle->Vz(); + + //CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); // to get position offsets to be used in ionization electron drift + //CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle->T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + + //CHECK double xtimeoffset = theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + //double xOffset = -scecorr.X() +xtimeoffset+0.6; + double yOffset = 0;//CHECK scecorr.Y(); + double zOffset = 0;//CHECK scecorr.Z(); + + corrected[0]= kx;//CHECK- scecorr.X() + xtimeoffset + 0.6; //due to sim/wirecell differences Seev https://cdcvs.fnal.gov/redmine/projects/uboone-physics-analysis/wiki/MCC9_Tutorials + corrected[1]=ky+yOffset; + corrected[2]=kz+zOffset; + + //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()< & corrected){ + corrected.resize(3); + //Space Charge Effect! functionize this soon. + double kx = mcparticle.Vx(); + double ky = mcparticle.Vy(); + double kz = mcparticle.Vz(); + //CHECK auto scecorr = SCE->GetPosOffsets( geo::Point_t(kx,ky,kz)); + //CHECK double g4Ticks = detClocks->TPCG4Time2Tick(mcparticle.T())+theDetector->GetXTicksOffset(0,0,0)-theDetector->trigger_offset(); + + //CHECK double xtimeoffset = 0;//CHECK theDetector->ConvertTicksToX(g4Ticks,0,0,0); + + corrected[0]=kx;//CHECK - scecorr.X() +xtimeoffset+0.6; + corrected[1]=ky;//CHECK + scecorr.Y(); + corrected[2]=kz;//CHECK + scecorr.Z(); + return 0; + } + + void CollectMCParticles( + const art::Event &evt, + const std::string &label, + std::map< art::Ptr, std::vector>> &truthToParticles, + std::map< art::Ptr, art::Ptr> &particlesToTruth, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; + + art::Handle< std::vector< simb::MCParticle> > theParticles; + evt.getByLabel(label, theParticles); + + if (!theParticles.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find MC particles... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theParticles->size() << " MC particles " << std::endl; + } + + art::FindOneP theTruthAssns(theParticles, evt, label); + + for (unsigned int i = 0, iEnd = theParticles->size(); i < iEnd; ++i) + { + const art::Ptr particle(theParticles, i); + const art::Ptr truth(theTruthAssns.at(i)); + truthToParticles[truth].push_back(particle); + particlesToTruth[particle] = truth; + MCParticleToTrackIdMap[particle->TrackId()] = particle; + } + + // std::cout<<"CollectMCParticles() \t||\t the number of MCParticles in the event is "<size()< > &simChannelVector) + { + // if (evt.isRealData()) + // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + + art::Handle< std::vector > theSimChannels; + evt.getByLabel(label, theSimChannels); + + if (!theSimChannels.isValid()) + { + mf::LogDebug("LArPandora") << " Failed to find sim channels... " << std::endl; + return; + } + else + { + mf::LogDebug("LArPandora") << " Found: " << theSimChannels->size() << " SimChannels " << std::endl; + } + + for (unsigned int i = 0; i < theSimChannels->size(); ++i) + { + const art::Ptr channel(theSimChannels, i); + simChannelVector.push_back(channel); + } + } + + + void BuildMCParticleHitMaps( + const art::Event &evt, + const std::string &label, + const std::vector> &hitVector, + std::map< art::Ptr, std::vector > > &particlesToHits, + std::map< art::Ptr, art::Ptr > &hitsToParticles, + const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, + std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + std::vector< art::Ptr > simChannelVector; + std::map< art::Ptr, std::vector> > truthToParticles; + std::map< art::Ptr, art::Ptr > particlesToTruth; + std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; + + CollectSimChannels(evt, label, simChannelVector); + CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); + + //Collect the links from reconstructed hits to their true energy deposits. + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); + //Build mapping between Hits and MCParticles, starting from Hit/TrackIDE/MCParticle information + lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(hitsToTrackIDEs, truthToParticles, particlesToHits, hitsToParticles, daughterMode); + + + } + + bool Pi0PreselectionFilter(){ + + if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; + if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; + if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=1) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_conversion_distance.size()!=2) return false; + if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; + + return true; + } + + + + bool Pi0PreselectionFilter2g0p(){ + if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; + if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; + if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + + if(m_reco_asso_showers!=2) return false; + if(m_reco_asso_tracks!=0) return false; + if(m_reco_vertex_size<1) return false; + + if(m_reco_shower_energy_max.size()!=2) return false; + //if the maximum energy of all showers on all planes is smaller than 30 + if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; + + return true; + } + + bool IsEventInList(int run, int subrun, int event){ + if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ + if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ + if(m_selected_set.find({run}) == m_selected_set.end()) + return false; + } + } + return true; + } + + //----------- Above are migrated from Singlephoton_module.cc + + //determines if a point is inside the rectangle by summing the areas of the four triangles made by + //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle + //also returns true if the point is on the boundary + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle){ + int n_vertices = (int)rectangle.size(); + //bool inside = false; + int i, j = 0; + double areas = 0; + //for each pair of vertices + for (i = 0, j = n_vertices-1; i < n_vertices; j = i++) { + //calculate the area of a triangle with the point and two vertices + double this_area = 0.5*abs(rectangle[i][0]*(rectangle[j][1] - thishit_pos[1]) + + rectangle[j][0]*(thishit_pos[1] - rectangle[i][1]) + + thishit_pos[0]*(rectangle[i][1] - rectangle[j][1])); + areas += this_area; + } + //calc area of the rectangle + double area_rectangle = m_width_dqdx_box* m_length_dqdx_box; + + //check the sum of areas match + if (abs(areas - area_rectangle) <= 0.001 ){ + return true; + } + return false; + } + + + //helpers for calculating calometry + double CalcEShower(const std::vector> &hits){ + double energy[3] = {0., 0., 0.}; + + //std::cout<<"AnalyzeShowers() \t||\t Looking at shower with "<View(); + + //skip invalid planes + if (plane > 2 || plane < 0) continue; + + //calc the energy of the hit + double E = QtoEConversion(GetQHit(thishitptr, plane)); + + //add the energy to the plane + energy[plane] += E; + }//for each hiti + + //find the max energy on a single plane + double max = energy[0]; + for (double en: energy){ + if( en > max){ + max = en; + } + } + // std::cout<<"AnalyzeShowers() \t||\t The energy on each plane for this shower is "<>& hits, int this_plane){ + double energy = 0.; + + //for each hit in the shower + for (auto &thishitptr : hits){ + //check the plane + int plane= thishitptr->View(); + + //skip invalid planes + if (plane != this_plane ) continue; + + //calc the energy of the hit + double E = QtoEConversion(GetQHit(thishitptr, plane)); + //add the energy to the plane + energy += E; + }//for each hit + + return energy; + + } + + + + + double GetQHit(art::Ptr thishitptr, int plane){ + double gain; + //choose gain based on whether data/mc and by plane + if (m_is_data == false && m_is_overlayed == false){ + gain = m_gain_mc[plane] ; + //if (m_is_verbose) std::cout<<"the gain for mc on plane "<Integral()*gain; + return Q; + } + + + double QtoEConversion(double Q){ + //return the energy value converted to MeV (the factor of 1e-6) + double E = Q* m_work_function *1e-6 /m_recombination_factor; + return E; + + } + + + std::vector CalcdEdxFromdQdx(std::vector dqdx){ + int n = dqdx.size(); + std::vector dedx(n,0.0); + for (int i = 0; i < n; i++){ + //std::cout<<"The dQ/dx is "< CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector){ + //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; + + //get the 3D shower direction + //note: in previous versions of the code there was a check to fix cases where the shower direction was inverted - this hasn't been implemented + TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); + + //calculate the pitch for this plane + double pitch = getPitch(shower_dir, plane); + //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ + //keep only clusters on the plane + if(thiscluster->View() != plane) continue; + + //calculate the cluster direction + std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; + + //get the cluster start and and in CM + //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; + + //check that the cluster has non-zero length + double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); + //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The cluster length is "< & mcparticle, std::vector & corrected, std::vector & input); + + int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); + + int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); + + void CollectMCParticles( + const art::Event &evt, + const std::string &label, + std::map< art::Ptr, std::vector>> &truthToParticles, + std::map< art::Ptr, art::Ptr> &particlesToTruth, + std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); + + void BuildMCParticleHitMaps( + const art::Event &evt, + const std::string &label, + const std::vector> &hitVector, + std::map< art::Ptr, std::vector > > &particlesToHits, + std::map< art::Ptr, art::Ptr > &hitsToParticles, + const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, + std::map< int, art::Ptr > & MCParticleToTrackIdMap); + + bool Pi0PreselectionFilter(); + + bool Pi0PreselectionFilter2g0p(); + + bool IsEventInList(int run, int subrun, int event); + +//----------- Above are migrated from Singlephoton_module.cc + + //determines if a point is inside the rectangle by summing the areas of the four triangles made by + //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle + //also returns true if the point is on the boundary + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); + + + //helpers for calculating calometry + double CalcEShower(const std::vector> &hits); + + double CalcEShowerPlane(const std::vector>& hits, int this_plane); + + double GetQHit(art::Ptr thishitptr, int plane); + + + double QtoEConversion(double Q); + + + std::vector CalcdEdxFromdQdx(std::vector dqdx); + + + std::vector CalcdQdxShower( + const art::Ptr& shower, + const std::vector> & clusters, + std::map, std::vector> > & clusterToHitMap ,int plane, + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector); + + double getPitch(TVector3 shower_dir, int plane); + + + double getMeanHitWidthPlane(std::vector> hits, int this_plane); + + + + int getNHitsPlane(std::vector> hits, int this_plane); + + + + double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); + + int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); + + int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); + +} +#endif // SBNCODE_SINGLEPHOTONANALYSIS_LIBARIES_PROCESSORS_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h deleted file mode 100644 index 200bb64d7..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_EventWeight.h +++ /dev/null @@ -1,172 +0,0 @@ -namespace single_photon -{ - - void SinglePhoton::AnalyzeEventWeight(art::Event const & e){ - - art::Handle< std::vector > mcFluxHandle; - e.getByLabel("generator", mcFluxHandle); - if (!mcFluxHandle.isValid()) return; - std::vector< art::Ptr > mcFluxVec; - art::fill_ptr_vector(mcFluxVec, mcFluxHandle); - if (mcFluxVec.size() == 0){ - std::cout << ">> No MCFlux information" << std::endl; - return; - } - - art::Handle< std::vector > mcTruthHandle; - e.getByLabel("generator", mcTruthHandle); - if (!mcTruthHandle.isValid()) return; - std::vector< art::Ptr > mcTruthVec; - art::fill_ptr_vector(mcTruthVec, mcTruthHandle); - if (mcTruthVec.size() == 0){ - std::cout << ">> No MCTruth information" << std::endl; - return; - } - - art::Handle< std::vector< simb::GTruth > > gTruthHandle; - e.getByLabel("generator", gTruthHandle); - if (!gTruthHandle.isValid()) return; - std::vector< art::Ptr > gTruthVec; - art::fill_ptr_vector(gTruthVec, gTruthHandle); - if (gTruthVec.size() == 0){ - std::cout << ">> No GTruth information" << std::endl; - return; - } - - const art::Ptr mcFlux = mcFluxVec.at(0); - const art::Ptr mcTruth = mcTruthVec.at(0); - const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); - const art::Ptr gTruth = gTruthVec.at(0); - - m_run_number_eventweight = e.run(); - m_subrun_number_eventweight = e.subRun(); - m_event_number_eventweight = e.event(); - - // possibly the wrong variables, but let's see for now... - //m_mcflux_evtno = mcFlux->fevtno; - m_mcflux_nu_pos_x = nu.Vx(); - m_mcflux_nu_pos_y = nu.Vy(); - m_mcflux_nu_pos_z = nu.Vz(); - m_mcflux_nu_mom_x = nu.Px(); - m_mcflux_nu_mom_y = nu.Py(); - m_mcflux_nu_mom_z = nu.Pz(); - m_mcflux_nu_mom_E = nu.E(); - m_mcflux_ntype = mcFlux->fntype; - m_mcflux_ptype = mcFlux->fptype; - m_mcflux_nimpwt = mcFlux->fnimpwt; - m_mcflux_dk2gen = mcFlux->fdk2gen; - m_mcflux_nenergyn = mcFlux->fnenergyn; - m_mcflux_tpx = mcFlux->ftpx; - m_mcflux_tpy = mcFlux->ftpy; - m_mcflux_tpz = mcFlux->ftpz; - m_mcflux_tptype = mcFlux->ftptype; - m_mcflux_vx = mcFlux->fvx; - m_mcflux_vy = mcFlux->fvy; - m_mcflux_vz = mcFlux->fvz; - - // loop MCParticle info for m_mctruth object - - m_mctruth_nparticles = mcTruth->NParticles(); - - for (int i = 0; i < m_mctruth_nparticles; i++){ - - const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); - - m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); - m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); - m_mctruth_particles_mother[i] = mcParticle.Mother(); - m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); - m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); - - for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ - - const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); - m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); - - } - - m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); - m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); - m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); - m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); - m_mctruth_particles_px0[i] = mcParticle.Px(0); - m_mctruth_particles_py0[i] = mcParticle.Py(0); - m_mctruth_particles_pz0[i] = mcParticle.Pz(0); - m_mctruth_particles_e0[i] = mcParticle.E(0); - m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); - m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); - m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); - m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); - } - - const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); - - m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); - m_mctruth_neutrino_mode = mcNeutrino.Mode(); - m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); - m_mctruth_neutrino_target = mcNeutrino.Target(); - m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); - m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); - m_mctruth_neutrino_w = mcNeutrino.W(); - m_mctruth_neutrino_x = mcNeutrino.X(); - m_mctruth_neutrino_y = mcNeutrino.Y(); - m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); - - m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; - m_gtruth_tgt_pdg = gTruth->ftgtPDG; - m_gtruth_tgt_A = gTruth->ftgtA; - m_gtruth_tgt_Z = gTruth->ftgtZ; - m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); - m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); - m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); - m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); - - m_gtruth_weight = gTruth->fweight; - m_gtruth_probability = gTruth->fprobability; - m_gtruth_xsec = gTruth->fXsec; - m_gtruth_diff_xsec = gTruth->fDiffXsec; - m_gtruth_gphase_space = gTruth->fGPhaseSpace; - - m_gtruth_vertex_x = gTruth->fVertex.X(); - m_gtruth_vertex_y = gTruth->fVertex.Y(); - m_gtruth_vertex_z = gTruth->fVertex.Z(); - m_gtruth_vertex_T = gTruth->fVertex.T(); - m_gtruth_gscatter = gTruth->fGscatter; - m_gtruth_gint = gTruth->fGint; - m_gtruth_res_num = gTruth->fResNum; - m_gtruth_num_piplus = gTruth->fNumPiPlus; - m_gtruth_num_pi0 = gTruth->fNumPi0; - m_gtruth_num_piminus = gTruth->fNumPiMinus; - m_gtruth_num_proton = gTruth->fNumProton; - m_gtruth_num_neutron = gTruth->fNumNeutron; - m_gtruth_is_charm = gTruth->fIsCharm; - m_gtruth_is_strange = gTruth->fIsStrange; - m_gtruth_decay_mode = gTruth->fDecayMode; - m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; - m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; - m_gtruth_gx = gTruth->fgX; - m_gtruth_gy = gTruth->fgY; - m_gtruth_gt = gTruth->fgT; - m_gtruth_gw = gTruth->fgW; - m_gtruth_gQ2 = gTruth->fgQ2; - m_gtruth_gq2 = gTruth->fgq2; - m_gtruth_probe_pdg = gTruth->fProbePDG; - m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); - m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); - m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); - m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); - m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); - m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); - m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); - m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); - m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; - m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); - m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); - m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); - m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); - - //moved to inside singlphoontmodule.cc for filter reasons - //eventweight_tree->Fill(); - std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<> &mcParticleVector){ - - - std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); - for(size_t j=0;j< mcParticleVector.size();j++){ - - const art::Ptr mcp = mcParticleVector[j]; - // std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()), - std::to_string(mcp->StatusCode()), - std::to_string(mcp->TrackId()), - std::to_string(mcp->Mother()), - mcp->Process(), - mcp->EndProcess(), - std::to_string(mcp->E()), - std::to_string(mcp->Vx()), - std::to_string(mcp->Vy()), - std::to_string(mcp->Vz()) - }, - spacers); - - m_geant4_pdg.push_back(mcp->PdgCode()); - m_geant4_trackid.push_back(mcp->TrackId()); - m_geant4_statuscode.push_back(mcp->StatusCode()); - m_geant4_mother.push_back(mcp->Mother()); - m_geant4_E.push_back(mcp->E()); - m_geant4_mass.push_back(mcp->Mass()); - m_geant4_px.push_back(mcp->Px()); - m_geant4_py.push_back(mcp->Py()); - m_geant4_pz.push_back(mcp->Pz()); - m_geant4_vx.push_back(mcp->Vx()); - m_geant4_vy.push_back(mcp->Vy()); - m_geant4_vz.push_back(mcp->Vz()); - m_geant4_end_process.push_back(mcp->EndProcess()); - m_geant4_process.push_back(mcp->Process()); - m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - - - - if(j>2)break; - - } - - - } -} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx similarity index 52% rename from sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx index 0e5ee5e72..45a232f5f 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MCTruth.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx @@ -1,14 +1,385 @@ +#include "sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/Processors.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" + namespace single_photon { +//analyze_Geant4.h + void AnalyzeGeant4( const std::vector> &mcParticleVector){ + + + std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); + for(size_t j=0;j< mcParticleVector.size();j++){ + + const art::Ptr mcp = mcParticleVector[j]; + // std::cout<<"PARG: "<PdgCode()<<" Status "<StatusCode()<<" trackid: "<TrackId()<<" Mothe "<Mother()<<" Process "<Process()<<" EndProcess "<EndProcess()<<" Energy "<E()<<" start ("<Vx()<<","<Vy()<<","<Vz()<<")"<PdgCode()), + std::to_string(mcp->StatusCode()), + std::to_string(mcp->TrackId()), + std::to_string(mcp->Mother()), + mcp->Process(), + mcp->EndProcess(), + std::to_string(mcp->E()), + std::to_string(mcp->Vx()), + std::to_string(mcp->Vy()), + std::to_string(mcp->Vz()) + }, + spacers); + + m_geant4_pdg.push_back(mcp->PdgCode()); + m_geant4_trackid.push_back(mcp->TrackId()); + m_geant4_statuscode.push_back(mcp->StatusCode()); + m_geant4_mother.push_back(mcp->Mother()); + m_geant4_E.push_back(mcp->E()); + m_geant4_mass.push_back(mcp->Mass()); + m_geant4_px.push_back(mcp->Px()); + m_geant4_py.push_back(mcp->Py()); + m_geant4_pz.push_back(mcp->Pz()); + m_geant4_vx.push_back(mcp->Vx()); + m_geant4_vy.push_back(mcp->Vy()); + m_geant4_vz.push_back(mcp->Vz()); + m_geant4_end_process.push_back(mcp->EndProcess()); + m_geant4_process.push_back(mcp->Process()); + m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + + if(j>2)break; + } + + } + +//analyze_EventWeight.h + void AnalyzeEventWeight(art::Event const & e){ + + art::Handle< std::vector > mcFluxHandle; + e.getByLabel("generator", mcFluxHandle); + if (!mcFluxHandle.isValid()) return; + std::vector< art::Ptr > mcFluxVec; + art::fill_ptr_vector(mcFluxVec, mcFluxHandle); + if (mcFluxVec.size() == 0){ + std::cout << ">> No MCFlux information" << std::endl; + return; + } + + art::Handle< std::vector > mcTruthHandle; + e.getByLabel("generator", mcTruthHandle); + if (!mcTruthHandle.isValid()) return; + std::vector< art::Ptr > mcTruthVec; + art::fill_ptr_vector(mcTruthVec, mcTruthHandle); + if (mcTruthVec.size() == 0){ + std::cout << ">> No MCTruth information" << std::endl; + return; + } + + art::Handle< std::vector< simb::GTruth > > gTruthHandle; + e.getByLabel("generator", gTruthHandle); + if (!gTruthHandle.isValid()) return; + std::vector< art::Ptr > gTruthVec; + art::fill_ptr_vector(gTruthVec, gTruthHandle); + if (gTruthVec.size() == 0){ + std::cout << ">> No GTruth information" << std::endl; + return; + } + + const art::Ptr mcFlux = mcFluxVec.at(0); + const art::Ptr mcTruth = mcTruthVec.at(0); + const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); + const art::Ptr gTruth = gTruthVec.at(0); + + m_run_number_eventweight = e.run(); + m_subrun_number_eventweight = e.subRun(); + m_event_number_eventweight = e.event(); + + // possibly the wrong variables, but let's see for now... + //m_mcflux_evtno = mcFlux->fevtno; + m_mcflux_nu_pos_x = nu.Vx(); + m_mcflux_nu_pos_y = nu.Vy(); + m_mcflux_nu_pos_z = nu.Vz(); + m_mcflux_nu_mom_x = nu.Px(); + m_mcflux_nu_mom_y = nu.Py(); + m_mcflux_nu_mom_z = nu.Pz(); + m_mcflux_nu_mom_E = nu.E(); + m_mcflux_ntype = mcFlux->fntype; + m_mcflux_ptype = mcFlux->fptype; + m_mcflux_nimpwt = mcFlux->fnimpwt; + m_mcflux_dk2gen = mcFlux->fdk2gen; + m_mcflux_nenergyn = mcFlux->fnenergyn; + m_mcflux_tpx = mcFlux->ftpx; + m_mcflux_tpy = mcFlux->ftpy; + m_mcflux_tpz = mcFlux->ftpz; + m_mcflux_tptype = mcFlux->ftptype; + m_mcflux_vx = mcFlux->fvx; + m_mcflux_vy = mcFlux->fvy; + m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for m_mctruth object + + m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < m_mctruth_nparticles; i++){ + + const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); + + m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + m_mctruth_particles_mother[i] = mcParticle.Mother(); + m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + + for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + + const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); + m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + + } + + m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + m_mctruth_particles_px0[i] = mcParticle.Px(0); + m_mctruth_particles_py0[i] = mcParticle.Py(0); + m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + m_mctruth_particles_e0[i] = mcParticle.E(0); + m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + } + + const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); + + m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + m_mctruth_neutrino_mode = mcNeutrino.Mode(); + m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + m_mctruth_neutrino_target = mcNeutrino.Target(); + m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + m_mctruth_neutrino_w = mcNeutrino.W(); + m_mctruth_neutrino_x = mcNeutrino.X(); + m_mctruth_neutrino_y = mcNeutrino.Y(); + m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + m_gtruth_tgt_pdg = gTruth->ftgtPDG; + m_gtruth_tgt_A = gTruth->ftgtA; + m_gtruth_tgt_Z = gTruth->ftgtZ; + m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); + m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); + m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); + m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); + + m_gtruth_weight = gTruth->fweight; + m_gtruth_probability = gTruth->fprobability; + m_gtruth_xsec = gTruth->fXsec; + m_gtruth_diff_xsec = gTruth->fDiffXsec; + m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + m_gtruth_vertex_x = gTruth->fVertex.X(); + m_gtruth_vertex_y = gTruth->fVertex.Y(); + m_gtruth_vertex_z = gTruth->fVertex.Z(); + m_gtruth_vertex_T = gTruth->fVertex.T(); + m_gtruth_gscatter = gTruth->fGscatter; + m_gtruth_gint = gTruth->fGint; + m_gtruth_res_num = gTruth->fResNum; + m_gtruth_num_piplus = gTruth->fNumPiPlus; + m_gtruth_num_pi0 = gTruth->fNumPi0; + m_gtruth_num_piminus = gTruth->fNumPiMinus; + m_gtruth_num_proton = gTruth->fNumProton; + m_gtruth_num_neutron = gTruth->fNumNeutron; + m_gtruth_is_charm = gTruth->fIsCharm; + m_gtruth_is_strange = gTruth->fIsStrange; + m_gtruth_decay_mode = gTruth->fDecayMode; + m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; + m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; + m_gtruth_gx = gTruth->fgX; + m_gtruth_gy = gTruth->fgY; + m_gtruth_gt = gTruth->fgT; + m_gtruth_gw = gTruth->fgW; + m_gtruth_gQ2 = gTruth->fgQ2; + m_gtruth_gq2 = gTruth->fgq2; + m_gtruth_probe_pdg = gTruth->fProbePDG; + m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; + m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + + //moved to inside singlphoontmodule.cc for filter reasons + //eventweight_tree->Fill(); + std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"< all_PPFPs, + std::map> & MCParticleToTrackIDMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map, art::Ptr > &trackToMCParticleMap){ + + for(size_t index=0; index< all_PPFPs.size(); ++index){ + PandoraPFParticle* temp_ppfp = &all_PPFPs[index]; + if(!temp_ppfp->get_IsNuSlice()) continue; + m_reco_slice_num_pfps[temp_ppfp->get_SliceID()]++;//GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice + m_reco_slice_num_showers[temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasShower(); + m_reco_slice_num_tracks [temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasTrack(); + } + + + //first check if in the event there's a match to a given signal + if(signal_def == "ncdelta"){ + //@para updated in the AnalyzeMCTruths function @ analyze_MCTruth.h + std::cout<<"AnalyzeSlice()\t||\t looking for signal def "< 1) m_multiple_matched_showers = true; + if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; + if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; + + //check if either 1g1p or 1g0p topology + if (m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==1){//1g1p + //check if same slice + m_is_matched_1g1p = true; + if ( m_matched_signal_track_sliceId[0] == m_matched_signal_shower_sliceId[0]){ + m_reco_1g1p_is_same_slice = true; + m_reco_1g1p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; + m_reco_1g1p_nuscore = m_matched_signal_shower_nuscore[0]; + } else{ + m_reco_1g1p_is_multiple_slices = true; + } + }else if(m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==0){//1g0p + m_reco_1g0p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; + m_reco_1g0p_nuscore = m_matched_signal_shower_nuscore[0]; + m_is_matched_1g0p = true; + + } + }//findslice + //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; - void SinglePhoton::AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ + void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ m_mctruth_num = mcTruthVector.size(); if(m_is_verbose) std::cout<<"# of simb::MCTruth: "<1){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< corrected(3); // get corrected lepton position - this->spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); + spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); m_mctruth_nu_vertex_x = corrected[0]; m_mctruth_nu_vertex_y = corrected[1]; @@ -73,7 +444,6 @@ namespace single_photon std::vector spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); - this->ResizeMCTruths(m_mctruth_num_daughter_particles); //some temp variables to see if its 1g1p or 1g1n @@ -121,7 +491,7 @@ namespace single_photon m_mctruth_exiting_photon_py.push_back(par.Py()); m_mctruth_exiting_photon_pz.push_back(par.Pz()); } -// if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t Photon "< m_exiting_photon_energy_threshold){ m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. @@ -309,7 +679,7 @@ namespace single_photon m_mctruth_is_reconstructable_1g1p = true; m_mctruth_is_reconstructable_1g0p = false; } - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); if(m_is_verbose){ - std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< corrected_1_start(3), corrected_2_start(3); std::vector corrected_1_end(3), corrected_2_end(3); - this->spacecharge_correction(dau1, corrected_1_start, raw_1_Start); - this->spacecharge_correction(dau1, corrected_1_end, raw_1_End); + spacecharge_correction(dau1, corrected_1_start, raw_1_Start); + spacecharge_correction(dau1, corrected_1_end, raw_1_End); - this->spacecharge_correction(dau2, corrected_2_start, raw_2_Start); - this->spacecharge_correction(dau2, corrected_2_end, raw_2_End); + spacecharge_correction(dau2, corrected_2_start, raw_2_Start); + spacecharge_correction(dau2, corrected_2_end, raw_2_End); for(int p1=0; p1NumberDaughters();p1++){ auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; @@ -426,8 +796,8 @@ namespace single_photon std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<isInTPCActive(corrected_1_end); - int exit2 = this->isInTPCActive(corrected_2_end); + int exit1 = isInTPCActive(corrected_1_end); + int exit2 = isInTPCActive(corrected_2_end); if(e2 +#include + +#include "art/Framework/Principal/Event.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" + +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + +namespace single_photon +{ + +//analyze_Geant4.h + void AnalyzeGeant4( const std::vector> &mcParticleVector); + +//analyze_EventWeight.h + void AnalyzeEventWeight(art::Event const & e); + +//analyze_MCTruth.h + void AnalyzeRecoMCSlices(std::string signal_def, + std::vector all_PPFPs, + std::map> & MCParticleToTrackIDMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map, art::Ptr > &trackToMCParticleMap); + + //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; + void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector); + + +} +#endif // SBNCODE_SINGLEPHOTONANALYSIS_ANALYZE_MC_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h deleted file mode 100644 index a9eba3d8c..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_OpFlashes.h +++ /dev/null @@ -1,118 +0,0 @@ -namespace single_photon -{ - void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ - - // void SinglePhoton::AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h){} - - - for(auto pair: crtvetoToFlashMap){ - std::cout<<"for flash at time "<< pair.first->Time()<<" has "<< pair.second.size() << " associated CRT hits "< 0){ - for (auto hit: pair.second){ - std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); - } - - } - m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits - } - - size_t flash_size = flashes.size(); - m_reco_num_flashes = flash_size; - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; - - this->ResizeFlashes(flash_size); - - for(size_t i = 0; i < flash_size; ++i) { - - - art::Ptr const & flash = flashes[i]; - - m_reco_flash_total_pe[i]=(flash->TotalPE()); - m_reco_flash_time[i]=(flash->Time()); - m_reco_flash_time_width[i]=flash->TimeWidth(); - m_reco_flash_abs_time[i]=flash->AbsTime(); - m_reco_flash_frame[i]=flash->Frame(); - m_reco_flash_ycenter[i]=flash->YCenter(); - m_reco_flash_ywidth[i]=flash->YWidth(); - m_reco_flash_zcenter[i]=flash->ZCenter(); - m_reco_flash_zwidth[i]=flash->ZWidth(); - - // m_beamgate_flash_end/m_beamgate_flash_start are read from pset - if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ - m_reco_num_flashes_in_beamgate++; - m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); - m_reco_flash_time_in_beamgate[i]=(flash->Time()); - m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); - m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); - } - - - - } - - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeFlashes()\t||\t Finished. There was "< "<size(); - - double _dt_abs = 100000.0; - // double _within_resolution = 0; - double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? - - // Loop over the CRT hits. - for (int j = 0; j < _nCRThits_in_event; j++) - { - /* - if (verbose) - std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; - */ - double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); - - // Fill the vector variables. - m_CRT_hits_time.push_back(_crt_time_temp); - m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); - m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); - m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); - m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); - - if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) - { - _dt_abs = fabs(_beam_flash_time - _crt_time_temp); - m_CRT_dt = _beam_flash_time - _crt_time_temp; - m_CRT_min_hit_time = _crt_time_temp; - // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. - if (_dt_abs < m_Resolution) - { - //_within_resolution = 1; - // Set the position information and the intensity of the CRT hit. - m_CRT_min_hit_PE = crthit_h->at(j).peshit; - m_CRT_min_hit_x = crthit_h->at(j).x_pos; - m_CRT_min_hit_y = crthit_h->at(j).y_pos; - m_CRT_min_hit_z = crthit_h->at(j).z_pos; - - - // if (verbose) - // { - std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; - std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; - std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; - std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; - // } - break; - } - } // End of conditional for closest CRT hit time. - } // End of loop over CRT hits. - } //if there is 1 flash in beamgate - }//if runCRT - - - }//analyze flashes - - - } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx similarity index 53% rename from sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h rename to sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx index d0d981df2..4d0ae17d9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Tracks.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx @@ -1,10 +1,27 @@ +#include + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + #include "TPrincipal.h" -#include "TVectorD.h" -#include "TruncMean.h" + +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/Processors.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" + namespace single_photon { - void SinglePhoton::AnalyzeTracks( + + + + //Analyze Tracks + void AnalyzeTracks( std::vector all_PPFPs, const std::vector>& tracks, std::map, std::vector>> & pfParticleToSpacePointsMap, @@ -12,12 +29,10 @@ namespace single_photon std::map &sliceIdToNuScoreMap){ - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Starting recob::Track analysis"<ResizeTracks(m_reco_asso_tracks); //const double adc2eU(5.1e-3); //const double adc2eV(5.2e-3); @@ -44,11 +59,11 @@ namespace single_photon auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector //first: direction of first point, second: direction of the end of track - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t On Track: "<CalcEShowerPlane(trk_hits, 0); - m_reco_track_calo_energy_plane1[i_trk] = this->CalcEShowerPlane(trk_hits, 1); - m_reco_track_calo_energy_plane2[i_trk] = this->CalcEShowerPlane(trk_hits, 2); + m_reco_track_calo_energy_plane0[i_trk] = CalcEShowerPlane(trk_hits, 0); + m_reco_track_calo_energy_plane1[i_trk] = CalcEShowerPlane(trk_hits, 1); + m_reco_track_calo_energy_plane2[i_trk] = CalcEShowerPlane(trk_hits, 2); m_reco_track_calo_energy_max[i_trk] = std::max( m_reco_track_calo_energy_plane2[i_trk], std::max(m_reco_track_calo_energy_plane0[i_trk],m_reco_track_calo_energy_plane1[i_trk])); m_reco_track_num_spacepoints[i_trk] = (int)trk_spacepoints.size(); @@ -76,8 +91,8 @@ namespace single_photon m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend); m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart); - m_reco_track_end_in_SCB[i_trk] = this->distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); - m_reco_track_start_in_SCB[i_trk] = this->distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + m_reco_track_end_in_SCB[i_trk] = distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); + m_reco_track_start_in_SCB[i_trk] = distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); @@ -90,9 +105,10 @@ namespace single_photon m_reco_track_spacepoint_chi[i_trk] = 0.0; //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; @@ -114,23 +130,24 @@ namespace single_photon delete principal; - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<get_SliceID();//PFPToSliceIdMap[pfp]; // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? @@ -188,103 +205,14 @@ namespace single_photon m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeTracks()\t||\t Finished."< all_PPFPs, - const std::vector>& tracks, - // std::map, art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - // std::map& sliceIdToNuScoreMap, - // std::map,bool>& PFPToClearCosmicMap, - // std::map, int>& PFPToSliceIdMap, - std::vector & vfrac - ){ - - - //if(m_is_verbose) - std::cout<<"SinglePhoton::RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; - m_sim_track_matched[i_trk] = 0; - - if(trackToMCParticleMap.count(track)>0){ - - const art::Ptr mcparticle = trackToMCParticleMap[track]; - std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; - - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - // const art::Ptr pfp = ppfp->pPFParticle; - // const art::Ptr pfp = //trackToPFParticleMap[track]; - - std::vector correctedstart(3); - std::vector correctedend(3); - std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; - // std::cout<<"the raw end of this mcparticle is "<spacecharge_correction(mcparticle, correctedstart); - this->spacecharge_correction(mcparticle, correctedend, raw_End); - - //std::cout<<"the corrected end of this mcparticle is "<E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = correctedstart[0]; - m_sim_track_starty[i_trk] = correctedstart[1]; - m_sim_track_startz[i_trk] = correctedstart[2]; - - m_sim_track_endx[i_trk]= correctedend[0]; - m_sim_track_endy[i_trk]= correctedend[1]; - m_sim_track_endz[i_trk]= correctedend[2]; - - m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); - - m_sim_track_px[i_trk]= mcparticle->Px(); - m_sim_track_py[i_trk]= mcparticle->Py(); - m_sim_track_pz[i_trk]= mcparticle->Pz(); - - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; - m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs){ - - if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_track_parent_pdg[i_trk] = -1; - }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); - } - - } - i_trk++; - } - - return; - } - - - - - - void SinglePhoton::AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs){ - - if(m_is_verbose) std::cout<<"SinglePhoton::CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; @@ -681,7 +609,7 @@ namespace single_photon - void SinglePhoton::CollectPID(std::vector> & tracks, + void CollectPID(std::vector> & tracks, std::vector all_PPFPs){ for(size_t i_trk=0; i_trk>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ + + + for(auto pair: crtvetoToFlashMap){ + std::cout<<"for flash at time "<< pair.first->Time()<<" has "<< pair.second.size() << " associated CRT hits "< 0){ + for (auto hit: pair.second){ + std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); + } + + } + m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits + } + + + if(m_is_verbose) std::cout<<"AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; + + size_t flash_size = flashes.size(); + for(size_t i = 0; i < flash_size; ++i) { + + + art::Ptr const & flash = flashes[i]; + + m_reco_flash_total_pe[i]=(flash->TotalPE()); + m_reco_flash_time[i]=(flash->Time()); + m_reco_flash_time_width[i]=flash->TimeWidth(); + m_reco_flash_abs_time[i]=flash->AbsTime(); + m_reco_flash_frame[i]=flash->Frame(); + m_reco_flash_ycenter[i]=flash->YCenter(); + m_reco_flash_ywidth[i]=flash->YWidth(); + m_reco_flash_zcenter[i]=flash->ZCenter(); + m_reco_flash_zwidth[i]=flash->ZWidth(); + + // m_beamgate_flash_end/m_beamgate_flash_start are read from pset + if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ + m_reco_num_flashes_in_beamgate++; + m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); + m_reco_flash_time_in_beamgate[i]=(flash->Time()); + m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); + m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); + } + + + + } + + if(m_is_verbose) std::cout<<"AnalyzeFlashes()\t||\t Finished. There was "< "<size(); + + double _dt_abs = 100000.0; + // double _within_resolution = 0; + double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? + + // Loop over the CRT hits. + for (int j = 0; j < _nCRThits_in_event; j++) + { + /* + if (verbose) + std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; + */ + double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); + + // Fill the vector variables. + m_CRT_hits_time.push_back(_crt_time_temp); + m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); + m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); + m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); + m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); + + if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) + { + _dt_abs = fabs(_beam_flash_time - _crt_time_temp); + m_CRT_dt = _beam_flash_time - _crt_time_temp; + m_CRT_min_hit_time = _crt_time_temp; + // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. + if (_dt_abs < m_Resolution) + { + //_within_resolution = 1; + // Set the position information and the intensity of the CRT hit. + m_CRT_min_hit_PE = crthit_h->at(j).peshit; + m_CRT_min_hit_x = crthit_h->at(j).x_pos; + m_CRT_min_hit_y = crthit_h->at(j).y_pos; + m_CRT_min_hit_z = crthit_h->at(j).z_pos; + + + // if (verbose) + // { + std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; + std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; + std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; + std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; + // } + break; + } + } // End of conditional for closest CRT hit time. + } // End of loop over CRT hits. + } //if there is 1 flash in beamgate + }//if runCRT + }//analyze flashes + + + + + //Analyze Showers + void AnalyzeShowers( + std::vector all_PPFPs, + const std::vector>& showers, + std::map, std::vector> > & clusterToHitMap , + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ){ + // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"< spacers = Printer_header({"Slice"," pfpID"," Start(x, "," y, "," z )"," trackscore"," pdg"}); + for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) + { + + + const art::Ptr shower = *iter; + // const art::Ptr pfp = showerToPFParticleMap[shower]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + + const art::Ptr pfp = ppfp->pPFParticle; + + art::Ptr shower3d; + m_reco_shower3d_exists[i_shr] = 0; + shower3d = shower; + + const std::vector> hits = ppfp->pPFPHits; + const std::vector> clusters = ppfp->pClusters; + + //int m_shrid = shower->ID(); This is an used variable, always -999 + double m_length = shower->Length(); + double m_open_angle = shower->OpenAngle(); + + TVector3 shr_start = shower->ShowerStart(); + TVector3 shr_dir = shower->Direction(); + + TVector3 shr3d_start = shower3d->ShowerStart(); + TVector3 shr3d_dir = shower3d->Direction(); + + // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; + m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); + m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); + m_reco_shower_start_in_SCB[i_shr] = distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); + + m_reco_shower_dirx[i_shr] = shr_dir.X(); + m_reco_shower_diry[i_shr] = shr_dir.Y(); + m_reco_shower_dirz[i_shr] = shr_dir.Z(); + m_reco_shower_length[i_shr] = m_length; + m_reco_shower_openingangle[i_shr] = m_open_angle; + + m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + m_reco_shower3d_length[i_shr] = shower3d->Length(); + m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + + + m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); + m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + + //pandroa shower + std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; + std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; + std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; + m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; + m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + + double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); + m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; + m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; + m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + + //now 3D shower + std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; + std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; + std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + + m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; + m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; + m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + + double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); + m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + + + m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); + m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + + m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); + m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + + + // m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + // m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + // m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + std::vector t_num(3,0); // num of triangles on each plane + std::vector t_numhits(3,0); // num of hits on each plane + std::vector t_area(3,0.0); + + //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull + // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<(finish-start); + //if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); + const std::vector< double > shr3d_dEdx = shower3d->dEdx(); + //const int shr3d_bestplane = shower3d->best_plane(); + + // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); + int wire = h->WireID().Wire; + int tick = h->PeakTime(); + + m_reco_shower_hit_tick.push_back(tick); + m_reco_shower_hit_plane.push_back(plane); + m_reco_shower_hit_wire.push_back(wire); + } + } + + + //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); + + double ymin = m_reco_shower_starty[i_shr]; + double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + if(ymin > ymax) std::swap(ymin, ymax); + + //Code property of Gray Yarbrough (all rights reserved) + //int optical_flash_in_beamgate_counter=0; + double shortest_dist_to_flash_z=DBL_MAX; + double shortest_dist_to_flash_y=DBL_MAX; + double shortest_dist_to_flash_yz=DBL_MAX; + //-999 my nonsenese int can change + int shortest_dist_to_flash_index_z=-999; + int shortest_dist_to_flash_index_y=-999; + int shortest_dist_to_flash_index_yz=-999; + + // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { + dist_z = zcenter - zmax; + } + else { + dist_z = 0; + } + if(dist_z < shortest_dist_to_flash_z){ + shortest_dist_to_flash_z = dist_z; + shortest_dist_to_flash_index_z=i_flash; + } + + + //y plane + + double dist_y=DBL_MAX; + if(ycenter < ymin) { + dist_y = ymin - ycenter; + } + else if(ycenter > ymax) { + dist_y = ycenter - ymax; + } + else { + dist_y= 0; + } + if(dist_y < shortest_dist_to_flash_y){ + shortest_dist_to_flash_y = dist_y; + shortest_dist_to_flash_index_y=i_flash; + } + + double dist_yz=DBL_MAX; + dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); + if(dist_yzNumDaughters(); //corresponding PFParticle + // std::cout<<" CHECK numebr "<0){ + //currently just look at 1 daughter + //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + int pfp_size = all_PPFPs.size(); + for(int index = 0; index < pfp_size; index++){ + // std::cout<<"CHECK Compare "<Daughters().front()<< + // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); + m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); + break; + } + } + + + //------------and finally some slice info----------------- + + m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; + m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + + m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); + m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); + + // if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )", "trackScore", "Pdg"}); + Printer_content( + {std::to_string(ppfp->get_SliceID()), + std::to_string(ppfp->get_PFParticleID()), + std::to_string(shr_start.X()), + std::to_string(shr_start.Y()), + std::to_string(shr_start.Z()), + std::to_string(ppfp->get_TrackScore()), + std::to_string(ppfp->get_PdgCode()) + },spacers); + + } + + //Lets sort and order the showers + m_reco_shower_ordered_energy_index = sort_indexes(m_reco_shower_energy_max); + } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h new file mode 100644 index 000000000..95c28f157 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h @@ -0,0 +1,39 @@ +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_ANALYZE_PANDORARECO_H +#define SBNCODE_SINGLEPHOTONANALYSIS_ANALYZE_PANDORARECO_H + +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + +namespace single_photon +{ + + + + //Analyze Tracks + void AnalyzeTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + std::map, std::vector>> & pfParticleToSpacePointsMap, + std::map > & MCParticleToTrackIdMap, + std::map &sliceIdToNuScoreMap); + + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); + + void CollectPID(std::vector> & tracks, + std::vector all_PPFPs); + + + //Analyze falshes + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + + + //Analyze Showers + void AnalyzeShowers( + std::vector all_PPFPs, + const std::vector>& showers, + std::map, std::vector> > & clusterToHitMap , + double triggeroffset, + detinfo::DetectorPropertiesData const & theDetector + ); +} +#endif // SBNCODE_SINGLEPHOTONANALYSIS_ANALYZE_PANDORARECO_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h deleted file mode 100644 index 26b78fbd4..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_Showers.h +++ /dev/null @@ -1,627 +0,0 @@ -namespace single_photon -{ - void SinglePhoton::AnalyzeShowers( - std::vector all_PPFPs, - const std::vector>& showers, - std::map, std::vector> > & clusterToHitMap , - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ){ -// if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<ResizeShowers(m_reco_asso_showers); - - std::vector spacers = Printer_header({"Slice"," pfpID"," Start(x, "," y, "," z )"," trackscore"," pdg"}); - for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) - { - - - const art::Ptr shower = *iter; - // const art::Ptr pfp = showerToPFParticleMap[shower]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); - - const art::Ptr pfp = ppfp->pPFParticle; - - art::Ptr shower3d; - m_reco_shower3d_exists[i_shr] = 0; - shower3d = shower; - - const std::vector> hits = ppfp->pPFPHits; - const std::vector> clusters = ppfp->pClusters; - - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); - - TVector3 shr_start = shower->ShowerStart(); - TVector3 shr_dir = shower->Direction(); - - TVector3 shr3d_start = shower3d->ShowerStart(); - TVector3 shr3d_dir = shower3d->Direction(); - - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; - m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); - m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); - m_reco_shower_start_in_SCB[i_shr] = this->distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); - - m_reco_shower_dirx[i_shr] = shr_dir.X(); - m_reco_shower_diry[i_shr] = shr_dir.Y(); - m_reco_shower_dirz[i_shr] = shr_dir.Z(); - m_reco_shower_length[i_shr] = m_length; - m_reco_shower_openingangle[i_shr] = m_open_angle; - - m_reco_shower3d_startx[i_shr] = shr3d_start.X(); - m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); - m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); - m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); - m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); - m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); - m_reco_shower3d_length[i_shr] = shower3d->Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - - - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); - - //pandroa shower - std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; - std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; - - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; - - //now 3D shower - std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; - std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; - - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; - - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - - - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); - - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); - - - m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - std::vector t_num(3,0); // num of triangles on each plane - std::vector t_numhits(3,0); // num of hits on each plane - std::vector t_area(3,0.0); - - //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<delaunay_hit_wrapper(hits, t_numhits, t_num, t_area); - - //auto finish = std::chrono::high_resolution_clock::now(); - //auto microseconds = std::chrono::duration_cast(finish-start); - //if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "< shr3d_energy = shower3d->Energy(); - const std::vector< double > shr3d_dEdx = shower3d->dEdx(); - //const int shr3d_bestplane = shower3d->best_plane(); - - // std::cout<<"SHOWER3D_ENERGY: best plane: "<View(); - int wire = h->WireID().Wire; - int tick = h->PeakTime(); - - m_reco_shower_hit_tick.push_back(tick); - m_reco_shower_hit_plane.push_back(plane); - m_reco_shower_hit_wire.push_back(wire); - } - } - - - //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< zmax) std::swap(zmin, zmax); - - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; - if(ymin > ymax) std::swap(ymin, ymax); - - //Code property of Gray Yarbrough (all rights reserved) - //int optical_flash_in_beamgate_counter=0; - double shortest_dist_to_flash_z=DBL_MAX; - double shortest_dist_to_flash_y=DBL_MAX; - double shortest_dist_to_flash_yz=DBL_MAX; - //-999 my nonsenese int can change - int shortest_dist_to_flash_index_z=-999; - int shortest_dist_to_flash_index_y=-999; - int shortest_dist_to_flash_index_yz=-999; - - // if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""< zmax) { - dist_z = zcenter - zmax; - } - else { - dist_z = 0; - } - if(dist_z < shortest_dist_to_flash_z){ - shortest_dist_to_flash_z = dist_z; - shortest_dist_to_flash_index_z=i_flash; - } - - - //y plane - - double dist_y=DBL_MAX; - if(ycenter < ymin) { - dist_y = ymin - ycenter; - } - else if(ycenter > ymax) { - dist_y = ycenter - ymax; - } - else { - dist_y= 0; - } - if(dist_y < shortest_dist_to_flash_y){ - shortest_dist_to_flash_y = dist_y; - shortest_dist_to_flash_index_y=i_flash; - } - - double dist_yz=DBL_MAX; - dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z); - if(dist_yzNumDaughters(); //corresponding PFParticle - // std::cout<<" CHECK numebr "<0){ - //currently just look at 1 daughter - //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; - int pfp_size = all_PPFPs.size(); - for(int index = 0; index < pfp_size; index++){ - // std::cout<<"CHECK Compare "<Daughters().front()<< - // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); - break; - } - } - - - //------------and finally some slice info----------------- - - m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - - m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); - m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); - - // if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"SinglePhoton::AnalyzeShowers()\t||\t On Shower: "< spacers = Printer_header({"Slice","pfpID","Start(x, "," y, ",", z )", "trackScore", "Pdg"}); - Printer_content( - {std::to_string(ppfp->get_SliceID()), - std::to_string(ppfp->get_PFParticleID()), - std::to_string(shr_start.X()), - std::to_string(shr_start.Y()), - std::to_string(shr_start.Z()), - std::to_string(ppfp->get_TrackScore()), - std::to_string(ppfp->get_PdgCode()) - },spacers); - - } - - //Lets sort and order the showers - m_reco_shower_ordered_energy_index = sort_indexes(m_reco_shower_energy_max); - } - - - void SinglePhoton::AnalyzeKalmanShowers( - const std::vector>& showers, - std::map,art::Ptr> &showerToPFParticleMap, - std::map,art::Ptr> & pfParticlesToShowerKalmanMap, - std::map,std::vector>>& kalmanTrackToCaloMap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector){ - std::cout<<"NO Kalman stuff in SBND" < gains = {0,0,0}; -// for(int plane =0; plane < 3; plane++){ -// if (m_is_data == false && m_is_overlayed == false){ -// gains[plane] = m_gain_mc[plane] ; -// } if (m_is_data == true || m_is_overlayed == true){ -// gains[plane] = m_gain_data[plane] ; -// } -// } -// -// -// int i_shr=0; -// for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter) -// { -// const art::Ptr shower = *iter; -// const art::Ptr pfp = showerToPFParticleMap[shower]; -// std::vector> hitz = pfParticleToHitMap[pfp]; -// -// if( pfParticlesToShowerKalmanMap.count(pfp) == 0 ){ -// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Kalman track for this PFP."< kalman = pfParticlesToShowerKalmanMap[pfp]; -// -// if(kalmanTrackToCaloMap.count(kalman)==0){ -// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\t Warning, no match for a Calo for this Kalman track."<> calo = kalmanTrackToCaloMap[kalman]; -// -// if(calo.size()!=3){ -// std::cout<<"Singlephoton::AnalyzeKalmanShowerrs\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<PlaneID()<<", 1 is "<PlaneID()<<", 2 is "<PlaneID()<PlaneID().Plane; -// if(plane<0 || plane > 3) continue; // Guanqun: plane == 3 is allowed?? -// -// std::vector t_dEdx; //in XX cm only (4 for now) -// std::vector t_res; -// -// -// for(size_t ix=0; ixResidualRange().size(); ++ix){ -// -// double rr = calo[p]->ResidualRange().back() - calo[p]->ResidualRange()[ix]; -// if(rr <= res_range_lim){ -// // Guanqun: why is here a gains[plane], it's not converting ADC to E? -// t_dEdx.push_back(gains[plane]*m_work_function*calo[p]->dQdx()[ix]*1e-6 /m_recombination_factor); -// //t_dQdx.push_back(*calo[p]->dQdx()[x]); -// t_res.push_back(rr); -// } -// } -// /*std::cout<<"KAL: plane "<PlaneID()<<" En: "<0) tmedian = this->getMedian(t_dEdx); -// if(t_dEdx.size()>0) tmean = std::accumulate(t_dEdx.begin(), t_dEdx.end(), 0)/((double)t_dEdx.size()); -// std::cout<<"CHECK "<<__LINE__<<" in analyze_Showers.h to see why dEdx does not work"< kal_pts = calo[p]->XYZ(); -// double circle = 1.0;//in cm -// std::vector pts_within; -// std::vector pts_x; -// -// for(size_t ix=0; ixResidualRange().back()-calo[p]->ResidualRange()[ix]); -// -// double wire = (double)calcWire(kal_pts[ix].Y(), kal_pts[ix].Z(), plane, m_TPC, m_Cryostat, *geom); -//// double time = calcTime(kal_pts[ix].X(), plane, m_TPC,m_Cryostat, theDetector); -// double time = theDetector.ConvertXToTicks(kal_pts[ix].X(), plane, m_TPC,m_Cryostat); -// -// //loop over all hits -// for(auto &hit: hitz){ -// if(plane != hit->View())continue; -// double this_w = (double)hit->WireID().Wire; -// double this_t = (double)hit->PeakTime(); -// double dist = sqrt(pow(wire*0.3-this_w*0.3,2)+pow(time/25.0-this_t/25.0,2)); -// if(dist<=circle) pts_within.back()++; -// } -// //std::cout<<"KAL "<ResidualRange().back()-calo[p]->ResidualRange()[ix]<2){ -// TCanvas *c = new TCanvas(); -// c->cd(); -// -// TGraph *g = new TGraph(pts_x.size(), &pts_x[0], &pts_within[0]); -// g->SetLineColor(kRed); -// g->SetLineWidth(2); -// g->Draw("alp"); -// g->SetTitle(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str()); -// c->SaveAs(("kal_"+std::to_string(plane)+"_"+std::to_string(i_shr)+"_"+std::to_string(m_event_number) +".pdf").c_str(),"pdf"); -// } -// } -// -// -// // some kalman averaging -// double tmp_kal_2 = m_reco_shower_kalman_median_dEdx_plane2[i_shr]; -// double tmp_kal_1 = m_reco_shower_kalman_median_dEdx_plane1[i_shr]; -// double tmp_kal_0 = m_reco_shower_kalman_median_dEdx_plane0[i_shr]; -// double wei_0 = fabs(cos(m_reco_shower_angle_wrt_wires_plane0[i_shr])); -// double wei_1 = fabs(cos(m_reco_shower_angle_wrt_wires_plane1[i_shr])); -// double wei_2 = 20.0*fabs(cos(m_reco_shower_angle_wrt_wires_plane2[i_shr])); -// -// double thresh = 0.01; -// -// -// if(tmp_kal_2!=tmp_kal_2 || tmp_kal_2< thresh){ -// tmp_kal_2 = 0; -// wei_2 = 0.0; -// } -// if(tmp_kal_1!=tmp_kal_1 || tmp_kal_1 < thresh){ -// tmp_kal_1 = 0; -// wei_1 = 0.0; -// } -// if(tmp_kal_0!=tmp_kal_0 || tmp_kal_0 < thresh){ -// tmp_kal_0 = 0; -// wei_0 = 0.0; -// } -// double kal_norm = wei_0+wei_1+wei_2; -// -// if(kal_norm!=0.0){ -// m_reco_shower_kalman_median_dEdx_allplane[i_shr] = (tmp_kal_2*wei_2+tmp_kal_1*wei_1+tmp_kal_0*wei_0)/(kal_norm); -// }else{ -// m_reco_shower_kalman_median_dEdx_allplane[i_shr] = NAN; -// } -// -// std::cout<<"CHECK wei0 "<, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> &primaryPFPSliceIdVec, - std::map &sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap){ - - - //std::vector, int>> primaryPFPSliceIdVec; //maps a primary PFP to a slice index - // std::map sliceIdToNuScoreMap; //maps a slice index to the associated neutrino score - std::vector> clearCosmicPFP; - std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - - std::vector nuscore_slices; //this is a temporary vector to store neutrino score per slice for this event - std::map sliceIdToNuSliceMap; //this is a temporary vector to store neutrino score per slice for this event - //std::vector> primary_pfps; //store the primary PFP for each slice - // sliceIdToPFPMap.clear(); //clear between events - - /* - * Grabbed this info from Giuseppe: - * Here's the structure of these Metadata - * Primary PfParticles are either - * 1) IsClearCosmic = 1 (for unambiguous cosmics) - * 2) NuScore = 0.108586, SliceIndex = 1 (for cosmic slices) - * 3) IsNeutrino = 1, NuScore = 0.170914, SliceIndex = 2 (for the nu slice) - * Then, for PfParticles that are daughter of the nu, the track score is saved, e.g.: - * 4) TrackScore = 0.671488 - * PfParticles that are not primary and that are not daugthers of the neutrino have empty Metadata - */ - - - //for all PFP metadata in the event - for (auto pair: pfParticleToMetadataMap){ - std::vector> metadatalist= pair.second; //get the metadata - art::Ptr pfp = pair.first; //get the corresponding PFP - - //will be empty in circumstances outlined above, not every PFP has stored metadata - if (!metadatalist.empty()){ - - //std::cout<<"metadatalist not empty for pfp with index and pdg code: "<Self()<<"/"<PdgCode()<<", primary = "<IsPrimary()< data:metadatalist){ - - //const pandora::PropertiesMap &pfParticlePropertiesMap(metadata->GetPropertiesMap()); - - //get the metadata properties - std::map propertiesmap = data->GetPropertiesMap(); - //std::cout<<"the number of items in the metadata properties map is "<Self()<<" "<< it.first << " = " << it.second << std::endl; - PFPToTrackScoreMap[pfp] = it.second; - } - - }//for each item in properties map - - //if there is a neutrino score it's the primary PFP, so save the score+slice info - if(temp_score != -1.0){ - primaryPFPSliceIdVec.push_back(std::pair(pfp, temp_ind)); - //primaryToSliceIdMap[pfp] = temp_ind; - sliceIdToNuScoreMap[temp_ind] = temp_score; - if(m_is_verbose)std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t found primary PFP at index "<Self()<<" at slice Index "< 0){ - //std::cout<<"clear cosmic with PFP id "<Self()<,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - - //for all pfp's in the event - //std::cout<<"looking at all PFP's"<>> sliceIdToPFPMap; - - //for (unsigned int i = 0; i< pfParticleVector.size(); i++){} - for(auto item: pfParticleMap){ - art::Ptr start_pfp = item.second; - //no longer skipping pfp's that are clear cosmics - //auto iter = find(clearCosmicPFP.begin(), clearCosmicPFP.end(), start_pfp); - //if(iter != clearCosmicPFP.end()) continue; - - // std::cout<<"START: looking for match for pfp - track id/pdg code "<Self()<<"/"<PdgCode()< this_pfp = start_pfp; - art::Ptr parent_pfp ; - - //if this is a primary particle, skip next part - if(!this_pfp->IsPrimary()){ - parent_pfp = pfParticleMap[this_pfp->Parent()]; - //std::cout<<"parent of start particle is "<Self()<<"/"<PdgCode()<IsPrimary()){ - // std::cout<<"not primary - track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Parent()]; - this_pfp = parent_pfp; - }//while not primary, iterate up chain - } else{ - parent_pfp = start_pfp; - } - - //std::cout<<"this particle was primary at track id/pdg code "<Self()<<"/"<PdgCode()<Self()<Self()<<"pdg: ("<PdgCode()<<") at slice "<Self()<Self()<<" and slice id "<Self()<<", isNeutrino = "<ResizeSlices(m_reco_slice_num); - m_reco_slice_nuscore = nuscore_slices; - - std::cout<<"SinglePhoton::AnalyzeSlice()\t||\t the number of clear cosmic PFP's in the event is "<> pfp_pdg_slice; - //for(auto item: allPFPSliceIdVec){ - //std::cout<<"the pfp with id "<Self()<<" is associated to slice "<PdgCode()); - // } - } - - - std::vector SinglePhoton::GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumPFPsvec(m_reco_slice_num, 0); - - //std::cout<<"starting to look at the PFP's per slice"< SinglePhoton::GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumShowersvec(m_reco_slice_num, 0); - - /* - int max_pfp = -1; - for(auto it = PFPToSliceIdMap.begin(); it != PFPToSliceIdMap.end(); ++it ) { - int this_pfp = it->first->Self(); - if (this_pfp> max_pfp) { - max_pfp = this_pfp; - } - - } - std::cout<<"the max PFP id in PFPToSliceIdMap is = "<< max_pfp< pfp = pair.second; - - //check if this is a valid PFP - //if (pfp->self() > PFPToSliceIdMap.size()){ - // std::cout<<"ERROR, this pfp is out of bounds " - - // } - - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - //std::cout<<"looking at shower id "<ID()<<" with pfp "<Self()<<" in slice "< SinglePhoton::GetNumTracksPerSlice( - std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap){ - std::vector sliceIdToNumTracksvec(m_reco_slice_num, 0); - - // std::cout<<"looking at number of tracks per slice"< pfp = pair.second; - //find slice corresponding to PFP - //have to check if it's in the map otherwise it returns 0 which is misleading - if (PFPToSliceIdMap.find(pfp) != PFPToSliceIdMap.end()){ - //get the slice id - - int slice_id = PFPToSliceIdMap[pfp]; - if (slice_id > -1){ - // std::cout<<"looking at track id "<ID()<<" with pfp "<Self()<<" in slice "< 1) m_multiple_matched_showers = true; - if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; - if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; - - //check if either 1g1p or 1g0p topology - if (m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==1){//1g1p - //check if same slice - m_is_matched_1g1p = true; - if ( m_matched_signal_track_sliceId[0] == m_matched_signal_shower_sliceId[0]){ - m_reco_1g1p_is_same_slice = true; - m_reco_1g1p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g1p_nuscore = m_matched_signal_shower_nuscore[0]; - } else{ - m_reco_1g1p_is_multiple_slices = true; - } - }else if(m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==0){//1g0p - m_reco_1g0p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g0p_nuscore = m_matched_signal_shower_nuscore[0]; - m_is_matched_1g0p = true; - - } - }//findslice - -} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx new file mode 100644 index 000000000..5b002adbf --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx @@ -0,0 +1,208 @@ +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" +#include "larcorealg/Geometry/BoxBoundedGeo.h" +#include "larcore/CoreUtils/ServiceUtil.h" + +namespace single_photon +{ + +int setTPCGeom(){ + + //copy these from CAFMaker/CAFMaker_module.c + const geo::GeometryCore *geometry = lar::providerFrom(); + for (auto const &cryo: geometry->IterateCryostats()) { + geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), + tend = geometry->end_TPC(cryo.ID()); + + std::vector this_tpc_volumes; + while (iTPC != tend) { + geo::TPCGeo const& TPC = *iTPC; + this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); + iTPC++; + } + fTPCVolumes.push_back(std::move(this_tpc_volumes)); + } + + // then combine them into active volumes + for (const std::vector &tpcs: fTPCVolumes) { + m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); + m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); + m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + + m_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); + m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); + m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + if(m_is_verbose){ + std::cout<<""<<__FUNCTION__<<" || Active TPC info: X:("< & vec){ + if( vec.size() != 3){ + throw cet::exception("single_photon") << " The coordinate dimension is not 3!"; + } + + bool is_x = (vec[0] > m_tpc_active_XMin && vec[0]< m_tpc_active_XMax ); + bool is_y = (vec[1] > m_tpc_active_YMin && vec[1]< m_tpc_active_YMax ); + bool is_z = (vec[2] > m_tpc_active_ZMin && vec[2]< m_tpc_active_ZMax ); + bool inside = is_x&&is_y&&is_z; + + return inside; +} + + +/* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ +double distToTPCActive(std::vector&vec){ + if(isInTPCActive(vec)==0) return -999; + double min_x = std::min( fabs(vec[0] - m_tpc_active_XMin) , fabs(vec[0] - m_tpc_active_XMax)); + double min_y = std::min( fabs(vec[1] - m_tpc_active_YMin) , fabs(vec[1] - m_tpc_active_YMax)); + double min_z = std::min( fabs(vec[2] - m_tpc_active_ZMin) , fabs(vec[2] - m_tpc_active_ZMax)); + + return ( (min_x&vec){ + if(isInTPCActive(vec)==0) return -999; + double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45)); + + return dx; +} + + + + +// int isInSCB(std::vector & vec){ +// return isInSCB(0.0,vec); +// } + +int distToSCB(double & dist, std::vector &vec){ + //CHECK! + dist = distToTPCActive( vec ); + return isInTPCActive( vec); + //NOT USE SCB YET, bring it back later! + // + // //this one returns the distance to the boundary + // bool ans = false; + // double dist_yx = 999999; + // + // int iseg = 0; + // if (!isInTPCActive(vec)){ + // dist=-1; + // return 0; // is it in active volume? + // } + // double cut = 0.0; + // + // TVector3 pt(&vec[0]); + // + // Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes + // + // Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); + // polyXY->FinishPolygon(); + // double testpt[2] = {pt.X(), pt.Y()}; + // + // //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; + // + // //polyXY->Draw(); + // + // Bool_t XY_contain = polyXY->Contains(testpt); + // dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. + // + // if(0-116.5) y_idx = 0; //just the 0.5cm + // if(y_idx<0 || y_idx>9) { + // dist = -1; + // delete polyXY; + // return 0; + // } + // + // Bool_t ZX_contain = false; + // double arbit_out = 55555; + // + // double d_dist = -1; + // + // //upstream + // if(z_idx==0){ + // double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; + // double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; + // + // TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); + // polyXZ_Up->SetXY(ptX_Up,ptZ_Up); + // polyXZ_Up->FinishPolygon(); + // + // double testpt_Up[2] = {pt.X(), pt.Z()}; + // ZX_contain = polyXZ_Up->Contains(testpt_Up); + // d_dist = polyXZ_Up->Safety(testpt_Up,iseg); + // delete polyXZ_Up; + // + // } + // if (z_idx==10){ + // double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; + // double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; + // + // ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; + // ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; + // + // TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); + // polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); + // polyXZ_Dw->FinishPolygon(); + // + // double testpt_Dw[2] = {pt.X(), pt.Z()}; + // ZX_contain = polyXZ_Dw->Contains(testpt_Dw); + // d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); + // delete polyXZ_Dw; + // } + // + // delete polyXY; + // + // ans = XY_contain && ZX_contain; + // ans ? dist = std::min(d_dist,min_y) : dist=-1; + // + // return (ans ? 1 : 0); +} + + +} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h index 830f0a7f6..993350651 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h @@ -1,316 +1,24 @@ +#include + namespace single_photon { - //ask YJ - int SinglePhoton::setTPCGeom(){ - -// m_tpc_active_x_low = 0.0; -// m_tpc_active_x_high = 256.35; -// m_tpc_active_y_low = -116.5; -// m_tpc_active_y_high = 116.5; -// m_tpc_active_z_low = 0.0; -// m_tpc_active_z_high = 1036.8; -// -// m_SCB_YX_TOP_y1_array = 116.; -// m_SCB_YX_TOP_x1_array = {0., 150.00, 132.56, 122.86, 119.46, 114.22, 110.90, 115.85, 113.48, 126.36, 144.21}; -// m_SCB_YX_TOP_y2_array = {0., 110.00, 108.14, 106.77, 105.30, 103.40, 102.18, 101.76, 102.27, 102.75, 105.10}; -// m_SCB_YX_TOP_x2_array = 256.; -// -// m_SCB_YX_BOT_y1_array = -115.; -// m_SCB_YX_BOT_x1_array = {0., 115.71, 98.05, 92.42, 91.14, 92.25, 85.38, 78.19, 74.46, 78.86, 108.90}; -// m_SCB_YX_BOT_y2_array = {0., -101.72, -99.46, -99.51, -100.43, -99.55, -98.56, -98.00, -98.30, -99.32, -104.20}; -// m_SCB_YX_BOT_x2_array = 256.; -// -// m_SCB_ZX_Up_z1_array = 0.; -// m_SCB_ZX_Up_x1_array = 120.; -// m_SCB_ZX_Up_z2_array = 11.; -// m_SCB_ZX_Up_x2_array = 256.;//upstream -// -// m_SCB_ZX_Dw_z1_array = 1037.; -// m_SCB_ZX_Dw_x1_array = {0., 120.00, 115.24, 108.50, 110.67, 120.90, 126.43, 140.51, 157.15, 120.00, 120.00}; -// m_SCB_ZX_Dw_z2_array = {0., 1029.00, 1029.12, 1027.21, 1026.01, 1024.91, 1025.27, 1025.32, 1027.61, 1026.00, 1026.00}; -// m_SCB_ZX_Dw_x2_array = 256.;//downstream - - //copy these from CAFMaker/CAFMaker_module.c - const geo::GeometryCore *geometry = lar::providerFrom(); - for (auto const &cryo: geometry->IterateCryostats()) { - geo::GeometryCore::TPC_iterator iTPC = geometry->begin_TPC(cryo.ID()), - tend = geometry->end_TPC(cryo.ID()); - - std::vector this_tpc_volumes; - while (iTPC != tend) { - geo::TPCGeo const& TPC = *iTPC; - this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); - iTPC++; - } - fTPCVolumes.push_back(std::move(this_tpc_volumes)); - } - - // then combine them into active volumes - for (const std::vector &tpcs: fTPCVolumes) { - m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); - m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); - m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); - - m_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); - m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); - m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); - if(m_is_verbose){ - std::cout<<"SinglePhoton::"<<__FUNCTION__<<" || Active TPC info: X:("< & vec){ - if( vec.size() != 3){ - throw cet::exception("SinglePhoton") << " The coordinate dimension is not 3!"; - } - - bool is_x = (vec[0] > m_tpc_active_XMin && vec[0]< m_tpc_active_XMax ); - bool is_y = (vec[1] > m_tpc_active_YMin && vec[1]< m_tpc_active_YMax ); - bool is_z = (vec[2] > m_tpc_active_ZMin && vec[2]< m_tpc_active_ZMax ); - bool inside = is_x&&is_y&&is_z; - - return inside; - } + int isInTPCActive(std::vector & vec); /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ - double SinglePhoton::distToTPCActive(std::vector&vec){ - if(isInTPCActive(vec)==0) return -999; - double min_x = std::min( fabs(vec[0] - m_tpc_active_XMin) , fabs(vec[0] - m_tpc_active_XMax)); - double min_y = std::min( fabs(vec[1] - m_tpc_active_YMin) , fabs(vec[1] - m_tpc_active_YMax)); - double min_z = std::min( fabs(vec[2] - m_tpc_active_ZMin) , fabs(vec[2] - m_tpc_active_ZMax)); - - return ( (min_x&vec); /* returns minimum distance to the TPCActive boundary around the Cathode Plane Assemble; returns -999 if the point is not in TPC active volume */ - double SinglePhoton::distToCPA(std::vector&vec){ - if(isInTPCActive(vec)==0) return -999; - double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45)); - - return dx; - } - - - - -// int SinglePhoton::isInSCB(std::vector & vec){ -// return isInSCB(0.0,vec); -// } + double distToCPA(std::vector&vec); - int SinglePhoton::distToSCB(double & dist, std::vector &vec){ - //CHECK! - dist = distToTPCActive( vec ); - return isInTPCActive( vec); - //NOT USE SCB YET, bring it back later! -// -// //this one returns the distance to the boundary -// bool ans = false; -// double dist_yx = 999999; -// -// int iseg = 0; -// if (!isInTPCActive(vec)){ -// dist=-1; -// return 0; // is it in active volume? -// } -// double cut = 0.0; -// -// TVector3 pt(&vec[0]); -// -// Int_t z_idx = (Int_t)pt.Z()/100; // Int_t: signed integer 4 bytes -// -// Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); -// polyXY->FinishPolygon(); -// double testpt[2] = {pt.X(), pt.Y()}; -// -// //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; -// -// //polyXY->Draw(); -// -// Bool_t XY_contain = polyXY->Contains(testpt); -// dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. -// -// if(0-116.5) y_idx = 0; //just the 0.5cm -// if(y_idx<0 || y_idx>9) { -// dist = -1; -// delete polyXY; -// return 0; -// } -// -// Bool_t ZX_contain = false; -// double arbit_out = 55555; -// -// double d_dist = -1; -// -// //upstream -// if(z_idx==0){ -// double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; -// double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, arbit_out, arbit_out}; -// -// TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); -// polyXZ_Up->SetXY(ptX_Up,ptZ_Up); -// polyXZ_Up->FinishPolygon(); -// -// double testpt_Up[2] = {pt.X(), pt.Z()}; -// ZX_contain = polyXZ_Up->Contains(testpt_Up); -// d_dist = polyXZ_Up->Safety(testpt_Up,iseg); -// delete polyXZ_Up; -// -// } -// if (z_idx==10){ -// double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; -// double ptZ_Dw[5] = {-arbit_out,-arbit_out,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; -// -// ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; -// ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; -// -// TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); -// polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); -// polyXZ_Dw->FinishPolygon(); -// -// double testpt_Dw[2] = {pt.X(), pt.Z()}; -// ZX_contain = polyXZ_Dw->Contains(testpt_Dw); -// d_dist = polyXZ_Dw->Safety(testpt_Dw,iseg); -// delete polyXZ_Dw; -// } -// -// delete polyXY; -// -// ans = XY_contain && ZX_contain; -// ans ? dist = std::min(d_dist,min_y) : dist=-1; -// -// return (ans ? 1 : 0); - } -// int SinglePhoton::isInSCB(double cut, std::vector &vec){ -// -// if (!isInTPCActive(cut,vec)) return 0; // is it in active volume? -// TVector3 pt(&vec[0]); -// -// Int_t z_idx = (Int_t)pt.Z()/100; -// -// Int_t z_idx_YX = z_idx;//YX-view effective z index, it is only different for z > 10m area, where we want to appliy 9mSetXY(ptX,ptY); -// polyXY->FinishPolygon(); -// double testpt[2] = {pt.X(), pt.Y()}; -// -// //cout << "is testpt ("<< pt.X()<<", "<Contains(testpt)<Area()<< endl; -// -// //polyXY->Draw(); -// -// Bool_t XY_contain = polyXY->Contains(testpt); -// -// if(0-116.5) y_idx = 0; //just the 0.5cm -// -// if(y_idx<0 || y_idx>9) { -// delete polyXY; -// return 0; -// } -// -// Bool_t ZX_contain = false; -// -// if(z_idx==0){ -// double ptX_Up[5] = {0.+cut, m_SCB_ZX_Up_x1_array, m_SCB_ZX_Up_x2_array-cut, m_SCB_ZX_Up_x2_array-cut, 0+cut}; -// double ptZ_Up[5] = {0.+cut,0.+cut,m_SCB_ZX_Up_z2_array, 100., 100.}; -// -// TGeoPolygon *polyXZ_Up = new TGeoPolygon(5); -// polyXZ_Up->SetXY(ptX_Up,ptZ_Up); -// polyXZ_Up->FinishPolygon(); -// -// double testpt_Up[2] = {pt.X(), pt.Z()}; -// ZX_contain = polyXZ_Up->Contains(testpt_Up); -// delete polyXZ_Up; -// } -// -// else if (z_idx==10){ -// double ptX_Dw[5] = {0.+cut,m_SCB_ZX_Dw_x2_array-cut, m_SCB_ZX_Dw_x2_array-cut, tbi, 0.+cut}; -// double ptZ_Dw[5] = {1000.,1000.,tbi,m_SCB_ZX_Dw_z1_array-cut, m_SCB_ZX_Dw_z1_array-cut}; -// -// ptX_Dw[3] = m_SCB_ZX_Dw_x1_array[y_idx+1]; -// ptZ_Dw[2] = m_SCB_ZX_Dw_z2_array[y_idx+1]; -// -// TGeoPolygon *polyXZ_Dw = new TGeoPolygon(5); -// polyXZ_Dw->SetXY(ptX_Dw,ptZ_Dw); -// polyXZ_Dw->FinishPolygon(); -// -// double testpt_Dw[2] = {pt.X(), pt.Z()}; -// ZX_contain = polyXZ_Dw->Contains(testpt_Dw); -// delete polyXZ_Dw; -// } -// -// delete polyXY; -// return (XY_contain && ZX_contain); -// -// } + int distToSCB(double & dist, std::vector &vec); } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx new file mode 100644 index 000000000..3eaa6515f --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx @@ -0,0 +1,2201 @@ +#include "sbncode/SinglePhotonAnalysis/Libraries/init_branches.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" + +namespace single_photon +{ + //Process of initialize branches: + //ClearBranches, ResizeBranches, CreateBranches + + void ClearMeta(){ + //------------ Event related Variables ------------- + m_event_number = -99; + m_subrun_number = -99; + m_run_number = -99; + m_test_matched_hits = 0; + + m_pot_per_event = 0; + m_pot_per_subrun = m_subrun_pot; + m_number_of_events_in_subrun = 0; + + m_genie_spline_weight = 1.0; + + //------------ Vertex related Variables ------------- + m_reco_vertex_size = 0; + m_vertex_pos_x=-99999; + m_vertex_pos_y=-99999; + m_vertex_pos_z=-99999; + m_vertex_pos_tick=-9999; + m_vertex_pos_wire_p0=-9999; + m_vertex_pos_wire_p1=-9999; + m_vertex_pos_wire_p2=-9999; + m_reco_vertex_in_SCB = -9999; + m_reco_vertex_dist_to_SCB = -9999; + m_reco_vertex_dist_to_active_TPC= -9999; + m_reco_vertex_dist_to_CPA= -9999; + +// m_reco_vertex_to_nearest_dead_wire_plane0=-99999; +// m_reco_vertex_to_nearest_dead_wire_plane1=-99999; +// m_reco_vertex_to_nearest_dead_wire_plane2=-99999; + + m_reco_slice_objects = 0; + } + + + void CreateMetaBranches(){ + + //true_eventweight_tree + true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); + + //run_subrun_tree + run_subrun_tree->Branch("run",&m_run,"run/I"); + run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); + run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); + run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + + //pot_tree + pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); + pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); + pot_tree->Branch("POT",&m_pot_count,"POT/D"); + + //vertex_tree -- part of it + // --------------------- Event Related variables ------------ + vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); + vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); + vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + + vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); + vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); + vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + + + vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); + vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + + vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); + vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + + vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + + // --------------------- Vertex Related variables ------------ + vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); + vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); + vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); + vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); + vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); + vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); + vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); + vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); +// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); + + vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); + vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); + vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); + vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + } + + //isolation.h + void ClearIsolation(){ + m_isolation_min_dist_trk_shr.clear(); + m_isolation_min_dist_trk_unassoc.clear(); + + m_isolation_num_shr_hits_win_1cm_trk.clear(); + m_isolation_num_shr_hits_win_2cm_trk.clear(); + m_isolation_num_shr_hits_win_5cm_trk.clear(); + m_isolation_num_shr_hits_win_10cm_trk.clear(); + + m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + + m_isolation_nearest_shr_hit_to_trk_wire.clear(); + m_isolation_nearest_shr_hit_to_trk_time.clear(); + + m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + m_isolation_nearest_unassoc_hit_to_trk_time.clear(); + } + + void CreateIsolationBranches(){ + vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); + vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + + vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + + vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); + vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + + + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); + vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + + } + + //second_shower_search.h + void ClearSecondShowers(){ + m_sss_num_unassociated_hits=0; + m_sss_num_unassociated_hits_below_threshold=0; + m_sss_num_associated_hits=0; + + m_sss_num_candidates = 0; + + m_sss_candidate_in_nu_slice.clear(); + m_sss_candidate_num_hits.clear(); + m_sss_candidate_num_wires.clear(); + m_sss_candidate_num_ticks.clear(); + m_sss_candidate_plane.clear(); + m_sss_candidate_PCA.clear(); + m_sss_candidate_mean_ADC.clear(); + m_sss_candidate_ADC_RMS.clear(); + m_sss_candidate_impact_parameter.clear(); + m_sss_candidate_fit_slope.clear(); + m_sss_candidate_veto_score.clear(); + m_sss_candidate_fit_constant.clear(); + m_sss_candidate_mean_tick.clear(); + m_sss_candidate_max_tick.clear(); + m_sss_candidate_min_tick.clear(); + m_sss_candidate_min_wire.clear(); + m_sss_candidate_max_wire.clear(); + m_sss_candidate_mean_wire.clear(); + m_sss_candidate_min_dist.clear(); + m_sss_candidate_wire_tick_based_length.clear(); + m_sss_candidate_energy.clear(); + m_sss_candidate_angle_to_shower.clear(); + m_sss_candidate_closest_neighbour.clear(); + m_sss_candidate_matched.clear(); + m_sss_candidate_matched_energy_fraction_best_plane.clear(); + m_sss_candidate_pdg.clear(); + m_sss_candidate_parent_pdg.clear(); + m_sss_candidate_trackid.clear(); + m_sss_candidate_true_energy.clear(); + m_sss_candidate_overlay_fraction.clear(); + m_sss_candidate_remerge.clear(); + } + + void ClearSecondShowers3D(){ + + m_sss3d_num_showers = 0; + m_sss3d_shower_start_x.clear(); + m_sss3d_shower_start_y.clear(); + m_sss3d_shower_start_z.clear(); + m_sss3d_shower_dir_x.clear(); + m_sss3d_shower_dir_y.clear(); + m_sss3d_shower_dir_z.clear(); + m_sss3d_shower_length.clear(); + m_sss3d_shower_conversion_dist.clear(); + m_sss3d_shower_invariant_mass.clear(); + m_sss3d_shower_implied_invariant_mass.clear(); + m_sss3d_shower_impact_parameter.clear(); + m_sss3d_shower_energy_max.clear(); + m_sss3d_shower_score.clear(); + m_sss3d_slice_nu.clear(); + m_sss3d_slice_clear_cosmic.clear(); + m_sss3d_shower_ioc_ratio.clear(); + } + + void ClearStubs(){ + m_trackstub_num_unassociated_hits = 0; + m_trackstub_unassociated_hits_below_threshold = 0; + m_trackstub_associated_hits=0; + m_trackstub_num_candidates=0; + m_trackstub_candidate_in_nu_slice.clear(); + m_trackstub_candidate_num_hits.clear(); + m_trackstub_candidate_num_wires.clear(); + m_trackstub_candidate_num_ticks.clear(); + m_trackstub_candidate_plane.clear(); + m_trackstub_candidate_PCA.clear(); + m_trackstub_candidate_mean_ADC.clear(); + m_trackstub_candidate_ADC_RMS.clear(); + m_trackstub_candidate_veto_score.clear(); + m_trackstub_candidate_mean_tick.clear(); + m_trackstub_candidate_max_tick.clear(); + m_trackstub_candidate_min_tick.clear(); + m_trackstub_candidate_min_wire.clear(); + m_trackstub_candidate_max_wire.clear(); + m_trackstub_candidate_mean_wire.clear(); + m_trackstub_candidate_min_dist.clear(); + m_trackstub_candidate_min_impact_parameter_to_shower.clear(); + m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); + m_trackstub_candidate_min_ioc_to_shower_start.clear(); + m_trackstub_candidate_ioc_based_length.clear(); + m_trackstub_candidate_wire_tick_based_length.clear(); + m_trackstub_candidate_mean_ADC_first_half.clear(); + m_trackstub_candidate_mean_ADC_second_half.clear(); + m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); + m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); + m_trackstub_candidate_linear_fit_chi2.clear(); + m_trackstub_candidate_energy.clear(); + m_trackstub_candidate_remerge.clear(); + m_trackstub_candidate_matched.clear(); + m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); + m_trackstub_candidate_pdg.clear(); + m_trackstub_candidate_parent_pdg.clear(); + m_trackstub_candidate_trackid.clear(); + m_trackstub_candidate_true_energy.clear(); + m_trackstub_candidate_overlay_fraction.clear(); + + m_trackstub_num_candidate_groups = 0; + m_grouped_trackstub_candidate_indices.clear(); + m_trackstub_candidate_group_timeoverlap_fraction.clear(); + } + + void CreateSecondShowerBranches(){ + vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); + vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); + vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); + vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); + vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); + vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); + vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); + vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); + vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); + vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); + vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); + vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); + vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); + vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); + vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); + vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); + vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); + vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); + vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); + vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); + vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); + vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); + vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); + vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); + vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); + + vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); + vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); + vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); + vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); + vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); + vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); + vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); + + + vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); + vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); + vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); + vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); + vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); + vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); + vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); + vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); + + vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); + vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); + vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); + vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); + vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); + vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); + vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); + vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); + + + vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); + vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); + vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); + vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); + vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); + vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); + + vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); + vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); + vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); + vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); + vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); + vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); + + vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); + vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); + vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); + vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); + vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); + vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); + vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + + } + + void CreateSecondShowerBranches3D(){ + vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); + + vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); + vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); + vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); + vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); + vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); + vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); + + vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); + vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); + vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); + vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); + vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); + vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); + vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); + vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); + vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); + vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + } + + void CreateStubBranches(){ + + vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); + vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); + vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); + vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); + vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); + vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); + vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); + vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); + vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); + vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); + vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); + vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); + vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); + vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); + vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); + vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); + vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); + vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); + vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); + vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); + vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); + vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); + vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); + vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); + vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); + vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); + vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); + vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); + vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); + vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); + vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); + vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); + + + vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); + vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + + } + + void ResizeSecondShowers(size_t size){} + + //analyze_OpFlashes.h + void ClearFlashes(){ + m_reco_num_flashes =0; + m_reco_num_flashes_in_beamgate =0; + m_reco_flash_total_pe.clear(); + m_reco_flash_time.clear(); + m_reco_flash_time_width.clear(); + m_reco_flash_abs_time.clear(); + m_reco_flash_frame.clear(); + m_reco_flash_ycenter.clear(); + m_reco_flash_ywidth.clear(); + m_reco_flash_zcenter.clear(); + m_reco_flash_zwidth.clear(); + m_reco_flash_total_pe_in_beamgate.clear(); + m_reco_flash_time_in_beamgate.clear(); + m_reco_flash_ycenter_in_beamgate.clear(); + m_reco_flash_zcenter_in_beamgate.clear(); + m_CRT_veto_nhits = -999; + m_CRT_veto_hit_PE.clear(); + m_CRT_min_hit_time = -999; + m_CRT_min_hit_PE = -999; + m_CRT_min_hit_x = -999; + m_CRT_min_hit_y = -999; + m_CRT_min_hit_z = -999; + m_CRT_hits_time.clear(); + m_CRT_hits_PE.clear(); + m_CRT_hits_x.clear(); + m_CRT_hits_y.clear(); + m_CRT_hits_z.clear(); + m_CRT_dt = -999; + + } + + void CreateFlashBranches(){ + vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); + vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); + vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); + vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); + vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); + vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); + vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); + vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); + vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); + vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); + vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); + vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); + vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); + vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); + vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); + vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); + + vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); + vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); + vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); + vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); + vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); + vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); + vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + } + + void ResizeFlashes(size_t size){ + m_reco_flash_total_pe.resize(size); + m_reco_flash_time.resize(size); + m_reco_flash_time_width.resize(size); + m_reco_flash_abs_time.resize(size); + m_reco_flash_frame.resize(size); + m_reco_flash_ycenter.resize(size); + m_reco_flash_ywidth.resize(size); + m_reco_flash_zcenter.resize(size); + m_reco_flash_zwidth.resize(size); + m_reco_flash_total_pe_in_beamgate.resize(size); + m_reco_flash_time_in_beamgate.resize(size); + m_reco_flash_ycenter_in_beamgate.resize(size); + m_reco_flash_zcenter_in_beamgate.resize(size); + m_CRT_veto_hit_PE.resize(size); + + m_CRT_hits_time.resize(size); + m_CRT_hits_PE.resize(size); + m_CRT_hits_x.resize(size); + m_CRT_hits_y.resize(size); + m_CRT_hits_z.resize(size); + } + + //analyze_Tracks.h + void ClearTracks(){ + m_reco_asso_tracks=0; + m_reco_track_length.clear(); + m_reco_track_num_daughters.clear(); + m_reco_track_daughter_trackscore.clear(); + m_reco_track_dirx.clear(); + m_reco_track_diry.clear(); + m_reco_track_dirz.clear(); + m_reco_track_startx.clear(); + m_reco_track_starty.clear(); + m_reco_track_startz.clear(); + m_reco_track_endx.clear(); + m_reco_track_endy.clear(); + m_reco_track_endz.clear(); + m_reco_track_end_dist_to_active_TPC.clear(); + m_reco_track_start_dist_to_active_TPC.clear(); + m_reco_track_end_dist_to_CPA.clear(); + m_reco_track_start_dist_to_CPA.clear(); + m_reco_track_end_dist_to_SCB.clear(); + m_reco_track_start_dist_to_SCB.clear(); + m_reco_track_end_in_SCB.clear(); + m_reco_track_start_in_SCB.clear(); + + m_reco_track_theta_yz.clear(); + m_reco_track_phi_yx.clear(); + + m_reco_track_calo_energy_plane0.clear(); + m_reco_track_calo_energy_plane1.clear(); + m_reco_track_calo_energy_plane2.clear(); + m_reco_track_calo_energy_max.clear(); + + m_reco_track_num_trajpoints.clear(); + m_reco_track_num_spacepoints.clear(); + m_reco_track_proton_kinetic_energy.clear(); + m_reco_track_ordered_energy_index.clear(); + m_reco_track_ordered_displacement_index.clear(); + + m_reco_track_spacepoint_principal0.clear(); + m_reco_track_spacepoint_principal1.clear(); + m_reco_track_spacepoint_principal2.clear(); + + m_reco_track_spacepoint_chi.clear(); + m_reco_track_spacepoint_max_dist.clear(); + + m_reco_track_best_calo_plane.clear(); + + m_reco_track_mean_dEdx_best_plane.clear(); + m_reco_track_mean_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_dEdx_end_half_best_plane.clear(); + m_reco_track_good_calo_best_plane.clear(); + m_reco_track_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + m_reco_track_trunc_PIDA_best_plane.clear(); + m_reco_track_resrange_best_plane.clear(); + m_reco_track_dEdx_best_plane.clear(); + + + m_reco_track_mean_dEdx_p0.clear(); + m_reco_track_mean_dEdx_start_half_p0.clear(); + m_reco_track_mean_dEdx_end_half_p0.clear(); + m_reco_track_good_calo_p0.clear(); + m_reco_track_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_p0.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + m_reco_track_trunc_PIDA_p0.clear(); + m_reco_track_resrange_p0.clear(); + m_reco_track_dEdx_p0.clear(); + + m_reco_track_mean_dEdx_p1.clear(); + m_reco_track_mean_dEdx_start_half_p1.clear(); + m_reco_track_mean_dEdx_end_half_p1.clear(); + m_reco_track_good_calo_p1.clear(); + m_reco_track_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_p1.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + m_reco_track_trunc_PIDA_p1.clear(); + m_reco_track_resrange_p1.clear(); + m_reco_track_dEdx_p1.clear(); + + m_reco_track_mean_dEdx_p2.clear(); + m_reco_track_mean_dEdx_start_half_p2.clear(); + m_reco_track_mean_dEdx_end_half_p2.clear(); + m_reco_track_good_calo_p2.clear(); + m_reco_track_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_p2.clear(); + m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + m_reco_track_trunc_PIDA_p2.clear(); + m_reco_track_resrange_p2.clear(); + m_reco_track_dEdx_p2.clear(); + + m_reco_track_num_calo_hits_p1.clear(); + m_reco_track_num_calo_hits_p0.clear(); + m_reco_track_num_calo_hits_p2.clear(); + + m_sim_track_matched.clear(); + m_sim_track_overlay_fraction.clear(); + m_sim_track_energy.clear(); + m_sim_track_kinetic_energy.clear(); + m_sim_track_mass.clear(); + m_sim_track_pdg.clear(); + m_sim_track_origin.clear(); + m_sim_track_parent_pdg.clear(); + m_sim_track_process.clear(); + m_sim_track_startx.clear(); + m_sim_track_starty.clear(); + m_sim_track_startz.clear(); + m_sim_track_endx.clear(); + m_sim_track_endy.clear(); + m_sim_track_endz.clear(); + m_sim_track_length.clear(); + + m_sim_track_px.clear(); + m_sim_track_py.clear(); + m_sim_track_pz.clear(); + m_sim_track_trackID.clear(); + + // PID + m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + m_reco_track_pid_chi2_mu_plane0.clear(); + m_reco_track_pid_chi2_mu_plane1.clear(); + m_reco_track_pid_chi2_mu_plane2.clear(); + m_reco_track_pid_chi2_p_plane0.clear(); + m_reco_track_pid_chi2_p_plane1.clear(); + m_reco_track_pid_chi2_p_plane2.clear(); + m_reco_track_pid_pida_plane0.clear(); + m_reco_track_pid_pida_plane1.clear(); + m_reco_track_pid_pida_plane2.clear(); + m_reco_track_pid_three_plane_proton_pid.clear(); + +// m_reco_track_end_to_nearest_dead_wire_plane0.clear(); +// m_reco_track_end_to_nearest_dead_wire_plane1.clear(); +// m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + m_reco_track_sliceId.clear(); + m_reco_track_nuscore.clear(); + m_reco_track_isclearcosmic.clear(); + m_reco_track_trackscore.clear(); + m_reco_track_pfparticle_pdg.clear(); + m_reco_track_is_nuslice.clear(); + + m_sim_track_sliceId.clear(); + m_sim_track_nuscore.clear(); + m_sim_track_isclearcosmic.clear(); + } + + void CreateTrackBranches(){ + vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); + vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); + vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); + vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); + vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); + vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); + vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); + vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); + vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); + vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); + + vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); + vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); + vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); + vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); + vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); + vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); + vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); + vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); + vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); + vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); + vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); + + + vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); + vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); + + vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); + vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); + vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); + vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); + + vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); + vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); + vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); + vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); + vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); + vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); + + vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); + vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); + vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); + + vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); + vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); + + vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); + + vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); + vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); + vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); + vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); + vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); + vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); + + vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); + + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); + vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); + + vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); + vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); + vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); + vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); + + vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); + vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); + vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); + vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); + + vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); + vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); + vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); + vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); + + vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); + vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); + vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); + + + + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); + vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); + vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); + vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); + vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); + vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); + vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); + vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); + vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); + vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); + +// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); +// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); +// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); + vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); + vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); + vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); + vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); + vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); + + vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); + vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); + vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); + vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); + vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); + vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); + vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); + vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); + vertex_tree->Branch("sim_track_process",&m_sim_track_process); + vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); + vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); + vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); + vertex_tree->Branch("sim_track_px",&m_sim_track_px); + vertex_tree->Branch("sim_track_py",&m_sim_track_py); + vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); + vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); + vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); + vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); + vertex_tree->Branch("sim_track_length",&m_sim_track_length); + + vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); + + vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); + vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); + vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + } + + void ResizeTracks(size_t size){ + m_reco_track_length.resize(size); + m_reco_track_dirx.resize(size); + m_reco_track_num_daughters.resize(size); + m_reco_track_daughter_trackscore.resize(size); + + m_reco_track_diry.resize(size); + m_reco_track_dirz.resize(size); + m_reco_track_endx.resize(size); + m_reco_track_endy.resize(size); + m_reco_track_endz.resize(size); + m_reco_track_end_dist_to_active_TPC.resize(size); + m_reco_track_start_dist_to_active_TPC.resize(size); + m_reco_track_end_dist_to_CPA.resize(size); + m_reco_track_start_dist_to_CPA.resize(size); + m_reco_track_end_dist_to_SCB.resize(size); + m_reco_track_start_dist_to_SCB.resize(size); + m_reco_track_end_in_SCB.resize(size); + m_reco_track_start_in_SCB.resize(size); + + m_reco_track_calo_energy_plane0.resize(size); + m_reco_track_calo_energy_plane1.resize(size); + m_reco_track_calo_energy_plane2.resize(size); + m_reco_track_calo_energy_max.resize(size); + + + + m_reco_track_startx.resize(size); + m_reco_track_starty.resize(size); + m_reco_track_startz.resize(size); + m_reco_track_num_trajpoints.resize(size); + m_reco_track_num_spacepoints.resize(size); + m_reco_track_proton_kinetic_energy.resize(size); + m_reco_track_ordered_energy_index.resize(size); + m_reco_track_ordered_displacement_index.resize(size); + + + m_reco_track_spacepoint_principal0.resize(size); + m_reco_track_spacepoint_principal1.resize(size); + m_reco_track_spacepoint_principal2.resize(size); + + m_reco_track_spacepoint_chi.resize(size); + m_reco_track_spacepoint_max_dist.resize(size); + + m_reco_track_theta_yz.resize(size); + m_reco_track_phi_yx.resize(size); + + m_reco_track_best_calo_plane.resize(size); + + m_reco_track_mean_dEdx_best_plane.resize(size); + m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + m_reco_track_good_calo_best_plane.resize(size); + m_reco_track_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + m_reco_track_trunc_PIDA_best_plane.resize(size); + m_reco_track_resrange_best_plane.resize(size); + m_reco_track_dEdx_best_plane.resize(size); + + + m_reco_track_mean_dEdx_p0.resize(size); + m_reco_track_mean_dEdx_start_half_p0.resize(size); + m_reco_track_mean_dEdx_end_half_p0.resize(size); + m_reco_track_good_calo_p0.resize(size); + m_reco_track_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_p0.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + m_reco_track_trunc_PIDA_p0.resize(size); + m_reco_track_resrange_p0.resize(size); + m_reco_track_dEdx_p0.resize(size); + + m_reco_track_mean_dEdx_p1.resize(size); + m_reco_track_mean_dEdx_start_half_p1.resize(size); + m_reco_track_mean_dEdx_end_half_p1.resize(size); + m_reco_track_good_calo_p1.resize(size); + m_reco_track_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_p1.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + m_reco_track_trunc_PIDA_p1.resize(size); + m_reco_track_resrange_p1.resize(size); + m_reco_track_dEdx_p1.resize(size); + + m_reco_track_mean_dEdx_p2.resize(size); + m_reco_track_mean_dEdx_start_half_p2.resize(size); + m_reco_track_mean_dEdx_end_half_p2.resize(size); + m_reco_track_good_calo_p2.resize(size); + m_reco_track_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_p2.resize(size); + m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + m_reco_track_trunc_PIDA_p2.resize(size); + m_reco_track_resrange_p2.resize(size); + m_reco_track_dEdx_p2.resize(size); + + m_reco_track_num_calo_hits_p1.resize(size); + m_reco_track_num_calo_hits_p0.resize(size); + m_reco_track_num_calo_hits_p2.resize(size); + + + + m_sim_track_matched.resize(size); + m_sim_track_energy.resize(size); + m_sim_track_mass.resize(size); + m_sim_track_kinetic_energy.resize(size); + m_sim_track_pdg.resize(size); + m_sim_track_parent_pdg.resize(size); + m_sim_track_origin.resize(size); + m_sim_track_process.resize(size); + m_sim_track_startx.resize(size); + m_sim_track_starty.resize(size); + m_sim_track_startz.resize(size); + m_sim_track_endx.resize(size); + m_sim_track_endy.resize(size); + m_sim_track_endz.resize(size); + m_sim_track_length.resize(size); + + m_sim_track_px.resize(size); + m_sim_track_py.resize(size); + m_sim_track_pz.resize(size); + m_sim_track_trackID.resize(size); + m_sim_track_overlay_fraction.resize(size); + + m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + m_reco_track_pid_chi2_mu_plane0.resize(size); + m_reco_track_pid_chi2_mu_plane1.resize(size); + m_reco_track_pid_chi2_mu_plane2.resize(size); + m_reco_track_pid_chi2_p_plane0.resize(size); + m_reco_track_pid_chi2_p_plane1.resize(size); + m_reco_track_pid_chi2_p_plane2.resize(size); + m_reco_track_pid_pida_plane0.resize(size); + m_reco_track_pid_pida_plane1.resize(size); + m_reco_track_pid_pida_plane2.resize(size); + m_reco_track_pid_three_plane_proton_pid.resize(size); + +// m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); +// m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); +// m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + m_reco_track_sliceId.resize(size); + m_reco_track_nuscore.resize(size); + m_reco_track_isclearcosmic.resize(size); + m_reco_track_trackscore.resize(size); + m_reco_track_pfparticle_pdg.resize(size); + m_reco_track_is_nuslice.resize(size); + + m_sim_track_sliceId.resize(size); + m_sim_track_nuscore.resize(size); + m_sim_track_isclearcosmic.resize(size); + } + + //analyze_Shower.h + void ClearShowers(){ + m_reco_asso_showers=0; + m_reco_shower_num_daughters.clear(); + m_reco_shower_daughter_trackscore.clear(); + + m_reco_shower3d_exists.clear(); + + m_reco_shower3d_startx.clear(); + m_reco_shower3d_starty.clear(); + m_reco_shower3d_startz.clear(); + m_reco_shower3d_dirx.clear(); + m_reco_shower3d_diry.clear(); + m_reco_shower3d_dirz.clear(); + m_reco_shower3d_theta_yz.clear(); + m_reco_shower3d_phi_yx.clear(); + m_reco_shower3d_conversion_distance.clear(); + m_reco_shower3d_impact_parameter.clear(); + m_reco_shower3d_implied_dirx.clear(); + m_reco_shower3d_implied_diry.clear(); + m_reco_shower3d_implied_dirz.clear(); + m_reco_shower3d_openingangle.clear(); + m_reco_shower3d_length.clear(); + + m_reco_shower3d_energy_plane0.clear(); + m_reco_shower3d_energy_plane1.clear(); + m_reco_shower3d_energy_plane2.clear(); + m_reco_shower3d_dEdx_plane0.clear(); + m_reco_shower3d_dEdx_plane1.clear(); + m_reco_shower3d_dEdx_plane2.clear(); + + + m_reco_shower_startx.clear(); + m_reco_shower_starty.clear(); + m_reco_shower_start_dist_to_active_TPC.clear(); + m_reco_shower_start_dist_to_CPA.clear(); + m_reco_shower_start_dist_to_SCB.clear(); + m_reco_shower_start_in_SCB.clear(); + m_reco_shower_end_dist_to_active_TPC.clear(); + m_reco_shower_end_dist_to_SCB.clear(); + + m_reco_shower_dirx.clear(); + m_reco_shower_diry.clear(); + m_reco_shower_dirz.clear(); + m_reco_shower_theta_yz.clear(); + m_reco_shower_phi_yx.clear(); + m_reco_shower_conversion_distance.clear(); + m_reco_shower_impact_parameter.clear(); + m_reco_shower_implied_dirx.clear(); + m_reco_shower_implied_diry.clear(); + m_reco_shower_implied_dirz.clear(); + m_reco_shower_openingangle.clear(); + m_reco_shower_length.clear(); + m_reco_shower_delaunay_num_triangles_plane0.clear(); + m_reco_shower_delaunay_num_triangles_plane1.clear(); + m_reco_shower_delaunay_num_triangles_plane2.clear(); + m_reco_shower_num_hits_plane0.clear(); + m_reco_shower_num_hits_plane1.clear(); + m_reco_shower_num_hits_plane2.clear(); + m_reco_shower_delaunay_area_plane0.clear(); + m_reco_shower_delaunay_area_plane1.clear(); + m_reco_shower_delaunay_area_plane2.clear(); + + m_reco_shower_kalman_exists.clear(); + m_reco_shower_kalman_median_dEdx_plane0.clear(); + m_reco_shower_kalman_median_dEdx_plane1.clear(); + m_reco_shower_kalman_median_dEdx_plane2.clear(); + m_reco_shower_kalman_median_dEdx_allplane.clear(); + m_reco_shower_kalman_mean_dEdx_plane0.clear(); + m_reco_shower_kalman_mean_dEdx_plane1.clear(); + m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + m_sim_shower_energy.clear(); + m_sim_shower_matched.clear(); + m_sim_shower_kinetic_energy.clear(); + m_sim_shower_mass.clear(); + m_sim_shower_pdg.clear(); + m_sim_shower_trackID.clear(); + m_sim_shower_parent_pdg.clear(); + m_sim_shower_parent_trackID.clear(); + m_sim_shower_origin.clear(); + m_sim_shower_process.clear(); + m_sim_shower_end_process.clear(); + m_sim_shower_start_x.clear(); + m_sim_shower_start_y.clear(); + m_sim_shower_start_z.clear(); + m_sim_shower_vertex_x.clear(); + m_sim_shower_vertex_y.clear(); + m_sim_shower_vertex_z.clear(); + m_sim_shower_is_true_shower.clear(); + m_sim_shower_best_matched_plane.clear(); + m_sim_shower_matched_energy_fraction_plane0.clear(); + m_sim_shower_matched_energy_fraction_plane1.clear(); + m_sim_shower_matched_energy_fraction_plane2.clear(); + m_sim_shower_overlay_fraction.clear(); + m_sim_shower_px.clear(); + m_sim_shower_py.clear(); + m_sim_shower_pz.clear(); + m_sim_shower_sliceId.clear(); + m_sim_shower_nuscore.clear(); + m_sim_shower_isclearcosmic.clear(); + m_sim_shower_is_nuslice.clear(); + + + + m_reco_shower_ordered_energy_index.clear(); + m_reco_shower_energy_max.clear(); + m_reco_shower_energy_plane0.clear(); + m_reco_shower_energy_plane1.clear(); + m_reco_shower_energy_plane2.clear(); + + m_reco_shower_reclustered_energy_plane0.clear(); + m_reco_shower_reclustered_energy_plane1.clear(); + m_reco_shower_reclustered_energy_plane2.clear(); + m_reco_shower_reclustered_energy_max.clear(); + + m_reco_shower_plane0_nhits.clear(); + m_reco_shower_plane1_nhits.clear(); + m_reco_shower_plane2_nhits.clear(); + m_reco_shower_plane0_meanRMS.clear(); + m_reco_shower_plane1_meanRMS.clear(); + m_reco_shower_plane2_meanRMS.clear(); + + m_reco_shower_hit_tick.clear(); + m_reco_shower_hit_wire.clear(); + m_reco_shower_hit_plane.clear(); + m_reco_shower_spacepoint_x.clear(); + m_reco_shower_spacepoint_y.clear(); + m_reco_shower_spacepoint_z.clear(); + + + m_reco_shower_dQdx_plane0.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dQdx_plane2.clear(); + m_reco_shower_dEdx_plane0.clear(); + m_reco_shower_dEdx_plane1.clear(); + m_reco_shower_dEdx_plane2.clear(); + m_reco_shower_dEdx_plane0_median.clear(); + m_reco_shower_dEdx_plane1_median.clear(); + m_reco_shower_dEdx_plane2_median.clear(); + + m_reco_shower_angle_wrt_wires_plane0.clear(); + m_reco_shower_angle_wrt_wires_plane1.clear(); + m_reco_shower_angle_wrt_wires_plane2.clear(); + + m_reco_shower_dEdx_amalgamated.clear(); + m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + m_reco_shower_dQdx_plane0_median.clear(); + m_reco_shower_dQdx_plane1_median.clear(); + m_reco_shower_dQdx_plane2_median.clear(); + + m_reco_shower_dEdx_plane0_mean.clear(); + m_reco_shower_dEdx_plane1_mean.clear(); + m_reco_shower_dEdx_plane2_mean.clear(); + m_reco_shower_dEdx_plane0_max.clear(); + m_reco_shower_dEdx_plane1_max.clear(); + m_reco_shower_dEdx_plane2_max.clear(); + m_reco_shower_dEdx_plane0_min.clear(); + m_reco_shower_dEdx_plane1_min.clear(); + m_reco_shower_dEdx_plane2_min.clear(); + + m_reco_shower_dEdx_plane0_nhits.clear(); + m_reco_shower_dEdx_plane1_nhits.clear(); + m_reco_shower_dEdx_plane2_nhits.clear(); + +// m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); +// m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); +// m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + m_reco_shower_flash_shortest_distz.clear(); + m_reco_shower_flash_shortest_index_z.clear(); + m_reco_shower_flash_shortest_disty.clear(); + m_reco_shower_flash_shortest_index_y.clear(); + + m_reco_shower_flash_shortest_distyz.clear(); + m_reco_shower_flash_shortest_index_yz.clear(); + + m_reco_shower_sliceId.clear(); + m_reco_shower_nuscore.clear(); + m_reco_shower_isclearcosmic.clear(); + m_reco_shower_is_nuslice.clear(); + m_reco_shower_trackscore.clear(); + m_reco_shower_pfparticle_pdg.clear(); + + } + + void CreateShowerBranches(){ + vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); + vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); + vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); + + vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); + vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); + vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); + vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); + vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); + vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); + vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); + vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); + vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); + vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); + vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); + vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); + vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); + + + vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); + vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); + vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); + vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); + vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); + vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); + vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); + + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); + vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); + vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); + vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); + vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); + vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); + vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); + vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + //the calorimetry info + vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); + vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); + vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); + vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); + vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); + vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); + vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); + vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); + vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); + vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); + + vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); + vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); + vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); + vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); + + vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); + vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); + vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); + + vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); + vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); + vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); + + vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); + vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); + vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); + vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); + vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); + vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); + vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); + vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); + vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); + + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); + vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); + + vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); + vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); + + + vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); + vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); + vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); + + vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); + vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); + vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); + vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); + vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); + vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); + vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); + vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); + vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); + vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); + vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); + +// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); +// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); +// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); + + vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); + vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); + vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); + vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); + vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); + vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); + + vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); + vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); + vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); + vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); + vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); + vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); + + + vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); + vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); + vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); + vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); + vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); + vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); + vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); + vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); + vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); + vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); + vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); + vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); + vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); + vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); + vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); + vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); + + vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); + vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); + vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); + vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); + vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); + vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); + + vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); + vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); + + vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); + vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); + + + vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); + vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); + vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); + vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); + vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); + vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); + vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); + vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); + vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); + vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); + vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); + vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); + vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); + vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); + vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); + vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); + vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); + vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); + vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); + vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); + + vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); + vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); + vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); + vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); + vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); + vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); + vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); + vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + } + + void ResizeShowers(size_t size){ + m_reco_shower_num_daughters.resize(size); + m_reco_shower_daughter_trackscore.resize(size); + + m_reco_shower_kalman_exists.resize(size); + m_reco_shower_kalman_median_dEdx_plane0.resize(size); + m_reco_shower_kalman_median_dEdx_plane1.resize(size); + m_reco_shower_kalman_median_dEdx_plane2.resize(size); + m_reco_shower_kalman_median_dEdx_allplane.resize(size); + m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + m_reco_shower_reclustered_energy_plane0.resize(size); + m_reco_shower_reclustered_energy_plane1.resize(size); + m_reco_shower_reclustered_energy_plane2.resize(size); + m_reco_shower_reclustered_energy_max.resize(size); + + + m_reco_shower3d_exists.resize(size); + m_reco_shower3d_startx.resize(size); + m_reco_shower3d_starty.resize(size); + m_reco_shower3d_startz.resize(size); + m_reco_shower3d_dirx.resize(size); + m_reco_shower3d_diry.resize(size); + m_reco_shower3d_dirz.resize(size); + m_reco_shower3d_theta_yz.resize(size); + m_reco_shower3d_phi_yx.resize(size); + m_reco_shower3d_conversion_distance.resize(size); + m_reco_shower3d_openingangle.resize(size); + m_reco_shower3d_length.resize(size); + m_reco_shower3d_impact_parameter.resize(size); + m_reco_shower3d_implied_dirx.resize(size); + m_reco_shower3d_implied_diry.resize(size); + m_reco_shower3d_implied_dirz.resize(size); + m_reco_shower3d_energy_plane0.resize(size); + m_reco_shower3d_energy_plane1.resize(size); + m_reco_shower3d_energy_plane2.resize(size); + m_reco_shower3d_dEdx_plane0.resize(size); + m_reco_shower3d_dEdx_plane1.resize(size); + m_reco_shower3d_dEdx_plane2.resize(size); + + m_reco_shower_start_dist_to_active_TPC.resize(size); + m_reco_shower_start_dist_to_CPA.resize(size); + m_reco_shower_start_dist_to_SCB.resize(size); + m_reco_shower_start_in_SCB.resize(size); + + m_reco_shower_end_dist_to_active_TPC.resize(size); + m_reco_shower_end_dist_to_SCB.resize(size); + + + m_reco_shower_startx.resize(size); + m_reco_shower_starty.resize(size); + m_reco_shower_startz.resize(size); + m_reco_shower_dirx.resize(size); + m_reco_shower_diry.resize(size); + m_reco_shower_dirz.resize(size); + m_reco_shower_theta_yz.resize(size); + m_reco_shower_phi_yx.resize(size); + m_reco_shower_conversion_distance.resize(size); + m_reco_shower_openingangle.resize(size); + m_reco_shower_length.resize(size); + m_reco_shower_impact_parameter.resize(size); + m_reco_shower_implied_dirx.resize(size); + m_reco_shower_implied_diry.resize(size); + m_reco_shower_implied_dirz.resize(size); + m_reco_shower_delaunay_num_triangles_plane0.resize(size); + m_reco_shower_delaunay_num_triangles_plane1.resize(size); + m_reco_shower_delaunay_num_triangles_plane2.resize(size); + m_reco_shower_num_hits_plane0.resize(size); + m_reco_shower_num_hits_plane1.resize(size); + m_reco_shower_num_hits_plane2.resize(size); + m_reco_shower_delaunay_area_plane0.resize(size); + m_reco_shower_delaunay_area_plane1.resize(size); + m_reco_shower_delaunay_area_plane2.resize(size); + + m_reco_shower_energy_max.resize(size); + m_reco_shower_energy_plane0.resize(size); + m_reco_shower_energy_plane1.resize(size); + m_reco_shower_energy_plane2.resize(size); + + m_reco_shower_plane0_nhits.resize(size); + m_reco_shower_plane1_nhits.resize(size); + m_reco_shower_plane2_nhits.resize(size); + + m_reco_shower_plane0_meanRMS.resize(size); + m_reco_shower_plane1_meanRMS.resize(size); + m_reco_shower_plane2_meanRMS.resize(size); + + + + m_reco_shower_ordered_energy_index.resize(size); + m_reco_shower_dQdx_plane0.resize(size); + m_reco_shower_dQdx_plane1.resize(size); + m_reco_shower_dQdx_plane2.resize(size); + m_reco_shower_dEdx_plane0.resize(size); + m_reco_shower_dEdx_plane1.resize(size); + m_reco_shower_dEdx_plane2.resize(size); + m_reco_shower_dEdx_plane0_median.resize(size); + m_reco_shower_dEdx_plane1_median.resize(size); + m_reco_shower_dEdx_plane2_median.resize(size); + + m_reco_shower_angle_wrt_wires_plane0.resize(size); + m_reco_shower_angle_wrt_wires_plane1.resize(size); + m_reco_shower_angle_wrt_wires_plane2.resize(size); + + m_reco_shower_dEdx_amalgamated.resize(size); + m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + m_reco_shower_dQdx_plane0_median.resize(size); + m_reco_shower_dQdx_plane1_median.resize(size); + m_reco_shower_dQdx_plane2_median.resize(size); + + m_reco_shower_dEdx_plane0_min.resize(size); + m_reco_shower_dEdx_plane1_min.resize(size); + m_reco_shower_dEdx_plane2_min.resize(size); + m_reco_shower_dEdx_plane0_max.resize(size); + m_reco_shower_dEdx_plane1_max.resize(size); + m_reco_shower_dEdx_plane2_max.resize(size); + m_reco_shower_dEdx_plane0_mean.resize(size); + m_reco_shower_dEdx_plane1_mean.resize(size); + m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + m_reco_shower_dEdx_plane0_nhits.resize(size); + m_reco_shower_dEdx_plane1_nhits.resize(size); + m_reco_shower_dEdx_plane2_nhits.resize(size); + +// m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); +// m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); +// m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + m_reco_shower_flash_shortest_distz.resize(size); + m_reco_shower_flash_shortest_index_z.resize(size); + m_reco_shower_flash_shortest_disty.resize(size); + m_reco_shower_flash_shortest_index_y.resize(size); + + m_reco_shower_flash_shortest_distyz.resize(size); + m_reco_shower_flash_shortest_index_yz.resize(size); + + m_reco_shower_sliceId.resize(size); + m_reco_shower_nuscore.resize(size); + m_reco_shower_isclearcosmic.resize(size); + m_reco_shower_is_nuslice.resize(size); + m_reco_shower_trackscore.resize(size); + m_reco_shower_pfparticle_pdg.resize(size); + + + m_sim_shower_energy.resize(size); + m_sim_shower_matched.resize(size); + m_sim_shower_kinetic_energy.resize(size); + m_sim_shower_mass.resize(size); + m_sim_shower_pdg.resize(size); + m_sim_shower_trackID.resize(size); + m_sim_shower_parent_pdg.resize(size); + m_sim_shower_parent_trackID.resize(size); + m_sim_shower_origin.resize(size); + m_sim_shower_process.resize(size); + m_sim_shower_end_process.resize(size); + m_sim_shower_start_x.resize(size); + m_sim_shower_start_y.resize(size); + m_sim_shower_start_z.resize(size); + m_sim_shower_vertex_x.resize(size); + m_sim_shower_vertex_y.resize(size); + m_sim_shower_vertex_z.resize(size); + m_sim_shower_is_true_shower.resize(size); + m_sim_shower_best_matched_plane.resize(size); + m_sim_shower_matched_energy_fraction_plane0.resize(size); + m_sim_shower_matched_energy_fraction_plane1.resize(size); + m_sim_shower_matched_energy_fraction_plane2.resize(size); + m_sim_shower_overlay_fraction.resize(size); + m_sim_shower_px.resize(size); + m_sim_shower_py.resize(size); + m_sim_shower_pz.resize(size); + m_sim_shower_sliceId.resize(size); + m_sim_shower_nuscore.resize(size); + m_sim_shower_isclearcosmic.resize(size); + m_sim_shower_is_nuslice.resize(size); + } + + //analyze_MCTruth.h + void ClearMCTruths(){ + m_mctruth_num = 0; + m_mctruth_origin = -99; + m_mctruth_mode = -99; + m_mctruth_interaction_type = -99; + m_mctruth_nu_vertex_x = -9999; + m_mctruth_nu_vertex_y = -9999; + m_mctruth_nu_vertex_z = -9999; + m_mctruth_reco_vertex_dist = -9999; + m_mctruth_ccnc = -99; + m_mctruth_qsqr = -99; + m_mctruth_nu_E = -99; + m_mctruth_nu_pdg = 0; + m_mctruth_lepton_pdg = 0; + m_mctruth_num_daughter_particles = -99; + m_mctruth_daughters_pdg.clear(); + m_mctruth_daughters_E.clear(); + + m_mctruth_daughters_status_code.clear(); + m_mctruth_daughters_trackID.clear(); + m_mctruth_daughters_mother_trackID.clear(); + m_mctruth_daughters_px.clear(); + m_mctruth_daughters_py.clear(); + m_mctruth_daughters_pz.clear(); + m_mctruth_daughters_startx.clear(); + m_mctruth_daughters_starty.clear(); + m_mctruth_daughters_startz.clear(); + m_mctruth_daughters_time.clear(); + m_mctruth_daughters_endx.clear(); + m_mctruth_daughters_endy.clear(); + m_mctruth_daughters_endz.clear(); + m_mctruth_daughters_endtime.clear(); + m_mctruth_daughters_process.clear(); + m_mctruth_daughters_end_process.clear(); + + + m_mctruth_is_delta_radiative = 0; + m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + m_mctruth_delta_photon_energy=-999; + m_mctruth_delta_proton_energy=-999; + m_mctruth_delta_neutron_energy=-999; + + m_mctruth_num_exiting_photons =0; + m_mctruth_num_exiting_protons =0; + m_mctruth_num_exiting_pi0 =0; + m_mctruth_num_exiting_pipm =0; + m_mctruth_num_exiting_neutrons=0; + m_mctruth_num_exiting_delta0=0; + m_mctruth_num_exiting_deltapm=0; + m_mctruth_num_exiting_deltapp=0; + + m_mctruth_num_reconstructable_protons = 0; + + m_mctruth_is_reconstructable_1g1p = 0; + m_mctruth_is_reconstructable_1g0p = 0; + + m_mctruth_leading_exiting_proton_energy = -9999; + + m_mctruth_exiting_pi0_E.clear(); + m_mctruth_exiting_pi0_mom.clear(); + m_mctruth_exiting_pi0_px.clear(); + m_mctruth_exiting_pi0_py.clear(); + m_mctruth_exiting_pi0_pz.clear(); + + m_mctruth_pi0_leading_photon_energy = -9999; + m_mctruth_pi0_subleading_photon_energy = -9999; + m_mctruth_pi0_leading_photon_end_process = "none"; + m_mctruth_pi0_subleading_photon_end_process = "none"; + m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + m_mctruth_pi0_leading_photon_exiting_TPC = -999; + m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + m_mctruth_exiting_delta0_num_daughters.clear(); + + m_mctruth_exiting_photon_mother_trackID.clear(); + m_mctruth_exiting_photon_trackID.clear(); + m_mctruth_exiting_photon_from_delta_decay.clear(); + m_mctruth_exiting_photon_energy.clear(); + m_mctruth_exiting_photon_px.clear(); + m_mctruth_exiting_photon_py.clear(); + m_mctruth_exiting_photon_pz.clear(); + + m_mctruth_exiting_proton_mother_trackID.clear(); + m_mctruth_exiting_proton_trackID.clear(); + m_mctruth_exiting_proton_from_delta_decay.clear(); + m_mctruth_exiting_proton_energy.clear(); + m_mctruth_exiting_proton_px.clear(); + m_mctruth_exiting_proton_py.clear(); + m_mctruth_exiting_proton_pz.clear(); + + m_mctruth_exiting_neutron_mother_trackID.clear(); + m_mctruth_exiting_neutron_trackID.clear(); + m_mctruth_exiting_neutron_from_delta_decay.clear(); + m_mctruth_exiting_neutron_energy.clear(); + m_mctruth_exiting_neutron_px.clear(); + m_mctruth_exiting_neutron_py.clear(); + m_mctruth_exiting_neutron_pz.clear(); + } + + void CreateMCTruthBranches(){ + vertex_tree->Branch("mctruth_num",&m_mctruth_num); + vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); + vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); + vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); + + vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); + vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); + vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); + vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); + + vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); + vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); + vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); + vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); + vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); + vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); + + vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); + vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); + vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); + vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); + vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); + vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); + vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); + vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); + vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); + vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); + vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); + vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); + vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); + vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); + vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); + vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); + vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); + vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); + vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); + + + + + vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); + vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); + vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); + vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); + vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); + vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); + vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); + vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); + + vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); + vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); + vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); + vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); + vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); + vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); + vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); + + vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); + vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); + vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); + vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); + vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); + vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); + + vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); + vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); + vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); + vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); + vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); + vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); + + vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); + vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); + vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); + vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); + vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); + vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); + + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + + vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); + vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); + + vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); + vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); + vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); + vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); + vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); + vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); + vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); + vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); + vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); + vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); + vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); + vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); + vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); + vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + } + + void ResizeMCTruths(size_t size){ + m_mctruth_daughters_pdg.resize(size); + m_mctruth_daughters_E.resize(size); + m_mctruth_daughters_status_code.resize(size); + m_mctruth_daughters_trackID.resize(size); + m_mctruth_daughters_mother_trackID.resize(size); + m_mctruth_daughters_px.resize(size); + m_mctruth_daughters_py.resize(size); + m_mctruth_daughters_pz.resize(size); + m_mctruth_daughters_startx.resize(size); + m_mctruth_daughters_starty.resize(size); + m_mctruth_daughters_startz.resize(size); + m_mctruth_daughters_time.resize(size); + m_mctruth_daughters_endx.resize(size); + m_mctruth_daughters_endy.resize(size); + m_mctruth_daughters_endz.resize(size); + m_mctruth_daughters_endtime.resize(size); + m_mctruth_daughters_end_process.resize(size); + m_mctruth_daughters_process.resize(size); + } + + //analyze_EventWeight.h + void ClearEventWeightBranches(){ + m_mcflux_nu_pos_x=-9999; + m_mcflux_nu_pos_y=-9999; + m_mcflux_nu_pos_z=-9999; + m_mcflux_nu_mom_x=-9999; + m_mcflux_nu_mom_y=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_z=-9999; + m_mcflux_nu_mom_E=-9999; + m_mcflux_ntype=0; + m_mcflux_ptype=0; + m_mcflux_nimpwt=-9999; + m_mcflux_dk2gen=-9999; + m_mcflux_nenergyn=-9999; + m_mcflux_tpx=-9999; + m_mcflux_tpy=-9999; + m_mcflux_tpz=-9999; + m_mcflux_vx=-9999; + m_mcflux_vy=-9999; + m_mcflux_vz=-9999; + m_mcflux_tptype=0; + m_mctruth_nparticles=0; + /* + // m_mctruth_particles_track_ID[]; + // m_mctruth_particles_pdg_code[]; + // m_mctruth_particles_mother[]; + // m_mctruth_particles_status_code[]; + // m_mctruth_particles_num_daughters[]; //other similar variables + // m_mctruth_particles_daughters[]; + //m_mctruth_particles_Gvx.clear(); + //m_mctruth_particles_Gvy.clear(); + m_mctruth_particles_Gvz.clear(); + m_mctruth_particles_Gvt.clear(); + m_mctruth_particles_px0.clear(); + m_mctruth_particles_py0.clear(); + m_mctruth_particles_pz0.clear(); + m_mctruth_particles_e0.clear(); + //int m_mctruth_particles_rescatter.clear(); + m_mctruth_particles_polx.clear(); + m_mctruth_particles_poly.clear(); + m_mctruth_particles_polz.clear(); + + //int m_mctruth_neutrino_CCNC; + //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars + //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" + int m_mctruth_neutrino_target.clear(); + int m_mctruth_neutrino_nucleon.clear(); + int m_mctruth_neutrino_quark.clear(); + m_mctruth_neutrino_w.clear(); + m_mctruth_neutrino_x.clear(); + m_mctruth_neutrino_y.clear(); + */ + //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" + m_gtruth_is_sea_quark=false; + m_gtruth_tgt_pdg=0; + m_gtruth_tgt_Z = -9999; + m_gtruth_tgt_A = -9999; + m_gtruth_tgt_p4_x = -9999; + m_gtruth_tgt_p4_y = -9999; + m_gtruth_tgt_p4_z = -9999; + m_gtruth_tgt_p4_E = -9999; + m_gtruth_weight=-9999; + m_gtruth_probability=-9999; + m_gtruth_xsec=-9999; + m_gtruth_diff_xsec=-9999; + m_gtruth_gphase_space=-9999; + m_gtruth_vertex_x=-9999; + m_gtruth_vertex_y=-9999; + m_gtruth_vertex_z=-9999; + m_gtruth_vertex_T=-9999; + m_gtruth_gscatter=-9999; + m_gtruth_gint=-9999; + m_gtruth_res_num=-9999; + m_gtruth_num_piplus=-9999; + m_gtruth_num_pi0=-9999; + m_gtruth_num_piminus=-9999; + m_gtruth_num_proton=-9999; + m_gtruth_num_neutron=-9999; + m_gtruth_is_charm=false; + m_gtruth_is_strange=false; + m_gtruth_charm_hadron_pdg = -9999; + m_gtruth_strange_hadron_pdg = -9999; + m_gtruth_decay_mode = -9999; + m_gtruth_gx=-9999; + m_gtruth_gy=-9999; + m_gtruth_gy=-9999; + m_gtruth_gt=-9999; + m_gtruth_gw=-9999; + m_gtruth_gQ2=-9999; + m_gtruth_gq2=-9999; + m_gtruth_probe_pdg=0; + m_gtruth_probe_p4_x=-9999; + m_gtruth_probe_p4_y=-9999; + m_gtruth_probe_p4_z=-9999; + m_gtruth_probe_p4_E=-9999; + m_gtruth_hit_nuc_p4_x=-9999; + m_gtruth_hit_nuc_p4_y=-9999; + m_gtruth_hit_nuc_p4_z=-9999; + m_gtruth_hit_nuc_p4_E=-9999; + m_gtruth_hit_nuc_pos=-9999; + m_gtruth_fs_had_syst_p4_x=-9999; + m_gtruth_fs_had_syst_p4_y=-9999; + m_gtruth_fs_had_syst_p4_z=-9999; + m_gtruth_fs_had_syst_p4_E=-9999; + } + + void CreateEventWeightBranches(){ + //-----------------run info + eventweight_tree->Branch("run", &m_run_number_eventweight); + eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); + eventweight_tree->Branch("event", &m_event_number_eventweight); + //------------------mcflux + eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); + eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); + eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); + eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); + eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); + eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); + eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); + eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); + eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); + eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); + eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); + eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); + eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); + eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); + eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); + eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); + eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); + eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); + eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + //---------------mctruth + eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); + eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); + eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); + eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); + eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); + eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); + eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); + eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); + eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); + eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); + eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + + //---------------------gtruth + eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); + eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); + eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); + eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); + eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); + eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); + eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); + eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); + eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); + eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); + eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); + eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); + eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); + eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); + eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); + eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); + eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); + eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); + eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); + eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); + eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); + eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); + eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); + eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); + eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); + eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); + eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); + eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); + eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); + eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); + eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); + eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); + eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); + eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); + eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); + eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); + eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); + eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); + eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); + eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); + eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); + eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); + eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); + eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); + eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); + eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); + eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); + eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); + eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); + eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + } + + //analyze_Geant4.h + void ClearGeant4Branches(){ + + m_geant4_pdg.clear(); + m_geant4_trackid.clear(); + m_geant4_mother.clear(); + m_geant4_statuscode.clear(); + m_geant4_E.clear(); + m_geant4_mass.clear(); + m_geant4_px.clear(); + m_geant4_py.clear(); + m_geant4_pz.clear(); + m_geant4_dx.clear(); + m_geant4_dy.clear(); + m_geant4_dz.clear(); + + m_geant4_vx.clear(); + m_geant4_vy.clear(); + m_geant4_vz.clear(); + m_geant4_process.clear(); + m_geant4_end_process.clear(); + + m_geant4_costheta.clear(); + } + + void CreateGeant4Branches(){ + geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_geant4_px); + geant4_tree->Branch("geant4_py", &m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_geant4_process); + } + + //analyze_Slice.h + void ClearSlices(){ + m_reco_slice_num = 0; + m_reco_slice_nuscore.clear(); + m_matched_signal_shower_overlay_fraction.clear(); + //std::vector m_matched_signal_shower_conversion_length; + m_matched_signal_shower_true_E.clear(); + m_matched_signal_shower_nuscore.clear(); + m_matched_signal_shower_sliceId.clear(); + m_matched_signal_shower_is_clearcosmic.clear(); + m_matched_signal_shower_num = 0; + m_matched_signal_shower_is_nuslice.clear(); + m_matched_signal_shower_tracks_in_slice.clear(); + m_matched_signal_shower_showers_in_slice.clear(); + + m_reco_slice_num_pfps.clear(); + m_reco_slice_num_showers.clear(); + m_reco_slice_num_tracks.clear(); + + + m_matched_signal_track_true_E.clear(); + m_matched_signal_track_nuscore.clear(); + m_matched_signal_track_sliceId.clear(); + m_matched_signal_track_is_clearcosmic.clear(); + m_matched_signal_track_is_nuslice.clear(); + m_matched_signal_track_tracks_in_slice.clear(); + m_matched_signal_track_showers_in_slice.clear(); + + + m_matched_signal_track_num = 0; + + + //int m_matched_signal_total_num_slices; + + m_reco_1g1p_is_same_slice = false; + m_reco_1g1p_is_multiple_slices = false; + m_reco_1g1p_is_nuslice = false; + m_reco_1g0p_is_nuslice = false; + m_reco_1g1p_nuscore = -999; + m_reco_1g0p_nuscore = -999; + m_is_matched_1g1p = false; + m_is_matched_1g0p = false; + m_no_matched_showers = false; + m_multiple_matched_showers = false; + m_multiple_matched_tracks = false; + + + /* m_reco_slice_shower_num_matched_signal = -999; + m_reco_slice_track_num_matched_signal = -999; + m_reco_slice_shower_matched_sliceId.clear(); + m_reco_slice_track_matched_sliceId.clear(); + m_reco_slice_shower_matched_energy.clear(); + m_reco_slice_track_matched_energy.clear(); + m_reco_slice_shower_matched_conversion.clear(); + m_reco_slice_shower_matched_overlay_frac.clear(); + */ + } + + + void CreateSliceBranches(){ + vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); + vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); + vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); + vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); + + ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); + //std::vector m_matched_signal_shower_conversion_length; + ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); + ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); + ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); + ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); + ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); + + ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); + ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); + ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); + + // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); + ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); + ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); + ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); + ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); + ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); + ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); + ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); + ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + + //int m_matched_signal_total_num_slices; + ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); + ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); + ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); + ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); + ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); + + ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); + ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); + ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); + + ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); + ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + } + + void ResizeSlices(size_t size){ + m_reco_slice_nuscore.resize(size,-999); + m_reco_slice_num_pfps.resize(size,0); + m_reco_slice_num_showers.resize(size,0); + m_reco_slice_num_tracks.resize(size,0); + } + + void Output_EventMeta( art::Event &evt){ + + //Some event based properties + m_subrun_counts++; + m_number_of_events++; + m_run_number = evt.run(); + m_subrun_number = evt.subRun(); + m_event_number = evt.id().event(); + } + + //set the vertex for now; + void Output_PFParticleInfo( std::vector PPFPs){ + + int pfp_size = PPFPs.size(); + + for(int index = 0; index < pfp_size; index++){ + + PandoraPFParticle* temp_p = &PPFPs[index]; + if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; + m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; + m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; + m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; +// std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; + m_reco_vertex_in_SCB = distToSCB(m_reco_vertex_dist_to_SCB,tmp); + m_reco_vertex_dist_to_active_TPC = distToTPCActive(tmp); + m_reco_vertex_dist_to_CPA = distToCPA(tmp); + + if(temp_p->get_IsNeutrino() ){ + m_reco_slice_num++; + m_reco_slice_nuscore.push_back(temp_p->get_NuScore()); + + } + } + + //resize slice variables size; + // this->ResizeSlices(m_reco_slice_num); + } +} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index 665ef79ac..a73d5e353 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -1,2159 +1,1156 @@ -//how about intialize all branches in one place; +#ifndef SBNCODE_SINGLEPHOTONANALYS_ISINIT_BRANCHES_H +#define SBNCODE_SINGLEPHOTONANALYS_INIT_BRANCHES_H + +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" + +#include "art/Framework/Principal/Event.h" + +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + namespace single_photon { - //Process of initialize branches: - //ClearBranches, ResizeBranches, CreateBranches - - void SinglePhoton::ClearMeta(){ - //------------ Event related Variables ------------- - m_event_number = -99; - m_subrun_number = -99; - m_run_number = -99; - m_test_matched_hits = 0; - - m_pot_per_event = 0; - m_pot_per_subrun = m_subrun_pot; - m_number_of_events_in_subrun = 0; - - m_genie_spline_weight = 1.0; - - //------------ Vertex related Variables ------------- - m_reco_vertex_size = 0; - m_vertex_pos_x=-99999; - m_vertex_pos_y=-99999; - m_vertex_pos_z=-99999; - m_vertex_pos_tick=-9999; - m_vertex_pos_wire_p0=-9999; - m_vertex_pos_wire_p1=-9999; - m_vertex_pos_wire_p2=-9999; - m_reco_vertex_in_SCB = -9999; - m_reco_vertex_dist_to_SCB = -9999; - m_reco_vertex_dist_to_active_TPC= -9999; - m_reco_vertex_dist_to_CPA= -9999; - - m_reco_vertex_to_nearest_dead_wire_plane0=-99999; - m_reco_vertex_to_nearest_dead_wire_plane1=-99999; - m_reco_vertex_to_nearest_dead_wire_plane2=-99999; - - m_reco_slice_objects = 0; - } - - - void SinglePhoton::CreateMetaBranches(){ - - //true_eventweight_tree - true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); - - //run_subrun_tree - run_subrun_tree->Branch("run",&m_run,"run/I"); - run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); - run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); - run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); - - //pot_tree - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); - - //vertex_tree -- part of it - // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); - - vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); - vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); - vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); - - - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); - - vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); - vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); - - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); - - // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); - vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); - vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); - vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); - vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); - vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); - vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); - } - - //isolation.h - void SinglePhoton::ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); - - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); - - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); - - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); - } - - void SinglePhoton::CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); - - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); - - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); - - - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); - - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); - - } - - //second_shower_search.h - void SinglePhoton::ClearSecondShowers(){ - m_sss_num_unassociated_hits=0; - m_sss_num_unassociated_hits_below_threshold=0; - m_sss_num_associated_hits=0; - - m_sss_num_candidates = 0; - - m_sss_candidate_in_nu_slice.clear(); - m_sss_candidate_num_hits.clear(); - m_sss_candidate_num_wires.clear(); - m_sss_candidate_num_ticks.clear(); - m_sss_candidate_plane.clear(); - m_sss_candidate_PCA.clear(); - m_sss_candidate_mean_ADC.clear(); - m_sss_candidate_ADC_RMS.clear(); - m_sss_candidate_impact_parameter.clear(); - m_sss_candidate_fit_slope.clear(); - m_sss_candidate_veto_score.clear(); - m_sss_candidate_fit_constant.clear(); - m_sss_candidate_mean_tick.clear(); - m_sss_candidate_max_tick.clear(); - m_sss_candidate_min_tick.clear(); - m_sss_candidate_min_wire.clear(); - m_sss_candidate_max_wire.clear(); - m_sss_candidate_mean_wire.clear(); - m_sss_candidate_min_dist.clear(); - m_sss_candidate_wire_tick_based_length.clear(); - m_sss_candidate_energy.clear(); - m_sss_candidate_angle_to_shower.clear(); - m_sss_candidate_closest_neighbour.clear(); - m_sss_candidate_matched.clear(); - m_sss_candidate_matched_energy_fraction_best_plane.clear(); - m_sss_candidate_pdg.clear(); - m_sss_candidate_parent_pdg.clear(); - m_sss_candidate_trackid.clear(); - m_sss_candidate_true_energy.clear(); - m_sss_candidate_overlay_fraction.clear(); - m_sss_candidate_remerge.clear(); - } - - void SinglePhoton::ClearSecondShowers3D(){ - - m_sss3d_num_showers = 0; - m_sss3d_shower_start_x.clear(); - m_sss3d_shower_start_y.clear(); - m_sss3d_shower_start_z.clear(); - m_sss3d_shower_dir_x.clear(); - m_sss3d_shower_dir_y.clear(); - m_sss3d_shower_dir_z.clear(); - m_sss3d_shower_length.clear(); - m_sss3d_shower_conversion_dist.clear(); - m_sss3d_shower_invariant_mass.clear(); - m_sss3d_shower_implied_invariant_mass.clear(); - m_sss3d_shower_impact_parameter.clear(); - m_sss3d_shower_energy_max.clear(); - m_sss3d_shower_score.clear(); - m_sss3d_slice_nu.clear(); - m_sss3d_slice_clear_cosmic.clear(); - m_sss3d_shower_ioc_ratio.clear(); - } - - void SinglePhoton::ClearStubs(){ - m_trackstub_num_unassociated_hits = 0; - m_trackstub_unassociated_hits_below_threshold = 0; - m_trackstub_associated_hits=0; - m_trackstub_num_candidates=0; - m_trackstub_candidate_in_nu_slice.clear(); - m_trackstub_candidate_num_hits.clear(); - m_trackstub_candidate_num_wires.clear(); - m_trackstub_candidate_num_ticks.clear(); - m_trackstub_candidate_plane.clear(); - m_trackstub_candidate_PCA.clear(); - m_trackstub_candidate_mean_ADC.clear(); - m_trackstub_candidate_ADC_RMS.clear(); - m_trackstub_candidate_veto_score.clear(); - m_trackstub_candidate_mean_tick.clear(); - m_trackstub_candidate_max_tick.clear(); - m_trackstub_candidate_min_tick.clear(); - m_trackstub_candidate_min_wire.clear(); - m_trackstub_candidate_max_wire.clear(); - m_trackstub_candidate_mean_wire.clear(); - m_trackstub_candidate_min_dist.clear(); - m_trackstub_candidate_min_impact_parameter_to_shower.clear(); - m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); - m_trackstub_candidate_min_ioc_to_shower_start.clear(); - m_trackstub_candidate_ioc_based_length.clear(); - m_trackstub_candidate_wire_tick_based_length.clear(); - m_trackstub_candidate_mean_ADC_first_half.clear(); - m_trackstub_candidate_mean_ADC_second_half.clear(); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); - m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); - m_trackstub_candidate_linear_fit_chi2.clear(); - m_trackstub_candidate_energy.clear(); - m_trackstub_candidate_remerge.clear(); - m_trackstub_candidate_matched.clear(); - m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); - m_trackstub_candidate_pdg.clear(); - m_trackstub_candidate_parent_pdg.clear(); - m_trackstub_candidate_trackid.clear(); - m_trackstub_candidate_true_energy.clear(); - m_trackstub_candidate_overlay_fraction.clear(); - - m_trackstub_num_candidate_groups = 0; - m_grouped_trackstub_candidate_indices.clear(); - m_trackstub_candidate_group_timeoverlap_fraction.clear(); - } - - void SinglePhoton::CreateSecondShowerBranches(){ - vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); - vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); - - - vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); - vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); - vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); - vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); - vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); - vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); - vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); - vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); - - vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); - vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); - vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); - vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); - vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); - vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); - vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); - vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); - - - vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); - vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); - vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); - vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); - vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); - vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); - - vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); - vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); - vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); - vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); - vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); - vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); - - vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); - vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); - vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); - vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); - vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); - vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); - - } - - void SinglePhoton::CreateSecondShowerBranches3D(){ - vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); - - vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); - vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); - vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); - vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); - vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); - vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); - - vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); - vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); - vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); - vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); - vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); - vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); - vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); - vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); - //vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); - //vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); - } - - void SinglePhoton::CreateStubBranches(){ - - vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); - vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); - vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); - vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); - vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); - vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); - vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); - vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); - vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); - vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); - vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); - vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); - vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); - vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); - vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); - vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); - vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); - vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); - vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); - vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); - vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); - vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); - vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); - vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); - vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); - vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); - vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); - vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); - vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); - vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); - vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); - vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); - vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); - vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); - vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); - - - vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); - vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); - vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); - - } - - void SinglePhoton::ResizeSecondShowers(size_t size){} - - //analyze_OpFlashes.h - void SinglePhoton::ClearFlashes(){ - m_reco_num_flashes =0; - m_reco_num_flashes_in_beamgate =0; - m_reco_flash_total_pe.clear(); - m_reco_flash_time.clear(); - m_reco_flash_time_width.clear(); - m_reco_flash_abs_time.clear(); - m_reco_flash_frame.clear(); - m_reco_flash_ycenter.clear(); - m_reco_flash_ywidth.clear(); - m_reco_flash_zcenter.clear(); - m_reco_flash_zwidth.clear(); - m_reco_flash_total_pe_in_beamgate.clear(); - m_reco_flash_time_in_beamgate.clear(); - m_reco_flash_ycenter_in_beamgate.clear(); - m_reco_flash_zcenter_in_beamgate.clear(); - m_CRT_veto_nhits = -999; - m_CRT_veto_hit_PE.clear(); - m_CRT_min_hit_time = -999; - m_CRT_min_hit_PE = -999; - m_CRT_min_hit_x = -999; - m_CRT_min_hit_y = -999; - m_CRT_min_hit_z = -999; - m_CRT_hits_time.clear(); - m_CRT_hits_PE.clear(); - m_CRT_hits_x.clear(); - m_CRT_hits_y.clear(); - m_CRT_hits_z.clear(); - m_CRT_dt = -999; - - } - - void SinglePhoton::CreateFlashBranches(){ - vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); - vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); - } - - void SinglePhoton::ResizeFlashes(size_t size){ - m_reco_flash_total_pe.resize(size); - m_reco_flash_time.resize(size); - m_reco_flash_time_width.resize(size); - m_reco_flash_abs_time.resize(size); - m_reco_flash_frame.resize(size); - m_reco_flash_ycenter.resize(size); - m_reco_flash_ywidth.resize(size); - m_reco_flash_zcenter.resize(size); - m_reco_flash_zwidth.resize(size); - m_reco_flash_total_pe_in_beamgate.resize(size); - m_reco_flash_time_in_beamgate.resize(size); - m_reco_flash_ycenter_in_beamgate.resize(size); - m_reco_flash_zcenter_in_beamgate.resize(size); - m_CRT_veto_hit_PE.resize(size); - - m_CRT_hits_time.resize(size); - m_CRT_hits_PE.resize(size); - m_CRT_hits_x.resize(size); - m_CRT_hits_y.resize(size); - m_CRT_hits_z.resize(size); - } - - //analyze_Tracks.h - void SinglePhoton::ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_length.clear(); - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - m_reco_track_end_dist_to_active_TPC.clear(); - m_reco_track_start_dist_to_active_TPC.clear(); - m_reco_track_end_dist_to_CPA.clear(); - m_reco_track_start_dist_to_CPA.clear(); - m_reco_track_end_dist_to_SCB.clear(); - m_reco_track_start_dist_to_SCB.clear(); - m_reco_track_end_in_SCB.clear(); - m_reco_track_start_in_SCB.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_calo_energy_plane0.clear(); - m_reco_track_calo_energy_plane1.clear(); - m_reco_track_calo_energy_plane2.clear(); - m_reco_track_calo_energy_max.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_endx.clear(); - m_sim_track_endy.clear(); - m_sim_track_endz.clear(); - m_sim_track_length.clear(); - - m_sim_track_px.clear(); - m_sim_track_py.clear(); - m_sim_track_pz.clear(); - m_sim_track_trackID.clear(); - - // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - - m_reco_track_end_to_nearest_dead_wire_plane0.clear(); - m_reco_track_end_to_nearest_dead_wire_plane1.clear(); - m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_pfparticle_pdg.clear(); - m_reco_track_is_nuslice.clear(); - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); - } - - void SinglePhoton::CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); - vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); - vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); - vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); - vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); - vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); - vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); - vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); - - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); - vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); - vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); - vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - vertex_tree->Branch("sim_track_px",&m_sim_track_px); - vertex_tree->Branch("sim_track_py",&m_sim_track_py); - vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); - vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); - vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); - vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); - vertex_tree->Branch("sim_track_length",&m_sim_track_length); - - vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); - } - - void SinglePhoton::ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - m_reco_track_end_dist_to_active_TPC.resize(size); - m_reco_track_start_dist_to_active_TPC.resize(size); - m_reco_track_end_dist_to_CPA.resize(size); - m_reco_track_start_dist_to_CPA.resize(size); - m_reco_track_end_dist_to_SCB.resize(size); - m_reco_track_start_dist_to_SCB.resize(size); - m_reco_track_end_in_SCB.resize(size); - m_reco_track_start_in_SCB.resize(size); - - m_reco_track_calo_energy_plane0.resize(size); - m_reco_track_calo_energy_plane1.resize(size); - m_reco_track_calo_energy_plane2.resize(size); - m_reco_track_calo_energy_max.resize(size); - - - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_endx.resize(size); - m_sim_track_endy.resize(size); - m_sim_track_endz.resize(size); - m_sim_track_length.resize(size); - - m_sim_track_px.resize(size); - m_sim_track_py.resize(size); - m_sim_track_pz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - - m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); - m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_pfparticle_pdg.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); - } - - //analyze_Shower.h - void SinglePhoton::ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_start_dist_to_active_TPC.clear(); - m_reco_shower_start_dist_to_CPA.clear(); - m_reco_shower_start_dist_to_SCB.clear(); - m_reco_shower_start_in_SCB.clear(); - m_reco_shower_end_dist_to_active_TPC.clear(); - m_reco_shower_end_dist_to_SCB.clear(); - - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - - m_reco_shower_reclustered_energy_plane0.clear(); - m_reco_shower_reclustered_energy_plane1.clear(); - m_reco_shower_reclustered_energy_plane2.clear(); - m_reco_shower_reclustered_energy_max.clear(); - - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - m_reco_shower_plane0_meanRMS.clear(); - m_reco_shower_plane1_meanRMS.clear(); - m_reco_shower_plane2_meanRMS.clear(); - - m_reco_shower_hit_tick.clear(); - m_reco_shower_hit_wire.clear(); - m_reco_shower_hit_plane.clear(); - m_reco_shower_spacepoint_x.clear(); - m_reco_shower_spacepoint_y.clear(); - m_reco_shower_spacepoint_z.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - - m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); - m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - m_reco_shower_pfparticle_pdg.clear(); - - } - - void SinglePhoton::CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); - vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); - vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); - vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); - - - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); - //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); - vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); - vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); - - vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); - vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); - vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); - vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); - - vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); - vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); - vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); - - vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); - vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); - vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); - vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); - } - - void SinglePhoton::ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower_reclustered_energy_plane0.resize(size); - m_reco_shower_reclustered_energy_plane1.resize(size); - m_reco_shower_reclustered_energy_plane2.resize(size); - m_reco_shower_reclustered_energy_max.resize(size); - - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - m_reco_shower_start_dist_to_active_TPC.resize(size); - m_reco_shower_start_dist_to_CPA.resize(size); - m_reco_shower_start_dist_to_SCB.resize(size); - m_reco_shower_start_in_SCB.resize(size); - - m_reco_shower_end_dist_to_active_TPC.resize(size); - m_reco_shower_end_dist_to_SCB.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - m_reco_shower_plane0_meanRMS.resize(size); - m_reco_shower_plane1_meanRMS.resize(size); - m_reco_shower_plane2_meanRMS.resize(size); - - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - - m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); - m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - m_reco_shower_pfparticle_pdg.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); - } - - //analyze_MCTruth.h - void SinglePhoton::ClearMCTruths(){ - m_mctruth_num = 0; - m_mctruth_origin = -99; - m_mctruth_mode = -99; - m_mctruth_interaction_type = -99; - m_mctruth_nu_vertex_x = -9999; - m_mctruth_nu_vertex_y = -9999; - m_mctruth_nu_vertex_z = -9999; - m_mctruth_reco_vertex_dist = -9999; - m_mctruth_ccnc = -99; - m_mctruth_qsqr = -99; - m_mctruth_nu_E = -99; - m_mctruth_nu_pdg = 0; - m_mctruth_lepton_pdg = 0; - m_mctruth_num_daughter_particles = -99; - m_mctruth_daughters_pdg.clear(); - m_mctruth_daughters_E.clear(); - - m_mctruth_daughters_status_code.clear(); - m_mctruth_daughters_trackID.clear(); - m_mctruth_daughters_mother_trackID.clear(); - m_mctruth_daughters_px.clear(); - m_mctruth_daughters_py.clear(); - m_mctruth_daughters_pz.clear(); - m_mctruth_daughters_startx.clear(); - m_mctruth_daughters_starty.clear(); - m_mctruth_daughters_startz.clear(); - m_mctruth_daughters_time.clear(); - m_mctruth_daughters_endx.clear(); - m_mctruth_daughters_endy.clear(); - m_mctruth_daughters_endz.clear(); - m_mctruth_daughters_endtime.clear(); - m_mctruth_daughters_process.clear(); - m_mctruth_daughters_end_process.clear(); - - - m_mctruth_is_delta_radiative = 0; - m_mctruth_delta_radiative_1g1p_or_1g1n = -999; - - m_mctruth_delta_photon_energy=-999; - m_mctruth_delta_proton_energy=-999; - m_mctruth_delta_neutron_energy=-999; - - m_mctruth_num_exiting_photons =0; - m_mctruth_num_exiting_protons =0; - m_mctruth_num_exiting_pi0 =0; - m_mctruth_num_exiting_pipm =0; - m_mctruth_num_exiting_neutrons=0; - m_mctruth_num_exiting_delta0=0; - m_mctruth_num_exiting_deltapm=0; - m_mctruth_num_exiting_deltapp=0; - - m_mctruth_num_reconstructable_protons = 0; - - m_mctruth_is_reconstructable_1g1p = 0; - m_mctruth_is_reconstructable_1g0p = 0; - - m_mctruth_leading_exiting_proton_energy = -9999; - - m_mctruth_exiting_pi0_E.clear(); - m_mctruth_exiting_pi0_mom.clear(); - m_mctruth_exiting_pi0_px.clear(); - m_mctruth_exiting_pi0_py.clear(); - m_mctruth_exiting_pi0_pz.clear(); - - m_mctruth_pi0_leading_photon_energy = -9999; - m_mctruth_pi0_subleading_photon_energy = -9999; - m_mctruth_pi0_leading_photon_end_process = "none"; - m_mctruth_pi0_subleading_photon_end_process = "none"; - m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_exiting_TPC = -999; - m_mctruth_pi0_subleading_photon_exiting_TPC = -999; - m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; - - m_mctruth_exiting_delta0_num_daughters.clear(); - - m_mctruth_exiting_photon_mother_trackID.clear(); - m_mctruth_exiting_photon_trackID.clear(); - m_mctruth_exiting_photon_from_delta_decay.clear(); - m_mctruth_exiting_photon_energy.clear(); - m_mctruth_exiting_photon_px.clear(); - m_mctruth_exiting_photon_py.clear(); - m_mctruth_exiting_photon_pz.clear(); - - m_mctruth_exiting_proton_mother_trackID.clear(); - m_mctruth_exiting_proton_trackID.clear(); - m_mctruth_exiting_proton_from_delta_decay.clear(); - m_mctruth_exiting_proton_energy.clear(); - m_mctruth_exiting_proton_px.clear(); - m_mctruth_exiting_proton_py.clear(); - m_mctruth_exiting_proton_pz.clear(); - - m_mctruth_exiting_neutron_mother_trackID.clear(); - m_mctruth_exiting_neutron_trackID.clear(); - m_mctruth_exiting_neutron_from_delta_decay.clear(); - m_mctruth_exiting_neutron_energy.clear(); - m_mctruth_exiting_neutron_px.clear(); - m_mctruth_exiting_neutron_py.clear(); - m_mctruth_exiting_neutron_pz.clear(); - } - - void SinglePhoton::CreateMCTruthBranches(){ - vertex_tree->Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); - vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); - vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); - vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); - vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); - vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); - vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); - vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); - vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); - vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); - vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); - vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); - vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); - vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); - vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); - vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); - - - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); - vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); - vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); - vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); - vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); - - vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); - vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); - vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); - vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); - - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); - vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); - vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); - vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); - vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); - vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); - - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); - } - - void SinglePhoton::ResizeMCTruths(size_t size){ - m_mctruth_daughters_pdg.resize(size); - m_mctruth_daughters_E.resize(size); - m_mctruth_daughters_status_code.resize(size); - m_mctruth_daughters_trackID.resize(size); - m_mctruth_daughters_mother_trackID.resize(size); - m_mctruth_daughters_px.resize(size); - m_mctruth_daughters_py.resize(size); - m_mctruth_daughters_pz.resize(size); - m_mctruth_daughters_startx.resize(size); - m_mctruth_daughters_starty.resize(size); - m_mctruth_daughters_startz.resize(size); - m_mctruth_daughters_time.resize(size); - m_mctruth_daughters_endx.resize(size); - m_mctruth_daughters_endy.resize(size); - m_mctruth_daughters_endz.resize(size); - m_mctruth_daughters_endtime.resize(size); - m_mctruth_daughters_end_process.resize(size); - m_mctruth_daughters_process.resize(size); - } - - //analyze_EventWeight.h - void SinglePhoton::ClearEventWeightBranches(){ - m_mcflux_nu_pos_x=-9999; - m_mcflux_nu_pos_y=-9999; - m_mcflux_nu_pos_z=-9999; - m_mcflux_nu_mom_x=-9999; - m_mcflux_nu_mom_y=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_E=-9999; - m_mcflux_ntype=0; - m_mcflux_ptype=0; - m_mcflux_nimpwt=-9999; - m_mcflux_dk2gen=-9999; - m_mcflux_nenergyn=-9999; - m_mcflux_tpx=-9999; - m_mcflux_tpy=-9999; - m_mcflux_tpz=-9999; - m_mcflux_vx=-9999; - m_mcflux_vy=-9999; - m_mcflux_vz=-9999; - m_mcflux_tptype=0; - m_mctruth_nparticles=0; - /* - // m_mctruth_particles_track_ID[]; - // m_mctruth_particles_pdg_code[]; - // m_mctruth_particles_mother[]; - // m_mctruth_particles_status_code[]; - // m_mctruth_particles_num_daughters[]; //other similar variables - // m_mctruth_particles_daughters[]; - //m_mctruth_particles_Gvx.clear(); - //m_mctruth_particles_Gvy.clear(); - m_mctruth_particles_Gvz.clear(); - m_mctruth_particles_Gvt.clear(); - m_mctruth_particles_px0.clear(); - m_mctruth_particles_py0.clear(); - m_mctruth_particles_pz0.clear(); - m_mctruth_particles_e0.clear(); - //int m_mctruth_particles_rescatter.clear(); - m_mctruth_particles_polx.clear(); - m_mctruth_particles_poly.clear(); - m_mctruth_particles_polz.clear(); - - //int m_mctruth_neutrino_CCNC; - //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars - //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" - int m_mctruth_neutrino_target.clear(); - int m_mctruth_neutrino_nucleon.clear(); - int m_mctruth_neutrino_quark.clear(); - m_mctruth_neutrino_w.clear(); - m_mctruth_neutrino_x.clear(); - m_mctruth_neutrino_y.clear(); - */ - //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" - m_gtruth_is_sea_quark=false; - m_gtruth_tgt_pdg=0; - m_gtruth_tgt_Z = -9999; - m_gtruth_tgt_A = -9999; - m_gtruth_tgt_p4_x = -9999; - m_gtruth_tgt_p4_y = -9999; - m_gtruth_tgt_p4_z = -9999; - m_gtruth_tgt_p4_E = -9999; - m_gtruth_weight=-9999; - m_gtruth_probability=-9999; - m_gtruth_xsec=-9999; - m_gtruth_diff_xsec=-9999; - m_gtruth_gphase_space=-9999; - m_gtruth_vertex_x=-9999; - m_gtruth_vertex_y=-9999; - m_gtruth_vertex_z=-9999; - m_gtruth_vertex_T=-9999; - m_gtruth_gscatter=-9999; - m_gtruth_gint=-9999; - m_gtruth_res_num=-9999; - m_gtruth_num_piplus=-9999; - m_gtruth_num_pi0=-9999; - m_gtruth_num_piminus=-9999; - m_gtruth_num_proton=-9999; - m_gtruth_num_neutron=-9999; - m_gtruth_is_charm=false; - m_gtruth_is_strange=false; - m_gtruth_charm_hadron_pdg = -9999; - m_gtruth_strange_hadron_pdg = -9999; - m_gtruth_decay_mode = -9999; - m_gtruth_gx=-9999; - m_gtruth_gy=-9999; - m_gtruth_gy=-9999; - m_gtruth_gt=-9999; - m_gtruth_gw=-9999; - m_gtruth_gQ2=-9999; - m_gtruth_gq2=-9999; - m_gtruth_probe_pdg=0; - m_gtruth_probe_p4_x=-9999; - m_gtruth_probe_p4_y=-9999; - m_gtruth_probe_p4_z=-9999; - m_gtruth_probe_p4_E=-9999; - m_gtruth_hit_nuc_p4_x=-9999; - m_gtruth_hit_nuc_p4_y=-9999; - m_gtruth_hit_nuc_p4_z=-9999; - m_gtruth_hit_nuc_p4_E=-9999; - m_gtruth_hit_nuc_pos=-9999; - m_gtruth_fs_had_syst_p4_x=-9999; - m_gtruth_fs_had_syst_p4_y=-9999; - m_gtruth_fs_had_syst_p4_z=-9999; - m_gtruth_fs_had_syst_p4_E=-9999; - } - - void SinglePhoton::CreateEventWeightBranches(){ - //-----------------run info - eventweight_tree->Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); - //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); - //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); - - //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); - eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); - eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); - eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); - eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); - eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); - eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); - eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); - eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); - } - - //analyze_Geant4.h - void SinglePhoton::ClearGeant4Branches(){ - - m_geant4_pdg.clear(); - m_geant4_trackid.clear(); - m_geant4_mother.clear(); - m_geant4_statuscode.clear(); - m_geant4_E.clear(); - m_geant4_mass.clear(); - m_geant4_px.clear(); - m_geant4_py.clear(); - m_geant4_pz.clear(); - m_geant4_dx.clear(); - m_geant4_dy.clear(); - m_geant4_dz.clear(); - - m_geant4_vx.clear(); - m_geant4_vy.clear(); - m_geant4_vz.clear(); - m_geant4_process.clear(); - m_geant4_end_process.clear(); - - m_geant4_costheta.clear(); - } - - void SinglePhoton::CreateGeant4Branches(){ - geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_geant4_px); - geant4_tree->Branch("geant4_py", &m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_geant4_process); - } - - //analyze_Slice.h - void SinglePhoton::ClearSlices(){ - m_reco_slice_num = 0; - m_reco_slice_nuscore.clear(); - m_matched_signal_shower_overlay_fraction.clear(); - //std::vector m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; + std::map is_delta_map = { + {2224,"Delta++"}, + {2214,"Delta+"}, + {1114,"Delta-"}, + {2114,"Delta0"}, + {-2224,"Anti-Delta++"}, + {-2214,"Anti-Delta+"}, + {-1114,"Anti-Delta-"}, + {-2114,"Anti-Delta0"}}; + + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + bool bool_make_sss_plots; + + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + //same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer;//"daq" +// std::ofstream out_stream; + + double m_tpc_active_XMin; + double m_tpc_active_YMin; + double m_tpc_active_ZMin; + double m_tpc_active_XMax; + double m_tpc_active_YMax; + double m_tpc_active_ZMax; + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + // std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + // std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + + + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + //SSS parameters + double m_max_conv_dist; + double m_mass_pi0_mev; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + +// spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + +// int m_Cryostat; +// int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + double m_reco_vertex_dist_to_CPA; + + + int m_reco_asso_showers; + +// double m_reco_vertex_to_nearest_dead_wire_plane0; +// double m_reco_vertex_to_nearest_dead_wire_plane1; +// double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + double m_CRT_dt; //time between flash and nearest CRT hit + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + + int pfp_w_bestnuID; + //------------ Track related Variables ------------- + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_CPA; + std::vector m_reco_track_start_dist_to_CPA; + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + //corresponding variables on the best plane of reco track, which is defined as such------ + //plane 2 have good hits, then plane 2 is the best-plane + // which plane of plane 0 and 1 has more good hits will be best plane + //one of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + +// vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ +// vector m_reco_track_end_to_nearest_dead_wire_plane1; +// vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + ere is no shower hits, set to 999 + ere is shower hits but no track hits, set to -999 + */ + + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + ch plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + o -999 if there is no unassociated hits or track hits on plane + */ + + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + ch plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; +// +// vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ +// vector m_reco_shower_start_to_nearest_dead_wire_plane1; +// vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + double m_mctruth_leading_exiting_proton_energy; + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + int m_mctruth_num_reconstructable_protons; + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + double _time2cm;//value modeled from David's shower code +// related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + //matching variables + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ //int m_matched_signal_total_num_slices; - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); - */ - } - - - void SinglePhoton::CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + /** + * @brief: reset/clear data members + */ + void ClearMeta(); + void CreateMetaBranches(); + + void ClearStubs(); + void CreateStubBranches(); + + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + + + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); + + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + + + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); + + + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + + void Output_EventMeta( art::Event &evt); + void Output_PFParticleInfo( std::vector PPFPs); - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); - } - - void SinglePhoton::ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size,-999); - m_reco_slice_num_pfps.resize(size,0); - m_reco_slice_num_showers.resize(size,0); - m_reco_slice_num_tracks.resize(size,0); - } } +#endif diff --git a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h b/sbncode/SinglePhotonAnalysis/Libraries/isolation.h deleted file mode 100644 index f7f4d697d..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/isolation.h +++ /dev/null @@ -1,602 +0,0 @@ -// override function of sorts for max_element function comparison -bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second < p2.second); -} - -// override function of sorts for min_element function comparison -bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second > p2.second); -} - -namespace single_photon{ - - /* Arguments to Function IsolationStudy (all are const): - * 1. vector named tracks of art ptr to recob track - * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle - * 3. vector named showers of art ptr to recob showers - * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle - * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit - * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int - * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit - */ - void SinglePhoton::IsolationStudy( - std::vector all_PPFPs, - const std::vector>& tracks, - const std::vector>& showers, - detinfo::DetectorPropertiesData const & theDetector) { - - int total_track_hits =0; - int total_shower_hits =0; - int nu_slice_id = -999; - - std::vector< art::Ptr > associated_hits; - std::vector< art::Ptr > unassociated_hits; - std::vector< art::Ptr > unassociated_hits_plane0; - std::vector< art::Ptr > unassociated_hits_plane1; - std::vector< art::Ptr > unassociated_hits_plane2; - - std::vector< std::map >> > v_newClusterToHitsMap(3); - - std::vector> slicehits; - - // BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS - for(size_t t =0; t< tracks.size(); t++){ - art::Ptr track = tracks[t]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); - // art::Ptr pfp = ppfp->pPFParticle;//trackToPFParticleMap[track]; - - int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); - //WARNING the temp. solution only work with best nuscore slice Keng - if(!ppfp->get_IsNuSlice()) continue; - - std::vector> tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); - std::vector> trackhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); - - if(ppfp->get_IsNeutrino()) slicehits.insert(slicehits.end(), tmp_slicehits.begin(), tmp_slicehits.end());//add up all nu slice hits - - std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; - total_track_hits += trackhits.size(); - - //WARNNING nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; - // temporary solution is to skip tracks[1]; - // if(nu_slice_id != sliceid && nu_slice_id != -999){ - // std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< shower = showers[s]; - PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); - // art::Ptr pfp = ppfp->pPFParticle;//showerToPFParticleMap.at(shower); - - int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); - - // if(sliceid != slice_w_bestnuID) continue;//WARNNING only deal with nu slice with best nu score for now Keng - if(!ppfp->get_IsNuSlice()) continue; - if(sliceid<0) continue; //negative sliceid is bad - - auto tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); - auto showerhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); - - std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; - total_shower_hits+=showerhits.size(); - - for(auto &h: showerhits){ - associated_hits.push_back(h); - } - } - // END FOR LOOP COUNTING SHOWER HITS - - m_sss_num_associated_hits = total_shower_hits + total_track_hits; - - // PRINT SUMMARY OF HIT TYPES - std::cout<<"*SSS: So in total we have "<= 0){ - m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; - - std::cout<<"*SSS: So that leaves "<View(); - switch((int)plane_view){ - case (0) : - unassociated_hits_plane0.push_back(h); - break; - case (1) : - unassociated_hits_plane1.push_back(h); - break; - case (2) : - unassociated_hits_plane2.push_back(h); - break; - } - - } - - } - - std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; - - std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); - - double tick_max = 0; - double tick_min = 1e10; - std::vector chan_max(3,0); - std::vector chan_min(3,1e10); - - // Creation of canvas and histograms to hold hit distance data - TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); - histcan->Divide(3, 2, 0.005, 0.1); - - TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); - TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); - TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); - std::vector s_hists = {s_hist0, s_hist1, s_hist2}; - - TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); - TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); - TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); - std::vector u_hists = {u_hist0, u_hist1, u_hist2}; - - - std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; - // saving wire and time coordinates - std::vector> pts_trk( tracks.size(), std::vector(3) ); - - PandoraPFParticle* ppfpt = PPFP_GetPPFPFromTrack(all_PPFPs, tracks[0]); - // art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); - auto trackhits = ppfpt->pPFPHits;//pfParticleToHitsMap.at(pfpt); - - std::vector t_pts(3); - std::vector> t_vec_t(3); // peak time of track hits on 3 planes. - std::vector> t_vec_c(3); // wire number of track hits on 3 planes. - - for(auto &th: trackhits){ - double wire = (double)th->WireID().Wire; - t_vec_c[(int)th->View()].push_back(wire); - - double time = (double)th->PeakTime(); - t_vec_t[(int)th->View()].push_back(time); - - tick_max = std::max(tick_max, time); - tick_min = std::min(tick_min, time); - chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); - chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); - - } - - t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); - t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); - t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); - pts_trk[0] = t_pts; - - std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; - std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; - std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; - - - std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; - - //First grab all shower clusters - std::vector> pts_shr( showers.size(), std::vector(3) ); - - // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) - std::vector, double >> sh_dist(3); - // vector to save hit with largest minimum distance (in sh_dist) on each plane - std::vector< std::pair, double > > max_min_hit(3); - - PandoraPFParticle* ppfps = PPFP_GetPPFPFromShower(all_PPFPs, showers[0]); - auto showerhits = ppfps->pPFPHits;//pfParticleToHitsMap.at(pfp_s); - // art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); - - std::vector t_pts_s(3); - std::vector> vec_t(3); - std::vector> vec_c(3); - std::vector num_shr_hits(3); - - for(auto &sh: showerhits){ - int plane = (int)sh->View(); - num_shr_hits[plane] += 1; - - double minDist = 999.9; //minimum distance between this shower hit and all track hits - double dist; - // only do if there are track hits on this plane with which to compare - if (t_vec_c[(int)sh->View()].size() != 0){ - double wire = (double)sh->WireID().Wire; - vec_c[(int)sh->View()].push_back(wire); - double time = (double)sh->PeakTime(); - vec_t[(int)sh->View()].push_back(time); - - for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); - if (dist < minDist) { - minDist = dist; - } - - } // end of track hits for - s_hists[(int)sh->View()]->Fill(minDist); - - // keep track of 10 smallest distances and their corresponding hits - if (sh_dist[plane].size() < 10){ - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } - else{ if (minDist < max_min_hit[plane].second){ - sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map - (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance - max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit - } } - - // finds the necessary plot boundaries to fit the shower - tick_max = std::max(tick_max, (double)sh->PeakTime()); - tick_min = std::min(tick_min, (double)sh->PeakTime()); - chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); - chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); - } // end if stmnt t_vec_c - } // end looping shower hits - - // create graphs from newly compiled shower coordinates - t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); - t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); - t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); - // save new graphs for this shower into vector containing all showers - pts_shr[0] = t_pts_s; - - // place data into approriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); - } - else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance - auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); - } - else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); - } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); - } - - /* DRAW SHOWER HISTOGRAM */ - histcan->cd(1); - s_hists[0]->Draw(); - s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(2); - s_hists[1]->Draw(); - s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - histcan->cd(3); - s_hists[2]->Draw(); - s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); - - - - //NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower - std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; - - // create vector of three layers for unassoc hits - std::vector g_unass(3); - - std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} - //make a map tp actual hits here I guess. - std::vector>> mapPointIndexToHit(3); - - std::vector minDist_tot(3); - std::vector minWire(3); - std::vector minTime(3); - - for(int plane = 0; plane < 3; plane++){ - minDist_tot[plane] = 999; - std::vector vec_t; - std::vector vec_c; - - for(auto &uh: unassociated_hits_all[plane]){ - - if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane - - double wire = (double)uh->WireID().Wire; - vec_c.push_back(wire); - double time = (double)uh->PeakTime(); - vec_t.push_back(time); - - double minDist = 999.9; - double dist; - for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ - dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); - if (dist < minDist) { minDist = dist; } - } - u_hists[(int)uh->View()]->Fill(minDist); - - if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits - minDist_tot[plane] = minDist; - minWire[plane] = wire; - minTime[plane] = time; - } - - // for reclustering - std::vector pt = {wire, vec_t.back()}; - pts_to_recluster[(int)uh->View()].push_back(pt); - mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; - - } // end looping unassociated_hits_all - - g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); - } // end looping planes - - // place data into appropriate vertex_tree variables - for(int plane = 0; plane < 3; plane++){ - if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); - } - else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); - } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); - } - - /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ - histcan->cd(4); - u_hists[0]->Draw(); - u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(5); - u_hists[1]->Draw(); - u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - histcan->cd(6); - u_hists[2]->Draw(); - u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); - - - /* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ - /* histcan->Update(); - histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); - */ - - delete histcan; - - - //PLOTTING NOW - //SET-UP - double plot_point_size = 0.6; - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - if(showers.size()+tracks.size() > tcols.size()){ - for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - } - } - - std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); - g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - g_vertex[i]->Draw("ap"); - - if(i>0){ - g_vertex[i]->GetYaxis()->SetLabelOffset(999); - g_vertex[i]->GetYaxis()->SetLabelSize(0); - } - - - } - - // ******************************** DeadWireRegions ******************************************** - //plot dead wire - for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - int badchan = bad_channel_list_fixed_mcc9[i].first; - int ok = bad_channel_list_fixed_mcc9[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - // std::cout<<"WIRE "<cd(thisp+1); - TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); - l->SetLineColor(kGray+1); - l->Draw("same"); - } - } - - // plot track - for(size_t t=0; t< pts_trk.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. - pts_trk[t][i]->Draw("p same"); - pts_trk[t][i]->SetMarkerColor(tcol); - pts_trk[t][i]->SetFillColor(tcol); - pts_trk[t][i]->SetMarkerStyle(20); - pts_trk[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - // plot shower hits - for(size_t t=0; t< pts_shr.size(); t++){ - int tcol = tcols[used_col]; - used_col++; - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(pts_shr[t][i]->GetN()>0){ - pts_shr[t][i]->Draw("p same"); //used in the vertex - pts_shr[t][i]->SetMarkerColor(tcol); - pts_shr[t][i]->SetFillColor(tcol); - pts_shr[t][i]->SetMarkerStyle(20); - pts_shr[t][i]->SetMarkerSize(plot_point_size); - } - } - } - - - // plot unassociated hits - for(int i=0; i<3; i++){ - can->cd(i+1); - if (g_unass[i]->GetN() > 0){ - g_unass[i]->SetMarkerColor(kBlack); - g_unass[i]->SetMarkerStyle(20); - g_unass[i]->SetMarkerSize(plot_point_size); - } - g_vertex[i]->Draw("p same"); - } - - - - - //******************* INFO Plotting ******************************* - - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - - TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); - - // PLOTTING SHOWER? - for(size_t t=0; t< pts_shr.size(); t++){ - std::string sname = "Shower "+std::to_string(t); - if(pts_shr[t][0]->GetN()>0){ - l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); - }else if(pts_shr[t][1]->GetN()>0){ - l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); - }else if(pts_shr[t][2]->GetN()>0){ - l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); - } - } - - // PLOTTING - for(size_t t=0; t< pts_trk.size(); t++){ - std::string sname = "Track "+std::to_string(t); - if(pts_trk[t][0]->GetN()>0){ - l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); - }else if(pts_trk[t][1]->GetN()>0){ - l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); - }else if(pts_trk[t][2]->GetN()>0){ - l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); - } - } - l_top->SetLineWidth(0); - l_top->SetLineColor(kWhite); - l_top->Draw("same"); - - can->Update(); - // can->SaveAs((print_name+".pdf").c_str(),"pdf"); - std::cout<<"*PRINTING"< PPFPs){ - - int pfp_size = PPFPs.size(); - - for(int index = 0; index < pfp_size; index++){ - - PandoraPFParticle* temp_p = &PPFPs[index]; - if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; - m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; - m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; - m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; -// std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; - m_reco_vertex_in_SCB = this->distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = this->distToTPCActive(tmp); - m_reco_vertex_dist_to_CPA = this->distToCPA(tmp); - - if(temp_p->get_IsNeutrino() ){ - m_reco_slice_num++; - m_reco_slice_nuscore.push_back(temp_p->get_NuScore()); - - } - } - - //resize slice variables size; - this->ResizeSlices(m_reco_slice_num); - } - -} diff --git a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx new file mode 100644 index 000000000..7a46c3f21 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx @@ -0,0 +1,662 @@ +#include "sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h" + +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/Processors.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" + +namespace single_photon +{ + void RecoMCTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::vector & vfrac + ){ + + + //if(m_is_verbose) + std::cout<<"RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; + m_sim_track_matched[i_trk] = 0; + + if(trackToMCParticleMap.count(track)>0){ + + const art::Ptr mcparticle = trackToMCParticleMap[track]; + std::cout<<"count2: "< mctruth = MCParticleToMCTruthMap[mcparticle]; + + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + // const art::Ptr pfp = ppfp->pPFParticle; + // const art::Ptr pfp = //trackToPFParticleMap[track]; + + std::vector correctedstart(3); + std::vector correctedend(3); + std::vector raw_End ={mcparticle->EndX(), mcparticle->EndY(), mcparticle->EndZ()}; + // std::cout<<"the raw end of this mcparticle is "<E(); + m_sim_track_mass[i_trk] = mcparticle->Mass(); + m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; + m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + m_sim_track_process[i_trk] = mcparticle->Process(); + m_sim_track_startx[i_trk] = correctedstart[0]; + m_sim_track_starty[i_trk] = correctedstart[1]; + m_sim_track_startz[i_trk] = correctedstart[2]; + + m_sim_track_endx[i_trk]= correctedend[0]; + m_sim_track_endy[i_trk]= correctedend[1]; + m_sim_track_endz[i_trk]= correctedend[2]; + + m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + + m_sim_track_px[i_trk]= mcparticle->Px(); + m_sim_track_py[i_trk]= mcparticle->Py(); + m_sim_track_pz[i_trk]= mcparticle->Pz(); + + + m_sim_track_origin[i_trk] = mctruth->Origin(); + m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + + m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; + m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + + + if(mcparticle->Mother()>=(int)mcParticleVector.size()){ + m_sim_track_parent_pdg[i_trk] = -1; + }else{ + m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + } + + } + i_trk++; + } + + return; + } + //recoMCmatching but specifically for recob::showers + void showerRecoMCmatching( + std::vector all_PPFPs, + std::vector>& showerVector, + std::map,art::Ptr>& showerToMCParticleMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + + std::vector vec_fraction_matched; + //processes that are "showery" + std::map map_is_shower_process = {{"compt",true}, + {"FastScintillation",true}, + {"eBrem",true}, + {"phot",true}, + {"eIoni",true}, + {"conv",true}, + {"annihil",true}}; + + std::vector spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); + //for each recob::track/shower in the event + bool default_verbose = m_is_verbose; + m_is_verbose = false; + for(size_t i=0; i pfp = ppfp->pPFParticle; + + //putting in the PFP pdg code as a check + + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = ppfp->pPFPHits; //pfParticleToHitsMap[pfp]; + + /** + * + * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower + * + **/ + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + + bool found_a_match = false; + + //std::cout<<"RecoMC()\t||\t On shower: "<Self() <<"and slice id "<View(); + + particle_vec.clear(); match_vec.clear(); //only store per hit + + //for the hit, fill the backtracker info + mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); + // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + + } // end loop over hits + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + if(m_is_verbose)std::cout << "recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; // a vector of mother MCP + std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; // number of associated MCP that has mothers + + //m_is_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(m_is_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(m_is_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + //Guanqun: this line here doesn't really cosider other break cases than finding primary particle + if(m_is_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(m_is_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + // best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + // best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + // best_mother_plane = 2; + } + + } + + + + // now have found the best mother of the shower + if(m_is_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + spacecharge_correction(match, corrected_vertex); + + + if(match->PdgCode()==22){ // if it's a gamma + std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; + spacecharge_correction(match, corrected_start, tmp ); + m_sim_shower_is_true_shower[i] = 1; + }else if(abs(match->PdgCode())==11){ // if it's e+/e- + spacecharge_correction(match, corrected_start); + m_sim_shower_is_true_shower[i] = 1; + }else{ + corrected_start = {-999,-999,-999}; + m_sim_shower_is_true_shower[i] = 0; + } + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + + if (match_mother.isNull()){ + m_sim_shower_parent_pdg[i] = -1; + m_sim_shower_parent_trackID[i] = -1; + + }else{ + m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + } + + + + m_sim_shower_matched[i] = 1; + m_sim_shower_energy[i] = match->E(); + m_sim_shower_mass[i] = match->Mass(); + m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + m_sim_shower_pdg[i] = match->PdgCode(); + m_sim_shower_trackID[i] = match->TrackId(); + m_sim_shower_process[i] = match->Process(); + m_sim_shower_end_process[i] = match->EndProcess(); + m_sim_shower_vertex_x[i] = corrected_vertex[0]; + m_sim_shower_vertex_y[i] = corrected_vertex[1]; + m_sim_shower_vertex_z[i] =corrected_vertex[2]; + + m_sim_shower_start_x[i] = corrected_start[0]; + m_sim_shower_start_y[i] = corrected_start[1]; + m_sim_shower_start_z[i] =corrected_start[2]; + + m_sim_shower_px[i] = match->Px(); + m_sim_shower_py[i] = match->Py(); + m_sim_shower_pz[i] = match->Pz(); + + // should've use 'best_mother_plane' here + m_sim_shower_best_matched_plane[i] = best_mother_index; + m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; + + m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + + mcParticleVector.push_back(match); + showerToMCParticleMap[shower] = mcParticleVector.back(); + + m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; + m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + + // if(marks_mother_vector.size()!=0){ + // //if(m_is_verbose) std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); + // std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), + std::to_string(best_mother_index), + std::to_string(marks_mother_vector[best_mother_index]->PdgCode()), + std::to_string(total_energy_on_plane[0]), + std::to_string(total_energy_on_plane[1]), + std::to_string(total_energy_on_plane[2]), + std::to_string(ppfp->get_IsClearCosmic()) + },spacers); + + if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< trackRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, + std::map, std::vector> >& pfParticleToHitsMap, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector){ + + std::vector trk_overlay_vec; + std::vector vec_fraction_matched; + bool reco_verbose = false; + //for each recob::track/shower in the event + for(size_t i=0; i pfp = objectToPFParticleMap[object]; + + // std::cout<<"recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<PdgCode(); + //and get the hits associated to the reco PFP + std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + + // std::vector particle_vec; + // std::vector match_vec; + + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + + bool found_a_match = false; + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; + + if(particle_vec.size()==0) n_not_associated_hits++; + + + //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; + found_a_match = true; + } + }//end loop over particles per hit + } + + + double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); + + trk_overlay_vec.push_back(fraction_num_hits_overlay); + if(n_associated_mcparticle_hits == 0){ + //This will only occur if the whole recob::PFParticle is associated with an overlay object + //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" + << " pdg=" << best_matched_mcparticle->PdgCode() + << " trkid=" << best_matched_mcparticle->TrackId() + << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; + } + + }//end vector loop. + //return vec_fraction_matched; + return trk_overlay_vec; + } + + + int photoNuclearTesting(std::vector>& mcParticleVector){ + + + for(auto &mcp: mcParticleVector){ + int pdg = mcp->PdgCode(); + std::string end_process = mcp->EndProcess(); + int status = mcp->StatusCode() ; + + + if(pdg==22){ + std::cout<<"PHOTO: "< +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H +#define SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H + +#include +#include + +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCTruth.h" + +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" + +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" + + //#include namespace single_photon { + void RecoMCTracks( + std::vector all_PPFPs, + const std::vector>& tracks, + std::map, art::Ptr > & trackToMCParticleMap, + std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, + std::vector> & mcParticleVector, + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + std::vector & vfrac + ); //recoMCmatching but specifically for recob::showers - void SinglePhoton::showerRecoMCmatching( + void showerRecoMCmatching( std::vector all_PPFPs, std::vector>& showerVector, std::map,art::Ptr>& showerToMCParticleMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ - - std::vector vec_fraction_matched; - //processes that are "showery" - std::map map_is_shower_process = {{"compt",true}, - {"FastScintillation",true}, - {"eBrem",true}, - {"phot",true}, - {"eIoni",true}, - {"conv",true}, - {"annihil",true}}; - - std::vector spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); - //for each recob::track/shower in the event - bool default_verbose = m_is_verbose; - m_is_verbose = false; - for(size_t i=0; i pfp = ppfp->pPFParticle; - - //putting in the PFP pdg code as a check - - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = ppfp->pPFPHits; //pfParticleToHitsMap[pfp]; - - /** - * - * Loop over hits associated with the reco PFP to find MCParticles which contribute energy to the reco shower - * - **/ - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - - bool found_a_match = false; - - //std::cout<<"SinglePhoton::RecoMC()\t||\t On shower: "<Self() <<"and slice id "<View(); - - particle_vec.clear(); match_vec.clear(); //only store per hit - - //for the hit, fill the backtracker info - mcparticles_per_hit.get(obj_hits_ptrs[i_h].key(), particle_vec, match_vec); - // std::cout<<"for hit "<< i_h <<" particle_vec.size() = "<< particle_vec.size()<< " and match_vec.size() = "<< match_vec.size()<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - - } // end loop over hits - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - if(m_is_verbose)std::cout << "SinglePhoton::recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; // a vector of mother MCP - std::map, std::vector> marks_mother_energy_fraction_map; // map of mother MCP and its energy on 3 planes - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; // number of associated MCP that has mothers - - //m_is_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(m_is_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(m_is_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - //Guanqun: this line here doesn't really cosider other break cases than finding primary particle - if(m_is_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(m_is_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - // best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - // best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - // best_mother_plane = 2; - } - - } - - - - // now have found the best mother of the shower - if(m_is_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - if(match->PdgCode()==22){ // if it's a gamma - std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; - this->spacecharge_correction(match, corrected_start, tmp ); - m_sim_shower_is_true_shower[i] = 1; - }else if(abs(match->PdgCode())==11){ // if it's e+/e- - this->spacecharge_correction(match, corrected_start); - m_sim_shower_is_true_shower[i] = 1; - }else{ - corrected_start = {-999,-999,-999}; - m_sim_shower_is_true_shower[i] = 0; - } - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - - if (match_mother.isNull()){ - m_sim_shower_parent_pdg[i] = -1; - m_sim_shower_parent_trackID[i] = -1; - - }else{ - m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); - m_sim_shower_parent_trackID[i] = match_mother->TrackId(); - } - - - - m_sim_shower_matched[i] = 1; - m_sim_shower_energy[i] = match->E(); - m_sim_shower_mass[i] = match->Mass(); - m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); - m_sim_shower_pdg[i] = match->PdgCode(); - m_sim_shower_trackID[i] = match->TrackId(); - m_sim_shower_process[i] = match->Process(); - m_sim_shower_end_process[i] = match->EndProcess(); - m_sim_shower_vertex_x[i] = corrected_vertex[0]; - m_sim_shower_vertex_y[i] = corrected_vertex[1]; - m_sim_shower_vertex_z[i] =corrected_vertex[2]; - - m_sim_shower_start_x[i] = corrected_start[0]; - m_sim_shower_start_y[i] = corrected_start[1]; - m_sim_shower_start_z[i] =corrected_start[2]; - - m_sim_shower_px[i] = match->Px(); - m_sim_shower_py[i] = match->Py(); - m_sim_shower_pz[i] = match->Pz(); - - // should've use 'best_mother_plane' here - m_sim_shower_best_matched_plane[i] = best_mother_index; - m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; - m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; - m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - - m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; - - mcParticleVector.push_back(match); - showerToMCParticleMap[shower] = mcParticleVector.back(); - - m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; - m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - - // if(marks_mother_vector.size()!=0){ - // //if(m_is_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); - // std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), - std::to_string(best_mother_index), - std::to_string(marks_mother_vector[best_mother_index]->PdgCode()), - std::to_string(total_energy_on_plane[0]), - std::to_string(total_energy_on_plane[1]), - std::to_string(total_energy_on_plane[2]), - std::to_string(ppfp->get_IsClearCosmic()) - },spacers); - - if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "< > & MCParticleToTrackIdMap); @@ -431,149 +45,16 @@ namespace single_photon * @return: a vector of fraction number, which is the fraction of unassociated hits in all reco hits of PFParticle */ //Typenamed for recob::Track and recob::Shower - template - std::vector recoMCmatching(std::vector& objectVector, - std::map>& objectToMCParticleMap, - std::map>& objectToPFParticleMap, + std::vector trackRecoMCmatching(std::vector>& objectVector, + std::map,art::Ptr>& objectToMCParticleMap, + std::map,art::Ptr>& objectToPFParticleMap, std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector){ - - std::vector trk_overlay_vec; - std::vector vec_fraction_matched; - bool reco_verbose = false; - //for each recob::track/shower in the event - for(size_t i=0; i pfp = objectToPFParticleMap[object]; - - // std::cout<<"SinglePhoton::recoMCmatching()\t||\t looking for a track match to pfp"<< pfp->Self()<>& mcParticleVector); - int pdg = pfp->PdgCode(); - //and get the hits associated to the reco PFP - std::vector< art::Ptr > obj_hits_ptrs = pfParticleToHitsMap[pfp]; - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - //simb::MCParticle const * best_matched_mcparticle = NULL; //pointer for the particle match we will calculate - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - - // std::vector particle_vec; - // std::vector match_vec; - - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - - bool found_a_match = false; - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - // std::cout<<"REC: This object with pfp "<< pfp->Self() <<" in slice "<0) n_associated_mcparticle_hits++; - - if(particle_vec.size()==0) n_not_associated_hits++; - - - //loop over MCparticles finding which is the MCparticle with most "energy" matched correctly - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - if( objide[ particle_vec[i_p]->TrackId() ] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; - found_a_match = true; - } - }//end loop over particles per hit - } - - - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - - trk_overlay_vec.push_back(fraction_num_hits_overlay); - if(n_associated_mcparticle_hits == 0){ - //This will only occur if the whole recob::PFParticle is associated with an overlay object - //std::cout<TrackId() << " with energy " << maxe << " over " << tote << " (" << maxe/tote << ")" - << " pdg=" << best_matched_mcparticle->PdgCode() - << " trkid=" << best_matched_mcparticle->TrackId() - << " ke=" << best_matched_mcparticle->E()-best_matched_mcparticle->Mass()<< "\n"; - } - - }//end vector loop. - //return vec_fraction_matched; - return trk_overlay_vec; - } - - - int SinglePhoton::photoNuclearTesting(std::vector>& mcParticleVector){ - - - for(auto &mcp: mcParticleVector){ - int pdg = mcp->PdgCode(); - std::string end_process = mcp->EndProcess(); - int status = mcp->StatusCode() ; - - - if(pdg==22){ - std::cout<<"PHOTO: "<>& mcParticleVector); }//namespace end + +#endif // SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx new file mode 100644 index 000000000..835878917 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx @@ -0,0 +1,1676 @@ +#include "sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h" + +#include "art/Framework/Principal/Event.h" + +#include "TPrincipal.h" +#include "TCanvas.h" +#include "TH1.h" +#include "TAxis.h" +#include "TLegend.h" +#include "TLine.h" +#include "TLatex.h" + +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/Processors.h" + +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h" + +namespace single_photon +{ + + TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; // wire of all hits + std::vectorall_tick; + std::vectorall_dist; // distance to vertex of all hits + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + sss_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + // this can be moved to inclass initializer + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + //requires that hit in hits has to be on the same plane as vertex_wire. + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + + double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + std::vectorSecondShowerMatching( + std::vector>& hitz, + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, +// std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr> & MCParticleToTrackIdMap + ){ + + + std::vector ans; //matched,pdg,parentpdg,trkid + + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + bool found_a_match = false; + + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < hitz.size(); ++i_h){ + int which_plane = (int)hitz[i_h]->View(); + particle_vec.clear(); match_vec.clear(); //only store per hit + //for the hit, fill the backtracker info + mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); + + //if there is an MCParticle associated to this hit + if(particle_vec.size()>0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; + } + //add the energy of the back tracked hit to the total energy for the PFP + tote += match_vec[i_p]->energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit + + } // end loop over hit + if(found_a_match){ + std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP + + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; + + int this_mcp_id = -1; //the track id for the current MCP in parent tree + int last_mcp_id = -1; //the track id for the previous MCP in parent tree + int i_mcp = 0; + + int num_bt_mothers =0; + + //reco_verbose = false; + //for each MCP that's associated to the reco shower + for(auto mcp:asso_mcparticles_vec){ + + if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one + + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ + + mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP + + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; + } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; + } + + + num_bt_mothers++; + } else{ + if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + + std::vector corrected_vertex(3), corrected_start(3); + spacecharge_correction(match, corrected_vertex); + + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + int par_pdg = -1; + if (match_mother.isNull()){ + par_pdg = -1; + + }else{ + par_pdg = match_mother->PdgCode(); + } + + ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; + + return ans; + }//end sss matching; + + + + + + + //************************************************ Shower Search Slice Second SSS3D ********** / + + + + + + + + void SecondShowerSearch3D( + std::vector> & showers, + std::map, art::Ptr> & NormalShowerToPFParticleMap, + std::vector> & tracks, + std::map, + art::Ptr> & NormalTrackToPFParticleMap, + art::Event const & evt ){ + + std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" WARNING, should check this! + + art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); + std::vector> allShowerVector; + art::fill_ptr_vector(allShowerVector,allShowerHandle); + std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, std::vector> > showerToHitsMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); + } + + art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, art::Ptr > showerToPFParticleMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); + } + + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); + std::vector> allPFParticleVector; + art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); + + //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); + //pfPartToMetadataAssoc.at(pfp.key()); + + size_t n_all_shr = allShowerVector.size(); + m_sss3d_num_showers = (int)n_all_shr-showers.size(); + + if(showers.size()==0) return; + + auto primary_shower = showers.front(); + + std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); + if(dist>m_max_conv_dist) continue; + + auto pfp = showerToPFParticleMap[shr]; + //for(auto &prr: allPFParticleVector){ + // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; + + /* + std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + + for (auto it:propertiesmap ){ + std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); + //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); + //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"<ShowerStart().X()); + m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); + m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); + m_sss3d_shower_dir_x.push_back(shr->Direction().X()); + m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); + m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); + m_sss3d_shower_length.push_back(shr->Length()); + m_sss3d_shower_conversion_dist.push_back(dist); + m_sss3d_shower_invariant_mass.push_back(invar); + m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); + double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); + m_sss3d_shower_impact_parameter.push_back(imp); + + if(dist!=0) { + m_sss3d_shower_ioc_ratio.push_back(imp/dist); + }else{ + m_sss3d_shower_ioc_ratio.push_back(0); + + } + m_sss3d_shower_energy_max.push_back(senergy);// + m_sss3d_shower_score.push_back(shr_score); + m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); + m_sss3d_slice_nu.push_back(is_nu_slice); + } + + return; + } + + + + void SimpleSecondShowerCluster(){ + + std::string base = "sss3d_"; + std::vector mod = {"ioc_ranked","invar_ranked"}; + + m_sss3d_ioc_ranked_en = -9; + m_sss3d_ioc_ranked_conv = -9; + m_sss3d_ioc_ranked_invar = -9; + m_sss3d_ioc_ranked_implied_invar = -9; + m_sss3d_ioc_ranked_ioc = -9; + m_sss3d_ioc_ranked_opang = -9; + m_sss3d_ioc_ranked_implied_opang = -9; + m_sss3d_ioc_ranked_id = -9; + + m_sss3d_invar_ranked_en = -9; + m_sss3d_invar_ranked_conv = -9; + m_sss3d_invar_ranked_invar = -9; + m_sss3d_invar_ranked_implied_invar = -9; + m_sss3d_invar_ranked_ioc = -9; + m_sss3d_invar_ranked_opang = -9; + m_sss3d_invar_ranked_implied_opang = -9; + m_sss3d_invar_ranked_id = -9; + + + std::string base2d = "sss_"; + std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; + + m_sss2d_ioc_ranked_en = -9; + m_sss2d_ioc_ranked_conv = -9; + m_sss2d_ioc_ranked_ioc = -9; + m_sss2d_ioc_ranked_pca = -9; + m_sss2d_ioc_ranked_invar = -9; + m_sss2d_ioc_ranked_angle_to_shower = -9; + m_sss2d_ioc_ranked_num_planes = -9; + + m_sss2d_conv_ranked_en = -9; + m_sss2d_conv_ranked_conv = -9; + m_sss2d_conv_ranked_ioc = -9; + m_sss2d_conv_ranked_pca = -9; + m_sss2d_conv_ranked_invar = -9; + m_sss2d_conv_ranked_angle_to_shower = -9; + m_sss2d_conv_ranked_num_planes = -9; + + m_sss2d_invar_ranked_en = -9; + m_sss2d_invar_ranked_conv = -9; + m_sss2d_invar_ranked_ioc = -9; + m_sss2d_invar_ranked_pca = -9; + m_sss2d_invar_ranked_invar = -9; + m_sss2d_invar_ranked_angle_to_shower = -9; + m_sss2d_invar_ranked_num_planes = -9; + + //--------------------------------------- + //First off, the 3D showers + //First some 3D shower information + if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ + //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; + for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); + + std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); + std::vector ranked_invar = sort_indexes_rev((inv)); + std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); + std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); + + int to_consider = m_sss3d_shower_conversion_dist.size(); + + if(false){ + std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ + //std::cout<<"2D clusters: "< nplans(3,0); + std::vector> indexmap(3); + + + for(int i=0; i< m_sss_num_candidates; i++){ + //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; + + for(int i=0; i< m_sss_num_candidates; i++){ + int ip = m_sss_candidate_plane.at(i); + //int nhits = sss_candidate_num_hits.at(i); + nplans[ip]++; + indexmap[ip].push_back(i); + + //Two passes to build up all "Candidates" for 2 and 3 plane matches + for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; + if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; + // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; + if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; + + //If this matches well with Either last candidate, include as a possibility + if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ + uniq_candidates[i].push_back(k); + } + + } + } + } + //Check which candidates have been used where + std::vector used_candidates(m_sss_num_candidates); + for(int i = 0; i< (int)uniq_candidates.size(); i++){ + for(auto &j: uniq_candidates[i]){ + used_candidates[j]++; + } + } + + //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own + for(int i = 0; i< (int)used_candidates.size(); i++){ + if(used_candidates[i]==0) uniq_candidates.push_back({i}); + } + + //Now lets delete any permutations + std::vector> uniq_candidates2; + uniq_candidates2.push_back(uniq_candidates.front()); + + for(int i = 1; i< (int)uniq_candidates.size(); i++){ + + bool perm = false; + for(int j = 0; j< (int)uniq_candidates2.size(); j++){ + perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); + if(perm) break; + } + if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); + } + + //Printing candidates (After perm check) + std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); + std::vector candidates_en(uniq_candidates2.size(),0); + std::vector candidates_ioc(uniq_candidates2.size(),0); + std::vector candidates_conv(uniq_candidates2.size(),0); + std::vector candidates_pca(uniq_candidates2.size(),0); + std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); + std::vector candidates_num_planes(uniq_candidates2.size(),0); + std::vector candidates_eff_invar(uniq_candidates2.size(),0); + std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); + + //rank by min_impat/max_min_dist and select + //rank by Energy energy + + for(int j=0; j<(int)uniq_candidates2.size();j++){ + int nt=uniq_candidates2[j].size(); + //std::cout<<"Candidate #: "< is_in_slice; + + for(int c=0; c< nt;++c){ + int ic = uniq_candidates2[j][c]; + + //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); + std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); + std::vector ranked_conv = sort_indexes_rev(candidates_conv); + + std::cout<<"========== Ranking ======== "<> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + + size_t size = candidate_indices.size(); + if(size == 0){ + throw std::runtime_error("clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); + } + + // at most 3 cluster indices (for 3 planes) + std::vector planes; + std::vector max_ticks; + std::vector min_ticks; + std::vector tick_length; + + for(auto i : candidate_indices){ + planes.push_back(cluster_planes[i]); + + max_ticks.push_back(cluster_max_ticks[i]); + min_ticks.push_back(cluster_min_ticks[i]); + tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); + } + + + //if candidates are not on different planes + if( size == 2 && planes[0] == planes[1]) + return {false, std::vector(2, -1.0)}; + if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) + return {false, std::vector(3, -1.0)}; + + //calculate the overlapping tick-span + double tick_overlap = DBL_MAX; + + //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction + for(auto max_e : max_ticks) + for(auto min_e : min_ticks) + if(max_e - min_e < tick_overlap) + tick_overlap = max_e - min_e; + + // if tick overlap is negative, meaning these clusters are not overlapping + if(tick_overlap < 0) + return {false, std::vector(size, -1.0)}; + else{ + std::vector overlap_fraction; + for(auto l: tick_length){ + overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); + } + return {true, overlap_fraction}; + } + } + + + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::cout << "group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; + + int num_cluster_groups=0; // number of matched cluster groups in total + std::vector> grouped_cluster_indices; + std::vector cluster_group_timeoverlap_fraction; + if(num_clusters <= 1) + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + + for(int i = 0; i != num_clusters -1; ++i){ + for(int j = i+1; j != num_clusters; ++j){ + + //first, look at candidate pairs + auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if( pair_result.first){ + + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j}); + double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + + // if the pair is succefully grouped, look at possible trios + for(int k = j+1; k!= num_clusters; ++k){ + auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); + if(tri_result.first){ + ++num_cluster_groups; + grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); + min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); + cluster_group_timeoverlap_fraction.push_back(min_frac); + std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; + } + } //k loop + } + }//j loop + }//i loop + + std::cout << "GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; + + return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; + } + + //isolation.h + /* Arguments to Function IsolationStudy (all are const): + * 1. vector named tracks of art ptr to recob track + * 2. map named trackToPFPParticleMap of .i. art ptr to recob track .ii. art ptr to recob pfparticle + * 3. vector named showers of art ptr to recob showers + * 4. map named showerToPFParticleMap of .i. art ptr to recob showe .ii. art ptr to recob pfparticle + * 5. map named pfParticleToHistMap of .i. art ptr to recob prparticle .ii. vector of art ptr to recob hit + * 6. map named pfParticleToSliceIDMap of .i. art ptr to recob pfparticle .ii. int + * 7. map named sliceIDToHitsMap of .i. int and .ii. art ptr to recob hit + */ + void IsolationStudy( + std::vector all_PPFPs, + const std::vector>& tracks, + const std::vector>& showers, + detinfo::DetectorPropertiesData const & theDetector) { + + int total_track_hits =0; + int total_shower_hits =0; + int nu_slice_id = -999; + + std::vector< art::Ptr > associated_hits; + std::vector< art::Ptr > unassociated_hits; + std::vector< art::Ptr > unassociated_hits_plane0; + std::vector< art::Ptr > unassociated_hits_plane1; + std::vector< art::Ptr > unassociated_hits_plane2; + + std::vector< std::map >> > v_newClusterToHitsMap(3); + + std::vector> slicehits; + + // BEGIN FOR LOOP TO COUNT TRACK HITS AND PUSH INTO ASSOCIATED HITS + for(size_t t =0; t< tracks.size(); t++){ + art::Ptr track = tracks[t]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromTrack(all_PPFPs, track); + // art::Ptr pfp = ppfp->pPFParticle;//trackToPFParticleMap[track]; + + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + //WARNING the temp. solution only work with best nuscore slice Keng + if(!ppfp->get_IsNuSlice()) continue; + + std::vector> tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); + std::vector> trackhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + if(ppfp->get_IsNeutrino()) slicehits.insert(slicehits.end(), tmp_slicehits.begin(), tmp_slicehits.end());//add up all nu slice hits + + std::cout << "*SSS: track "<< t <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This track has "<< trackhits.size() <<" of them. " << std::endl; + total_track_hits += trackhits.size(); + + //WARNING nu_slice_id is updated? Oh, tracks[0] and tracks[1] have different slide IDs (both nu slice but different nu score), need to fix this; + // temporary solution is to skip tracks[1]; + // if(nu_slice_id != sliceid && nu_slice_id != -999){ + // std::cout<<"*ERROR!! In Second Shower Search (Isolation Study), the neutrino slice ID changed? this: "< shower = showers[s]; + PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(all_PPFPs, shower); + // art::Ptr pfp = ppfp->pPFParticle;//showerToPFParticleMap.at(shower); + + int sliceid = ppfp->get_SliceID();//pfParticleToSliceIDMap.at(pfp); + + // if(sliceid != slice_w_bestnuID) continue;//WARNING only deal with nu slice with best nu score for now Keng + if(!ppfp->get_IsNuSlice()) continue; + if(sliceid<0) continue; //negative sliceid is bad + + auto tmp_slicehits = ppfp->pSliceHits;//sliceIDToHitsMap.at(sliceid); + auto showerhits = ppfp->pPFPHits;//pfParticleToHitsMap.at(pfp); + + std::cout<<"*SSS: shower "<< s <<" is in slice "<< sliceid <<" which has "<< tmp_slicehits.size() <<" hits. This shower has "<< showerhits.size() <<" of them. "<< std::endl; + total_shower_hits+=showerhits.size(); + + for(auto &h: showerhits){ + associated_hits.push_back(h); + } + } + // END FOR LOOP COUNTING SHOWER HITS + + m_sss_num_associated_hits = total_shower_hits + total_track_hits; + + // PRINT SUMMARY OF HIT TYPES + std::cout<<"*SSS: So in total we have "<= 0){ + m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; + + std::cout<<"*SSS: So that leaves "<View(); + switch((int)plane_view){ + case (0) : + unassociated_hits_plane0.push_back(h); + break; + case (1) : + unassociated_hits_plane1.push_back(h); + break; + case (2) : + unassociated_hits_plane2.push_back(h); + break; + } + + } + + } + + std::vector>> unassociated_hits_all = {unassociated_hits_plane0,unassociated_hits_plane1,unassociated_hits_plane2}; + + std::cout<<" *associated_hits.size() "<Divide(4, 1, 0.0, 0.1); + + double tick_max = 0; + double tick_min = 1e10; + std::vector chan_max(3,0); + std::vector chan_min(3,1e10); + + // Creation of canvas and histograms to hold hit distance data + TCanvas *histcan = new TCanvas(("hists_"+print_name).c_str(), "Distances from the track", 600, 400); + histcan->Divide(3, 2, 0.005, 0.1); + + TH1D *s_hist0 = new TH1D("shower hits hist plane0", "Showers Plane 0", 30, 0.0, 30.0); + TH1D *s_hist1 = new TH1D("shower hist plane1", "Showers Plane 1", 30, 0.0, 30.0); + TH1D *s_hist2 = new TH1D("shower hist plane2", "Showers Plane 2", 30, 0.0, 30.0); + std::vector s_hists = {s_hist0, s_hist1, s_hist2}; + + TH1D *u_hist0 = new TH1D("unassociated hits hist plane0", "Unassoc Plane 0", 30, 0.0, 30.0); + TH1D *u_hist1 = new TH1D("unassociated hits hist plane1", "Unassoc Plane 1", 30, 0.0, 30.0); + TH1D *u_hist2 = new TH1D("unassociated hits hist plane2", "Unassoc Plane 2", 30, 0.0, 30.0); + std::vector u_hists = {u_hist0, u_hist1, u_hist2}; + + + std::cout << "Isolation: Acquiring track hit coordinates" << std::endl; + // saving wire and time coordinates + std::vector> pts_trk( tracks.size(), std::vector(3) ); + + PandoraPFParticle* ppfpt = PPFP_GetPPFPFromTrack(all_PPFPs, tracks[0]); + // art::Ptr pfpt = trackToPFParticleMap.at(tracks[0]); + auto trackhits = ppfpt->pPFPHits;//pfParticleToHitsMap.at(pfpt); + + std::vector t_pts(3); + std::vector> t_vec_t(3); // peak time of track hits on 3 planes. + std::vector> t_vec_c(3); // wire number of track hits on 3 planes. + + for(auto &th: trackhits){ + double wire = (double)th->WireID().Wire; + t_vec_c[(int)th->View()].push_back(wire); + + double time = (double)th->PeakTime(); + t_vec_t[(int)th->View()].push_back(time); + + tick_max = std::max(tick_max, time); + tick_min = std::min(tick_min, time); + chan_max[(int)th->View()] = std::max( chan_max[(int)th->View()], wire); + chan_min[(int)th->View()] = std::min( chan_min[(int)th->View()], wire); + + } + + t_pts[0] = new TGraph(t_vec_c[0].size(), &(t_vec_c[0])[0], &(t_vec_t[0])[0]); + t_pts[1] = new TGraph(t_vec_c[1].size(), &(t_vec_c[1])[0], &(t_vec_t[1])[0]); + t_pts[2] = new TGraph(t_vec_c[2].size(), &(t_vec_c[2])[0], &(t_vec_t[2])[0]); + pts_trk[0] = t_pts; + + std::cout << "Isolation: plane0 track hits = " << t_vec_t[0].size() << std::endl; + std::cout << "Isolation: plane1 track hits = " << t_vec_t[1].size() << std::endl; + std::cout << "Isolation: plane2 track hits = " << t_vec_t[2].size() << std::endl; + + + std::cout << "Isolation: Acquiring shower hit coordinates and comparing with track hits " << std::endl; + + //First grab all shower clusters + std::vector> pts_shr( showers.size(), std::vector(3) ); + + // map shower hits to distance to the closest track hit (hold up to 10 hits with minimum distance) + std::vector, double >> sh_dist(3); + // vector to save hit with largest minimum distance (in sh_dist) on each plane + std::vector< std::pair, double > > max_min_hit(3); + + PandoraPFParticle* ppfps = PPFP_GetPPFPFromShower(all_PPFPs, showers[0]); + auto showerhits = ppfps->pPFPHits;//pfParticleToHitsMap.at(pfp_s); + // art::Ptr pfp_s = showerToPFParticleMap.at(showers[0]); + + std::vector t_pts_s(3); + std::vector> vec_t(3); + std::vector> vec_c(3); + std::vector num_shr_hits(3); + + for(auto &sh: showerhits){ + int plane = (int)sh->View(); + num_shr_hits[plane] += 1; + + double minDist = 999.9; //minimum distance between this shower hit and all track hits + double dist; + // only do if there are track hits on this plane with which to compare + if (t_vec_c[(int)sh->View()].size() != 0){ + double wire = (double)sh->WireID().Wire; + vec_c[(int)sh->View()].push_back(wire); + double time = (double)sh->PeakTime(); + vec_t[(int)sh->View()].push_back(time); + + for (unsigned int th = 0; th < t_vec_c[(int)sh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)sh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)sh->View()])[th]*0.3, 2) ); + if (dist < minDist) { + minDist = dist; + } + + } // end of track hits for + s_hists[(int)sh->View()]->Fill(minDist); + + // keep track of 10 smallest distances and their corresponding hits + if (sh_dist[plane].size() < 10){ + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } + else{ if (minDist < max_min_hit[plane].second){ + sh_dist[plane].erase(max_min_hit[plane].first); // erase old max of min distances from map + (sh_dist[plane])[sh] = minDist; // insert shower hit with accompanying minimum distance + max_min_hit[plane] = (*std::max_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_max_fn)); // find new min dist hit + } } + + // finds the necessary plot boundaries to fit the shower + tick_max = std::max(tick_max, (double)sh->PeakTime()); + tick_min = std::min(tick_min, (double)sh->PeakTime()); + chan_max[(int)sh->View()] = std::max( chan_max[(int)sh->View()], wire); + chan_min[(int)sh->View()] = std::min( chan_min[(int)sh->View()], wire); + } // end if stmnt t_vec_c + } // end looping shower hits + + // create graphs from newly compiled shower coordinates + t_pts_s[0] = new TGraph(vec_c[0].size(), &(vec_c[0])[0], &(vec_t[0])[0]); + t_pts_s[1] = new TGraph(vec_c[1].size(), &(vec_c[1])[0], &(vec_t[1])[0]); + t_pts_s[2] = new TGraph(vec_c[2].size(), &(vec_c[2])[0], &(vec_t[2])[0]); + // save new graphs for this shower into vector containing all showers + pts_shr[0] = t_pts_s; + + // place data into approriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated + m_isolation_min_dist_trk_shr.push_back(999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + } + else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance + auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); + m_isolation_min_dist_trk_shr.push_back(abs_min.second); + m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + } + else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails + m_isolation_min_dist_trk_shr.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + } + m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + } + + /* DRAW SHOWER HISTOGRAM */ + histcan->cd(1); + s_hists[0]->Draw(); + s_hists[0]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(2); + s_hists[1]->Draw(); + s_hists[1]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + histcan->cd(3); + s_hists[2]->Draw(); + s_hists[2]->GetXaxis()->SetTitle("distance from shower hit to closest track hit [cm]"); + + + + //NOW THE UNASSOCIATED HITS - that is ones not part of an identified track or shower + std::cout << "Isolation: Acquiring unassociated hits coordinates and comparing with track hits" << std::endl; + + // create vector of three layers for unassoc hits + std::vector g_unass(3); + + std::vector>> pts_to_recluster(3); //plane, point, {wire,tic} + //make a map tp actual hits here I guess. + std::vector>> mapPointIndexToHit(3); + + std::vector minDist_tot(3); + std::vector minWire(3); + std::vector minTime(3); + + for(int plane = 0; plane < 3; plane++){ + minDist_tot[plane] = 999; + std::vector vec_t; + std::vector vec_c; + + for(auto &uh: unassociated_hits_all[plane]){ + + if (t_vec_c[plane].size() == 0) break; // if track doesn't have hits on that plane + + double wire = (double)uh->WireID().Wire; + vec_c.push_back(wire); + double time = (double)uh->PeakTime(); + vec_t.push_back(time); + + double minDist = 999.9; + double dist; + for (unsigned int th = 0; th < t_vec_c[(int)uh->View()].size(); th++){ + dist = sqrt( pow (time/25 - (t_vec_t[(int)uh->View()])[th]/25, 2) + pow( wire*0.3 - (t_vec_c[(int)uh->View()])[th]*0.3, 2) ); + if (dist < minDist) { minDist = dist; } + } + u_hists[(int)uh->View()]->Fill(minDist); + + if (minDist < minDist_tot[plane]) { // of all unassociated hits, the one that has min distance to closest track hits + minDist_tot[plane] = minDist; + minWire[plane] = wire; + minTime[plane] = time; + } + + // for reclustering + std::vector pt = {wire, vec_t.back()}; + pts_to_recluster[(int)uh->View()].push_back(pt); + mapPointIndexToHit[(int)uh->View()][pts_to_recluster[(int)uh->View()].size()-1] = uh; + + } // end looping unassociated_hits_all + + g_unass[plane] = new TGraph(vec_c.size(), &vec_c[0], &vec_t[0]); + } // end looping planes + + // place data into appropriate vertex_tree variables + for(int plane = 0; plane < 3; plane++){ + if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ + m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + } + else { + m_isolation_min_dist_trk_unassoc.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + } + m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + } + + /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ + histcan->cd(4); + u_hists[0]->Draw(); + u_hists[0]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(5); + u_hists[1]->Draw(); + u_hists[1]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + histcan->cd(6); + u_hists[2]->Draw(); + u_hists[2]->GetXaxis()->SetTitle("distance from unassoc hit to closest track hit [cm]"); + + + /* SAVE THE CANVAS -which holds all 6 distance histograms for shower and unassociated hits*/ + /* histcan->Update(); + histcan->SaveAs((print_name + "_hist.pdf").c_str(), "pdf"); + */ + + delete histcan; + + + //PLOTTING NOW + //SET-UP + double plot_point_size = 0.6; + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + if(showers.size()+tracks.size() > tcols.size()){ + for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ + tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + } + } + + std::cout<<"*Tick Min: "<GetYaxis()->SetTitle("Peak Hit Time Tick"); + g_vertex[i]->GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + g_vertex[i]->Draw("ap"); + + if(i>0){ + g_vertex[i]->GetYaxis()->SetLabelOffset(999); + g_vertex[i]->GetYaxis()->SetLabelSize(0); + } + + + } + + // ******************************** DeadWireRegions ******************************************** + //plot dead wire +// for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ +// int badchan = bad_channel_list_fixed_mcc9[i].first; +// int ok = bad_channel_list_fixed_mcc9[i].second; +// +// if(ok>1)continue; +// auto hs = geom->ChannelToWire(badchan); +// +// int thisp = (int)hs[0].Plane; +// double bc = hs[0].Wire; +// // std::cout<<"WIRE "<cd(thisp+1); +// TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); +// l->SetLineColor(kGray+1); +// l->Draw("same"); +// } +// } + + // plot track + for(size_t t=0; t< pts_trk.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_trk[t][i]->GetN()>0){//need a check in case this track has no hits on this plane. + pts_trk[t][i]->Draw("p same"); + pts_trk[t][i]->SetMarkerColor(tcol); + pts_trk[t][i]->SetFillColor(tcol); + pts_trk[t][i]->SetMarkerStyle(20); + pts_trk[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + // plot shower hits + for(size_t t=0; t< pts_shr.size(); t++){ + int tcol = tcols[used_col]; + used_col++; + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(pts_shr[t][i]->GetN()>0){ + pts_shr[t][i]->Draw("p same"); //used in the vertex + pts_shr[t][i]->SetMarkerColor(tcol); + pts_shr[t][i]->SetFillColor(tcol); + pts_shr[t][i]->SetMarkerStyle(20); + pts_shr[t][i]->SetMarkerSize(plot_point_size); + } + } + } + + + // plot unassociated hits + for(int i=0; i<3; i++){ + can->cd(i+1); + if (g_unass[i]->GetN() > 0){ + g_unass[i]->SetMarkerColor(kBlack); + g_unass[i]->SetMarkerStyle(20); + g_unass[i]->SetMarkerSize(plot_point_size); + } + g_vertex[i]->Draw("p same"); + } + + + + + //******************* INFO Plotting ******************************* + + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + + TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); + + // PLOTTING SHOWER? + for(size_t t=0; t< pts_shr.size(); t++){ + std::string sname = "Shower "+std::to_string(t); + if(pts_shr[t][0]->GetN()>0){ + l_top->AddEntry(pts_shr[t][0],sname.c_str(),"f"); + }else if(pts_shr[t][1]->GetN()>0){ + l_top->AddEntry(pts_shr[t][1],sname.c_str(),"f"); + }else if(pts_shr[t][2]->GetN()>0){ + l_top->AddEntry(pts_shr[t][2],sname.c_str(),"f"); + } + } + + // PLOTTING + for(size_t t=0; t< pts_trk.size(); t++){ + std::string sname = "Track "+std::to_string(t); + if(pts_trk[t][0]->GetN()>0){ + l_top->AddEntry(pts_trk[t][0],sname.c_str(),"f"); + }else if(pts_trk[t][1]->GetN()>0){ + l_top->AddEntry(pts_trk[t][1],sname.c_str(),"f"); + }else if(pts_trk[t][2]->GetN()>0){ + l_top->AddEntry(pts_trk[t][2],sname.c_str(),"f"); + } + } + l_top->SetLineWidth(0); + l_top->SetLineColor(kWhite); + l_top->Draw("same"); + + can->Update(); + // can->SaveAs((print_name+".pdf").c_str(),"pdf"); + std::cout<<"*PRINTING"<> &hitz, double vertex_wire, double vertex_tick, int Npts){ - - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; - - std::vectorall_wire; // wire of all hits - std::vectorall_tick; - std::vectorall_dist; // distance to vertex of all hits - - - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order - size_t max_e = std::min((size_t)Npts,hitz.size()); - - for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - sss_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; - - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; - - score.pass = true; - - // ************* Some simple metrics relative to study point (usually vertex) *************** - // this can be moved to inclass initializer - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; - - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; - - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; - - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; - - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; - - score.n_wires = 0; - score.n_ticks = 0; - - score.impact_parameter = -99; - - score.close_tick = -99; - score.close_wire = -99; - - std::map wire_count; - std::map tick_count; - - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - score.mean_wire += h_wire; - score.mean_tick += h_tick; - - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); - - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); - - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "TGraph.h" - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); - - //wierd dits - //requires that hit in hits has to be on the same plane as vertex_wire. - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } - - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); - - - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); - - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - - } - - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; - - score.mean_dist = score.mean_dist/(double)score.n_hits; - - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA - - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; - - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); - - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); - - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } - - - - - delete principal; - - return score; - } - - int SinglePhoton::CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" +namespace single_photon +{ - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - std::vector> showerhits = pfParticleToHitsMap.at(pfp); + struct sss_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; + double close_tick; + double close_wire; /* wire of hit that's closest to vertex */ + double angle;//w.r.t shower primary - for(auto &sh: showerhits){ + double impact_parameter; - if(sh->View() != hit->View()) continue; + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); + double mean_dist; + double max_dist; + double min_dist; + double pca_0; + double pca_1; + double pca_theta; - double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + int n_wires; /* number of wires hits correspond to */ + int n_ticks; - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } + bool pass; - } + sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of class sss_score - } - if(in_primary_shower){ - return (int)s; - } - } + TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + sss_score ScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); - return -1; - } + int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); - std::vectorSinglePhoton::SecondShowerMatching( + std::vectorSecondShowerMatching( std::vector>& hitz, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, -// std::map< size_t, art::Ptr> & pfParticleIdMap, std::map< int ,art::Ptr> & MCParticleToTrackIdMap - ){ - - - std::vector ans; //matched,pdg,parentpdg,trkid - - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - bool found_a_match = false; - - //loop only over hits associated to this reco PFP - for(size_t i_h=0; i_h < hitz.size(); ++i_h){ - int which_plane = (int)hitz[i_h]->View(); - particle_vec.clear(); match_vec.clear(); //only store per hit - //for the hit, fill the backtracker info - mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); - - //if there is an MCParticle associated to this hit - if(particle_vec.size()>0) n_associated_mcparticle_hits++; - if(particle_vec.size()==0) n_not_associated_hits++; - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - } // end loop over hit - if(found_a_match){ - std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; - std::map, std::vector> marks_mother_energy_fraction_map; - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<= 0){ - - mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP - - bool is_old = false; - - for(size_t k=0; k< marks_mother_vector.size(); k++){ - //if its in it before, just run with it - if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ - marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; - is_old = true; - break; - } - } - if(is_old==false){ - marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); - marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; - marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; - marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; - } - - - num_bt_mothers++; - } else{ - if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } - - if( mother_energy_recod[1] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } - - if( mother_energy_recod[2] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } - - } - - if(marks_mother_vector.size()!=0){ - //if(reco_verbose) std::cout<<"SinglePhoton::recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; - - std::vector corrected_vertex(3), corrected_start(3); - this->spacecharge_correction(match, corrected_vertex); - - - art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; - int par_pdg = -1; - if (match_mother.isNull()){ - par_pdg = -1; - - }else{ - par_pdg = match_mother->PdgCode(); - } - - ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; - - return ans; - }//end sss matching; - - - - + ); //************************************************ Shower Search Slice Second SSS3D ********** / - - - - - - - void SinglePhoton::SecondShowerSearch3D( + void SecondShowerSearch3D( std::vector> & showers, std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & NormalTrackToPFParticleMap, - art::Event const & evt ){ - - std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" WARNING, should check this! - - art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); - std::vector> allShowerVector; - art::fill_ptr_vector(allShowerVector,allShowerHandle); - std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, std::vector> > showerToHitsMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); - } - - art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, art::Ptr > showerToPFParticleMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); - } - - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); - std::vector> allPFParticleVector; - art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); - - //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); - //pfPartToMetadataAssoc.at(pfp.key()); - - size_t n_all_shr = allShowerVector.size(); - m_sss3d_num_showers = (int)n_all_shr-showers.size(); - - if(showers.size()==0) return; - - auto primary_shower = showers.front(); - - std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); - if(dist>m_max_conv_dist) continue; - - auto pfp = showerToPFParticleMap[shr]; - //for(auto &prr: allPFParticleVector){ - // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; - - /* - std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - - for (auto it:propertiesmap ){ - std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); - //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); - //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"<CalcEShower(showerToHitsMap[shr]); - double invar = implied_invar_mass(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, primary_shower, m_reco_shower_energy_max[0], shr, senergy); - double implied_invar = invar_mass(primary_shower, m_reco_shower_energy_max[0], shr, senergy) ; - double shr_score = 0.0; //need pfp and metadata to get score, and might give slice! (This will be harder..) but on reflection, kinda important. PCA spread might be a good rplacement. - int is_clear_cosmic_slice = 0 ; - int is_nu_slice = 0; - - - m_sss3d_shower_start_x.push_back(shr->ShowerStart().X()); - m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); - m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); - m_sss3d_shower_dir_x.push_back(shr->Direction().X()); - m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); - m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); - m_sss3d_shower_length.push_back(shr->Length()); - m_sss3d_shower_conversion_dist.push_back(dist); - m_sss3d_shower_invariant_mass.push_back(invar); - m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); - double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); - m_sss3d_shower_impact_parameter.push_back(imp); - - if(dist!=0) { - m_sss3d_shower_ioc_ratio.push_back(imp/dist); - }else{ - m_sss3d_shower_ioc_ratio.push_back(0); - - } - m_sss3d_shower_energy_max.push_back(senergy);// - m_sss3d_shower_score.push_back(shr_score); - m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); - m_sss3d_slice_nu.push_back(is_nu_slice); - } - - return; - } - - - - void SinglePhoton::SimpleSecondShowerCluster(){ - - std::string base = "sss3d_"; - std::vector mod = {"ioc_ranked","invar_ranked"}; - - m_sss3d_ioc_ranked_en = -9; - m_sss3d_ioc_ranked_conv = -9; - m_sss3d_ioc_ranked_invar = -9; - m_sss3d_ioc_ranked_implied_invar = -9; - m_sss3d_ioc_ranked_ioc = -9; - m_sss3d_ioc_ranked_opang = -9; - m_sss3d_ioc_ranked_implied_opang = -9; - m_sss3d_ioc_ranked_id = -9; - - m_sss3d_invar_ranked_en = -9; - m_sss3d_invar_ranked_conv = -9; - m_sss3d_invar_ranked_invar = -9; - m_sss3d_invar_ranked_implied_invar = -9; - m_sss3d_invar_ranked_ioc = -9; - m_sss3d_invar_ranked_opang = -9; - m_sss3d_invar_ranked_implied_opang = -9; - m_sss3d_invar_ranked_id = -9; - - - std::string base2d = "sss_"; - std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; - - m_sss2d_ioc_ranked_en = -9; - m_sss2d_ioc_ranked_conv = -9; - m_sss2d_ioc_ranked_ioc = -9; - m_sss2d_ioc_ranked_pca = -9; - m_sss2d_ioc_ranked_invar = -9; - m_sss2d_ioc_ranked_angle_to_shower = -9; - m_sss2d_ioc_ranked_num_planes = -9; - - m_sss2d_conv_ranked_en = -9; - m_sss2d_conv_ranked_conv = -9; - m_sss2d_conv_ranked_ioc = -9; - m_sss2d_conv_ranked_pca = -9; - m_sss2d_conv_ranked_invar = -9; - m_sss2d_conv_ranked_angle_to_shower = -9; - m_sss2d_conv_ranked_num_planes = -9; - - m_sss2d_invar_ranked_en = -9; - m_sss2d_invar_ranked_conv = -9; - m_sss2d_invar_ranked_ioc = -9; - m_sss2d_invar_ranked_pca = -9; - m_sss2d_invar_ranked_invar = -9; - m_sss2d_invar_ranked_angle_to_shower = -9; - m_sss2d_invar_ranked_num_planes = -9; - - //--------------------------------------- - //First off, the 3D showers - //First some 3D shower information - if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ - //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; - for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); - - std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); - std::vector ranked_invar = sort_indexes_rev((inv)); - std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); - std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); - - int to_consider = m_sss3d_shower_conversion_dist.size(); - - if(false){ - std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ - //std::cout<<"2D clusters: "< nplans(3,0); - std::vector> indexmap(3); - - - for(int i=0; i< m_sss_num_candidates; i++){ - //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; - - for(int i=0; i< m_sss_num_candidates; i++){ - int ip = m_sss_candidate_plane.at(i); - //int nhits = sss_candidate_num_hits.at(i); - nplans[ip]++; - indexmap[ip].push_back(i); - - //Two passes to build up all "Candidates" for 2 and 3 plane matches - for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; - if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; - // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - - //If this matches well with Either last candidate, include as a possibility - if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ - uniq_candidates[i].push_back(k); - } - - } - } - } - //Check which candidates have been used where - std::vector used_candidates(m_sss_num_candidates); - for(int i = 0; i< (int)uniq_candidates.size(); i++){ - for(auto &j: uniq_candidates[i]){ - used_candidates[j]++; - } - } - - //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own - for(int i = 0; i< (int)used_candidates.size(); i++){ - if(used_candidates[i]==0) uniq_candidates.push_back({i}); - } - - //Now lets delete any permutations - std::vector> uniq_candidates2; - uniq_candidates2.push_back(uniq_candidates.front()); - - for(int i = 1; i< (int)uniq_candidates.size(); i++){ - - bool perm = false; - for(int j = 0; j< (int)uniq_candidates2.size(); j++){ - perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); - if(perm) break; - } - if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); - } - - //Printing candidates (After perm check) - std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); - std::vector candidates_en(uniq_candidates2.size(),0); - std::vector candidates_ioc(uniq_candidates2.size(),0); - std::vector candidates_conv(uniq_candidates2.size(),0); - std::vector candidates_pca(uniq_candidates2.size(),0); - std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); - std::vector candidates_num_planes(uniq_candidates2.size(),0); - std::vector candidates_eff_invar(uniq_candidates2.size(),0); - std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); - - //rank by min_impat/max_min_dist and select - //rank by Energy energy - - for(int j=0; j<(int)uniq_candidates2.size();j++){ - int nt=uniq_candidates2[j].size(); - //std::cout<<"Candidate #: "< is_in_slice; - - for(int c=0; c< nt;++c){ - int ic = uniq_candidates2[j][c]; - - //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); - std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); - std::vector ranked_conv = sort_indexes_rev(candidates_conv); - - std::cout<<"========== Ranking ======== "<> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - std::pair> SinglePhoton::clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - size_t size = candidate_indices.size(); - if(size == 0){ - throw std::runtime_error("SinglePhoton::clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); - } - - // at most 3 cluster indices (for 3 planes) - std::vector planes; - std::vector max_ticks; - std::vector min_ticks; - std::vector tick_length; - - for(auto i : candidate_indices){ - planes.push_back(cluster_planes[i]); - - max_ticks.push_back(cluster_max_ticks[i]); - min_ticks.push_back(cluster_min_ticks[i]); - tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); - } - - - //if candidates are not on different planes - if( size == 2 && planes[0] == planes[1]) - return {false, std::vector(2, -1.0)}; - if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) - return {false, std::vector(3, -1.0)}; - - //calculate the overlapping tick-span - double tick_overlap = DBL_MAX; - - //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction - for(auto max_e : max_ticks) - for(auto min_e : min_ticks) - if(max_e - min_e < tick_overlap) - tick_overlap = max_e - min_e; - - // if tick overlap is negative, meaning these clusters are not overlapping - if(tick_overlap < 0) - return {false, std::vector(size, -1.0)}; - else{ - std::vector overlap_fraction; - for(auto l: tick_length){ - overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); - } - return {true, overlap_fraction}; - } - } - - - std::pair>, std::vector>> SinglePhoton::GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ - std::cout << "SinglePhoton::group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; - - int num_cluster_groups=0; // number of matched cluster groups in total - std::vector> grouped_cluster_indices; - std::vector cluster_group_timeoverlap_fraction; - if(num_clusters <= 1) - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - - for(int i = 0; i != num_clusters -1; ++i){ - for(int j = i+1; j != num_clusters; ++j){ - - //first, look at candidate pairs - auto pair_result = clusterCandidateOverlap({i,j}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if( pair_result.first){ - - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j}); - double min_frac = *std::min_element(pair_result.second.cbegin(), pair_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; +//isolation.h +bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second < p2.second); +} - // if the pair is succefully grouped, look at possible trios - for(int k = j+1; k!= num_clusters; ++k){ - auto tri_result = clusterCandidateOverlap({i,j,k}, cluster_planes, cluster_max_ticks, cluster_min_ticks); - if(tri_result.first){ - ++num_cluster_groups; - grouped_cluster_indices.push_back({(double)i,(double)j,(double)k}); - min_frac = *std::min_element(tri_result.second.cbegin(), tri_result.second.cend()); - cluster_group_timeoverlap_fraction.push_back(min_frac); - std::cout << "Grouped cluster candidate: (" << i << ", " << j << ", " << k << ") | Minimum time tick overlap fraction: " << min_frac << std::endl; - } - } //k loop - } - }//j loop - }//i loop +// override function of sorts for min_element function comparison +bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second > p2.second); +} - std::cout << "SinglePhoton::GroupClusterCandidate\t|| Formed " << num_cluster_groups << " cluster groups" << std::endl; + void IsolationStudy( + std::vector all_PPFPs, + const std::vector>& tracks, + const std::vector>& showers, + detinfo::DetectorPropertiesData const & theDetector); - return {num_cluster_groups, {grouped_cluster_indices, cluster_group_timeoverlap_fraction}}; - } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/variables.h b/sbncode/SinglePhotonAnalysis/Libraries/variables.h new file mode 100644 index 000000000..1e1661475 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/variables.h @@ -0,0 +1,1134 @@ +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_VARIABLES_H +#define SBNCODE_SINGLEPHOTONANALYSIS_VARIABLES_H + +#include "art/Framework/Principal/Handle.h" + +#include "larcore/Geometry/Geometry.h" +#include "larcorealg/Geometry/BoxBoundedGeo.h" + +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" + +#include "TTree.h" +#include "TRandom3.h" + +#include +#include +#include +#include + + +//DEFINE GLOBAL VARIABLES, do it only once +namespace single_photon +{ + // name alias from pandora + typedef art::ValidHandle< std::vector > PFParticleHandle; + typedef std::vector< art::Ptr > PFParticleVector; + typedef std::vector< art::Ptr > TrackVector; + typedef std::vector< art::Ptr > ShowerVector; + typedef std::map< size_t, art::Ptr> PFParticleIdMap; + + extern std::map is_delta_map; + +//DECLARATION HERE + //Geometry dimensions; Fiducial volume and SCB (no SCB yet?) + extern std::vector> fTPCVolumes; + extern std::vector fActiveVolumes; + extern double m_tpc_active_XMin; + extern double m_tpc_active_YMin; + extern double m_tpc_active_ZMin; + extern double m_tpc_active_XMax; + extern double m_tpc_active_YMax; + extern double m_tpc_active_ZMax; + + extern TRandom3 *rangen; + extern std::string m_shower3dLabel; + extern std::string m_showerKalmanLabel; + extern std::string m_showerKalmanCaloLabel; + extern std::string m_pandoraLabel; ///< The label for the pandora producer + extern std::string m_trackLabel; ///< The label for the track producer from PFParticles + + extern std::string m_showerLabel; ///< The label for the shower producer from PFParticles + extern std::string m_caloLabel; ///< The label for calorimetry associations producer + extern std::string m_flashLabel; + extern std::string m_geantModuleLabel; + extern std::string m_hitfinderLabel; + extern std::string m_hitMCParticleAssnsLabel; + extern std::string m_potLabel; + extern std::string m_generatorLabel; + + + extern std::string m_pidLabel; ///< For PID stuff + extern std::string m_CRTVetoLabel; + extern std::string m_CRTTzeroLabel; + extern std::string m_CRTHitProducer; + extern std::string m_true_eventweight_label; + + extern bool m_use_PID_algorithms; + extern bool m_use_delaunay; + extern int m_delaunay_max_hits; + extern bool m_is_verbose; + extern bool m_print_out_event; + extern bool m_is_data; // value provided by pset + extern bool m_is_overlayed; + extern bool m_is_textgen; + extern bool m_run_all_pfps; + extern bool m_has_CRT; + extern bool m_fill_trees; + extern bool m_run_pi0_filter; //value provided by pset + extern bool m_run_pi0_filter_2g1p; + extern bool m_run_pi0_filter_2g0p; + + extern bool m_runPhotoNuTruth; + extern bool m_runTrueEventweight; + + extern bool m_runSelectedEvent; //if it should run only selected events + extern std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + extern std::set> m_selected_set; //set of selected events + + //SEAviwer bits + extern bool m_runSEAview; + extern double m_SEAviewPlotDistance; //parameters related to shower-like object finding + extern double m_SEAviewHitThreshold; + extern double m_SEAviewDbscanMinPts; + extern double m_SEAviewDbscanEps; + extern double m_SEAviewMaxPtsLinFit; + extern bool m_SEAviewMakePDF; + extern int m_SEAviewNumRecoShower; + extern int m_SEAviewNumRecoTrack; + + extern bool m_runSEAviewStub; + extern double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + extern double m_SEAviewStubPlotDistance; + extern double m_SEAviewStubDbscanMinPts; + extern double m_SEAviewStubDbscanEps; + extern bool m_SEAviewStubMakePDF; + extern int m_SEAviewStubNumRecoShower; + extern int m_SEAviewStubNumRecoTrack; + + extern std::string m_Spline_CV_label; //"eventweight4to4aFix" + + extern bool m_runCRT; + extern double m_DTOffset; + extern double m_Resolution; + extern std::string m_DAQHeaderProducer;//"daq" + + //SSS parameters + extern double m_max_conv_dist; + extern double m_mass_pi0_mev; + + extern double m_exiting_photon_energy_threshold ; + extern double m_exiting_proton_energy_threshold ; + + extern geo::GeometryCore const * geom; + extern double m_work_function; //value provided by pset + extern double m_recombination_factor; // value provided by pset + + extern std::vector m_gain_mc; // value provided by pset + extern std::vector m_gain_data; + extern double m_wire_spacing; + + extern double m_width_dqdx_box; // value provided by pset + extern double m_length_dqdx_box; + + + //------- TTree stuff + extern TTree* run_subrun_tree; + extern TTree* pot_tree; + extern TTree* vertex_tree; + extern TTree* eventweight_tree; + extern TTree* ncdelta_slice_tree; + + extern TTree* geant4_tree; + + extern TTree* true_eventweight_tree; + extern std::map> fmcweight; + + //------------ POT related variables -------------- + extern int m_number_of_events; + extern int m_number_of_events_in_subrun; + extern double m_pot_count; + extern int m_number_of_vertices; + + extern int m_run; + extern int m_subrun; + extern double m_subrun_pot; + extern int m_subrun_counts; + + //------------ Event Related Variables ------------- + extern int m_run_number; + extern int m_subrun_number; + extern int m_event_number; + extern double m_pot_per_event; + extern double m_pot_per_subrun; + + extern int m_test_matched_hits; + extern int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + extern int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + extern int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + extern int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + extern int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + extern std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + extern std::vector m_trackstub_candidate_num_hits; + extern std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + extern std::vector m_trackstub_candidate_num_ticks; + extern std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + extern std::vector m_trackstub_candidate_PCA; + extern std::vector m_trackstub_candidate_mean_ADC; + extern std::vector m_trackstub_candidate_ADC_RMS; + extern std::vector m_trackstub_candidate_veto_score; + extern std::vector m_trackstub_candidate_mean_tick; + extern std::vector m_trackstub_candidate_max_tick; + extern std::vector m_trackstub_candidate_min_tick; + extern std::vector m_trackstub_candidate_min_wire; + extern std::vector m_trackstub_candidate_max_wire; + extern std::vector m_trackstub_candidate_mean_wire; + extern std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + extern std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + extern std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + extern std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + extern std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + extern std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + extern std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + extern std::vector m_trackstub_candidate_mean_ADC_second_half; + extern std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + extern std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + extern std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + extern std::vector m_trackstub_candidate_energy; + extern std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + extern std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + extern std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + extern std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + extern std::vector m_trackstub_candidate_parent_pdg; + extern std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + extern std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + extern std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + extern int m_trackstub_num_candidate_groups; /* number of groups */ + extern std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + extern std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + //------- Second shower related variables ---- + extern int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + extern int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + extern int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + extern int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + extern std::vector m_sss_candidate_in_nu_slice; + extern std::vector m_sss_candidate_num_hits; + extern std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + extern std::vector m_sss_candidate_num_ticks; + extern std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + extern std::vector m_sss_candidate_PCA; + extern std::vector m_sss_candidate_mean_ADC; + extern std::vector m_sss_candidate_ADC_RMS; + extern std::vector m_sss_candidate_impact_parameter; + extern std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + extern std::vector m_sss_candidate_veto_score; + extern std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + extern std::vector m_sss_candidate_mean_tick; + extern std::vector m_sss_candidate_max_tick; + extern std::vector m_sss_candidate_min_tick; + extern std::vector m_sss_candidate_min_wire; + extern std::vector m_sss_candidate_max_wire; + extern std::vector m_sss_candidate_mean_wire; + extern std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + extern std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + extern std::vector m_sss_candidate_energy; + extern std::vector m_sss_candidate_angle_to_shower; + extern std::vector m_sss_candidate_closest_neighbour; + extern std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + extern std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + extern std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + extern std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + extern std::vector m_sss_candidate_parent_pdg; + extern std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + extern std::vector m_sss_candidate_true_energy; + extern std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + extern int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + extern std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + extern std::vector m_sss3d_shower_start_y; + extern std::vector m_sss3d_shower_start_z; + extern std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + extern std::vector m_sss3d_shower_dir_y; + extern std::vector m_sss3d_shower_dir_z; + extern std::vector m_sss3d_shower_length; + extern std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + extern std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + extern * calculated assuming vertex is where their mother particle decays */ + + extern std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + extern * is calced direclty using shower direction of two showers */ + + extern std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + extern std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + extern * 0 if the conversion distance is 0*/ + extern std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + extern std::vector m_sss3d_shower_score; + extern std::vector m_sss3d_slice_nu; + extern std::vector m_sss3d_slice_clear_cosmic; + + extern bool bool_make_sss_plots; + + + //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- + extern double m_sss3d_ioc_ranked_en; + extern double m_sss3d_ioc_ranked_conv; + extern double m_sss3d_ioc_ranked_invar; + extern double m_sss3d_ioc_ranked_implied_invar; + extern double m_sss3d_ioc_ranked_ioc; + extern double m_sss3d_ioc_ranked_opang; + extern double m_sss3d_ioc_ranked_implied_opang; + extern int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + extern double m_sss3d_invar_ranked_en; + extern double m_sss3d_invar_ranked_conv; + extern double m_sss3d_invar_ranked_invar; + extern double m_sss3d_invar_ranked_implied_invar; + extern double m_sss3d_invar_ranked_ioc; + extern double m_sss3d_invar_ranked_opang; + extern double m_sss3d_invar_ranked_implied_opang; + extern int m_sss3d_invar_ranked_id; + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + extern double m_sss2d_ioc_ranked_en; + extern double m_sss2d_ioc_ranked_conv; + extern double m_sss2d_ioc_ranked_ioc; + extern double m_sss2d_ioc_ranked_pca; + extern double m_sss2d_ioc_ranked_invar; + extern double m_sss2d_ioc_ranked_angle_to_shower; + extern int m_sss2d_ioc_ranked_num_planes; + + extern double m_sss2d_conv_ranked_en; + extern double m_sss2d_conv_ranked_conv; + extern double m_sss2d_conv_ranked_ioc; + extern double m_sss2d_conv_ranked_pca; + extern double m_sss2d_conv_ranked_invar; + extern double m_sss2d_conv_ranked_angle_to_shower; + extern int m_sss2d_conv_ranked_num_planes; + + extern double m_sss2d_invar_ranked_en; + extern double m_sss2d_invar_ranked_conv; + extern double m_sss2d_invar_ranked_ioc; + extern double m_sss2d_invar_ranked_pca; + extern double m_sss2d_invar_ranked_invar; + extern double m_sss2d_invar_ranked_angle_to_shower; + extern int m_sss2d_invar_ranked_num_planes; + + + //------------ Vertex Related variables ------------- + extern int m_reco_vertex_size; + extern double m_vertex_pos_x; + extern double m_vertex_pos_y; + extern double m_vertex_pos_z; + extern double m_vertex_pos_tick; /* time tick of vertex pos */ + extern double m_vertex_pos_wire_p0; + extern double m_vertex_pos_wire_p2; + extern double m_vertex_pos_wire_p1; + extern int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + extern double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + extern double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + extern double m_reco_vertex_dist_to_CPA; + + + extern int m_reco_asso_showers; + +// extern double m_reco_vertex_to_nearest_dead_wire_plane0; +// extern double m_reco_vertex_to_nearest_dead_wire_plane1; +// extern double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + static const int k_max_mc_particles=100; + + extern int m_run_number_eventweight; + extern int m_subrun_number_eventweight; + extern int m_event_number_eventweight; + + extern double m_mcflux_nu_pos_x; + extern double m_mcflux_nu_pos_y; + extern double m_mcflux_nu_pos_z; + extern double m_mcflux_nu_mom_x; + extern double m_mcflux_nu_mom_y; + extern double m_mcflux_nu_mom_z; + extern double m_mcflux_nu_mom_E; + extern int m_mcflux_ntype; + extern int m_mcflux_ptype; + extern double m_mcflux_nimpwt; + extern double m_mcflux_dk2gen; + extern double m_mcflux_nenergyn; + extern double m_mcflux_tpx; + extern double m_mcflux_tpy; + extern double m_mcflux_tpz; + extern double m_mcflux_vx; + extern double m_mcflux_vy; + extern double m_mcflux_vz; + extern int m_mcflux_tptype; + extern int m_mctruth_nparticles; + extern int m_mctruth_particles_track_Id[k_max_mc_particles]; + extern int m_mctruth_particles_pdg_code[k_max_mc_particles]; + extern int m_mctruth_particles_mother[k_max_mc_particles]; + extern int m_mctruth_particles_status_code[k_max_mc_particles]; + extern int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + extern int m_mctruth_particles_daughters[100][100]; + extern double m_mctruth_particles_Gvx[k_max_mc_particles]; + extern double m_mctruth_particles_Gvy[k_max_mc_particles]; + extern double m_mctruth_particles_Gvz[k_max_mc_particles]; + extern double m_mctruth_particles_Gvt[k_max_mc_particles]; + extern double m_mctruth_particles_px0[k_max_mc_particles]; + extern double m_mctruth_particles_py0[k_max_mc_particles]; + extern double m_mctruth_particles_pz0[k_max_mc_particles]; + extern double m_mctruth_particles_e0[k_max_mc_particles]; + extern int m_mctruth_particles_rescatter[k_max_mc_particles]; + extern double m_mctruth_particles_polx[k_max_mc_particles]; + extern double m_mctruth_particles_poly[k_max_mc_particles]; + extern double m_mctruth_particles_polz[k_max_mc_particles]; + extern int m_mctruth_neutrino_ccnc; + extern int m_mctruth_neutrino_mode; + extern int m_mctruth_neutrino_interaction_type; + extern int m_mctruth_neutrino_target; + extern int m_mctruth_neutrino_nucleon; + extern int m_mctruth_neutrino_quark; + extern double m_mctruth_neutrino_w; + extern double m_mctruth_neutrino_x; + extern double m_mctruth_neutrino_y; + extern double m_mctruth_neutrino_qsqr; + extern bool m_gtruth_is_sea_quark; + extern int m_gtruth_tgt_pdg; + extern int m_gtruth_tgt_Z; + extern int m_gtruth_tgt_A; + extern double m_gtruth_tgt_p4_x; + extern double m_gtruth_tgt_p4_y; + extern double m_gtruth_tgt_p4_z; + extern double m_gtruth_tgt_p4_E; + extern double m_gtruth_weight; + extern double m_gtruth_probability; + extern double m_gtruth_xsec; + extern double m_gtruth_diff_xsec; + extern int m_gtruth_gphase_space; + extern double m_gtruth_vertex_x; + extern double m_gtruth_vertex_y; + extern double m_gtruth_vertex_z; + extern double m_gtruth_vertex_T; + extern int m_gtruth_gscatter; + extern int m_gtruth_gint; + extern int m_gtruth_res_num; + extern int m_gtruth_num_piplus; + extern int m_gtruth_num_pi0; + extern int m_gtruth_num_piminus; + extern int m_gtruth_num_proton; + extern int m_gtruth_num_neutron; + extern bool m_gtruth_is_charm; + extern bool m_gtruth_is_strange; + extern int m_gtruth_charm_hadron_pdg; + extern int m_gtruth_strange_hadron_pdg; + extern int m_gtruth_decay_mode; + extern double m_gtruth_gx; + extern double m_gtruth_gy; + extern double m_gtruth_gt; + extern double m_gtruth_gw; + extern double m_gtruth_gQ2; + extern double m_gtruth_gq2; + extern int m_gtruth_probe_pdg; + extern double m_gtruth_probe_p4_x; + extern double m_gtruth_probe_p4_y; + extern double m_gtruth_probe_p4_z; + extern double m_gtruth_probe_p4_E; + extern double m_gtruth_hit_nuc_p4_x; + extern double m_gtruth_hit_nuc_p4_y; + extern double m_gtruth_hit_nuc_p4_z; + extern double m_gtruth_hit_nuc_p4_E; + extern double m_gtruth_hit_nuc_pos; + extern double m_gtruth_fs_had_syst_p4_x; + extern double m_gtruth_fs_had_syst_p4_y; + extern double m_gtruth_fs_had_syst_p4_z; + extern double m_gtruth_fs_had_syst_p4_E; + + //-------------- Flash related variables ------------- + extern int m_reco_num_templates; + extern std::vector m_reco_template; /* temp comment: does not seem to be used */ + + + //-------------- Flash related variables ------------- + extern std::vector m_reco_flash_total_pe; + extern std::vector m_reco_flash_time; + extern std::vector m_reco_flash_time_width; + extern std::vector m_reco_flash_abs_time; + extern std::vector m_reco_flash_frame; + extern std::vector m_reco_flash_ycenter; + extern std::vector m_reco_flash_ywidth; + extern std::vector m_reco_flash_zcenter; + extern std::vector m_reco_flash_zwidth; + extern std::vector m_reco_flash_total_pe_in_beamgate; + extern std::vector m_reco_flash_time_in_beamgate; + extern std::vector m_reco_flash_ycenter_in_beamgate; + extern std::vector m_reco_flash_zcenter_in_beamgate; + + extern int m_reco_num_flashes; + extern int m_reco_num_flashes_in_beamgate; + + extern double m_beamgate_flash_start; + extern double m_beamgate_flash_end; + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + extern int m_CRT_veto_nhits; /* number of CRT veto hits */ + extern std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + extern double m_CRT_min_hit_time; + extern double m_CRT_min_hit_PE; + extern double m_CRT_min_hit_x; + extern double m_CRT_min_hit_y; + extern double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + extern std::vector m_CRT_hits_time; + extern std::vector m_CRT_hits_PE; + extern std::vector m_CRT_hits_x; + extern std::vector m_CRT_hits_y; + extern std::vector m_CRT_hits_z; + extern double m_CRT_dt; //time between flash and nearest CRT hit + + extern double m_genie_spline_weight; + extern double m_genie_CV_tune_weight; + + extern double m_photonu_weight_low; + extern double m_photonu_weight_high; + + + extern int pfp_w_bestnuID; + //------------ Track related Variables ------------- + extern double m_track_calo_min_dEdx; + extern double m_track_calo_max_dEdx; + extern double m_track_calo_min_dEdx_hits; + extern double m_track_calo_trunc_fraction; + + extern int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + extern std::vector m_reco_track_num_daughters; + extern std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + extern std::vector m_reco_track_length; /* whole length of the reco track */ + extern std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + extern std::vector m_reco_track_diry; + extern std::vector m_reco_track_dirz; + extern std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + extern std::vector m_reco_track_starty; + extern std::vector m_reco_track_startz; + extern std::vector m_reco_track_endx; /* end of the track in cartesian X */ + extern std::vector m_reco_track_endy; + extern std::vector m_reco_track_endz; + extern std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + extern std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + extern std::vector m_reco_track_end_dist_to_CPA; + extern std::vector m_reco_track_start_dist_to_CPA; + extern std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + extern std::vector m_reco_track_start_dist_to_SCB; + extern std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + extern std::vector m_reco_track_start_in_SCB; + extern std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + extern std::vector m_reco_track_calo_energy_plane1; + extern std::vector m_reco_track_calo_energy_plane2; + extern std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + extern std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + extern std::vector m_reco_track_phi_yx; + + extern std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + extern std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + extern std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + extern std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + extern std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + extern std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + extern std::vector m_reco_track_spacepoint_principal1; + extern std::vector m_reco_track_spacepoint_principal2; + + extern std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + extern std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + // ---- corresponding variables on the best plane of reco track, which is defined as such------ + // if plane 2 have good hits, then plane 2 is the best-plane + // otherwise, which plane of plane 0 and 1 has more good hits will be best plane + // if none of 3 planes has good hits, then best-plane is set to -1 + extern std::vector m_reco_track_best_calo_plane; + extern std::vector m_reco_track_mean_dEdx_best_plane; + extern std::vector m_reco_track_mean_dEdx_start_half_best_plane; + extern std::vector m_reco_track_mean_dEdx_end_half_best_plane; + extern std::vector m_reco_track_good_calo_best_plane; + extern std::vector> m_reco_track_trunc_dEdx_best_plane; + extern std::vector m_reco_track_mean_trunc_dEdx_best_plane; + extern std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + extern std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + extern std::vector m_reco_track_trunc_PIDA_best_plane; + extern std::vector> m_reco_track_resrange_best_plane; + extern std::vector> m_reco_track_dEdx_best_plane; + + extern std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + extern std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + extern std::vector m_reco_track_mean_dEdx_end_half_p0; + extern std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + extern std::vector> m_reco_track_trunc_dEdx_p0; + extern std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + extern std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + extern std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + extern std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + extern std::vector m_reco_track_mean_dEdx_p1; + extern std::vector m_reco_track_mean_dEdx_start_half_p1; + extern std::vector m_reco_track_mean_dEdx_end_half_p1; + extern std::vector m_reco_track_good_calo_p1; + extern std::vector> m_reco_track_trunc_dEdx_p1; + extern std::vector m_reco_track_mean_trunc_dEdx_p1; + extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + extern std::vector m_reco_track_trunc_PIDA_p1; + extern std::vector> m_reco_track_resrange_p1; + extern std::vector> m_reco_track_dEdx_p1; + + extern std::vector m_reco_track_mean_dEdx_p2; + extern std::vector m_reco_track_mean_dEdx_start_half_p2; + extern std::vector m_reco_track_mean_dEdx_end_half_p2; + extern std::vector m_reco_track_good_calo_p2; + extern std::vector> m_reco_track_trunc_dEdx_p2; + extern std::vector m_reco_track_mean_trunc_dEdx_p2; + extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + extern std::vector m_reco_track_trunc_PIDA_p2; + extern std::vector> m_reco_track_resrange_p2; + extern std::vector> m_reco_track_dEdx_p2; + + extern std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + extern std::vector m_reco_track_num_calo_hits_p1; + extern std::vector m_reco_track_num_calo_hits_p2; + +// std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ +// std::vector m_reco_track_end_to_nearest_dead_wire_plane1; +// std::vector m_reco_track_end_to_nearest_dead_wire_plane2; + + extern std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + extern std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + extern std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + extern std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + extern std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + extern std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + extern std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + extern std::vector m_sim_track_overlay_fraction; + extern std::vector m_sim_track_energy; + extern std::vector m_sim_track_mass; + extern std::vector m_sim_track_kinetic_energy; + extern std::vector m_sim_track_pdg; + extern std::vector m_sim_track_parent_pdg; + + /* event origin types: + * kUnknown: ??? + * kBeamNeutrino: Beam neutrinos. + * kCosmicRay: Cosmic rays. + * kSuperNovaNeutrino: Supernova neutrinos. + * kSingleParticle: single particles thrown at the detector + */ + extern std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + extern std::vector m_sim_track_process; + extern std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + extern std::vector m_sim_track_starty; + extern std::vector m_sim_track_startz; + extern std::vector m_sim_track_px; + extern std::vector m_sim_track_py; + extern std::vector m_sim_track_pz; + extern std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + extern std::vector m_sim_track_endy; + extern std::vector m_sim_track_endz; + extern std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + extern std::vector m_sim_track_trackID; + //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + extern std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + extern std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + extern std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + /*-------------------------------------------------------------------------------------*/ + extern std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + * if there is no shower hits, set to 999 + * if there is shower hits but no track hits, set to -999 + */ + extern std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + extern std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + extern std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + * of each plane (this is a 3 element vector) */ + extern std::vector m_isolation_num_shr_hits_win_2cm_trk; + extern std::vector m_isolation_num_shr_hits_win_5cm_trk; + extern std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + extern std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + * set to -999 if there is no unassociated hits or track hits on plane + */ + extern std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + extern std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + extern std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + * on each plane (this vector has 3 elements) */ + extern std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + extern std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + extern std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + + + /*-------------------------------------------------------------------------------------*/ + //------------ Shower related Variables ------------- + + extern std::vector m_reco_shower_num_daughters; + extern std::vector m_reco_shower_daughter_trackscore; + + extern std::vector m_reco_shower3d_exists; + extern std::vector m_reco_shower3d_startx; + extern std::vector m_reco_shower3d_starty; + extern std::vector m_reco_shower3d_startz; + extern std::vector m_reco_shower3d_dirx; + extern std::vector m_reco_shower3d_diry; + extern std::vector m_reco_shower3d_dirz; + extern std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + extern std::vector m_reco_shower3d_phi_yx; + + extern std::vector m_reco_shower3d_openingangle; + extern std::vector m_reco_shower3d_length; + extern std::vector m_reco_shower3d_conversion_distance; + + extern std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + extern std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + extern std::vector m_reco_shower3d_implied_diry; + extern std::vector m_reco_shower3d_implied_dirz; + + extern std::vector m_reco_shower3d_energy_plane0; + extern std::vector m_reco_shower3d_energy_plane1; + extern std::vector m_reco_shower3d_energy_plane2; + + extern std::vector m_reco_shower3d_dEdx_plane0; + extern std::vector m_reco_shower3d_dEdx_plane1; + extern std::vector m_reco_shower3d_dEdx_plane2; + + + + extern std::vector m_reco_shower_startx; + extern std::vector m_reco_shower_starty; + extern std::vector m_reco_shower_startz; + extern std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + extern std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ + extern std::vector m_reco_shower_start_dist_to_SCB; + extern std::vector m_reco_shower_start_in_SCB; + extern std::vector m_reco_shower_end_dist_to_active_TPC; + extern std::vector m_reco_shower_end_dist_to_SCB; + + extern std::vector m_reco_shower_dirx; /* X component of shower direction */ + extern std::vector m_reco_shower_diry; + extern std::vector m_reco_shower_dirz; + extern std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + extern std::vector m_reco_shower_phi_yx; + + extern std::vector m_reco_shower_openingangle; + extern std::vector m_reco_shower_length; + extern std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + extern std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + extern std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + extern std::vector m_reco_shower_implied_diry; + extern std::vector m_reco_shower_implied_dirz; + + extern std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + extern std::vector m_reco_shower_delaunay_num_triangles_plane1; + extern std::vector m_reco_shower_delaunay_num_triangles_plane2; +// +// std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ +// std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; +// std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + //shower flash matching + + extern std::vector m_reco_shower_flash_shortest_distz; + extern std::vector m_reco_shower_flash_shortest_disty; + extern std::vector m_reco_shower_flash_shortest_distyz; + + extern std::vector m_reco_shower_flash_shortest_index_z; + extern std::vector m_reco_shower_flash_shortest_index_y; + extern std::vector m_reco_shower_flash_shortest_index_yz; + + extern double m_flash_optfltr_pe_beam; + extern double m_flash_optfltr_pe_beam_tot; + extern double m_flash_optfltr_pe_veto; + extern double m_flash_optfltr_pe_veto_tot; + + //end flash matching + extern std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + extern std::vector m_reco_shower_num_hits_plane1; + extern std::vector m_reco_shower_num_hits_plane2; + extern std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + extern std::vector m_reco_shower_delaunay_area_plane1; + extern std::vector m_reco_shower_delaunay_area_plane2; + extern std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + extern std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + extern std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + extern std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + extern std::vector m_reco_shower_trackscore; + extern std::vector m_reco_shower_pfparticle_pdg; + extern std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + extern std::vector m_reco_shower_kalman_median_dEdx_plane0; + extern std::vector m_reco_shower_kalman_median_dEdx_plane1; + extern std::vector m_reco_shower_kalman_median_dEdx_plane2; + extern std::vector m_reco_shower_kalman_median_dEdx_allplane; + extern std::vector m_reco_shower_kalman_mean_dEdx_plane0; + extern std::vector m_reco_shower_kalman_mean_dEdx_plane1; + extern std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + extern std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + extern std::vector m_sim_shower_energy; + extern std::vector m_sim_shower_kinetic_energy; + extern std::vector m_sim_shower_mass; + extern std::vector m_sim_shower_pdg; + extern std::vector m_sim_shower_trackID; + extern std::vector m_sim_shower_parent_pdg; + extern std::vector m_sim_shower_parent_trackID; + extern std::vector m_sim_shower_origin; + extern std::vector m_sim_shower_process; + extern std::vector m_sim_shower_end_process; + // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ + + + extern std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + extern std::vector m_sim_shower_start_y; + extern std::vector m_sim_shower_start_z; + extern std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + extern std::vector m_sim_shower_vertex_y; + extern std::vector m_sim_shower_vertex_z; + + extern std::vector m_sim_shower_px; + extern std::vector m_sim_shower_py; + extern std::vector m_sim_shower_pz; + extern std::vector m_sim_shower_is_true_shower; + extern std::vector m_sim_shower_best_matched_plane; + extern std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + * plane 0 over all energy deposited on plane 0 by the shower */ + extern std::vector m_sim_shower_matched_energy_fraction_plane1; + extern std::vector m_sim_shower_matched_energy_fraction_plane2; + extern std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + extern std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + extern std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + extern std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + extern std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + //------------ MCTruth related Variables ------------- + extern int m_mctruth_num; + extern int m_mctruth_origin; + extern double m_mctruth_nu_E; + extern double m_mctruth_nu_vertex_x; + extern double m_mctruth_nu_vertex_y; + extern double m_mctruth_nu_vertex_z; + extern double m_mctruth_reco_vertex_dist; + extern double m_mctruth_lepton_E; + extern int m_mctruth_nu_pdg; + extern int m_mctruth_lepton_pdg; + extern int m_mctruth_mode ; + extern int m_mctruth_interaction_type ; + extern int m_mctruth_ccnc; + extern double m_mctruth_qsqr; + extern int m_mctruth_num_daughter_particles; + extern std::vector m_mctruth_daughters_pdg; + extern std::vector m_mctruth_daughters_E; + extern std::vector m_mctruth_daughters_status_code; + extern std::vector m_mctruth_daughters_trackID; + extern std::vector m_mctruth_daughters_mother_trackID; + extern std::vector m_mctruth_daughters_px; + extern std::vector m_mctruth_daughters_py; + extern std::vector m_mctruth_daughters_pz; + extern std::vector m_mctruth_daughters_startx; + extern std::vector m_mctruth_daughters_starty; + extern std::vector m_mctruth_daughters_startz; + extern std::vector m_mctruth_daughters_time; + extern std::vector m_mctruth_daughters_endx; + extern std::vector m_mctruth_daughters_endy; + extern std::vector m_mctruth_daughters_endz; + extern std::vector m_mctruth_daughters_endtime; + extern std::vector m_mctruth_daughters_process; + extern std::vector m_mctruth_daughters_end_process; + extern int m_mctruth_num_exiting_photons ; + extern int m_mctruth_num_exiting_protons ; + extern int m_mctruth_num_exiting_pi0 ; + extern int m_mctruth_num_exiting_pipm ; + extern int m_mctruth_num_exiting_neutrons; + extern int m_mctruth_num_exiting_delta0; + extern int m_mctruth_num_exiting_deltapm; + extern int m_mctruth_num_exiting_deltapp; + extern double m_mctruth_leading_exiting_proton_energy; + extern int m_mctruth_is_delta_radiative; + extern int m_mctruth_delta_radiative_1g1p_or_1g1n; + extern double m_mctruth_delta_photon_energy; + extern double m_mctruth_delta_proton_energy; + extern double m_mctruth_delta_neutron_energy; + extern std::vector m_mctruth_exiting_delta0_num_daughters; + + extern std::vector m_mctruth_exiting_photon_trackID; + extern std::vector m_mctruth_exiting_photon_mother_trackID; + extern std::vector m_mctruth_exiting_photon_from_delta_decay; + extern std::vector m_mctruth_exiting_photon_energy; + extern std::vector m_mctruth_exiting_photon_px; + extern std::vector m_mctruth_exiting_photon_py; + extern std::vector m_mctruth_exiting_photon_pz; + + extern std::vector m_mctruth_exiting_proton_trackID; + extern std::vector m_mctruth_exiting_proton_mother_trackID; + extern std::vector m_mctruth_exiting_proton_from_delta_decay; + extern std::vector m_mctruth_exiting_proton_energy; + extern std::vector m_mctruth_exiting_proton_px; + extern std::vector m_mctruth_exiting_proton_py; + extern std::vector m_mctruth_exiting_proton_pz; + + extern std::vector m_mctruth_exiting_neutron_trackID; + extern std::vector m_mctruth_exiting_neutron_mother_trackID; + extern std::vector m_mctruth_exiting_neutron_from_delta_decay; + extern std::vector m_mctruth_exiting_neutron_energy; + extern std::vector m_mctruth_exiting_neutron_px; + extern std::vector m_mctruth_exiting_neutron_py; + extern std::vector m_mctruth_exiting_neutron_pz; + extern int m_mctruth_num_reconstructable_protons; + extern bool m_mctruth_is_reconstructable_1g1p; + extern bool m_mctruth_is_reconstructable_1g0p; + + extern std::vector m_mctruth_exiting_pi0_E; + extern std::vector m_mctruth_exiting_pi0_mom; + extern std::vector m_mctruth_exiting_pi0_px; + extern std::vector m_mctruth_exiting_pi0_py; + extern std::vector m_mctruth_exiting_pi0_pz; + + extern double m_mctruth_pi0_leading_photon_energy; + extern std::string m_mctruth_pi0_leading_photon_end_process; + extern double m_mctruth_pi0_subleading_photon_energy; + extern std::string m_mctruth_pi0_subleading_photon_end_process; + extern std::vector m_mctruth_pi0_subleading_photon_end; + extern std::vector m_mctruth_pi0_subleading_photon_start; + extern std::vector m_mctruth_pi0_leading_photon_end; + extern std::vector m_mctruth_pi0_leading_photon_start; + extern int m_mctruth_pi0_leading_photon_exiting_TPC; + extern int m_mctruth_pi0_subleading_photon_exiting_TPC; + extern std::vector m_mctruth_pi0_leading_photon_mom; + extern std::vector m_mctruth_pi0_subleading_photon_mom; + extern std::string m_truthmatching_signaldef; + + //the calo calculated quantities + extern std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + extern std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + extern std::vector m_reco_shower_energy_plane1; + extern std::vector m_reco_shower_energy_plane2; + extern std::vector m_reco_shower_reclustered_energy_max; + extern std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + * close enough to it */ + extern std::vector m_reco_shower_reclustered_energy_plane1; + extern std::vector m_reco_shower_reclustered_energy_plane2; + extern std::vector m_reco_shower_plane0; + extern std::vector m_reco_shower_plane1; + extern std::vector m_reco_shower_plane2; + extern std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + extern std::vector m_reco_shower_plane1_nhits; + extern std::vector m_reco_shower_plane2_nhits; + extern std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + extern std::vector m_reco_shower_plane1_meanRMS; + extern std::vector m_reco_shower_plane2_meanRMS; + extern std::vector m_reco_shower_hit_wire; + extern std::vector m_reco_shower_hit_plane; + extern std::vector m_reco_shower_hit_tick; + extern std::vector m_reco_shower_spacepoint_x; + extern std::vector m_reco_shower_spacepoint_z; + extern std::vector m_reco_shower_spacepoint_y; + extern std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + extern std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + extern std::vector> m_reco_shower_dQdx_plane1; + extern std::vector> m_reco_shower_dQdx_plane2; + extern std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + extern std::vector> m_reco_shower_dEdx_plane1; + extern std::vector> m_reco_shower_dEdx_plane2; + extern std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + extern std::vector m_reco_shower_dEdx_plane1_mean; + extern std::vector m_reco_shower_dEdx_plane2_mean; + extern std::vector m_reco_shower_dEdx_plane0_max; + extern std::vector m_reco_shower_dEdx_plane1_max; + extern std::vector m_reco_shower_dEdx_plane2_max; + extern std::vector m_reco_shower_dEdx_plane0_min; + extern std::vector m_reco_shower_dEdx_plane1_min; + extern std::vector m_reco_shower_dEdx_plane2_min; + extern std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + extern std::vector m_reco_shower_dEdx_plane1_median; + extern std::vector m_reco_shower_dEdx_plane2_median; + extern std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + extern std::vector m_reco_shower_angle_wrt_wires_plane1; + extern std::vector m_reco_shower_angle_wrt_wires_plane2; + extern std::vector m_reco_shower_dEdx_amalgamated; + extern std::vector m_reco_shower_dEdx_amalgamated_nhits; + extern std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + extern std::vector m_reco_shower_dQdx_plane1_median; + extern std::vector m_reco_shower_dQdx_plane2_median; + extern std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + extern std::vector m_reco_shower_dEdx_plane1_nhits; + extern std::vector m_reco_shower_dEdx_plane2_nhits; + extern double _time2cm;//value modeled from David's shower code + // PID-related variables + extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + extern std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + extern std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + extern std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + extern std::vector m_reco_track_pid_pida_plane0; + extern std::vector m_reco_track_pid_pida_plane1; + extern std::vector m_reco_track_pid_pida_plane2; + extern std::vector m_reco_track_pid_chi2_mu_plane0; + extern std::vector m_reco_track_pid_chi2_mu_plane1; + extern std::vector m_reco_track_pid_chi2_mu_plane2; + extern std::vector m_reco_track_pid_chi2_p_plane0; + extern std::vector m_reco_track_pid_chi2_p_plane1; + extern std::vector m_reco_track_pid_chi2_p_plane2; + extern std::vector m_reco_track_pid_three_plane_proton_pid; + + //Geant4 + extern std::vector m_geant4_pdg; + extern std::vector m_geant4_trackid; + extern std::vector m_geant4_mother; + extern std::vector m_geant4_statuscode; + extern std::vector m_geant4_E; + extern std::vector m_geant4_mass; + extern std::vector m_geant4_px; + extern std::vector m_geant4_py; + extern std::vector m_geant4_pz; + extern std::vector m_geant4_vx; + extern std::vector m_geant4_vy; + extern std::vector m_geant4_vz; + extern std::vector m_geant4_dx; + extern std::vector m_geant4_dy; + extern std::vector m_geant4_dz; + extern std::vector m_geant4_process; + extern std::vector m_geant4_end_process; + extern std::vector m_geant4_costheta; + + //matching variables + extern int m_reco_slice_num; //total number of slices in the event + extern std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + extern int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + extern int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + extern std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + extern std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + extern std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + extern std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + extern std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + extern std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + extern std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + extern std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + extern std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + extern std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + extern std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + extern std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + extern std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + extern std::vector m_matched_signal_shower_is_clearcosmic; + extern int m_matched_signal_shower_num; /* number of match showers (that has unique best-matched primary photon ?) */ + extern std::vector m_matched_signal_shower_is_nuslice; + extern std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + extern std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + + //-------- for reco tracks that match to a primary proton --------- + extern std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + extern std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + extern std::vector m_matched_signal_track_sliceId; + extern std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + extern std::vector m_matched_signal_track_is_nuslice; + extern std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + extern std::vector m_matched_signal_track_showers_in_slice; + + extern int m_matched_signal_track_num; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + extern bool m_reco_1g1p_is_same_slice; + extern bool m_reco_1g1p_is_multiple_slices; + extern bool m_reco_1g1p_is_nuslice; + extern bool m_reco_1g0p_is_nuslice; + extern double m_reco_1g1p_nuscore; + extern double m_reco_1g0p_nuscore; + extern bool m_is_matched_1g1p; + extern bool m_is_matched_1g0p; + extern bool m_no_matched_showers; + extern bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + extern bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + +} +#endif // SBNCODE_SINGLEPHOTONANALYSIS_VARIABLES_H diff --git a/sbncode/SinglePhotonAnalysis/README.md b/sbncode/SinglePhotonAnalysis/README.md index 3c338fb88..25694526e 100644 --- a/sbncode/SinglePhotonAnalysis/README.md +++ b/sbncode/SinglePhotonAnalysis/README.md @@ -48,23 +48,14 @@ Three sub-modules are included in the Single Photon Analysis Module: - `NCDeltaRadiative_module.cc` implements the `NCDeltaRadiative` filter for NCDeltaRadiative events ### File Structure -- `Libraries/` contains essential headers for the `SinglePhoton` module. +- `Libraries/` contains essential headers for the `SinglePhoton` module; most of the variables are assigned in these functions. - `SEAview/` is an additional module runs inside the `SinglePhoton` module. - `jobs/` contains FHiCL files for running these modules -- `HelperFunctions/` contains some useful functions to simplify the code +- `HelperFunctions/` contains functions that are independent to output variables & they function as helpers to process simple operations. -Header goes like -```mermaid -flowchart TB -A--first formost-->C; -A[SinglePhoton_module.cc]--contains-->B[analyze*.h that works like *.cxx]; -C[SinglePhoton_module.h]-->D[helper_*.h]; -C-->F[DBSCAN.h]; -C-->G[SEAviewer.h]; -``` ### The flow of the `SinglePhoton` module @@ -84,10 +75,9 @@ In each event loop: ```mermaid flowchart TB -subgraph AA[1. Collect Pandora Reco. Objects] +subgraph AA[1. Analyze Pandora Reco. Objects] direction TB -B[AnalyzeSlices]-->C; -C[AnalyzeFlashes, a trivial function]-->D; +C[AnalyzeFlashes]-->D; D[AnalyzeTracks]-->E[AnalyzeShowers]; end diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 4834fa409..19f7c277e 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -1,24 +1,591 @@ -#include "SinglePhoton_module.h" -#include "HelperFunctions/helper_processors.h" //now it can use variables defined in singlephoton.h -#include "Libraries/init_branches.h" -#include "Libraries/reco_truth_matching.h" -//#include "analyze_Template.h" -#include "Libraries/analyze_OpFlashes.h" -#include "Libraries/analyze_Tracks.h" -#include "Libraries/analyze_Showers.h" -#include "Libraries/analyze_MCTruth.h" -#include "Libraries/analyze_EventWeight.h" -#include "Libraries/analyze_Slice.h" -#include "Libraries/analyze_Geant4.h" -#include "Libraries/fiducial_volume.h" -#include "Libraries/second_shower_search.h" -#include "Libraries/isolation.h" -#include "Libraries/output_ntuple.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" + +#include "art_root_io/TFileService.h" +#include "art_root_io/TFileDirectory.h" + +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Track.h" +#include "lardataobj/RecoBase/Shower.h" +#include "lardataobj/RecoBase/Vertex.h" +#include "lardataobj/RecoBase/Cluster.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/SpacePoint.h" +#include "lardataobj/RecoBase/OpFlash.h" +//KENG +#include "sbnobj/Common/CRT/CRTHit.hh" +#include "lardataobj/MCBase/MCTrack.h" +#include "lardataobj/MCBase/MCShower.h" +#include "lardataobj/AnalysisBase/Calorimetry.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "lardataobj/AnalysisBase/ParticleID.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "lardataobj/Simulation/GeneratedParticleInfo.h" + +#include "larsim/EventWeight/Base/MCEventWeight.h" + +#include "larevt/SpaceChargeServices/SpaceChargeService.h" + +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "nusimdata/SimulationBase/MCParticle.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/simb.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/GTruth.h" + +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" + +#include "larcore/Geometry/Geometry.h" + +#include "canvas/Utilities/ensurePointer.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "canvas/Persistency/Common/FindOne.h" + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "cetlib_except/exception.h" + +//#include "ubobj/Optical/UbooneOpticalFilter.h" + +// Helper function for PID stuff +//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" + +#include "TCanvas.h" +#include "TTree.h" +#include "TFile.h" +#include "TGraph.h" +#include "TGraph2D.h" +#include "TGraphDelaunay.h" +#include "TRandom3.h" +#include "TGeoPolygon.h" + +//#include "Pandora/PdgTable.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SEAview/SEAviewer.h" + +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/init_branches.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/Processors.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h" namespace single_photon { + /** + * @brief SinglePhoton class + */ + class SinglePhoton : public art::EDFilter + { + public: + /** + * @brief Constructor + * + * @param pset the set of input fhicl parameters + */ + SinglePhoton(fhicl::ParameterSet const &pset); + + /** + * @brief Configure memeber variables using FHiCL parameters + * + * @param pset the set of input fhicl parameters + */ + void reconfigure(fhicl::ParameterSet const &pset); + + /** + * @brief Analyze an event! + * + * @param evt the art event to analyze + */ + bool filter(art::Event &evt) override; + + /** + * @brief Begin the job, setting up ! + * + */ + void beginJob() override; + + /** + * @brief End the job, setting down ! + * + */ + void endJob() override; + /** + * @brief: grab run, subrun number, and subrun POT, fill the TTree */ + bool beginSubRun(art::SubRun& sr) override; + bool endSubRun(art::SubRun& sr) override; + + private: + /** + * @brief Print out scores in PFParticleMetadata + * + * @param evt the art event to analyze + * @param pfParticleHandle the handle for the PFParticle collection + */ +// void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; +// +// /** +// * @brief Collect associated tracks and showers to particles in an input particle vector +// * +// * @param particles a vector holding PFParticles from which to find the associated tracks and showers +// * @param pfParticleHandle the handle for the PFParticle collection +// * @param evt the art event to analyze +// * @param tracks a vector to hold the associated tracks +// * @param showers a vector to hold the associated showers +// */ +// void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); +// +// /** +// * @brief: analyze associated tracks/showers for an PFParticle +// * @param: pParticle: PFParticle to be analyzed +// * @param: associatedTracks: a vector of asso track for pParticle +// * @param: associatedShowers: a vector of asso shower for pParticle +// * @param: tracks: associated track will be added into tracks +// * @param: showers: associated shower will be added into showers +// * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle +// */ +// void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); +// +// +// +// double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ +// /* +// *@brief Calculated the shower energy by looping over all the hits and summing the charge +// *@param hits - an art pointer of all the hits in a shower +// * +// */ +// double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ +// +// /** +// *@brief Takes a hit and multiplies the charge by the gain +// *@param thishitptr art pointer to a hit +// *@param plane the plane the hit is on +// **/ +// double GetQHit(art::Ptr thishitptr, int plane); +// +// +// int getNHitsPlane(std::vector> hits, int this_plane); +// double getMeanHitWidthPlane(std::vector> hits, int this_plane); +// +// +// /** +// * @brief Calculate the E value in MeV for a given hit +// * @param thishit - an individual hit +// * +// * +// * */ +// +// /** +// * @brief Calculate the E value in MeV from a given Q value +// * @param q - the charge value +// * +// * */ +// double QtoEConversion(double q); +// +// +// /** +// *@brief Takes a vector of dQ/dx values and converts to dE/dx +// *@param dqdx - vector of dqdx points +// * +// * */ +// std::vector CalcdEdxFromdQdx(std::vector dqdx); +// +// /** +// * +// *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane +// *@param shower - a Pandora shower +// *@param clusters - all of the clusters in the shower +// *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster +// *@param plane - a single plane +// * * */ +// +// std::vector CalcdQdxShower( +// const art::Ptr& shower, +// const std::vector> & clusters, +// std::map, std::vector> > & clusterToHitMap ,int plane, +// double triggeroffset, +// detinfo::DetectorPropertiesData const & theDetector); +// /** +// *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) +// *@param shower_dir - the 3D shower direction +// *@param plane - a single plane +// * */ +// double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ +// +// +// /** +// * +// *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary +// *uses triangle area check +// * +// * */ +// bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); +// +// +// //---------------- Potential Track Stub -------------------- +// +// /* @brief: given indices of clusters, determine if they overlap in time +// * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters +// * candidate_indices provided the indices of clusters of which we'd like to check the overlap +// */ +// std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); +// +// +// /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information +// * @brief: candidate clusters on different plane that overlap in time tick will be grouped together +// * @return: return.first -> number of possible matches +// * return.second.first -> 2D vector, indices of clusters in every possible match +// * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match +// */ +// std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); +// +// +// +// //---------------- SecondShower---- +// void SimpleSecondShowerCluster(); +// +// +// void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); +// +// +// +// /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits +// * and return a vector of 7 elements: +// * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} +// */ +// std::vectorSecondShowerMatching(std::vector>& hitz, +// art::FindManyP& mcparticles_per_hit, +// std::vector>& mcParticleVector, +// // std::map< size_t, art::Ptr> & pfParticleIdMap, +// std::map< int ,art::Ptr > & MCParticleToTrackIdMap); +// +// +// /* analyze a cluster of hits, and return corresponding sss_score */ +// sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); +// +// /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits +// * This function is currently used in function 'SecondShowerSearch' +// * @parameter: plane, cluster are not in use +// * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire +// */ +// TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); +// +// +// /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ +// int CompareToShowers(int,int,std::vector>& hitz,double,double, +// const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); +// //---------------- Isolation ----------------- +// +// +// /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ +// void IsolationStudy( +// std::vector all_PPFPs, +// const std::vector>& tracks, +// // std::map, art::Ptr> & trackToPFParticleMap, +// const std::vector>& showers, +// // std::map, art::Ptr> & showerToPFParticleMap, +// // const std::map, std::vector> > & pfParticleToHitsMap, +// // const std::map, int> & pfParticleToSliceIDMap, +// // const std::map>>& sliceIDToHitsMap, +// detinfo::DetectorPropertiesData const & theDetector); +// +// +// +// //---------------- Flashes ---------------------------- +// void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); +// +// +// +// //---------------- Tracks ---------------------------- +// /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ +// +// m_reco_asso_tracks = tracks.size(); +// ResizeTracks(m_reco_asso_tracks); +// void AnalyzeTracks( +// std::vector all_PPFPs, +// const std::vector>& tracks, +// // std::map, art::Ptr> & tracktopfparticlemap, +// // std::map, std::vector>> & pfParticleToHitsMap, +// std::map, std::vector>> & pfparticletospacepointmap , +// std::map > & MCParticleToTrackIdMap, +// std::map &sliceIdToNuScoreMap +// // std::map,bool> &PFPToClearCosmicMap, +// // std::map, int>& PFPToSliceIdMap, +// // std::map,double> &PFPToTrackScoreMap, +// // std::map,bool> &PFPToNuSliceMap, +// // PFParticleIdMap &pfParticleMap +// ); +// +// void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); +// +// +// //(std::map, std::vector>> &trackToCaloMap); +// +// +// /* @brief: analyze MCParticle related to recob::Track if it has one +// * variables starting with 'm_sim_track_' will be updated +// * */ +// void RecoMCTracks( +// std::vector all_PPFPs, +// const std::vector>& tracks, +// //std::map,art::Ptr> & trackToPFParticleMap, +// std::map, art::Ptr > & trackToMCParticleMap, +// std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, +// std::vector> & mcParticleVector, +// std::map< int, art::Ptr > & MCParticleToTrackIdMap, +// //std::map& sliceIdToNuScoreMap, +// //std::map,bool>& PFPToClearCosmicMap, +// //std::map, int>& PFPToSliceIdMap, +// std::vector& vec); +// +// +// /* collect information from anab::sParticleIDAlgScores of reco track */ +// void CollectPID(std::vector> & tracks, std::vector all_PPFPs); +// //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); +//// TGraph proton_length2energy_tgraph; +// +// //---------------- Showers ---------------------------- +// +// void AnalyzeShowers( +// std::vector all_PPFPs, +// const std::vector>& showers, +// // std::map,art::Ptr> & showerToPFParticleMap, +// // std::map, std::vector>> & pfParticleToHitMap, +// // std::map, std::vector> > & pfParticleToClusterMap, +// std::map, std::vector> > & clusterToHitMap , +// // std::map& sliceIdToNuScoreMap, +// // std::map,bool>& PFPToClearCosmicMap, +// // std::map, int>& PFPToSliceIdMap, +// // std::map,bool> &PFPToNuSliceMap, +// // std::map,double> &PFPToTrackScoreMap, +// // PFParticleIdMap &pfParticleMap, +// // std::map, art::Ptr>& PFPtoShowerReco3DMap, +// double triggeroffset, +// detinfo::DetectorPropertiesData const & theDetector +// ); +// +// void AnalyzeKalmanShowers( +// const std::vector>& showers, +// std::map,art::Ptr> &showerToPFParticleMap, +// std::map,art::Ptr> & pfParticlesToShowerKalmanMap, +// std::map,std::vector>>& kalmanTrackToCaloMap, +// std::map, std::vector>> & pfParticleToHitMap, +// detinfo::DetectorPropertiesData const & theDetector); +// +// /** +// * @brief: match showers to MCParticles +// * @arguments filled during function execution: +// * mcParticleVector: vector of mother particles of showers +// * objectToMCParticleMap: map of shower to its mother particle +// */ +// void showerRecoMCmatching( +// std::vector all_PPFPs, +// std::vector>& objectVector, +// std::map,art::Ptr>& objectToMCParticleMap, +// //std::map,art::Ptr>& objectToPFParticleMap, +// //std::map, std::vector> >& pfParticleToHitsMap, +// art::FindManyP& mcparticles_per_hit, +// std::vector>& mcParticleVector, +// //std::map< size_t, art::Ptr> & pfParticleIdMap, +// std::map< int ,art::Ptr > & MCParticleToTrackIdMap); +// //(std::map & sliceIdToNuScoreMap, +// //std::map,bool>& PFPToClearCosmicMap, +// //std::map, int>& PFPToSliceIdMap, +// //std::map,bool>& PFPToNuSliceMap); +// +// +// /* tranverse through mcParticleVector, and print out infos for photons */ +// int photoNuclearTesting(std::vector>& mcParticleVector); +// +// int setTPCGeom(); +// int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ +// double distToTPCActive(std::vector&vec); +// double distToCPA(std::vector&vec); +// int distToSCB(double & dist, std::vector &vec); + /* if point in active TPC, returns distance from point to closest TPC wall + * otherwise, returns -999 */ + + + // ------------ Fid Volume and SCB------------------------- // + //CHECK, no SCB stuff yet; + // double m_tpc_active_x_low; + // double m_tpc_active_x_high; + // double m_tpc_active_y_low; + // double m_tpc_active_y_high; + // double m_tpc_active_z_low ; + // double m_tpc_active_z_high; + // + // double m_SCB_YX_TOP_y1_array; + // std::vector m_SCB_YX_TOP_x1_array; + // std::vector m_SCB_YX_TOP_y2_array; + // double m_SCB_YX_TOP_x2_array; + // double m_SCB_YX_BOT_y1_array; + // std::vector m_SCB_YX_BOT_x1_array; + // std::vector m_SCB_YX_BOT_y2_array; + // double m_SCB_YX_BOT_x2_array; + // + // double m_SCB_ZX_Up_z1_array ; + // double m_SCB_ZX_Up_x1_array ; + // double m_SCB_ZX_Up_z2_array ; + // double m_SCB_ZX_Up_x2_array ; + // + // double m_SCB_ZX_Dw_z1_array; + // std::vector m_SCB_ZX_Dw_x1_array; + // std::vector m_SCB_ZX_Dw_z2_array; + // double m_SCB_ZX_Dw_x2_array; + + + //Fiducial stuff? + // int isInSCB(std::vector&); /* if point is inside SCB */ + // int isInSCB(double cut,std::vector&); + /* calc the minimum distance from point to the SC boundary,save to dist. + * return value (0, or 1) indicates whether the point is in SCB */ + + //---------------- MCTruths ---------------------------- + + /** + * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) + */ +// void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); +// +//// std::map is_delta_map; +// +// //---------------- EventWeight ---------------------------- +// +// //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. +// +// +// //---------------- Geant4 ---------------------------- +// +// +// +// +// /** +// * @brief: given an event and a label, collect all the SimChannel with that label +// * @ param: simChannelVector: a vector of SimChannel [to be filled] +// */ +// void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); +// +// /** +// * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use +// * @param: evt: event, label: given label +// * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] +// * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] +// * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] +// */ +// void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); +// void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); +// +// +// //-------------- Slices/Pandora Metadata ---------------// +// +// /** +// * brief: analyze metadata of PFParticles, and fill in all these maps +// * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap +// * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby +// */ +// void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, +// PFParticleIdMap &pfParticleMap, +// std::vector,int>> & primaryPFPSliceIdVec, +// std::map & sliceIdToNuScoreMap, +// std::map,bool>& PFPToClearCosmicMap, +// std::map, int>& PFPToSliceIdMap, +// std::map,bool>& PFPToNuSliceMap, +// std::map,double>& PFPToTrackScoreMap); +// +// // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, +// // std::map& sliceIdToNumPFPsMap ); +// +// std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ +// +// +// +// /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ +// std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, +// std::map, int>& PFPToSliceIdMap ); +// // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, +// // std::map, int>& PFPToSliceIdMap, +// // std::map& sliceIdToNumShowersMap ); +// +// +// /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ +// std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, +// std::map, int>& PFPToSliceIdMap); +// +// /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info +// * to determine how many eligible tracks and showers there are in the event +// */ +// void AnalyzeRecoMCSlices( +// std::string signal_def, +// std::vector all_PPFPs, +// std::map> & MCParticleToTrackIDMap, +// // std::map,art::Ptr > & showerToPFParticleMap, +// // std::vector,int>> & allPFPSliceIdVec, +// std::map, art::Ptr > & showerToMCParticleMap, +// // std::map,art::Ptr > & trackToNuPFParticleMap, +// std::map, art::Ptr > &trackToMCParticleMap); +// // ,std::map, int>& PFPToSliceIdMap); +// + + + + //------------------ Delaunay triangle tools -----------// + +// double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ +// int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found +// * and total area of these triangles, +// * save to num_triangles & area */ +//// int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ +// +// // given a MCParticle, get its corrected vertex +// //CHECK can merge three in one? +// int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); +// int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); +// // given a particle, and input location calculate its corrected true position, so we can compare it to reco +// int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); +// +// //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 +// std::vector> bad_channel_list_fixed_mcc9; +// std::map bad_channel_map_fixed_mcc9; + + + /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ + //bool IsEventInList(int run, int subrun, int event); + + }; +//HEADER above? CHECK + //Constructor from .fcl parameters SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) { @@ -28,8 +595,8 @@ namespace single_photon //Keng, grab theDetector and detClocks in each event. // theDetector = lar::providerFrom(); // detClocks = lar::providerFrom(); - SCE = lar::providerFrom();//Get space charge service - geom = lar::providerFrom(); +// SCE = lar::providerFrom();//Get space charge service +// geom = lar::providerFrom(); std::cout<<"SinglePhoton::"<<__FUNCTION__<<" now can start jobs --------------------"<setTPCGeom(); + setTPCGeom(); rangen = new TRandom3(22); //Whats a Delta? - std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; - std::vector delta_pdg_list = {2224,2214,1114,2114}; - for(size_t i=0; i< delta_pdg_list.size(); ++i){ - is_delta_map[delta_pdg_list[i]] = delta_names[i]; - is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; - } +// std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; +// std::vector delta_pdg_list = {2224,2214,1114,2114}; +// for(size_t i=0; i< delta_pdg_list.size(); ++i){ +// is_delta_map[delta_pdg_list[i]] = delta_names[i]; +// is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; +// } //Text print event? Depreciated at the moment. - if (m_print_out_event ){ - out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); - if (!out_stream.is_open()){ - std::cout<<"ERROR output file not open"<ClearMeta(); - this->ClearIsolation(); - this->ClearSecondShowers(); - this->ClearSecondShowers3D(); - this->ClearStubs(); - this->ClearFlashes(); - this->ClearTracks(); - this->ClearShowers(); - this->ClearMCTruths(); - this->ClearEventWeightBranches(); + ClearMeta(); + ClearIsolation(); + ClearSecondShowers(); + ClearSecondShowers3D(); + ClearStubs(); + ClearFlashes(); + ClearTracks(); + ClearShowers(); + ClearMCTruths(); + ClearEventWeightBranches(); fmcweight.clear(); - this->ClearGeant4Branches(); - this->ClearSlices(); + ClearGeant4Branches(); + ClearSlices(); Output_EventMeta( evt ); @@ -234,10 +801,10 @@ namespace single_photon } //Timing and TPC info - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - m_Cryostat = ID.Cryostat; - m_TPC = ID.TPC; +// auto const TPC = (*geom).begin_TPC(); +// auto ID = TPC.ID(); +// m_Cryostat = ID.Cryostat; +// m_TPC = ID.TPC; //use this in calculating dQdx _time2cm = sampling_rate(detClocks) / 1000.0 * theDetector.DriftVelocity( theDetector.Efield(), theDetector.Temperature() );//found in ProtoShowerPandora_tool.cc @@ -354,6 +921,7 @@ namespace single_photon pfp_w_bestnuID = DefineNuSlice(allPPFParticles); Output_PFParticleInfo( allPPFParticles); + ResizeSlices(m_reco_slice_num); //Slice to Hits std::map> > sliceIDToHitsMap; @@ -661,7 +1229,8 @@ namespace single_photon //Analize the CRT flashes and store them in the vertex_tree. //Found in analyze_OpFlashes.h - this->AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); + ResizeFlashes(flashVector.size()); + AnalyzeFlashes(flashVector, crthit_h, evt_timeGPS_nsec, crtvetoToFlashMap); //******************************* Common Optical Filter **************************************************************/ @@ -689,18 +1258,18 @@ namespace single_photon std::cout<<"\nSinglePhoton::analyze \t||\t Start on Track Analysis "<AnalyzeTracks( + AnalyzeTracks( allPPFParticles, tracks, // trackToNuPFParticleMap, pfParticleToHitsMap, pfParticleToSpacePointsMap, MCParticleToTrackIdMap, sliceIdToNuScoreMap // PFPToClearCosmicMap, PFPToSliceIdMap, PFPToTrackScoreMap, PFPToNuSliceMap,pfParticleMap ); - this->AnalyzeTrackCalo(tracks, allPPFParticles); + AnalyzeTrackCalo(tracks, allPPFParticles); //Run over PID? - if(m_use_PID_algorithms) this->CollectPID(tracks, allPPFParticles); + if(m_use_PID_algorithms) CollectPID(tracks, allPPFParticles); //******************************* Showers **************************************************************/ @@ -709,7 +1278,9 @@ namespace single_photon //found in analyze_Showers.h - this->AnalyzeShowers(allPPFParticles, showers, + m_reco_asso_showers=showers.size(); + ResizeShowers(m_reco_asso_showers); + AnalyzeShowers(allPPFParticles, showers, clusterToHitsMap, trigger_offset(detClocks), theDetector); @@ -760,7 +1331,7 @@ namespace single_photon std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); double tmo; - this->distToSCB(tmo,tmp_spt); + distToSCB(tmo,tmp_spt); m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); //This section runs for only 1 shower events for purpose of testing delta specifics @@ -813,11 +1384,11 @@ namespace single_photon //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"<AnalyzeGeant4(mcParticleVector); + AnalyzeGeant4(mcParticleVector); //Get the MCParticles (move to do this ourselves later) - this->CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); + CollectMCParticles(evt, m_geantModuleLabel, MCTruthToMCParticlesMap, MCParticleToMCTruthMap, MCParticleToTrackIdMap); //mcc9 march miniretreat fix @@ -837,16 +1408,21 @@ namespace single_photon //Important map, given a MCparticle, whats the "hits" associated - this->BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); + BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = recoMCmatching>( tracks, trackToMCParticleMap, trackToNuPFParticleMap, pfParticleToHitsMap, mcparticles_per_hit, matchedMCParticleVector); + std::vector trk_overlay_vec = trackRecoMCmatching( tracks, + trackToMCParticleMap, + trackToNuPFParticleMap, + pfParticleToHitsMap, + mcparticles_per_hit, + matchedMCParticleVector); std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"<showerRecoMCmatching( + showerRecoMCmatching( allPPFParticles, showers, showerToMCParticleMap, @@ -857,7 +1433,7 @@ namespace single_photon //photoNuclearTesting(matchedMCParticleVector); std::cout<<"\nSinglePhoton\t||\tStarting RecoMCTracks "<RecoMCTracks( + RecoMCTracks( allPPFParticles, tracks, trackToMCParticleMap, @@ -867,26 +1443,28 @@ namespace single_photon trk_overlay_vec); std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeMCTruths"<AnalyzeMCTruths(mcTruthVector, mcParticleVector); + + ResizeMCTruths(mcTruthVector[0]->NParticles());//assume only one MCTruth + AnalyzeMCTruths(mcTruthVector, mcParticleVector); if(!m_is_textgen){// if Text is in the generator label, skip it. wont contain any //This is important for rebuilding MCFlux and GTruth to do eventweight std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeEventWeight"<AnalyzeEventWeight(evt); + AnalyzeEventWeight(evt); std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeRecoMCSlices"<AnalyzeRecoMCSlices(m_truthmatching_signaldef,allPPFParticles, MCParticleToTrackIdMap, showerToMCParticleMap, trackToMCParticleMap); + AnalyzeRecoMCSlices(m_truthmatching_signaldef,allPPFParticles, MCParticleToTrackIdMap, showerToMCParticleMap, trackToMCParticleMap); std::cout<<"\nSinglePhoton\t||\tFinish AnalyzeRecoMCSlices"<IsolationStudy(allPPFParticles, tracks, showers, theDetector); + IsolationStudy(allPPFParticles, tracks, showers, theDetector); std::cout<<"\nSinglePhoton::analyze \t||\t Finish IsolationStudy "<IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); @@ -1003,7 +1581,7 @@ namespace single_photon //Solution: add MODULE_LIBRARIES in cmake; seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector); //Pass in any bad channels you like - sevd.setBadChannelList(bad_channel_list_fixed_mcc9); +// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); //Give it a vertex to center around sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); @@ -1067,7 +1645,7 @@ namespace single_photon auto& clu = vec_SEAclusters.at(c); //type: seaview::cluster int pl = clu.getPlane(); auto hitz = clu.getHits(); - double Ep = this->CalcEShowerPlane(hitz,pl); + double Ep = CalcEShowerPlane(hitz,pl); int remerge = clu.getShowerRemerge(); seaview::cluster_score * ssscorz = clu.getScore(); @@ -1128,7 +1706,7 @@ namespace single_photon m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); }else{ - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); + auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); m_trackstub_candidate_matched.push_back(ssmatched[0]); m_trackstub_candidate_pdg.push_back(ssmatched[1]); m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); @@ -1183,7 +1761,7 @@ namespace single_photon //Setup seaviewr object seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); //Pass in any bad channels you like - sevd.setBadChannelList(bad_channel_list_fixed_mcc9); +// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); //Give it a vertex to center around sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); @@ -1243,7 +1821,7 @@ namespace single_photon auto clu = vec_SEAclusters.at(c); //type: seaview::cluster int pl = clu.getPlane(); auto hitz = clu.getHits(); - double Ep = this->CalcEShowerPlane(hitz,pl); + double Ep = CalcEShowerPlane(hitz,pl); int remerge = clu.getShowerRemerge(); seaview::cluster_score * ssscorz = clu.getScore(); @@ -1298,7 +1876,7 @@ namespace single_photon m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); }else{ - auto ssmatched = this->SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); + auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); m_sss_candidate_matched.push_back(ssmatched[0]); m_sss_candidate_pdg.push_back(ssmatched[1]); m_sss_candidate_parent_pdg.push_back(ssmatched[2]); @@ -1345,11 +1923,11 @@ namespace single_photon std::cout<<"track pfp key : "<Self()<SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); + SecondShowerSearch3D(showers, showerToNuPFParticleMap, tracks,trackToNuPFParticleMap,evt); //And cluster the 2d and 3d second showers. Very simple TODO - this->SimpleSecondShowerCluster(); + SimpleSecondShowerCluster(); } @@ -1411,19 +1989,19 @@ namespace single_photon m_number_of_events_in_subrun=0; - this->CreateMetaBranches(); - this->CreateIsolationBranches(); - this->CreateSecondShowerBranches(); - this->CreateSecondShowerBranches3D(); - this->CreateStubBranches(); - this->CreateFlashBranches(); - this->CreateShowerBranches(); - this->CreateMCTruthBranches(); - this->CreateTrackBranches(); + CreateMetaBranches(); + CreateIsolationBranches(); + CreateSecondShowerBranches(); + CreateSecondShowerBranches3D(); + CreateStubBranches(); + CreateFlashBranches(); + CreateShowerBranches(); + CreateMCTruthBranches(); + CreateTrackBranches(); - this->CreateEventWeightBranches(); - this->CreateSliceBranches(); - this->CreateGeant4Branches(); + CreateEventWeightBranches(); + CreateSliceBranches(); + CreateGeant4Branches(); //------------------- List of Selected Events to run -------- @@ -1506,14 +2084,12 @@ namespace single_photon void SinglePhoton::endJob() { - if (m_print_out_event){ - out_stream.close(); - } +// if (m_print_out_event){ +// out_stream.close(); +// } pot_tree->Fill(); } - //----------------------------------------------------------------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------------------------------------------------------------- - - + DEFINE_ART_MODULE(SinglePhoton) } //namespace + diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h deleted file mode 100644 index dceb7f07c..000000000 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.h +++ /dev/null @@ -1,1903 +0,0 @@ -#ifndef SINGLE_PHOTON_ANALYSIS -#define SINGLE_PHOTON_ANALYSIS - -#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" - -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Core/EDFilter.h" -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" - -//KENG, should use these in sbndcode -//#include "art/Framework/Services/Optional/TFileService.h" -//#include "art/Framework/Services/Optional/TFileDirectory.h" -#include "art_root_io/TFileService.h" -#include "art_root_io/TFileDirectory.h" - -#include "lardataobj/RecoBase/PFParticleMetadata.h" -#include "lardataobj/RecoBase/PFParticle.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Track.h" -#include "lardataobj/RecoBase/Shower.h" -#include "lardataobj/RecoBase/Vertex.h" -#include "lardataobj/RecoBase/Cluster.h" -#include "lardataobj/RecoBase/Slice.h" -#include "lardataobj/RecoBase/Hit.h" -#include "lardataobj/RecoBase/SpacePoint.h" -#include "lardataobj/RecoBase/OpFlash.h" -//KENG -#include "sbnobj/Common/CRT/CRTHit.hh" -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/MCBase/MCShower.h" -#include "lardataobj/AnalysisBase/Calorimetry.h" -#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" -#include "lardataobj/AnalysisBase/ParticleID.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/GeneratedParticleInfo.h" - -#include "larsim/EventWeight/Base/MCEventWeight.h" - -#include "larevt/SpaceChargeServices/SpaceChargeService.h" - -#include "larcoreobj/SummaryData/POTSummary.h" - -#include "nusimdata/SimulationBase/MCParticle.h" -#include "nusimdata/SimulationBase/MCTruth.h" -#include "nusimdata/SimulationBase/simb.h" -#include "nusimdata/SimulationBase/MCFlux.h" -#include "nusimdata/SimulationBase/GTruth.h" -#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" - -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" - -#include "larcore/Geometry/Geometry.h" - -//#include "ubobj/RawData/DAQHeaderTimeUBooNE.h" - -#include "canvas/Utilities/ensurePointer.h" -#include "canvas/Persistency/Common/FindManyP.h" -#include "canvas/Persistency/Common/FindMany.h" -#include "canvas/Persistency/Common/FindOneP.h" -#include "canvas/Persistency/Common/FindOne.h" - -#include "fhiclcpp/ParameterSet.h" -#include "messagefacility/MessageLogger/MessageLogger.h" -#include "cetlib_except/exception.h" - -//#include "ubobj/Optical/UbooneOpticalFilter.h" - -// Helper function for PID stuff -//#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" - -#include "TCanvas.h" -#include "TTree.h" -#include "TFile.h" -#include "TGraph.h" -#include "TGraph2D.h" -#include "TGraphDelaunay.h" -#include "TRandom3.h" -#include "TGeoPolygon.h" - -//#include "Pandora/PdgTable.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "HelperFunctions/helper_math.h" -#include "HelperFunctions/helper_gadget.h" - -//#include "Libraries/bad_channel_matching.h" -#include "Libraries/DBSCAN.h" - -#include "SEAview/SEAviewer.h" - -//This is used to save some error messegae in fiducial_volume.h -#include "larcore/CoreUtils/ServiceUtil.h" - -//------------------------------------------------------------------------------------------------------------------------------------------ - -namespace single_photon -{ - - //Create a class based on PFParticle, connected to other Pandora objects - //this is for second_shower_search.h - struct sss_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; /* wire of hit that's closest to vertex */ - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; /* number of wires hits correspond to */ - int n_ticks; - - bool pass; - - sss_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of class sss_score - - //this works with SEAview/SEAviewer.h - class cluster { - - public: - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) - :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits) { - - std::cout<<"\n\n\nCHECK !! Do we need this?"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts,&wires[0],&ticks[0]); - f_graph = af_graph; - - }; - - // int getID() {return f_ID;} - // int getN() {return f_npts;} - // int getPlane(){ return f_plane;} - // TGraph * getGraph(){ return &f_graph;} - // std::vector> getHits(){return f_hits;} - // int setSSScore(sss_score & scorein){ f_SSScore = &scorein; return 0;} - // sss_score * getSSScore(){return f_SSScore;} - // private: - // - int f_ID; - int f_npts; - int f_plane; - std::vector> f_pts; - std::vector> f_hits; - TGraph f_graph; - // sss_score *f_SSScore; - }; // end of class cluster - - - - /** - * @brief SinglePhoton class - */ - class SinglePhoton : public art::EDFilter - { - public: - // name alias from pandora - typedef art::ValidHandle< std::vector > PFParticleHandle; - typedef std::vector< art::Ptr > PFParticleVector; - typedef std::vector< art::Ptr > TrackVector; - typedef std::vector< art::Ptr > ShowerVector; - typedef std::map< size_t, art::Ptr> PFParticleIdMap; - - /** - * @brief Constructor - * - * @param pset the set of input fhicl parameters - */ - SinglePhoton(fhicl::ParameterSet const &pset); - - /** - * @brief Configure memeber variables using FHiCL parameters - * - * @param pset the set of input fhicl parameters - */ - void reconfigure(fhicl::ParameterSet const &pset); - - /** - * @brief Analyze an event! - * - * @param evt the art event to analyze - */ - bool filter(art::Event &evt) override; - - /** - * @brief Begin the job, setting up ! - * - */ - void beginJob() override; - - /** - * @brief End the job, setting down ! - * - */ - void endJob() override; - /** - * @brief: grab run, subrun number, and subrun POT, fill the TTree */ - bool beginSubRun(art::SubRun& sr) override; - bool endSubRun(art::SubRun& sr) override; - - private: - /** - * @brief: reset/clear data members - */ - void ClearMeta(); - void CreateMetaBranches(); - - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ - void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; - - /** - * @brief Collect associated tracks and showers to particles in an input particle vector - * - * @param particles a vector holding PFParticles from which to find the associated tracks and showers - * @param pfParticleHandle the handle for the PFParticle collection - * @param evt the art event to analyze - * @param tracks a vector to hold the associated tracks - * @param showers a vector to hold the associated showers - */ - void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - /** - * @brief: analyze associated tracks/showers for an PFParticle - * @param: pParticle: PFParticle to be analyzed - * @param: associatedTracks: a vector of asso track for pParticle - * @param: associatedShowers: a vector of asso shower for pParticle - * @param: tracks: associated track will be added into tracks - * @param: showers: associated shower will be added into showers - * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle - */ - void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); - - - - //OUTPUT stuffs - void Output_EventMeta( art::Event &evt); - void Output_PFParticleInfo( std::vector all_PPFPs); - - - - double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ - /* - *@brief Calculated the shower energy by looping over all the hits and summing the charge - *@param hits - an art pointer of all the hits in a shower - * - */ - double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ - - /** - *@brief Takes a hit and multiplies the charge by the gain - *@param thishitptr art pointer to a hit - *@param plane the plane the hit is on - **/ - double GetQHit(art::Ptr thishitptr, int plane); - - - int getNHitsPlane(std::vector> hits, int this_plane); - double getMeanHitWidthPlane(std::vector> hits, int this_plane); - - - /** - * @brief Calculate the E value in MeV for a given hit - * @param thishit - an individual hit - * - * - * */ - - /** - * @brief Calculate the E value in MeV from a given Q value - * @param q - the charge value - * - * */ - double QtoEConversion(double q); - - - /** - *@brief Takes a vector of dQ/dx values and converts to dE/dx - *@param dqdx - vector of dqdx points - * - * */ - std::vector CalcdEdxFromdQdx(std::vector dqdx); - - /** - * - *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane - *@param shower - a Pandora shower - *@param clusters - all of the clusters in the shower - *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster - *@param plane - a single plane - * * */ - - std::vector CalcdQdxShower( - const art::Ptr& shower, - const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector); - /** - *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) - *@param shower_dir - the 3D shower direction - *@param plane - a single plane - * */ - double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ - - - /** - * - *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary - *uses triangle area check - * - * */ - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); - - - - //---------------- Templatees ---------------------------- - void AnalyzeTemplates(); - void ClearTemplates(); - void ResizeTemplates(size_t); - void CreateTemplateBranches(); - - //---------------- Potential Track Stub -------------------- - void ClearStubs(); - void CreateStubBranches(); - - /* @brief: given indices of clusters, determine if they overlap in time - * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters - * candidate_indices provided the indices of clusters of which we'd like to check the overlap - */ - std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information - * @brief: candidate clusters on different plane that overlap in time tick will be grouped together - * @return: return.first -> number of possible matches - * return.second.first -> 2D vector, indices of clusters in every possible match - * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match - */ - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - - - - //---------------- SecondShower---- - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ - - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ - - void SimpleSecondShowerCluster(); - - - void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); - - - - /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits - * and return a vector of 7 elements: - * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} - */ - std::vectorSecondShowerMatching(std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - // std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - - - /* analyze a cluster of hits, and return corresponding sss_score */ - sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); - - /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits - * This function is currently used in function 'SecondShowerSearch' - * @parameter: plane, cluster are not in use - * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire - */ - TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); - - - /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ - int CompareToShowers(int,int,std::vector>& hitz,double,double, - const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); - //---------------- Isolation ----------------- - - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ - - /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ - void IsolationStudy( - std::vector all_PPFPs, - const std::vector>& tracks, - // std::map, art::Ptr> & trackToPFParticleMap, - const std::vector>& showers, - // std::map, art::Ptr> & showerToPFParticleMap, - // const std::map, std::vector> > & pfParticleToHitsMap, - // const std::map, int> & pfParticleToSliceIDMap, - // const std::map>>& sliceIDToHitsMap, - detinfo::DetectorPropertiesData const & theDetector); - - - - //---------------- Flashes ---------------------------- - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); - - - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ - - //---------------- Tracks ---------------------------- - /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ - void AnalyzeTracks( - std::vector all_PPFPs, - const std::vector>& tracks, - // std::map, art::Ptr> & tracktopfparticlemap, - // std::map, std::vector>> & pfParticleToHitsMap, - std::map, std::vector>> & pfparticletospacepointmap , - std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap - // std::map,bool> &PFPToClearCosmicMap, - // std::map, int>& PFPToSliceIdMap, - // std::map,double> &PFPToTrackScoreMap, - // std::map,bool> &PFPToNuSliceMap, - // PFParticleIdMap &pfParticleMap - ); - - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ - void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); - - - //(std::map, std::vector>> &trackToCaloMap); - - - /* @brief: analyze MCParticle related to recob::Track if it has one - * variables starting with 'm_sim_track_' will be updated - * */ - void RecoMCTracks( - std::vector all_PPFPs, - const std::vector>& tracks, - //std::map,art::Ptr> & trackToPFParticleMap, - std::map, art::Ptr > & trackToMCParticleMap, - std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, - std::vector> & mcParticleVector, - std::map< int, art::Ptr > & MCParticleToTrackIdMap, - //std::map& sliceIdToNuScoreMap, - //std::map,bool>& PFPToClearCosmicMap, - //std::map, int>& PFPToSliceIdMap, - std::vector& vec); - - - /* collect information from anab::sParticleIDAlgScores of reco track */ - void CollectPID(std::vector> & tracks, std::vector all_PPFPs); - //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); - TGraph proton_length2energy_tgraph; - - //---------------- Showers ---------------------------- - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - - void AnalyzeShowers( - std::vector all_PPFPs, - const std::vector>& showers, - // std::map,art::Ptr> & showerToPFParticleMap, - // std::map, std::vector>> & pfParticleToHitMap, - // std::map, std::vector> > & pfParticleToClusterMap, - std::map, std::vector> > & clusterToHitMap , - // std::map& sliceIdToNuScoreMap, - // std::map,bool>& PFPToClearCosmicMap, - // std::map, int>& PFPToSliceIdMap, - // std::map,bool> &PFPToNuSliceMap, - // std::map,double> &PFPToTrackScoreMap, - // PFParticleIdMap &pfParticleMap, - // std::map, art::Ptr>& PFPtoShowerReco3DMap, - double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ); - - void AnalyzeKalmanShowers( - const std::vector>& showers, - std::map,art::Ptr> &showerToPFParticleMap, - std::map,art::Ptr> & pfParticlesToShowerKalmanMap, - std::map,std::vector>>& kalmanTrackToCaloMap, - std::map, std::vector>> & pfParticleToHitMap, - detinfo::DetectorPropertiesData const & theDetector); - - /** - * @brief: match showers to MCParticles - * @arguments filled during function execution: - * mcParticleVector: vector of mother particles of showers - * objectToMCParticleMap: map of shower to its mother particle - */ - void showerRecoMCmatching( - std::vector all_PPFPs, - std::vector>& objectVector, - std::map,art::Ptr>& objectToMCParticleMap, - //std::map,art::Ptr>& objectToPFParticleMap, - //std::map, std::vector> >& pfParticleToHitsMap, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - //std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); - //(std::map & sliceIdToNuScoreMap, - //std::map,bool>& PFPToClearCosmicMap, - //std::map, int>& PFPToSliceIdMap, - //std::map,bool>& PFPToNuSliceMap); - - - /* tranverse through mcParticleVector, and print out infos for photons */ - int photoNuclearTesting(std::vector>& mcParticleVector); - - //KENG Geometry dimensions; Fiducial volume and SCB (no SCB yet?) - std::vector> fTPCVolumes; - std::vector fActiveVolumes; - double m_tpc_active_XMin; - double m_tpc_active_YMin; - double m_tpc_active_ZMin; - double m_tpc_active_XMax; - double m_tpc_active_YMax; - double m_tpc_active_ZMax; - - int setTPCGeom(); - int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ - double distToTPCActive(std::vector&vec); - double distToCPA(std::vector&vec); - int distToSCB(double & dist, std::vector &vec); - /* if point in active TPC, returns distance from point to closest TPC wall - * otherwise, returns -999 */ - - - // ------------ Fid Volume and SCB------------------------- // - //CHECK, no SCB stuff yet; - // double m_tpc_active_x_low; - // double m_tpc_active_x_high; - // double m_tpc_active_y_low; - // double m_tpc_active_y_high; - // double m_tpc_active_z_low ; - // double m_tpc_active_z_high; - // - // double m_SCB_YX_TOP_y1_array; - // std::vector m_SCB_YX_TOP_x1_array; - // std::vector m_SCB_YX_TOP_y2_array; - // double m_SCB_YX_TOP_x2_array; - // double m_SCB_YX_BOT_y1_array; - // std::vector m_SCB_YX_BOT_x1_array; - // std::vector m_SCB_YX_BOT_y2_array; - // double m_SCB_YX_BOT_x2_array; - // - // double m_SCB_ZX_Up_z1_array ; - // double m_SCB_ZX_Up_x1_array ; - // double m_SCB_ZX_Up_z2_array ; - // double m_SCB_ZX_Up_x2_array ; - // - // double m_SCB_ZX_Dw_z1_array; - // std::vector m_SCB_ZX_Dw_x1_array; - // std::vector m_SCB_ZX_Dw_z2_array; - // double m_SCB_ZX_Dw_x2_array; - - - //Fiducial stuff? - // int isInSCB(std::vector&); /* if point is inside SCB */ - // int isInSCB(double cut,std::vector&); - /* calc the minimum distance from point to the SC boundary,save to dist. - * return value (0, or 1) indicates whether the point is in SCB */ - - //---------------- MCTruths ---------------------------- - - /** - * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) - */ - void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); - - std::map is_delta_map; - - //---------------- EventWeight ---------------------------- - - /** - * @brief: fill event weight related variables */ - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ - - //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. - - - //---------------- Geant4 ---------------------------- - - /** - * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); - - - - - - /** - * @brief: given an event and a label, collect all the SimChannel with that label - * @ param: simChannelVector: a vector of SimChannel [to be filled] - */ - void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); - - /** - * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use - * @param: evt: event, label: given label - * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] - * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] - * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] - */ - void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); - void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); - - - //-------------- Slices/Pandora Metadata ---------------// - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - - - /** - * brief: analyze metadata of PFParticles, and fill in all these maps - * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap - * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby - */ - void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, - PFParticleIdMap &pfParticleMap, - std::vector,int>> & primaryPFPSliceIdVec, - std::map & sliceIdToNuScoreMap, - std::map,bool>& PFPToClearCosmicMap, - std::map, int>& PFPToSliceIdMap, - std::map,bool>& PFPToNuSliceMap, - std::map,double>& PFPToTrackScoreMap); - - // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumPFPsMap ); - - std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ - - - - /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ - std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - std::map, int>& PFPToSliceIdMap ); - // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, - // std::map, int>& PFPToSliceIdMap, - // std::map& sliceIdToNumShowersMap ); - - - /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ - std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, - std::map, int>& PFPToSliceIdMap); - - /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info - * to determine how many eligible tracks and showers there are in the event - */ - void AnalyzeRecoMCSlices( - std::string signal_def, - std::vector all_PPFPs, - std::map> & MCParticleToTrackIDMap, - // std::map,art::Ptr > & showerToPFParticleMap, - // std::vector,int>> & allPFPSliceIdVec, - std::map, art::Ptr > & showerToMCParticleMap, - // std::map,art::Ptr > & trackToNuPFParticleMap, - std::map, art::Ptr > &trackToMCParticleMap); - // ,std::map, int>& PFPToSliceIdMap); - - - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - //------- matched shower ------------------------------------- - - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - - - - //------------------ Delaunay triangle tools -----------// - - double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ - int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found - * and total area of these triangles, - * save to num_triangles & area */ - int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ - - // given a MCParticle, get its corrected vertex - //CHECK can merge three in one? - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); - int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); - // given a particle, and input location calculate its corrected true position, so we can compare it to reco - int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); - - //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 - std::vector> bad_channel_list_fixed_mcc9; - std::map bad_channel_map_fixed_mcc9; - - - /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ - bool IsEventInList(int run, int subrun, int event); - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - // std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - // std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - // std::string m_badChannelLabel; - // std::string m_badChannelProducer; - // std::string m_mcTrackLabel; - // std::string m_mcShowerLabel; - - - - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer;//"daq" - std::ofstream out_stream; - - //SSS parameters - double m_max_conv_dist; - double m_mass_pi0_mev; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - //Keng, DetectorClocks now is declared in each event - // detinfo::DetectorProperties const * theDetector;// = lar::providerFrom(); - // detinfo::DetectorClocks const * detClocks ;//= lar::providerFrom(); - spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - - int m_Cryostat; - int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - - bool bool_make_sss_plots; - - - //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - double m_reco_vertex_dist_to_CPA; - - - int m_reco_asso_showers; - - double m_reco_vertex_to_nearest_dead_wire_plane0; - double m_reco_vertex_to_nearest_dead_wire_plane1; - double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - int m_reco_num_templates; - std::vector m_reco_template; /* temp comment: does not seem to be used */ - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - - double m_CRT_dt; //time between flash and nearest CRT hit - - //------------ Track related Variables ------------- - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_CPA; - std::vector m_reco_track_start_dist_to_CPA; - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - // ---- corresponding variables on the best plane of reco track, which is defined as such------ - // if plane 2 have good hits, then plane 2 is the best-plane - // otherwise, which plane of plane 0 and 1 has more good hits will be best plane - // if none of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - - std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ - std::vector m_reco_track_end_to_nearest_dead_wire_plane1; - std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - /* event origin types: - * kUnknown: ??? - * kBeamNeutrino: Beam neutrinos. - * kCosmicRay: Cosmic rays. - * kSuperNovaNeutrino: Supernova neutrinos. - * kSingleParticle: single particles thrown at the detector - */ - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - * if there is no shower hits, set to 999 - * if there is shower hits but no track hits, set to -999 - */ - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - * set to -999 if there is no unassociated hits or track hits on plane - */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - * on each plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - - /*-------------------------------------------------------------------------------------*/ - - //------------ Shower related Variables ------------- - - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - - std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ - std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; - std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - //end flash matching - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - - - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - - - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - * plane 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - - - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - - double m_mctruth_leading_exiting_proton_energy; - - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - - - int m_mctruth_num_reconstructable_protons; - - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - * close enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - - - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - - - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - - double _time2cm;//value modeled from David's shower code - - // PID-related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - //Geant4 - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; - - - - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - bool Pi0PreselectionFilter(); /* returns whether the event pass pi0 pre-selection for 2g1p */ - bool Pi0PreselectionFilter2g0p(); /* returns whether the event pass pre-selction for 2g0p */ - - int pfp_w_bestnuID; - }; - - DEFINE_ART_MODULE(SinglePhoton) - -} // namespace lar_pandora -#endif From 60a28988a3c5df9d963df36de280ccf4af69c3ab Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 21 Jul 2022 18:25:14 -0500 Subject: [PATCH 41/54] all headers with functions are equiped with sources --- sbncode/SinglePhotonAnalysis/CMakeLists.txt | 2 +- .../helper_PandoraPFParticles.h | 1 - .../HelperFunctions/helper_math.cxx | 222 +++++++++++++++ .../HelperFunctions/helper_math.h | 255 +++--------------- .../Libraries/CMakeLists.txt | 2 +- .../NCRadiativeResonant_module.cc | 6 +- .../SinglePhoton_module.cc | 17 +- 7 files changed, 276 insertions(+), 229 deletions(-) create mode 100644 sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index 8bdf8d33f..0b8bed53c 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -36,11 +36,11 @@ art_make( BASENAME_ONLY ${ROOT_CORE} ${ART_ROOT_IO_TFILE_SUPPORT} MODULE_LIBRARIES - sbncode_SinglePhotonAnalysis_HelperFunctions sbncode_SinglePhotonAnalysis_Libraries ${ART_ROOT_IO_TFILESERVICE_SERVICE} sbncode_SinglePhotonAnalysis_SEAview ) + cet_find_library( IFDH NAMES ifdh PATHS ENV IFDHC_LIB NO_DEFAULT_PATH ) include_directories( $ENV{SRPROXY_INC} ) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h index 672ecda04..2d341febd 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h @@ -1,7 +1,6 @@ #ifndef HELPER_PANDORAPFPARTICLES_H #define HELPER_PANDORAPFPARTICLES_H - #include "art/Framework/Principal/Handle.h" #include "art/Framework/Services/Registry/ServiceHandle.h" diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx new file mode 100644 index 000000000..69bc22162 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx @@ -0,0 +1,222 @@ +#include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" + +namespace single_photon +{ + //-----------------HELPER FUNCTIONS ----------- + ////line between x1 and x2, point x0; + double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ + double x1 =X1.at(0); + double y1 =X1.at(1); + double z1 =X1.at(2); + + double x2 =X2.at(0); + double y2 =X2.at(1); + double z2 =X2.at(2); + + double x0 =point.at(0); + double y0 =point.at(1); + double z0 =point.at(2); + + double x10 = x1-x0; + double y10 = y1-y0; + double z10 = z1-z0; + + double x21 = x2-x1; + double y21 = y2-y1; + double z21 = z2-z1; + + double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); + + // right, but can be simplified + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); + + return sqrt(d2); + } + + + //--------------- end of copying from bad_channel_matching.h + + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ + + std::vector vert = {x,y,z}; + std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; + std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; + + return dist_line_point(start, abit, vert); + + } + + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->ShowerStart().X()-vx; + double s1y = s1->ShowerStart().Y()-vy; + double s1z = s1->ShowerStart().Z()-vz; + double norm1 = std::hypot(s1x,s1y,s1z); + s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) + s1y = s1y/norm1; + s1z = s1z/norm1; + + double s2x = s2->ShowerStart().X()-vx; + double s2y = s2->ShowerStart().Y()-vy; + double s2z = s2->ShowerStart().Z()-vz; + double norm2 = std::hypot(s2x,s2y,s2z); + s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) + s2y = s2y/norm2; + s2z = s2z/norm2; + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + + } + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ + + double s1x = s1->Direction().X(); + double s1y = s1->Direction().Y(); + double s1z = s1->Direction().Z(); + + double s2x = s2->Direction().X(); + double s2y = s2->Direction().Y(); + double s2z = s2->Direction().Z(); + + return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); + + } + + + + + + + /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + TVector3 getWireVec(int plane){ + TVector3 wire_dir; + if (plane == 0){ + wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; + } else if (plane == 1){ + wire_dir = {0., sqrt(3) / 2., 1 / 2.}; + } else if (plane == 2) { + wire_dir = {0., 0., 1.}; + } + return wire_dir; + } + + + /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + double getAnglewrtWires(TVector3 shower_dir,int plane){ + + TVector3 wire_dir = getWireVec(plane); + double cos_theta = getCoswrtWires(shower_dir, wire_dir); + + double theta = acos(cos_theta); + // return abs(theta); + return abs(M_PI/2 - theta); + + } + + + double getMedian(std::vector thisvector){ + size_t len = thisvector.size(); + if(len < 1) return NAN; + + std::sort(thisvector.begin(), thisvector.end()); + if(len % 2 != 0){//even - return average of two at median + return 0.5*(thisvector[len/2]+thisvector[len/2+1]); + }else{//odd - return the median + return thisvector[len/2]; + } + } + + /* returns (generally) best median dEdx of all 3 + * planes, usually plane 2 */ + double getAmalgamateddEdx( + double angle_wrt_plane0, + double angle_wrt_plane1, + double angle_wrt_plane2, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ + //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 + if(angle_wrt_plane2< degToRad(10)){ + //if it's too close to the wires on either of the planes, then stick with plane 2 + if (angle_wrt_plane1> degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ + //but if it's outside of the range on plane 1, choose that + if(angle_wrt_plane1> angle_wrt_plane0){ + return median_plane1; + } else{ + return median_plane0; + } + } + } + if (plane2_nhits< 2){ + if (plane1_nhits >=2 ){ + return median_plane1; + } else if (plane0_nhits >=2 ){ + return median_plane0; + } + } + return median_plane2; + } + + /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ + int getAmalgamateddEdxNHits( + double amalgamateddEdx, + double median_plane0, + double median_plane1, + double median_plane2, + int plane0_nhits, + int plane1_nhits, + int plane2_nhits){ + if (amalgamateddEdx == median_plane0){ + return plane0_nhits; + } + if (amalgamateddEdx == median_plane1){ + return plane1_nhits; + } + if (amalgamateddEdx == median_plane2){ + return plane2_nhits; + } + return -999; + } + + + /** + *@brief Calculates the four corners of a rectangle of given length and width around a cluster given the start point and axis direction + *@param cluster_start - the start position of a cluster in CM + *@param cluster_axis - calculated from the cluster end minus the cluster start + *@param width - typically ~1cm + *@param length - typically a few cm + * + * */ + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ + std::vector> corners; + + //get the axis perpedicular to the cluster axis + double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; + + //create a vector for each corner of the rectangle on the plane + //c1 = bottom left corner + std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; + //c2 = top left corner + std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; + //c3 = bottom right corner + std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; + //c4 = top right corner + std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; + + //save each of the vectors + corners.push_back(c1); + corners.push_back(c2); + corners.push_back(c4); + corners.push_back(c3); + return corners; + } + +} diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h index 46762d7a4..220d8d594 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -1,128 +1,23 @@ #ifndef SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H #define SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H -#include - -namespace single_photon -{ - //-----------------HELPER FUNCTIONS ----------- - ////line between x1 and x2, point x0; - inline double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point){ - double x1 =X1.at(0); - double y1 =X1.at(1); - double z1 =X1.at(2); - - double x2 =X2.at(0); - double y2 =X2.at(1); - double z2 =X2.at(2); - - double x0 =point.at(0); - double y0 =point.at(1); - double z0 =point.at(2); - - double x10 = x1-x0; - double y10 = y1-y0; - double z10 = z1-z0; +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" - double x21 = x2-x1; - double y21 = y2-y1; - double z21 = z2-z1; - - double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - - // right, but can be simplified - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); - - return sqrt(d2); - } - - // minimum distance between point and dead wire - // double distanceToNearestDeadWire(int plane, double Ypoint, double Zpoint, - // const geo::GeometryCore * geom, - // std::vector> & bad_channel_list_fixed_mcc9 ){ - // - // double min_dist = 999999; - // - // for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ - // int channel = bad_channel_list_fixed_mcc9[i].first; - // int is_ok = bad_channel_list_fixed_mcc9[i].second; - // if(is_ok>1)continue; - // - // auto wireids = geom->ChannelToWire(channel); //type of wireids: IDs of all the connected wires to the channel - // auto result = geom->WireEndPoints(wireids[0]); - // - // //std::cout<<"KNK: "< start = {0.0,result.start().Y(),result.start().Z()}; - // std::vector end = {0.0,result.end().Y(),result.end().Z()}; - // std::vector point = {0.0,Ypoint,Zpoint}; - // double dist = dist_line_point(start,end,point); - // min_dist = std::min(dist,min_dist); - // } - // - // return min_dist; - // - // } - - //--------------- end of copying from bad_channel_matching.h - - inline double impact_paramater_shr(double x, double y, double z, art::Ptr & shr){ - - std::vector vert = {x,y,z}; - std::vector start = {shr->ShowerStart().X(), shr->ShowerStart().Y(),shr->ShowerStart().Z()}; - std::vector abit = {shr->ShowerStart().X() + shr->Direction().X(), shr->ShowerStart().Y()+shr->Direction().Y(), shr->ShowerStart().Z()+shr->Direction().Z()}; - - return dist_line_point(start, abit, vert); - - } - - // invariant mass of a particle that decays to two showers - inline double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->ShowerStart().X()-vx; - double s1y = s1->ShowerStart().Y()-vy; - double s1z = s1->ShowerStart().Z()-vz; - double norm1 = std::hypot(s1x,s1y,s1z); - s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) - s1y = s1y/norm1; - s1z = s1z/norm1; - - double s2x = s2->ShowerStart().X()-vx; - double s2y = s2->ShowerStart().Y()-vy; - double s2z = s2->ShowerStart().Z()-vz; - double norm2 = std::hypot(s2x,s2y,s2z); - s2x = s2x/norm2; // unit vector pointing to shower start from point (vx, vy, vz) - s2y = s2y/norm2; - s2z = s2z/norm2; - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - - } - - // invariant mass of two showers, calculated directly from shower directions - inline double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2){ - - double s1x = s1->Direction().X(); - double s1y = s1->Direction().Y(); - double s1z = s1->Direction().Z(); - - double s2x = s2->Direction().X(); - double s2y = s2->Direction().Y(); - double s2z = s2->Direction().Z(); - - return sqrt(2.0*E1*E2*(1.0-(s1x*s2x+s1y*s2y+s1z*s2z))); - - } +#include "lardataobj/RecoBase/Shower.h" +#include "larcore/Geometry/Geometry.h" +#include "canvas/Utilities/ensurePointer.h" +#include +#include +namespace single_photon +{ + //templates // sort indices in descending order template - inline std::vector sort_indexes(const std::vector &v) { + std::vector sort_indexes(const std::vector &v){ std::vector idx(v.size()); std::iota(idx.begin(), idx.end(), 0); @@ -135,7 +30,7 @@ namespace single_photon // sort indices such that elements in v are in ascending order template - inline std::vector sort_indexes_rev(const std::vector &v) { + std::vector sort_indexes_rev(const std::vector &v) { std::vector idx(v.size()); std::iota(idx.begin(), idx.end(), 0); @@ -146,72 +41,60 @@ namespace single_photon return idx; } - // check if two vectors have same elements (regardless of the order), and arrange their elements in order template - inline bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) + bool marks_compare_vec_nonsense(std::vector& v1, std::vector& v2) { std::sort(v1.begin(), v1.end()); std::sort(v2.begin(), v2.end()); return v1 == v2; } - - +//inline functions inline double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); return wire; } - /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - inline TVector3 getWireVec(int plane){ - TVector3 wire_dir; - if (plane == 0){ - wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; - } else if (plane == 1){ - wire_dir = {0., sqrt(3) / 2., 1 / 2.}; - } else if (plane == 2) { - wire_dir = {0., 0., 1.}; - } - return wire_dir; - } /* dot product of wire_dir and shower direction vectors */ inline double getCoswrtWires(TVector3 shower_dir, TVector3 wire_dir){ return wire_dir.Dot(shower_dir); } + inline double degToRad(double deg){ return deg * M_PI/180; } + inline double radToDeg(double rad){ return rad * 180/M_PI; } - /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - inline double getAnglewrtWires(TVector3 shower_dir,int plane){ - TVector3 wire_dir = getWireVec(plane); - double cos_theta = getCoswrtWires(shower_dir, wire_dir); - double theta = acos(cos_theta); - // return abs(theta); - return abs(M_PI/2 - theta); + //-----------------HELPER FUNCTIONS ----------- + ////line between x1 and x2, point x0; + double dist_line_point( std::vector&X1, std::vector& X2, std::vector& point); - } + double impact_paramater_shr(double x, double y, double z, art::Ptr & shr); - inline double degToRad(double deg){ return deg * M_PI/180; } - inline double radToDeg(double rad){ return rad * 180/M_PI; } + // invariant mass of a particle that decays to two showers + double implied_invar_mass(double vx, double vy, double vz, art::Ptr & s1, double E1, art::Ptr &s2, double E2); + + // invariant mass of two showers, calculated directly from shower directions + double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2); - inline double getMedian(std::vector thisvector){ - size_t len = thisvector.size(); - if(len < 1) return NAN; - std::sort(thisvector.begin(), thisvector.end()); - if(len % 2 != 0){//even - return average of two at median - return 0.5*(thisvector[len/2]+thisvector[len/2+1]); - }else{//odd - return the median - return thisvector[len/2]; - } - } + + + + /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ + TVector3 getWireVec(int plane); + + + /* returns angles between wire direction of plane and shower_dir) + * shower_dir needs to be unit vector */ + double getAnglewrtWires(TVector3 shower_dir,int plane); + + double getMedian(std::vector thisvector); /* returns (generally) best median dEdx of all 3 * planes, usually plane 2 */ - inline double getAmalgamateddEdx( + double getAmalgamateddEdx( double angle_wrt_plane0, double angle_wrt_plane1, double angle_wrt_plane2, @@ -220,49 +103,17 @@ namespace single_photon double median_plane2, int plane0_nhits, int plane1_nhits, - int plane2_nhits){ - //if the shower is within 10 degrees of the wires on plane 2, consider planes 1 and 0 - if(angle_wrt_plane2< degToRad(10)){ - //if it's too close to the wires on either of the planes, then stick with plane 2 - if (angle_wrt_plane1> degToRad(20)|| angle_wrt_plane0>degToRad(20) ){ - //but if it's outside of the range on plane 1, choose that - if(angle_wrt_plane1> angle_wrt_plane0){ - return median_plane1; - } else{ - return median_plane0; - } - } - } - if (plane2_nhits< 2){ - if (plane1_nhits >=2 ){ - return median_plane1; - } else if (plane0_nhits >=2 ){ - return median_plane0; - } - } - return median_plane2; - } + int plane2_nhits); /* returns the number of hits on the plane picked by function getAmalgamateddEdx */ - inline int getAmalgamateddEdxNHits( + int getAmalgamateddEdxNHits( double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, - int plane2_nhits){ - if (amalgamateddEdx == median_plane0){ - return plane0_nhits; - } - if (amalgamateddEdx == median_plane1){ - return plane1_nhits; - } - if (amalgamateddEdx == median_plane2){ - return plane2_nhits; - } - return -999; - } + int plane2_nhits); /** @@ -273,29 +124,7 @@ namespace single_photon *@param length - typically a few cm * * */ - inline std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length){ - std::vector> corners; - - //get the axis perpedicular to the cluster axis - double perp_axis[2] = {-cluster_axis[1], cluster_axis[0]}; - - //create a vector for each corner of the rectangle on the plane - //c1 = bottom left corner - std::vector c1 = {cluster_start[0] + perp_axis[0] * width / 2, cluster_start[1] + perp_axis[1] * width / 2}; - //c2 = top left corner - std::vector c2 = {c1[0] + cluster_axis[0] * length, c1[1] + cluster_axis[1] * length}; - //c3 = bottom right corner - std::vector c3 = {cluster_start[0] - perp_axis[0] * width / 2, cluster_start[1] - perp_axis[1] * width / 2}; - //c4 = top right corner - std::vector c4 ={c3[0] + cluster_axis[0] * length, c3[1] + cluster_axis[1] * length}; - - //save each of the vectors - corners.push_back(c1); - corners.push_back(c2); - corners.push_back(c4); - corners.push_back(c3); - return corners; - } + std::vector> buildRectangle(std::vector cluster_start, std::vector cluster_axis, double width, double length); } #endif // SBNCODE_SINGLEPHOTONANALYSIS_HELPER_MATH_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt index 446c4e4fb..92c3f4b6e 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/Libraries/CMakeLists.txt @@ -3,6 +3,7 @@ FILE( GLOB local_src_libs *.cxx ) art_make_library( LIBRARY_NAME sbncode_SinglePhotonAnalysis_Libraries SOURCE ${local_src_libs} LIBRARIES + sbncode_SinglePhotonAnalysis_HelperFunctions larcorealg_Geometry larcore_Geometry_Geometry_service lardata_Utilities @@ -36,7 +37,6 @@ art_make_library( LIBRARY_NAME sbncode_SinglePhotonAnalysis_Libraries ${ROOT_GEOM} ${ROOT_CORE} ${ART_ROOT_IO_TFILE_SUPPORT} - sbncode_SinglePhotonAnalysis_HelperFunctions ) cet_find_library( IFDH NAMES ifdh PATHS ENV IFDHC_LIB NO_DEFAULT_PATH ) diff --git a/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc index 2cba9eb13..9e46ade60 100644 --- a/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc +++ b/sbncode/SinglePhotonAnalysis/NCRadiativeResonant_module.cc @@ -181,13 +181,13 @@ bool NCRadiativeResonant::filter(art::Event & e) { std::vector exiting_photon_parents; for(int jth = 0; jth < mct.NParticles(); ++jth) {//loop through MCParticles simb::MCParticle const & mcp = mct.GetParticle(jth); - + //CHEKC hardcode, TPC filter: if(abs(mcp.Vx())>210 || abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){ std::cout<<"OUTSIDE TPC x y z ="< in_nucleus_photons; for(size_t const s : exiting_photon_parents) { diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 19f7c277e..1adddb59b 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -20,8 +20,6 @@ #include "lardataobj/RecoBase/Hit.h" #include "lardataobj/RecoBase/SpacePoint.h" #include "lardataobj/RecoBase/OpFlash.h" -//KENG -#include "sbnobj/Common/CRT/CRTHit.hh" #include "lardataobj/MCBase/MCTrack.h" #include "lardataobj/MCBase/MCShower.h" #include "lardataobj/AnalysisBase/Calorimetry.h" @@ -30,10 +28,12 @@ #include "lardataobj/Simulation/SimChannel.h" #include "lardataobj/Simulation/GeneratedParticleInfo.h" -#include "larsim/EventWeight/Base/MCEventWeight.h" +#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "larsim/EventWeight/Base/MCEventWeight.h" #include "larevt/SpaceChargeServices/SpaceChargeService.h" - #include "larcoreobj/SummaryData/POTSummary.h" #include "nusimdata/SimulationBase/MCParticle.h" @@ -42,9 +42,6 @@ #include "nusimdata/SimulationBase/MCFlux.h" #include "nusimdata/SimulationBase/GTruth.h" -#include "lardata/DetectorInfoServices/DetectorPropertiesService.h" -#include "lardata/DetectorInfoServices/LArPropertiesService.h" -#include "lardata/DetectorInfoServices/DetectorClocksService.h" #include "larcore/Geometry/Geometry.h" @@ -63,6 +60,8 @@ // Helper function for PID stuff //#include "ubana/ParticleID/Algorithms/uB_PlaneIDBitsetHelperFunctions.h" +#include "sbnobj/Common/CRT/CRTHit.hh" + #include "TCanvas.h" #include "TTree.h" #include "TFile.h" @@ -86,8 +85,6 @@ #include #include -#include "SEAview/SEAviewer.h" - #include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_gadget.h" #include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" #include "sbncode/SinglePhotonAnalysis/Libraries/init_branches.h" @@ -98,7 +95,7 @@ #include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" #include "sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h" #include "sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h" - +#include "sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h" namespace single_photon { From f830e1ac6f1dc13b2e422200f51ba1b475139687 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 21 Jul 2022 18:41:41 -0500 Subject: [PATCH 42/54] remove tabs in codes --- .../SinglePhotonAnalysis/Libraries/DBSCAN.h | 188 +- .../Libraries/analyze_MC.cxx | 1384 +++++----- .../Libraries/analyze_PandoraReco.cxx | 4 +- .../Libraries/init_branches.h | 2276 ++++++++--------- .../SEAview/CMakeLists.txt | 4 +- .../SinglePhotonAnalysis/SEAview/SEAviewer.cc | 2080 +++++++-------- .../SinglePhotonAnalysis/SEAview/SEAviewer.h | 660 ++--- .../SinglePhotonAnalysis/SEAview/seaDBSCAN.h | 194 +- 8 files changed, 3395 insertions(+), 3395 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h b/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h index d9a83488b..08373b920 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h @@ -21,128 +21,128 @@ class DBSCAN{ - public: - double m_eps; - int m_minpts; - - /// constructor - DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - - /// Default destructor - // Guanqun: probably not needed - ~DBSCAN(){} - - // scan over points, and group them into different clusters - std::vector Scan2D(std::vector> &pts); - // grab neighbours of point i. - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - // merge neighbours in seed and pts together into seed - int UnionSets(std::vector> &seed, std::vector> &pts); + public: + double m_eps; + int m_minpts; + + /// constructor + DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + + /// Default destructor + // Guanqun: probably not needed + ~DBSCAN(){} + + // scan over points, and group them into different clusters + std::vector Scan2D(std::vector> &pts); + // grab neighbours of point i. + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // merge neighbours in seed and pts together into seed + int UnionSets(std::vector> &seed, std::vector> &pts); }; std::vector DBSCAN::Scan2D(std::vector> &pts){ - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - this->UnionSets(seed_set, new_neighbours); - } - } + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; } std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB - //VERY simple, will update soon to a DB + for(size_t ip=0; ip p = pts[ip]; - for(size_t ip=0; ip p = pts[ip]; - - double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); + double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } - } } - return neighbours; + } + return neighbours; } int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - //VERY simple, will update soon if it works - for(auto &p:pts){ + //VERY simple, will update soon if it works + for(auto &p:pts){ - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + if(is_in == false){ + seed.push_back(p); } + } + - return 0; + return 0; } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx index 45a232f5f..39eb724b6 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx @@ -7,7 +7,7 @@ namespace single_photon { -//analyze_Geant4.h + //analyze_Geant4.h void AnalyzeGeant4( const std::vector> &mcParticleVector){ @@ -56,7 +56,7 @@ namespace single_photon } -//analyze_EventWeight.h + //analyze_EventWeight.h void AnalyzeEventWeight(art::Event const & e){ art::Handle< std::vector > mcFluxHandle; @@ -68,7 +68,7 @@ namespace single_photon std::cout << ">> No MCFlux information" << std::endl; return; } - + art::Handle< std::vector > mcTruthHandle; e.getByLabel("generator", mcTruthHandle); if (!mcTruthHandle.isValid()) return; @@ -78,7 +78,7 @@ namespace single_photon std::cout << ">> No MCTruth information" << std::endl; return; } - + art::Handle< std::vector< simb::GTruth > > gTruthHandle; e.getByLabel("generator", gTruthHandle); if (!gTruthHandle.isValid()) return; @@ -89,753 +89,753 @@ namespace single_photon return; } - const art::Ptr mcFlux = mcFluxVec.at(0); - const art::Ptr mcTruth = mcTruthVec.at(0); - const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); - const art::Ptr gTruth = gTruthVec.at(0); - - m_run_number_eventweight = e.run(); - m_subrun_number_eventweight = e.subRun(); - m_event_number_eventweight = e.event(); - - // possibly the wrong variables, but let's see for now... - //m_mcflux_evtno = mcFlux->fevtno; - m_mcflux_nu_pos_x = nu.Vx(); - m_mcflux_nu_pos_y = nu.Vy(); - m_mcflux_nu_pos_z = nu.Vz(); - m_mcflux_nu_mom_x = nu.Px(); - m_mcflux_nu_mom_y = nu.Py(); - m_mcflux_nu_mom_z = nu.Pz(); - m_mcflux_nu_mom_E = nu.E(); - m_mcflux_ntype = mcFlux->fntype; - m_mcflux_ptype = mcFlux->fptype; - m_mcflux_nimpwt = mcFlux->fnimpwt; - m_mcflux_dk2gen = mcFlux->fdk2gen; - m_mcflux_nenergyn = mcFlux->fnenergyn; - m_mcflux_tpx = mcFlux->ftpx; - m_mcflux_tpy = mcFlux->ftpy; - m_mcflux_tpz = mcFlux->ftpz; - m_mcflux_tptype = mcFlux->ftptype; - m_mcflux_vx = mcFlux->fvx; - m_mcflux_vy = mcFlux->fvy; - m_mcflux_vz = mcFlux->fvz; - - // loop MCParticle info for m_mctruth object - - m_mctruth_nparticles = mcTruth->NParticles(); - - for (int i = 0; i < m_mctruth_nparticles; i++){ - - const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); - - m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); - m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); - m_mctruth_particles_mother[i] = mcParticle.Mother(); - m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); - m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); - - for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ - - const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); - m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); - + const art::Ptr mcFlux = mcFluxVec.at(0); + const art::Ptr mcTruth = mcTruthVec.at(0); + const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); + const art::Ptr gTruth = gTruthVec.at(0); + + m_run_number_eventweight = e.run(); + m_subrun_number_eventweight = e.subRun(); + m_event_number_eventweight = e.event(); + + // possibly the wrong variables, but let's see for now... + //m_mcflux_evtno = mcFlux->fevtno; + m_mcflux_nu_pos_x = nu.Vx(); + m_mcflux_nu_pos_y = nu.Vy(); + m_mcflux_nu_pos_z = nu.Vz(); + m_mcflux_nu_mom_x = nu.Px(); + m_mcflux_nu_mom_y = nu.Py(); + m_mcflux_nu_mom_z = nu.Pz(); + m_mcflux_nu_mom_E = nu.E(); + m_mcflux_ntype = mcFlux->fntype; + m_mcflux_ptype = mcFlux->fptype; + m_mcflux_nimpwt = mcFlux->fnimpwt; + m_mcflux_dk2gen = mcFlux->fdk2gen; + m_mcflux_nenergyn = mcFlux->fnenergyn; + m_mcflux_tpx = mcFlux->ftpx; + m_mcflux_tpy = mcFlux->ftpy; + m_mcflux_tpz = mcFlux->ftpz; + m_mcflux_tptype = mcFlux->ftptype; + m_mcflux_vx = mcFlux->fvx; + m_mcflux_vy = mcFlux->fvy; + m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for m_mctruth object + + m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < m_mctruth_nparticles; i++){ + + const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); + + m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + m_mctruth_particles_mother[i] = mcParticle.Mother(); + m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + + for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + + const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); + m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + + } + + m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + m_mctruth_particles_px0[i] = mcParticle.Px(0); + m_mctruth_particles_py0[i] = mcParticle.Py(0); + m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + m_mctruth_particles_e0[i] = mcParticle.E(0); + m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); } - m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); - m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); - m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); - m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); - m_mctruth_particles_px0[i] = mcParticle.Px(0); - m_mctruth_particles_py0[i] = mcParticle.Py(0); - m_mctruth_particles_pz0[i] = mcParticle.Pz(0); - m_mctruth_particles_e0[i] = mcParticle.E(0); - m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); - m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); - m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); - m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); + + m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + m_mctruth_neutrino_mode = mcNeutrino.Mode(); + m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + m_mctruth_neutrino_target = mcNeutrino.Target(); + m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + m_mctruth_neutrino_w = mcNeutrino.W(); + m_mctruth_neutrino_x = mcNeutrino.X(); + m_mctruth_neutrino_y = mcNeutrino.Y(); + m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + m_gtruth_tgt_pdg = gTruth->ftgtPDG; + m_gtruth_tgt_A = gTruth->ftgtA; + m_gtruth_tgt_Z = gTruth->ftgtZ; + m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); + m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); + m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); + m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); + + m_gtruth_weight = gTruth->fweight; + m_gtruth_probability = gTruth->fprobability; + m_gtruth_xsec = gTruth->fXsec; + m_gtruth_diff_xsec = gTruth->fDiffXsec; + m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + m_gtruth_vertex_x = gTruth->fVertex.X(); + m_gtruth_vertex_y = gTruth->fVertex.Y(); + m_gtruth_vertex_z = gTruth->fVertex.Z(); + m_gtruth_vertex_T = gTruth->fVertex.T(); + m_gtruth_gscatter = gTruth->fGscatter; + m_gtruth_gint = gTruth->fGint; + m_gtruth_res_num = gTruth->fResNum; + m_gtruth_num_piplus = gTruth->fNumPiPlus; + m_gtruth_num_pi0 = gTruth->fNumPi0; + m_gtruth_num_piminus = gTruth->fNumPiMinus; + m_gtruth_num_proton = gTruth->fNumProton; + m_gtruth_num_neutron = gTruth->fNumNeutron; + m_gtruth_is_charm = gTruth->fIsCharm; + m_gtruth_is_strange = gTruth->fIsStrange; + m_gtruth_decay_mode = gTruth->fDecayMode; + m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; + m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; + m_gtruth_gx = gTruth->fgX; + m_gtruth_gy = gTruth->fgY; + m_gtruth_gt = gTruth->fgT; + m_gtruth_gw = gTruth->fgW; + m_gtruth_gQ2 = gTruth->fgQ2; + m_gtruth_gq2 = gTruth->fgq2; + m_gtruth_probe_pdg = gTruth->fProbePDG; + m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; + m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + + //moved to inside singlphoontmodule.cc for filter reasons + //eventweight_tree->Fill(); + std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"<GetNeutrino(); - - m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); - m_mctruth_neutrino_mode = mcNeutrino.Mode(); - m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); - m_mctruth_neutrino_target = mcNeutrino.Target(); - m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); - m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); - m_mctruth_neutrino_w = mcNeutrino.W(); - m_mctruth_neutrino_x = mcNeutrino.X(); - m_mctruth_neutrino_y = mcNeutrino.Y(); - m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); - - m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; - m_gtruth_tgt_pdg = gTruth->ftgtPDG; - m_gtruth_tgt_A = gTruth->ftgtA; - m_gtruth_tgt_Z = gTruth->ftgtZ; - m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); - m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); - m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); - m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); - - m_gtruth_weight = gTruth->fweight; - m_gtruth_probability = gTruth->fprobability; - m_gtruth_xsec = gTruth->fXsec; - m_gtruth_diff_xsec = gTruth->fDiffXsec; - m_gtruth_gphase_space = gTruth->fGPhaseSpace; - - m_gtruth_vertex_x = gTruth->fVertex.X(); - m_gtruth_vertex_y = gTruth->fVertex.Y(); - m_gtruth_vertex_z = gTruth->fVertex.Z(); - m_gtruth_vertex_T = gTruth->fVertex.T(); - m_gtruth_gscatter = gTruth->fGscatter; - m_gtruth_gint = gTruth->fGint; - m_gtruth_res_num = gTruth->fResNum; - m_gtruth_num_piplus = gTruth->fNumPiPlus; - m_gtruth_num_pi0 = gTruth->fNumPi0; - m_gtruth_num_piminus = gTruth->fNumPiMinus; - m_gtruth_num_proton = gTruth->fNumProton; - m_gtruth_num_neutron = gTruth->fNumNeutron; - m_gtruth_is_charm = gTruth->fIsCharm; - m_gtruth_is_strange = gTruth->fIsStrange; - m_gtruth_decay_mode = gTruth->fDecayMode; - m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; - m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; - m_gtruth_gx = gTruth->fgX; - m_gtruth_gy = gTruth->fgY; - m_gtruth_gt = gTruth->fgT; - m_gtruth_gw = gTruth->fgW; - m_gtruth_gQ2 = gTruth->fgQ2; - m_gtruth_gq2 = gTruth->fgq2; - m_gtruth_probe_pdg = gTruth->fProbePDG; - m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); - m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); - m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); - m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); - m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); - m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); - m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); - m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); - m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; - m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); - m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); - m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); - m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); - - //moved to inside singlphoontmodule.cc for filter reasons - //eventweight_tree->Fill(); - std::cout<<"SinglePhoton::AnalyzeEventWeight-eventweight_tree filled"< all_PPFPs, + std::map> & MCParticleToTrackIDMap, + std::map, art::Ptr > & showerToMCParticleMap, + std::map, art::Ptr > &trackToMCParticleMap){ + + for(size_t index=0; index< all_PPFPs.size(); ++index){ + PandoraPFParticle* temp_ppfp = &all_PPFPs[index]; + if(!temp_ppfp->get_IsNuSlice()) continue; + m_reco_slice_num_pfps[temp_ppfp->get_SliceID()]++;//GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice + m_reco_slice_num_showers[temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasShower(); + m_reco_slice_num_tracks [temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasTrack(); + } + + + //first check if in the event there's a match to a given signal + if(signal_def == "ncdelta"){ + //@para updated in the AnalyzeMCTruths function @ analyze_MCTruth.h + std::cout<<"AnalyzeSlice()\t||\t looking for signal def "< 1) m_multiple_matched_showers = true; - if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; - if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; - - //check if either 1g1p or 1g0p topology - if (m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==1){//1g1p - //check if same slice - m_is_matched_1g1p = true; - if ( m_matched_signal_track_sliceId[0] == m_matched_signal_shower_sliceId[0]){ - m_reco_1g1p_is_same_slice = true; - m_reco_1g1p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g1p_nuscore = m_matched_signal_shower_nuscore[0]; - } else{ - m_reco_1g1p_is_multiple_slices = true; } - }else if(m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==0){//1g0p - m_reco_1g0p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g0p_nuscore = m_matched_signal_shower_nuscore[0]; - m_is_matched_1g0p = true; - } - }//findslice + }//if matched + }//if proton from neutrino interaction + }//for all sim tracks + m_matched_signal_track_num = m_matched_signal_track_true_E.size(); + }//end of "ncdelta" scenario + + //brief summary + if (m_matched_signal_shower_num > 1) m_multiple_matched_showers = true; + if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; + if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; + + //check if either 1g1p or 1g0p topology + if (m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==1){//1g1p + //check if same slice + m_is_matched_1g1p = true; + if ( m_matched_signal_track_sliceId[0] == m_matched_signal_shower_sliceId[0]){ + m_reco_1g1p_is_same_slice = true; + m_reco_1g1p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; + m_reco_1g1p_nuscore = m_matched_signal_shower_nuscore[0]; + } else{ + m_reco_1g1p_is_multiple_slices = true; + } + }else if(m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==0){//1g0p + m_reco_1g0p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; + m_reco_1g0p_nuscore = m_matched_signal_shower_nuscore[0]; + m_is_matched_1g0p = true; + + } + }//findslice //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; - void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ - m_mctruth_num = mcTruthVector.size(); - if(m_is_verbose) std::cout<<"# of simb::MCTruth: "<1){ - std::cout<<"AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."<> & mcTruthVector , std::vector> & mcParticleVector){ + m_mctruth_num = mcTruthVector.size(); + if(m_is_verbose) std::cout<<"# of simb::MCTruth: "<1){ + std::cout<<"AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< spacers = Printer_header({" NuPdg"," CC=0"," TruthVertex(x,"," y, ",", z )"}); - for(int i=0; i truth = mcTruthVector[i]; - - - m_mctruth_origin = truth->Origin(); -// if(m_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ - if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); -// if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); -// if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); -// if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); -// if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); -// if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); -// if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); -// if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); -// if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); - // get corrected lepton position - spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); - - m_mctruth_nu_vertex_x = corrected[0]; - m_mctruth_nu_vertex_y = corrected[1]; - m_mctruth_nu_vertex_z = corrected[2]; - m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); - - //std::vector spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); + for(int i=0; i truth = mcTruthVector[i]; + + + m_mctruth_origin = truth->Origin(); + // if(m_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ + if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); + // if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); + // if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); + // if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); + // if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); + // if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); + // if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); + // if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); + // if(m_is_verbose) std::cout<<"Getting lepton E"< corrected(3); + // get corrected lepton position + spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); + + m_mctruth_nu_vertex_x = corrected[0]; + m_mctruth_nu_vertex_y = corrected[1]; + m_mctruth_nu_vertex_z = corrected[2]; + m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); + + //std::vector spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); Printer_content( - {std::to_string(m_mctruth_nu_pdg), - std::to_string(m_mctruth_ccnc), - std::to_string(corrected[0]), - std::to_string(corrected[1]), - std::to_string(corrected[2]) - },spacers); + {std::to_string(m_mctruth_nu_pdg), + std::to_string(m_mctruth_ccnc), + std::to_string(corrected[0]), + std::to_string(corrected[1]), + std::to_string(corrected[2]) + },spacers); - } + } - m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles + m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles if(m_is_verbose) std::cout<<"\nThis MCTruth has "<NParticles()<<" daughters "< spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); - - - - //some temp variables to see if its 1g1p or 1g1n - int tmp_n_photons_from_delta = 0; - int tmp_n_protons_from_delta = 0; - int tmp_n_neutrons_from_delta = 0; - - - m_mctruth_leading_exiting_proton_energy = -9999; - - for(int j=0; j< m_mctruth_num_daughter_particles; j++){ - - const simb::MCParticle par = truth->GetParticle(j); - m_mctruth_daughters_pdg[j] = par.PdgCode(); - m_mctruth_daughters_E[j] = par.E(); - - m_mctruth_daughters_status_code[j] = par.StatusCode(); - m_mctruth_daughters_trackID[j] = par.TrackId(); - m_mctruth_daughters_mother_trackID[j] = par.Mother(); - m_mctruth_daughters_px[j] = par.Px(); - m_mctruth_daughters_py[j] = par.Py(); - m_mctruth_daughters_pz[j] = par.Pz(); - m_mctruth_daughters_startx[j] = par.Vx(); - m_mctruth_daughters_starty[j] = par.Vy(); - m_mctruth_daughters_startz[j] = par.Vz(); - m_mctruth_daughters_time[j] = par.T(); - m_mctruth_daughters_endx[j] = par.EndX(); - m_mctruth_daughters_endy[j] = par.EndY(); - m_mctruth_daughters_endz[j] = par.EndZ(); - m_mctruth_daughters_endtime[j] = par.EndT(); - m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string - m_mctruth_daughters_end_process[j] = par.EndProcess(); - - if(m_is_textgen) continue; //quick hack, fix in files - - switch(m_mctruth_daughters_pdg[j]){ - case(22): // if it's a gamma - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_photons++; - m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); - m_mctruth_exiting_photon_energy.push_back(par.E()); - m_mctruth_exiting_photon_px.push_back(par.Px()); - m_mctruth_exiting_photon_py.push_back(par.Py()); - m_mctruth_exiting_photon_pz.push_back(par.Pz()); - } -// if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); - - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_photon_energy = par.E(); - tmp_n_photons_from_delta ++; - m_mctruth_is_delta_radiative++; - } - } - } - break; - case(111): // if it's a pi0 - { - // Make sure the pi0 actually exits the nucleus - if (par.StatusCode() == 1) { - m_mctruth_exiting_pi0_E.push_back(par.E()); - m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); - m_mctruth_exiting_pi0_px.push_back(par.Px()); - m_mctruth_exiting_pi0_py.push_back(par.Py()); - m_mctruth_exiting_pi0_pz.push_back(par.Pz()); - m_mctruth_num_exiting_pi0++; - } - break; - } - case(211): - case(-211): // it's pi+ or pi- - if (par.StatusCode() == 1) { - m_mctruth_num_exiting_pipm++; - } - break; - case(2212): // if it's a proton - { - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_protons++; - m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); - m_mctruth_exiting_proton_energy.push_back(par.E()); - m_mctruth_exiting_proton_px.push_back(par.Px()); - m_mctruth_exiting_proton_py.push_back(par.Py()); - m_mctruth_exiting_proton_pz.push_back(par.Pz()); - } - - -// if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_proton_energy = par.E(); - tmp_n_protons_from_delta ++; - } - } - - - break; - } - case(2112): // if it's a neutron - { - - m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it - m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); - m_mctruth_exiting_neutron_energy.push_back(par.E()); - m_mctruth_exiting_neutron_px.push_back(par.Px()); - m_mctruth_exiting_neutron_py.push_back(par.Py()); - m_mctruth_exiting_neutron_pz.push_back(par.Pz()); - -// if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); - if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_neutron_energy = par.E(); - tmp_n_neutrons_from_delta ++; - } - } - } - - break; - case(-2224): - case(2224): - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } - break; - case(-2214): - case(2214)://delta + - case(-1114): - case(1114): // if it's delta- - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } - break; - case(-2114): - case(2114): // if it's delta0 - if(par.StatusCode() == 1){ - m_mctruth_num_exiting_delta0++; - m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); -// if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ - m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + + + //some temp variables to see if its 1g1p or 1g1n + int tmp_n_photons_from_delta = 0; + int tmp_n_protons_from_delta = 0; + int tmp_n_neutrons_from_delta = 0; + + + m_mctruth_leading_exiting_proton_energy = -9999; + + for(int j=0; j< m_mctruth_num_daughter_particles; j++){ + + const simb::MCParticle par = truth->GetParticle(j); + m_mctruth_daughters_pdg[j] = par.PdgCode(); + m_mctruth_daughters_E[j] = par.E(); + + m_mctruth_daughters_status_code[j] = par.StatusCode(); + m_mctruth_daughters_trackID[j] = par.TrackId(); + m_mctruth_daughters_mother_trackID[j] = par.Mother(); + m_mctruth_daughters_px[j] = par.Px(); + m_mctruth_daughters_py[j] = par.Py(); + m_mctruth_daughters_pz[j] = par.Pz(); + m_mctruth_daughters_startx[j] = par.Vx(); + m_mctruth_daughters_starty[j] = par.Vy(); + m_mctruth_daughters_startz[j] = par.Vz(); + m_mctruth_daughters_time[j] = par.T(); + m_mctruth_daughters_endx[j] = par.EndX(); + m_mctruth_daughters_endy[j] = par.EndY(); + m_mctruth_daughters_endz[j] = par.EndZ(); + m_mctruth_daughters_endtime[j] = par.EndT(); + m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string + m_mctruth_daughters_end_process[j] = par.EndProcess(); + + if(m_is_textgen) continue; //quick hack, fix in files + + switch(m_mctruth_daughters_pdg[j]){ + case(22): // if it's a gamma + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_photons++; + m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); + m_mctruth_exiting_photon_energy.push_back(par.E()); + m_mctruth_exiting_photon_px.push_back(par.Px()); + m_mctruth_exiting_photon_py.push_back(par.Py()); + m_mctruth_exiting_photon_pz.push_back(par.Pz()); + } + // if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); + + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_photon_energy = par.E(); + tmp_n_photons_from_delta ++; + m_mctruth_is_delta_radiative++; } + } + } + break; + case(111): // if it's a pi0 + { + // Make sure the pi0 actually exits the nucleus + if (par.StatusCode() == 1) { + m_mctruth_exiting_pi0_E.push_back(par.E()); + m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); + m_mctruth_exiting_pi0_px.push_back(par.Px()); + m_mctruth_exiting_pi0_py.push_back(par.Py()); + m_mctruth_exiting_pi0_pz.push_back(par.Pz()); + m_mctruth_num_exiting_pi0++; + } + break; } + case(211): + case(-211): // it's pi+ or pi- + if (par.StatusCode() == 1) { + m_mctruth_num_exiting_pipm++; + } + break; + case(2212): // if it's a proton + { + if(par.StatusCode() == 1){ + m_mctruth_num_exiting_protons++; + m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); + m_mctruth_exiting_proton_energy.push_back(par.E()); + m_mctruth_exiting_proton_px.push_back(par.Px()); + m_mctruth_exiting_proton_py.push_back(par.Py()); + m_mctruth_exiting_proton_pz.push_back(par.Pz()); + } + + + // if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_proton_energy = par.E(); + tmp_n_protons_from_delta ++; + } + } + break; + } + case(2112): // if it's a neutron + { + + m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it + m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); + m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); + m_mctruth_exiting_neutron_energy.push_back(par.E()); + m_mctruth_exiting_neutron_px.push_back(par.Px()); + m_mctruth_exiting_neutron_py.push_back(par.Py()); + m_mctruth_exiting_neutron_pz.push_back(par.Pz()); + + // if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); + if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ + m_mctruth_delta_neutron_energy = par.E(); + tmp_n_neutrons_from_delta ++; + } + } + } - std::cout<<"AnalyzeMCTruths()\t||\t This event is "; - if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ - m_mctruth_delta_radiative_1g1p_or_1g1n = 1; - std::cout<<"a 1g1p delta radiative event"< m_mctruth_leading_exiting_proton_energy ){ + m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + } + } - //second loop for some dauhter info - // status codes! - // 0 initial state - // 1 stable final state - // 2 intermediate state - // 3 decayed state - // 11 Nucleon target - // 14 hadron in the nucleas - // So if a final_state_particle has a status(3) delta in its history its "from" a delta. - //first we loop over all 14's to see which have a direct mother delta. [done above] - //so first we loop over all state 1 (exiting) to see what a LArTPC sees (post FSI) - for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ + std::cout<<"AnalyzeMCTruths()\t||\t This event is "; + if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ + m_mctruth_delta_radiative_1g1p_or_1g1n = 1; + std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ - m_mctruth_num_reconstructable_protons++; + m_mctruth_num_reconstructable_protons++; }//if g above threshold - } + } - //if it's a true delta radiative event, check the energies - - - - if (m_mctruth_is_delta_radiative==true){//if ncdelta - for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ - std::cout<<"AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ - m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. - - }//if g above threshold - }//for all exiting g - for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ - if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ - //if it's already 1g1p then we've found a 1g2p which we aren't counting - // Guanqun: limit to only 1 reconstructable proton? - if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ - m_mctruth_is_reconstructable_1g1p = false; - } - //if there's a photon then it's actually a 1g1p - if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ - m_mctruth_is_reconstructable_1g1p = true; - m_mctruth_is_reconstructable_1g0p = false; - } - std::cout<<"AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); - - std::cout<<"AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); - std::cout<<"AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); - if(m_is_verbose){ - std::cout<<"AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); - if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< m_exiting_photon_energy_threshold){ + m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. + }//if g above threshold + }//for all exiting g + for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ + if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ + //if it's already 1g1p then we've found a 1g2p which we aren't counting + // Guanqun: limit to only 1 reconstructable proton? + if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ + m_mctruth_is_reconstructable_1g1p = false; } + //if there's a photon then it's actually a 1g1p + if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ + m_mctruth_is_reconstructable_1g1p = true; + m_mctruth_is_reconstructable_1g0p = false; + } + std::cout<<"AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); + + std::cout<<"AnalyzeMCTruths()\t||\t -- gamma ("<GetParticle(nth_mother.Mother()); + std::cout<<"AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); - if(m_is_verbose){ - std::cout<<"AnalyzeMCTruths()\t||\t This is a CCNC: "<GetParticle(nth_mother.Mother()); + if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ + if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "< mymap; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; - mymap[mcp->TrackId()] = k; - } + } + + + if(m_is_verbose){ + std::cout<<"AnalyzeMCTruths()\t||\t This is a CCNC: "< mymap; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; + mymap[mcp->TrackId()] = k; + } - //Just some VERY hacky pi^0 photon stuff - int npi0check = 0; - for(size_t k = 0; k < mcParticleVector.size(); k++){ - const art::Ptr mcp = mcParticleVector[k]; + //Just some VERY hacky pi^0 photon stuff + int npi0check = 0; + for(size_t k = 0; k < mcParticleVector.size(); k++){ + const art::Ptr mcp = mcParticleVector[k]; - if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; + if(false) std::cout << k << " Mother:"<< mcp->Mother() << " pdgcode: " << mcp->PdgCode() << " trkid: " << mcp->TrackId() << " statuscode: " << mcp->StatusCode() << std::endl; // if it's a pi0, its mother trackID is 0 and it has two daughters - if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ - npi0check++; - // get its two daughters - const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; - const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; - - if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); - double e2 = dau2->E(); - - std::vector raw_1_End ={dau1->EndX(), dau1->EndY(), dau1->EndZ()}; - std::vector raw_1_Start ={dau1->Vx(), dau1->Vy(), dau1->Vz()}; - - std::vector raw_2_End ={dau2->EndX(), dau2->EndY(), dau2->EndZ()}; - std::vector raw_2_Start ={dau2->Vx(), dau2->Vy(), dau2->Vz()}; - - std::vector corrected_1_start(3), corrected_2_start(3); - std::vector corrected_1_end(3), corrected_2_end(3); - - spacecharge_correction(dau1, corrected_1_start, raw_1_Start); - spacecharge_correction(dau1, corrected_1_end, raw_1_End); - - spacecharge_correction(dau2, corrected_2_start, raw_2_Start); - spacecharge_correction(dau2, corrected_2_end, raw_2_End); - - for(int p1=0; p1NumberDaughters();p1++){ - auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; - std::cout<<"Post1 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<NumberDaughters();p1++){ - auto dd = mcParticleVector[mymap[dau2->Daughter(p1)]]; - std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_1_start; - m_mctruth_pi0_leading_photon_end = corrected_1_end; - m_mctruth_pi0_subleading_photon_start = corrected_2_start; - m_mctruth_pi0_subleading_photon_end = corrected_2_end; - //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! - m_mctruth_pi0_leading_photon_exiting_TPC =exit1; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; - m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; - - }else{ - m_mctruth_pi0_leading_photon_energy = e2; - m_mctruth_pi0_subleading_photon_energy = e1; - m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_2_start; - m_mctruth_pi0_leading_photon_end = corrected_2_end; - m_mctruth_pi0_subleading_photon_start = corrected_1_start; - m_mctruth_pi0_subleading_photon_end = corrected_1_end; - m_mctruth_pi0_leading_photon_exiting_TPC = exit2; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; - m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + if(mcp->PdgCode() == 111 && mcp->Mother() == 0 && mcp->NumberDaughters()==2 ){ + npi0check++; + // get its two daughters + const art::Ptr dau1 = mcParticleVector[mymap[mcp->Daughter(0)]]; + const art::Ptr dau2 = mcParticleVector[mymap[mcp->Daughter(1)]]; - } + if(false) std::cout<<"On Dau1: "<<" Mother:"<< dau1->Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<Mother()<<" pdgcode: "<PdgCode()<<" trkid: "<TrackId()<<" statuscode: "<StatusCode()<E(); + double e2 = dau2->E(); + + std::vector raw_1_End ={dau1->EndX(), dau1->EndY(), dau1->EndZ()}; + std::vector raw_1_Start ={dau1->Vx(), dau1->Vy(), dau1->Vz()}; + + std::vector raw_2_End ={dau2->EndX(), dau2->EndY(), dau2->EndZ()}; + std::vector raw_2_Start ={dau2->Vx(), dau2->Vy(), dau2->Vz()}; + + std::vector corrected_1_start(3), corrected_2_start(3); + std::vector corrected_1_end(3), corrected_2_end(3); + + spacecharge_correction(dau1, corrected_1_start, raw_1_Start); + spacecharge_correction(dau1, corrected_1_end, raw_1_End); + + spacecharge_correction(dau2, corrected_2_start, raw_2_Start); + spacecharge_correction(dau2, corrected_2_end, raw_2_End); + + for(int p1=0; p1NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau1->Daughter(p1)]]; + std::cout<<"Post1 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<1) std::cout<<"WARNING WARNING!!!! there are "<NumberDaughters();p1++){ + auto dd = mcParticleVector[mymap[dau2->Daughter(p1)]]; + std::cout<<"Post2 "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_1_start; + m_mctruth_pi0_leading_photon_end = corrected_1_end; + m_mctruth_pi0_subleading_photon_start = corrected_2_start; + m_mctruth_pi0_subleading_photon_end = corrected_2_end; + //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! + m_mctruth_pi0_leading_photon_exiting_TPC =exit1; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; + m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + }else{ + m_mctruth_pi0_leading_photon_energy = e2; + m_mctruth_pi0_subleading_photon_energy = e1; + m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); + m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); + m_mctruth_pi0_leading_photon_start = corrected_2_start; + m_mctruth_pi0_leading_photon_end = corrected_2_end; + m_mctruth_pi0_subleading_photon_start = corrected_1_start; + m_mctruth_pi0_subleading_photon_end = corrected_1_end; + m_mctruth_pi0_leading_photon_exiting_TPC = exit2; + m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; + m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + + } + + } + } + + if(npi0check>1) std::cout<<"WARNING WARNING!!!! there are "< is_delta_map = { - {2224,"Delta++"}, - {2214,"Delta+"}, - {1114,"Delta-"}, - {2114,"Delta0"}, - {-2224,"Anti-Delta++"}, - {-2214,"Anti-Delta+"}, - {-1114,"Anti-Delta-"}, - {-2114,"Anti-Delta0"}}; - - std::vector> fTPCVolumes; - std::vector fActiveVolumes; - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - bool bool_make_sss_plots; - - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - //same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer;//"daq" -// std::ofstream out_stream; - - double m_tpc_active_XMin; - double m_tpc_active_YMin; - double m_tpc_active_ZMin; - double m_tpc_active_XMax; - double m_tpc_active_YMax; - double m_tpc_active_ZMax; - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - // std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - // std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - - - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - //SSS parameters - double m_max_conv_dist; - double m_mass_pi0_mev; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - -// spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - -// int m_Cryostat; -// int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - double m_reco_vertex_dist_to_CPA; - - - int m_reco_asso_showers; - -// double m_reco_vertex_to_nearest_dead_wire_plane0; -// double m_reco_vertex_to_nearest_dead_wire_plane1; -// double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - double m_CRT_dt; //time between flash and nearest CRT hit - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - - int pfp_w_bestnuID; - //------------ Track related Variables ------------- - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_CPA; - std::vector m_reco_track_start_dist_to_CPA; - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - //corresponding variables on the best plane of reco track, which is defined as such------ - //plane 2 have good hits, then plane 2 is the best-plane - // which plane of plane 0 and 1 has more good hits will be best plane - //one of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - -// vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ -// vector m_reco_track_end_to_nearest_dead_wire_plane1; -// vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - ere is no shower hits, set to 999 - ere is shower hits but no track hits, set to -999 - */ - - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - ch plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - o -999 if there is no unassociated hits or track hits on plane - */ - - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - ch plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; -// -// vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ -// vector m_reco_shower_start_to_nearest_dead_wire_plane1; -// vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - double m_mctruth_leading_exiting_proton_energy; - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - int m_mctruth_num_reconstructable_protons; - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - double _time2cm;//value modeled from David's shower code -// related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; - //matching variables - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - - - /** - * @brief: reset/clear data members - */ - void ClearMeta(); - void CreateMetaBranches(); - - void ClearStubs(); - void CreateStubBranches(); - - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ - - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ - - - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ - - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ - - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ - - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ - - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); - - /** - * @brief: fill event weight related variables */ - void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ - - - /** - * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); - - - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ + std::map is_delta_map = { + {2224,"Delta++"}, + {2214,"Delta+"}, + {1114,"Delta-"}, + {2114,"Delta0"}, + {-2224,"Anti-Delta++"}, + {-2214,"Anti-Delta+"}, + {-1114,"Anti-Delta-"}, + {-2114,"Anti-Delta0"}}; + + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + bool bool_make_sss_plots; + + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + //same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + + double m_beamgate_flash_start; + double m_beamgate_flash_end; + + bool m_runCRT; + double m_DTOffset; + double m_Resolution; + std::string m_DAQHeaderProducer;//"daq" + // std::ofstream out_stream; + + double m_tpc_active_XMin; + double m_tpc_active_YMin; + double m_tpc_active_ZMin; + double m_tpc_active_XMax; + double m_tpc_active_YMax; + double m_tpc_active_ZMax; + + TRandom3 *rangen; + std::string m_shower3dLabel; + std::string m_showerKalmanLabel; + std::string m_showerKalmanCaloLabel; + std::string m_pandoraLabel; ///< The label for the pandora producer + std::string m_trackLabel; ///< The label for the track producer from PFParticles + // std::string m_sliceLabel; + std::string m_showerLabel; ///< The label for the shower producer from PFParticles + std::string m_caloLabel; ///< The label for calorimetry associations producer + std::string m_flashLabel; + std::string m_geantModuleLabel; + // std::string m_backtrackerLabel; + std::string m_hitfinderLabel; + std::string m_hitMCParticleAssnsLabel; + std::string m_potLabel; + std::string m_generatorLabel; + + + std::string m_pidLabel; ///< For PID stuff + std::string m_CRTVetoLabel; + std::string m_CRTTzeroLabel; + std::string m_CRTHitProducer; + std::string m_true_eventweight_label; + + bool m_use_PID_algorithms; + bool m_use_delaunay; + int m_delaunay_max_hits; + bool m_is_verbose; + bool m_print_out_event; + bool m_is_data; // value provided by pset + bool m_is_overlayed; + bool m_is_textgen; + bool m_run_all_pfps; + bool m_has_CRT; + bool m_fill_trees; + bool m_run_pi0_filter; //value provided by pset + bool m_run_pi0_filter_2g1p; + bool m_run_pi0_filter_2g0p; + + bool m_runPhotoNuTruth; + bool m_runTrueEventweight; + + bool m_runSelectedEvent; //if it should run only selected events + std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::set> m_selected_set; //set of selected events + + //SEAviwer bits + bool m_runSEAview; + double m_SEAviewPlotDistance; //parameters related to shower-like object finding + double m_SEAviewHitThreshold; + double m_SEAviewDbscanMinPts; + double m_SEAviewDbscanEps; + double m_SEAviewMaxPtsLinFit; + bool m_SEAviewMakePDF; + int m_SEAviewNumRecoShower; + int m_SEAviewNumRecoTrack; + + bool m_runSEAviewStub; + double m_SEAviewStubHitThreshold; //parameters related to track-like object finding + double m_SEAviewStubPlotDistance; + double m_SEAviewStubDbscanMinPts; + double m_SEAviewStubDbscanEps; + bool m_SEAviewStubMakePDF; + int m_SEAviewStubNumRecoShower; + int m_SEAviewStubNumRecoTrack; + + std::string m_Spline_CV_label; //"eventweight4to4aFix" + + //SSS parameters + double m_max_conv_dist; + double m_mass_pi0_mev; + + double m_exiting_photon_energy_threshold ; + double m_exiting_proton_energy_threshold ; + + // spacecharge::SpaceCharge const * SCE; + geo::GeometryCore const * geom; + double m_work_function; //value provided by pset + double m_recombination_factor; // value provided by pset + + std::vector m_gain_mc; // value provided by pset + std::vector m_gain_data; + double m_wire_spacing; + + // int m_Cryostat; + // int m_TPC; + + double m_width_dqdx_box; // value provided by pset + double m_length_dqdx_box; + + + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + std::map> fmcweight; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + + + + + + + + + + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + double m_reco_vertex_dist_to_CPA; + + + int m_reco_asso_showers; + + // double m_reco_vertex_to_nearest_dead_wire_plane0; + // double m_reco_vertex_to_nearest_dead_wire_plane1; + // double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[k_max_mc_particles]; + int m_mctruth_particles_pdg_code[k_max_mc_particles]; + int m_mctruth_particles_mother[k_max_mc_particles]; + int m_mctruth_particles_status_code[k_max_mc_particles]; + int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[k_max_mc_particles]; + double m_mctruth_particles_Gvy[k_max_mc_particles]; + double m_mctruth_particles_Gvz[k_max_mc_particles]; + double m_mctruth_particles_Gvt[k_max_mc_particles]; + double m_mctruth_particles_px0[k_max_mc_particles]; + double m_mctruth_particles_py0[k_max_mc_particles]; + double m_mctruth_particles_pz0[k_max_mc_particles]; + double m_mctruth_particles_e0[k_max_mc_particles]; + int m_mctruth_particles_rescatter[k_max_mc_particles]; + double m_mctruth_particles_polx[k_max_mc_particles]; + double m_mctruth_particles_poly[k_max_mc_particles]; + double m_mctruth_particles_polz[k_max_mc_particles]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + + + //----------- CRT related variables ----------------- + + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + double m_CRT_dt; //time between flash and nearest CRT hit + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + + + int pfp_w_bestnuID; + //------------ Track related Variables ------------- + double m_track_calo_min_dEdx; + double m_track_calo_max_dEdx; + double m_track_calo_min_dEdx_hits; + double m_track_calo_trunc_fraction; + + + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_CPA; + std::vector m_reco_track_start_dist_to_CPA; + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + //corresponding variables on the best plane of reco track, which is defined as such------ + //plane 2 have good hits, then plane 2 is the best-plane + // which plane of plane 0 and 1 has more good hits will be best plane + //one of 3 planes has good hits, then best-plane is set to -1 + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector> m_reco_track_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + // vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + // vector m_reco_track_end_to_nearest_dead_wire_plane1; + // vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_process; + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + ere is no shower hits, set to 999 + ere is shower hits but no track hits, set to -999 + */ + + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + ch plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + o -999 if there is no unassociated hits or track hits on plane + */ + + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + ch plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + // + // vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + // vector m_reco_shower_start_to_nearest_dead_wire_plane1; + // vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + double m_mctruth_leading_exiting_proton_energy; + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + int m_mctruth_num_reconstructable_protons; + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + std::string m_truthmatching_signaldef; + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + double _time2cm;//value modeled from David's shower code + // related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + //matching variables + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ + + + /** + * @brief: reset/clear data members + */ + void ClearMeta(); + void CreateMetaBranches(); + + void ClearStubs(); + void CreateStubBranches(); + + void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ + void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + + void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + + + void ClearIsolation(); /* clear vector members related to isolation */ + void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + + void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t); /* resize flash-related vectors */ + void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + + void ClearTracks(); /* clear track related variable and vectors */ + void ResizeTracks(size_t); /* resize track related vectors */ + void CreateTrackBranches(); /* create track related branch in vertex tree */ + + void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + + void ClearMCTruths(); + void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(); + + /** + * @brief: fill event weight related variables */ + void AnalyzeEventWeight(art::Event const & e ); + void ClearEventWeightBranches(); /* reset eventweight related variable */ + void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + + + /** + * @brief: fill event weight related variables */ + void ClearGeant4Branches(); /* reset eventweight related variable */ + void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector); + + + void ClearSlices(); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size); /* resize vectors related to slice */ + void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ void Output_EventMeta( art::Event &evt); void Output_PFParticleInfo( std::vector PPFPs); diff --git a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt index 198164e73..098358694 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/SEAview/CMakeLists.txt @@ -2,7 +2,7 @@ link_libraries( -L$ENV{BOOST_LIB} -lboost_system -lboost_filesystem) find_package(larpandora) art_make( - LIBRARY_NAME sbncode_SinglePhotonAnalysis_SEAview + LIBRARY_NAME sbncode_SinglePhotonAnalysis_SEAview LIB_LIBRARIES larcorealg_Geometry larcore_Geometry_Geometry_service @@ -43,7 +43,7 @@ art_make( lardataobj_RawData lardataobj_RecoBase lardataobj_MCBase - larcoreobj_SummaryData + larcoreobj_SummaryData larsim_MCCheater_BackTrackerService_service larpandora_LArPandoraInterface SignalShapingServiceMicroBooNE_service diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc index 8f280fee4..83e29ca2b 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc @@ -4,1301 +4,1301 @@ namespace seaview{ - int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ - - const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); - bool found_hit_in_slice = false, found_hit_not_in_slice = false; - for(auto hit : f_hits){ - auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); - if( iter == slice_hits.end()) - found_hit_not_in_slice = true; - else{ - found_hit_in_slice = true; - } - - if(found_hit_in_slice && found_hit_not_in_slice) return 0; - } - - return found_hit_in_slice ? 1 : -1; - } - - - void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ - - //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC - double max_ioc_to_shower_start = DBL_MIN; - size_t num_hits = cl.f_hits.size(); - - - for(size_t i = 0; i!= num_hits; ++i){ - auto &h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - //geometric properties - double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); - double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); - double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; - cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); - cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); - - //remember two hits with min/max IOC - if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ - cl.f_min_ioc_to_shower_start = ioc_to_shower_start; - cl.start_hit_idx = i; - } - if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. - max_ioc_to_shower_start = ioc_to_shower_start; - cl.end_hit_idx = i; - } - - - } //end of hit loop - - - // second round: group hits in two categories, first half and second half - // get the direction of the cluster - auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); - std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; - std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; - std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; - std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; - cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); - - cl.f_hit_group.resize(num_hits); - for(size_t i = 0; i!=num_hits; ++i){ - auto h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; - - if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ - cl.f_hit_group[i] = 1; - cl.f_mean_ADC_first_half += h->SummedADC(); - } - else{ - cl.f_hit_group[i] = 2; - cl.f_mean_ADC_second_half += h->SummedADC(); - } - } - cl.f_track_treated = true; - - size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); - size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); - if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; - if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; - cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); - - if( num_hits < 2){ - std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; - return; - } - - //angle between the track cluster and the shower direction - //cluster direction unit vector - double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); - std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; - //shower direction unit vector - double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); - std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; - //angle between two unit vector, in radian - cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); - - - if(cl.f_score.min_wire == cl.f_score.max_wire){ - std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; - return; - } - //fit to wire-tick plot of the cluster, see how straight cluster is - TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); - //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); - //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - if(fit_status == 0){ - //f1 = graph_copy->GetFunction("f1"); - f1 = cl.f_graph.GetFunction("f1"); - cl.f_fit_chi2 = f1->GetChisquare(); - } - //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; - } - - - // constructor - // CHECK, this constructor is not found; - SEAviewer::SEAviewer(std::string intag, - geo::GeometryCore const * ingeom, - detinfo::DetectorPropertiesData const & intheDetector ) - : tag(intag), geom(ingeom), theDetector(intheDetector){ - chan_max = {-9999,-9999,-9999}; - chan_min = {9999,9999,9999}; - tick_max = -99999; - tick_min = 99999; - - plot_true_vertex = false; - vertex_tick.resize(3); - vertex_chan.resize(3); - vertex_graph.resize(3); - - true_vertex_tick.resize(3); - true_vertex_chan.resize(3); - true_vertex_graph.resize(3); - - tick_shift = 350; - chan_shift = 100; - - n_showers=0; - n_pfps = 0; - has_been_clustered = false; - hit_threshold = -10; - - rangen = new TRandom3(0); //same seed everytime - } - - - int SEAviewer::setBadChannelList(std::vector> &in){ - m_bad_channel_list = in; - return 0; - } - - int SEAviewer::addHitsToConsider(std::vector>& hits){ - for(auto &h: hits){ - map_unassociated_hits[h] = true; - map_considered_hits[h] = true; - } - return 0; - } - - int SEAviewer::filterConsideredHits(double dist_to_vertex){ - - //collect all hits that are under consideration for clustering - std::vector> current_hits; - for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ - current_hits.push_back(map_iter->first); - } - - //remove hits that are too far from vertex - for(auto &h: current_hits){ - int p = h->View(); - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); - - if(dist > dist_to_vertex){ - map_unassociated_hits.erase(h); - map_considered_hits.erase(h); - } - } - return 0; - } - - int SEAviewer::setHitThreshold(double h){ - hit_threshold = h; - return 0; - } - - int SEAviewer::addAllHits(std::vector>& hits){ - - std::vector> vec_tick(3); - std::vector> vec_chan(3); - - for(auto&h: hits){ - if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - //tick_max = std::max(tick_max, (double)h->PeakTime()); - //tick_min = std::min(tick_min, (double)h->PeakTime()); - //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - } - - for(int i=0; i<3; i++){ - vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph - } - - vec_all_ticks = vec_tick; - vec_all_chans = vec_chan; - - return 0; - } - - std::vector SEAviewer::calcUnassociatedHits(){ - int n_unassoc=0; - int n_below_thresh = 0; - std::vector> vec_tick(3); - std::vector> vec_chan(3); - std::vector>> vec_pts(3); - std::vector>> vec_hits(3); - - - int n_all =map_considered_hits.size(); + int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ + + const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); + bool found_hit_in_slice = false, found_hit_not_in_slice = false; + for(auto hit : f_hits){ + auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); + if( iter == slice_hits.end()) + found_hit_not_in_slice = true; + else{ + found_hit_in_slice = true; + } + + if(found_hit_in_slice && found_hit_not_in_slice) return 0; + } + + return found_hit_in_slice ? 1 : -1; + } + + + void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ + + //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC + double max_ioc_to_shower_start = DBL_MIN; + size_t num_hits = cl.f_hits.size(); + + + for(size_t i = 0; i!= num_hits; ++i){ + auto &h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + //geometric properties + double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); + double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); + double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; + cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); + cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); + + //remember two hits with min/max IOC + if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ + cl.f_min_ioc_to_shower_start = ioc_to_shower_start; + cl.start_hit_idx = i; + } + if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. + max_ioc_to_shower_start = ioc_to_shower_start; + cl.end_hit_idx = i; + } + + + } //end of hit loop + + + // second round: group hits in two categories, first half and second half + // get the direction of the cluster + auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); + std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; + std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; + std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; + std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; + cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); + + cl.f_hit_group.resize(num_hits); + for(size_t i = 0; i!=num_hits; ++i){ + auto h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; + + if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ + cl.f_hit_group[i] = 1; + cl.f_mean_ADC_first_half += h->SummedADC(); + } + else{ + cl.f_hit_group[i] = 2; + cl.f_mean_ADC_second_half += h->SummedADC(); + } + } + cl.f_track_treated = true; + + size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); + size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); + if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; + if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; + cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); + + if( num_hits < 2){ + std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; + return; + } + + //angle between the track cluster and the shower direction + //cluster direction unit vector + double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); + std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; + //shower direction unit vector + double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); + std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; + //angle between two unit vector, in radian + cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); + + + if(cl.f_score.min_wire == cl.f_score.max_wire){ + std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; + return; + } + //fit to wire-tick plot of the cluster, see how straight cluster is + TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); + //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); + //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + if(fit_status == 0){ + //f1 = graph_copy->GetFunction("f1"); + f1 = cl.f_graph.GetFunction("f1"); + cl.f_fit_chi2 = f1->GetChisquare(); + } + //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; + } + + + // constructor + // CHECK, this constructor is not found; + SEAviewer::SEAviewer(std::string intag, + geo::GeometryCore const * ingeom, + detinfo::DetectorPropertiesData const & intheDetector ) + : tag(intag), geom(ingeom), theDetector(intheDetector){ + chan_max = {-9999,-9999,-9999}; + chan_min = {9999,9999,9999}; + tick_max = -99999; + tick_min = 99999; + + plot_true_vertex = false; + vertex_tick.resize(3); + vertex_chan.resize(3); + vertex_graph.resize(3); + + true_vertex_tick.resize(3); + true_vertex_chan.resize(3); + true_vertex_graph.resize(3); + + tick_shift = 350; + chan_shift = 100; + + n_showers=0; + n_pfps = 0; + has_been_clustered = false; + hit_threshold = -10; + + rangen = new TRandom3(0); //same seed everytime + } + + + int SEAviewer::setBadChannelList(std::vector> &in){ + m_bad_channel_list = in; + return 0; + } + + int SEAviewer::addHitsToConsider(std::vector>& hits){ + for(auto &h: hits){ + map_unassociated_hits[h] = true; + map_considered_hits[h] = true; + } + return 0; + } + + int SEAviewer::filterConsideredHits(double dist_to_vertex){ + + //collect all hits that are under consideration for clustering + std::vector> current_hits; + for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ + current_hits.push_back(map_iter->first); + } + + //remove hits that are too far from vertex + for(auto &h: current_hits){ + int p = h->View(); + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); + + if(dist > dist_to_vertex){ + map_unassociated_hits.erase(h); + map_considered_hits.erase(h); + } + } + return 0; + } + + int SEAviewer::setHitThreshold(double h){ + hit_threshold = h; + return 0; + } + + int SEAviewer::addAllHits(std::vector>& hits){ + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto&h: hits){ + if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + //tick_max = std::max(tick_max, (double)h->PeakTime()); + //tick_min = std::min(tick_min, (double)h->PeakTime()); + //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + } + + for(int i=0; i<3; i++){ + vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph + } + + vec_all_ticks = vec_tick; + vec_all_chans = vec_chan; + + return 0; + } + + std::vector SEAviewer::calcUnassociatedHits(){ + int n_unassoc=0; + int n_below_thresh = 0; + std::vector> vec_tick(3); + std::vector> vec_chan(3); + std::vector>> vec_pts(3); + std::vector>> vec_hits(3); + + + int n_all =map_considered_hits.size(); - for(const auto &pair: map_considered_hits ){ - auto& h = pair.first; //type of h: recob::Hit - if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ + for(const auto &pair: map_considered_hits ){ + auto& h = pair.first; //type of h: recob::Hit + if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ - if(h->SummedADC() < hit_threshold){ - n_below_thresh++; - continue; - } + if(h->SummedADC() < hit_threshold){ + n_below_thresh++; + continue; + } - // if summed ADC of the hit passes threshold - n_unassoc++; - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back(tick); + // if summed ADC of the hit passes threshold + n_unassoc++; + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back(tick); - vec_pts[(int)h->View()].push_back({wire,tick}); - vec_hits[(int)h->View()].push_back(h); - tick_max = std::max(tick_max, tick); - tick_min = std::min(tick_min, tick); - //chan_max, chan_min stores: max, min unassociated channel for each plane - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + vec_pts[(int)h->View()].push_back({wire,tick}); + vec_hits[(int)h->View()].push_back(h); + tick_max = std::max(tick_max, tick); + tick_min = std::min(tick_min, tick); + //chan_max, chan_min stores: max, min unassociated channel for each plane + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } + } - } + } - for(int i=0; i<3; i++){ - vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } + for(int i=0; i<3; i++){ + vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } - vec_unass_ticks = vec_tick; - vec_unass_chans = vec_chan; - vec_unass_pts = vec_pts; - vec_unass_hits = vec_hits; + vec_unass_ticks = vec_tick; + vec_unass_chans = vec_chan; + vec_unass_pts = vec_pts; + vec_unass_hits = vec_hits; - return {n_all,n_unassoc,n_below_thresh}; - } + return {n_all,n_unassoc,n_below_thresh}; + } - int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ - n_pfps++; + int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ + n_pfps++; - format_legend(legend, arg1, arg2, arg3); + format_legend(legend, arg1, arg2, arg3); - vec_pfp_legend.push_back(legend); + vec_pfp_legend.push_back(legend); - std::vector> vec_tick(3); - std::vector> vec_chan(3); + std::vector> vec_tick(3); + std::vector> vec_chan(3); - for(auto &h: hits){ - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + for(auto &h: hits){ + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - //remove from unassociated hits - map_unassociated_hits[h] = false; - } + //remove from unassociated hits + map_unassociated_hits[h] = false; + } - std::vector t_graphs; - for(int i=0; i<3; i++){ - t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } - vec_graphs.push_back(t_graphs); - vec_ticks.push_back(vec_tick); - vec_chans.push_back(vec_chan); - return 0; - } + std::vector t_graphs; + for(int i=0; i<3; i++){ + t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + vec_graphs.push_back(t_graphs); + vec_ticks.push_back(vec_tick); + vec_chans.push_back(vec_chan); + return 0; + } - int SEAviewer::addShower(art::Ptr&shr){ - n_showers++; + int SEAviewer::addShower(art::Ptr&shr){ + n_showers++; - vec_showers.push_back(shr); + vec_showers.push_back(shr); - return 0; - } + return 0; + } - int SEAviewer::addTrack(art::Ptr&trk){ - n_tracks++; + int SEAviewer::addTrack(art::Ptr&trk){ + n_tracks++; - vec_tracks.push_back(trk); + vec_tracks.push_back(trk); - return 0; - } + return 0; + } - std::vector> SEAviewer::to2D(std::vector & threeD){ + std::vector> SEAviewer::to2D(std::vector & threeD){ - auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; + auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; - std::vector> ans(3); + std::vector> ans(3); - for(int i=0; i<3; i++){ - double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); - double time = calcTime(threeD[0], i, fTPC,fCryostat, theDetector); + for(int i=0; i<3; i++){ + double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); + double time = calcTime(threeD[0], i, fTPC,fCryostat, theDetector); - ans[i] = {wire,time}; - } + ans[i] = {wire,time}; + } - return ans; - } + return ans; + } - int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ - // use vector here, so that to plot the single point using TGraph - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + // use vector here, so that to plot the single point using TGraph + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; - vertex_tick[i] = time[0]; - vertex_chan[i] = wire[0]; + vertex_tick[i] = time[0]; + vertex_chan[i] = wire[0]; - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); - TGraph gtmp(1, &wire[0], &time[0]); - vertex_graph[i] = gtmp; - } + TGraph gtmp(1, &wire[0], &time[0]); + vertex_graph[i] = gtmp; + } - return 0; - } + return 0; + } - int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - plot_true_vertex = true; + plot_true_vertex = true; - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; - true_vertex_tick[i] = time[0]; - true_vertex_chan[i] = wire[0]; + true_vertex_tick[i] = time[0]; + true_vertex_chan[i] = wire[0]; - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); - TGraph gtmp(1, &wire[0], &time[0]); - true_vertex_graph[i] = gtmp; - } + TGraph gtmp(1, &wire[0], &time[0]); + true_vertex_graph[i] = gtmp; + } - return 0; - } + return 0; + } - int SEAviewer::Print(double plot_distance){ + int SEAviewer::Print(double plot_distance){ - std::string print_name = "SEAview_"+tag; - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); - can->Divide(4,1,0,0.1); + std::string print_name = "SEAview_"+tag; + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); + can->Divide(4,1,0,0.1); - double plot_point_size=0.4; + double plot_point_size=0.4; - //******************************* First plot "Vertex" *************************************** + //******************************* First plot "Vertex" *************************************** - //Calculate some things - //Guanqun: what does tick_min - tick_shift actually mean? - double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; - double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; - //double real_tick_min = tick_min-tick_shift ; - //double real_tick_max = tick_max+tick_shift ; + //Calculate some things + //Guanqun: what does tick_min - tick_shift actually mean? + double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; + double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; + //double real_tick_min = tick_min-tick_shift ; + //double real_tick_max = tick_max+tick_shift ; - std::vector real_wire_min(3); //real x axis edges for 3 planes - std::vector real_wire_max(3); + std::vector real_wire_min(3); //real x axis edges for 3 planes + std::vector real_wire_max(3); - for(int i=0; i<3; i++){ - TPad * pader = (TPad*)can->cd(i+1); + for(int i=0; i<3; i++){ + TPad * pader = (TPad*)can->cd(i+1); - if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); + if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); - //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) - real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; - real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; + //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) + real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; + real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; - //fix the area to show, always show area large enough to hold all track/showers - //real_wire_min[i] = chan_min[i]-chan_shift ; - //real_wire_max[i] = chan_max[i]+chan_shift ; + //fix the area to show, always show area large enough to hold all track/showers + //real_wire_min[i] = chan_min[i]-chan_shift ; + //real_wire_max[i] = chan_max[i]+chan_shift ; - vertex_graph[i].SetMarkerStyle(29); - vertex_graph[i].SetMarkerSize(2); - vertex_graph[i].SetMarkerColor(kMagenta-3); - vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); - vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); - vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); - vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); - vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - vertex_graph[i].Draw("ap"); + vertex_graph[i].SetMarkerStyle(29); + vertex_graph[i].SetMarkerSize(2); + vertex_graph[i].SetMarkerColor(kMagenta-3); + vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); + vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); + vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); + vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); + vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + vertex_graph[i].Draw("ap"); - if(i>0){ - vertex_graph[i].GetYaxis()->SetLabelOffset(999); - vertex_graph[i].GetYaxis()->SetLabelSize(0); - } - } + if(i>0){ + vertex_graph[i].GetYaxis()->SetLabelOffset(999); + vertex_graph[i].GetYaxis()->SetLabelSize(0); + } + } - /********************************* Non Slice Hits ****************************/ + /********************************* Non Slice Hits ****************************/ - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - vec_all_graphs[i].Draw("p same"); - vec_all_graphs[i].SetMarkerColor(kGray); - vec_all_graphs[i].SetFillColor(kWhite); - vec_all_graphs[i].SetMarkerStyle(20); - vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); - } - } + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + vec_all_graphs[i].Draw("p same"); + vec_all_graphs[i].SetMarkerColor(kGray); + vec_all_graphs[i].SetFillColor(kWhite); + vec_all_graphs[i].SetMarkerStyle(20); + vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); + } + } - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< m_bad_channel_list.size(); i++){ - int badchan = m_bad_channel_list[i].first; - int ok = m_bad_channel_list[i].second; + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< m_bad_channel_list.size(); i++){ + int badchan = m_bad_channel_list[i].first; + int ok = m_bad_channel_list[i].second; - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - - if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ - //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){} - can->cd(thisp+1); - TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); - //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); - l->SetLineColor(kGray+1); - l->Draw("same"); - //can->cd(thisp+5);// Guanqun: how many values can plane ID take? - //l->Draw("same"); - //can->cd(thisp+9); - //l->Draw("same"); - } - } + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + + if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ + //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){} + can->cd(thisp+1); + TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); + //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); + l->SetLineColor(kGray+1); + l->Draw("same"); + //can->cd(thisp+5);// Guanqun: how many values can plane ID take? + //l->Draw("same"); + //can->cd(thisp+9); + //l->Draw("same"); + } + } - ///******************************** Plotting all PFP's *********************************8 - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; + ///******************************** Plotting all PFP's *********************************8 + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; - if(n_pfps > (int)tcols.size()){ - for(int i =0; i< (int)(n_pfps +2); i++){ - //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - tcols.push_back(kRed); - } - } - - - for(int p=0; pcd(i+1); - if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_graphs[p][i].Draw("p same"); - vec_graphs[p][i].SetMarkerColor(tcol); - vec_graphs[p][i].SetFillColor(tcol); - vec_graphs[p][i].SetMarkerStyle(20); - vec_graphs[p][i].SetMarkerSize(plot_point_size); - } - } - } - - - //Plot all Shower lines. Might need a bit of work here.. - std::vector lines; - - for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - - //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); - - for(int i=0; i<3; i++){ - //std::cout<cd(i+1); - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; - - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; - - double x2_plot; - if(other_pt[i][0]cd(i+1); - TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); - lines.push_back(l); - l->SetLineColorAlpha(tcols[s],0.5); - l->SetLineWidth(1); - l->SetLineStyle(2); - l->Draw(); - - } - - } - - /********************************* Unassociated Hits ****************************/ - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_unass_graphs[i].Draw("p same"); - vec_unass_graphs[i].SetMarkerColor(kBlack); - vec_unass_graphs[i].SetFillColor(kBlack); - vec_unass_graphs[i].SetMarkerStyle(20); - vec_unass_graphs[i].SetMarkerSize(plot_point_size); - } - } - - /******************************* Clustered Hits ***********************************/ - // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. - if(has_been_clustered){ - - std::vector cluster_colors(vec_clusters.size()+1,0); - std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; - - for(size_t j=0; j< vec_clusters.size()+1; j++){ - int b = (int)rangen->Uniform(0,11); - int mod = (int)rangen->Uniform(-10,+3); - - cluster_colors[j] = base_col[b]+mod; - } - int c_offset = 0; - - for(auto &c: vec_clusters){ - int pl = c.getPlane(); - can->cd(pl+1); - if (c.getGraph()->GetN()>0){ - c.getGraph()->Draw("p same"); - c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); - c.getGraph()->SetFillColor(cluster_colors[c_offset]); - c.getGraph()->SetMarkerStyle(20); - //c.getGraph()->SetMarkerSize(plot_point_size); - c.getGraph()->SetMarkerSize(plot_point_size*1.5); - //std::cout<<"Printing cluster "< (int)tcols.size()){ + for(int i =0; i< (int)(n_pfps +2); i++){ + //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + tcols.push_back(kRed); + } + } + + + for(int p=0; pcd(i+1); + if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_graphs[p][i].Draw("p same"); + vec_graphs[p][i].SetMarkerColor(tcol); + vec_graphs[p][i].SetFillColor(tcol); + vec_graphs[p][i].SetMarkerStyle(20); + vec_graphs[p][i].SetMarkerSize(plot_point_size); + } + } + } + + + //Plot all Shower lines. Might need a bit of work here.. + std::vector lines; + + for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + //std::cout<cd(i+1); + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0]cd(i+1); + TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); + lines.push_back(l); + l->SetLineColorAlpha(tcols[s],0.5); + l->SetLineWidth(1); + l->SetLineStyle(2); + l->Draw(); + + } + + } + + /********************************* Unassociated Hits ****************************/ + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_unass_graphs[i].Draw("p same"); + vec_unass_graphs[i].SetMarkerColor(kBlack); + vec_unass_graphs[i].SetFillColor(kBlack); + vec_unass_graphs[i].SetMarkerStyle(20); + vec_unass_graphs[i].SetMarkerSize(plot_point_size); + } + } + + /******************************* Clustered Hits ***********************************/ + // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. + if(has_been_clustered){ + + std::vector cluster_colors(vec_clusters.size()+1,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(size_t j=0; j< vec_clusters.size()+1; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + for(auto &c: vec_clusters){ + int pl = c.getPlane(); + can->cd(pl+1); + if (c.getGraph()->GetN()>0){ + c.getGraph()->Draw("p same"); + c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); + c.getGraph()->SetFillColor(cluster_colors[c_offset]); + c.getGraph()->SetMarkerStyle(20); + //c.getGraph()->SetMarkerSize(plot_point_size); + c.getGraph()->SetMarkerSize(plot_point_size*1.5); + //std::cout<<"Printing cluster "<cd(i+1); - vertex_graph[i].Draw("p same"); + //****** just plto vertex again with elipse; + for(int i=0; i<3; i++){ + can->cd(i+1); + vertex_graph[i].Draw("p same"); - double rad_cm = 12.0; - TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); - ell_p.SetLineColor(kRed); - ell_p.SetFillStyle(0); - ell_p.Draw("same"); - } + double rad_cm = 12.0; + TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); + ell_p.SetLineColor(kRed); + ell_p.SetFillStyle(0); + ell_p.Draw("same"); + } - //**************************** INFO ***************************/ - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); + //**************************** INFO ***************************/ + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); - /*TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - */ - TLegend l_top(0.1,0.0,0.9,1.0); - l_top.SetTextSize(0.05); + /*TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + */ + TLegend l_top(0.1,0.0,0.9,1.0); + l_top.SetTextSize(0.05); - for(int p=0; p0){ - l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][1].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][2].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); - } + if(vec_graphs[p][0].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][1].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][2].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); + } - } + } - // draw legend for clustered hits if there is any - for(const auto &cluster : vec_clusters){ + // draw legend for clustered hits if there is any + for(const auto &cluster : vec_clusters){ - // only consider clusters that are second shower candidates - if(cluster.getLegend().empty()) continue; + // only consider clusters that are second shower candidates + if(cluster.getLegend().empty()) continue; - // if the cluster is out of the plotting range, do not include it in the legend - if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ - l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); - } - } + // if the cluster is out of the plotting range, do not include it in the legend + if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ + l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); + } + } - l_top.SetHeader(print_name.c_str(),"C"); - l_top.SetLineWidth(0); - l_top.SetLineColor(kWhite); - l_top.Draw("same"); + l_top.SetHeader(print_name.c_str(),"C"); + l_top.SetLineWidth(0); + l_top.SetLineColor(kWhite); + l_top.Draw("same"); - can->Update(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); + can->Update(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); - return 0; - } + return 0; + } - int SEAviewer::runseaDBSCAN(double min_pts, double eps){ + int SEAviewer::runseaDBSCAN(double min_pts, double eps){ - has_been_clustered = true; - num_clusters = {0,0,0}; - cluster_labels.resize(3); + has_been_clustered = true; + num_clusters = {0,0,0}; + cluster_labels.resize(3); - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ - std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; - std::vector> hitz; + std::vector> t_pts; + std::vector> hitz; - for(size_t p=0; p< vec_unass_pts[i].size(); p++){ - if(cluster_labels[i][p] == 0) continue;//noise - if(cluster_labels[i][p] == c){ + for(size_t p=0; p< vec_unass_pts[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ - t_pts.push_back(vec_unass_pts[i][p]); - hitz.push_back(vec_unass_hits[i][p]); - } + t_pts.push_back(vec_unass_pts[i][p]); + hitz.push_back(vec_unass_hits[i][p]); + } - } + } - if(hitz.size()!=0){ - std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + std::vector SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - // Grab the shower start and shower direction - std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + // Grab the shower start and shower direction + std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - vec_clusters[c].setShowerRemerge(is_in_shower); + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + vec_clusters[c].setShowerRemerge(is_in_shower); - std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); - std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + std::vector SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - /* - std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); - for(size_t c=0; c< vec_clusters.size(); c++){ - //Loop over all hits in this clusters - for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ - int n2_hits = vec_clusters[c2].getHits().size(); - int n2_matched = 0; - if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane - for(auto &h : vec_clusters[c].getHits()){ - //get time spread of this hit. - double pp = h->PeakTimePlusRMS(1.0); - double pm = h->PeakTimeMinusRMS(1.0); - for(auto &h2 : vec_clusters[c2].getHits()){ - if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; - } - } - percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; - std::cout<<" Cluster "<> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); + for(size_t c=0; c< vec_clusters.size(); c++){ + //Loop over all hits in this clusters + for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ + int n2_hits = vec_clusters[c2].getHits().size(); + int n2_matched = 0; + if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane + for(auto &h : vec_clusters[c].getHits()){ + //get time spread of this hit. + double pp = h->PeakTimePlusRMS(1.0); + double pm = h->PeakTimeMinusRMS(1.0); + for(auto &h2 : vec_clusters[c2].getHits()){ + if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; + } + } + percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; + std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); - - - - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ - - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); - - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - - std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); - std::cout<0){ - - - TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); - - int Npts = 20; - //TODO need to write this function - TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); - - core->Draw("p same"); - tmp->Draw("p same"); - - double fmax = -999; - double fmin = 99999; - for(int b=0; bGetN(); b++){ - double ttx=0; - double tty=0; - core->GetPoint(b,ttx,tty); - fmax = std::max(fmax, ttx); - fmin = std::min(fmin,ttx); - } - - //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad - con = core->GetFunction("pol1")->GetParameter(0); - slope = core->GetFunction("pol1")->GetParameter(1); - } - - double impact_parameter = 1e10; - - //rudimentary! - for(double k=chan_min[pl]; k< chan_max[pl];k++){ - double y = slope*k+con; - double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); - impact_parameter = std::min(impact_parameter,dist); - } - - //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower - //vertex_wire[i] vertex_tick[i] (already calcuated) - //cluster closest point )ssscorz.close_wire and close_tick - //recob::Shower start point, convered to wire tick. - std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; - std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; - double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); - double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); - double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); + //This is where I will copy over a lot of the old SSS codebase + std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); + std::cout<0){ + + + TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); + + int Npts = 20; + //TODO need to write this function + TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + + //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + } + + double impact_parameter = 1e10; + + //rudimentary! + for(double k=chan_min[pl]; k< chan_max[pl];k++){ + double y = slope*k+con; + double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); + impact_parameter = std::min(impact_parameter,dist); + } + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; + double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); + double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); + double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); - std::cout<<"SSSNEW "<tag<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + /* + //Relative to showers! + for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - std::vector> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); + std::vector> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); - for(int i=0; i<3; i++){ - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; + for(int i=0; i<3; i++){ + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; - double x2_plot; - if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; - double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); + for(size_t p = 0; p< vec_clusters[c].getPts().size(); p++){ + std::vector pt = (vec_clusters[c].getPts())[p]; + double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); - if(dist< min_d){ - min_p = (int)p; - min_d = dist; - } - } + if(dist< min_d){ + min_p = (int)p; + min_d = dist; + } + } - } + } - } + } - } - */ + } + */ - return {0}; + return {0}; - } + } - double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ - // convert {wire, tick} coordinate to [cm, cm] coordinate - double x1 =X1.at(0)*wire_con; - double y1 =X1.at(1)*tick_con; + double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ + // convert {wire, tick} coordinate to [cm, cm] coordinate + double x1 =X1.at(0)*wire_con; + double y1 =X1.at(1)*tick_con; - double x2 =X2.at(0)*wire_con; - double y2 =X2.at(1)*tick_con; + double x2 =X2.at(0)*wire_con; + double y2 =X2.at(1)*tick_con; - double x0 =point.at(0)*wire_con; - double y0 =point.at(1)*tick_con; + double x0 =point.at(0)*wire_con; + double y0 =point.at(1)*tick_con; - double x10 = x1-x0; - double y10 = y1-y0; + double x10 = x1-x0; + double y10 = y1-y0; - double x21 = x2-x1; - double y21 = y2-y1; + double x21 = x2-x1; + double y21 = y2-y1; - double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); + double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); - return sqrt(d2); + return sqrt(d2); - } + } - cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - cluster_score score(p,cl); - score.n_hits = hits.size(); + cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + cluster_score score(p,cl); + score.n_hits = hits.size(); - std::vector t_wires; - std::vector t_ticks; + std::vector t_wires; + std::vector t_ticks; - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; - score.pass = true; + score.pass = true; - // ************* Some simple metrics relative to study point (usually vertex) *************** - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; + // ************* Some simple metrics relative to study point (usually vertex) *************** + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; - score.n_wires = 0; - score.n_ticks = 0; + score.n_wires = 0; + score.n_ticks = 0; - score.impact_parameter = -99; + score.impact_parameter = -99; - score.close_tick = -99; - score.close_wire = -99; + score.close_tick = -99; + score.close_wire = -99; - std::map wire_count; - std::map tick_count; + std::map wire_count; + std::map tick_count; - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; - score.mean_wire += h_wire; - score.mean_tick += h_tick; + score.mean_wire += h_wire; + score.mean_tick += h_tick; - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); - //wierd dits - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } + //wierd dits + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } - } + } - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; - score.mean_dist = score.mean_dist/(double)score.n_hits; + score.mean_dist = score.mean_dist/(double)score.n_hits; - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } + if(score.n_wires < n_min_wires || score.n_ticks < n_min_ticks || score.pca_0 >= n_max_pca){ + score.pass = false; + } - delete principal; + delete principal; - return score; - } + return score; + } - int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error - std::vector> showerhits = pfParticleToHitsMap.at(pfp); + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error + std::vector> showerhits = pfParticleToHitsMap.at(pfp); - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); - for(auto &sh: showerhits){ + for(auto &sh: showerhits){ - if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? + if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); - double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); + double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } - } + } - } // end of hitz loop + } // end of hitz loop - if(in_primary_shower){ - return (int)s; - } - } + if(in_primary_shower){ + return (int)s; + } + } - return -1; - } + return -1; + } - TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; - std::vectorall_wire; - std::vectorall_tick; - std::vectorall_dist; + std::vectorall_wire; + std::vectorall_tick; + std::vectorall_dist; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } - // sorted_in has indices of elements in all_dist in descending order - std::vector sorted_in = seaview_sort_indexes(all_dist); - size_t max_e = std::min((size_t)Npts,hitz.size()); + // sorted_in has indices of elements in all_dist in descending order + std::vector sorted_in = seaview_sort_indexes(all_dist); + size_t max_e = std::min((size_t)Npts,hitz.size()); - for(size_t i =0; i>& hitz = cl.getHits(); - cl.f_ADC_hist.StatOverflows(kTRUE); + //grab all hits in cluster + const std::vector>& hitz = cl.getHits(); + cl.f_ADC_hist.StatOverflows(kTRUE); - for(auto& h : hitz){ - cl.f_ADC_hist.Fill(h->SummedADC()); - } + for(auto& h : hitz){ + cl.f_ADC_hist.Fill(h->SummedADC()); + } - cl.f_meanADC = cl.f_ADC_hist.GetMean(); - cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); - return; - } + cl.f_meanADC = cl.f_ADC_hist.GetMean(); + cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); + return; + } - void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ + void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ - //grab the plane number, and impact parameter of the cluster - int plane = vec_clusters.at(cluster).getPlane(); - double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); + //grab the plane number, and impact parameter of the cluster + int plane = vec_clusters.at(cluster).getPlane(); + double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); - //need to use stringstream to control the number of digits.. - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << energy; - ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; - ss3 << std::setprecision(2) << std::fixed << overlay_fraction; + //need to use stringstream to control the number of digits.. + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << energy; + ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; + ss3 << std::setprecision(2) << std::fixed << overlay_fraction; - std::string legend; - //add the truth information to the legend if the cluster is matched to a MCParticle - if(is_matched == 1){ - legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " - + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " - + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; - } - else{ - legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); - } - vec_clusters.at(cluster).setLegend(legend); - } + std::string legend; + //add the truth information to the legend if the cluster is matched to a MCParticle + if(is_matched == 1){ + legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " + + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; + } + else{ + legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); + } + vec_clusters.at(cluster).setLegend(legend); + } - void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << arg1; - ss2 << std::setprecision(2) << std::fixed << arg2; - ss3 << std::setprecision(1) << std::fixed << arg3; + void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << arg1; + ss2 << std::setprecision(2) << std::fixed << arg2; + ss3 << std::setprecision(1) << std::fixed << arg3; - if(leg == "Shower"){ - leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " - + ss3.str() + " impact par.}"; - //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; + if(leg == "Shower"){ + leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " + + ss3.str() + " impact par.}"; + //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; - }else{ - //for tracks, 3rd argument is not used - leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; - } - } + }else{ + //for tracks, 3rd argument is not used + leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; + } + } } diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h index 929b4ac4f..6f5e9c58a 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h @@ -69,383 +69,383 @@ #include "seaDBSCAN.h" namespace seaview { - class SEAviewer; + class SEAviewer; - template - std::vector seaview_sort_indexes(const std::vector &v) { - - std::vector idx(v.size()); - std::iota(idx.begin(), idx.end(), 0); //fill the range with sequentially increasing values - - // sort indexes based on comparing values in v (descending order) - std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); + template + std::vector seaview_sort_indexes(const std::vector &v) { - return idx; - } - - - - struct cluster_score{ - int plane; - int cluster_label; - double point_score; - int n_hits; - - double mean_wire; - double max_wire; - double min_wire; - double mean_tick; - double max_tick; - double min_tick; - - double close_tick; - double close_wire; - double angle;//w.r.t shower primary - - double impact_parameter; - - double max_dist_tick; - double mean_dist_tick; - double min_dist_tick; - double max_dist_wire; - double mean_dist_wire; - double min_dist_wire; - - double mean_dist; - double max_dist; - double min_dist; - - double pca_0; - double pca_1; - double pca_theta; - - int n_wires; /* number of wires spanned by the cluster */ - int n_ticks; /* number of ticks spanned by the cluster */ - - bool pass; - - cluster_score(int ip, int cl): plane(ip), cluster_label(cl){}; - }; //end of cluster_score class - - - - - class cluster { - friend class SEAviewer; - - public: - - cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){ - - f_npts = f_pts.size(); - if(pts.size() != hits.size()){ - std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); - std::vector ticks(f_npts); - for(int p =0; p< f_npts; ++p){ - wires[p]=f_pts[p][0]; - ticks[p]=f_pts[p][1]; - } - TGraph af_graph(f_npts, &wires[0], &ticks[0]); - f_graph = af_graph; - - }; - int setScore(cluster_score &in_score){ f_score = in_score;return 0;} - void setLegend(const std::string &in_leg){ - f_legend = in_leg; - } - - void setWireTickBasedLength( double d) { f_wire_tick_based_length = d;} - double getWireTickBasedLength() const {return f_wire_tick_based_length; } - bool isTrackAnalyzed() const {return f_track_treated; } - cluster_score * getScore(){return &f_score;}; - int getID() const {return f_ID;} - int getPlane() const {return f_plane; } - std::vector> getPTS() const {return f_pts;} - TGraph * getGraph(){ return &f_graph;} - TH1D* getADCHist() {return &f_ADC_hist;} - const TGraph * getGraph() const { return &f_graph;} - const std::string &getLegend() const {return f_legend; } - const std::vector>& getHits(){return f_hits;} - int getShowerRemerge() const {return f_shower_remerge;} - int setShowerRemerge(int remerge_in){ - f_shower_remerge = remerge_in; - return f_shower_remerge; - } - double getMeanADC() const { return f_meanADC; } - double getADCrms() const {return f_ADC_RMS;} - - //----------------------- second-shower relatd function ----------------------- - void setImpactParam(double d) {f_ImpactParameter = d; } - - /* brief: set the angle between direction of second shower candidate cluster and direction of the primary shower*/ - void setAngleWRTShower(double d) {f_AngleWRTShower = d;} - void setFitSlope(double d) { f_FitSlope = d;} - void setFitCons(double d) { f_FitCons = d;} - double getAngleWRTShower() const {return f_AngleWRTShower;} - double getFitSlope() const {return f_FitSlope; } - double getFitCons() const {return f_FitCons;} - double getImpactParam() const {return f_ImpactParameter; } - - - // ----------------------- track search related function ----------------------- - double getMinHitImpactParam() const {return f_min_impact_parameter_to_shower; } - double getMinHitConvDist() const { return f_min_conversion_dist_to_shower_start; } - double getMinHitIOC() const {return f_min_ioc_to_shower_start;} - double getIOCbasedLength() const {return f_ioc_based_length; } - size_t getTrackStartIdx() const {return start_hit_idx; } - size_t getTrackEndIdx() const {return end_hit_idx;} - double getMeanADCFirstHalf() const { return f_mean_ADC_first_half; } - double getMeanADCSecondHalf() const {return f_mean_ADC_second_half; } - double getMeanADCRatio() const {return f_mean_ADC_first_to_second_ratio; } - double getTrackAngleToShowerDirection() const {return f_angle_wrt_shower_direction; } - double getLinearChi() const {return f_fit_chi2; } - - /* brief: check if this cluster is fully in given slice or not - * return: 1 -> Fully in given Slice; -1 --> Fully not in given slice; 0: parts in given slices, parts not - */ - int InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID); - - // determine if the cluster is within the plot range - // tick_max, tick_min, wire_max, and wire_min are the edges of the X axis(wire) and Y axis(tick) - bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const{ - return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max; - } - - - private: - int f_ID; - int f_npts; - int f_plane; - bool f_track_treated = false; //boolean indicating whether the hits have been analyzed as track candidate - - std::vector> f_pts; //vector of {wire, tick} pairs of all the hits - std::vector> f_hits; - std::vector f_hit_group; //group the hits in two groups: first half, second half (directionality-wise) - cluster_score f_score; - int f_shower_remerge = -1; //index of the reco shower if the cluseter is close enough to a reco shower, otherwise -1. - TGraph f_graph; //2D {wire, tick} graph - TH1D f_ADC_hist; // histograms of ADC of every hit - std::string f_legend; //legend of the f_graph - - - // -------- track-like properties ------------------------- - - //add a few parameters that are useful to find tracks in no recob::track events - double f_min_impact_parameter_to_shower = 1e10; // mininum impact parameter of hits to the recob::shower direction - // will be default value if the cluster didn't pass cut on ssscore - double f_min_conversion_dist_to_shower_start = 1e10; //minimum distance of hits to the recob::shower start - double f_min_ioc_to_shower_start = 1e10; //minimum ioc of all hits to the recob::shower direction - double f_ioc_based_length = -1.0; // length of the cluster, calculated based on the IOC of hits - double f_wire_tick_based_length = -1.0; - - size_t start_hit_idx = SIZE_MAX; //index of the start hit - size_t end_hit_idx = SIZE_MAX; //index of the end hit - double f_mean_ADC_first_half = 0.0; - double f_mean_ADC_second_half = 0.0; - double f_mean_ADC_first_to_second_ratio = 0.0; - - double f_angle_wrt_shower_direction = -1.0; // angle between the cluster direction and the shower direction, in radian - // for track search, for proton track veto - double f_fit_chi2 = 0.0; //chi2 of the linear fit to the cluster (2D) - double f_ADC_RMS = -1.0; //RMS of the summed ADC of hits - double f_meanADC = -1.0; // mean of hits ADC - - - //-------- shower-like properties ------------------------------- - - double f_ImpactParameter = -1.0; //impact parameter of the vertex wrt to the cluster - double f_FitSlope = 0.0; //slope of the fitted shower/cluster direction - double f_FitCons = 0.0; //intercept of the fitted shower/cluster direction - - double f_AngleWRTShower = -1.0; //angle between cluster-vertex direction and primary_shower_start-vertex direction, assuming cluster and primary shower both point back to the vertex - // specific for second shower search for 1g1p analysis - - }; // end of class cluster - - - class SEAviewer { - - public: + std::vector idx(v.size()); + std::iota(idx.begin(), idx.end(), 0); //fill the range with sequentially increasing values - //constructor - //Keng, DetectorProperties--> DetectorPropertiesData - SEAviewer(std::string tag,geo::GeometryCore const * geom,detinfo::DetectorPropertiesData const & theDetector ); + // sort indexes based on comparing values in v (descending order) + std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); - void configure(const fhicl::ParameterSet& pset){}; + return idx; + } - int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z); - int addTrueVertex(double x, double y,double z); - /* @brief: add all the given hits to be considered for clustering - * @note: these hits are subject to further selection by filterConsideredHits() before clustering - */ - int addHitsToConsider(std::vector>& hits); - int addAllHits(std::vector>& hits); - /* @brief: filter given hits before further clustering - only use hits near vertex for clustering - * @param: dist_to_vertex - distance to vertex in cm - */ - int filterConsideredHits(double dist_to_vertex); + struct cluster_score{ + int plane; + int cluster_label; + double point_score; + int n_hits; - /* @brief: add hits for PFParticles - * @param: leg - legend for this PFParticle, for plotting purposes - * @param: if leg is 'shower', arg1 expects shower energy; arg2 expects conversion distance; arg3 expects impact parameter - * @param: if leg is 'track', arg1 expects track length; arg2 expects PCA; arg3 currently not used - */ - int addPFParticleHits(std::vector>& hits, std::string leg , double arg1 = 0.0, double arg2 = 0.0, double arg3=0.0); - int setBadChannelList(std::vector> &in); - int addShower(art::Ptr&shr); - int addTrack(art::Ptr&trk); - std::vector calcUnassociatedHits(); - int setHitThreshold(double); - int Print(double plot_distance); - int runseaDBSCAN(double min_pts, double eps); + double mean_wire; + double max_wire; + double min_wire; + double mean_tick; + double max_tick; + double min_tick; - double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ - //WireCoordinate returns the index of the nearest wire to the specified position. - double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); - return wire; - } + double close_tick; + double close_wire; + double angle;//w.r.t shower primary - double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detprop){ - double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); - return time; - } + double impact_parameter; - /* @brief: given a 3D space point, calculate the [wire, tick] of the point on 3 planes */ - std::vector> to2D(std::vector & threeD); + double max_dist_tick; + double mean_dist_tick; + double min_dist_tick; + double max_dist_wire; + double mean_dist_wire; + double min_dist_wire; + double mean_dist; + double max_dist; + double min_dist; - /* @brief: given two points on a line, and another point (in 2D space), calculate the impact parameter - * @param: 3 parameter of std::vector are {wire, tick} vectors - */ - double dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point); + double pca_0; + double pca_1; + double pca_theta; + int n_wires; /* number of wires spanned by the cluster */ + int n_ticks; /* number of ticks spanned by the cluster */ - //distance between two {wire, tick} points, in cm - double dist_point_point(double w1, double t1, double w2, double t2) const{ - return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); - } + bool pass; + cluster_score(int ip, int cl): plane(ip), cluster_label(cl){}; + }; //end of cluster_score class - //@brief: given a cluster, loop through all its hits, calc and update info on mean ADC, ADC RMS. - void BasicClusterCalorimetry(cluster& cl); - // @brief: given primary shower, analyze all the clusters in a track-like way with the assumtion that primary shower will point back to the cluster - // @param: vec_c: vector of clusters to be filled - std::vector analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); - // @brief: given primary shower, analyze all the clusters, draw them on the canvas, together with fitted direction of the cluseter (with the assumption that the cluster and primary shower both pointing back to the vertex) - // @param: vec_c: vector of clusters to be filled - std::vector analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); + class cluster { + friend class SEAviewer; + public: - // @brief: analyze cluster cl as a track candidate, and save track-related information in the cluster object - // @param: shower_start_pt_2D, shower_other_pt_2D: {wire, tick} coordinate of shower start, and another point on shower direction line, projected to the plane cl is on. - void TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D); + cluster(int ID, int plane, std::vector> &pts, std::vector> &hits) :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){ + f_npts = f_pts.size(); + if(pts.size() != hits.size()){ + std::cerr<<"seaviewer::cluster, input hits and pts not alligned"< wires(f_npts); + std::vector ticks(f_npts); + for(int p =0; p< f_npts; ++p){ + wires[p]=f_pts[p][0]; + ticks[p]=f_pts[p][1]; + } + TGraph af_graph(f_npts, &wires[0], &ticks[0]); + f_graph = af_graph; - // @brief: check if there is a hit in hitz close enought to one of the reco showers, if so return the index of that reco shower - // @param: hitz is usually a cluster of unassociated hits - int SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); + }; + int setScore(cluster_score &in_score){ f_score = in_score;return 0;} + void setLegend(const std::string &in_leg){ + f_legend = in_leg; + } + + void setWireTickBasedLength( double d) { f_wire_tick_based_length = d;} + double getWireTickBasedLength() const {return f_wire_tick_based_length; } + bool isTrackAnalyzed() const {return f_track_treated; } + cluster_score * getScore(){return &f_score;}; + int getID() const {return f_ID;} + int getPlane() const {return f_plane; } + std::vector> getPTS() const {return f_pts;} + TGraph * getGraph(){ return &f_graph;} + TH1D* getADCHist() {return &f_ADC_hist;} + const TGraph * getGraph() const { return &f_graph;} + const std::string &getLegend() const {return f_legend; } + const std::vector>& getHits(){return f_hits;} + int getShowerRemerge() const {return f_shower_remerge;} + int setShowerRemerge(int remerge_in){ + f_shower_remerge = remerge_in; + return f_shower_remerge; + } + double getMeanADC() const { return f_meanADC; } + double getADCrms() const {return f_ADC_RMS;} + + //----------------------- second-shower relatd function ----------------------- + void setImpactParam(double d) {f_ImpactParameter = d; } + + /* brief: set the angle between direction of second shower candidate cluster and direction of the primary shower*/ + void setAngleWRTShower(double d) {f_AngleWRTShower = d;} + void setFitSlope(double d) { f_FitSlope = d;} + void setFitCons(double d) { f_FitCons = d;} + double getAngleWRTShower() const {return f_AngleWRTShower;} + double getFitSlope() const {return f_FitSlope; } + double getFitCons() const {return f_FitCons;} + double getImpactParam() const {return f_ImpactParameter; } + + + // ----------------------- track search related function ----------------------- + double getMinHitImpactParam() const {return f_min_impact_parameter_to_shower; } + double getMinHitConvDist() const { return f_min_conversion_dist_to_shower_start; } + double getMinHitIOC() const {return f_min_ioc_to_shower_start;} + double getIOCbasedLength() const {return f_ioc_based_length; } + size_t getTrackStartIdx() const {return start_hit_idx; } + size_t getTrackEndIdx() const {return end_hit_idx;} + double getMeanADCFirstHalf() const { return f_mean_ADC_first_half; } + double getMeanADCSecondHalf() const {return f_mean_ADC_second_half; } + double getMeanADCRatio() const {return f_mean_ADC_first_to_second_ratio; } + double getTrackAngleToShowerDirection() const {return f_angle_wrt_shower_direction; } + double getLinearChi() const {return f_fit_chi2; } + + /* brief: check if this cluster is fully in given slice or not + * return: 1 -> Fully in given Slice; -1 --> Fully not in given slice; 0: parts in given slices, parts not + */ + int InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID); + + // determine if the cluster is within the plot range + // tick_max, tick_min, wire_max, and wire_min are the edges of the X axis(wire) and Y axis(tick) + bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const{ + return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max; + } + + + private: + int f_ID; + int f_npts; + int f_plane; + bool f_track_treated = false; //boolean indicating whether the hits have been analyzed as track candidate + + std::vector> f_pts; //vector of {wire, tick} pairs of all the hits + std::vector> f_hits; + std::vector f_hit_group; //group the hits in two groups: first half, second half (directionality-wise) + cluster_score f_score; + int f_shower_remerge = -1; //index of the reco shower if the cluseter is close enough to a reco shower, otherwise -1. + TGraph f_graph; //2D {wire, tick} graph + TH1D f_ADC_hist; // histograms of ADC of every hit + std::string f_legend; //legend of the f_graph + + + // -------- track-like properties ------------------------- + + //add a few parameters that are useful to find tracks in no recob::track events + double f_min_impact_parameter_to_shower = 1e10; // mininum impact parameter of hits to the recob::shower direction + // will be default value if the cluster didn't pass cut on ssscore + double f_min_conversion_dist_to_shower_start = 1e10; //minimum distance of hits to the recob::shower start + double f_min_ioc_to_shower_start = 1e10; //minimum ioc of all hits to the recob::shower direction + double f_ioc_based_length = -1.0; // length of the cluster, calculated based on the IOC of hits + double f_wire_tick_based_length = -1.0; + + size_t start_hit_idx = SIZE_MAX; //index of the start hit + size_t end_hit_idx = SIZE_MAX; //index of the end hit + double f_mean_ADC_first_half = 0.0; + double f_mean_ADC_second_half = 0.0; + double f_mean_ADC_first_to_second_ratio = 0.0; + + double f_angle_wrt_shower_direction = -1.0; // angle between the cluster direction and the shower direction, in radian + // for track search, for proton track veto + double f_fit_chi2 = 0.0; //chi2 of the linear fit to the cluster (2D) + double f_ADC_RMS = -1.0; //RMS of the summed ADC of hits + double f_meanADC = -1.0; // mean of hits ADC + + + //-------- shower-like properties ------------------------------- + + double f_ImpactParameter = -1.0; //impact parameter of the vertex wrt to the cluster + double f_FitSlope = 0.0; //slope of the fitted shower/cluster direction + double f_FitCons = 0.0; //intercept of the fitted shower/cluster direction + + double f_AngleWRTShower = -1.0; //angle between cluster-vertex direction and primary_shower_start-vertex direction, assuming cluster and primary shower both point back to the vertex + // specific for second shower search for 1g1p analysis + + }; // end of class cluster - // Guanqun: @brief: analyze a cluster of hits and summarize its property into an cluster_score - // argument shower is not used in the function body - cluster_score SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); - //@ brief: as name says, get Npts hits that're nearest from vertex - // return the {wire, tick} info of these hits as a TGraph - TGraph* SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + class SEAviewer { - void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction); + public: + //constructor + //Keng, DetectorProperties--> DetectorPropertiesData + SEAviewer(std::string tag,geo::GeometryCore const * geom,detinfo::DetectorPropertiesData const & theDetector ); - - //conversion from wire, tick to cm - static constexpr double wire_con = 0.3; - static constexpr double tick_con = 1.0/25.0; + void configure(const fhicl::ParameterSet& pset){}; - protected: + int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z); + int addTrueVertex(double x, double y,double z); - int n_pfps; // num of PFParticles (including shower & track) - int n_showers; //num of showers - int n_tracks; //num of tracks + /* @brief: add all the given hits to be considered for clustering + * @note: these hits are subject to further selection by filterConsideredHits() before clustering + */ + int addHitsToConsider(std::vector>& hits); + int addAllHits(std::vector>& hits); - std::string tag; - double hit_threshold; - bool has_been_clustered; - // PFP, Plane: index - std::vector> vec_graphs; //vector of graphs of [tick vs. wire] for hits of PFParticles. + /* @brief: filter given hits before further clustering - only use hits near vertex for clustering + * @param: dist_to_vertex - distance to vertex in cm + */ + int filterConsideredHits(double dist_to_vertex); - std::vector vec_pfp_legend; //legend for each PFParticle, for plotting purpose - // PFP, Plane: index - std::vector>> vec_ticks; //vector of ticks on each plane for all PFParticles - std::vector>> vec_chans; //vector of wires on each plane for all PFParticle + /* @brief: add hits for PFParticles + * @param: leg - legend for this PFParticle, for plotting purposes + * @param: if leg is 'shower', arg1 expects shower energy; arg2 expects conversion distance; arg3 expects impact parameter + * @param: if leg is 'track', arg1 expects track length; arg2 expects PCA; arg3 currently not used + */ + int addPFParticleHits(std::vector>& hits, std::string leg , double arg1 = 0.0, double arg2 = 0.0, double arg3=0.0); + int setBadChannelList(std::vector> &in); + int addShower(art::Ptr&shr); + int addTrack(art::Ptr&trk); + std::vector calcUnassociatedHits(); + int setHitThreshold(double); + int Print(double plot_distance); + int runseaDBSCAN(double min_pts, double eps); - geo::GeometryCore const * geom; - detinfo::DetectorPropertiesData const & theDetector ; + double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const& geo ){ + //WireCoordinate returns the index of the nearest wire to the specified position. + double wire = geo.WireCoordinate(Y, Z, plane, fTPC, fCryostat); + return wire; + } - double tick_shift; - double chan_shift; + double calcTime(double X,int plane,int fTPC,int fCryostat, detinfo::DetectorPropertiesData const& detprop){ + double time = detprop.ConvertXToTicks(X, plane, fTPC,fCryostat); + return time; + } - double tick_max; //min, max tick of all hits - double tick_min; - std::vector chan_max; //min, max wire of all (including vertex) - std::vector chan_min; + /* @brief: given a 3D space point, calculate the [wire, tick] of the point on 3 planes */ + std::vector> to2D(std::vector & threeD); - std::vector> m_bad_channel_list; - //Vertex, size of 3 (on 3 planes) - std::vector vertex_tick; - std::vector vertex_chan; - std::vector vertex_graph; + /* @brief: given two points on a line, and another point (in 2D space), calculate the impact parameter + * @param: 3 parameter of std::vector are {wire, tick} vectors + */ + double dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point); - bool plot_true_vertex; - //True vertex, size of 3 - std::vector true_vertex_tick; - std::vector true_vertex_chan; - std::vector true_vertex_graph; - //std::vector> considered_hits; //all hits considered for clustering - //std::vector> all_hits; - std::map,bool> map_unassociated_hits; - std::map, bool> map_considered_hits; + //distance between two {wire, tick} points, in cm + double dist_point_point(double w1, double t1, double w2, double t2) const{ + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + } - //Plane: index - std::vector vec_unass_graphs; //graph of [tick vs wire] for unassociated hits that pass the hit threshold - std::vector> vec_unass_ticks; //tick of unassso hits that pass threshold - std::vector> vec_unass_chans; - std::vector>> vec_unass_pts; // [wire, tick] pair for unassociatd hits that pass threshold on each plane - std::vector>> vec_unass_hits; //vector of unasso hits that pss hit threshold on each plane + //@brief: given a cluster, loop through all its hits, calc and update info on mean ADC, ADC RMS. + void BasicClusterCalorimetry(cluster& cl); - //Plane: index - std::vector vec_all_graphs; //graph of [tick vs wire] for all hits that are not in the slice - std::vector> vec_all_ticks; //tick of all hits that are not in the slice (grouped by plane #) - std::vector> vec_all_chans; //wire of all hits that are not in the slice on each plane. + // @brief: given primary shower, analyze all the clusters in a track-like way with the assumtion that primary shower will point back to the cluster + // @param: vec_c: vector of clusters to be filled + std::vector analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); - std::vector num_clusters; //number of clusters for unassociated hits on each plane - std::vector> cluster_labels; //one-to-one mapped cluster labels for unassociated hits in `vec_unass_pts` - TRandom3 *rangen; - // all clusters on all 3 planes, each cluster includes points/hits identified for that cluster - std::vector vec_clusters; - std::vector> vec_showers; //vector of recob::Shower contained in this class - std::vector> vec_tracks; - - //-----helper function----------- - - // form legend for recob::shower and recob::track objects - void format_legend(std::string &leg, double arg1 = 0.0, double arg2 = 0.0, double arg3 = 0.0); + // @brief: given primary shower, analyze all the clusters, draw them on the canvas, together with fitted direction of the cluseter (with the assumption that the cluster and primary shower both pointing back to the vertex) + // @param: vec_c: vector of clusters to be filled + std::vector analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, std::vector &vec_c ); - }; - //define wire conversion, tick conversion factor - constexpr double SEAviewer::wire_con; - constexpr double SEAviewer::tick_con; + // @brief: analyze cluster cl as a track candidate, and save track-related information in the cluster object + // @param: shower_start_pt_2D, shower_other_pt_2D: {wire, tick} coordinate of shower start, and another point on shower direction line, projected to the plane cl is on. + void TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D); + + + // @brief: check if there is a hit in hitz close enought to one of the reco showers, if so return the index of that reco shower + // @param: hitz is usually a cluster of unassociated hits + int SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); + + // Guanqun: @brief: analyze a cluster of hits and summarize its property into an cluster_score + // argument shower is not used in the function body + cluster_score SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); + + //@ brief: as name says, get Npts hits that're nearest from vertex + // return the {wire, tick} info of these hits as a TGraph + TGraph* SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + + void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction); + + + + //conversion from wire, tick to cm + static constexpr double wire_con = 0.3; + static constexpr double tick_con = 1.0/25.0; + + protected: + + int n_pfps; // num of PFParticles (including shower & track) + int n_showers; //num of showers + int n_tracks; //num of tracks + + std::string tag; + double hit_threshold; + bool has_been_clustered; + // PFP, Plane: index + std::vector> vec_graphs; //vector of graphs of [tick vs. wire] for hits of PFParticles. + + std::vector vec_pfp_legend; //legend for each PFParticle, for plotting purpose + // PFP, Plane: index + std::vector>> vec_ticks; //vector of ticks on each plane for all PFParticles + std::vector>> vec_chans; //vector of wires on each plane for all PFParticle + + geo::GeometryCore const * geom; + detinfo::DetectorPropertiesData const & theDetector ; + + double tick_shift; + double chan_shift; + + double tick_max; //min, max tick of all hits + double tick_min; + std::vector chan_max; //min, max wire of all (including vertex) + std::vector chan_min; + + std::vector> m_bad_channel_list; + + //Vertex, size of 3 (on 3 planes) + std::vector vertex_tick; + std::vector vertex_chan; + std::vector vertex_graph; + + bool plot_true_vertex; + //True vertex, size of 3 + std::vector true_vertex_tick; + std::vector true_vertex_chan; + std::vector true_vertex_graph; + + //std::vector> considered_hits; //all hits considered for clustering + //std::vector> all_hits; + std::map,bool> map_unassociated_hits; + std::map, bool> map_considered_hits; + + //Plane: index + std::vector vec_unass_graphs; //graph of [tick vs wire] for unassociated hits that pass the hit threshold + std::vector> vec_unass_ticks; //tick of unassso hits that pass threshold + std::vector> vec_unass_chans; + std::vector>> vec_unass_pts; // [wire, tick] pair for unassociatd hits that pass threshold on each plane + std::vector>> vec_unass_hits; //vector of unasso hits that pss hit threshold on each plane + + + //Plane: index + std::vector vec_all_graphs; //graph of [tick vs wire] for all hits that are not in the slice + std::vector> vec_all_ticks; //tick of all hits that are not in the slice (grouped by plane #) + std::vector> vec_all_chans; //wire of all hits that are not in the slice on each plane. + + std::vector num_clusters; //number of clusters for unassociated hits on each plane + std::vector> cluster_labels; //one-to-one mapped cluster labels for unassociated hits in `vec_unass_pts` + TRandom3 *rangen; + + // all clusters on all 3 planes, each cluster includes points/hits identified for that cluster + std::vector vec_clusters; + std::vector> vec_showers; //vector of recob::Shower contained in this class + std::vector> vec_tracks; + + //-----helper function----------- + + // form legend for recob::shower and recob::track objects + void format_legend(std::string &leg, double arg1 = 0.0, double arg2 = 0.0, double arg3 = 0.0); + + }; + + //define wire conversion, tick conversion factor + constexpr double SEAviewer::wire_con; + constexpr double SEAviewer::tick_con; }// namespace diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h index 3bd274140..aef8b2936 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h @@ -21,138 +21,138 @@ class seaDBSCAN{ - public: - double m_eps; - int m_minpts; + public: + double m_eps; + int m_minpts; - /// constructor - seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} + /// constructor + seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - /// Default destructor - ~seaDBSCAN(){} + /// Default destructor + ~seaDBSCAN(){} - // identify each hit to a certain cluster, or identify as noise - std::vector Scan2D(std::vector> &pts); - // get neighbour points for point i from vector pts - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - // combine elements in pts to seed if not found in seed - int UnionSets(std::vector> &seed, std::vector> &pts); - // calculate distance between (w1, t1) and (w2, t2) - double SimpleDist(double w1, double t1, double w2, double t2); + // identify each hit to a certain cluster, or identify as noise + std::vector Scan2D(std::vector> &pts); + // get neighbour points for point i from vector pts + std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); + // combine elements in pts to seed if not found in seed + int UnionSets(std::vector> &seed, std::vector> &pts); + // calculate distance between (w1, t1) and (w2, t2) + double SimpleDist(double w1, double t1, double w2, double t2); }; std::vector seaDBSCAN::Scan2D(std::vector> &pts){ - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - //Guanqun: change vector while looping over its elements - //new elements are pushed back to seed_set - this->UnionSets(seed_set, new_neighbours); - } - } + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + //Guanqun: change vector while looping over its elements + //new elements are pushed back to seed_set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; } std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB - //VERY simple, will update soon to a DB + for(size_t ip=0; ip p = pts[ip]; - for(size_t ip=0; ip p = pts[ip]; - - double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); + double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } - } } - return neighbours; + } + return neighbours; } int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - //VERY simple, will update soon if it works - for(auto &p:pts){ + //VERY simple, will update soon if it works + for(auto &p:pts){ - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + if(is_in == false){ + seed.push_back(p); } + } + - return 0; + return 0; } double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ - // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 - double wire_con = 0.3; - double tick_con = 1.0/25.0; + // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 + double wire_con = 0.3; + double tick_con = 1.0/25.0; - return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); } From e7a7301a6d6852e43449061d6cf537245e5337c6 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Thu, 21 Jul 2022 20:05:45 -0500 Subject: [PATCH 43/54] minor edits on helper_math.cxx --- sbncode/CMakeLists.txt | 40 +++++++++---------- .../HelperFunctions/helper_math.cxx | 3 +- .../Libraries/Processors.cxx | 1 + 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sbncode/CMakeLists.txt b/sbncode/CMakeLists.txt index dc6176464..051d0d3b9 100644 --- a/sbncode/CMakeLists.txt +++ b/sbncode/CMakeLists.txt @@ -6,23 +6,23 @@ cet_find_library( WDA NAMES wda PATHS ENV LIBWDA_LIB NO_DEFAULT_PATH ) find_ups_product(sbnanaobj) add_subdirectory(SinglePhotonAnalysis) -#add_subdirectory(SBNEventWeight) -#add_subdirectory(NuMuSelection) -#add_subdirectory(OpDet) -#add_subdirectory(OpT0Finder) -# -#add_subdirectory(CAFMaker) -#add_subdirectory(Metadata) -# -#add_subdirectory(Calibration) -#add_subdirectory(FlashMatch) -#add_subdirectory(LArRecoProducer) -#add_subdirectory(TPCReco) -# -# -#add_subdirectory(BeamSpillInfoRetriever) -#add_subdirectory(FluxReader) -#add_subdirectory(EventGenerator) -#add_subdirectory(PID) -#add_subdirectory(GeometryTools) -#add_subdirectory(CosmicID) +add_subdirectory(SBNEventWeight) +add_subdirectory(NuMuSelection) +add_subdirectory(OpDet) +add_subdirectory(OpT0Finder) + +add_subdirectory(CAFMaker) +add_subdirectory(Metadata) + +add_subdirectory(Calibration) +add_subdirectory(FlashMatch) +add_subdirectory(LArRecoProducer) +add_subdirectory(TPCReco) + + +add_subdirectory(BeamSpillInfoRetriever) +add_subdirectory(FluxReader) +add_subdirectory(EventGenerator) +add_subdirectory(PID) +add_subdirectory(GeometryTools) +add_subdirectory(CosmicID) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx index 69bc22162..7df015f5f 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx @@ -27,7 +27,6 @@ namespace single_photon double z21 = z2-z1; double t = -(x10*x21+y10*y21+z10*z21)/fabs(x21*x21+y21*y21+z21*z21 ); - // right, but can be simplified double d2 = pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0)+(z2-z1)*(z1-z0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)+pow(z2-z1,2)); @@ -53,7 +52,7 @@ namespace single_photon double s1x = s1->ShowerStart().X()-vx; double s1y = s1->ShowerStart().Y()-vy; double s1z = s1->ShowerStart().Z()-vz; - double norm1 = std::hypot(s1x,s1y,s1z); + double norm1 = std::hypot(s1x,s1y,s1z);//distance btw two points with coordinate difference s1x, s1y, s1z s1x = s1x/norm1; //unit vector pointing to shower start from point (vx, vy,vz) s1y = s1y/norm1; s1z = s1z/norm1; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx index e6e080a45..f16823da6 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx @@ -366,6 +366,7 @@ namespace single_photon TVector3 shower_dir(shower->Direction().X(), shower->Direction().Y(),shower->Direction().Z()); //calculate the pitch for this plane + //CHECK upgradable, see ./Calibration/TrackCaloSkimmer_module.cc line 746 double pitch = getPitch(shower_dir, plane); //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The pitch between the shower and plane "< Date: Tue, 26 Jul 2022 00:25:10 -0500 Subject: [PATCH 44/54] add geometry service for wire angles --- .../HelperFunctions/helper_math.cxx | 33 ------------ .../HelperFunctions/helper_math.h | 12 ----- .../Libraries/Processors.cxx | 54 ++++++++++++++----- .../Libraries/Processors.h | 2 +- .../Libraries/analyze_PandoraReco.cxx | 35 +++++++++--- .../SinglePhoton_module.cc | 23 ++++++-- 6 files changed, 88 insertions(+), 71 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx index 7df015f5f..06a61178e 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.cxx @@ -85,39 +85,6 @@ namespace single_photon } - - - - - - /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - TVector3 getWireVec(int plane){ - TVector3 wire_dir; - if (plane == 0){ - wire_dir = {0., -sqrt(3) / 2., 1 / 2.}; - } else if (plane == 1){ - wire_dir = {0., sqrt(3) / 2., 1 / 2.}; - } else if (plane == 2) { - wire_dir = {0., 0., 1.}; - } - return wire_dir; - } - - - /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - double getAnglewrtWires(TVector3 shower_dir,int plane){ - - TVector3 wire_dir = getWireVec(plane); - double cos_theta = getCoswrtWires(shower_dir, wire_dir); - - double theta = acos(cos_theta); - // return abs(theta); - return abs(M_PI/2 - theta); - - } - - double getMedian(std::vector thisvector){ size_t len = thisvector.size(); if(len < 1) return NAN; diff --git a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h index 220d8d594..7c1717773 100644 --- a/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h +++ b/sbncode/SinglePhotonAnalysis/HelperFunctions/helper_math.h @@ -78,18 +78,6 @@ namespace single_photon // invariant mass of two showers, calculated directly from shower directions double invar_mass(art::Ptr & s1, double E1, art::Ptr &s2, double E2); - - - - - /* unit vector orthogonal to the wire direction of plane -- usually named as wire_dir */ - TVector3 getWireVec(int plane); - - - /* returns angles between wire direction of plane and shower_dir) - * shower_dir needs to be unit vector */ - double getAnglewrtWires(TVector3 shower_dir,int plane); - double getMedian(std::vector thisvector); /* returns (generally) best median dEdx of all 3 diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx index f16823da6..9533b0b6f 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx @@ -355,7 +355,8 @@ namespace single_photon std::vector CalcdQdxShower( const art::Ptr& shower, const std::vector> & clusters, - std::map, std::vector> > & clusterToHitMap ,int plane, + std::map, std::vector> > & clusterToHitMap , + int plane, double triggeroffset, detinfo::DetectorPropertiesData const & theDetector){ //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The number of clusters in this shower is "<Direction().X(), shower->Direction().Y(),shower->Direction().Z()); //calculate the pitch for this plane - //CHECK upgradable, see ./Calibration/TrackCaloSkimmer_module.cc line 746 - double pitch = getPitch(shower_dir, plane); - //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ @@ -418,21 +420,47 @@ namespace single_photon return dqdx; } - double getPitch(TVector3 shower_dir, int plane){ - //get the wire direction for this plane - values are hardcoded which isn't great but the TPC geom object gave weird values - TVector3 wire_dir = getWireVec(plane); + std::vector getPitch(TVector3 shower_dir){ + + std::vector pitches; + for (geo::PlaneGeo const& plane: geom->IteratePlanes()) { + //6 planes in SBND + //WireAngleToVertical : 30 ,150,90,150,30 ,90 + //ub wire angles : 30 ,150,90 (respected to beam,z) + //Pitch : 0.3,0.3,0.3,0.3,0.3,0.3 + + const double angToVert(geom->WireAngleToVertical(plane.View(), plane.ID())+0.5*M_PI);//wire angle respected to z + pi/2 + + TVector3 wire_vector; + if(abs(angToVert) < 1e-9 ){ + wire_vector = {0,0,1}; + } else{ + wire_vector = { 0 , sin(angToVert) ,cos(angToVert) }; + } - //take dot product of shower and wire dir - double cos = getCoswrtWires(shower_dir, wire_dir); + // std::cout<<" Angle "<, std::vector> > & clusterToHitMap , double triggeroffset, detinfo::DetectorPropertiesData const & theDetector - ){ + ){ // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"< reco_shr_angles_wrt_wires; + for (geo::PlaneGeo const& plane: geom->IteratePlanes()) { + //6 planes in SBND + //WireAngleToVertical : 30 ,150,90,150,30 ,90 + //ub wire angles : 30 ,150,90 (respected to beam,z) + //Pitch : 0.3,0.3,0.3,0.3,0.3,0.3 + + const double angToVert(geom->WireAngleToVertical(plane.View(), plane.ID())+0.5*M_PI);//wire angle respected to z + pi/2 + + TVector3 wire_vector; + if(abs(angToVert) < 1e-9 ){ + wire_vector = {0,0,1}; + } else{ + wire_vector = { 0 , sin(angToVert) ,cos(angToVert) }; + } + + // std::cout<<" Angle "<(); // detClocks = lar::providerFrom(); // SCE = lar::providerFrom();//Get space charge service -// geom = lar::providerFrom(); + geom = lar::providerFrom(); std::cout<<"SinglePhoton::"<<__FUNCTION__<<" now can start jobs --------------------"<get_IsNuSlice() ) continue;//pass slice not defined as nu-slice in above lines + if(temp_pf->get_HasTrack()){ + tracks.push_back(temp_pf->pTrack); + trackToNuPFParticleMap[temp_pf->pTrack] = temp_pf->pPFParticle; + } + if(temp_pf->get_HasShower()){ + showers.push_back(temp_pf->pShower); + showerToNuPFParticleMap[temp_pf->pShower] = temp_pf->pPFParticle; + } + } + //Helper function (can be found below) to collect tracks and showers in neutrino slice -// this->CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + //this->CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); //Track Calorimetry. Bit odd here but bear with me, good to match and fill here From a068443ed349be6aef21f365262effe6d7678adf Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Wed, 27 Jul 2022 16:34:04 -0500 Subject: [PATCH 45/54] geant4 variables now go into a struct --- .../Libraries/analyze_MC.cxx | 38 ++++---- .../Libraries/init_branches.cxx | 88 +++++++++---------- .../Libraries/init_branches.h | 26 +----- .../Libraries/variables.h | 57 ++++++++---- .../SinglePhoton_module.cc | 7 +- 5 files changed, 110 insertions(+), 106 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx index 39eb724b6..10d73bdc9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx @@ -8,7 +8,7 @@ namespace single_photon { //analyze_Geant4.h - void AnalyzeGeant4( const std::vector> &mcParticleVector){ + void AnalyzeGeant4( const std::vector> &mcParticleVector, var_geant4 m_collection_geant4){ std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); @@ -32,24 +32,24 @@ namespace single_photon }, spacers); - m_geant4_pdg.push_back(mcp->PdgCode()); - m_geant4_trackid.push_back(mcp->TrackId()); - m_geant4_statuscode.push_back(mcp->StatusCode()); - m_geant4_mother.push_back(mcp->Mother()); - m_geant4_E.push_back(mcp->E()); - m_geant4_mass.push_back(mcp->Mass()); - m_geant4_px.push_back(mcp->Px()); - m_geant4_py.push_back(mcp->Py()); - m_geant4_pz.push_back(mcp->Pz()); - m_geant4_vx.push_back(mcp->Vx()); - m_geant4_vy.push_back(mcp->Vy()); - m_geant4_vz.push_back(mcp->Vz()); - m_geant4_end_process.push_back(mcp->EndProcess()); - m_geant4_process.push_back(mcp->Process()); - m_geant4_costheta.push_back(m_geant4_pz.back()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); - m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_geant4_pz.back(),2)+pow(m_geant4_px.back(),2)+pow(m_geant4_py.back(),2))); + m_collection_geant4.m_geant4_pdg.push_back(mcp->PdgCode()); + m_collection_geant4.m_geant4_trackid.push_back(mcp->TrackId()); + m_collection_geant4.m_geant4_statuscode.push_back(mcp->StatusCode()); + m_collection_geant4.m_geant4_mother.push_back(mcp->Mother()); + m_collection_geant4.m_geant4_E.push_back(mcp->E()); + m_collection_geant4.m_geant4_mass.push_back(mcp->Mass()); + m_collection_geant4.m_geant4_px.push_back(mcp->Px()); + m_collection_geant4.m_geant4_py.push_back(mcp->Py()); + m_collection_geant4.m_geant4_pz.push_back(mcp->Pz()); + m_collection_geant4.m_geant4_vx.push_back(mcp->Vx()); + m_collection_geant4.m_geant4_vy.push_back(mcp->Vy()); + m_collection_geant4.m_geant4_vz.push_back(mcp->Vz()); + m_collection_geant4.m_geant4_end_process.push_back(mcp->EndProcess()); + m_collection_geant4.m_geant4_process.push_back(mcp->Process()); + m_collection_geant4.m_geant4_costheta.push_back(m_collection_geant4.m_geant4_pz.back()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); + m_collection_geant4.m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); + m_collection_geant4.m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); + m_collection_geant4.m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); if(j>2)break; } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx index 3eaa6515f..8fb1a107e 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx @@ -1998,52 +1998,52 @@ namespace single_photon } //analyze_Geant4.h - void ClearGeant4Branches(){ - - m_geant4_pdg.clear(); - m_geant4_trackid.clear(); - m_geant4_mother.clear(); - m_geant4_statuscode.clear(); - m_geant4_E.clear(); - m_geant4_mass.clear(); - m_geant4_px.clear(); - m_geant4_py.clear(); - m_geant4_pz.clear(); - m_geant4_dx.clear(); - m_geant4_dy.clear(); - m_geant4_dz.clear(); - - m_geant4_vx.clear(); - m_geant4_vy.clear(); - m_geant4_vz.clear(); - m_geant4_process.clear(); - m_geant4_end_process.clear(); - - m_geant4_costheta.clear(); + void ClearGeant4Branches(var_geant4 m_collection_geant4){ + + m_collection_geant4.m_geant4_pdg.clear(); + m_collection_geant4.m_geant4_trackid.clear(); + m_collection_geant4.m_geant4_mother.clear(); + m_collection_geant4.m_geant4_statuscode.clear(); + m_collection_geant4.m_geant4_E.clear(); + m_collection_geant4.m_geant4_mass.clear(); + m_collection_geant4.m_geant4_px.clear(); + m_collection_geant4.m_geant4_py.clear(); + m_collection_geant4.m_geant4_pz.clear(); + m_collection_geant4.m_geant4_dx.clear(); + m_collection_geant4.m_geant4_dy.clear(); + m_collection_geant4.m_geant4_dz.clear(); + + m_collection_geant4.m_geant4_vx.clear(); + m_collection_geant4.m_geant4_vy.clear(); + m_collection_geant4.m_geant4_vz.clear(); + m_collection_geant4.m_geant4_process.clear(); + m_collection_geant4.m_geant4_end_process.clear(); + + m_collection_geant4.m_geant4_costheta.clear(); } - void CreateGeant4Branches(){ - geant4_tree->Branch("geant4_pdg",&m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_geant4_px); - geant4_tree->Branch("geant4_py", &m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_geant4_process); + void CreateGeant4Branches(var_geant4 m_collection_geant4){ + geant4_tree->Branch("geant4_pdg",&m_collection_geant4.m_geant4_pdg); + geant4_tree->Branch("geant4_trackid",&m_collection_geant4.m_geant4_trackid); + geant4_tree->Branch("geant4_mother",&m_collection_geant4.m_geant4_mother); + geant4_tree->Branch("geant4_statuscode",&m_collection_geant4.m_geant4_statuscode); + geant4_tree->Branch("geant4_E",&m_collection_geant4.m_geant4_E); + geant4_tree->Branch("geant4_mass",&m_collection_geant4.m_geant4_mass); + geant4_tree->Branch("geant4_px", &m_collection_geant4.m_geant4_px); + geant4_tree->Branch("geant4_py", &m_collection_geant4.m_geant4_py); + geant4_tree->Branch("geant4_pz", &m_collection_geant4.m_geant4_pz); + + geant4_tree->Branch("geant4_dx", &m_collection_geant4.m_geant4_dx); + geant4_tree->Branch("geant4_dy", &m_collection_geant4.m_geant4_dy); + geant4_tree->Branch("geant4_dz", &m_collection_geant4.m_geant4_dz); + + geant4_tree->Branch("geant4_vx", &m_collection_geant4.m_geant4_vx); + geant4_tree->Branch("geant4_vy", &m_collection_geant4.m_geant4_vy); + geant4_tree->Branch("geant4_vz", &m_collection_geant4.m_geant4_vz); + geant4_tree->Branch("geant4_costheta",&m_collection_geant4.m_geant4_costheta); + + geant4_tree->Branch("geant4_end_process", &m_collection_geant4.m_geant4_end_process); + geant4_tree->Branch("geant4_process", &m_collection_geant4.m_geant4_process); } //analyze_Slice.h diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index c3e6d9f29..b2451d7eb 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -1015,25 +1015,7 @@ namespace single_photon std::vector m_reco_track_pid_chi2_p_plane2; std::vector m_reco_track_pid_three_plane_proton_pid; - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; + //matching variables int m_reco_slice_num; //total number of slices in the event std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event @@ -1140,9 +1122,9 @@ namespace single_photon /** * @brief: fill event weight related variables */ - void ClearGeant4Branches(); /* reset eventweight related variable */ - void CreateGeant4Branches(); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector); + void ClearGeant4Branches(var_geant4 m_collection_geant4); /* reset eventweight related variable */ + void CreateGeant4Branches(var_geant4 m_collection_geant4); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector,var_geant4 m_collection_geant4); void ClearSlices(); /* reset and clear variables/vectors related to slice */ diff --git a/sbncode/SinglePhotonAnalysis/Libraries/variables.h b/sbncode/SinglePhotonAnalysis/Libraries/variables.h index 1e1661475..93615efa7 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/variables.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/variables.h @@ -1050,24 +1050,45 @@ namespace single_photon extern std::vector m_reco_track_pid_three_plane_proton_pid; //Geant4 - extern std::vector m_geant4_pdg; - extern std::vector m_geant4_trackid; - extern std::vector m_geant4_mother; - extern std::vector m_geant4_statuscode; - extern std::vector m_geant4_E; - extern std::vector m_geant4_mass; - extern std::vector m_geant4_px; - extern std::vector m_geant4_py; - extern std::vector m_geant4_pz; - extern std::vector m_geant4_vx; - extern std::vector m_geant4_vy; - extern std::vector m_geant4_vz; - extern std::vector m_geant4_dx; - extern std::vector m_geant4_dy; - extern std::vector m_geant4_dz; - extern std::vector m_geant4_process; - extern std::vector m_geant4_end_process; - extern std::vector m_geant4_costheta; + struct var_geant4{ + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + }; +// extern std::vector m_geant4_pdg; +// extern std::vector m_geant4_trackid; +// extern std::vector m_geant4_mother; +// extern std::vector m_geant4_statuscode; +// extern std::vector m_geant4_E; +// extern std::vector m_geant4_mass; +// extern std::vector m_geant4_px; +// extern std::vector m_geant4_py; +// extern std::vector m_geant4_pz; +// extern std::vector m_geant4_vx; +// extern std::vector m_geant4_vy; +// extern std::vector m_geant4_vz; +// extern std::vector m_geant4_dx; +// extern std::vector m_geant4_dy; +// extern std::vector m_geant4_dz; +// extern std::vector m_geant4_process; +// extern std::vector m_geant4_end_process; +// extern std::vector m_geant4_costheta; //matching variables extern int m_reco_slice_num; //total number of slices in the event diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 43e68cbe1..5a3dff62e 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -106,6 +106,7 @@ namespace single_photon class SinglePhoton : public art::EDFilter { public: + var_geant4 m_collection_geant4; /** * @brief Constructor * @@ -786,7 +787,7 @@ namespace single_photon ClearMCTruths(); ClearEventWeightBranches(); fmcweight.clear(); - ClearGeant4Branches(); + ClearGeant4Branches(m_collection_geant4); ClearSlices(); Output_EventMeta( evt ); @@ -1394,7 +1395,7 @@ namespace single_photon //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< Date: Sat, 30 Jul 2022 17:22:43 -0500 Subject: [PATCH 46/54] a compilable version --- .../Libraries/Processors.cxx | 214 +- .../Libraries/Processors.h | 31 +- .../Libraries/analyze_MC.cxx | 721 +-- .../Libraries/analyze_MC.h | 17 +- .../Libraries/analyze_PandoraReco.cxx | 961 ++-- .../Libraries/analyze_PandoraReco.h | 15 +- .../Libraries/fiducial_volume.cxx | 64 +- .../Libraries/fiducial_volume.h | 10 +- .../Libraries/init_branches.cxx | 4116 ++++++++--------- .../Libraries/init_branches.h | 1134 +---- .../Libraries/reco_truth_matching.cxx | 247 +- .../Libraries/reco_truth_matching.h | 12 +- .../Libraries/second_shower_search.cxx | 1849 ++++---- .../Libraries/second_shower_search.h | 63 +- .../Libraries/variables.h | 2183 +++++---- .../SinglePhoton_module.cc | 2820 +++++------ 16 files changed, 6448 insertions(+), 8009 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx index 9533b0b6f..1e4f7d0a9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/Processors.cxx @@ -69,9 +69,6 @@ namespace single_photon corrected[1]=ky+yOffset; corrected[2]=kz+zOffset; - //std::cout<<"SinglePhoton\t||\tTRIGGER_OFF: "<ConvertTicksToX(g4Ticks, 0, 0, 0)<<" "<T(): "<T()<<" TPCG4Time2Tick(): "<TPCG4Time2Tick(mcparticle->T())<<". "<GetXTicksOffset(0,0,0)<<" "<trigger_offset()<, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + var_all& vars){ // if (evt.isRealData()) // throw cet::exception("LArPandora") << " PandoraCollector::CollectMCParticles --- Trying to access MC truth from real data "; @@ -135,8 +133,8 @@ namespace single_photon void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector) { - // if (evt.isRealData()) - // throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; + if (evt.isRealData()) + throw cet::exception("LArPandora") << " PandoraCollector::CollectSimChannels --- Trying to access MC truth from real data "; art::Handle< std::vector > theSimChannels; evt.getByLabel(label, theSimChannels); @@ -166,14 +164,15 @@ namespace single_photon std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, - std::map< int, art::Ptr > & MCParticleToTrackIdMap){ + std::map< int, art::Ptr > & MCParticleToTrackIdMap, + var_all& vars){ std::vector< art::Ptr > simChannelVector; std::map< art::Ptr, std::vector> > truthToParticles; std::map< art::Ptr, art::Ptr > particlesToTruth; std::map< art::Ptr, std::vector< sim::TrackIDE > > hitsToTrackIDEs; CollectSimChannels(evt, label, simChannelVector); - CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap); + CollectMCParticles(evt, label, truthToParticles, particlesToTruth, MCParticleToTrackIdMap, vars); //Collect the links from reconstructed hits to their true energy deposits. lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(evt, hitVector, simChannelVector, hitsToTrackIDEs); @@ -183,44 +182,44 @@ namespace single_photon } - bool Pi0PreselectionFilter(){ + bool Pi0PreselectionFilter(var_all& vars, para_all& paras){ - if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; - if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; - if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + if(vars.m_vertex_pos_x < paras.s_tpc_active_XMin|| vars.m_vertex_pos_x > paras.s_tpc_active_XMax) return false; + if(vars.m_vertex_pos_y < paras.s_tpc_active_YMin || vars.m_vertex_pos_y > paras.s_tpc_active_YMax) return false; + if(vars.m_vertex_pos_z < paras.s_tpc_active_ZMin|| vars.m_vertex_pos_z > paras.s_tpc_active_ZMax) return false; - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=1) return false; - if(m_reco_vertex_size<1) return false; + if(vars.m_reco_asso_showers!=2) return false; + if(vars.m_reco_asso_tracks!=1) return false; + if(vars.m_reco_vertex_size<1) return false; - if(m_reco_shower_conversion_distance.size()!=2) return false; - if(m_reco_shower_conversion_distance[0]<1. || m_reco_shower_conversion_distance[1]<1.) return false; + if(vars.m_reco_shower_conversion_distance.size()!=2) return false; + if(vars.m_reco_shower_conversion_distance[0]<1. || vars.m_reco_shower_conversion_distance[1]<1.) return false; return true; } - bool Pi0PreselectionFilter2g0p(){ - if(m_vertex_pos_x < m_tpc_active_XMin|| m_vertex_pos_x > m_tpc_active_XMax) return false; - if(m_vertex_pos_y < m_tpc_active_YMin || m_vertex_pos_y > m_tpc_active_YMax) return false; - if(m_vertex_pos_z < m_tpc_active_ZMin|| m_vertex_pos_z > m_tpc_active_ZMax) return false; + bool Pi0PreselectionFilter2g0p(var_all& vars, para_all& paras){ + if(vars.m_vertex_pos_x < paras.s_tpc_active_XMin|| vars.m_vertex_pos_x > paras.s_tpc_active_XMax) return false; + if(vars.m_vertex_pos_y < paras.s_tpc_active_YMin || vars.m_vertex_pos_y > paras.s_tpc_active_YMax) return false; + if(vars.m_vertex_pos_z < paras.s_tpc_active_ZMin|| vars.m_vertex_pos_z > paras.s_tpc_active_ZMax) return false; - if(m_reco_asso_showers!=2) return false; - if(m_reco_asso_tracks!=0) return false; - if(m_reco_vertex_size<1) return false; + if(vars.m_reco_asso_showers!=2) return false; + if(vars.m_reco_asso_tracks!=0) return false; + if(vars.m_reco_vertex_size<1) return false; - if(m_reco_shower_energy_max.size()!=2) return false; + if(vars.m_reco_shower_energy_max.size()!=2) return false; //if the maximum energy of all showers on all planes is smaller than 30 - if(m_reco_shower_energy_max[m_reco_shower_ordered_energy_index[0]]<30.) return false; + if(vars.m_reco_shower_energy_max[vars.m_reco_shower_ordered_energy_index[0]]<30.) return false; return true; } - bool IsEventInList(int run, int subrun, int event){ - if(m_selected_set.find( {run, subrun, event} ) == m_selected_set.end()){ - if(m_selected_set.find({run, subrun}) == m_selected_set.end() ){ - if(m_selected_set.find({run}) == m_selected_set.end()) + bool IsEventInList(int run, int subrun, int event, var_all& vars){ + if(vars.m_selected_set.find( {run, subrun, event} ) == vars.m_selected_set.end()){ + if(vars.m_selected_set.find({run, subrun}) == vars.m_selected_set.end() ){ + if(vars.m_selected_set.find({run}) == vars.m_selected_set.end()) return false; } } @@ -232,7 +231,7 @@ namespace single_photon //determines if a point is inside the rectangle by summing the areas of the four triangles made by //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle //also returns true if the point is on the boundary - bool isInsidev2(std::vector thishit_pos, std::vector> rectangle){ + bool isInsidev2(std::vector thishit_pos, std::vector> rectangle, para_all& paras){ int n_vertices = (int)rectangle.size(); //bool inside = false; int i, j = 0; @@ -246,7 +245,7 @@ namespace single_photon areas += this_area; } //calc area of the rectangle - double area_rectangle = m_width_dqdx_box* m_length_dqdx_box; + double area_rectangle = paras.s_width_dqdx_box* paras.s_length_dqdx_box; //check the sum of areas match if (abs(areas - area_rectangle) <= 0.001 ){ @@ -257,41 +256,41 @@ namespace single_photon //helpers for calculating calometry - double CalcEShower(const std::vector> &hits){ - double energy[3] = {0., 0., 0.}; - - //std::cout<<"AnalyzeShowers() \t||\t Looking at shower with "<View(); - - //skip invalid planes - if (plane > 2 || plane < 0) continue; - - //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); - - //add the energy to the plane - energy[plane] += E; - }//for each hiti - - //find the max energy on a single plane - double max = energy[0]; - for (double en: energy){ - if( en > max){ - max = en; - } - } - // std::cout<<"AnalyzeShowers() \t||\t The energy on each plane for this shower is "<> &hits, var_all& vars){ +// double energy[3] = {0., 0., 0.}; +// +// //std::cout<<"AnalyzeShowers() \t||\t Looking at shower with "<View(); +// +// //skip invalid planes +// if (plane > 2 || plane < 0) continue; +// +// //calc the energy of the hit +// double E = QtoEConversion(GetQHit(thishitptr, plane, vars), vars); +// +// //add the energy to the plane +// energy[plane] += E; +// }//for each hiti +// +// //find the max energy on a single plane +// double max = energy[0]; +// for (double en: energy){ +// if( en > max){ +// max = en; +// } +// } +// // std::cout<<"AnalyzeShowers() \t||\t The energy on each plane for this shower is "<>& hits, int this_plane){ + double CalcEShowerPlane(const std::vector>& hits, int this_plane, para_all& paras){ double energy = 0.; //for each hit in the shower @@ -303,7 +302,7 @@ namespace single_photon if (plane != this_plane ) continue; //calc the energy of the hit - double E = QtoEConversion(GetQHit(thishitptr, plane)); + double E = QtoEConversion(GetQHit(thishitptr, plane, paras), paras); //add the energy to the plane energy += E; }//for each hit @@ -315,15 +314,15 @@ namespace single_photon - double GetQHit(art::Ptr thishitptr, int plane){ + double GetQHit(art::Ptr thishitptr, int plane, para_all& paras){ double gain; //choose gain based on whether data/mc and by plane - if (m_is_data == false && m_is_overlayed == false){ - gain = m_gain_mc[plane] ; - //if (m_is_verbose) std::cout<<"the gain for mc on plane "< CalcdEdxFromdQdx(std::vector dqdx){ + std::vector CalcdEdxFromdQdx(std::vector dqdx, para_all& paras){ int n = dqdx.size(); std::vector dedx(n,0.0); for (int i = 0; i < n; i++){ //std::cout<<"The dQ/dx is "<, std::vector> > & clusterToHitMap , int plane, double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector){ - //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The number of clusters in this shower is "< dqdx; //get the 3D shower direction @@ -368,9 +369,9 @@ namespace single_photon //calculate the pitch for this plane //CHECK upgradable, see ./Calibration/TrackCaloSkimmer_module.cc line 746 - double pitch = getPitch(shower_dir)[plane]; + double pitch = getPitch(shower_dir, paras)[plane]; - if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The pitch between the shower and plane "< &thiscluster: clusters){ @@ -381,15 +382,15 @@ namespace single_photon std::vector cluster_axis = {cos(thiscluster->StartAngle()), sin(thiscluster->StartAngle())}; //get the cluster start and and in CM - //std::cout<<"for plane/tpc/cryo:"<GetXTicksOffset(plane, m_TPC, m_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(m_TPC, m_Cryostat)<GetXTicksOffset(plane, paras.s_TPC, paras.s_Cryostat)<<" fXTicksCoefficient: "<GetXTicksCoefficient(paras.s_TPC, paras.s_Cryostat)< cluster_start = {thiscluster->StartWire() * m_wire_spacing,(thiscluster->StartTick() - triggeroffset)* _time2cm}; - std::vector cluster_end = {thiscluster->EndWire() * m_wire_spacing,(thiscluster->EndTick() - triggeroffset)* _time2cm }; + std::vector cluster_start = {thiscluster->StartWire() * paras.s_wire_spacing,(thiscluster->StartTick() - triggeroffset)* paras._time2cm}; + std::vector cluster_end = {thiscluster->EndWire() * paras.s_wire_spacing,(thiscluster->EndTick() - triggeroffset)* paras._time2cm }; //check that the cluster has non-zero length double length = sqrt(pow(cluster_end[0] - cluster_start[0], 2) + pow(cluster_end[1] - cluster_start[1], 2)); - //if(m_is_verbose) std::cout<<"AnalyzeShowers() \t||\t The cluster length is "<PdgCode()); - m_collection_geant4.m_geant4_trackid.push_back(mcp->TrackId()); - m_collection_geant4.m_geant4_statuscode.push_back(mcp->StatusCode()); - m_collection_geant4.m_geant4_mother.push_back(mcp->Mother()); - m_collection_geant4.m_geant4_E.push_back(mcp->E()); - m_collection_geant4.m_geant4_mass.push_back(mcp->Mass()); - m_collection_geant4.m_geant4_px.push_back(mcp->Px()); - m_collection_geant4.m_geant4_py.push_back(mcp->Py()); - m_collection_geant4.m_geant4_pz.push_back(mcp->Pz()); - m_collection_geant4.m_geant4_vx.push_back(mcp->Vx()); - m_collection_geant4.m_geant4_vy.push_back(mcp->Vy()); - m_collection_geant4.m_geant4_vz.push_back(mcp->Vz()); - m_collection_geant4.m_geant4_end_process.push_back(mcp->EndProcess()); - m_collection_geant4.m_geant4_process.push_back(mcp->Process()); - m_collection_geant4.m_geant4_costheta.push_back(m_collection_geant4.m_geant4_pz.back()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); - m_collection_geant4.m_geant4_dx.push_back(mcp->Px()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); - m_collection_geant4.m_geant4_dy.push_back(mcp->Py()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); - m_collection_geant4.m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(m_collection_geant4.m_geant4_pz.back(),2)+pow(m_collection_geant4.m_geant4_px.back(),2)+pow(m_collection_geant4.m_geant4_py.back(),2))); + vars.m_geant4_pdg.push_back(mcp->PdgCode()); + vars.m_geant4_trackid.push_back(mcp->TrackId()); + vars.m_geant4_statuscode.push_back(mcp->StatusCode()); + vars.m_geant4_mother.push_back(mcp->Mother()); + vars.m_geant4_E.push_back(mcp->E()); + vars.m_geant4_mass.push_back(mcp->Mass()); + vars.m_geant4_px.push_back(mcp->Px()); + vars.m_geant4_py.push_back(mcp->Py()); + vars.m_geant4_pz.push_back(mcp->Pz()); + vars.m_geant4_vx.push_back(mcp->Vx()); + vars.m_geant4_vy.push_back(mcp->Vy()); + vars.m_geant4_vz.push_back(mcp->Vz()); + vars.m_geant4_end_process.push_back(mcp->EndProcess()); + vars.m_geant4_process.push_back(mcp->Process()); + vars.m_geant4_costheta.push_back(vars.m_geant4_pz.back()/sqrt(pow(vars.m_geant4_pz.back(),2)+pow(vars.m_geant4_px.back(),2)+pow(vars.m_geant4_py.back(),2))); + vars.m_geant4_dx.push_back(mcp->Px()/sqrt(pow(vars.m_geant4_pz.back(),2)+pow(vars.m_geant4_px.back(),2)+pow(vars.m_geant4_py.back(),2))); + vars.m_geant4_dy.push_back(mcp->Py()/sqrt(pow(vars.m_geant4_pz.back(),2)+pow(vars.m_geant4_px.back(),2)+pow(vars.m_geant4_py.back(),2))); + vars.m_geant4_dz.push_back(mcp->Pz()/sqrt(pow(vars.m_geant4_pz.back(),2)+pow(vars.m_geant4_px.back(),2)+pow(vars.m_geant4_py.back(),2))); if(j>2)break; } @@ -57,7 +57,7 @@ namespace single_photon } //analyze_EventWeight.h - void AnalyzeEventWeight(art::Event const & e){ + void AnalyzeEventWeight(art::Event const & e, var_all& vars){ art::Handle< std::vector > mcFluxHandle; e.getByLabel("generator", mcFluxHandle); @@ -94,132 +94,132 @@ namespace single_photon const simb::MCParticle& nu = mcTruth->GetNeutrino().Nu(); const art::Ptr gTruth = gTruthVec.at(0); - m_run_number_eventweight = e.run(); - m_subrun_number_eventweight = e.subRun(); - m_event_number_eventweight = e.event(); + vars.m_run_number_eventweight = e.run(); + vars.m_subrun_number_eventweight = e.subRun(); + vars.m_event_number_eventweight = e.event(); // possibly the wrong variables, but let's see for now... - //m_mcflux_evtno = mcFlux->fevtno; - m_mcflux_nu_pos_x = nu.Vx(); - m_mcflux_nu_pos_y = nu.Vy(); - m_mcflux_nu_pos_z = nu.Vz(); - m_mcflux_nu_mom_x = nu.Px(); - m_mcflux_nu_mom_y = nu.Py(); - m_mcflux_nu_mom_z = nu.Pz(); - m_mcflux_nu_mom_E = nu.E(); - m_mcflux_ntype = mcFlux->fntype; - m_mcflux_ptype = mcFlux->fptype; - m_mcflux_nimpwt = mcFlux->fnimpwt; - m_mcflux_dk2gen = mcFlux->fdk2gen; - m_mcflux_nenergyn = mcFlux->fnenergyn; - m_mcflux_tpx = mcFlux->ftpx; - m_mcflux_tpy = mcFlux->ftpy; - m_mcflux_tpz = mcFlux->ftpz; - m_mcflux_tptype = mcFlux->ftptype; - m_mcflux_vx = mcFlux->fvx; - m_mcflux_vy = mcFlux->fvy; - m_mcflux_vz = mcFlux->fvz; - - // loop MCParticle info for m_mctruth object - - m_mctruth_nparticles = mcTruth->NParticles(); - - for (int i = 0; i < m_mctruth_nparticles; i++){ + //vars.m_mcflux_evtno = mcFlux->fevtno; + vars.m_mcflux_nu_pos_x = nu.Vx(); + vars.m_mcflux_nu_pos_y = nu.Vy(); + vars.m_mcflux_nu_pos_z = nu.Vz(); + vars.m_mcflux_nu_mom_x = nu.Px(); + vars.m_mcflux_nu_mom_y = nu.Py(); + vars.m_mcflux_nu_mom_z = nu.Pz(); + vars.m_mcflux_nu_mom_E = nu.E(); + vars.m_mcflux_ntype = mcFlux->fntype; + vars.m_mcflux_ptype = mcFlux->fptype; + vars.m_mcflux_nimpwt = mcFlux->fnimpwt; + vars.m_mcflux_dk2gen = mcFlux->fdk2gen; + vars.m_mcflux_nenergyn = mcFlux->fnenergyn; + vars.m_mcflux_tpx = mcFlux->ftpx; + vars.m_mcflux_tpy = mcFlux->ftpy; + vars.m_mcflux_tpz = mcFlux->ftpz; + vars.m_mcflux_tptype = mcFlux->ftptype; + vars.m_mcflux_vx = mcFlux->fvx; + vars.m_mcflux_vy = mcFlux->fvy; + vars.m_mcflux_vz = mcFlux->fvz; + + // loop MCParticle info for vars.m_mctruth object + + vars.m_mctruth_nparticles = mcTruth->NParticles(); + + for (int i = 0; i < vars.m_mctruth_nparticles; i++){ const simb::MCParticle& mcParticle = mcTruth->GetParticle(i); - m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); - m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); - m_mctruth_particles_mother[i] = mcParticle.Mother(); - m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); - m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); + vars.m_mctruth_particles_track_Id[i] = mcParticle.TrackId(); + vars.m_mctruth_particles_pdg_code[i] = mcParticle.PdgCode(); + vars.m_mctruth_particles_mother[i] = mcParticle.Mother(); + vars.m_mctruth_particles_status_code[i] = mcParticle.StatusCode(); + vars.m_mctruth_particles_num_daughters[i] = mcParticle.NumberDaughters(); - for (int j = 0; j < m_mctruth_particles_num_daughters[i]; j++){ + for (int j = 0; j < vars.m_mctruth_particles_num_daughters[i]; j++){ const simb::MCParticle& daughterMcParticle = mcTruth->GetParticle(j); - m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); + vars.m_mctruth_particles_daughters[i][j] = daughterMcParticle.TrackId(); } - m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); - m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); - m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); - m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); - m_mctruth_particles_px0[i] = mcParticle.Px(0); - m_mctruth_particles_py0[i] = mcParticle.Py(0); - m_mctruth_particles_pz0[i] = mcParticle.Pz(0); - m_mctruth_particles_e0[i] = mcParticle.E(0); - m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); - m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); - m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); - m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); + vars.m_mctruth_particles_Gvx[i] = mcParticle.Gvx(); + vars.m_mctruth_particles_Gvy[i] = mcParticle.Gvy(); + vars.m_mctruth_particles_Gvz[i] = mcParticle.Gvz(); + vars.m_mctruth_particles_Gvt[i] = mcParticle.Gvt(); + vars.m_mctruth_particles_px0[i] = mcParticle.Px(0); + vars.m_mctruth_particles_py0[i] = mcParticle.Py(0); + vars.m_mctruth_particles_pz0[i] = mcParticle.Pz(0); + vars.m_mctruth_particles_e0[i] = mcParticle.E(0); + vars.m_mctruth_particles_rescatter[i] = mcParticle.Rescatter(); + vars.m_mctruth_particles_polx[i] = mcParticle.Polarization().X(); + vars.m_mctruth_particles_poly[i] = mcParticle.Polarization().Y(); + vars.m_mctruth_particles_polz[i] = mcParticle.Polarization().Z(); } const simb::MCNeutrino& mcNeutrino = mcTruth->GetNeutrino(); - m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); - m_mctruth_neutrino_mode = mcNeutrino.Mode(); - m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); - m_mctruth_neutrino_target = mcNeutrino.Target(); - m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); - m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); - m_mctruth_neutrino_w = mcNeutrino.W(); - m_mctruth_neutrino_x = mcNeutrino.X(); - m_mctruth_neutrino_y = mcNeutrino.Y(); - m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); - - m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; - m_gtruth_tgt_pdg = gTruth->ftgtPDG; - m_gtruth_tgt_A = gTruth->ftgtA; - m_gtruth_tgt_Z = gTruth->ftgtZ; - m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); - m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); - m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); - m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); - - m_gtruth_weight = gTruth->fweight; - m_gtruth_probability = gTruth->fprobability; - m_gtruth_xsec = gTruth->fXsec; - m_gtruth_diff_xsec = gTruth->fDiffXsec; - m_gtruth_gphase_space = gTruth->fGPhaseSpace; - - m_gtruth_vertex_x = gTruth->fVertex.X(); - m_gtruth_vertex_y = gTruth->fVertex.Y(); - m_gtruth_vertex_z = gTruth->fVertex.Z(); - m_gtruth_vertex_T = gTruth->fVertex.T(); - m_gtruth_gscatter = gTruth->fGscatter; - m_gtruth_gint = gTruth->fGint; - m_gtruth_res_num = gTruth->fResNum; - m_gtruth_num_piplus = gTruth->fNumPiPlus; - m_gtruth_num_pi0 = gTruth->fNumPi0; - m_gtruth_num_piminus = gTruth->fNumPiMinus; - m_gtruth_num_proton = gTruth->fNumProton; - m_gtruth_num_neutron = gTruth->fNumNeutron; - m_gtruth_is_charm = gTruth->fIsCharm; - m_gtruth_is_strange = gTruth->fIsStrange; - m_gtruth_decay_mode = gTruth->fDecayMode; - m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; - m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; - m_gtruth_gx = gTruth->fgX; - m_gtruth_gy = gTruth->fgY; - m_gtruth_gt = gTruth->fgT; - m_gtruth_gw = gTruth->fgW; - m_gtruth_gQ2 = gTruth->fgQ2; - m_gtruth_gq2 = gTruth->fgq2; - m_gtruth_probe_pdg = gTruth->fProbePDG; - m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); - m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); - m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); - m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); - m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); - m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); - m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); - m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); - m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; - m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); - m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); - m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); - m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); + vars.m_mctruth_neutrino_ccnc = mcNeutrino.CCNC(); + vars.m_mctruth_neutrino_mode = mcNeutrino.Mode(); + vars.m_mctruth_neutrino_interaction_type = mcNeutrino.InteractionType(); + vars.m_mctruth_neutrino_target = mcNeutrino.Target(); + vars.m_mctruth_neutrino_nucleon = mcNeutrino.HitNuc(); + vars.m_mctruth_neutrino_quark = mcNeutrino.HitQuark(); + vars.m_mctruth_neutrino_w = mcNeutrino.W(); + vars.m_mctruth_neutrino_x = mcNeutrino.X(); + vars.m_mctruth_neutrino_y = mcNeutrino.Y(); + vars.m_mctruth_neutrino_qsqr = mcNeutrino.QSqr(); + + vars.m_gtruth_is_sea_quark = gTruth->fIsSeaQuark; + vars.m_gtruth_tgt_pdg = gTruth->ftgtPDG; + vars.m_gtruth_tgt_A = gTruth->ftgtA; + vars.m_gtruth_tgt_Z = gTruth->ftgtZ; + vars.m_gtruth_tgt_p4_x = gTruth->fTgtP4.X(); + vars.m_gtruth_tgt_p4_y = gTruth->fTgtP4.Y(); + vars.m_gtruth_tgt_p4_z = gTruth->fTgtP4.Z(); + vars.m_gtruth_tgt_p4_E = gTruth->fTgtP4.E(); + + vars.m_gtruth_weight = gTruth->fweight; + vars.m_gtruth_probability = gTruth->fprobability; + vars.m_gtruth_xsec = gTruth->fXsec; + vars.m_gtruth_diff_xsec = gTruth->fDiffXsec; + vars.m_gtruth_gphase_space = gTruth->fGPhaseSpace; + + vars.m_gtruth_vertex_x = gTruth->fVertex.X(); + vars.m_gtruth_vertex_y = gTruth->fVertex.Y(); + vars.m_gtruth_vertex_z = gTruth->fVertex.Z(); + vars.m_gtruth_vertex_T = gTruth->fVertex.T(); + vars.m_gtruth_gscatter = gTruth->fGscatter; + vars.m_gtruth_gint = gTruth->fGint; + vars.m_gtruth_res_num = gTruth->fResNum; + vars.m_gtruth_num_piplus = gTruth->fNumPiPlus; + vars.m_gtruth_num_pi0 = gTruth->fNumPi0; + vars.m_gtruth_num_piminus = gTruth->fNumPiMinus; + vars.m_gtruth_num_proton = gTruth->fNumProton; + vars.m_gtruth_num_neutron = gTruth->fNumNeutron; + vars.m_gtruth_is_charm = gTruth->fIsCharm; + vars.m_gtruth_is_strange = gTruth->fIsStrange; + vars.m_gtruth_decay_mode = gTruth->fDecayMode; + vars.m_gtruth_strange_hadron_pdg = gTruth->fStrangeHadronPdg; + vars.m_gtruth_charm_hadron_pdg = gTruth->fCharmHadronPdg; + vars.m_gtruth_gx = gTruth->fgX; + vars.m_gtruth_gy = gTruth->fgY; + vars.m_gtruth_gt = gTruth->fgT; + vars.m_gtruth_gw = gTruth->fgW; + vars.m_gtruth_gQ2 = gTruth->fgQ2; + vars.m_gtruth_gq2 = gTruth->fgq2; + vars.m_gtruth_probe_pdg = gTruth->fProbePDG; + vars.m_gtruth_probe_p4_x = gTruth->fProbeP4.X(); + vars.m_gtruth_probe_p4_y = gTruth->fProbeP4.Y(); + vars.m_gtruth_probe_p4_z = gTruth->fProbeP4.Z(); + vars.m_gtruth_probe_p4_E = gTruth->fProbeP4.E(); + vars.m_gtruth_hit_nuc_p4_x = gTruth->fHitNucP4.X(); + vars.m_gtruth_hit_nuc_p4_y = gTruth->fHitNucP4.Y(); + vars.m_gtruth_hit_nuc_p4_z = gTruth->fHitNucP4.Z(); + vars.m_gtruth_hit_nuc_p4_E = gTruth->fHitNucP4.E(); + vars.m_gtruth_hit_nuc_pos = gTruth->fHitNucPos; + vars.m_gtruth_fs_had_syst_p4_x = gTruth->fFShadSystP4.X(); + vars.m_gtruth_fs_had_syst_p4_y = gTruth->fFShadSystP4.Y(); + vars.m_gtruth_fs_had_syst_p4_z = gTruth->fFShadSystP4.Z(); + vars.m_gtruth_fs_had_syst_p4_E = gTruth->fFShadSystP4.E(); //moved to inside singlphoontmodule.cc for filter reasons //eventweight_tree->Fill(); @@ -254,131 +254,144 @@ namespace single_photon std::vector all_PPFPs, std::map> & MCParticleToTrackIDMap, std::map, art::Ptr > & showerToMCParticleMap, - std::map, art::Ptr > &trackToMCParticleMap){ + std::map, art::Ptr > &trackToMCParticleMap, + var_all& vars, + para_all& paras){ for(size_t index=0; index< all_PPFPs.size(); ++index){ PandoraPFParticle* temp_ppfp = &all_PPFPs[index]; if(!temp_ppfp->get_IsNuSlice()) continue; - m_reco_slice_num_pfps[temp_ppfp->get_SliceID()]++;//GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice - m_reco_slice_num_showers[temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasShower(); - m_reco_slice_num_tracks [temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasTrack(); + vars.m_reco_slice_num_pfps[temp_ppfp->get_SliceID()]++;//GetPFPsPerSlice(PFPToSliceIdMap); //the total number of PFP's per slice + vars.m_reco_slice_num_showers[temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasShower(); + vars.m_reco_slice_num_tracks [temp_ppfp->get_SliceID()]+=temp_ppfp->get_HasTrack(); } //first check if in the event there's a match to a given signal if(signal_def == "ncdelta"){ //@para updated in the AnalyzeMCTruths function @ analyze_MCTruth.h - std::cout<<"AnalyzeSlice()\t||\t looking for signal def "< 1) m_multiple_matched_showers = true; - if (m_matched_signal_track_num > 1) m_multiple_matched_tracks = true; - if (m_matched_signal_shower_num == 0) m_no_matched_showers = true; + if (vars.m_matched_signal_shower_num > 1) vars.m_multiple_matched_showers = true; + if (vars.m_matched_signal_track_num > 1) vars.m_multiple_matched_tracks = true; + if (vars.m_matched_signal_shower_num == 0) vars.m_no_matched_showers = true; //check if either 1g1p or 1g0p topology - if (m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==1){//1g1p + if (vars.m_matched_signal_shower_num ==1 && vars.m_matched_signal_track_num ==1){//1g1p //check if same slice - m_is_matched_1g1p = true; - if ( m_matched_signal_track_sliceId[0] == m_matched_signal_shower_sliceId[0]){ - m_reco_1g1p_is_same_slice = true; - m_reco_1g1p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g1p_nuscore = m_matched_signal_shower_nuscore[0]; + vars.m_is_matched_1g1p = true; + if ( vars.m_matched_signal_track_sliceId[0] == vars.m_matched_signal_shower_sliceId[0]){ + vars.m_reco_1g1p_is_same_slice = true; + vars.m_reco_1g1p_is_nuslice = vars.m_matched_signal_shower_is_nuslice[0]; + vars.m_reco_1g1p_nuscore = vars.m_matched_signal_shower_nuscore[0]; } else{ - m_reco_1g1p_is_multiple_slices = true; + vars.m_reco_1g1p_is_multiple_slices = true; } - }else if(m_matched_signal_shower_num ==1 && m_matched_signal_track_num ==0){//1g0p - m_reco_1g0p_is_nuslice = m_matched_signal_shower_is_nuslice[0]; - m_reco_1g0p_nuscore = m_matched_signal_shower_nuscore[0]; - m_is_matched_1g0p = true; + }else if(vars.m_matched_signal_shower_num ==1 && vars.m_matched_signal_track_num ==0){//1g0p + vars.m_reco_1g0p_is_nuslice = vars.m_matched_signal_shower_is_nuslice[0]; + vars.m_reco_1g0p_nuscore = vars.m_matched_signal_shower_nuscore[0]; + vars.m_is_matched_1g0p = true; } }//findslice - //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; - void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector){ - m_mctruth_num = mcTruthVector.size(); - if(m_is_verbose) std::cout<<"# of simb::MCTruth: "<1){ + //This only look at MCTruch info. Reco matching create sivars.m_shower/track for pairing up MCTruth to Reco objects; + void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector, var_all& vars, para_all& paras){ + + std::map is_delta_map = { + {2224,"Delta++"}, + {2214,"Delta+"}, + {1114,"Delta-"}, + {2114,"Delta0"}, + {-2224,"Anti-Delta++"}, + {-2214,"Anti-Delta+"}, + {-1114,"Anti-Delta-"}, + {-2114,"Anti-Delta0"}}; + + vars.m_mctruth_num = mcTruthVector.size(); + if(g_is_verbose) std::cout<<"# of simb::MCTruth: "<1){ std::cout<<"AnalyzeMCTruths()\t||\t WARNING There is more than 1 MCTruth neutrino interaction. Just running over the first simb::MCTruth."< spacers = Printer_header({" NuPdg"," CC=0"," TruthVertex(x,"," y, ",", z )"}); - for(int i=0; i truth = mcTruthVector[i]; - m_mctruth_origin = truth->Origin(); - // if(m_is_verbose) std::cout<<"Getting origin "<Origin()<Origin(); + // if(g_is_verbose) std::cout<<"Getting origin "<Origin()<NeutrinoSet()){ - if(m_is_verbose) std::cout<<"Warning, no neutrino set skipping. "<Origin()<GetNeutrino().CCNC(); - // if(m_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); - // if(m_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); - // if(m_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); - // if(m_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); - // if(m_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); - // if(m_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); - // if(m_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); - // if(m_is_verbose) std::cout<<"Getting lepton E"<Origin()<GetNeutrino().CCNC(); + // if(g_is_verbose) std::cout<<"Getting ccnc "<GetNeutrino().CCNC()<GetNeutrino().Mode(); + // if(g_is_verbose) std::cout<<"Getting Mode"<GetNeutrino().InteractionType(); + // if(g_is_verbose) std::cout<<"Getting Type"<GetNeutrino().QSqr(); + // if(g_is_verbose) std::cout<<"Getting Q"<GetNeutrino().Nu().PdgCode(); + // if(g_is_verbose) std::cout<<"Getting E"<GetNeutrino().Nu().E(); + // if(g_is_verbose) std::cout<<"Getting pdg"<GetNeutrino().Lepton().PdgCode(); + // if(g_is_verbose) std::cout<<"Getting pdg lepton"<GetNeutrino().Lepton().E(); + // if(g_is_verbose) std::cout<<"Getting lepton E"< corrected(3); // get corrected lepton position spacecharge_correction( truth->GetNeutrino().Lepton(),corrected); - m_mctruth_nu_vertex_x = corrected[0]; - m_mctruth_nu_vertex_y = corrected[1]; - m_mctruth_nu_vertex_z = corrected[2]; - m_mctruth_reco_vertex_dist = sqrt(pow (m_mctruth_nu_vertex_x-m_vertex_pos_x,2)+pow (m_mctruth_nu_vertex_y-m_vertex_pos_y,2)+pow (m_mctruth_nu_vertex_z-m_vertex_pos_z,2)); + vars.m_mctruth_nu_vertex_x = corrected[0]; + vars.m_mctruth_nu_vertex_y = corrected[1]; + vars.m_mctruth_nu_vertex_z = corrected[2]; + vars.m_mctruth_reco_vertex_dist = sqrt(pow (vars.m_mctruth_nu_vertex_x-vars.m_vertex_pos_x,2)+pow (vars.m_mctruth_nu_vertex_y-vars.m_vertex_pos_y,2)+pow (vars.m_mctruth_nu_vertex_z-vars.m_vertex_pos_z,2)); //std::vector spacers = Printer_header({"NuPdg","CC=0","TruthVertex(x,"," y, ",", z )"}); Printer_content( - {std::to_string(m_mctruth_nu_pdg), - std::to_string(m_mctruth_ccnc), + {std::to_string(vars.m_mctruth_nu_pdg), + std::to_string(vars.m_mctruth_ccnc), std::to_string(corrected[0]), std::to_string(corrected[1]), std::to_string(corrected[2]) @@ -437,10 +450,10 @@ namespace single_photon - m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles + vars.m_mctruth_num_daughter_particles = truth->NParticles(); //MCTruth_NParticles - if(m_is_verbose) std::cout<<"\nThis MCTruth has "<NParticles()<<" daughters "<NParticles()<<" daughters "< spacers = Printer_header({" pdg"," TrkID"," MotherID"," Status"," Energy"}); @@ -452,55 +465,55 @@ namespace single_photon int tmp_n_neutrons_from_delta = 0; - m_mctruth_leading_exiting_proton_energy = -9999; + vars.m_mctruth_leading_exiting_proton_energy = -9999; - for(int j=0; j< m_mctruth_num_daughter_particles; j++){ + for(int j=0; j< vars.m_mctruth_num_daughter_particles; j++){ const simb::MCParticle par = truth->GetParticle(j); - m_mctruth_daughters_pdg[j] = par.PdgCode(); - m_mctruth_daughters_E[j] = par.E(); - - m_mctruth_daughters_status_code[j] = par.StatusCode(); - m_mctruth_daughters_trackID[j] = par.TrackId(); - m_mctruth_daughters_mother_trackID[j] = par.Mother(); - m_mctruth_daughters_px[j] = par.Px(); - m_mctruth_daughters_py[j] = par.Py(); - m_mctruth_daughters_pz[j] = par.Pz(); - m_mctruth_daughters_startx[j] = par.Vx(); - m_mctruth_daughters_starty[j] = par.Vy(); - m_mctruth_daughters_startz[j] = par.Vz(); - m_mctruth_daughters_time[j] = par.T(); - m_mctruth_daughters_endx[j] = par.EndX(); - m_mctruth_daughters_endy[j] = par.EndY(); - m_mctruth_daughters_endz[j] = par.EndZ(); - m_mctruth_daughters_endtime[j] = par.EndT(); - m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string - m_mctruth_daughters_end_process[j] = par.EndProcess(); - - if(m_is_textgen) continue; //quick hack, fix in files - - switch(m_mctruth_daughters_pdg[j]){ + vars.m_mctruth_daughters_pdg[j] = par.PdgCode(); + vars.m_mctruth_daughters_E[j] = par.E(); + + vars.m_mctruth_daughters_status_code[j] = par.StatusCode(); + vars.m_mctruth_daughters_trackID[j] = par.TrackId(); + vars.m_mctruth_daughters_mother_trackID[j] = par.Mother(); + vars.m_mctruth_daughters_px[j] = par.Px(); + vars.m_mctruth_daughters_py[j] = par.Py(); + vars.m_mctruth_daughters_pz[j] = par.Pz(); + vars.m_mctruth_daughters_startx[j] = par.Vx(); + vars.m_mctruth_daughters_starty[j] = par.Vy(); + vars.m_mctruth_daughters_startz[j] = par.Vz(); + vars.m_mctruth_daughters_time[j] = par.T(); + vars.m_mctruth_daughters_endx[j] = par.EndX(); + vars.m_mctruth_daughters_endy[j] = par.EndY(); + vars.m_mctruth_daughters_endz[j] = par.EndZ(); + vars.m_mctruth_daughters_endtime[j] = par.EndT(); + vars.m_mctruth_daughters_process[j] = par.Process(); //Process() and EndProcess() return string + vars.m_mctruth_daughters_end_process[j] = par.EndProcess(); + + if(paras.s_is_textgen) continue; //quick hack, fix in files + + switch(vars.m_mctruth_daughters_pdg[j]){ case(22): // if it's a gamma { if(par.StatusCode() == 1){ - m_mctruth_num_exiting_photons++; - m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); - m_mctruth_exiting_photon_energy.push_back(par.E()); - m_mctruth_exiting_photon_px.push_back(par.Px()); - m_mctruth_exiting_photon_py.push_back(par.Py()); - m_mctruth_exiting_photon_pz.push_back(par.Pz()); + vars.m_mctruth_num_exiting_photons++; + vars.m_mctruth_exiting_photon_mother_trackID.push_back(par.Mother()); + vars.m_mctruth_exiting_photon_trackID.push_back(par.TrackId()); + vars.m_mctruth_exiting_photon_energy.push_back(par.E()); + vars.m_mctruth_exiting_photon_px.push_back(par.Px()); + vars.m_mctruth_exiting_photon_py.push_back(par.Py()); + vars.m_mctruth_exiting_photon_pz.push_back(par.Pz()); } - // if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t Photon "<GetParticle(par.Mother()); if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_photon_energy = par.E(); + vars.m_mctruth_delta_photon_energy = par.E(); tmp_n_photons_from_delta ++; - m_mctruth_is_delta_radiative++; + vars.m_mctruth_is_delta_radiative++; } } } @@ -509,35 +522,35 @@ namespace single_photon { // Make sure the pi0 actually exits the nucleus if (par.StatusCode() == 1) { - m_mctruth_exiting_pi0_E.push_back(par.E()); - m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); - m_mctruth_exiting_pi0_px.push_back(par.Px()); - m_mctruth_exiting_pi0_py.push_back(par.Py()); - m_mctruth_exiting_pi0_pz.push_back(par.Pz()); - m_mctruth_num_exiting_pi0++; + vars.m_mctruth_exiting_pi0_E.push_back(par.E()); + vars.m_mctruth_exiting_pi0_mom.push_back(sqrt(pow(par.Px(),2)+pow(par.Py(),2)+pow(par.Pz(),2))); + vars.m_mctruth_exiting_pi0_px.push_back(par.Px()); + vars.m_mctruth_exiting_pi0_py.push_back(par.Py()); + vars.m_mctruth_exiting_pi0_pz.push_back(par.Pz()); + vars.m_mctruth_num_exiting_pi0++; } break; } case(211): case(-211): // it's pi+ or pi- if (par.StatusCode() == 1) { - m_mctruth_num_exiting_pipm++; + vars.m_mctruth_num_exiting_pipm++; } break; case(2212): // if it's a proton { if(par.StatusCode() == 1){ - m_mctruth_num_exiting_protons++; - m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); - m_mctruth_exiting_proton_energy.push_back(par.E()); - m_mctruth_exiting_proton_px.push_back(par.Px()); - m_mctruth_exiting_proton_py.push_back(par.Py()); - m_mctruth_exiting_proton_pz.push_back(par.Pz()); + vars.m_mctruth_num_exiting_protons++; + vars.m_mctruth_exiting_proton_mother_trackID.push_back(par.Mother()); + vars.m_mctruth_exiting_proton_trackID.push_back(par.TrackId()); + vars.m_mctruth_exiting_proton_energy.push_back(par.E()); + vars.m_mctruth_exiting_proton_px.push_back(par.Px()); + vars.m_mctruth_exiting_proton_py.push_back(par.Py()); + vars.m_mctruth_exiting_proton_pz.push_back(par.Pz()); } - // if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Proton "<GetParticle(par.Mother()); if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_proton_energy = par.E(); + vars.m_mctruth_delta_proton_energy = par.E(); tmp_n_protons_from_delta ++; } } @@ -556,21 +569,21 @@ namespace single_photon case(2112): // if it's a neutron { - m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it - m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); - m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); - m_mctruth_exiting_neutron_energy.push_back(par.E()); - m_mctruth_exiting_neutron_px.push_back(par.Px()); - m_mctruth_exiting_neutron_py.push_back(par.Py()); - m_mctruth_exiting_neutron_pz.push_back(par.Pz()); + vars.m_mctruth_num_exiting_neutrons++; // Guanqun: neutron always exits the nucleus? should check it + vars.m_mctruth_exiting_neutron_mother_trackID.push_back(par.Mother()); + vars.m_mctruth_exiting_neutron_trackID.push_back(par.TrackId()); + vars.m_mctruth_exiting_neutron_energy.push_back(par.E()); + vars.m_mctruth_exiting_neutron_px.push_back(par.Px()); + vars.m_mctruth_exiting_neutron_py.push_back(par.Py()); + vars.m_mctruth_exiting_neutron_pz.push_back(par.Pz()); - // if(m_is_verbose) std::cout<<"SingleProton::AnalyzeMCTruths()\t||\t Neutron "<GetParticle(par.Mother()); if(is_delta_map.count(mother.PdgCode())>0 && mother.StatusCode()==3){ - m_mctruth_delta_neutron_energy = par.E(); + vars.m_mctruth_delta_neutron_energy = par.E(); tmp_n_neutrons_from_delta ++; } } @@ -579,27 +592,27 @@ namespace single_photon break; case(-2224): case(2224): - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapp++; } + if(par.StatusCode() == 1){ vars.m_mctruth_num_exiting_deltapp++; } break; case(-2214): case(2214)://delta + case(-1114): case(1114): // if it's delta- - if(par.StatusCode() == 1){ m_mctruth_num_exiting_deltapm++; } + if(par.StatusCode() == 1){ vars.m_mctruth_num_exiting_deltapm++; } break; case(-2114): case(2114): // if it's delta0 if(par.StatusCode() == 1){ - m_mctruth_num_exiting_delta0++; - m_mctruth_exiting_delta0_num_daughters.push_back(par.NumberDaughters()); - // if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t Delta0 "< m_mctruth_leading_exiting_proton_energy ){ - m_mctruth_leading_exiting_proton_energy = m_mctruth_exiting_proton_energy[p]; + for(size_t p=0; p< vars.m_mctruth_exiting_proton_energy.size(); p++){ + if( vars.m_mctruth_exiting_proton_energy[p] > vars.m_mctruth_leading_exiting_proton_energy ){ + vars.m_mctruth_leading_exiting_proton_energy = vars.m_mctruth_exiting_proton_energy[p]; } } @@ -621,18 +634,18 @@ namespace single_photon std::cout<<"AnalyzeMCTruths()\t||\t This event is "; if(tmp_n_photons_from_delta==1 && tmp_n_protons_from_delta==1){ - m_mctruth_delta_radiative_1g1p_or_1g1n = 1; + vars.m_mctruth_delta_radiative_1g1p_or_1g1n = 1; std::cout<<"a 1g1p delta radiative event"< m_exiting_photon_energy_threshold){ - m_mctruth_num_reconstructable_protons++; + for (unsigned int p = 0; p < vars.m_mctruth_exiting_photon_energy.size(); p++){ + // paras.s_exiting_photon_energy_threshold is read from pset + if ( vars.m_mctruth_exiting_photon_energy[p] > paras.s_exiting_photon_energy_threshold){ + vars.m_mctruth_num_reconstructable_protons++; }//if g above threshold } @@ -659,27 +672,27 @@ namespace single_photon - if (m_mctruth_is_delta_radiative==true){//if ncdelta - for (unsigned int p = 0; p < m_mctruth_exiting_photon_energy.size(); p++){ - std::cout<<"AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< m_exiting_photon_energy_threshold){ - m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. + if (vars.m_mctruth_is_delta_radiative==true){//if ncdelta + for (unsigned int p = 0; p < vars.m_mctruth_exiting_photon_energy.size(); p++){ + std::cout<<"AnalyzeMCTruths()\t||\tLooking at exiting photon with energy "< paras.s_exiting_photon_energy_threshold){ + vars.m_mctruth_is_reconstructable_1g0p = true; // Guanqun: just means now we have a reconstructable shower, but we don't know if there is a reconstructed nucleon or not yet. }//if g above threshold }//for all exiting g - for(unsigned int pr = 0; pr < m_mctruth_exiting_proton_energy.size(); pr++){ - if ( m_mctruth_exiting_proton_energy[pr]> m_exiting_proton_energy_threshold){ + for(unsigned int pr = 0; pr < vars.m_mctruth_exiting_proton_energy.size(); pr++){ + if ( vars.m_mctruth_exiting_proton_energy[pr]> paras.s_exiting_proton_energy_threshold){ //if it's already 1g1p then we've found a 1g2p which we aren't counting // Guanqun: limit to only 1 reconstructable proton? - if( m_mctruth_is_reconstructable_1g1p == true && m_mctruth_is_reconstructable_1g0p == false){ - m_mctruth_is_reconstructable_1g1p = false; + if( vars.m_mctruth_is_reconstructable_1g1p == true && vars.m_mctruth_is_reconstructable_1g0p == false){ + vars.m_mctruth_is_reconstructable_1g1p = false; } //if there's a photon then it's actually a 1g1p - if( m_mctruth_is_reconstructable_1g0p == true && m_mctruth_is_reconstructable_1g1p == false){ - m_mctruth_is_reconstructable_1g1p = true; - m_mctruth_is_reconstructable_1g0p = false; + if( vars.m_mctruth_is_reconstructable_1g0p == true && vars.m_mctruth_is_reconstructable_1g1p == false){ + vars.m_mctruth_is_reconstructable_1g1p = true; + vars.m_mctruth_is_reconstructable_1g0p = false; } - std::cout<<"AnalyzeMCTruths()\t||\tChecking proton with energy "<GetParticle(m_mctruth_exiting_photon_mother_trackID[p]); + for(int p =0; p < vars.m_mctruth_num_exiting_photons; ++p){ + const simb::MCParticle mother = truth->GetParticle(vars.m_mctruth_exiting_photon_mother_trackID[p]); - std::cout<<"AnalyzeMCTruths()\t||\t -- gamma ("<0 && nth_mother.StatusCode()==3){ std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<GetParticle(m_mctruth_exiting_proton_mother_trackID[p]); + for(int p =0; p < vars.m_mctruth_num_exiting_protons; ++p){ + const simb::MCParticle mother = truth->GetParticle(vars.m_mctruth_exiting_proton_mother_trackID[p]); - if(m_is_verbose){ - std::cout<<"AnalyzeMCTruths()\t||\t -- proton ("<GetParticle(nth_mother.Mother()); - if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ---- and "<0 && nth_mother.StatusCode()==3){ - if(m_is_verbose) std::cout<<"AnalyzeMCTruths()\t||\t ------ Defintely From a Delta Decay! : "<PdgCode()<<" "<TrackId()<<" "<StatusCode()<<" "<EndProcess()<<" "<E()<EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_1_start; - m_mctruth_pi0_leading_photon_end = corrected_1_end; - m_mctruth_pi0_subleading_photon_start = corrected_2_start; - m_mctruth_pi0_subleading_photon_end = corrected_2_end; + vars.m_mctruth_pi0_leading_photon_energy = e1; + vars.m_mctruth_pi0_subleading_photon_energy = e2; + vars.m_mctruth_pi0_leading_photon_end_process = dau1->EndProcess(); + vars.m_mctruth_pi0_subleading_photon_end_process = dau2->EndProcess(); + vars.m_mctruth_pi0_leading_photon_start = corrected_1_start; + vars.m_mctruth_pi0_leading_photon_end = corrected_1_end; + vars.m_mctruth_pi0_subleading_photon_start = corrected_2_start; + vars.m_mctruth_pi0_subleading_photon_end = corrected_2_end; //note: the order of subleading/leading photon is reversed// Fixed as of 2022 reprocess! - m_mctruth_pi0_leading_photon_exiting_TPC =exit1; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; - m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + vars.m_mctruth_pi0_leading_photon_exiting_TPC =exit1; + vars.m_mctruth_pi0_subleading_photon_exiting_TPC = exit2; + vars.m_mctruth_pi0_leading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + vars.m_mctruth_pi0_subleading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; }else{ - m_mctruth_pi0_leading_photon_energy = e2; - m_mctruth_pi0_subleading_photon_energy = e1; - m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); - m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); - m_mctruth_pi0_leading_photon_start = corrected_2_start; - m_mctruth_pi0_leading_photon_end = corrected_2_end; - m_mctruth_pi0_subleading_photon_start = corrected_1_start; - m_mctruth_pi0_subleading_photon_end = corrected_1_end; - m_mctruth_pi0_leading_photon_exiting_TPC = exit2; - m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; - m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; - m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; + vars.m_mctruth_pi0_leading_photon_energy = e2; + vars.m_mctruth_pi0_subleading_photon_energy = e1; + vars.m_mctruth_pi0_leading_photon_end_process = dau2->EndProcess(); + vars.m_mctruth_pi0_subleading_photon_end_process = dau1->EndProcess(); + vars.m_mctruth_pi0_leading_photon_start = corrected_2_start; + vars.m_mctruth_pi0_leading_photon_end = corrected_2_end; + vars.m_mctruth_pi0_subleading_photon_start = corrected_1_start; + vars.m_mctruth_pi0_subleading_photon_end = corrected_1_end; + vars.m_mctruth_pi0_leading_photon_exiting_TPC = exit2; + vars.m_mctruth_pi0_subleading_photon_exiting_TPC = exit1; + vars.m_mctruth_pi0_subleading_photon_mom = {dau1->Px(),dau1->Py(),dau1->Pz()}; + vars.m_mctruth_pi0_leading_photon_mom = {dau2->Px(),dau2->Py(),dau2->Pz()}; } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h index 6453a7782..87a3ed1f9 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.h @@ -11,26 +11,29 @@ #include "lardataobj/RecoBase/Track.h" #include "lardataobj/RecoBase/Shower.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" #include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" namespace single_photon { -//analyze_Geant4.h - void AnalyzeGeant4( const std::vector> &mcParticleVector); + //analyze_Geant4.h + void AnalyzeGeant4( const std::vector> &mcParticleVector, var_all& vars ); -//analyze_EventWeight.h - void AnalyzeEventWeight(art::Event const & e); + //analyze_EventWeight.h + void AnalyzeEventWeight(art::Event const & e,var_all& vars); -//analyze_MCTruth.h + //analyze_MCTruth.h void AnalyzeRecoMCSlices(std::string signal_def, std::vector all_PPFPs, std::map> & MCParticleToTrackIDMap, std::map, art::Ptr > & showerToMCParticleMap, - std::map, art::Ptr > &trackToMCParticleMap); + std::map, art::Ptr > &trackToMCParticleMap, + var_all& vars, + para_all& paras); //This only look at MCTruch info. Reco matching create sim_shower/track for pairing up MCTruth to Reco objects; - void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector); + void AnalyzeMCTruths(std::vector> & mcTruthVector , std::vector> & mcParticleVector,var_all& vars, para_all& paras); } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx index 98923cf1a..876bce333 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx @@ -26,10 +26,12 @@ namespace single_photon const std::vector>& tracks, std::map, std::vector>> & pfParticleToSpacePointsMap, std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap){ + std::map &sliceIdToNuScoreMap, + var_all& vars, + para_all& paras){ - if(m_is_verbose) std::cout<<"AnalyzeTracks()\t||\t Starting recob::Track analysis"<> trk_hits = ppfp->pPFPHits;//pfParticleToHitsMap[pfp]; int m_trkid = track->ID(); - double m_length = track->Length(); - auto m_trk_dir = track->Direction(); // type of m_trk_dir: a std::pair of two 3D vector + double tem_length = track->Length(); + auto tem_trk_dir = track->Direction(); // type of vars.m_trk_dir: a std::pair of two 3D vector //first: direction of first point, second: direction of the end of track - if(m_is_verbose) std::cout<<"AnalyzeTracks()\t||\t On Track: "<Start().X(); - m_reco_track_starty[i_trk]= track->Start().Y(); - m_reco_track_startz[i_trk]= track->Start().Z(); + vars.m_reco_track_startx[i_trk]= track->Start().X(); + vars.m_reco_track_starty[i_trk]= track->Start().Y(); + vars.m_reco_track_startz[i_trk]= track->Start().Z(); - m_reco_track_length[i_trk] =m_length; - m_reco_track_dirx[i_trk] = m_trk_dir.first.X(); - m_reco_track_diry[i_trk] = m_trk_dir.first.Y(); - m_reco_track_dirz[i_trk] = m_trk_dir.first.Z(); + vars.m_reco_track_length[i_trk] =tem_length; + vars.m_reco_track_dirx[i_trk] = tem_trk_dir.first.X(); + vars.m_reco_track_diry[i_trk] = tem_trk_dir.first.Y(); + vars.m_reco_track_dirz[i_trk] = tem_trk_dir.first.Z(); - m_reco_track_endx[i_trk] = track->End().X(); - m_reco_track_endy[i_trk]= track->End().Y(); - m_reco_track_endz[i_trk]= track->End().Z(); + vars.m_reco_track_endx[i_trk] = track->End().X(); + vars.m_reco_track_endy[i_trk]= track->End().Y(); + vars.m_reco_track_endz[i_trk]= track->End().Z(); - std::vector hend = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; - std::vector hstart = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; + std::vector hend = {vars.m_reco_track_endx[i_trk],vars.m_reco_track_endy[i_trk],vars.m_reco_track_endz[i_trk]}; + std::vector hstart = {vars.m_reco_track_startx[i_trk],vars.m_reco_track_starty[i_trk],vars.m_reco_track_startz[i_trk]}; - m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend); - m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart); + vars.m_reco_track_end_dist_to_active_TPC[i_trk] = distToTPCActive(hend, paras); + vars.m_reco_track_start_dist_to_active_TPC[i_trk] = distToTPCActive(hstart, paras); - m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend); - m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart); + vars.m_reco_track_end_dist_to_CPA[i_trk] = distToCPA(hend, paras); + vars.m_reco_track_start_dist_to_CPA[i_trk] = distToCPA(hstart, paras); - m_reco_track_end_in_SCB[i_trk] = distToSCB(m_reco_track_end_dist_to_SCB[i_trk],hend); - m_reco_track_start_in_SCB[i_trk] = distToSCB(m_reco_track_start_dist_to_SCB[i_trk],hstart); + vars.m_reco_track_end_in_SCB[i_trk] = distToSCB(vars.m_reco_track_end_dist_to_SCB[i_trk],hend, paras); + vars.m_reco_track_start_in_SCB[i_trk] = distToSCB(vars.m_reco_track_start_dist_to_SCB[i_trk],hstart, paras); - m_reco_track_theta_yz[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirz[i_trk]); - m_reco_track_phi_yx[i_trk] = atan2(m_reco_track_diry[i_trk],m_reco_track_dirx[i_trk]); + vars.m_reco_track_theta_yz[i_trk] = atan2(vars.m_reco_track_diry[i_trk],vars.m_reco_track_dirz[i_trk]); + vars.m_reco_track_phi_yx[i_trk] = atan2(vars.m_reco_track_diry[i_trk],vars.m_reco_track_dirx[i_trk]); - std::vector tmp_trk_start = {m_reco_track_startx[i_trk],m_reco_track_starty[i_trk],m_reco_track_startz[i_trk]}; - std::vector tmp_trk_end = {m_reco_track_endx[i_trk],m_reco_track_endy[i_trk],m_reco_track_endz[i_trk]}; + std::vector tmp_trk_start = {vars.m_reco_track_startx[i_trk],vars.m_reco_track_starty[i_trk],vars.m_reco_track_startz[i_trk]}; + std::vector tmp_trk_end = {vars.m_reco_track_endx[i_trk],vars.m_reco_track_endy[i_trk],vars.m_reco_track_endz[i_trk]}; double max_dist_from_line = -9999999; - m_reco_track_spacepoint_chi[i_trk] = 0.0; + vars.m_reco_track_spacepoint_chi[i_trk] = 0.0; //Principal componant analysis of SPACEPOINTS and not trajectory points. Will add a few things here in future. - if(m_is_verbose) std::cout<<"AnalyzeTracks()\t||\t Beginining PCA analysis of track"< tmp_spacepoints = {trk_spacepoints[x]->XYZ()[0],trk_spacepoints[x]->XYZ()[1] , trk_spacepoints[x]->XYZ()[2]}; principal->AddRow(&tmp_spacepoints[0]); @@ -117,76 +119,76 @@ namespace single_photon // distance between track direction and spacepoint double dist = dist_line_point(tmp_trk_start,tmp_trk_end,tmp_spacepoints); if(dist> max_dist_from_line) max_dist_from_line = dist; - m_reco_track_spacepoint_chi[i_trk] += dist*dist; + vars.m_reco_track_spacepoint_chi[i_trk] += dist*dist; } - m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; + vars.m_reco_track_spacepoint_max_dist[i_trk]= max_dist_from_line; principal->MakePrincipals(); TVectorD * eigen = (TVectorD*) principal->GetEigenValues(); - m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); - m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); - m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); + vars.m_reco_track_spacepoint_principal0[i_trk]=(*eigen)(0); + vars.m_reco_track_spacepoint_principal1[i_trk]=(*eigen)(1); + vars.m_reco_track_spacepoint_principal2[i_trk]=(*eigen)(2); delete principal; - if(m_is_verbose) std::cout<<"AnalyzeTracks()\t||\t Completed PCA analysis of track. Primary componant: "<get_SliceID();//PFPToSliceIdMap[pfp]; + vars.m_reco_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; // Guanqun: how do you make sure the sliceId is positive, not -1, as for cosmic tracks? // sliceIdToNuScoreMap seems to only have sliceID:nuScore pairs for these with actual nuScores. - m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ m_reco_track_sliceId[i_trk]] ; - m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + vars.m_reco_track_nuscore[i_trk] = sliceIdToNuScoreMap[ vars.m_reco_track_sliceId[i_trk]] ; + vars.m_reco_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; //std::cout<<"checking track nuslice"<Self()<<" is: "<get_IsNuSlice();//PFPToNuSliceMap[pfp]; + vars.m_reco_track_is_nuslice[i_trk] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); - if(m_reco_track_num_daughters[i_trk]>0){ + vars.m_reco_track_num_daughters[i_trk] = pfp->NumDaughters(); + if(vars.m_reco_track_num_daughters[i_trk]>0){ //currently just look at 1 daughter - // m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + // vars.m_reco_track_daughter_trackscore[i_trk] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); + vars.m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); break; } } - m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); - m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); + vars.m_reco_track_trackscore[i_trk] = ppfp->get_TrackScore(); + vars.m_reco_track_pfparticle_pdg[i_trk] = ppfp->get_PdgCode(); - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // vars.m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; // if ( PFPToTrackScoreMap.find(pfp) != PFPToTrackScoreMap.end() ) { - // m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; - // m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); + // vars.m_reco_track_trackscore[i_trk] = PFPToTrackScoreMap[pfp]; + // vars.m_reco_track_pfparticle_pdg[i_trk] = pfp->PdgCode(); // } else{ - // m_reco_track_trackscore[i_trk] = -999; - // m_reco_track_pfparticle_pdg[i_trk] = -999; + // vars.m_reco_track_trackscore[i_trk] = -999; + // vars.m_reco_track_pfparticle_pdg[i_trk] = -999; // } //A loop over the trajectory points size_t const traj_size = track->CountValidPoints(); - m_reco_track_num_trajpoints[i_trk] = (int)traj_size; + vars.m_reco_track_num_trajpoints[i_trk] = (int)traj_size; for(unsigned int p = 0; p < traj_size; ++p) { //recob::Track::TrajectoryPoint_t const & trajp = track->TrajectoryPoint(j); @@ -201,18 +203,18 @@ namespace single_photon } // end of recob::Track loop //Lets sort and order the showers - m_reco_track_ordered_energy_index = sort_indexes(m_reco_track_proton_kinetic_energy); - m_reco_track_ordered_displacement_index = sort_indexes(m_reco_track_length); + vars.m_reco_track_ordered_energy_index = sort_indexes(vars.m_reco_track_proton_kinetic_energy); + vars.m_reco_track_ordered_displacement_index = sort_indexes(vars.m_reco_track_length); - if(m_is_verbose) std::cout<<"AnalyzeTracks()\t||\t Finished."<> &tracks, std::vector all_PPFPs){ + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs,var_all& vars, para_all& paras){ - if(m_is_verbose) std::cout<<"CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"< track = tracks[i_trk]; @@ -253,39 +255,39 @@ namespace single_photon std::vector res_range_good_p2; std::vector dEdx_good_p2; - m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; - m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; - m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; + vars.m_reco_track_num_calo_hits_p0[i_trk] = (int)calo_length_p0; + vars.m_reco_track_num_calo_hits_p1[i_trk] = (int)calo_length_p1; + vars.m_reco_track_num_calo_hits_p2[i_trk] = (int)calo_length_p2; - m_reco_track_best_calo_plane[i_trk]=-1; + vars.m_reco_track_best_calo_plane[i_trk]=-1; // guanqun: vectors have been clear and resized, so probably not need to reset their values? - m_reco_track_good_calo_p0[i_trk] = 0; - m_reco_track_mean_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; - - m_reco_track_good_calo_p1[i_trk] = 0; - m_reco_track_mean_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; - - m_reco_track_good_calo_p2[i_trk] = 0; - m_reco_track_mean_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; - m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; + vars.m_reco_track_good_calo_p0[i_trk] = 0; + vars.m_reco_track_mean_dEdx_p0[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_start_half_p0[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_end_half_p0[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_p0[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk] = 0.0; + vars.m_reco_track_trunc_PIDA_p0[i_trk] = 0.0; + + vars.m_reco_track_good_calo_p1[i_trk] = 0; + vars.m_reco_track_mean_dEdx_p1[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_start_half_p1[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_end_half_p1[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_p1[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk] = 0.0; + vars.m_reco_track_trunc_PIDA_p1[i_trk] = 0.0; + + vars.m_reco_track_good_calo_p2[i_trk] = 0; + vars.m_reco_track_mean_dEdx_p2[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_start_half_p2[i_trk] = 0.0; + vars.m_reco_track_mean_dEdx_end_half_p2[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_p2[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk] = 0.0; + vars.m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk] = 0.0; + vars.m_reco_track_trunc_PIDA_p2[i_trk] = 0.0; @@ -295,17 +297,17 @@ namespace single_photon double res_range = calo_p0->ResidualRange()[k]; //ResidualRange() returns range from end of track double dEdx = calo_p0->dEdx()[k]; - m_reco_track_mean_dEdx_p0[i_trk] += dEdx; + vars.m_reco_track_mean_dEdx_p0[i_trk] += dEdx; if(k <= calo_length_p0/2){ - m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_start_half_p0[i_trk]+=dEdx; }else{ - m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_end_half_p0[i_trk]+=dEdx; } - bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_sensible = dEdx < paras.s_track_calo_max_dEdx; bool is_nan =dEdx != dEdx; // != has higher precedence than = bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; + bool is_nonzero = dEdx> paras.s_track_calo_min_dEdx; if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p0-1){ res_range_good_p0.push_back(res_range); @@ -315,12 +317,12 @@ namespace single_photon // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); + vars.m_reco_track_good_calo_p0[i_trk] = 0; + if(res_range_good_p0.size() >= paras.s_track_calo_min_dEdx_hits){ + vars.m_reco_track_good_calo_p0[i_trk] = res_range_good_p0.size(); - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/m_track_calo_trunc_fraction; + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimuvars.m_dx in the res_range + double tenth_track = std::max(res_range_good_p0.front(), res_range_good_p0.back())/paras.s_track_calo_trunc_fraction; double min_dx = 999; for(int j = res_range_good_p0.size()-1; j>1; j--){ double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]); @@ -336,11 +338,11 @@ namespace single_photon //Calculate the mean truncated mean dEdx for(size_t k=0; k< trunc_dEdx_p0.size(); k++){ double dEdx = trunc_dEdx_p0[k]; - m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; + vars.m_reco_track_mean_trunc_dEdx_p0[i_trk] += dEdx; if(k <= trunc_dEdx_p0.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]+=dEdx; }else{ - m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]+=dEdx; } @@ -353,27 +355,27 @@ namespace single_photon //} std::cout<<"Using Radius: "<ResidualRange()[k]; double dEdx = calo_p1->dEdx()[k]; - m_reco_track_mean_dEdx_p1[i_trk] += dEdx; + vars.m_reco_track_mean_dEdx_p1[i_trk] += dEdx; if(k <= calo_length_p1/2){ - m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_start_half_p1[i_trk]+=dEdx; }else{ - m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_end_half_p1[i_trk]+=dEdx; } - bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_sensible = dEdx < paras.s_track_calo_max_dEdx; bool is_nan =dEdx != dEdx; bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; + bool is_nonzero = dEdx> paras.s_track_calo_min_dEdx; if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p1-1){ res_range_good_p1.push_back(res_range); @@ -401,12 +403,12 @@ namespace single_photon // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); + vars.m_reco_track_good_calo_p1[i_trk] = 0; + if(res_range_good_p1.size() >= paras.s_track_calo_min_dEdx_hits){ + vars.m_reco_track_good_calo_p1[i_trk] = res_range_good_p1.size(); - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/m_track_calo_trunc_fraction; + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimuvars.m_dx in the res_range + double tenth_track = std::max(res_range_good_p1.front(), res_range_good_p1.back())/paras.s_track_calo_trunc_fraction; double min_dx = 999; for(int j = res_range_good_p1.size()-1; j>1; j--){ double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]); @@ -422,11 +424,11 @@ namespace single_photon //Calculate the mean truncated mean dEdx for(size_t k=0; k< trunc_dEdx_p1.size(); k++){ double dEdx = trunc_dEdx_p1[k]; - m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; + vars.m_reco_track_mean_trunc_dEdx_p1[i_trk] += dEdx; if(k <= trunc_dEdx_p1.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]+=dEdx; }else{ - m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]+=dEdx; } @@ -439,26 +441,26 @@ namespace single_photon //} std::cout<<"Using Radius: "<ResidualRange()[k]; double dEdx = calo_p2->dEdx()[k]; - m_reco_track_mean_dEdx_p2[i_trk] += dEdx; + vars.m_reco_track_mean_dEdx_p2[i_trk] += dEdx; if(k <= calo_length_p2/2){ - m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_start_half_p2[i_trk]+=dEdx; }else{ - m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; + vars.m_reco_track_mean_dEdx_end_half_p2[i_trk]+=dEdx; } - bool is_sensible = dEdx < m_track_calo_max_dEdx; + bool is_sensible = dEdx < paras.s_track_calo_max_dEdx; bool is_nan =dEdx != dEdx; bool is_inf = std::isinf(dEdx); - bool is_nonzero = dEdx> m_track_calo_min_dEdx; + bool is_nonzero = dEdx> paras.s_track_calo_min_dEdx; if(is_sensible && !is_nan && !is_inf && is_nonzero && k != 0 && k != calo_length_p2-1){ res_range_good_p2.push_back(res_range); @@ -486,12 +488,12 @@ namespace single_photon // std::cout<<"\t"<dEdx()[k]<<" "<ResidualRange()[k]<<" "<< ""<= m_track_calo_min_dEdx_hits){ - m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); + vars.m_reco_track_good_calo_p2[i_trk] = 0; + if(res_range_good_p2.size() >= paras.s_track_calo_min_dEdx_hits){ + vars.m_reco_track_good_calo_p2[i_trk] = res_range_good_p2.size(); - //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimum_dx in the res_range - double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/m_track_calo_trunc_fraction; + //The radius we truncate over is going to be the max of either 1/frac of a track or 2x the minimuvars.m_dx in the res_range + double tenth_track = std::max(res_range_good_p2.front(), res_range_good_p2.back())/paras.s_track_calo_trunc_fraction; double min_dx = 999; for(int j = res_range_good_p2.size()-1; j>1; j--){ double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]); @@ -507,11 +509,11 @@ namespace single_photon //Calculate the mean truncated mean dEdx for(size_t k=0; k< trunc_dEdx_p2.size(); k++){ double dEdx = trunc_dEdx_p2[k]; - m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; + vars.m_reco_track_mean_trunc_dEdx_p2[i_trk] += dEdx; if(k <= trunc_dEdx_p2.size()/2){ - m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]+=dEdx; }else{ - m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; + vars.m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]+=dEdx; } @@ -524,83 +526,81 @@ namespace single_photon //} std::cout<<"Using Radius: "< m_reco_track_good_calo_p1[i_trk] ){ - m_reco_track_best_calo_plane[i_trk] = 0; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p0[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p0[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p0[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p0[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p0[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p0[i_trk]; - - - }else if(m_reco_track_good_calo_p1[i_trk]!=0){ - m_reco_track_best_calo_plane[i_trk] = 1; - - m_reco_track_mean_dEdx_best_plane[i_trk] = m_reco_track_mean_dEdx_p1[i_trk]; - m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_dEdx_end_half_p1[i_trk]; - m_reco_track_good_calo_best_plane[i_trk] = m_reco_track_good_calo_p1[i_trk]; - m_reco_track_trunc_dEdx_best_plane[i_trk] = m_reco_track_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; - m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; - m_reco_track_trunc_PIDA_best_plane[i_trk] = m_reco_track_trunc_PIDA_p1[i_trk]; - m_reco_track_resrange_best_plane[i_trk] = m_reco_track_resrange_p1[i_trk]; - m_reco_track_dEdx_best_plane [i_trk] = m_reco_track_dEdx_p1[i_trk]; + if(vars.m_reco_track_good_calo_p2[i_trk]!=0){ + vars.m_reco_track_best_calo_plane[i_trk] = 2; + + vars.m_reco_track_mean_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_p2[i_trk]; + vars.m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_start_half_p2[i_trk]; + vars.m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_end_half_p2[i_trk]; + vars.m_reco_track_good_calo_best_plane[i_trk] = vars.m_reco_track_good_calo_p2[i_trk]; + vars.m_reco_track_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_trunc_dEdx_p2[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_p2[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_start_half_p2[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_end_half_p2[i_trk]; + vars.m_reco_track_trunc_PIDA_best_plane[i_trk] = vars.m_reco_track_trunc_PIDA_p2[i_trk]; + vars.m_reco_track_resrange_best_plane[i_trk] = vars.m_reco_track_resrange_p2[i_trk]; + vars.m_reco_track_dEdx_best_plane [i_trk] = vars.m_reco_track_dEdx_p2[i_trk]; + + }else if(vars.m_reco_track_good_calo_p0[i_trk] > vars.m_reco_track_good_calo_p1[i_trk] ){ + vars.m_reco_track_best_calo_plane[i_trk] = 0; + + vars.m_reco_track_mean_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_p0[i_trk]; + vars.m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_start_half_p0[i_trk]; + vars.m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_end_half_p0[i_trk]; + vars.m_reco_track_good_calo_best_plane[i_trk] = vars.m_reco_track_good_calo_p0[i_trk]; + vars.m_reco_track_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_trunc_dEdx_p0[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_p0[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_start_half_p0[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_end_half_p0[i_trk]; + vars.m_reco_track_trunc_PIDA_best_plane[i_trk] = vars.m_reco_track_trunc_PIDA_p0[i_trk]; + vars.m_reco_track_resrange_best_plane[i_trk] = vars.m_reco_track_resrange_p0[i_trk]; + vars.m_reco_track_dEdx_best_plane [i_trk] = vars.m_reco_track_dEdx_p0[i_trk]; + + + }else if(vars.m_reco_track_good_calo_p1[i_trk]!=0){ + vars.m_reco_track_best_calo_plane[i_trk] = 1; + + vars.m_reco_track_mean_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_p1[i_trk]; + vars.m_reco_track_mean_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_start_half_p1[i_trk]; + vars.m_reco_track_mean_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_dEdx_end_half_p1[i_trk]; + vars.m_reco_track_good_calo_best_plane[i_trk] = vars.m_reco_track_good_calo_p1[i_trk]; + vars.m_reco_track_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_trunc_dEdx_p1[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_p1[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_start_half_p1[i_trk]; + vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane[i_trk] = vars.m_reco_track_mean_trunc_dEdx_end_half_p1[i_trk]; + vars.m_reco_track_trunc_PIDA_best_plane[i_trk] = vars.m_reco_track_trunc_PIDA_p1[i_trk]; + vars.m_reco_track_resrange_best_plane[i_trk] = vars.m_reco_track_resrange_p1[i_trk]; + vars.m_reco_track_dEdx_best_plane [i_trk] = vars.m_reco_track_dEdx_p1[i_trk]; }else{ - m_reco_track_best_calo_plane[i_trk] = -1; + vars.m_reco_track_best_calo_plane[i_trk] = -1; } @@ -610,7 +610,7 @@ namespace single_photon void CollectPID(std::vector> & tracks, - std::vector all_PPFPs){ + std::vector all_PPFPs,var_all& vars){ for(size_t i_trk=0; i_trk track = tracks[i_trk]; @@ -701,25 +701,25 @@ namespace single_photon } } // end looping over AlgScoresVec - m_reco_track_pid_bragg_likelihood_mu_plane0[i_trk] = pidScore_BL_mu_plane0; - m_reco_track_pid_bragg_likelihood_mu_plane1[i_trk] = pidScore_BL_mu_plane1; - m_reco_track_pid_bragg_likelihood_mu_plane2[i_trk] = pidScore_BL_mu_plane2; - m_reco_track_pid_bragg_likelihood_p_plane0[i_trk] = pidScore_BL_p_plane0; - m_reco_track_pid_bragg_likelihood_p_plane1[i_trk] = pidScore_BL_p_plane1; - m_reco_track_pid_bragg_likelihood_p_plane2[i_trk] = pidScore_BL_p_plane2; - m_reco_track_pid_bragg_likelihood_mip_plane0[i_trk] = pidScore_BL_mip_plane0; - m_reco_track_pid_bragg_likelihood_mip_plane1[i_trk] = pidScore_BL_mip_plane1; - m_reco_track_pid_bragg_likelihood_mip_plane2[i_trk] = pidScore_BL_mip_plane2; - m_reco_track_pid_chi2_mu_plane0[i_trk] = pidScore_chi2_mu_plane0; - m_reco_track_pid_chi2_mu_plane1[i_trk] = pidScore_chi2_mu_plane1; - m_reco_track_pid_chi2_mu_plane2[i_trk] = pidScore_chi2_mu_plane2; - m_reco_track_pid_chi2_p_plane0[i_trk] = pidScore_chi2_p_plane0; - m_reco_track_pid_chi2_p_plane1[i_trk] = pidScore_chi2_p_plane1; - m_reco_track_pid_chi2_p_plane2[i_trk] = pidScore_chi2_p_plane2; - m_reco_track_pid_pida_plane0[i_trk] = pidScore_PIDA_plane0; - m_reco_track_pid_pida_plane1[i_trk] = pidScore_PIDA_plane1; - m_reco_track_pid_pida_plane2[i_trk] = pidScore_PIDA_plane2; - m_reco_track_pid_three_plane_proton_pid[i_trk] = pidScore_three_plane_proton; + vars.m_reco_track_pid_bragg_likelihood_mu_plane0[i_trk] = pidScore_BL_mu_plane0; + vars.m_reco_track_pid_bragg_likelihood_mu_plane1[i_trk] = pidScore_BL_mu_plane1; + vars.m_reco_track_pid_bragg_likelihood_mu_plane2[i_trk] = pidScore_BL_mu_plane2; + vars.m_reco_track_pid_bragg_likelihood_p_plane0[i_trk] = pidScore_BL_p_plane0; + vars.m_reco_track_pid_bragg_likelihood_p_plane1[i_trk] = pidScore_BL_p_plane1; + vars.m_reco_track_pid_bragg_likelihood_p_plane2[i_trk] = pidScore_BL_p_plane2; + vars.m_reco_track_pid_bragg_likelihood_mip_plane0[i_trk] = pidScore_BL_mip_plane0; + vars.m_reco_track_pid_bragg_likelihood_mip_plane1[i_trk] = pidScore_BL_mip_plane1; + vars.m_reco_track_pid_bragg_likelihood_mip_plane2[i_trk] = pidScore_BL_mip_plane2; + vars.m_reco_track_pid_chi2_mu_plane0[i_trk] = pidScore_chi2_mu_plane0; + vars.m_reco_track_pid_chi2_mu_plane1[i_trk] = pidScore_chi2_mu_plane1; + vars.m_reco_track_pid_chi2_mu_plane2[i_trk] = pidScore_chi2_mu_plane2; + vars.m_reco_track_pid_chi2_p_plane0[i_trk] = pidScore_chi2_p_plane0; + vars.m_reco_track_pid_chi2_p_plane1[i_trk] = pidScore_chi2_p_plane1; + vars.m_reco_track_pid_chi2_p_plane2[i_trk] = pidScore_chi2_p_plane2; + vars.m_reco_track_pid_pida_plane0[i_trk] = pidScore_PIDA_plane0; + vars.m_reco_track_pid_pida_plane1[i_trk] = pidScore_PIDA_plane1; + vars.m_reco_track_pid_pida_plane2[i_trk] = pidScore_PIDA_plane2; + vars.m_reco_track_pid_three_plane_proton_pid[i_trk] = pidScore_three_plane_proton; } return; @@ -728,7 +728,8 @@ namespace single_photon //Analyze falshes - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap){ + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap, +var_all& vars, para_all& paras){ for(auto pair: crtvetoToFlashMap){ @@ -736,57 +737,54 @@ namespace single_photon if(pair.second.size() > 0){ for (auto hit: pair.second){ std::cout<<"---- associated CRT hit at time "<ts0_ns/1000. <<" with PE "<peshit<peshit); + vars.m_CRT_veto_hit_PE.push_back(hit->peshit); } } - m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits + vars.m_CRT_veto_nhits = pair.second.size();//save the number of associated CRT veto hits } - if(m_is_verbose) std::cout<<"AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; + if(g_is_verbose) std::cout<<"AnalyzeFlashes()\t||\t Beginning analysis of recob::OpFlash\n"; size_t flash_size = flashes.size(); for(size_t i = 0; i < flash_size; ++i) { - art::Ptr const & flash = flashes[i]; - m_reco_flash_total_pe[i]=(flash->TotalPE()); - m_reco_flash_time[i]=(flash->Time()); - m_reco_flash_time_width[i]=flash->TimeWidth(); - m_reco_flash_abs_time[i]=flash->AbsTime(); - m_reco_flash_frame[i]=flash->Frame(); - m_reco_flash_ycenter[i]=flash->YCenter(); - m_reco_flash_ywidth[i]=flash->YWidth(); - m_reco_flash_zcenter[i]=flash->ZCenter(); - m_reco_flash_zwidth[i]=flash->ZWidth(); - - // m_beamgate_flash_end/m_beamgate_flash_start are read from pset - if(m_reco_flash_time[i] <= m_beamgate_flash_end && m_reco_flash_time[i] >= m_beamgate_flash_start){ - m_reco_num_flashes_in_beamgate++; - m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); - m_reco_flash_time_in_beamgate[i]=(flash->Time()); - m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); - m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); + vars.m_reco_flash_total_pe[i]=(flash->TotalPE()); + vars.m_reco_flash_time[i]=(flash->Time()); + vars.m_reco_flash_time_width[i]=flash->TimeWidth(); + vars.m_reco_flash_abs_time[i]=flash->AbsTime(); + vars.m_reco_flash_frame[i]=flash->Frame(); + vars.m_reco_flash_ycenter[i]=flash->YCenter(); + vars.m_reco_flash_ywidth[i]=flash->YWidth(); + vars.m_reco_flash_zcenter[i]=flash->ZCenter(); + vars.m_reco_flash_zwidth[i]=flash->ZWidth(); + + // paras.s_beamgate_flash_end/paras.s_beamgate_flash_start are read from pset + if(vars.m_reco_flash_time[i] <= paras.s_beamgate_flash_end && vars.m_reco_flash_time[i] >= paras.s_beamgate_flash_start){ + vars.m_reco_num_flashes_in_beamgate++; + vars.m_reco_flash_total_pe_in_beamgate[i]=(flash->TotalPE()); + vars.m_reco_flash_time_in_beamgate[i]=(flash->Time()); + vars.m_reco_flash_ycenter_in_beamgate[i] = flash->YCenter(); + vars.m_reco_flash_zcenter_in_beamgate[i] = flash->ZCenter(); } - - } - if(m_is_verbose) std::cout<<"AnalyzeFlashes()\t||\t Finished. There was "< "< "<size(); double _dt_abs = 100000.0; // double _within_resolution = 0; - double _beam_flash_time = m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? + double _beam_flash_time = vars.m_reco_flash_time_in_beamgate[0]; // Guanqun: why use index 0? // Loop over the CRT hits. for (int j = 0; j < _nCRThits_in_event; j++) @@ -795,37 +793,37 @@ namespace single_photon if (verbose) std::cout << "\t Time of the CRT Hit wrt the event timestamp = " << ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + fDTOffset) / 1000.) << " us." << std::endl; */ - double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + m_DTOffset) / 1000.); + double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + paras.s_DTOffset) / 1000.); // Fill the vector variables. - m_CRT_hits_time.push_back(_crt_time_temp); - m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); - m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); - m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); - m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); + vars.m_CRT_hits_time.push_back(_crt_time_temp); + vars.m_CRT_hits_PE.push_back(crthit_h->at(j).peshit); + vars.m_CRT_hits_x.push_back(crthit_h->at(j).x_pos); + vars.m_CRT_hits_y.push_back(crthit_h->at(j).y_pos); + vars.m_CRT_hits_z.push_back(crthit_h->at(j).z_pos); if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs) { _dt_abs = fabs(_beam_flash_time - _crt_time_temp); - m_CRT_dt = _beam_flash_time - _crt_time_temp; - m_CRT_min_hit_time = _crt_time_temp; + vars.m_CRT_dt = _beam_flash_time - _crt_time_temp; + vars.m_CRT_min_hit_time = _crt_time_temp; // set 'within_resolution' to 'true' and break the loop if 'closest_crt_diff' is less than fResolution. - if (_dt_abs < m_Resolution) + if (_dt_abs < paras.s_Resolution) { //_within_resolution = 1; // Set the position information and the intensity of the CRT hit. - m_CRT_min_hit_PE = crthit_h->at(j).peshit; - m_CRT_min_hit_x = crthit_h->at(j).x_pos; - m_CRT_min_hit_y = crthit_h->at(j).y_pos; - m_CRT_min_hit_z = crthit_h->at(j).z_pos; + vars.m_CRT_min_hit_PE = crthit_h->at(j).peshit; + vars.m_CRT_min_hit_x = crthit_h->at(j).x_pos; + vars.m_CRT_min_hit_y = crthit_h->at(j).y_pos; + vars.m_CRT_min_hit_z = crthit_h->at(j).z_pos; // if (verbose) // { - std::cout << "CRT hit PE = " << m_CRT_min_hit_PE << " PEs." << std::endl; - std::cout << "CRT hit x = " << m_CRT_min_hit_x << " cm." << std::endl; - std::cout << "CRT hit y = " << m_CRT_min_hit_y << " cm." << std::endl; - std::cout << "CRT hit z = " << m_CRT_min_hit_z << " cm." << std::endl; + std::cout << "CRT hit PE = " << vars.m_CRT_min_hit_PE << " PEs." << std::endl; + std::cout << "CRT hit x = " << vars.m_CRT_min_hit_x << " cm." << std::endl; + std::cout << "CRT hit y = " << vars.m_CRT_min_hit_y << " cm." << std::endl; + std::cout << "CRT hit z = " << vars.m_CRT_min_hit_z << " cm." << std::endl; // } break; } @@ -844,9 +842,10 @@ namespace single_photon const std::vector>& showers, std::map, std::vector> > & clusterToHitMap , double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ){ - // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"< pfp = ppfp->pPFParticle; art::Ptr shower3d; - m_reco_shower3d_exists[i_shr] = 0; + vars.m_reco_shower3d_exists[i_shr] = 0; shower3d = shower; const std::vector> hits = ppfp->pPFPHits; const std::vector> clusters = ppfp->pClusters; - //int m_shrid = shower->ID(); This is an used variable, always -999 - double m_length = shower->Length(); - double m_open_angle = shower->OpenAngle(); + //int vars.m_shrid = shower->ID(); This is an used variable, always -999 + double tem_length = shower->Length(); + double tem_open_angle = shower->OpenAngle(); TVector3 shr_start = shower->ShowerStart(); TVector3 shr_dir = shower->Direction(); @@ -878,103 +877,103 @@ namespace single_photon TVector3 shr3d_start = shower3d->ShowerStart(); TVector3 shr3d_dir = shower3d->Direction(); - // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t On Shower: "< hstart = {m_reco_shower_startx[i_shr],m_reco_shower_starty[i_shr],m_reco_shower_startz[i_shr]}; - m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart); - m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart); - m_reco_shower_start_in_SCB[i_shr] = distToSCB(m_reco_shower_start_dist_to_SCB[i_shr],hstart); + std::vector hstart = {vars.m_reco_shower_startx[i_shr],vars.m_reco_shower_starty[i_shr],vars.m_reco_shower_startz[i_shr]}; + vars.m_reco_shower_start_dist_to_active_TPC[i_shr] = distToTPCActive(hstart, paras); + vars.m_reco_shower_start_dist_to_CPA[i_shr] = distToCPA(hstart, paras); + vars.m_reco_shower_start_in_SCB[i_shr] = distToSCB(vars.m_reco_shower_start_dist_to_SCB[i_shr],hstart, paras); - m_reco_shower_dirx[i_shr] = shr_dir.X(); - m_reco_shower_diry[i_shr] = shr_dir.Y(); - m_reco_shower_dirz[i_shr] = shr_dir.Z(); - m_reco_shower_length[i_shr] = m_length; - m_reco_shower_openingangle[i_shr] = m_open_angle; + vars.m_reco_shower_dirx[i_shr] = shr_dir.X(); + vars.m_reco_shower_diry[i_shr] = shr_dir.Y(); + vars.m_reco_shower_dirz[i_shr] = shr_dir.Z(); + vars.m_reco_shower_length[i_shr] = tem_length; + vars.m_reco_shower_openingangle[i_shr] = tem_open_angle; - m_reco_shower3d_startx[i_shr] = shr3d_start.X(); - m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); - m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); - m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); - m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); - m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); - m_reco_shower3d_length[i_shr] = shower3d->Length(); - m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); + vars.m_reco_shower3d_startx[i_shr] = shr3d_start.X(); + vars.m_reco_shower3d_starty[i_shr] = shr3d_start.Y(); + vars.m_reco_shower3d_startz[i_shr] = shr3d_start.Z(); + vars.m_reco_shower3d_dirx[i_shr] = shr3d_dir.X(); + vars.m_reco_shower3d_diry[i_shr] = shr3d_dir.Y(); + vars.m_reco_shower3d_dirz[i_shr] = shr3d_dir.Z(); + vars.m_reco_shower3d_length[i_shr] = shower3d->Length(); + vars.m_reco_shower3d_openingangle[i_shr] = shower3d->OpenAngle(); - m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-m_vertex_pos_x,2)+pow(shr_start.Y()-m_vertex_pos_y,2)+ pow(shr_start.Z()-m_vertex_pos_z,2) ); - m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-m_vertex_pos_x,2)+pow(shr3d_start.Y()-m_vertex_pos_y,2)+ pow(shr3d_start.Z()-m_vertex_pos_z,2) ); + vars.m_reco_shower_conversion_distance[i_shr] = sqrt( pow(shr_start.X()-vars.m_vertex_pos_x,2)+pow(shr_start.Y()-vars.m_vertex_pos_y,2)+ pow(shr_start.Z()-vars.m_vertex_pos_z,2) ); + vars.m_reco_shower3d_conversion_distance[i_shr] = sqrt( pow(shr3d_start.X()-vars.m_vertex_pos_x,2)+pow(shr3d_start.Y()-vars.m_vertex_pos_y,2)+ pow(shr3d_start.Z()-vars.m_vertex_pos_z,2) ); //pandroa shower std::vector shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()}; std::vector shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()}; - std::vector shr_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + std::vector shr_tv = {vars.m_vertex_pos_x,vars.m_vertex_pos_y,vars.m_vertex_pos_z}; - m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); - m_reco_shower_implied_dirx[i_shr] = shr_start.X()-m_vertex_pos_x;; - m_reco_shower_implied_diry[i_shr] = shr_start.Y()-m_vertex_pos_y; - m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-m_vertex_pos_z; + vars.m_reco_shower_impact_parameter[i_shr] = dist_line_point(shr_ts,shr_te,shr_tv ); + vars.m_reco_shower_implied_dirx[i_shr] = shr_start.X()-vars.m_vertex_pos_x;; + vars.m_reco_shower_implied_diry[i_shr] = shr_start.Y()-vars.m_vertex_pos_y; + vars.m_reco_shower_implied_dirz[i_shr] = shr_start.Z()-vars.m_vertex_pos_z; - double norm = sqrt(pow(m_reco_shower_implied_dirx[i_shr],2)+pow(m_reco_shower_implied_diry[i_shr],2)+pow(m_reco_shower_implied_dirz[i_shr],2)); - m_reco_shower_implied_dirx[i_shr] = m_reco_shower_implied_dirx[i_shr]/norm; - m_reco_shower_implied_diry[i_shr] = m_reco_shower_implied_diry[i_shr]/norm; - m_reco_shower_implied_dirz[i_shr] = m_reco_shower_implied_dirz[i_shr]/norm; + double norm = sqrt(pow(vars.m_reco_shower_implied_dirx[i_shr],2)+pow(vars.m_reco_shower_implied_diry[i_shr],2)+pow(vars.m_reco_shower_implied_dirz[i_shr],2)); + vars.m_reco_shower_implied_dirx[i_shr] = vars.m_reco_shower_implied_dirx[i_shr]/norm; + vars.m_reco_shower_implied_diry[i_shr] = vars.m_reco_shower_implied_diry[i_shr]/norm; + vars.m_reco_shower_implied_dirz[i_shr] = vars.m_reco_shower_implied_dirz[i_shr]/norm; //now 3D shower std::vector shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()}; std::vector shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()}; - std::vector shr3d_tv = {m_vertex_pos_x,m_vertex_pos_y,m_vertex_pos_z}; + std::vector shr3d_tv = {vars.m_vertex_pos_x,vars.m_vertex_pos_y,vars.m_vertex_pos_z}; - m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); - m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-m_vertex_pos_x;; - m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-m_vertex_pos_y; - m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-m_vertex_pos_z; + vars.m_reco_shower3d_impact_parameter[i_shr] = dist_line_point(shr3d_ts,shr3d_te,shr3d_tv ); + vars.m_reco_shower3d_implied_dirx[i_shr] = shr3d_start.X()-vars.m_vertex_pos_x;; + vars.m_reco_shower3d_implied_diry[i_shr] = shr3d_start.Y()-vars.m_vertex_pos_y; + vars.m_reco_shower3d_implied_dirz[i_shr] = shr3d_start.Z()-vars.m_vertex_pos_z; - double shr3d_norm = sqrt(pow(m_reco_shower3d_implied_dirx[i_shr],2)+pow(m_reco_shower3d_implied_diry[i_shr],2)+pow(m_reco_shower3d_implied_dirz[i_shr],2)); - m_reco_shower3d_implied_dirx[i_shr] = m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; - m_reco_shower3d_implied_diry[i_shr] = m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; - m_reco_shower3d_implied_dirz[i_shr] = m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; + double shr3d_norm = sqrt(pow(vars.m_reco_shower3d_implied_dirx[i_shr],2)+pow(vars.m_reco_shower3d_implied_diry[i_shr],2)+pow(vars.m_reco_shower3d_implied_dirz[i_shr],2)); + vars.m_reco_shower3d_implied_dirx[i_shr] = vars.m_reco_shower3d_implied_dirx[i_shr]/shr3d_norm; + vars.m_reco_shower3d_implied_diry[i_shr] = vars.m_reco_shower3d_implied_diry[i_shr]/shr3d_norm; + vars.m_reco_shower3d_implied_dirz[i_shr] = vars.m_reco_shower3d_implied_dirz[i_shr]/shr3d_norm; - m_reco_shower_theta_yz[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirz[i_shr]); - m_reco_shower_phi_yx[i_shr] = atan2(m_reco_shower_diry[i_shr],m_reco_shower_dirx[i_shr]); + vars.m_reco_shower_theta_yz[i_shr] = atan2(vars.m_reco_shower_diry[i_shr],vars.m_reco_shower_dirz[i_shr]); + vars.m_reco_shower_phi_yx[i_shr] = atan2(vars.m_reco_shower_diry[i_shr],vars.m_reco_shower_dirx[i_shr]); - m_reco_shower3d_theta_yz[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirz[i_shr]); - m_reco_shower3d_phi_yx[i_shr] = atan2(m_reco_shower3d_diry[i_shr],m_reco_shower3d_dirx[i_shr]); + vars.m_reco_shower3d_theta_yz[i_shr] = atan2(vars.m_reco_shower3d_diry[i_shr],vars.m_reco_shower3d_dirz[i_shr]); + vars.m_reco_shower3d_phi_yx[i_shr] = atan2(vars.m_reco_shower3d_diry[i_shr],vars.m_reco_shower3d_dirx[i_shr]); - // m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - // m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); - // m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, m_reco_shower_starty[i_shr], m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + // vars.m_reco_shower_start_to_nearest_dead_wire_plane0[i_shr] = distanceToNearestDeadWire(0, vars.m_reco_shower_starty[i_shr], vars.m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + // vars.m_reco_shower_start_to_nearest_dead_wire_plane1[i_shr] = distanceToNearestDeadWire(1, vars.m_reco_shower_starty[i_shr], vars.m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); + // vars.m_reco_shower_start_to_nearest_dead_wire_plane2[i_shr] = distanceToNearestDeadWire(2, vars.m_reco_shower_starty[i_shr], vars.m_reco_shower_startz[i_shr],geom, bad_channel_list_fixed_mcc9); std::vector t_num(3,0); // num of triangles on each plane std::vector t_numhits(3,0); // num of hits on each plane std::vector t_area(3,0.0); //Right, this basically loops over all hits in all planes and for each plane forms the Delaunay triangilization of it and calculates the 2D area inscribed by the convex hull - // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Starting Delaunay Triangleization"<(finish-start); - //if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Finished Delaunay Triangleization. It took "<< microseconds.count() << "ms and found "<WireID().Wire; int tick = h->PeakTime(); - m_reco_shower_hit_tick.push_back(tick); - m_reco_shower_hit_plane.push_back(plane); - m_reco_shower_hit_wire.push_back(wire); + vars.m_reco_shower_hit_tick.push_back(tick); + vars.m_reco_shower_hit_plane.push_back(plane); + vars.m_reco_shower_hit_wire.push_back(wire); } } - //std::cout<<"The energy on each plane is 0: "<< m_reco_shower_energy_plane0[i_shr]<<", 1: "<< m_reco_shower_energy_plane1[i_shr]<<", 2: "<< m_reco_shower_energy_plane2[i_shr]< reco_shr_angles_wrt_wires; - for (geo::PlaneGeo const& plane: geom->IteratePlanes()) { + for (geo::PlaneGeo const& plane: paras.s_geom->IteratePlanes()) { //6 planes in SBND //WireAngleToVertical : 30 ,150,90,150,30 ,90 //ub wire angles : 30 ,150,90 (respected to beam,z) //Pitch : 0.3,0.3,0.3,0.3,0.3,0.3 - const double angToVert(geom->WireAngleToVertical(plane.View(), plane.ID())+0.5*M_PI);//wire angle respected to z + pi/2 + const double angToVert(paras.s_geom->WireAngleToVertical(plane.View(), plane.ID())+0.5*M_PI);//wire angle respected to z + pi/2 TVector3 wire_vector; if(abs(angToVert) < 1e-9 ){ @@ -1079,97 +1078,97 @@ namespace single_photon if(reco_shr_angles_wrt_wires.size()==3) break; } - m_reco_shower_angle_wrt_wires_plane0[i_shr] = reco_shr_angles_wrt_wires[0]; - m_reco_shower_angle_wrt_wires_plane1[i_shr] = reco_shr_angles_wrt_wires[1]; - m_reco_shower_angle_wrt_wires_plane2[i_shr] = reco_shr_angles_wrt_wires[2]; + vars.m_reco_shower_angle_wrt_wires_plane0[i_shr] = reco_shr_angles_wrt_wires[0]; + vars.m_reco_shower_angle_wrt_wires_plane1[i_shr] = reco_shr_angles_wrt_wires[1]; + vars.m_reco_shower_angle_wrt_wires_plane2[i_shr] = reco_shr_angles_wrt_wires[2]; - m_reco_shower_dQdx_plane0_median[i_shr] = getMedian(m_reco_shower_dQdx_plane0[i_shr]); - m_reco_shower_dQdx_plane1_median[i_shr] = getMedian(m_reco_shower_dQdx_plane1[i_shr]); - m_reco_shower_dQdx_plane2_median[i_shr] = getMedian(m_reco_shower_dQdx_plane2[i_shr]); + vars.m_reco_shower_dQdx_plane0_median[i_shr] = getMedian(vars.m_reco_shower_dQdx_plane0[i_shr]); + vars.m_reco_shower_dQdx_plane1_median[i_shr] = getMedian(vars.m_reco_shower_dQdx_plane1[i_shr]); + vars.m_reco_shower_dQdx_plane2_median[i_shr] = getMedian(vars.m_reco_shower_dQdx_plane2[i_shr]); - m_reco_shower_dEdx_plane0_mean[i_shr] = std::accumulate(m_reco_shower_dEdx_plane0[i_shr].begin(), m_reco_shower_dEdx_plane0[i_shr].end(), 0.0)/((double)m_reco_shower_dEdx_plane0[i_shr].size()); - m_reco_shower_dEdx_plane1_mean[i_shr] = std::accumulate(m_reco_shower_dEdx_plane1[i_shr].begin(), m_reco_shower_dEdx_plane1[i_shr].end(), 0.0)/((double)m_reco_shower_dEdx_plane1[i_shr].size()); - m_reco_shower_dEdx_plane2_mean[i_shr] = std::accumulate(m_reco_shower_dEdx_plane2[i_shr].begin(), m_reco_shower_dEdx_plane2[i_shr].end(), 0.0)/((double)m_reco_shower_dEdx_plane2[i_shr].size()); + vars.m_reco_shower_dEdx_plane0_mean[i_shr] = std::accumulate(vars.m_reco_shower_dEdx_plane0[i_shr].begin(), vars.m_reco_shower_dEdx_plane0[i_shr].end(), 0.0)/((double)vars.m_reco_shower_dEdx_plane0[i_shr].size()); + vars.m_reco_shower_dEdx_plane1_mean[i_shr] = std::accumulate(vars.m_reco_shower_dEdx_plane1[i_shr].begin(), vars.m_reco_shower_dEdx_plane1[i_shr].end(), 0.0)/((double)vars.m_reco_shower_dEdx_plane1[i_shr].size()); + vars.m_reco_shower_dEdx_plane2_mean[i_shr] = std::accumulate(vars.m_reco_shower_dEdx_plane2[i_shr].begin(), vars.m_reco_shower_dEdx_plane2[i_shr].end(), 0.0)/((double)vars.m_reco_shower_dEdx_plane2[i_shr].size()); - auto maxp0 = std::max_element(m_reco_shower_dEdx_plane0[i_shr].begin(), m_reco_shower_dEdx_plane0[i_shr].end()); - auto maxp1 = std::max_element(m_reco_shower_dEdx_plane1[i_shr].begin(), m_reco_shower_dEdx_plane1[i_shr].end()); - auto maxp2 = std::max_element(m_reco_shower_dEdx_plane2[i_shr].begin(), m_reco_shower_dEdx_plane2[i_shr].end()); - auto minp0 = std::min_element(m_reco_shower_dEdx_plane0[i_shr].begin(), m_reco_shower_dEdx_plane0[i_shr].end()); - auto minp1 = std::min_element(m_reco_shower_dEdx_plane1[i_shr].begin(), m_reco_shower_dEdx_plane1[i_shr].end()); - auto minp2 = std::min_element(m_reco_shower_dEdx_plane2[i_shr].begin(), m_reco_shower_dEdx_plane2[i_shr].end()); + auto maxp0 = std::max_element(vars.m_reco_shower_dEdx_plane0[i_shr].begin(), vars.m_reco_shower_dEdx_plane0[i_shr].end()); + auto maxp1 = std::max_element(vars.m_reco_shower_dEdx_plane1[i_shr].begin(), vars.m_reco_shower_dEdx_plane1[i_shr].end()); + auto maxp2 = std::max_element(vars.m_reco_shower_dEdx_plane2[i_shr].begin(), vars.m_reco_shower_dEdx_plane2[i_shr].end()); + auto minp0 = std::min_element(vars.m_reco_shower_dEdx_plane0[i_shr].begin(), vars.m_reco_shower_dEdx_plane0[i_shr].end()); + auto minp1 = std::min_element(vars.m_reco_shower_dEdx_plane1[i_shr].begin(), vars.m_reco_shower_dEdx_plane1[i_shr].end()); + auto minp2 = std::min_element(vars.m_reco_shower_dEdx_plane2[i_shr].begin(), vars.m_reco_shower_dEdx_plane2[i_shr].end()); - if(maxp0 == m_reco_shower_dEdx_plane0[i_shr].end()){ - m_reco_shower_dEdx_plane0_max[i_shr] = -999; + if(maxp0 == vars.m_reco_shower_dEdx_plane0[i_shr].end()){ + vars.m_reco_shower_dEdx_plane0_max[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane0_max[i_shr] = *maxp0; + vars.m_reco_shower_dEdx_plane0_max[i_shr] = *maxp0; } - if(maxp1 == m_reco_shower_dEdx_plane1[i_shr].end()){ - m_reco_shower_dEdx_plane1_max[i_shr] = -999; + if(maxp1 == vars.m_reco_shower_dEdx_plane1[i_shr].end()){ + vars.m_reco_shower_dEdx_plane1_max[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane1_max[i_shr] = *maxp1; + vars.m_reco_shower_dEdx_plane1_max[i_shr] = *maxp1; } - if(maxp2 == m_reco_shower_dEdx_plane2[i_shr].end()){ - m_reco_shower_dEdx_plane2_max[i_shr] = -999; + if(maxp2 == vars.m_reco_shower_dEdx_plane2[i_shr].end()){ + vars.m_reco_shower_dEdx_plane2_max[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane2_max[i_shr] = *maxp2; + vars.m_reco_shower_dEdx_plane2_max[i_shr] = *maxp2; } - if(minp0 == m_reco_shower_dEdx_plane0[i_shr].end()){ - m_reco_shower_dEdx_plane0_min[i_shr] = -999; + if(minp0 == vars.m_reco_shower_dEdx_plane0[i_shr].end()){ + vars.m_reco_shower_dEdx_plane0_min[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane0_min[i_shr] = *minp0; + vars.m_reco_shower_dEdx_plane0_min[i_shr] = *minp0; } - if(minp1 == m_reco_shower_dEdx_plane1[i_shr].end()){ - m_reco_shower_dEdx_plane1_min[i_shr] = -999; + if(minp1 == vars.m_reco_shower_dEdx_plane1[i_shr].end()){ + vars.m_reco_shower_dEdx_plane1_min[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane1_min[i_shr] = *minp1; + vars.m_reco_shower_dEdx_plane1_min[i_shr] = *minp1; } - if(minp2 == m_reco_shower_dEdx_plane2[i_shr].end()){ - m_reco_shower_dEdx_plane2_min[i_shr] = -999; + if(minp2 == vars.m_reco_shower_dEdx_plane2[i_shr].end()){ + vars.m_reco_shower_dEdx_plane2_min[i_shr] = -999; }else{ - m_reco_shower_dEdx_plane2_min[i_shr] = *minp2; + vars.m_reco_shower_dEdx_plane2_min[i_shr] = *minp2; } - m_reco_shower_dEdx_plane0_nhits[i_shr] = m_reco_shower_dEdx_plane0[i_shr].size(); - m_reco_shower_dEdx_plane1_nhits[i_shr] = m_reco_shower_dEdx_plane1[i_shr].size(); - m_reco_shower_dEdx_plane2_nhits[i_shr] = m_reco_shower_dEdx_plane2[i_shr].size(); - - m_reco_shower_dEdx_amalgamated[i_shr] = getAmalgamateddEdx( - m_reco_shower_angle_wrt_wires_plane0[i_shr], - m_reco_shower_angle_wrt_wires_plane1[i_shr], - m_reco_shower_angle_wrt_wires_plane2[i_shr], - m_reco_shower_dEdx_plane0_median[i_shr], - m_reco_shower_dEdx_plane1_median[i_shr], - m_reco_shower_dEdx_plane2_median[i_shr], - m_reco_shower_dEdx_plane0_nhits[i_shr], - m_reco_shower_dEdx_plane1_nhits[i_shr], - m_reco_shower_dEdx_plane2_nhits[i_shr] ); - - m_reco_shower_dEdx_amalgamated_nhits[i_shr] = getAmalgamateddEdxNHits( - m_reco_shower_dEdx_amalgamated[i_shr], - m_reco_shower_dEdx_plane0_median[i_shr], - m_reco_shower_dEdx_plane1_median[i_shr], - m_reco_shower_dEdx_plane2_median[i_shr], - m_reco_shower_dEdx_plane0_nhits[i_shr], - m_reco_shower_dEdx_plane1_nhits[i_shr], - m_reco_shower_dEdx_plane2_nhits[i_shr] ); - - //-------------- Flashes : Was there a flash in the beam_time and if so was it near in Z? -------------------- - double zmin = m_reco_shower_startz[i_shr]; - double zmax = zmin + m_reco_shower_dirz[i_shr]*m_reco_shower_length[i_shr]; + vars.m_reco_shower_dEdx_plane0_nhits[i_shr] = vars.m_reco_shower_dEdx_plane0[i_shr].size(); + vars.m_reco_shower_dEdx_plane1_nhits[i_shr] = vars.m_reco_shower_dEdx_plane1[i_shr].size(); + vars.m_reco_shower_dEdx_plane2_nhits[i_shr] = vars.m_reco_shower_dEdx_plane2[i_shr].size(); + + vars.m_reco_shower_dEdx_amalgamated[i_shr] = getAmalgamateddEdx( + vars.m_reco_shower_angle_wrt_wires_plane0[i_shr], + vars.m_reco_shower_angle_wrt_wires_plane1[i_shr], + vars.m_reco_shower_angle_wrt_wires_plane2[i_shr], + vars.m_reco_shower_dEdx_plane0_median[i_shr], + vars.m_reco_shower_dEdx_plane1_median[i_shr], + vars.m_reco_shower_dEdx_plane2_median[i_shr], + vars.m_reco_shower_dEdx_plane0_nhits[i_shr], + vars.m_reco_shower_dEdx_plane1_nhits[i_shr], + vars.m_reco_shower_dEdx_plane2_nhits[i_shr] ); + + vars.m_reco_shower_dEdx_amalgamated_nhits[i_shr] = getAmalgamateddEdxNHits( + vars.m_reco_shower_dEdx_amalgamated[i_shr], + vars.m_reco_shower_dEdx_plane0_median[i_shr], + vars.m_reco_shower_dEdx_plane1_median[i_shr], + vars.m_reco_shower_dEdx_plane2_median[i_shr], + vars.m_reco_shower_dEdx_plane0_nhits[i_shr], + vars.m_reco_shower_dEdx_plane1_nhits[i_shr], + vars.m_reco_shower_dEdx_plane2_nhits[i_shr] ); + + //-------------- Flashes : Was there a flash in the beavars.m_time and if so was it near in Z? -------------------- + double zmin = vars.m_reco_shower_startz[i_shr]; + double zmax = zmin + vars.m_reco_shower_dirz[i_shr]*vars.m_reco_shower_length[i_shr]; if(zmin > zmax) std::swap(zmin, zmax); - double ymin = m_reco_shower_starty[i_shr]; - double ymax = zmin + m_reco_shower_diry[i_shr]*m_reco_shower_length[i_shr]; + double ymin = vars.m_reco_shower_starty[i_shr]; + double ymax = zmin + vars.m_reco_shower_diry[i_shr]*vars.m_reco_shower_length[i_shr]; if(ymin > ymax) std::swap(ymin, ymax); //Code property of Gray Yarbrough (all rights reserved) @@ -1182,13 +1181,13 @@ namespace single_photon int shortest_dist_to_flash_index_y=-999; int shortest_dist_to_flash_index_yz=-999; - // if(m_is_verbose) std::cout<<"AnalyzeShowers()\t||\tnumber of flashes: "<< m_reco_num_flashes<< ""<NumDaughters(); //corresponding PFParticle - // std::cout<<" CHECK numebr "<0){ + vars.m_reco_shower_num_daughters[i_shr] = pfp->NumDaughters(); //corresponding PFParticle + // std::cout<<" CHECK numebr "<0){ //currently just look at 1 daughter - //m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; + //vars.m_reco_shower_daughter_trackscore[i_shr] = PFPToTrackScoreMap[pfParticleMap[pfp->Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ // std::cout<<"CHECK Compare "<Daughters().front()<< // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); + vars.m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); break; } } @@ -1267,15 +1266,15 @@ namespace single_photon //------------and finally some slice info----------------- - m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_reco_shower_sliceId[i_shr]] ; - m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + vars.m_reco_shower_sliceId[i_shr] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + vars.m_reco_shower_nuscore[i_shr] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ vars.m_reco_shower_sliceId[i_shr]] ; + vars.m_reco_shower_isclearcosmic[i_shr] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + vars.m_reco_shower_is_nuslice[i_shr] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; - m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); - m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); + vars.m_reco_shower_trackscore[i_shr] = ppfp->get_TrackScore(); + vars.m_reco_shower_pfparticle_pdg[i_shr] = ppfp->get_PdgCode(); - // if ( m_reco_shower_sliceId[i_shr] >0) std::cout<<"AnalyzeShowers()\t||\t On Shower: "<0) std::cout<<"AnalyzeShowers()\t||\t On Shower: "<>& tracks, std::map, std::vector>> & pfParticleToSpacePointsMap, std::map > & MCParticleToTrackIdMap, - std::map &sliceIdToNuScoreMap); + std::map &sliceIdToNuScoreMap, + var_all& vars, + para_all& paras); - void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); + void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs, var_all& vars, para_all& paras); void CollectPID(std::vector> & tracks, - std::vector all_PPFPs); + std::vector all_PPFPs, var_all& vars); //Analyze falshes - void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); + void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap, var_all& vars, para_all& paras); //Analyze Showers @@ -33,7 +35,8 @@ namespace single_photon const std::vector>& showers, std::map, std::vector> > & clusterToHitMap , double triggeroffset, - detinfo::DetectorPropertiesData const & theDetector - ); + detinfo::DetectorPropertiesData const & theDetector, + var_all& vars, + para_all& paras); } #endif // SBNCODE_SINGLEPHOTONANALYSIS_ANALYZE_PANDORARECO_H diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx index 5b002adbf..7d6f25e45 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx @@ -6,7 +6,7 @@ namespace single_photon { -int setTPCGeom(){ +int setTPCGeom(para_all& paras){ //copy these from CAFMaker/CAFMaker_module.c const geo::GeometryCore *geometry = lar::providerFrom(); @@ -20,22 +20,22 @@ int setTPCGeom(){ this_tpc_volumes.push_back(TPC.ActiveBoundingBox()); iTPC++; } - fTPCVolumes.push_back(std::move(this_tpc_volumes)); + paras.fTPCVolumes.push_back(std::move(this_tpc_volumes)); } // then combine them into active volumes - for (const std::vector &tpcs: fTPCVolumes) { - m_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); - m_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); - m_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); - - m_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); - m_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); - m_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); - if(m_is_verbose){ - std::cout<<""<<__FUNCTION__<<" || Active TPC info: X:("< &tpcs: paras.fTPCVolumes) { + paras.s_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinX() < rhs.MinX(); })->MinX(); + paras.s_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinY() < rhs.MinY(); })->MinY(); + paras.s_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MinZ() < rhs.MinZ(); })->MinZ(); + + paras.s_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxX() < rhs.MaxX(); })->MaxX(); + paras.s_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); + paras.s_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + if(g_is_verbose){ + std::cout<<""<<__FUNCTION__<<" || Active TPC info: X:("< & vec){ +int isInTPCActive(std::vector & vec, para_all& paras){ if( vec.size() != 3){ throw cet::exception("single_photon") << " The coordinate dimension is not 3!"; } - bool is_x = (vec[0] > m_tpc_active_XMin && vec[0]< m_tpc_active_XMax ); - bool is_y = (vec[1] > m_tpc_active_YMin && vec[1]< m_tpc_active_YMax ); - bool is_z = (vec[2] > m_tpc_active_ZMin && vec[2]< m_tpc_active_ZMax ); + bool is_x = (vec[0] > paras.s_tpc_active_XMin && vec[0]< paras.s_tpc_active_XMax ); + bool is_y = (vec[1] > paras.s_tpc_active_YMin && vec[1]< paras.s_tpc_active_YMax ); + bool is_z = (vec[2] > paras.s_tpc_active_ZMin && vec[2]< paras.s_tpc_active_ZMax ); bool inside = is_x&&is_y&&is_z; return inside; @@ -59,19 +59,19 @@ int isInTPCActive(std::vector & vec){ /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ -double distToTPCActive(std::vector&vec){ - if(isInTPCActive(vec)==0) return -999; - double min_x = std::min( fabs(vec[0] - m_tpc_active_XMin) , fabs(vec[0] - m_tpc_active_XMax)); - double min_y = std::min( fabs(vec[1] - m_tpc_active_YMin) , fabs(vec[1] - m_tpc_active_YMax)); - double min_z = std::min( fabs(vec[2] - m_tpc_active_ZMin) , fabs(vec[2] - m_tpc_active_ZMax)); +double distToTPCActive(std::vector&vec, para_all& paras){ + if(isInTPCActive(vec, paras)==0) return -999; + double min_x = std::min( fabs(vec[0] - paras.s_tpc_active_XMin) , fabs(vec[0] - paras.s_tpc_active_XMax)); + double min_y = std::min( fabs(vec[1] - paras.s_tpc_active_YMin) , fabs(vec[1] - paras.s_tpc_active_YMax)); + double min_z = std::min( fabs(vec[2] - paras.s_tpc_active_ZMin) , fabs(vec[2] - paras.s_tpc_active_ZMax)); return ( (min_x&vec){ - if(isInTPCActive(vec)==0) return -999; +double distToCPA(std::vector&vec, para_all& paras){ + if(isInTPCActive(vec, paras)==0) return -999; double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45)); return dx; @@ -84,10 +84,10 @@ double distToCPA(std::vector&vec){ // return isInSCB(0.0,vec); // } -int distToSCB(double & dist, std::vector &vec){ +int distToSCB(double & dist, std::vector &vec, para_all& paras){ //CHECK! - dist = distToTPCActive( vec ); - return isInTPCActive( vec); + dist = distToTPCActive( vec, paras); + return isInTPCActive( vec, paras); //NOT USE SCB YET, bring it back later! // // //this one returns the distance to the boundary @@ -133,8 +133,8 @@ int distToSCB(double & dist, std::vector &vec){ // dist_yx = polyXY->Safety(testpt, iseg); // Compute minimum distance from testpt to any segment. // // if(0 &vec){ // } // // //up or down - // double top_y = m_tpc_active_y_high-pt.Y(); - // double bottom_y = pt.Y()+m_tpc_active_y_high; + // double top_y = s_tpc_active_y_high-pt.Y(); + // double bottom_y = pt.Y()+s_tpc_active_y_high; // double min_y = std::min(top_y, bottom_y); // // diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h index 993350651..8f493027a 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h @@ -3,22 +3,22 @@ namespace single_photon { //ask YJ - int setTPCGeom(); + int setTPCGeom(para_all& paras); /* inside TPC or not? */ - int isInTPCActive(std::vector & vec); + int isInTPCActive(std::vector & vec, para_all& paras); /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ - double distToTPCActive(std::vector&vec); + double distToTPCActive(std::vector&vec, para_all& paras); /* returns minimum distance to the TPCActive boundary around the Cathode Plane Assemble; returns -999 if the point is not in TPC active volume */ - double distToCPA(std::vector&vec); + double distToCPA(std::vector&vec, para_all& paras); - int distToSCB(double & dist, std::vector &vec); + int distToSCB(double & dist, std::vector &vec, para_all& paras); } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx index 8fb1a107e..7a409b0e8 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.cxx @@ -6,2196 +6,2196 @@ namespace single_photon //Process of initialize branches: //ClearBranches, ResizeBranches, CreateBranches - void ClearMeta(){ + void ClearMeta(var_all& vars){ //------------ Event related Variables ------------- - m_event_number = -99; - m_subrun_number = -99; - m_run_number = -99; - m_test_matched_hits = 0; + vars.m_event_number = -99; + vars.m_subrun_number = -99; + vars.m_run_number = -99; + vars.m_test_matched_hits = 0; - m_pot_per_event = 0; - m_pot_per_subrun = m_subrun_pot; - m_number_of_events_in_subrun = 0; + vars.m_pot_per_event = 0; + vars.m_pot_per_subrun = vars.m_subrun_pot; + vars.m_number_of_events_in_subrun = 0; - m_genie_spline_weight = 1.0; + vars.m_genie_spline_weight = 1.0; //------------ Vertex related Variables ------------- - m_reco_vertex_size = 0; - m_vertex_pos_x=-99999; - m_vertex_pos_y=-99999; - m_vertex_pos_z=-99999; - m_vertex_pos_tick=-9999; - m_vertex_pos_wire_p0=-9999; - m_vertex_pos_wire_p1=-9999; - m_vertex_pos_wire_p2=-9999; - m_reco_vertex_in_SCB = -9999; - m_reco_vertex_dist_to_SCB = -9999; - m_reco_vertex_dist_to_active_TPC= -9999; - m_reco_vertex_dist_to_CPA= -9999; - -// m_reco_vertex_to_nearest_dead_wire_plane0=-99999; -// m_reco_vertex_to_nearest_dead_wire_plane1=-99999; -// m_reco_vertex_to_nearest_dead_wire_plane2=-99999; - - m_reco_slice_objects = 0; + vars.m_reco_vertex_size = 0; + vars.m_vertex_pos_x=-99999; + vars.m_vertex_pos_y=-99999; + vars.m_vertex_pos_z=-99999; + vars.m_vertex_pos_tick=-9999; + vars.m_vertex_pos_wire_p0=-9999; + vars.m_vertex_pos_wire_p1=-9999; + vars.m_vertex_pos_wire_p2=-9999; + vars.m_reco_vertex_in_SCB = -9999; + vars.m_reco_vertex_dist_to_SCB = -9999; + vars.m_reco_vertex_dist_to_active_TPC= -9999; + vars.m_reco_vertex_dist_to_CPA= -9999; + +// vars.m_reco_vertex_to_nearest_dead_wire_plane0=-99999; +// vars.m_reco_vertex_to_nearest_dead_wire_plane1=-99999; +// vars.m_reco_vertex_to_nearest_dead_wire_plane2=-99999; + + vars.m_reco_slice_objects = 0; } - void CreateMetaBranches(){ + void CreateMetaBranches(var_all& vars){ //true_eventweight_tree - true_eventweight_tree->Branch("mcweight", "std::map>",&fmcweight); +// vars.true_eventweight_tree->Branch("mcweight", "std::map>",&vars.fmcweight); //run_subrun_tree - run_subrun_tree->Branch("run",&m_run,"run/I"); - run_subrun_tree->Branch("subrun",&m_subrun,"subrun/I"); - run_subrun_tree->Branch("subrun_pot",&m_subrun_pot,"subrun_pot/D"); - run_subrun_tree->Branch("subrun_counts",&m_subrun_counts,"subrun_counts/I"); + vars.run_subrun_tree->Branch("run",&vars.m_run,"run/I"); + vars.run_subrun_tree->Branch("subrun",&vars.m_subrun,"subrun/I"); + vars.run_subrun_tree->Branch("subrun_pot",&vars.m_subrun_pot,"subrun_pot/D"); + vars.run_subrun_tree->Branch("subrun_counts",&vars.m_subrun_counts,"subrun_counts/I"); //pot_tree - pot_tree->Branch("number_of_events",&m_number_of_events,"number_of_events/I"); - pot_tree->Branch("number_of_vertices",&m_number_of_vertices,"number_of_vertices/I"); - pot_tree->Branch("POT",&m_pot_count,"POT/D"); + vars.pot_tree->Branch("number_of_events",&vars.m_number_of_events,"number_of_events/I"); + vars.pot_tree->Branch("number_of_vertices",&vars.m_number_of_vertices,"number_of_vertices/I"); + vars.pot_tree->Branch("POT",&vars.m_pot_count,"POT/D"); - //vertex_tree -- part of it + //vars.vertex_tree -- part of it // --------------------- Event Related variables ------------ - vertex_tree->Branch("run_number", &m_run_number, "run_number/I"); - vertex_tree->Branch("subrun_number", &m_subrun_number, "subrun_number/I"); - vertex_tree->Branch("event_number", &m_event_number, "event_number/I"); + vars.vertex_tree->Branch("run_number", &vars.m_run_number, "run_number/I"); + vars.vertex_tree->Branch("subrun_number", &vars.m_subrun_number, "subrun_number/I"); + vars.vertex_tree->Branch("event_number", &vars.m_event_number, "event_number/I"); - vertex_tree->Branch("pot_per_event",&m_pot_per_event,"pot_per_event/D"); - vertex_tree->Branch("pot_per_subrun",&m_pot_per_subrun,"pot_per_subrun/D"); - vertex_tree->Branch("number_of_events_in_subrun",&m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); + vars.vertex_tree->Branch("pot_per_event",&vars.m_pot_per_event,"pot_per_event/D"); + vars.vertex_tree->Branch("pot_per_subrun",&vars.m_pot_per_subrun,"pot_per_subrun/D"); + vars.vertex_tree->Branch("number_of_events_in_subrun",&vars.m_number_of_events_in_subrun,"number_of_events_in_subrun/D"); - vertex_tree->Branch("genie_spline_weight", &m_genie_spline_weight, "genie_spline_weight/D"); - vertex_tree->Branch("genie_CV_tune_weight", &m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); + vars.vertex_tree->Branch("genie_spline_weight", &vars.m_genie_spline_weight, "genie_spline_weight/D"); + vars.vertex_tree->Branch("genie_CV_tune_weight", &vars.m_genie_CV_tune_weight, "genie_CV_tune_weight/D"); - vertex_tree->Branch("photonu_weight_low", &m_photonu_weight_low, "photonu_weight_low/D"); - vertex_tree->Branch("photonu_weight_high", &m_photonu_weight_high, "photonu_weight_high/D"); + vars.vertex_tree->Branch("photonu_weight_low", &vars.m_photonu_weight_low, "photonu_weight_low/D"); + vars.vertex_tree->Branch("photonu_weight_high", &vars.m_photonu_weight_high, "photonu_weight_high/D"); - vertex_tree->Branch("test_matched_hits", &m_test_matched_hits, "test_matched_hits/I"); + vars.vertex_tree->Branch("test_matched_hits", &vars.m_test_matched_hits, "test_matched_hits/I"); // --------------------- Vertex Related variables ------------ - vertex_tree->Branch("reco_vertex_size", &m_reco_vertex_size); - vertex_tree->Branch("reco_vertex_x", &m_vertex_pos_x); - vertex_tree->Branch("reco_vertex_y", &m_vertex_pos_y); - vertex_tree->Branch("reco_vertex_z", &m_vertex_pos_z); - vertex_tree->Branch("reco_vertex_in_SCB", &m_reco_vertex_in_SCB); - vertex_tree->Branch("reco_vertex_dist_to_SCB",&m_reco_vertex_dist_to_SCB); - vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&m_reco_vertex_dist_to_active_TPC); - vertex_tree->Branch("reco_vertex_dist_to_CPA",&m_reco_vertex_dist_to_CPA); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&m_reco_vertex_to_nearest_dead_wire_plane0); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&m_reco_vertex_to_nearest_dead_wire_plane1); -// vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&m_reco_vertex_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_slice_objects", &m_reco_slice_objects, "reco_slice_objects/I"); - - vertex_tree->Branch("m_flash_optfltr_pe_beam",&m_flash_optfltr_pe_beam); - vertex_tree->Branch("m_flash_optfltr_pe_veto",&m_flash_optfltr_pe_veto); - vertex_tree->Branch("m_flash_optfltr_pe_veto_tot",&m_flash_optfltr_pe_veto_tot); - vertex_tree->Branch("m_flash_optfltr_pe_beam_tot",&m_flash_optfltr_pe_beam_tot); + vars.vertex_tree->Branch("reco_vertex_size", &vars.m_reco_vertex_size); + vars.vertex_tree->Branch("reco_vertex_x", &vars.m_vertex_pos_x); + vars.vertex_tree->Branch("reco_vertex_y", &vars.m_vertex_pos_y); + vars.vertex_tree->Branch("reco_vertex_z", &vars.m_vertex_pos_z); + vars.vertex_tree->Branch("reco_vertex_in_SCB", &vars.m_reco_vertex_in_SCB); + vars.vertex_tree->Branch("reco_vertex_dist_to_SCB",&vars.m_reco_vertex_dist_to_SCB); + vars.vertex_tree->Branch("reco_vertex_dist_to_active_TPC",&vars.m_reco_vertex_dist_to_active_TPC); + vars.vertex_tree->Branch("reco_vertex_dist_to_CPA",&vars.m_reco_vertex_dist_to_CPA); +// vars.vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane0",&vars.m_reco_vertex_to_nearest_dead_wire_plane0); +// vars.vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane1",&vars.m_reco_vertex_to_nearest_dead_wire_plane1); +// vars.vertex_tree->Branch("reco_vertex_to_nearest_dead_wire_plane2",&vars.m_reco_vertex_to_nearest_dead_wire_plane2); + + vars.vertex_tree->Branch("reco_slice_objects", &vars.m_reco_slice_objects, "reco_slice_objects/I"); + + vars.vertex_tree->Branch("vars.m_flash_optfltr_pe_beam",&vars.m_flash_optfltr_pe_beam); + vars.vertex_tree->Branch("vars.m_flash_optfltr_pe_veto",&vars.m_flash_optfltr_pe_veto); + vars.vertex_tree->Branch("vars.m_flash_optfltr_pe_veto_tot",&vars.m_flash_optfltr_pe_veto_tot); + vars.vertex_tree->Branch("vars.m_flash_optfltr_pe_beavars.m_tot",&vars.m_flash_optfltr_pe_beam_tot); } //isolation.h - void ClearIsolation(){ - m_isolation_min_dist_trk_shr.clear(); - m_isolation_min_dist_trk_unassoc.clear(); + void ClearIsolation(var_all& vars){ + vars.m_isolation_min_dist_trk_shr.clear(); + vars.m_isolation_min_dist_trk_unassoc.clear(); - m_isolation_num_shr_hits_win_1cm_trk.clear(); - m_isolation_num_shr_hits_win_2cm_trk.clear(); - m_isolation_num_shr_hits_win_5cm_trk.clear(); - m_isolation_num_shr_hits_win_10cm_trk.clear(); + vars.m_isolation_num_shr_hits_win_1cm_trk.clear(); + vars.m_isolation_num_shr_hits_win_2cm_trk.clear(); + vars.m_isolation_num_shr_hits_win_5cm_trk.clear(); + vars.m_isolation_num_shr_hits_win_10cm_trk.clear(); - m_isolation_num_unassoc_hits_win_1cm_trk.clear(); - m_isolation_num_unassoc_hits_win_2cm_trk.clear(); - m_isolation_num_unassoc_hits_win_5cm_trk.clear(); - m_isolation_num_unassoc_hits_win_10cm_trk.clear(); + vars.m_isolation_num_unassoc_hits_win_1cm_trk.clear(); + vars.m_isolation_num_unassoc_hits_win_2cm_trk.clear(); + vars.m_isolation_num_unassoc_hits_win_5cm_trk.clear(); + vars.m_isolation_num_unassoc_hits_win_10cm_trk.clear(); - m_isolation_nearest_shr_hit_to_trk_wire.clear(); - m_isolation_nearest_shr_hit_to_trk_time.clear(); + vars.m_isolation_nearest_shr_hit_to_trk_wire.clear(); + vars.m_isolation_nearest_shr_hit_to_trk_time.clear(); - m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); - m_isolation_nearest_unassoc_hit_to_trk_time.clear(); + vars.m_isolation_nearest_unassoc_hit_to_trk_wire.clear(); + vars.m_isolation_nearest_unassoc_hit_to_trk_time.clear(); } - void CreateIsolationBranches(){ - vertex_tree->Branch("isolation_min_dist_trk_shr", &m_isolation_min_dist_trk_shr); - vertex_tree->Branch("isolation_min_dist_trk_unassoc", &m_isolation_min_dist_trk_unassoc); + void CreateIsolationBranches(var_all& vars){ + vars.vertex_tree->Branch("isolation_min_dist_trk_shr", &vars.m_isolation_min_dist_trk_shr); + vars.vertex_tree->Branch("isolation_min_dist_trk_unassoc", &vars.m_isolation_min_dist_trk_unassoc); - vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &m_isolation_num_shr_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &m_isolation_num_shr_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &m_isolation_num_shr_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &m_isolation_num_shr_hits_win_10cm_trk); + vars.vertex_tree->Branch("isolation_num_shr_hits_win_1cm_trk", &vars.m_isolation_num_shr_hits_win_1cm_trk); + vars.vertex_tree->Branch("isolation_num_shr_hits_win_2cm_trk", &vars.m_isolation_num_shr_hits_win_2cm_trk); + vars.vertex_tree->Branch("isolation_num_shr_hits_win_5cm_trk", &vars.m_isolation_num_shr_hits_win_5cm_trk); + vars.vertex_tree->Branch("isolation_num_shr_hits_win_10cm_trk", &vars.m_isolation_num_shr_hits_win_10cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &m_isolation_num_unassoc_hits_win_1cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &m_isolation_num_unassoc_hits_win_2cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &m_isolation_num_unassoc_hits_win_5cm_trk); - vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &m_isolation_num_unassoc_hits_win_10cm_trk); + vars.vertex_tree->Branch("isolation_num_unassoc_hits_win_1cm_trk", &vars.m_isolation_num_unassoc_hits_win_1cm_trk); + vars.vertex_tree->Branch("isolation_num_unassoc_hits_win_2cm_trk", &vars.m_isolation_num_unassoc_hits_win_2cm_trk); + vars.vertex_tree->Branch("isolation_num_unassoc_hits_win_5cm_trk", &vars.m_isolation_num_unassoc_hits_win_5cm_trk); + vars.vertex_tree->Branch("isolation_num_unassoc_hits_win_10cm_trk", &vars.m_isolation_num_unassoc_hits_win_10cm_trk); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &m_isolation_nearest_shr_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &m_isolation_nearest_shr_hit_to_trk_time); + vars.vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_wire", &vars.m_isolation_nearest_shr_hit_to_trk_wire); + vars.vertex_tree->Branch("isolation_nearest_shr_hit_to_trk_time", &vars.m_isolation_nearest_shr_hit_to_trk_time); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &m_isolation_nearest_unassoc_hit_to_trk_wire); - vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &m_isolation_nearest_unassoc_hit_to_trk_time); + vars.vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_wire", &vars.m_isolation_nearest_unassoc_hit_to_trk_wire); + vars.vertex_tree->Branch("isolation_nearest_unassoc_hit_to_trk_time", &vars.m_isolation_nearest_unassoc_hit_to_trk_time); } //second_shower_search.h - void ClearSecondShowers(){ - m_sss_num_unassociated_hits=0; - m_sss_num_unassociated_hits_below_threshold=0; - m_sss_num_associated_hits=0; - - m_sss_num_candidates = 0; - - m_sss_candidate_in_nu_slice.clear(); - m_sss_candidate_num_hits.clear(); - m_sss_candidate_num_wires.clear(); - m_sss_candidate_num_ticks.clear(); - m_sss_candidate_plane.clear(); - m_sss_candidate_PCA.clear(); - m_sss_candidate_mean_ADC.clear(); - m_sss_candidate_ADC_RMS.clear(); - m_sss_candidate_impact_parameter.clear(); - m_sss_candidate_fit_slope.clear(); - m_sss_candidate_veto_score.clear(); - m_sss_candidate_fit_constant.clear(); - m_sss_candidate_mean_tick.clear(); - m_sss_candidate_max_tick.clear(); - m_sss_candidate_min_tick.clear(); - m_sss_candidate_min_wire.clear(); - m_sss_candidate_max_wire.clear(); - m_sss_candidate_mean_wire.clear(); - m_sss_candidate_min_dist.clear(); - m_sss_candidate_wire_tick_based_length.clear(); - m_sss_candidate_energy.clear(); - m_sss_candidate_angle_to_shower.clear(); - m_sss_candidate_closest_neighbour.clear(); - m_sss_candidate_matched.clear(); - m_sss_candidate_matched_energy_fraction_best_plane.clear(); - m_sss_candidate_pdg.clear(); - m_sss_candidate_parent_pdg.clear(); - m_sss_candidate_trackid.clear(); - m_sss_candidate_true_energy.clear(); - m_sss_candidate_overlay_fraction.clear(); - m_sss_candidate_remerge.clear(); + void ClearSecondShowers(var_all& vars){ + vars.m_sss_num_unassociated_hits=0; + vars.m_sss_num_unassociated_hits_below_threshold=0; + vars.m_sss_num_associated_hits=0; + + vars.m_sss_num_candidates = 0; + + vars.m_sss_candidate_in_nu_slice.clear(); + vars.m_sss_candidate_num_hits.clear(); + vars.m_sss_candidate_num_wires.clear(); + vars.m_sss_candidate_num_ticks.clear(); + vars.m_sss_candidate_plane.clear(); + vars.m_sss_candidate_PCA.clear(); + vars.m_sss_candidate_mean_ADC.clear(); + vars.m_sss_candidate_ADC_RMS.clear(); + vars.m_sss_candidate_impact_parameter.clear(); + vars.m_sss_candidate_fit_slope.clear(); + vars.m_sss_candidate_veto_score.clear(); + vars.m_sss_candidate_fit_constant.clear(); + vars.m_sss_candidate_mean_tick.clear(); + vars.m_sss_candidate_max_tick.clear(); + vars.m_sss_candidate_min_tick.clear(); + vars.m_sss_candidate_min_wire.clear(); + vars.m_sss_candidate_max_wire.clear(); + vars.m_sss_candidate_mean_wire.clear(); + vars.m_sss_candidate_min_dist.clear(); + vars.m_sss_candidate_wire_tick_based_length.clear(); + vars.m_sss_candidate_energy.clear(); + vars.m_sss_candidate_angle_to_shower.clear(); + vars.m_sss_candidate_closest_neighbour.clear(); + vars.m_sss_candidate_matched.clear(); + vars.m_sss_candidate_matched_energy_fraction_best_plane.clear(); + vars.m_sss_candidate_pdg.clear(); + vars.m_sss_candidate_parent_pdg.clear(); + vars.m_sss_candidate_trackid.clear(); + vars.m_sss_candidate_true_energy.clear(); + vars.m_sss_candidate_overlay_fraction.clear(); + vars.m_sss_candidate_remerge.clear(); } - void ClearSecondShowers3D(){ - - m_sss3d_num_showers = 0; - m_sss3d_shower_start_x.clear(); - m_sss3d_shower_start_y.clear(); - m_sss3d_shower_start_z.clear(); - m_sss3d_shower_dir_x.clear(); - m_sss3d_shower_dir_y.clear(); - m_sss3d_shower_dir_z.clear(); - m_sss3d_shower_length.clear(); - m_sss3d_shower_conversion_dist.clear(); - m_sss3d_shower_invariant_mass.clear(); - m_sss3d_shower_implied_invariant_mass.clear(); - m_sss3d_shower_impact_parameter.clear(); - m_sss3d_shower_energy_max.clear(); - m_sss3d_shower_score.clear(); - m_sss3d_slice_nu.clear(); - m_sss3d_slice_clear_cosmic.clear(); - m_sss3d_shower_ioc_ratio.clear(); + void ClearSecondShowers3D(var_all& vars){ + + vars.m_sss3d_num_showers = 0; + vars.m_sss3d_shower_start_x.clear(); + vars.m_sss3d_shower_start_y.clear(); + vars.m_sss3d_shower_start_z.clear(); + vars.m_sss3d_shower_dir_x.clear(); + vars.m_sss3d_shower_dir_y.clear(); + vars.m_sss3d_shower_dir_z.clear(); + vars.m_sss3d_shower_length.clear(); + vars.m_sss3d_shower_conversion_dist.clear(); + vars.m_sss3d_shower_invariant_mass.clear(); + vars.m_sss3d_shower_implied_invariant_mass.clear(); + vars.m_sss3d_shower_impact_parameter.clear(); + vars.m_sss3d_shower_energy_max.clear(); + vars.m_sss3d_shower_score.clear(); + vars.m_sss3d_slice_nu.clear(); + vars.m_sss3d_slice_clear_cosmic.clear(); + vars.m_sss3d_shower_ioc_ratio.clear(); } - void ClearStubs(){ - m_trackstub_num_unassociated_hits = 0; - m_trackstub_unassociated_hits_below_threshold = 0; - m_trackstub_associated_hits=0; - m_trackstub_num_candidates=0; - m_trackstub_candidate_in_nu_slice.clear(); - m_trackstub_candidate_num_hits.clear(); - m_trackstub_candidate_num_wires.clear(); - m_trackstub_candidate_num_ticks.clear(); - m_trackstub_candidate_plane.clear(); - m_trackstub_candidate_PCA.clear(); - m_trackstub_candidate_mean_ADC.clear(); - m_trackstub_candidate_ADC_RMS.clear(); - m_trackstub_candidate_veto_score.clear(); - m_trackstub_candidate_mean_tick.clear(); - m_trackstub_candidate_max_tick.clear(); - m_trackstub_candidate_min_tick.clear(); - m_trackstub_candidate_min_wire.clear(); - m_trackstub_candidate_max_wire.clear(); - m_trackstub_candidate_mean_wire.clear(); - m_trackstub_candidate_min_dist.clear(); - m_trackstub_candidate_min_impact_parameter_to_shower.clear(); - m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); - m_trackstub_candidate_min_ioc_to_shower_start.clear(); - m_trackstub_candidate_ioc_based_length.clear(); - m_trackstub_candidate_wire_tick_based_length.clear(); - m_trackstub_candidate_mean_ADC_first_half.clear(); - m_trackstub_candidate_mean_ADC_second_half.clear(); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); - m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); - m_trackstub_candidate_linear_fit_chi2.clear(); - m_trackstub_candidate_energy.clear(); - m_trackstub_candidate_remerge.clear(); - m_trackstub_candidate_matched.clear(); - m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); - m_trackstub_candidate_pdg.clear(); - m_trackstub_candidate_parent_pdg.clear(); - m_trackstub_candidate_trackid.clear(); - m_trackstub_candidate_true_energy.clear(); - m_trackstub_candidate_overlay_fraction.clear(); - - m_trackstub_num_candidate_groups = 0; - m_grouped_trackstub_candidate_indices.clear(); - m_trackstub_candidate_group_timeoverlap_fraction.clear(); + void ClearStubs(var_all& vars){ + vars.m_trackstub_num_unassociated_hits = 0; + vars.m_trackstub_unassociated_hits_below_threshold = 0; + vars.m_trackstub_associated_hits=0; + vars.m_trackstub_num_candidates=0; + vars.m_trackstub_candidate_in_nu_slice.clear(); + vars.m_trackstub_candidate_num_hits.clear(); + vars.m_trackstub_candidate_num_wires.clear(); + vars.m_trackstub_candidate_num_ticks.clear(); + vars.m_trackstub_candidate_plane.clear(); + vars.m_trackstub_candidate_PCA.clear(); + vars.m_trackstub_candidate_mean_ADC.clear(); + vars.m_trackstub_candidate_ADC_RMS.clear(); + vars.m_trackstub_candidate_veto_score.clear(); + vars.m_trackstub_candidate_mean_tick.clear(); + vars.m_trackstub_candidate_max_tick.clear(); + vars.m_trackstub_candidate_min_tick.clear(); + vars.m_trackstub_candidate_min_wire.clear(); + vars.m_trackstub_candidate_max_wire.clear(); + vars.m_trackstub_candidate_mean_wire.clear(); + vars.m_trackstub_candidate_min_dist.clear(); + vars.m_trackstub_candidate_min_impact_parameter_to_shower.clear(); + vars.m_trackstub_candidate_min_conversion_dist_to_shower_start.clear(); + vars.m_trackstub_candidate_min_ioc_to_shower_start.clear(); + vars.m_trackstub_candidate_ioc_based_length.clear(); + vars.m_trackstub_candidate_wire_tick_based_length.clear(); + vars.m_trackstub_candidate_mean_ADC_first_half.clear(); + vars.m_trackstub_candidate_mean_ADC_second_half.clear(); + vars.m_trackstub_candidate_mean_ADC_first_to_second_ratio.clear(); + vars.m_trackstub_candidate_track_angle_wrt_shower_direction.clear(); + vars.m_trackstub_candidate_linear_fit_chi2.clear(); + vars.m_trackstub_candidate_energy.clear(); + vars.m_trackstub_candidate_remerge.clear(); + vars.m_trackstub_candidate_matched.clear(); + vars.m_trackstub_candidate_matched_energy_fraction_best_plane.clear(); + vars.m_trackstub_candidate_pdg.clear(); + vars.m_trackstub_candidate_parent_pdg.clear(); + vars.m_trackstub_candidate_trackid.clear(); + vars.m_trackstub_candidate_true_energy.clear(); + vars.m_trackstub_candidate_overlay_fraction.clear(); + + vars.m_trackstub_num_candidate_groups = 0; + vars.m_grouped_trackstub_candidate_indices.clear(); + vars.m_trackstub_candidate_group_timeoverlap_fraction.clear(); } - void CreateSecondShowerBranches(){ - vertex_tree->Branch("sss_num_unassociated_hits",&m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); - vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("sss_num_associated_hits",&m_sss_num_associated_hits,"sss_num_associated_hits/I"); - - vertex_tree->Branch("sss_num_candidates",&m_sss_num_candidates,"sss_num_candidates/I"); - vertex_tree->Branch("sss_candidate_veto_score",&m_sss_candidate_veto_score); - vertex_tree->Branch("sss_candidate_in_nu_slice", &m_sss_candidate_in_nu_slice); - vertex_tree->Branch("sss_candidate_num_hits",&m_sss_candidate_num_hits); - vertex_tree->Branch("sss_candidate_num_wires",&m_sss_candidate_num_wires); - vertex_tree->Branch("sss_candidate_num_ticks",&m_sss_candidate_num_ticks); - vertex_tree->Branch("sss_candidate_plane",&m_sss_candidate_plane); - vertex_tree->Branch("sss_candidate_PCA",&m_sss_candidate_PCA); - vertex_tree->Branch("sss_candidate_mean_ADC",&m_sss_candidate_mean_ADC); - vertex_tree->Branch("sss_candidate_ADC_RMS", &m_sss_candidate_ADC_RMS); - vertex_tree->Branch("sss_candidate_impact_parameter",&m_sss_candidate_impact_parameter); - vertex_tree->Branch("sss_candidate_fit_slope",&m_sss_candidate_fit_slope); - vertex_tree->Branch("sss_candidate_fit_constant",&m_sss_candidate_fit_constant); - vertex_tree->Branch("sss_candidate_mean_tick",&m_sss_candidate_mean_tick); - vertex_tree->Branch("sss_candidate_max_tick",&m_sss_candidate_max_tick); - vertex_tree->Branch("sss_candidate_min_tick",&m_sss_candidate_min_tick); - vertex_tree->Branch("sss_candidate_mean_wire",&m_sss_candidate_mean_wire); - vertex_tree->Branch("sss_candidate_max_wire",&m_sss_candidate_max_wire); - vertex_tree->Branch("sss_candidate_min_wire",&m_sss_candidate_min_wire); - vertex_tree->Branch("sss_candidate_min_dist",&m_sss_candidate_min_dist); - vertex_tree->Branch("sss_candidate_wire_tick_based_length", &m_sss_candidate_wire_tick_based_length); - vertex_tree->Branch("sss_candidate_energy",&m_sss_candidate_energy); - vertex_tree->Branch("sss_candidate_angle_to_shower",&m_sss_candidate_angle_to_shower); - vertex_tree->Branch("sss_candidate_closest_neighbour",&m_sss_candidate_closest_neighbour); - vertex_tree->Branch("sss_candidate_remerge",&m_sss_candidate_remerge); - - vertex_tree->Branch("sss_candidate_matched",&m_sss_candidate_matched); - vertex_tree->Branch("sss_candidate_pdg",&m_sss_candidate_pdg); - vertex_tree->Branch("sss_candidate_parent_pdg",&m_sss_candidate_parent_pdg); - vertex_tree->Branch("sss_candidate_trackid",&m_sss_candidate_trackid); - vertex_tree->Branch("sss_candidate_true_energy", &m_sss_candidate_true_energy); - vertex_tree->Branch("sss_candidate_overlay_fraction",&m_sss_candidate_overlay_fraction); - vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &m_sss_candidate_matched_energy_fraction_best_plane); - - - vertex_tree->Branch("sss3d_ioc_ranked_en",&m_sss3d_ioc_ranked_en); - vertex_tree->Branch("sss3d_ioc_ranked_conv",&m_sss3d_ioc_ranked_conv); - vertex_tree->Branch("sss3d_ioc_ranked_invar",&m_sss3d_ioc_ranked_invar); - vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&m_sss3d_ioc_ranked_implied_invar); - vertex_tree->Branch("sss3d_ioc_ranked_ioc",&m_sss3d_ioc_ranked_ioc); - vertex_tree->Branch("sss3d_ioc_ranked_opang",&m_sss3d_ioc_ranked_opang); - vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&m_sss3d_ioc_ranked_implied_opang); - vertex_tree->Branch("sss3d_ioc_ranked_id",&m_sss3d_ioc_ranked_id); - - vertex_tree->Branch("sss3d_invar_ranked_en",&m_sss3d_invar_ranked_en); - vertex_tree->Branch("sss3d_invar_ranked_conv",&m_sss3d_invar_ranked_conv); - vertex_tree->Branch("sss3d_invar_ranked_invar",&m_sss3d_invar_ranked_invar); - vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&m_sss3d_invar_ranked_implied_invar); - vertex_tree->Branch("sss3d_invar_ranked_ioc",&m_sss3d_invar_ranked_ioc); - vertex_tree->Branch("sss3d_invar_ranked_opang",&m_sss3d_invar_ranked_opang); - vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&m_sss3d_invar_ranked_implied_opang); - vertex_tree->Branch("sss3d_invar_ranked_id",&m_sss3d_invar_ranked_id); - - - vertex_tree->Branch("sss2d_ioc_ranked_en",&m_sss2d_ioc_ranked_en); - vertex_tree->Branch("sss2d_ioc_ranked_conv",&m_sss2d_ioc_ranked_conv); - vertex_tree->Branch("sss2d_ioc_ranked_ioc",&m_sss2d_ioc_ranked_ioc); - vertex_tree->Branch("sss2d_ioc_ranked_pca",&m_sss2d_ioc_ranked_pca); - vertex_tree->Branch("sss2d_ioc_ranked_invar",&m_sss2d_ioc_ranked_invar); - vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&m_sss2d_ioc_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&m_sss2d_ioc_ranked_num_planes); - - vertex_tree->Branch("sss2d_invar_ranked_en",&m_sss2d_invar_ranked_en); - vertex_tree->Branch("sss2d_invar_ranked_conv",&m_sss2d_invar_ranked_conv); - vertex_tree->Branch("sss2d_invar_ranked_ioc",&m_sss2d_invar_ranked_ioc); - vertex_tree->Branch("sss2d_invar_ranked_pca",&m_sss2d_invar_ranked_pca); - vertex_tree->Branch("sss2d_invar_ranked_invar",&m_sss2d_invar_ranked_invar); - vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&m_sss2d_invar_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_invar_ranked_num_planes",&m_sss2d_invar_ranked_num_planes); - - vertex_tree->Branch("sss2d_conv_ranked_en",&m_sss2d_conv_ranked_en); - vertex_tree->Branch("sss2d_conv_ranked_conv",&m_sss2d_conv_ranked_conv); - vertex_tree->Branch("sss2d_conv_ranked_ioc",&m_sss2d_conv_ranked_ioc); - vertex_tree->Branch("sss2d_conv_ranked_pca",&m_sss2d_conv_ranked_pca); - vertex_tree->Branch("sss2d_conv_ranked_invar",&m_sss2d_conv_ranked_invar); - vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&m_sss2d_conv_ranked_angle_to_shower); - vertex_tree->Branch("sss2d_conv_ranked_num_planes",&m_sss2d_conv_ranked_num_planes); + void CreateSecondShowerBranches(var_all& vars){ + vars.vertex_tree->Branch("sss_num_unassociated_hits",&vars.m_sss_num_unassociated_hits,"sss_num_unassociated_hits/I"); + vars.vertex_tree->Branch("sss_num_unassociated_hits_below_threshold",&vars.m_sss_num_unassociated_hits_below_threshold,"sss_num_unassociated_hits_below_threshold/I"); + vars.vertex_tree->Branch("sss_num_associated_hits",&vars.m_sss_num_associated_hits,"sss_num_associated_hits/I"); + + vars.vertex_tree->Branch("sss_num_candidates",&vars.m_sss_num_candidates,"sss_num_candidates/I"); + vars.vertex_tree->Branch("sss_candidate_veto_score",&vars.m_sss_candidate_veto_score); + vars.vertex_tree->Branch("sss_candidate_in_nu_slice", &vars.m_sss_candidate_in_nu_slice); + vars.vertex_tree->Branch("sss_candidate_num_hits",&vars.m_sss_candidate_num_hits); + vars.vertex_tree->Branch("sss_candidate_num_wires",&vars.m_sss_candidate_num_wires); + vars.vertex_tree->Branch("sss_candidate_num_ticks",&vars.m_sss_candidate_num_ticks); + vars.vertex_tree->Branch("sss_candidate_plane",&vars.m_sss_candidate_plane); + vars.vertex_tree->Branch("sss_candidate_PCA",&vars.m_sss_candidate_PCA); + vars.vertex_tree->Branch("sss_candidate_mean_ADC",&vars.m_sss_candidate_mean_ADC); + vars.vertex_tree->Branch("sss_candidate_ADC_RMS", &vars.m_sss_candidate_ADC_RMS); + vars.vertex_tree->Branch("sss_candidate_impact_parameter",&vars.m_sss_candidate_impact_parameter); + vars.vertex_tree->Branch("sss_candidate_fit_slope",&vars.m_sss_candidate_fit_slope); + vars.vertex_tree->Branch("sss_candidate_fit_constant",&vars.m_sss_candidate_fit_constant); + vars.vertex_tree->Branch("sss_candidate_mean_tick",&vars.m_sss_candidate_mean_tick); + vars.vertex_tree->Branch("sss_candidate_max_tick",&vars.m_sss_candidate_max_tick); + vars.vertex_tree->Branch("sss_candidate_min_tick",&vars.m_sss_candidate_min_tick); + vars.vertex_tree->Branch("sss_candidate_mean_wire",&vars.m_sss_candidate_mean_wire); + vars.vertex_tree->Branch("sss_candidate_max_wire",&vars.m_sss_candidate_max_wire); + vars.vertex_tree->Branch("sss_candidate_min_wire",&vars.m_sss_candidate_min_wire); + vars.vertex_tree->Branch("sss_candidate_min_dist",&vars.m_sss_candidate_min_dist); + vars.vertex_tree->Branch("sss_candidate_wire_tick_based_length", &vars.m_sss_candidate_wire_tick_based_length); + vars.vertex_tree->Branch("sss_candidate_energy",&vars.m_sss_candidate_energy); + vars.vertex_tree->Branch("sss_candidate_angle_to_shower",&vars.m_sss_candidate_angle_to_shower); + vars.vertex_tree->Branch("sss_candidate_closest_neighbour",&vars.m_sss_candidate_closest_neighbour); + vars.vertex_tree->Branch("sss_candidate_remerge",&vars.m_sss_candidate_remerge); + + vars.vertex_tree->Branch("sss_candidate_matched",&vars.m_sss_candidate_matched); + vars.vertex_tree->Branch("sss_candidate_pdg",&vars.m_sss_candidate_pdg); + vars.vertex_tree->Branch("sss_candidate_parent_pdg",&vars.m_sss_candidate_parent_pdg); + vars.vertex_tree->Branch("sss_candidate_trackid",&vars.m_sss_candidate_trackid); + vars.vertex_tree->Branch("sss_candidate_true_energy", &vars.m_sss_candidate_true_energy); + vars.vertex_tree->Branch("sss_candidate_overlay_fraction",&vars.m_sss_candidate_overlay_fraction); + vars.vertex_tree->Branch("sss_candidate_matched_energy_fraction_best_plane", &vars.m_sss_candidate_matched_energy_fraction_best_plane); + + + vars.vertex_tree->Branch("sss3d_ioc_ranked_en",&vars.m_sss3d_ioc_ranked_en); + vars.vertex_tree->Branch("sss3d_ioc_ranked_conv",&vars.m_sss3d_ioc_ranked_conv); + vars.vertex_tree->Branch("sss3d_ioc_ranked_invar",&vars.m_sss3d_ioc_ranked_invar); + vars.vertex_tree->Branch("sss3d_ioc_ranked_implied_invar",&vars.m_sss3d_ioc_ranked_implied_invar); + vars.vertex_tree->Branch("sss3d_ioc_ranked_ioc",&vars.m_sss3d_ioc_ranked_ioc); + vars.vertex_tree->Branch("sss3d_ioc_ranked_opang",&vars.m_sss3d_ioc_ranked_opang); + vars.vertex_tree->Branch("sss3d_ioc_ranked_implied_opang",&vars.m_sss3d_ioc_ranked_implied_opang); + vars.vertex_tree->Branch("sss3d_ioc_ranked_id",&vars.m_sss3d_ioc_ranked_id); + + vars.vertex_tree->Branch("sss3d_invar_ranked_en",&vars.m_sss3d_invar_ranked_en); + vars.vertex_tree->Branch("sss3d_invar_ranked_conv",&vars.m_sss3d_invar_ranked_conv); + vars.vertex_tree->Branch("sss3d_invar_ranked_invar",&vars.m_sss3d_invar_ranked_invar); + vars.vertex_tree->Branch("sss3d_invar_ranked_implied_invar",&vars.m_sss3d_invar_ranked_implied_invar); + vars.vertex_tree->Branch("sss3d_invar_ranked_ioc",&vars.m_sss3d_invar_ranked_ioc); + vars.vertex_tree->Branch("sss3d_invar_ranked_opang",&vars.m_sss3d_invar_ranked_opang); + vars.vertex_tree->Branch("sss3d_invar_ranked_implied_opang",&vars.m_sss3d_invar_ranked_implied_opang); + vars.vertex_tree->Branch("sss3d_invar_ranked_id",&vars.m_sss3d_invar_ranked_id); + + + vars.vertex_tree->Branch("sss2d_ioc_ranked_en",&vars.m_sss2d_ioc_ranked_en); + vars.vertex_tree->Branch("sss2d_ioc_ranked_conv",&vars.m_sss2d_ioc_ranked_conv); + vars.vertex_tree->Branch("sss2d_ioc_ranked_ioc",&vars.m_sss2d_ioc_ranked_ioc); + vars.vertex_tree->Branch("sss2d_ioc_ranked_pca",&vars.m_sss2d_ioc_ranked_pca); + vars.vertex_tree->Branch("sss2d_ioc_ranked_invar",&vars.m_sss2d_ioc_ranked_invar); + vars.vertex_tree->Branch("sss2d_ioc_ranked_angle_to_shower",&vars.m_sss2d_ioc_ranked_angle_to_shower); + vars.vertex_tree->Branch("sss2d_ioc_ranked_num_planes",&vars.m_sss2d_ioc_ranked_num_planes); + + vars.vertex_tree->Branch("sss2d_invar_ranked_en",&vars.m_sss2d_invar_ranked_en); + vars.vertex_tree->Branch("sss2d_invar_ranked_conv",&vars.m_sss2d_invar_ranked_conv); + vars.vertex_tree->Branch("sss2d_invar_ranked_ioc",&vars.m_sss2d_invar_ranked_ioc); + vars.vertex_tree->Branch("sss2d_invar_ranked_pca",&vars.m_sss2d_invar_ranked_pca); + vars.vertex_tree->Branch("sss2d_invar_ranked_invar",&vars.m_sss2d_invar_ranked_invar); + vars.vertex_tree->Branch("sss2d_invar_ranked_angle_to_shower",&vars.m_sss2d_invar_ranked_angle_to_shower); + vars.vertex_tree->Branch("sss2d_invar_ranked_num_planes",&vars.m_sss2d_invar_ranked_num_planes); + + vars.vertex_tree->Branch("sss2d_conv_ranked_en",&vars.m_sss2d_conv_ranked_en); + vars.vertex_tree->Branch("sss2d_conv_ranked_conv",&vars.m_sss2d_conv_ranked_conv); + vars.vertex_tree->Branch("sss2d_conv_ranked_ioc",&vars.m_sss2d_conv_ranked_ioc); + vars.vertex_tree->Branch("sss2d_conv_ranked_pca",&vars.m_sss2d_conv_ranked_pca); + vars.vertex_tree->Branch("sss2d_conv_ranked_invar",&vars.m_sss2d_conv_ranked_invar); + vars.vertex_tree->Branch("sss2d_conv_ranked_angle_to_shower",&vars.m_sss2d_conv_ranked_angle_to_shower); + vars.vertex_tree->Branch("sss2d_conv_ranked_num_planes",&vars.m_sss2d_conv_ranked_num_planes); } - void CreateSecondShowerBranches3D(){ - vertex_tree->Branch("sss3d_num_showers",&m_sss3d_num_showers,"sss3d_num_showers/I"); - - vertex_tree->Branch("sss3d_shower_start_x",&m_sss3d_shower_start_x); - vertex_tree->Branch("sss3d_shower_start_y",&m_sss3d_shower_start_y); - vertex_tree->Branch("sss3d_shower_start_z",&m_sss3d_shower_start_z); - vertex_tree->Branch("sss3d_shower_dir_x",&m_sss3d_shower_dir_x); - vertex_tree->Branch("sss3d_shower_dir_y",&m_sss3d_shower_dir_y); - vertex_tree->Branch("sss3d_shower_dir_z",&m_sss3d_shower_dir_z); - - vertex_tree->Branch("sss3d_shower_length",&m_sss3d_shower_length); - vertex_tree->Branch("sss3d_shower_conversion_dist",&m_sss3d_shower_conversion_dist); - vertex_tree->Branch("sss3d_shower_invariant_mass",&m_sss3d_shower_invariant_mass); - vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&m_sss3d_shower_implied_invariant_mass); - vertex_tree->Branch("sss3d_shower_impact_parameter",&m_sss3d_shower_impact_parameter); - vertex_tree->Branch("sss3d_shower_ioc_ratio",&m_sss3d_shower_ioc_ratio); - vertex_tree->Branch("sss3d_shower_energy_max",&m_sss3d_shower_energy_max); - vertex_tree->Branch("sss3d_shower_score",&m_sss3d_shower_score); - vertex_tree->Branch("sss3d_slice_nu",&m_sss3d_slice_nu); - vertex_tree->Branch("sss3d_slice_clear_cosmic",&m_sss3d_slice_clear_cosmic); + void CreateSecondShowerBranches3D(var_all& vars){ + vars.vertex_tree->Branch("sss3d_num_showers",&vars.m_sss3d_num_showers,"sss3d_num_showers/I"); + + vars.vertex_tree->Branch("sss3d_shower_start_x",&vars.m_sss3d_shower_start_x); + vars.vertex_tree->Branch("sss3d_shower_start_y",&vars.m_sss3d_shower_start_y); + vars.vertex_tree->Branch("sss3d_shower_start_z",&vars.m_sss3d_shower_start_z); + vars.vertex_tree->Branch("sss3d_shower_dir_x",&vars.m_sss3d_shower_dir_x); + vars.vertex_tree->Branch("sss3d_shower_dir_y",&vars.m_sss3d_shower_dir_y); + vars.vertex_tree->Branch("sss3d_shower_dir_z",&vars.m_sss3d_shower_dir_z); + + vars.vertex_tree->Branch("sss3d_shower_length",&vars.m_sss3d_shower_length); + vars.vertex_tree->Branch("sss3d_shower_conversion_dist",&vars.m_sss3d_shower_conversion_dist); + vars.vertex_tree->Branch("sss3d_shower_invariant_mass",&vars.m_sss3d_shower_invariant_mass); + vars.vertex_tree->Branch("sss3d_shower_implied_invariant_mass",&vars.m_sss3d_shower_implied_invariant_mass); + vars.vertex_tree->Branch("sss3d_shower_impact_parameter",&vars.m_sss3d_shower_impact_parameter); + vars.vertex_tree->Branch("sss3d_shower_ioc_ratio",&vars.m_sss3d_shower_ioc_ratio); + vars.vertex_tree->Branch("sss3d_shower_energy_max",&vars.m_sss3d_shower_energy_max); + vars.vertex_tree->Branch("sss3d_shower_score",&vars.m_sss3d_shower_score); + vars.vertex_tree->Branch("sss3d_slice_nu",&vars.m_sss3d_slice_nu); + vars.vertex_tree->Branch("sss3d_slice_clear_cosmic",&vars.m_sss3d_slice_clear_cosmic); } - void CreateStubBranches(){ - - vertex_tree->Branch("trackstub_num_unassociated_hits",&m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); - vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); - vertex_tree->Branch("trackstub_associated_hits",&m_trackstub_associated_hits,"trackstub_associated_hits/I"); - vertex_tree->Branch("trackstub_num_candidates", &m_trackstub_num_candidates, "trackstub_num_candidates/I"); - vertex_tree->Branch("trackstub_candidate_in_nu_slice", &m_trackstub_candidate_in_nu_slice); - vertex_tree->Branch("trackstub_candidate_num_hits", &m_trackstub_candidate_num_hits); - vertex_tree->Branch("trackstub_candidate_num_wires", &m_trackstub_candidate_num_wires); - vertex_tree->Branch("trackstub_candidate_num_ticks", &m_trackstub_candidate_num_ticks); - vertex_tree->Branch("trackstub_candidate_plane", &m_trackstub_candidate_plane); - vertex_tree->Branch("trackstub_candidate_PCA", &m_trackstub_candidate_PCA); - vertex_tree->Branch("trackstub_candidate_mean_ADC", &m_trackstub_candidate_mean_ADC); - vertex_tree->Branch("trackstub_candidate_ADC_RMS", &m_trackstub_candidate_ADC_RMS); - vertex_tree->Branch("trackstub_candidate_veto_score", &m_trackstub_candidate_veto_score); - vertex_tree->Branch("trackstub_candidate_mean_tick", &m_trackstub_candidate_mean_tick); - vertex_tree->Branch("trackstub_candidate_max_tick", &m_trackstub_candidate_max_tick); - vertex_tree->Branch("trackstub_candidate_min_tick", &m_trackstub_candidate_min_tick); - vertex_tree->Branch("trackstub_candidate_min_wire", &m_trackstub_candidate_min_wire); - vertex_tree->Branch("trackstub_candidate_max_wire", &m_trackstub_candidate_max_wire); - vertex_tree->Branch("trackstub_candidate_mean_wire", &m_trackstub_candidate_mean_wire); - vertex_tree->Branch("trackstub_candidate_min_dist", &m_trackstub_candidate_min_dist); - vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &m_trackstub_candidate_min_impact_parameter_to_shower); - vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &m_trackstub_candidate_min_conversion_dist_to_shower_start); - vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &m_trackstub_candidate_min_ioc_to_shower_start); - vertex_tree->Branch("trackstub_candidate_ioc_based_length", &m_trackstub_candidate_ioc_based_length); - vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &m_trackstub_candidate_wire_tick_based_length); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &m_trackstub_candidate_mean_ADC_first_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &m_trackstub_candidate_mean_ADC_second_half); - vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &m_trackstub_candidate_mean_ADC_first_to_second_ratio); - vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &m_trackstub_candidate_track_angle_wrt_shower_direction); - vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &m_trackstub_candidate_linear_fit_chi2); - vertex_tree->Branch("trackstub_candidate_energy", &m_trackstub_candidate_energy); - vertex_tree->Branch("trackstub_candidate_remerge", &m_trackstub_candidate_remerge); - vertex_tree->Branch("trackstub_candidate_matched", &m_trackstub_candidate_matched); - vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &m_trackstub_candidate_matched_energy_fraction_best_plane); - vertex_tree->Branch("trackstub_candidate_pdg", &m_trackstub_candidate_pdg); - vertex_tree->Branch("trackstub_candidate_parent_pdg", &m_trackstub_candidate_parent_pdg); - vertex_tree->Branch("trackstub_candidate_trackid", &m_trackstub_candidate_trackid); - vertex_tree->Branch("trackstub_candidate_true_energy", &m_trackstub_candidate_true_energy); - vertex_tree->Branch("trackstub_candidate_overlay_fraction", &m_trackstub_candidate_overlay_fraction); - - - vertex_tree->Branch("trackstub_num_candidate_groups", &m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); - vertex_tree->Branch("grouped_trackstub_candidate_indices", &m_grouped_trackstub_candidate_indices); - vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &m_trackstub_candidate_group_timeoverlap_fraction); + void CreateStubBranches(var_all& vars){ + + vars.vertex_tree->Branch("trackstub_num_unassociated_hits",&vars.m_trackstub_num_unassociated_hits,"trackstub_num_unassociated_hits/I"); + vars.vertex_tree->Branch("trackstub_unassociated_hits_below_threshold",&vars.m_trackstub_unassociated_hits_below_threshold,"trackstub_unassociated_hits_below_threshold/I"); + vars.vertex_tree->Branch("trackstub_associated_hits",&vars.m_trackstub_associated_hits,"trackstub_associated_hits/I"); + vars.vertex_tree->Branch("trackstub_num_candidates", &vars.m_trackstub_num_candidates, "trackstub_num_candidates/I"); + vars.vertex_tree->Branch("trackstub_candidate_in_nu_slice", &vars.m_trackstub_candidate_in_nu_slice); + vars.vertex_tree->Branch("trackstub_candidate_num_hits", &vars.m_trackstub_candidate_num_hits); + vars.vertex_tree->Branch("trackstub_candidate_num_wires", &vars.m_trackstub_candidate_num_wires); + vars.vertex_tree->Branch("trackstub_candidate_num_ticks", &vars.m_trackstub_candidate_num_ticks); + vars.vertex_tree->Branch("trackstub_candidate_plane", &vars.m_trackstub_candidate_plane); + vars.vertex_tree->Branch("trackstub_candidate_PCA", &vars.m_trackstub_candidate_PCA); + vars.vertex_tree->Branch("trackstub_candidate_mean_ADC", &vars.m_trackstub_candidate_mean_ADC); + vars.vertex_tree->Branch("trackstub_candidate_ADC_RMS", &vars.m_trackstub_candidate_ADC_RMS); + vars.vertex_tree->Branch("trackstub_candidate_veto_score", &vars.m_trackstub_candidate_veto_score); + vars.vertex_tree->Branch("trackstub_candidate_mean_tick", &vars.m_trackstub_candidate_mean_tick); + vars.vertex_tree->Branch("trackstub_candidate_max_tick", &vars.m_trackstub_candidate_max_tick); + vars.vertex_tree->Branch("trackstub_candidate_min_tick", &vars.m_trackstub_candidate_min_tick); + vars.vertex_tree->Branch("trackstub_candidate_min_wire", &vars.m_trackstub_candidate_min_wire); + vars.vertex_tree->Branch("trackstub_candidate_max_wire", &vars.m_trackstub_candidate_max_wire); + vars.vertex_tree->Branch("trackstub_candidate_mean_wire", &vars.m_trackstub_candidate_mean_wire); + vars.vertex_tree->Branch("trackstub_candidate_min_dist", &vars.m_trackstub_candidate_min_dist); + vars.vertex_tree->Branch("trackstub_candidate_min_impact_parameter_to_shower", &vars.m_trackstub_candidate_min_impact_parameter_to_shower); + vars.vertex_tree->Branch("trackstub_candidate_min_conversion_dist_to_shower_start", &vars.m_trackstub_candidate_min_conversion_dist_to_shower_start); + vars.vertex_tree->Branch("trackstub_candidate_min_ioc_to_shower_start", &vars.m_trackstub_candidate_min_ioc_to_shower_start); + vars.vertex_tree->Branch("trackstub_candidate_ioc_based_length", &vars.m_trackstub_candidate_ioc_based_length); + vars.vertex_tree->Branch("trackstub_candidate_wire_tick_based_length", &vars.m_trackstub_candidate_wire_tick_based_length); + vars.vertex_tree->Branch("trackstub_candidate_mean_ADC_first_half", &vars.m_trackstub_candidate_mean_ADC_first_half); + vars.vertex_tree->Branch("trackstub_candidate_mean_ADC_second_half", &vars.m_trackstub_candidate_mean_ADC_second_half); + vars.vertex_tree->Branch("trackstub_candidate_mean_ADC_first_to_second_ratio", &vars.m_trackstub_candidate_mean_ADC_first_to_second_ratio); + vars.vertex_tree->Branch("trackstub_candidate_track_angle_wrt_shower_direction", &vars.m_trackstub_candidate_track_angle_wrt_shower_direction); + vars.vertex_tree->Branch("trackstub_candidate_linear_fit_chi2", &vars.m_trackstub_candidate_linear_fit_chi2); + vars.vertex_tree->Branch("trackstub_candidate_energy", &vars.m_trackstub_candidate_energy); + vars.vertex_tree->Branch("trackstub_candidate_remerge", &vars.m_trackstub_candidate_remerge); + vars.vertex_tree->Branch("trackstub_candidate_matched", &vars.m_trackstub_candidate_matched); + vars.vertex_tree->Branch("trackstub_candidate_matched_energy_fraction_best_plane", &vars.m_trackstub_candidate_matched_energy_fraction_best_plane); + vars.vertex_tree->Branch("trackstub_candidate_pdg", &vars.m_trackstub_candidate_pdg); + vars.vertex_tree->Branch("trackstub_candidate_parent_pdg", &vars.m_trackstub_candidate_parent_pdg); + vars.vertex_tree->Branch("trackstub_candidate_trackid", &vars.m_trackstub_candidate_trackid); + vars.vertex_tree->Branch("trackstub_candidate_true_energy", &vars.m_trackstub_candidate_true_energy); + vars.vertex_tree->Branch("trackstub_candidate_overlay_fraction", &vars.m_trackstub_candidate_overlay_fraction); + + + vars.vertex_tree->Branch("trackstub_num_candidate_groups", &vars.m_trackstub_num_candidate_groups, "trackstub_num_candidate_groups/I"); + vars.vertex_tree->Branch("grouped_trackstub_candidate_indices", &vars.m_grouped_trackstub_candidate_indices); + vars.vertex_tree->Branch("trackstub_candidate_group_timeoverlap_fraction", &vars.m_trackstub_candidate_group_timeoverlap_fraction); } - void ResizeSecondShowers(size_t size){} +// void ResizeSecondShowers(size_t size){} //analyze_OpFlashes.h - void ClearFlashes(){ - m_reco_num_flashes =0; - m_reco_num_flashes_in_beamgate =0; - m_reco_flash_total_pe.clear(); - m_reco_flash_time.clear(); - m_reco_flash_time_width.clear(); - m_reco_flash_abs_time.clear(); - m_reco_flash_frame.clear(); - m_reco_flash_ycenter.clear(); - m_reco_flash_ywidth.clear(); - m_reco_flash_zcenter.clear(); - m_reco_flash_zwidth.clear(); - m_reco_flash_total_pe_in_beamgate.clear(); - m_reco_flash_time_in_beamgate.clear(); - m_reco_flash_ycenter_in_beamgate.clear(); - m_reco_flash_zcenter_in_beamgate.clear(); - m_CRT_veto_nhits = -999; - m_CRT_veto_hit_PE.clear(); - m_CRT_min_hit_time = -999; - m_CRT_min_hit_PE = -999; - m_CRT_min_hit_x = -999; - m_CRT_min_hit_y = -999; - m_CRT_min_hit_z = -999; - m_CRT_hits_time.clear(); - m_CRT_hits_PE.clear(); - m_CRT_hits_x.clear(); - m_CRT_hits_y.clear(); - m_CRT_hits_z.clear(); - m_CRT_dt = -999; + void ClearFlashes(var_all& vars){ + vars.m_reco_num_flashes =0; + vars.m_reco_num_flashes_in_beamgate =0; + vars.m_reco_flash_total_pe.clear(); + vars.m_reco_flash_time.clear(); + vars.m_reco_flash_time_width.clear(); + vars.m_reco_flash_abs_time.clear(); + vars.m_reco_flash_frame.clear(); + vars.m_reco_flash_ycenter.clear(); + vars.m_reco_flash_ywidth.clear(); + vars.m_reco_flash_zcenter.clear(); + vars.m_reco_flash_zwidth.clear(); + vars.m_reco_flash_total_pe_in_beamgate.clear(); + vars.m_reco_flash_time_in_beamgate.clear(); + vars.m_reco_flash_ycenter_in_beamgate.clear(); + vars.m_reco_flash_zcenter_in_beamgate.clear(); + vars.m_CRT_veto_nhits = -999; + vars.m_CRT_veto_hit_PE.clear(); + vars.m_CRT_min_hit_time = -999; + vars.m_CRT_min_hit_PE = -999; + vars.m_CRT_min_hit_x = -999; + vars.m_CRT_min_hit_y = -999; + vars.m_CRT_min_hit_z = -999; + vars.m_CRT_hits_time.clear(); + vars.m_CRT_hits_PE.clear(); + vars.m_CRT_hits_x.clear(); + vars.m_CRT_hits_y.clear(); + vars.m_CRT_hits_z.clear(); + vars.m_CRT_dt = -999; } - void CreateFlashBranches(){ - vertex_tree->Branch("beamgate_flash_start",&m_beamgate_flash_start,"beamgate_flash_start/D"); - vertex_tree->Branch("beamgate_flash_end",&m_beamgate_flash_end,"beamgate_flash_end/D"); - vertex_tree->Branch("reco_num_flashes",&m_reco_num_flashes,"reco_num_flashes/I"); - vertex_tree->Branch("reco_num_flashes_in_beamgate",&m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); - vertex_tree->Branch("reco_flash_total_pe", &m_reco_flash_total_pe); - vertex_tree->Branch("reco_flash_time", &m_reco_flash_time); - vertex_tree->Branch("reco_flash_time_width",&m_reco_flash_time_width); - vertex_tree->Branch("reco_flash_abs_time",&m_reco_flash_abs_time); - vertex_tree->Branch("reco_flash_frame",&m_reco_flash_frame); - vertex_tree->Branch("reco_flash_ycenter",&m_reco_flash_ycenter); - vertex_tree->Branch("reco_flash_ywidth",&m_reco_flash_ywidth); - vertex_tree->Branch("reco_flash_zcenter",&m_reco_flash_zcenter); - vertex_tree->Branch("reco_flash_zwidth",&m_reco_flash_zwidth); - vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &m_reco_flash_total_pe_in_beamgate); - vertex_tree->Branch("reco_flash_time_in_beamgate", &m_reco_flash_time_in_beamgate); - vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&m_reco_flash_ycenter_in_beamgate); - vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&m_reco_flash_zcenter_in_beamgate); - - vertex_tree->Branch("CRT_veto_nhits",&m_CRT_veto_nhits,"CRT_veto_nhits/I"); - vertex_tree->Branch("CRT_veto_hit_PE",&m_CRT_veto_hit_PE); - vertex_tree->Branch("CRT_dt",& m_CRT_dt," CRT_dt/D"); - vertex_tree->Branch("CRT_min_hit_time",&m_CRT_min_hit_time,"CRT_min_hit_time/D"); - vertex_tree->Branch("CRT_min_hit_PE",&m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); - vertex_tree->Branch("CRT_min_hit_x",&m_CRT_min_hit_x,"CRT_min_hit_x/D"); - vertex_tree->Branch("CRT_min_hit_y",&m_CRT_min_hit_y,"CRT_min_hit_y/D"); - vertex_tree->Branch("CRT_min_hit_z",&m_CRT_min_hit_z,"CRT_min_hit_z/D"); - vertex_tree->Branch("CRT_hits_time",&m_CRT_hits_time); - vertex_tree->Branch("CRT_hits_PE",&m_CRT_hits_PE); - vertex_tree->Branch("CRT_hits_x",&m_CRT_hits_x); - vertex_tree->Branch("CRT_hits_y",&m_CRT_hits_y); - vertex_tree->Branch("CRT_hits_z",&m_CRT_hits_z); + void CreateFlashBranches(var_all& vars){ +// vars.vertex_tree->Branch("beamgate_flash_start",&vars.m_beamgate_flash_start,"beamgate_flash_start/D"); +// vars.vertex_tree->Branch("beamgate_flash_end",&vars.m_beamgate_flash_end,"beamgate_flash_end/D"); + vars.vertex_tree->Branch("reco_num_flashes",&vars.m_reco_num_flashes,"reco_num_flashes/I"); + vars.vertex_tree->Branch("reco_num_flashes_in_beamgate",&vars.m_reco_num_flashes_in_beamgate,"reco_num_flashes_in_beamgate/I"); + vars.vertex_tree->Branch("reco_flash_total_pe", &vars.m_reco_flash_total_pe); + vars.vertex_tree->Branch("reco_flash_time", &vars.m_reco_flash_time); + vars.vertex_tree->Branch("reco_flash_time_width",&vars.m_reco_flash_time_width); + vars.vertex_tree->Branch("reco_flash_abs_time",&vars.m_reco_flash_abs_time); + vars.vertex_tree->Branch("reco_flash_frame",&vars.m_reco_flash_frame); + vars.vertex_tree->Branch("reco_flash_ycenter",&vars.m_reco_flash_ycenter); + vars.vertex_tree->Branch("reco_flash_ywidth",&vars.m_reco_flash_ywidth); + vars.vertex_tree->Branch("reco_flash_zcenter",&vars.m_reco_flash_zcenter); + vars.vertex_tree->Branch("reco_flash_zwidth",&vars.m_reco_flash_zwidth); + vars.vertex_tree->Branch("reco_flash_total_pe_in_beamgate", &vars.m_reco_flash_total_pe_in_beamgate); + vars.vertex_tree->Branch("reco_flash_time_in_beamgate", &vars.m_reco_flash_time_in_beamgate); + vars.vertex_tree->Branch("reco_flash_ycenter_in_beamgate",&vars.m_reco_flash_ycenter_in_beamgate); + vars.vertex_tree->Branch("reco_flash_zcenter_in_beamgate",&vars.m_reco_flash_zcenter_in_beamgate); + + vars.vertex_tree->Branch("CRT_veto_nhits",&vars.m_CRT_veto_nhits,"CRT_veto_nhits/I"); + vars.vertex_tree->Branch("CRT_veto_hit_PE",&vars.m_CRT_veto_hit_PE); + vars.vertex_tree->Branch("CRT_dt",& vars.m_CRT_dt," CRT_dt/D"); + vars.vertex_tree->Branch("CRT_min_hit_time",&vars.m_CRT_min_hit_time,"CRT_min_hit_time/D"); + vars.vertex_tree->Branch("CRT_min_hit_PE",&vars.m_CRT_min_hit_PE,"CRT_min_hit_PE/D"); + vars.vertex_tree->Branch("CRT_min_hit_x",&vars.m_CRT_min_hit_x,"CRT_min_hit_x/D"); + vars.vertex_tree->Branch("CRT_min_hit_y",&vars.m_CRT_min_hit_y,"CRT_min_hit_y/D"); + vars.vertex_tree->Branch("CRT_min_hit_z",&vars.m_CRT_min_hit_z,"CRT_min_hit_z/D"); + vars.vertex_tree->Branch("CRT_hits_time",&vars.m_CRT_hits_time); + vars.vertex_tree->Branch("CRT_hits_PE",&vars.m_CRT_hits_PE); + vars.vertex_tree->Branch("CRT_hits_x",&vars.m_CRT_hits_x); + vars.vertex_tree->Branch("CRT_hits_y",&vars.m_CRT_hits_y); + vars.vertex_tree->Branch("CRT_hits_z",&vars.m_CRT_hits_z); } - void ResizeFlashes(size_t size){ - m_reco_flash_total_pe.resize(size); - m_reco_flash_time.resize(size); - m_reco_flash_time_width.resize(size); - m_reco_flash_abs_time.resize(size); - m_reco_flash_frame.resize(size); - m_reco_flash_ycenter.resize(size); - m_reco_flash_ywidth.resize(size); - m_reco_flash_zcenter.resize(size); - m_reco_flash_zwidth.resize(size); - m_reco_flash_total_pe_in_beamgate.resize(size); - m_reco_flash_time_in_beamgate.resize(size); - m_reco_flash_ycenter_in_beamgate.resize(size); - m_reco_flash_zcenter_in_beamgate.resize(size); - m_CRT_veto_hit_PE.resize(size); - - m_CRT_hits_time.resize(size); - m_CRT_hits_PE.resize(size); - m_CRT_hits_x.resize(size); - m_CRT_hits_y.resize(size); - m_CRT_hits_z.resize(size); + void ResizeFlashes(size_t size, var_all& vars){ + vars.m_reco_flash_total_pe.resize(size); + vars.m_reco_flash_time.resize(size); + vars.m_reco_flash_time_width.resize(size); + vars.m_reco_flash_abs_time.resize(size); + vars.m_reco_flash_frame.resize(size); + vars.m_reco_flash_ycenter.resize(size); + vars.m_reco_flash_ywidth.resize(size); + vars.m_reco_flash_zcenter.resize(size); + vars.m_reco_flash_zwidth.resize(size); + vars.m_reco_flash_total_pe_in_beamgate.resize(size); + vars.m_reco_flash_time_in_beamgate.resize(size); + vars.m_reco_flash_ycenter_in_beamgate.resize(size); + vars.m_reco_flash_zcenter_in_beamgate.resize(size); + vars.m_CRT_veto_hit_PE.resize(size); + + vars.m_CRT_hits_time.resize(size); + vars.m_CRT_hits_PE.resize(size); + vars.m_CRT_hits_x.resize(size); + vars.m_CRT_hits_y.resize(size); + vars.m_CRT_hits_z.resize(size); } //analyze_Tracks.h - void ClearTracks(){ - m_reco_asso_tracks=0; - m_reco_track_length.clear(); - m_reco_track_num_daughters.clear(); - m_reco_track_daughter_trackscore.clear(); - m_reco_track_dirx.clear(); - m_reco_track_diry.clear(); - m_reco_track_dirz.clear(); - m_reco_track_startx.clear(); - m_reco_track_starty.clear(); - m_reco_track_startz.clear(); - m_reco_track_endx.clear(); - m_reco_track_endy.clear(); - m_reco_track_endz.clear(); - m_reco_track_end_dist_to_active_TPC.clear(); - m_reco_track_start_dist_to_active_TPC.clear(); - m_reco_track_end_dist_to_CPA.clear(); - m_reco_track_start_dist_to_CPA.clear(); - m_reco_track_end_dist_to_SCB.clear(); - m_reco_track_start_dist_to_SCB.clear(); - m_reco_track_end_in_SCB.clear(); - m_reco_track_start_in_SCB.clear(); - - m_reco_track_theta_yz.clear(); - m_reco_track_phi_yx.clear(); - - m_reco_track_calo_energy_plane0.clear(); - m_reco_track_calo_energy_plane1.clear(); - m_reco_track_calo_energy_plane2.clear(); - m_reco_track_calo_energy_max.clear(); - - m_reco_track_num_trajpoints.clear(); - m_reco_track_num_spacepoints.clear(); - m_reco_track_proton_kinetic_energy.clear(); - m_reco_track_ordered_energy_index.clear(); - m_reco_track_ordered_displacement_index.clear(); - - m_reco_track_spacepoint_principal0.clear(); - m_reco_track_spacepoint_principal1.clear(); - m_reco_track_spacepoint_principal2.clear(); - - m_reco_track_spacepoint_chi.clear(); - m_reco_track_spacepoint_max_dist.clear(); - - m_reco_track_best_calo_plane.clear(); - - m_reco_track_mean_dEdx_best_plane.clear(); - m_reco_track_mean_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_dEdx_end_half_best_plane.clear(); - m_reco_track_good_calo_best_plane.clear(); - m_reco_track_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); - m_reco_track_trunc_PIDA_best_plane.clear(); - m_reco_track_resrange_best_plane.clear(); - m_reco_track_dEdx_best_plane.clear(); - - - m_reco_track_mean_dEdx_p0.clear(); - m_reco_track_mean_dEdx_start_half_p0.clear(); - m_reco_track_mean_dEdx_end_half_p0.clear(); - m_reco_track_good_calo_p0.clear(); - m_reco_track_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_p0.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); - m_reco_track_trunc_PIDA_p0.clear(); - m_reco_track_resrange_p0.clear(); - m_reco_track_dEdx_p0.clear(); - - m_reco_track_mean_dEdx_p1.clear(); - m_reco_track_mean_dEdx_start_half_p1.clear(); - m_reco_track_mean_dEdx_end_half_p1.clear(); - m_reco_track_good_calo_p1.clear(); - m_reco_track_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_p1.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); - m_reco_track_trunc_PIDA_p1.clear(); - m_reco_track_resrange_p1.clear(); - m_reco_track_dEdx_p1.clear(); - - m_reco_track_mean_dEdx_p2.clear(); - m_reco_track_mean_dEdx_start_half_p2.clear(); - m_reco_track_mean_dEdx_end_half_p2.clear(); - m_reco_track_good_calo_p2.clear(); - m_reco_track_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_p2.clear(); - m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); - m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); - m_reco_track_trunc_PIDA_p2.clear(); - m_reco_track_resrange_p2.clear(); - m_reco_track_dEdx_p2.clear(); - - m_reco_track_num_calo_hits_p1.clear(); - m_reco_track_num_calo_hits_p0.clear(); - m_reco_track_num_calo_hits_p2.clear(); - - m_sim_track_matched.clear(); - m_sim_track_overlay_fraction.clear(); - m_sim_track_energy.clear(); - m_sim_track_kinetic_energy.clear(); - m_sim_track_mass.clear(); - m_sim_track_pdg.clear(); - m_sim_track_origin.clear(); - m_sim_track_parent_pdg.clear(); - m_sim_track_process.clear(); - m_sim_track_startx.clear(); - m_sim_track_starty.clear(); - m_sim_track_startz.clear(); - m_sim_track_endx.clear(); - m_sim_track_endy.clear(); - m_sim_track_endz.clear(); - m_sim_track_length.clear(); - - m_sim_track_px.clear(); - m_sim_track_py.clear(); - m_sim_track_pz.clear(); - m_sim_track_trackID.clear(); + void ClearTracks(var_all& vars){ + vars.m_reco_asso_tracks=0; + vars.m_reco_track_length.clear(); + vars.m_reco_track_num_daughters.clear(); + vars.m_reco_track_daughter_trackscore.clear(); + vars.m_reco_track_dirx.clear(); + vars.m_reco_track_diry.clear(); + vars.m_reco_track_dirz.clear(); + vars.m_reco_track_startx.clear(); + vars.m_reco_track_starty.clear(); + vars.m_reco_track_startz.clear(); + vars.m_reco_track_endx.clear(); + vars.m_reco_track_endy.clear(); + vars.m_reco_track_endz.clear(); + vars.m_reco_track_end_dist_to_active_TPC.clear(); + vars.m_reco_track_start_dist_to_active_TPC.clear(); + vars.m_reco_track_end_dist_to_CPA.clear(); + vars.m_reco_track_start_dist_to_CPA.clear(); + vars.m_reco_track_end_dist_to_SCB.clear(); + vars.m_reco_track_start_dist_to_SCB.clear(); + vars.m_reco_track_end_in_SCB.clear(); + vars.m_reco_track_start_in_SCB.clear(); + + vars.m_reco_track_theta_yz.clear(); + vars.m_reco_track_phi_yx.clear(); + + vars.m_reco_track_calo_energy_plane0.clear(); + vars.m_reco_track_calo_energy_plane1.clear(); + vars.m_reco_track_calo_energy_plane2.clear(); + vars.m_reco_track_calo_energy_max.clear(); + + vars.m_reco_track_num_trajpoints.clear(); + vars.m_reco_track_num_spacepoints.clear(); + vars.m_reco_track_proton_kinetic_energy.clear(); + vars.m_reco_track_ordered_energy_index.clear(); + vars.m_reco_track_ordered_displacement_index.clear(); + + vars.m_reco_track_spacepoint_principal0.clear(); + vars.m_reco_track_spacepoint_principal1.clear(); + vars.m_reco_track_spacepoint_principal2.clear(); + + vars.m_reco_track_spacepoint_chi.clear(); + vars.m_reco_track_spacepoint_max_dist.clear(); + + vars.m_reco_track_best_calo_plane.clear(); + + vars.m_reco_track_mean_dEdx_best_plane.clear(); + vars.m_reco_track_mean_dEdx_start_half_best_plane.clear(); + vars.m_reco_track_mean_dEdx_end_half_best_plane.clear(); + vars.m_reco_track_good_calo_best_plane.clear(); + vars.m_reco_track_trunc_dEdx_best_plane.clear(); + vars.m_reco_track_mean_trunc_dEdx_best_plane.clear(); + vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane.clear(); + vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane.clear(); + vars.m_reco_track_trunc_PIDA_best_plane.clear(); + vars.m_reco_track_resrange_best_plane.clear(); + vars.m_reco_track_dEdx_best_plane.clear(); + + + vars.m_reco_track_mean_dEdx_p0.clear(); + vars.m_reco_track_mean_dEdx_start_half_p0.clear(); + vars.m_reco_track_mean_dEdx_end_half_p0.clear(); + vars.m_reco_track_good_calo_p0.clear(); + vars.m_reco_track_trunc_dEdx_p0.clear(); + vars.m_reco_track_mean_trunc_dEdx_p0.clear(); + vars.m_reco_track_mean_trunc_dEdx_start_half_p0.clear(); + vars.m_reco_track_mean_trunc_dEdx_end_half_p0.clear(); + vars.m_reco_track_trunc_PIDA_p0.clear(); + vars.m_reco_track_resrange_p0.clear(); + vars.m_reco_track_dEdx_p0.clear(); + + vars.m_reco_track_mean_dEdx_p1.clear(); + vars.m_reco_track_mean_dEdx_start_half_p1.clear(); + vars.m_reco_track_mean_dEdx_end_half_p1.clear(); + vars.m_reco_track_good_calo_p1.clear(); + vars.m_reco_track_trunc_dEdx_p1.clear(); + vars.m_reco_track_mean_trunc_dEdx_p1.clear(); + vars.m_reco_track_mean_trunc_dEdx_start_half_p1.clear(); + vars.m_reco_track_mean_trunc_dEdx_end_half_p1.clear(); + vars.m_reco_track_trunc_PIDA_p1.clear(); + vars.m_reco_track_resrange_p1.clear(); + vars.m_reco_track_dEdx_p1.clear(); + + vars.m_reco_track_mean_dEdx_p2.clear(); + vars.m_reco_track_mean_dEdx_start_half_p2.clear(); + vars.m_reco_track_mean_dEdx_end_half_p2.clear(); + vars.m_reco_track_good_calo_p2.clear(); + vars.m_reco_track_trunc_dEdx_p2.clear(); + vars.m_reco_track_mean_trunc_dEdx_p2.clear(); + vars.m_reco_track_mean_trunc_dEdx_start_half_p2.clear(); + vars.m_reco_track_mean_trunc_dEdx_end_half_p2.clear(); + vars.m_reco_track_trunc_PIDA_p2.clear(); + vars.m_reco_track_resrange_p2.clear(); + vars.m_reco_track_dEdx_p2.clear(); + + vars.m_reco_track_num_calo_hits_p1.clear(); + vars.m_reco_track_num_calo_hits_p0.clear(); + vars.m_reco_track_num_calo_hits_p2.clear(); + + vars.m_sim_track_matched.clear(); + vars.m_sim_track_overlay_fraction.clear(); + vars.m_sim_track_energy.clear(); + vars.m_sim_track_kinetic_energy.clear(); + vars.m_sim_track_mass.clear(); + vars.m_sim_track_pdg.clear(); + vars.m_sim_track_origin.clear(); + vars.m_sim_track_parent_pdg.clear(); + vars.m_sim_track_process.clear(); + vars.m_sim_track_startx.clear(); + vars.m_sim_track_starty.clear(); + vars.m_sim_track_startz.clear(); + vars.m_sim_track_endx.clear(); + vars.m_sim_track_endy.clear(); + vars.m_sim_track_endz.clear(); + vars.m_sim_track_length.clear(); + + vars.m_sim_track_px.clear(); + vars.m_sim_track_py.clear(); + vars.m_sim_track_pz.clear(); + vars.m_sim_track_trackID.clear(); // PID - m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); - m_reco_track_pid_bragg_likelihood_p_plane0.clear(); - m_reco_track_pid_bragg_likelihood_p_plane1.clear(); - m_reco_track_pid_bragg_likelihood_p_plane2.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); - m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); - m_reco_track_pid_chi2_mu_plane0.clear(); - m_reco_track_pid_chi2_mu_plane1.clear(); - m_reco_track_pid_chi2_mu_plane2.clear(); - m_reco_track_pid_chi2_p_plane0.clear(); - m_reco_track_pid_chi2_p_plane1.clear(); - m_reco_track_pid_chi2_p_plane2.clear(); - m_reco_track_pid_pida_plane0.clear(); - m_reco_track_pid_pida_plane1.clear(); - m_reco_track_pid_pida_plane2.clear(); - m_reco_track_pid_three_plane_proton_pid.clear(); - -// m_reco_track_end_to_nearest_dead_wire_plane0.clear(); -// m_reco_track_end_to_nearest_dead_wire_plane1.clear(); -// m_reco_track_end_to_nearest_dead_wire_plane2.clear(); - - m_reco_track_sliceId.clear(); - m_reco_track_nuscore.clear(); - m_reco_track_isclearcosmic.clear(); - m_reco_track_trackscore.clear(); - m_reco_track_pfparticle_pdg.clear(); - m_reco_track_is_nuslice.clear(); - - m_sim_track_sliceId.clear(); - m_sim_track_nuscore.clear(); - m_sim_track_isclearcosmic.clear(); + vars.m_reco_track_pid_bragg_likelihood_mu_plane0.clear(); + vars.m_reco_track_pid_bragg_likelihood_mu_plane1.clear(); + vars.m_reco_track_pid_bragg_likelihood_mu_plane2.clear(); + vars.m_reco_track_pid_bragg_likelihood_p_plane0.clear(); + vars.m_reco_track_pid_bragg_likelihood_p_plane1.clear(); + vars.m_reco_track_pid_bragg_likelihood_p_plane2.clear(); + vars.m_reco_track_pid_bragg_likelihood_mip_plane0.clear(); + vars.m_reco_track_pid_bragg_likelihood_mip_plane1.clear(); + vars.m_reco_track_pid_bragg_likelihood_mip_plane2.clear(); + vars.m_reco_track_pid_chi2_mu_plane0.clear(); + vars.m_reco_track_pid_chi2_mu_plane1.clear(); + vars.m_reco_track_pid_chi2_mu_plane2.clear(); + vars.m_reco_track_pid_chi2_p_plane0.clear(); + vars.m_reco_track_pid_chi2_p_plane1.clear(); + vars.m_reco_track_pid_chi2_p_plane2.clear(); + vars.m_reco_track_pid_pida_plane0.clear(); + vars.m_reco_track_pid_pida_plane1.clear(); + vars.m_reco_track_pid_pida_plane2.clear(); + vars.m_reco_track_pid_three_plane_proton_pid.clear(); + +// vars.m_reco_track_end_to_nearest_dead_wire_plane0.clear(); +// vars.m_reco_track_end_to_nearest_dead_wire_plane1.clear(); +// vars.m_reco_track_end_to_nearest_dead_wire_plane2.clear(); + + vars.m_reco_track_sliceId.clear(); + vars.m_reco_track_nuscore.clear(); + vars.m_reco_track_isclearcosmic.clear(); + vars.m_reco_track_trackscore.clear(); + vars.m_reco_track_pfparticle_pdg.clear(); + vars.m_reco_track_is_nuslice.clear(); + + vars.m_sim_track_sliceId.clear(); + vars.m_sim_track_nuscore.clear(); + vars.m_sim_track_isclearcosmic.clear(); } - void CreateTrackBranches(){ - vertex_tree->Branch("reco_asso_tracks",&m_reco_asso_tracks,"reco_asso_tracks/I"); - vertex_tree->Branch("reco_track_num_daughters",&m_reco_track_num_daughters); - vertex_tree->Branch("reco_track_daughter_trackscore",&m_reco_track_daughter_trackscore); - vertex_tree->Branch("reco_track_displacement", &m_reco_track_length); - vertex_tree->Branch("reco_track_dirx", &m_reco_track_dirx); - vertex_tree->Branch("reco_track_diry", &m_reco_track_diry); - vertex_tree->Branch("reco_track_dirz", &m_reco_track_dirz); - vertex_tree->Branch("reco_track_startx", &m_reco_track_startx); - vertex_tree->Branch("reco_track_starty", &m_reco_track_starty); - vertex_tree->Branch("reco_track_startz", &m_reco_track_startz); - - vertex_tree->Branch("reco_track_endx", &m_reco_track_endx); - vertex_tree->Branch("reco_track_endy", &m_reco_track_endy); - vertex_tree->Branch("reco_track_endz", &m_reco_track_endz); - vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &m_reco_track_end_dist_to_active_TPC); - vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &m_reco_track_start_dist_to_active_TPC); - vertex_tree->Branch("reco_track_end_dist_to_CPA", &m_reco_track_end_dist_to_CPA); - vertex_tree->Branch("reco_track_start_dist_to_CPA", &m_reco_track_start_dist_to_CPA); - vertex_tree->Branch("reco_track_end_dist_to_SCB", &m_reco_track_end_dist_to_SCB); - vertex_tree->Branch("reco_track_start_dist_to_SCB", &m_reco_track_start_dist_to_SCB); - vertex_tree->Branch("reco_track_end_in_SCB", &m_reco_track_end_in_SCB); - vertex_tree->Branch("reco_track_start_in_SCB", &m_reco_track_start_in_SCB); - - - vertex_tree->Branch("reco_track_theta_yz", &m_reco_track_theta_yz); - vertex_tree->Branch("reco_track_phi_yx", &m_reco_track_phi_yx); - - vertex_tree->Branch("reco_track_calo_energy_plane0", &m_reco_track_calo_energy_plane0); - vertex_tree->Branch("reco_track_calo_energy_plane1", &m_reco_track_calo_energy_plane1); - vertex_tree->Branch("reco_track_calo_energy_plane2", &m_reco_track_calo_energy_plane2); - vertex_tree->Branch("reco_track_calo_energy_max", &m_reco_track_calo_energy_max); - - vertex_tree->Branch("reco_track_num_trajpoints", &m_reco_track_num_trajpoints); - vertex_tree->Branch("reco_track_num_spacepoints", &m_reco_track_num_spacepoints); - vertex_tree->Branch("reco_track_proton_kinetic_energy", &m_reco_track_proton_kinetic_energy); - vertex_tree->Branch("reco_track_ordered_energy_index", &m_reco_track_ordered_energy_index); - vertex_tree->Branch("reco_track_ordered_displacement_index", &m_reco_track_ordered_displacement_index); - vertex_tree->Branch("i_trk", &m_reco_track_ordered_displacement_index); - - vertex_tree->Branch("reco_track_spacepoint_principal0",&m_reco_track_spacepoint_principal0); - vertex_tree->Branch("reco_track_spacepoint_principal1",&m_reco_track_spacepoint_principal1); - vertex_tree->Branch("reco_track_spacepoint_principal2",&m_reco_track_spacepoint_principal2); - - vertex_tree->Branch("reco_track_spacepoint_chi",&m_reco_track_spacepoint_chi); - vertex_tree->Branch("reco_track_spacepoint_max_dist",&m_reco_track_spacepoint_max_dist); - - vertex_tree->Branch("reco_track_best_calo_plane",&m_reco_track_best_calo_plane); - - vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&m_reco_track_mean_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_plane0",&m_reco_track_mean_dEdx_p0); - vertex_tree->Branch("reco_track_mean_dEdx_plane1",&m_reco_track_mean_dEdx_p1); - vertex_tree->Branch("reco_track_mean_dEdx_plane2",&m_reco_track_mean_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&m_reco_track_mean_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&m_reco_track_mean_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&m_reco_track_mean_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&m_reco_track_mean_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&m_reco_track_mean_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&m_reco_track_mean_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&m_reco_track_mean_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&m_reco_track_mean_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_good_calo_best_plane",&m_reco_track_good_calo_best_plane); - vertex_tree->Branch("reco_track_good_calo_plane0",&m_reco_track_good_calo_p0); - vertex_tree->Branch("reco_track_good_calo_plane1",&m_reco_track_good_calo_p1); - vertex_tree->Branch("reco_track_good_calo_plane2",&m_reco_track_good_calo_p2); - - vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&m_reco_track_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&m_reco_track_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&m_reco_track_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&m_reco_track_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&m_reco_track_mean_trunc_dEdx_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&m_reco_track_mean_trunc_dEdx_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&m_reco_track_mean_trunc_dEdx_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&m_reco_track_mean_trunc_dEdx_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&m_reco_track_mean_trunc_dEdx_end_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&m_reco_track_mean_trunc_dEdx_end_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&m_reco_track_mean_trunc_dEdx_end_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&m_reco_track_mean_trunc_dEdx_end_half_p2); - - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&m_reco_track_mean_trunc_dEdx_start_half_best_plane); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&m_reco_track_mean_trunc_dEdx_start_half_p0); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&m_reco_track_mean_trunc_dEdx_start_half_p1); - vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&m_reco_track_mean_trunc_dEdx_start_half_p2); - - vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&m_reco_track_trunc_PIDA_best_plane); - vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&m_reco_track_trunc_PIDA_p0); - vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&m_reco_track_trunc_PIDA_p1); - vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&m_reco_track_trunc_PIDA_p2); - - vertex_tree->Branch("reco_track_resrange_best_plane",&m_reco_track_resrange_best_plane); - vertex_tree->Branch("reco_track_resrange_plane0",&m_reco_track_resrange_p0); - vertex_tree->Branch("reco_track_resrange_plane1",&m_reco_track_resrange_p1); - vertex_tree->Branch("reco_track_resrange_plane2",&m_reco_track_resrange_p2); - - vertex_tree->Branch("reco_track_dEdx_best_plane",&m_reco_track_dEdx_best_plane); - vertex_tree->Branch("reco_track_dEdx_plane0",&m_reco_track_dEdx_p0); - vertex_tree->Branch("reco_track_dEdx_plane1",&m_reco_track_dEdx_p1); - vertex_tree->Branch("reco_track_dEdx_plane2",&m_reco_track_dEdx_p2); - - vertex_tree->Branch("reco_track_num_calo_hits_plane0",&m_reco_track_num_calo_hits_p0); - vertex_tree->Branch("reco_track_num_calo_hits_plane1",&m_reco_track_num_calo_hits_p1); - vertex_tree->Branch("reco_track_num_calo_hits_plane2",&m_reco_track_num_calo_hits_p2); - - - - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&m_reco_track_pid_bragg_likelihood_mu_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&m_reco_track_pid_bragg_likelihood_mu_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&m_reco_track_pid_bragg_likelihood_mu_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&m_reco_track_pid_bragg_likelihood_p_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&m_reco_track_pid_bragg_likelihood_p_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&m_reco_track_pid_bragg_likelihood_p_plane2); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&m_reco_track_pid_bragg_likelihood_mip_plane0); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&m_reco_track_pid_bragg_likelihood_mip_plane1); - vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&m_reco_track_pid_bragg_likelihood_mip_plane2); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&m_reco_track_pid_chi2_mu_plane0); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&m_reco_track_pid_chi2_mu_plane1); - vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&m_reco_track_pid_chi2_mu_plane2); - vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&m_reco_track_pid_chi2_p_plane0); - vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&m_reco_track_pid_chi2_p_plane1); - vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&m_reco_track_pid_chi2_p_plane2); - vertex_tree->Branch("reco_track_pid_pida_plane0",&m_reco_track_pid_pida_plane0); - vertex_tree->Branch("reco_track_pid_pida_plane1",&m_reco_track_pid_pida_plane1); - vertex_tree->Branch("reco_track_pid_pida_plane2",&m_reco_track_pid_pida_plane2); - vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&m_reco_track_pid_three_plane_proton_pid); - -// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&m_reco_track_end_to_nearest_dead_wire_plane0); -// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&m_reco_track_end_to_nearest_dead_wire_plane1); -// vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&m_reco_track_end_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_track_sliceId",& m_reco_track_sliceId); - vertex_tree->Branch("reco_track_nuscore",& m_reco_track_nuscore); - vertex_tree->Branch("reco_track_isclearcosmic",& m_reco_track_isclearcosmic); - vertex_tree->Branch("reco_track_trackscore",& m_reco_track_trackscore); - vertex_tree->Branch("reco_track_pfparticle_pdg",& m_reco_track_pfparticle_pdg); - vertex_tree->Branch("reco_track_is_nuslice",& m_reco_track_is_nuslice); - - vertex_tree->Branch("sim_track_matched",&m_sim_track_matched); - vertex_tree->Branch("sim_track_overlay_fraction",&m_sim_track_overlay_fraction); - vertex_tree->Branch("sim_track_energy",&m_sim_track_energy); - vertex_tree->Branch("sim_track_kinetic_energy",&m_sim_track_kinetic_energy); - vertex_tree->Branch("sim_track_mass",&m_sim_track_mass); - vertex_tree->Branch("sim_track_pdg",&m_sim_track_pdg); - vertex_tree->Branch("sim_track_parent_pdg",&m_sim_track_parent_pdg); - vertex_tree->Branch("sim_track_origin",&m_sim_track_origin); - vertex_tree->Branch("sim_track_process",&m_sim_track_process); - vertex_tree->Branch("sim_track_startx",&m_sim_track_startx); - vertex_tree->Branch("sim_track_starty",&m_sim_track_starty); - vertex_tree->Branch("sim_track_startz",&m_sim_track_startz); - vertex_tree->Branch("sim_track_px",&m_sim_track_px); - vertex_tree->Branch("sim_track_py",&m_sim_track_py); - vertex_tree->Branch("sim_track_pz",&m_sim_track_pz); - vertex_tree->Branch("sim_track_endx",&m_sim_track_endx); - vertex_tree->Branch("sim_track_endy",&m_sim_track_endy); - vertex_tree->Branch("sim_track_endz",&m_sim_track_endz); - vertex_tree->Branch("sim_track_length",&m_sim_track_length); - - vertex_tree->Branch("sim_track_trackID",&m_sim_track_trackID); - - vertex_tree->Branch("sim_track_sliceId",& m_sim_track_sliceId); - vertex_tree->Branch("sim_track_nuscore",& m_sim_track_nuscore); - vertex_tree->Branch("sim_track_isclearcosmic",& m_sim_track_isclearcosmic); + void CreateTrackBranches(var_all& vars){ + vars.vertex_tree->Branch("reco_asso_tracks",&vars.m_reco_asso_tracks,"reco_asso_tracks/I"); + vars.vertex_tree->Branch("reco_track_num_daughters",&vars.m_reco_track_num_daughters); + vars.vertex_tree->Branch("reco_track_daughter_trackscore",&vars.m_reco_track_daughter_trackscore); + vars.vertex_tree->Branch("reco_track_displacement", &vars.m_reco_track_length); + vars.vertex_tree->Branch("reco_track_dirx", &vars.m_reco_track_dirx); + vars.vertex_tree->Branch("reco_track_diry", &vars.m_reco_track_diry); + vars.vertex_tree->Branch("reco_track_dirz", &vars.m_reco_track_dirz); + vars.vertex_tree->Branch("reco_track_startx", &vars.m_reco_track_startx); + vars.vertex_tree->Branch("reco_track_starty", &vars.m_reco_track_starty); + vars.vertex_tree->Branch("reco_track_startz", &vars.m_reco_track_startz); + + vars.vertex_tree->Branch("reco_track_endx", &vars.m_reco_track_endx); + vars.vertex_tree->Branch("reco_track_endy", &vars.m_reco_track_endy); + vars.vertex_tree->Branch("reco_track_endz", &vars.m_reco_track_endz); + vars.vertex_tree->Branch("reco_track_end_dist_to_active_TPC", &vars.m_reco_track_end_dist_to_active_TPC); + vars.vertex_tree->Branch("reco_track_start_dist_to_active_TPC", &vars.m_reco_track_start_dist_to_active_TPC); + vars.vertex_tree->Branch("reco_track_end_dist_to_CPA", &vars.m_reco_track_end_dist_to_CPA); + vars.vertex_tree->Branch("reco_track_start_dist_to_CPA", &vars.m_reco_track_start_dist_to_CPA); + vars.vertex_tree->Branch("reco_track_end_dist_to_SCB", &vars.m_reco_track_end_dist_to_SCB); + vars.vertex_tree->Branch("reco_track_start_dist_to_SCB", &vars.m_reco_track_start_dist_to_SCB); + vars.vertex_tree->Branch("reco_track_end_in_SCB", &vars.m_reco_track_end_in_SCB); + vars.vertex_tree->Branch("reco_track_start_in_SCB", &vars.m_reco_track_start_in_SCB); + + + vars.vertex_tree->Branch("reco_track_theta_yz", &vars.m_reco_track_theta_yz); + vars.vertex_tree->Branch("reco_track_phi_yx", &vars.m_reco_track_phi_yx); + + vars.vertex_tree->Branch("reco_track_calo_energy_plane0", &vars.m_reco_track_calo_energy_plane0); + vars.vertex_tree->Branch("reco_track_calo_energy_plane1", &vars.m_reco_track_calo_energy_plane1); + vars.vertex_tree->Branch("reco_track_calo_energy_plane2", &vars.m_reco_track_calo_energy_plane2); + vars.vertex_tree->Branch("reco_track_calo_energy_max", &vars.m_reco_track_calo_energy_max); + + vars.vertex_tree->Branch("reco_track_num_trajpoints", &vars.m_reco_track_num_trajpoints); + vars.vertex_tree->Branch("reco_track_num_spacepoints", &vars.m_reco_track_num_spacepoints); + vars.vertex_tree->Branch("reco_track_proton_kinetic_energy", &vars.m_reco_track_proton_kinetic_energy); + vars.vertex_tree->Branch("reco_track_ordered_energy_index", &vars.m_reco_track_ordered_energy_index); + vars.vertex_tree->Branch("reco_track_ordered_displacement_index", &vars.m_reco_track_ordered_displacement_index); + vars.vertex_tree->Branch("i_trk", &vars.m_reco_track_ordered_displacement_index); + + vars.vertex_tree->Branch("reco_track_spacepoint_principal0",&vars.m_reco_track_spacepoint_principal0); + vars.vertex_tree->Branch("reco_track_spacepoint_principal1",&vars.m_reco_track_spacepoint_principal1); + vars.vertex_tree->Branch("reco_track_spacepoint_principal2",&vars.m_reco_track_spacepoint_principal2); + + vars.vertex_tree->Branch("reco_track_spacepoint_chi",&vars.m_reco_track_spacepoint_chi); + vars.vertex_tree->Branch("reco_track_spacepoint_max_dist",&vars.m_reco_track_spacepoint_max_dist); + + vars.vertex_tree->Branch("reco_track_best_calo_plane",&vars.m_reco_track_best_calo_plane); + + vars.vertex_tree->Branch("reco_track_mean_dEdx_best_plane",&vars.m_reco_track_mean_dEdx_best_plane); + vars.vertex_tree->Branch("reco_track_mean_dEdx_plane0",&vars.m_reco_track_mean_dEdx_p0); + vars.vertex_tree->Branch("reco_track_mean_dEdx_plane1",&vars.m_reco_track_mean_dEdx_p1); + vars.vertex_tree->Branch("reco_track_mean_dEdx_plane2",&vars.m_reco_track_mean_dEdx_p2); + + vars.vertex_tree->Branch("reco_track_mean_dEdx_start_half_best_plane",&vars.m_reco_track_mean_dEdx_end_half_best_plane); + vars.vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane0",&vars.m_reco_track_mean_dEdx_end_half_p0); + vars.vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane1",&vars.m_reco_track_mean_dEdx_end_half_p1); + vars.vertex_tree->Branch("reco_track_mean_dEdx_start_half_plane2",&vars.m_reco_track_mean_dEdx_end_half_p2); + + vars.vertex_tree->Branch("reco_track_mean_dEdx_end_half_best_plane",&vars.m_reco_track_mean_dEdx_start_half_best_plane); + vars.vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane0",&vars.m_reco_track_mean_dEdx_start_half_p0); + vars.vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane1",&vars.m_reco_track_mean_dEdx_start_half_p1); + vars.vertex_tree->Branch("reco_track_mean_dEdx_end_half_plane2",&vars.m_reco_track_mean_dEdx_start_half_p2); + + vars.vertex_tree->Branch("reco_track_good_calo_best_plane",&vars.m_reco_track_good_calo_best_plane); + vars.vertex_tree->Branch("reco_track_good_calo_plane0",&vars.m_reco_track_good_calo_p0); + vars.vertex_tree->Branch("reco_track_good_calo_plane1",&vars.m_reco_track_good_calo_p1); + vars.vertex_tree->Branch("reco_track_good_calo_plane2",&vars.m_reco_track_good_calo_p2); + + vars.vertex_tree->Branch("reco_track_trunc_dEdx_best_plane",&vars.m_reco_track_trunc_dEdx_best_plane); + vars.vertex_tree->Branch("reco_track_trunc_dEdx_plane0",&vars.m_reco_track_trunc_dEdx_p0); + vars.vertex_tree->Branch("reco_track_trunc_dEdx_plane1",&vars.m_reco_track_trunc_dEdx_p1); + vars.vertex_tree->Branch("reco_track_trunc_dEdx_plane2",&vars.m_reco_track_trunc_dEdx_p2); + + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_best_plane",&vars.m_reco_track_mean_trunc_dEdx_best_plane); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane0",&vars.m_reco_track_mean_trunc_dEdx_p0); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane1",&vars.m_reco_track_mean_trunc_dEdx_p1); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_plane2",&vars.m_reco_track_mean_trunc_dEdx_p2); + + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_best_plane",&vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane0",&vars.m_reco_track_mean_trunc_dEdx_end_half_p0); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane1",&vars.m_reco_track_mean_trunc_dEdx_end_half_p1); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_start_half_plane2",&vars.m_reco_track_mean_trunc_dEdx_end_half_p2); + + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_best_plane",&vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane0",&vars.m_reco_track_mean_trunc_dEdx_start_half_p0); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane1",&vars.m_reco_track_mean_trunc_dEdx_start_half_p1); + vars.vertex_tree->Branch("reco_track_mean_trunc_dEdx_end_half_plane2",&vars.m_reco_track_mean_trunc_dEdx_start_half_p2); + + vars.vertex_tree->Branch("reco_track_trunc_PIDA_best_plane",&vars.m_reco_track_trunc_PIDA_best_plane); + vars.vertex_tree->Branch("reco_track_trunc_PIDA_plane0",&vars.m_reco_track_trunc_PIDA_p0); + vars.vertex_tree->Branch("reco_track_trunc_PIDA_plane1",&vars.m_reco_track_trunc_PIDA_p1); + vars.vertex_tree->Branch("reco_track_trunc_PIDA_plane2",&vars.m_reco_track_trunc_PIDA_p2); + + vars.vertex_tree->Branch("reco_track_resrange_best_plane",&vars.m_reco_track_resrange_best_plane); + vars.vertex_tree->Branch("reco_track_resrange_plane0",&vars.m_reco_track_resrange_p0); + vars.vertex_tree->Branch("reco_track_resrange_plane1",&vars.m_reco_track_resrange_p1); + vars.vertex_tree->Branch("reco_track_resrange_plane2",&vars.m_reco_track_resrange_p2); + + vars.vertex_tree->Branch("reco_track_dEdx_best_plane",&vars.m_reco_track_dEdx_best_plane); + vars.vertex_tree->Branch("reco_track_dEdx_plane0",&vars.m_reco_track_dEdx_p0); + vars.vertex_tree->Branch("reco_track_dEdx_plane1",&vars.m_reco_track_dEdx_p1); + vars.vertex_tree->Branch("reco_track_dEdx_plane2",&vars.m_reco_track_dEdx_p2); + + vars.vertex_tree->Branch("reco_track_num_calo_hits_plane0",&vars.m_reco_track_num_calo_hits_p0); + vars.vertex_tree->Branch("reco_track_num_calo_hits_plane1",&vars.m_reco_track_num_calo_hits_p1); + vars.vertex_tree->Branch("reco_track_num_calo_hits_plane2",&vars.m_reco_track_num_calo_hits_p2); + + + + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane0",&vars.m_reco_track_pid_bragg_likelihood_mu_plane0); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane1",&vars.m_reco_track_pid_bragg_likelihood_mu_plane1); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mu_plane2",&vars.m_reco_track_pid_bragg_likelihood_mu_plane2); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane0",&vars.m_reco_track_pid_bragg_likelihood_p_plane0); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane1",&vars.m_reco_track_pid_bragg_likelihood_p_plane1); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_p_plane2",&vars.m_reco_track_pid_bragg_likelihood_p_plane2); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane0",&vars.m_reco_track_pid_bragg_likelihood_mip_plane0); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane1",&vars.m_reco_track_pid_bragg_likelihood_mip_plane1); + vars.vertex_tree->Branch("reco_track_pid_bragg_likelihood_mip_plane2",&vars.m_reco_track_pid_bragg_likelihood_mip_plane2); + vars.vertex_tree->Branch("reco_track_pid_chi2_mu_plane0",&vars.m_reco_track_pid_chi2_mu_plane0); + vars.vertex_tree->Branch("reco_track_pid_chi2_mu_plane1",&vars.m_reco_track_pid_chi2_mu_plane1); + vars.vertex_tree->Branch("reco_track_pid_chi2_mu_plane2",&vars.m_reco_track_pid_chi2_mu_plane2); + vars.vertex_tree->Branch("reco_track_pid_chi2_p_plane0",&vars.m_reco_track_pid_chi2_p_plane0); + vars.vertex_tree->Branch("reco_track_pid_chi2_p_plane1",&vars.m_reco_track_pid_chi2_p_plane1); + vars.vertex_tree->Branch("reco_track_pid_chi2_p_plane2",&vars.m_reco_track_pid_chi2_p_plane2); + vars.vertex_tree->Branch("reco_track_pid_pida_plane0",&vars.m_reco_track_pid_pida_plane0); + vars.vertex_tree->Branch("reco_track_pid_pida_plane1",&vars.m_reco_track_pid_pida_plane1); + vars.vertex_tree->Branch("reco_track_pid_pida_plane2",&vars.m_reco_track_pid_pida_plane2); + vars.vertex_tree->Branch("reco_track_pid_three_plane_proton_pid",&vars.m_reco_track_pid_three_plane_proton_pid); + +// vars.vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane0",&vars.m_reco_track_end_to_nearest_dead_wire_plane0); +// vars.vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane1",&vars.m_reco_track_end_to_nearest_dead_wire_plane1); +// vars.vertex_tree->Branch("reco_track_end_to_nearest_dead_wire_plane2",&vars.m_reco_track_end_to_nearest_dead_wire_plane2); + + vars.vertex_tree->Branch("reco_track_sliceId",& vars.m_reco_track_sliceId); + vars.vertex_tree->Branch("reco_track_nuscore",& vars.m_reco_track_nuscore); + vars.vertex_tree->Branch("reco_track_isclearcosmic",& vars.m_reco_track_isclearcosmic); + vars.vertex_tree->Branch("reco_track_trackscore",& vars.m_reco_track_trackscore); + vars.vertex_tree->Branch("reco_track_pfparticle_pdg",& vars.m_reco_track_pfparticle_pdg); + vars.vertex_tree->Branch("reco_track_is_nuslice",& vars.m_reco_track_is_nuslice); + + vars.vertex_tree->Branch("sim_track_matched",&vars.m_sim_track_matched); + vars.vertex_tree->Branch("sim_track_overlay_fraction",&vars.m_sim_track_overlay_fraction); + vars.vertex_tree->Branch("sim_track_energy",&vars.m_sim_track_energy); + vars.vertex_tree->Branch("sim_track_kinetic_energy",&vars.m_sim_track_kinetic_energy); + vars.vertex_tree->Branch("sim_track_mass",&vars.m_sim_track_mass); + vars.vertex_tree->Branch("sim_track_pdg",&vars.m_sim_track_pdg); + vars.vertex_tree->Branch("sim_track_parent_pdg",&vars.m_sim_track_parent_pdg); + vars.vertex_tree->Branch("sim_track_origin",&vars.m_sim_track_origin); + vars.vertex_tree->Branch("sim_track_process",&vars.m_sim_track_process); + vars.vertex_tree->Branch("sim_track_startx",&vars.m_sim_track_startx); + vars.vertex_tree->Branch("sim_track_starty",&vars.m_sim_track_starty); + vars.vertex_tree->Branch("sim_track_startz",&vars.m_sim_track_startz); + vars.vertex_tree->Branch("sim_track_px",&vars.m_sim_track_px); + vars.vertex_tree->Branch("sim_track_py",&vars.m_sim_track_py); + vars.vertex_tree->Branch("sim_track_pz",&vars.m_sim_track_pz); + vars.vertex_tree->Branch("sim_track_endx",&vars.m_sim_track_endx); + vars.vertex_tree->Branch("sim_track_endy",&vars.m_sim_track_endy); + vars.vertex_tree->Branch("sim_track_endz",&vars.m_sim_track_endz); + vars.vertex_tree->Branch("sim_track_length",&vars.m_sim_track_length); + + vars.vertex_tree->Branch("sim_track_trackID",&vars.m_sim_track_trackID); + + vars.vertex_tree->Branch("sim_track_sliceId",& vars.m_sim_track_sliceId); + vars.vertex_tree->Branch("sim_track_nuscore",& vars.m_sim_track_nuscore); + vars.vertex_tree->Branch("sim_track_isclearcosmic",& vars.m_sim_track_isclearcosmic); } - void ResizeTracks(size_t size){ - m_reco_track_length.resize(size); - m_reco_track_dirx.resize(size); - m_reco_track_num_daughters.resize(size); - m_reco_track_daughter_trackscore.resize(size); - - m_reco_track_diry.resize(size); - m_reco_track_dirz.resize(size); - m_reco_track_endx.resize(size); - m_reco_track_endy.resize(size); - m_reco_track_endz.resize(size); - m_reco_track_end_dist_to_active_TPC.resize(size); - m_reco_track_start_dist_to_active_TPC.resize(size); - m_reco_track_end_dist_to_CPA.resize(size); - m_reco_track_start_dist_to_CPA.resize(size); - m_reco_track_end_dist_to_SCB.resize(size); - m_reco_track_start_dist_to_SCB.resize(size); - m_reco_track_end_in_SCB.resize(size); - m_reco_track_start_in_SCB.resize(size); - - m_reco_track_calo_energy_plane0.resize(size); - m_reco_track_calo_energy_plane1.resize(size); - m_reco_track_calo_energy_plane2.resize(size); - m_reco_track_calo_energy_max.resize(size); - - - - m_reco_track_startx.resize(size); - m_reco_track_starty.resize(size); - m_reco_track_startz.resize(size); - m_reco_track_num_trajpoints.resize(size); - m_reco_track_num_spacepoints.resize(size); - m_reco_track_proton_kinetic_energy.resize(size); - m_reco_track_ordered_energy_index.resize(size); - m_reco_track_ordered_displacement_index.resize(size); - - - m_reco_track_spacepoint_principal0.resize(size); - m_reco_track_spacepoint_principal1.resize(size); - m_reco_track_spacepoint_principal2.resize(size); - - m_reco_track_spacepoint_chi.resize(size); - m_reco_track_spacepoint_max_dist.resize(size); - - m_reco_track_theta_yz.resize(size); - m_reco_track_phi_yx.resize(size); - - m_reco_track_best_calo_plane.resize(size); - - m_reco_track_mean_dEdx_best_plane.resize(size); - m_reco_track_mean_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_dEdx_end_half_best_plane.resize(size); - m_reco_track_good_calo_best_plane.resize(size); - m_reco_track_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); - m_reco_track_trunc_PIDA_best_plane.resize(size); - m_reco_track_resrange_best_plane.resize(size); - m_reco_track_dEdx_best_plane.resize(size); - - - m_reco_track_mean_dEdx_p0.resize(size); - m_reco_track_mean_dEdx_start_half_p0.resize(size); - m_reco_track_mean_dEdx_end_half_p0.resize(size); - m_reco_track_good_calo_p0.resize(size); - m_reco_track_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_p0.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); - m_reco_track_trunc_PIDA_p0.resize(size); - m_reco_track_resrange_p0.resize(size); - m_reco_track_dEdx_p0.resize(size); - - m_reco_track_mean_dEdx_p1.resize(size); - m_reco_track_mean_dEdx_start_half_p1.resize(size); - m_reco_track_mean_dEdx_end_half_p1.resize(size); - m_reco_track_good_calo_p1.resize(size); - m_reco_track_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_p1.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); - m_reco_track_trunc_PIDA_p1.resize(size); - m_reco_track_resrange_p1.resize(size); - m_reco_track_dEdx_p1.resize(size); - - m_reco_track_mean_dEdx_p2.resize(size); - m_reco_track_mean_dEdx_start_half_p2.resize(size); - m_reco_track_mean_dEdx_end_half_p2.resize(size); - m_reco_track_good_calo_p2.resize(size); - m_reco_track_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_p2.resize(size); - m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); - m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); - m_reco_track_trunc_PIDA_p2.resize(size); - m_reco_track_resrange_p2.resize(size); - m_reco_track_dEdx_p2.resize(size); - - m_reco_track_num_calo_hits_p1.resize(size); - m_reco_track_num_calo_hits_p0.resize(size); - m_reco_track_num_calo_hits_p2.resize(size); - - - - m_sim_track_matched.resize(size); - m_sim_track_energy.resize(size); - m_sim_track_mass.resize(size); - m_sim_track_kinetic_energy.resize(size); - m_sim_track_pdg.resize(size); - m_sim_track_parent_pdg.resize(size); - m_sim_track_origin.resize(size); - m_sim_track_process.resize(size); - m_sim_track_startx.resize(size); - m_sim_track_starty.resize(size); - m_sim_track_startz.resize(size); - m_sim_track_endx.resize(size); - m_sim_track_endy.resize(size); - m_sim_track_endz.resize(size); - m_sim_track_length.resize(size); - - m_sim_track_px.resize(size); - m_sim_track_py.resize(size); - m_sim_track_pz.resize(size); - m_sim_track_trackID.resize(size); - m_sim_track_overlay_fraction.resize(size); - - m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); - m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); - m_reco_track_pid_chi2_mu_plane0.resize(size); - m_reco_track_pid_chi2_mu_plane1.resize(size); - m_reco_track_pid_chi2_mu_plane2.resize(size); - m_reco_track_pid_chi2_p_plane0.resize(size); - m_reco_track_pid_chi2_p_plane1.resize(size); - m_reco_track_pid_chi2_p_plane2.resize(size); - m_reco_track_pid_pida_plane0.resize(size); - m_reco_track_pid_pida_plane1.resize(size); - m_reco_track_pid_pida_plane2.resize(size); - m_reco_track_pid_three_plane_proton_pid.resize(size); - -// m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); -// m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); -// m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); - - m_reco_track_sliceId.resize(size); - m_reco_track_nuscore.resize(size); - m_reco_track_isclearcosmic.resize(size); - m_reco_track_trackscore.resize(size); - m_reco_track_pfparticle_pdg.resize(size); - m_reco_track_is_nuslice.resize(size); - - m_sim_track_sliceId.resize(size); - m_sim_track_nuscore.resize(size); - m_sim_track_isclearcosmic.resize(size); + void ResizeTracks(size_t size, var_all& vars){ + vars.m_reco_track_length.resize(size); + vars.m_reco_track_dirx.resize(size); + vars.m_reco_track_num_daughters.resize(size); + vars.m_reco_track_daughter_trackscore.resize(size); + + vars.m_reco_track_diry.resize(size); + vars.m_reco_track_dirz.resize(size); + vars.m_reco_track_endx.resize(size); + vars.m_reco_track_endy.resize(size); + vars.m_reco_track_endz.resize(size); + vars.m_reco_track_end_dist_to_active_TPC.resize(size); + vars.m_reco_track_start_dist_to_active_TPC.resize(size); + vars.m_reco_track_end_dist_to_CPA.resize(size); + vars.m_reco_track_start_dist_to_CPA.resize(size); + vars.m_reco_track_end_dist_to_SCB.resize(size); + vars.m_reco_track_start_dist_to_SCB.resize(size); + vars.m_reco_track_end_in_SCB.resize(size); + vars.m_reco_track_start_in_SCB.resize(size); + + vars.m_reco_track_calo_energy_plane0.resize(size); + vars.m_reco_track_calo_energy_plane1.resize(size); + vars.m_reco_track_calo_energy_plane2.resize(size); + vars.m_reco_track_calo_energy_max.resize(size); + + + + vars.m_reco_track_startx.resize(size); + vars.m_reco_track_starty.resize(size); + vars.m_reco_track_startz.resize(size); + vars.m_reco_track_num_trajpoints.resize(size); + vars.m_reco_track_num_spacepoints.resize(size); + vars.m_reco_track_proton_kinetic_energy.resize(size); + vars.m_reco_track_ordered_energy_index.resize(size); + vars.m_reco_track_ordered_displacement_index.resize(size); + + + vars.m_reco_track_spacepoint_principal0.resize(size); + vars.m_reco_track_spacepoint_principal1.resize(size); + vars.m_reco_track_spacepoint_principal2.resize(size); + + vars.m_reco_track_spacepoint_chi.resize(size); + vars.m_reco_track_spacepoint_max_dist.resize(size); + + vars.m_reco_track_theta_yz.resize(size); + vars.m_reco_track_phi_yx.resize(size); + + vars.m_reco_track_best_calo_plane.resize(size); + + vars.m_reco_track_mean_dEdx_best_plane.resize(size); + vars.m_reco_track_mean_dEdx_start_half_best_plane.resize(size); + vars.m_reco_track_mean_dEdx_end_half_best_plane.resize(size); + vars.m_reco_track_good_calo_best_plane.resize(size); + vars.m_reco_track_trunc_dEdx_best_plane.resize(size); + vars.m_reco_track_mean_trunc_dEdx_best_plane.resize(size); + vars.m_reco_track_mean_trunc_dEdx_start_half_best_plane.resize(size); + vars.m_reco_track_mean_trunc_dEdx_end_half_best_plane.resize(size); + vars.m_reco_track_trunc_PIDA_best_plane.resize(size); + vars.m_reco_track_resrange_best_plane.resize(size); + vars.m_reco_track_dEdx_best_plane.resize(size); + + + vars.m_reco_track_mean_dEdx_p0.resize(size); + vars.m_reco_track_mean_dEdx_start_half_p0.resize(size); + vars.m_reco_track_mean_dEdx_end_half_p0.resize(size); + vars.m_reco_track_good_calo_p0.resize(size); + vars.m_reco_track_trunc_dEdx_p0.resize(size); + vars.m_reco_track_mean_trunc_dEdx_p0.resize(size); + vars.m_reco_track_mean_trunc_dEdx_start_half_p0.resize(size); + vars.m_reco_track_mean_trunc_dEdx_end_half_p0.resize(size); + vars.m_reco_track_trunc_PIDA_p0.resize(size); + vars.m_reco_track_resrange_p0.resize(size); + vars.m_reco_track_dEdx_p0.resize(size); + + vars.m_reco_track_mean_dEdx_p1.resize(size); + vars.m_reco_track_mean_dEdx_start_half_p1.resize(size); + vars.m_reco_track_mean_dEdx_end_half_p1.resize(size); + vars.m_reco_track_good_calo_p1.resize(size); + vars.m_reco_track_trunc_dEdx_p1.resize(size); + vars.m_reco_track_mean_trunc_dEdx_p1.resize(size); + vars.m_reco_track_mean_trunc_dEdx_start_half_p1.resize(size); + vars.m_reco_track_mean_trunc_dEdx_end_half_p1.resize(size); + vars.m_reco_track_trunc_PIDA_p1.resize(size); + vars.m_reco_track_resrange_p1.resize(size); + vars.m_reco_track_dEdx_p1.resize(size); + + vars.m_reco_track_mean_dEdx_p2.resize(size); + vars.m_reco_track_mean_dEdx_start_half_p2.resize(size); + vars.m_reco_track_mean_dEdx_end_half_p2.resize(size); + vars.m_reco_track_good_calo_p2.resize(size); + vars.m_reco_track_trunc_dEdx_p2.resize(size); + vars.m_reco_track_mean_trunc_dEdx_p2.resize(size); + vars.m_reco_track_mean_trunc_dEdx_start_half_p2.resize(size); + vars.m_reco_track_mean_trunc_dEdx_end_half_p2.resize(size); + vars.m_reco_track_trunc_PIDA_p2.resize(size); + vars.m_reco_track_resrange_p2.resize(size); + vars.m_reco_track_dEdx_p2.resize(size); + + vars.m_reco_track_num_calo_hits_p1.resize(size); + vars.m_reco_track_num_calo_hits_p0.resize(size); + vars.m_reco_track_num_calo_hits_p2.resize(size); + + + + vars.m_sim_track_matched.resize(size); + vars.m_sim_track_energy.resize(size); + vars.m_sim_track_mass.resize(size); + vars.m_sim_track_kinetic_energy.resize(size); + vars.m_sim_track_pdg.resize(size); + vars.m_sim_track_parent_pdg.resize(size); + vars.m_sim_track_origin.resize(size); + vars.m_sim_track_process.resize(size); + vars.m_sim_track_startx.resize(size); + vars.m_sim_track_starty.resize(size); + vars.m_sim_track_startz.resize(size); + vars.m_sim_track_endx.resize(size); + vars.m_sim_track_endy.resize(size); + vars.m_sim_track_endz.resize(size); + vars.m_sim_track_length.resize(size); + + vars.m_sim_track_px.resize(size); + vars.m_sim_track_py.resize(size); + vars.m_sim_track_pz.resize(size); + vars.m_sim_track_trackID.resize(size); + vars.m_sim_track_overlay_fraction.resize(size); + + vars.m_reco_track_pid_bragg_likelihood_mu_plane0.resize(size); + vars.m_reco_track_pid_bragg_likelihood_mu_plane1.resize(size); + vars.m_reco_track_pid_bragg_likelihood_mu_plane2.resize(size); + vars.m_reco_track_pid_bragg_likelihood_p_plane0.resize(size); + vars.m_reco_track_pid_bragg_likelihood_p_plane1.resize(size); + vars.m_reco_track_pid_bragg_likelihood_p_plane2.resize(size); + vars.m_reco_track_pid_bragg_likelihood_mip_plane0.resize(size); + vars.m_reco_track_pid_bragg_likelihood_mip_plane1.resize(size); + vars.m_reco_track_pid_bragg_likelihood_mip_plane2.resize(size); + vars.m_reco_track_pid_chi2_mu_plane0.resize(size); + vars.m_reco_track_pid_chi2_mu_plane1.resize(size); + vars.m_reco_track_pid_chi2_mu_plane2.resize(size); + vars.m_reco_track_pid_chi2_p_plane0.resize(size); + vars.m_reco_track_pid_chi2_p_plane1.resize(size); + vars.m_reco_track_pid_chi2_p_plane2.resize(size); + vars.m_reco_track_pid_pida_plane0.resize(size); + vars.m_reco_track_pid_pida_plane1.resize(size); + vars.m_reco_track_pid_pida_plane2.resize(size); + vars.m_reco_track_pid_three_plane_proton_pid.resize(size); + +// vars.m_reco_track_end_to_nearest_dead_wire_plane0.resize(size); +// vars.m_reco_track_end_to_nearest_dead_wire_plane1.resize(size); +// vars.m_reco_track_end_to_nearest_dead_wire_plane2.resize(size); + + vars.m_reco_track_sliceId.resize(size); + vars.m_reco_track_nuscore.resize(size); + vars.m_reco_track_isclearcosmic.resize(size); + vars.m_reco_track_trackscore.resize(size); + vars.m_reco_track_pfparticle_pdg.resize(size); + vars.m_reco_track_is_nuslice.resize(size); + + vars.m_sim_track_sliceId.resize(size); + vars.m_sim_track_nuscore.resize(size); + vars.m_sim_track_isclearcosmic.resize(size); } //analyze_Shower.h - void ClearShowers(){ - m_reco_asso_showers=0; - m_reco_shower_num_daughters.clear(); - m_reco_shower_daughter_trackscore.clear(); - - m_reco_shower3d_exists.clear(); - - m_reco_shower3d_startx.clear(); - m_reco_shower3d_starty.clear(); - m_reco_shower3d_startz.clear(); - m_reco_shower3d_dirx.clear(); - m_reco_shower3d_diry.clear(); - m_reco_shower3d_dirz.clear(); - m_reco_shower3d_theta_yz.clear(); - m_reco_shower3d_phi_yx.clear(); - m_reco_shower3d_conversion_distance.clear(); - m_reco_shower3d_impact_parameter.clear(); - m_reco_shower3d_implied_dirx.clear(); - m_reco_shower3d_implied_diry.clear(); - m_reco_shower3d_implied_dirz.clear(); - m_reco_shower3d_openingangle.clear(); - m_reco_shower3d_length.clear(); - - m_reco_shower3d_energy_plane0.clear(); - m_reco_shower3d_energy_plane1.clear(); - m_reco_shower3d_energy_plane2.clear(); - m_reco_shower3d_dEdx_plane0.clear(); - m_reco_shower3d_dEdx_plane1.clear(); - m_reco_shower3d_dEdx_plane2.clear(); - - - m_reco_shower_startx.clear(); - m_reco_shower_starty.clear(); - m_reco_shower_start_dist_to_active_TPC.clear(); - m_reco_shower_start_dist_to_CPA.clear(); - m_reco_shower_start_dist_to_SCB.clear(); - m_reco_shower_start_in_SCB.clear(); - m_reco_shower_end_dist_to_active_TPC.clear(); - m_reco_shower_end_dist_to_SCB.clear(); - - m_reco_shower_dirx.clear(); - m_reco_shower_diry.clear(); - m_reco_shower_dirz.clear(); - m_reco_shower_theta_yz.clear(); - m_reco_shower_phi_yx.clear(); - m_reco_shower_conversion_distance.clear(); - m_reco_shower_impact_parameter.clear(); - m_reco_shower_implied_dirx.clear(); - m_reco_shower_implied_diry.clear(); - m_reco_shower_implied_dirz.clear(); - m_reco_shower_openingangle.clear(); - m_reco_shower_length.clear(); - m_reco_shower_delaunay_num_triangles_plane0.clear(); - m_reco_shower_delaunay_num_triangles_plane1.clear(); - m_reco_shower_delaunay_num_triangles_plane2.clear(); - m_reco_shower_num_hits_plane0.clear(); - m_reco_shower_num_hits_plane1.clear(); - m_reco_shower_num_hits_plane2.clear(); - m_reco_shower_delaunay_area_plane0.clear(); - m_reco_shower_delaunay_area_plane1.clear(); - m_reco_shower_delaunay_area_plane2.clear(); - - m_reco_shower_kalman_exists.clear(); - m_reco_shower_kalman_median_dEdx_plane0.clear(); - m_reco_shower_kalman_median_dEdx_plane1.clear(); - m_reco_shower_kalman_median_dEdx_plane2.clear(); - m_reco_shower_kalman_median_dEdx_allplane.clear(); - m_reco_shower_kalman_mean_dEdx_plane0.clear(); - m_reco_shower_kalman_mean_dEdx_plane1.clear(); - m_reco_shower_kalman_mean_dEdx_plane2.clear(); - - m_sim_shower_energy.clear(); - m_sim_shower_matched.clear(); - m_sim_shower_kinetic_energy.clear(); - m_sim_shower_mass.clear(); - m_sim_shower_pdg.clear(); - m_sim_shower_trackID.clear(); - m_sim_shower_parent_pdg.clear(); - m_sim_shower_parent_trackID.clear(); - m_sim_shower_origin.clear(); - m_sim_shower_process.clear(); - m_sim_shower_end_process.clear(); - m_sim_shower_start_x.clear(); - m_sim_shower_start_y.clear(); - m_sim_shower_start_z.clear(); - m_sim_shower_vertex_x.clear(); - m_sim_shower_vertex_y.clear(); - m_sim_shower_vertex_z.clear(); - m_sim_shower_is_true_shower.clear(); - m_sim_shower_best_matched_plane.clear(); - m_sim_shower_matched_energy_fraction_plane0.clear(); - m_sim_shower_matched_energy_fraction_plane1.clear(); - m_sim_shower_matched_energy_fraction_plane2.clear(); - m_sim_shower_overlay_fraction.clear(); - m_sim_shower_px.clear(); - m_sim_shower_py.clear(); - m_sim_shower_pz.clear(); - m_sim_shower_sliceId.clear(); - m_sim_shower_nuscore.clear(); - m_sim_shower_isclearcosmic.clear(); - m_sim_shower_is_nuslice.clear(); - - - - m_reco_shower_ordered_energy_index.clear(); - m_reco_shower_energy_max.clear(); - m_reco_shower_energy_plane0.clear(); - m_reco_shower_energy_plane1.clear(); - m_reco_shower_energy_plane2.clear(); - - m_reco_shower_reclustered_energy_plane0.clear(); - m_reco_shower_reclustered_energy_plane1.clear(); - m_reco_shower_reclustered_energy_plane2.clear(); - m_reco_shower_reclustered_energy_max.clear(); - - m_reco_shower_plane0_nhits.clear(); - m_reco_shower_plane1_nhits.clear(); - m_reco_shower_plane2_nhits.clear(); - m_reco_shower_plane0_meanRMS.clear(); - m_reco_shower_plane1_meanRMS.clear(); - m_reco_shower_plane2_meanRMS.clear(); - - m_reco_shower_hit_tick.clear(); - m_reco_shower_hit_wire.clear(); - m_reco_shower_hit_plane.clear(); - m_reco_shower_spacepoint_x.clear(); - m_reco_shower_spacepoint_y.clear(); - m_reco_shower_spacepoint_z.clear(); - - - m_reco_shower_dQdx_plane0.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dQdx_plane2.clear(); - m_reco_shower_dEdx_plane0.clear(); - m_reco_shower_dEdx_plane1.clear(); - m_reco_shower_dEdx_plane2.clear(); - m_reco_shower_dEdx_plane0_median.clear(); - m_reco_shower_dEdx_plane1_median.clear(); - m_reco_shower_dEdx_plane2_median.clear(); - - m_reco_shower_angle_wrt_wires_plane0.clear(); - m_reco_shower_angle_wrt_wires_plane1.clear(); - m_reco_shower_angle_wrt_wires_plane2.clear(); - - m_reco_shower_dEdx_amalgamated.clear(); - m_reco_shower_dEdx_amalgamated_nhits.clear(); - - - m_reco_shower_dQdx_plane0_median.clear(); - m_reco_shower_dQdx_plane1_median.clear(); - m_reco_shower_dQdx_plane2_median.clear(); - - m_reco_shower_dEdx_plane0_mean.clear(); - m_reco_shower_dEdx_plane1_mean.clear(); - m_reco_shower_dEdx_plane2_mean.clear(); - m_reco_shower_dEdx_plane0_max.clear(); - m_reco_shower_dEdx_plane1_max.clear(); - m_reco_shower_dEdx_plane2_max.clear(); - m_reco_shower_dEdx_plane0_min.clear(); - m_reco_shower_dEdx_plane1_min.clear(); - m_reco_shower_dEdx_plane2_min.clear(); - - m_reco_shower_dEdx_plane0_nhits.clear(); - m_reco_shower_dEdx_plane1_nhits.clear(); - m_reco_shower_dEdx_plane2_nhits.clear(); - -// m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); -// m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); -// m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); - - m_reco_shower_flash_shortest_distz.clear(); - m_reco_shower_flash_shortest_index_z.clear(); - m_reco_shower_flash_shortest_disty.clear(); - m_reco_shower_flash_shortest_index_y.clear(); - - m_reco_shower_flash_shortest_distyz.clear(); - m_reco_shower_flash_shortest_index_yz.clear(); - - m_reco_shower_sliceId.clear(); - m_reco_shower_nuscore.clear(); - m_reco_shower_isclearcosmic.clear(); - m_reco_shower_is_nuslice.clear(); - m_reco_shower_trackscore.clear(); - m_reco_shower_pfparticle_pdg.clear(); + void ClearShowers(var_all& vars){ + vars.m_reco_asso_showers=0; + vars.m_reco_shower_num_daughters.clear(); + vars.m_reco_shower_daughter_trackscore.clear(); + + vars.m_reco_shower3d_exists.clear(); + + vars.m_reco_shower3d_startx.clear(); + vars.m_reco_shower3d_starty.clear(); + vars.m_reco_shower3d_startz.clear(); + vars.m_reco_shower3d_dirx.clear(); + vars.m_reco_shower3d_diry.clear(); + vars.m_reco_shower3d_dirz.clear(); + vars.m_reco_shower3d_theta_yz.clear(); + vars.m_reco_shower3d_phi_yx.clear(); + vars.m_reco_shower3d_conversion_distance.clear(); + vars.m_reco_shower3d_impact_parameter.clear(); + vars.m_reco_shower3d_implied_dirx.clear(); + vars.m_reco_shower3d_implied_diry.clear(); + vars.m_reco_shower3d_implied_dirz.clear(); + vars.m_reco_shower3d_openingangle.clear(); + vars.m_reco_shower3d_length.clear(); + + vars.m_reco_shower3d_energy_plane0.clear(); + vars.m_reco_shower3d_energy_plane1.clear(); + vars.m_reco_shower3d_energy_plane2.clear(); + vars.m_reco_shower3d_dEdx_plane0.clear(); + vars.m_reco_shower3d_dEdx_plane1.clear(); + vars.m_reco_shower3d_dEdx_plane2.clear(); + + + vars.m_reco_shower_startx.clear(); + vars.m_reco_shower_starty.clear(); + vars.m_reco_shower_start_dist_to_active_TPC.clear(); + vars.m_reco_shower_start_dist_to_CPA.clear(); + vars.m_reco_shower_start_dist_to_SCB.clear(); + vars.m_reco_shower_start_in_SCB.clear(); + vars.m_reco_shower_end_dist_to_active_TPC.clear(); + vars.m_reco_shower_end_dist_to_SCB.clear(); + + vars.m_reco_shower_dirx.clear(); + vars.m_reco_shower_diry.clear(); + vars.m_reco_shower_dirz.clear(); + vars.m_reco_shower_theta_yz.clear(); + vars.m_reco_shower_phi_yx.clear(); + vars.m_reco_shower_conversion_distance.clear(); + vars.m_reco_shower_impact_parameter.clear(); + vars.m_reco_shower_implied_dirx.clear(); + vars.m_reco_shower_implied_diry.clear(); + vars.m_reco_shower_implied_dirz.clear(); + vars.m_reco_shower_openingangle.clear(); + vars.m_reco_shower_length.clear(); + vars.m_reco_shower_delaunay_num_triangles_plane0.clear(); + vars.m_reco_shower_delaunay_num_triangles_plane1.clear(); + vars.m_reco_shower_delaunay_num_triangles_plane2.clear(); + vars.m_reco_shower_num_hits_plane0.clear(); + vars.m_reco_shower_num_hits_plane1.clear(); + vars.m_reco_shower_num_hits_plane2.clear(); + vars.m_reco_shower_delaunay_area_plane0.clear(); + vars.m_reco_shower_delaunay_area_plane1.clear(); + vars.m_reco_shower_delaunay_area_plane2.clear(); + + vars.m_reco_shower_kalman_exists.clear(); + vars.m_reco_shower_kalman_median_dEdx_plane0.clear(); + vars.m_reco_shower_kalman_median_dEdx_plane1.clear(); + vars.m_reco_shower_kalman_median_dEdx_plane2.clear(); + vars.m_reco_shower_kalman_median_dEdx_allplane.clear(); + vars.m_reco_shower_kalman_mean_dEdx_plane0.clear(); + vars.m_reco_shower_kalman_mean_dEdx_plane1.clear(); + vars.m_reco_shower_kalman_mean_dEdx_plane2.clear(); + + vars.m_sim_shower_energy.clear(); + vars.m_sim_shower_matched.clear(); + vars.m_sim_shower_kinetic_energy.clear(); + vars.m_sim_shower_mass.clear(); + vars.m_sim_shower_pdg.clear(); + vars.m_sim_shower_trackID.clear(); + vars.m_sim_shower_parent_pdg.clear(); + vars.m_sim_shower_parent_trackID.clear(); + vars.m_sim_shower_origin.clear(); + vars.m_sim_shower_process.clear(); + vars.m_sim_shower_end_process.clear(); + vars.m_sim_shower_start_x.clear(); + vars.m_sim_shower_start_y.clear(); + vars.m_sim_shower_start_z.clear(); + vars.m_sim_shower_vertex_x.clear(); + vars.m_sim_shower_vertex_y.clear(); + vars.m_sim_shower_vertex_z.clear(); + vars.m_sim_shower_is_true_shower.clear(); + vars.m_sim_shower_best_matched_plane.clear(); + vars.m_sim_shower_matched_energy_fraction_plane0.clear(); + vars.m_sim_shower_matched_energy_fraction_plane1.clear(); + vars.m_sim_shower_matched_energy_fraction_plane2.clear(); + vars.m_sim_shower_overlay_fraction.clear(); + vars.m_sim_shower_px.clear(); + vars.m_sim_shower_py.clear(); + vars.m_sim_shower_pz.clear(); + vars.m_sim_shower_sliceId.clear(); + vars.m_sim_shower_nuscore.clear(); + vars.m_sim_shower_isclearcosmic.clear(); + vars.m_sim_shower_is_nuslice.clear(); + + + + vars.m_reco_shower_ordered_energy_index.clear(); + vars.m_reco_shower_energy_max.clear(); + vars.m_reco_shower_energy_plane0.clear(); + vars.m_reco_shower_energy_plane1.clear(); + vars.m_reco_shower_energy_plane2.clear(); + + vars.m_reco_shower_reclustered_energy_plane0.clear(); + vars.m_reco_shower_reclustered_energy_plane1.clear(); + vars.m_reco_shower_reclustered_energy_plane2.clear(); + vars.m_reco_shower_reclustered_energy_max.clear(); + + vars.m_reco_shower_plane0_nhits.clear(); + vars.m_reco_shower_plane1_nhits.clear(); + vars.m_reco_shower_plane2_nhits.clear(); + vars.m_reco_shower_plane0_meanRMS.clear(); + vars.m_reco_shower_plane1_meanRMS.clear(); + vars.m_reco_shower_plane2_meanRMS.clear(); + + vars.m_reco_shower_hit_tick.clear(); + vars.m_reco_shower_hit_wire.clear(); + vars.m_reco_shower_hit_plane.clear(); + vars.m_reco_shower_spacepoint_x.clear(); + vars.m_reco_shower_spacepoint_y.clear(); + vars.m_reco_shower_spacepoint_z.clear(); + + + vars.m_reco_shower_dQdx_plane0.clear(); + vars.m_reco_shower_dQdx_plane2.clear(); + vars.m_reco_shower_dQdx_plane2.clear(); + vars.m_reco_shower_dEdx_plane0.clear(); + vars.m_reco_shower_dEdx_plane1.clear(); + vars.m_reco_shower_dEdx_plane2.clear(); + vars.m_reco_shower_dEdx_plane0_median.clear(); + vars.m_reco_shower_dEdx_plane1_median.clear(); + vars.m_reco_shower_dEdx_plane2_median.clear(); + + vars.m_reco_shower_angle_wrt_wires_plane0.clear(); + vars.m_reco_shower_angle_wrt_wires_plane1.clear(); + vars.m_reco_shower_angle_wrt_wires_plane2.clear(); + + vars.m_reco_shower_dEdx_amalgamated.clear(); + vars.m_reco_shower_dEdx_amalgamated_nhits.clear(); + + + vars.m_reco_shower_dQdx_plane0_median.clear(); + vars.m_reco_shower_dQdx_plane1_median.clear(); + vars.m_reco_shower_dQdx_plane2_median.clear(); + + vars.m_reco_shower_dEdx_plane0_mean.clear(); + vars.m_reco_shower_dEdx_plane1_mean.clear(); + vars.m_reco_shower_dEdx_plane2_mean.clear(); + vars.m_reco_shower_dEdx_plane0_max.clear(); + vars.m_reco_shower_dEdx_plane1_max.clear(); + vars.m_reco_shower_dEdx_plane2_max.clear(); + vars.m_reco_shower_dEdx_plane0_min.clear(); + vars.m_reco_shower_dEdx_plane1_min.clear(); + vars.m_reco_shower_dEdx_plane2_min.clear(); + + vars.m_reco_shower_dEdx_plane0_nhits.clear(); + vars.m_reco_shower_dEdx_plane1_nhits.clear(); + vars.m_reco_shower_dEdx_plane2_nhits.clear(); + +// vars.m_reco_shower_start_to_nearest_dead_wire_plane0.clear(); +// vars.m_reco_shower_start_to_nearest_dead_wire_plane1.clear(); +// vars.m_reco_shower_start_to_nearest_dead_wire_plane2.clear(); + + vars.m_reco_shower_flash_shortest_distz.clear(); + vars.m_reco_shower_flash_shortest_index_z.clear(); + vars.m_reco_shower_flash_shortest_disty.clear(); + vars.m_reco_shower_flash_shortest_index_y.clear(); + + vars.m_reco_shower_flash_shortest_distyz.clear(); + vars.m_reco_shower_flash_shortest_index_yz.clear(); + + vars.m_reco_shower_sliceId.clear(); + vars.m_reco_shower_nuscore.clear(); + vars.m_reco_shower_isclearcosmic.clear(); + vars.m_reco_shower_is_nuslice.clear(); + vars.m_reco_shower_trackscore.clear(); + vars.m_reco_shower_pfparticle_pdg.clear(); } - void CreateShowerBranches(){ - vertex_tree->Branch("reco_asso_showers",&m_reco_asso_showers,"reco_asso_showers/I"); - vertex_tree->Branch("reco_shower_num_daughters",&m_reco_shower_num_daughters); - vertex_tree->Branch("reco_shower_daughter_trackscore",&m_reco_shower_daughter_trackscore); - - vertex_tree->Branch("reco_shower_length", &m_reco_shower_length); - vertex_tree->Branch("reco_shower_opening_angle", &m_reco_shower_openingangle); - vertex_tree->Branch("reco_shower_dirx", &m_reco_shower_dirx); - vertex_tree->Branch("reco_shower_diry", &m_reco_shower_diry); - vertex_tree->Branch("reco_shower_dirz", &m_reco_shower_dirz); - vertex_tree->Branch("reco_shower_startx", &m_reco_shower_startx); - vertex_tree->Branch("reco_shower_starty", &m_reco_shower_starty); - vertex_tree->Branch("reco_shower_startz", &m_reco_shower_startz); - vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &m_reco_shower_start_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_start_dist_to_CPA", &m_reco_shower_start_dist_to_CPA); - vertex_tree->Branch("reco_shower_start_dist_to_SCB", &m_reco_shower_start_dist_to_SCB); - vertex_tree->Branch("reco_shower_start_in_SCB", &m_reco_shower_start_in_SCB); - vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &m_reco_shower_end_dist_to_active_TPC); - vertex_tree->Branch("reco_shower_end_dist_to_SCB", &m_reco_shower_end_dist_to_SCB); - - - vertex_tree->Branch("reco_shower_theta_yz",&m_reco_shower_theta_yz); - vertex_tree->Branch("reco_shower_phi_yx",&m_reco_shower_phi_yx); - vertex_tree->Branch("reco_shower_conversion_distance",& m_reco_shower_conversion_distance); - vertex_tree->Branch("reco_shower_impact_parameter",& m_reco_shower_impact_parameter); - vertex_tree->Branch("reco_shower_implied_dirx", &m_reco_shower_implied_dirx); - vertex_tree->Branch("reco_shower_implied_diry", &m_reco_shower_implied_diry); - vertex_tree->Branch("reco_shower_implied_dirz", &m_reco_shower_implied_dirz); - - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&m_reco_shower_delaunay_num_triangles_plane0); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&m_reco_shower_delaunay_num_triangles_plane1); - vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&m_reco_shower_delaunay_num_triangles_plane2); - vertex_tree->Branch("reco_shower_num_hits_plane0",&m_reco_shower_num_hits_plane0); - vertex_tree->Branch("reco_shower_num_hits_plane1",&m_reco_shower_num_hits_plane1); - vertex_tree->Branch("reco_shower_num_hits_plane2",&m_reco_shower_num_hits_plane2); - vertex_tree->Branch("reco_shower_delaunay_area_plane0",&m_reco_shower_delaunay_area_plane0); - vertex_tree->Branch("reco_shower_delaunay_area_plane1",&m_reco_shower_delaunay_area_plane1); - vertex_tree->Branch("reco_shower_delaunay_area_plane2",&m_reco_shower_delaunay_area_plane2); + void CreateShowerBranches(var_all& vars){ + vars.vertex_tree->Branch("reco_asso_showers",&vars.m_reco_asso_showers,"reco_asso_showers/I"); + vars.vertex_tree->Branch("reco_shower_num_daughters",&vars.m_reco_shower_num_daughters); + vars.vertex_tree->Branch("reco_shower_daughter_trackscore",&vars.m_reco_shower_daughter_trackscore); + + vars.vertex_tree->Branch("reco_shower_length", &vars.m_reco_shower_length); + vars.vertex_tree->Branch("reco_shower_opening_angle", &vars.m_reco_shower_openingangle); + vars.vertex_tree->Branch("reco_shower_dirx", &vars.m_reco_shower_dirx); + vars.vertex_tree->Branch("reco_shower_diry", &vars.m_reco_shower_diry); + vars.vertex_tree->Branch("reco_shower_dirz", &vars.m_reco_shower_dirz); + vars.vertex_tree->Branch("reco_shower_startx", &vars.m_reco_shower_startx); + vars.vertex_tree->Branch("reco_shower_starty", &vars.m_reco_shower_starty); + vars.vertex_tree->Branch("reco_shower_startz", &vars.m_reco_shower_startz); + vars.vertex_tree->Branch("reco_shower_start_dist_to_active_TPC", &vars.m_reco_shower_start_dist_to_active_TPC); + vars.vertex_tree->Branch("reco_shower_start_dist_to_CPA", &vars.m_reco_shower_start_dist_to_CPA); + vars.vertex_tree->Branch("reco_shower_start_dist_to_SCB", &vars.m_reco_shower_start_dist_to_SCB); + vars.vertex_tree->Branch("reco_shower_start_in_SCB", &vars.m_reco_shower_start_in_SCB); + vars.vertex_tree->Branch("reco_shower_end_dist_to_active_TPC", &vars.m_reco_shower_end_dist_to_active_TPC); + vars.vertex_tree->Branch("reco_shower_end_dist_to_SCB", &vars.m_reco_shower_end_dist_to_SCB); + + + vars.vertex_tree->Branch("reco_shower_theta_yz",&vars.m_reco_shower_theta_yz); + vars.vertex_tree->Branch("reco_shower_phi_yx",&vars.m_reco_shower_phi_yx); + vars.vertex_tree->Branch("reco_shower_conversion_distance",& vars.m_reco_shower_conversion_distance); + vars.vertex_tree->Branch("reco_shower_impact_parameter",& vars.m_reco_shower_impact_parameter); + vars.vertex_tree->Branch("reco_shower_implied_dirx", &vars.m_reco_shower_implied_dirx); + vars.vertex_tree->Branch("reco_shower_implied_diry", &vars.m_reco_shower_implied_diry); + vars.vertex_tree->Branch("reco_shower_implied_dirz", &vars.m_reco_shower_implied_dirz); + + vars.vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane0",&vars.m_reco_shower_delaunay_num_triangles_plane0); + vars.vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane1",&vars.m_reco_shower_delaunay_num_triangles_plane1); + vars.vertex_tree->Branch("reco_shower_delaunay_num_triangles_plane2",&vars.m_reco_shower_delaunay_num_triangles_plane2); + vars.vertex_tree->Branch("reco_shower_num_hits_plane0",&vars.m_reco_shower_num_hits_plane0); + vars.vertex_tree->Branch("reco_shower_num_hits_plane1",&vars.m_reco_shower_num_hits_plane1); + vars.vertex_tree->Branch("reco_shower_num_hits_plane2",&vars.m_reco_shower_num_hits_plane2); + vars.vertex_tree->Branch("reco_shower_delaunay_area_plane0",&vars.m_reco_shower_delaunay_area_plane0); + vars.vertex_tree->Branch("reco_shower_delaunay_area_plane1",&vars.m_reco_shower_delaunay_area_plane1); + vars.vertex_tree->Branch("reco_shower_delaunay_area_plane2",&vars.m_reco_shower_delaunay_area_plane2); //the calorimetry info - vertex_tree->Branch("reco_shower_energy_max",&m_reco_shower_energy_max); - vertex_tree->Branch("reco_shower_energy_plane0",&m_reco_shower_energy_plane0); - vertex_tree->Branch("reco_shower_energy_plane1",&m_reco_shower_energy_plane1); - vertex_tree->Branch("reco_shower_energy_plane2",&m_reco_shower_energy_plane2); - vertex_tree->Branch("reco_shower_plane0_nhits",&m_reco_shower_plane0_nhits); - vertex_tree->Branch("reco_shower_plane1_nhits",&m_reco_shower_plane1_nhits); - vertex_tree->Branch("reco_shower_plane2_nhits",&m_reco_shower_plane2_nhits); - vertex_tree->Branch("reco_shower_plane0_meanRMS",&m_reco_shower_plane0_meanRMS); - vertex_tree->Branch("reco_shower_plane1_meanRMS",&m_reco_shower_plane1_meanRMS); - vertex_tree->Branch("reco_shower_plane2_meanRMS",&m_reco_shower_plane2_meanRMS); - - vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&m_reco_shower_reclustered_energy_plane0); - vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&m_reco_shower_reclustered_energy_plane1); - vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&m_reco_shower_reclustered_energy_plane2); - vertex_tree->Branch("reco_shower_reclustered_energy_max",&m_reco_shower_reclustered_energy_max); - - vertex_tree->Branch("reco_shower_hit_tick",&m_reco_shower_hit_tick); - vertex_tree->Branch("reco_shower_hit_wire",&m_reco_shower_hit_wire); - vertex_tree->Branch("reco_shower_hit_plane",&m_reco_shower_hit_plane); - - vertex_tree->Branch("reco_shower_spacepoint_x",&m_reco_shower_spacepoint_x); - vertex_tree->Branch("reco_shower_spacepoint_y",&m_reco_shower_spacepoint_y); - vertex_tree->Branch("reco_shower_spacepoint_z",&m_reco_shower_spacepoint_z); - - vertex_tree->Branch("reco_shower_ordered_energy_index",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("i_shr",&m_reco_shower_ordered_energy_index); - vertex_tree->Branch("reco_shower_dQdx_plane0",&m_reco_shower_dQdx_plane0); - vertex_tree->Branch("reco_shower_dQdx_plane1",&m_reco_shower_dQdx_plane1); - vertex_tree->Branch("reco_shower_dQdx_plane2",&m_reco_shower_dQdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0",&m_reco_shower_dEdx_plane0); - vertex_tree->Branch("reco_shower_dEdx_plane1",&m_reco_shower_dEdx_plane1); - vertex_tree->Branch("reco_shower_dEdx_plane2",&m_reco_shower_dEdx_plane2); - vertex_tree->Branch("reco_shower_dEdx_plane0_median",&m_reco_shower_dEdx_plane0_median); - vertex_tree->Branch("reco_shower_dEdx_plane1_median",&m_reco_shower_dEdx_plane1_median); - vertex_tree->Branch("reco_shower_dEdx_plane2_median",&m_reco_shower_dEdx_plane2_median); - - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& m_reco_shower_angle_wrt_wires_plane0); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& m_reco_shower_angle_wrt_wires_plane1); - vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& m_reco_shower_angle_wrt_wires_plane2); - - vertex_tree->Branch("reco_shower_dEdx_amalgamated",&m_reco_shower_dEdx_amalgamated); - vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&m_reco_shower_dEdx_amalgamated_nhits); - - - vertex_tree->Branch("reco_shower_dQdx_plane0_median",&m_reco_shower_dQdx_plane0_median); - vertex_tree->Branch("reco_shower_dQdx_plane1_median",&m_reco_shower_dQdx_plane1_median); - vertex_tree->Branch("reco_shower_dQdx_plane2_median",&m_reco_shower_dQdx_plane2_median); - - vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&m_reco_shower_dEdx_plane0_mean); - vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&m_reco_shower_dEdx_plane1_mean); - vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&m_reco_shower_dEdx_plane2_mean); - vertex_tree->Branch("reco_shower_dEdx_plane0_max",&m_reco_shower_dEdx_plane0_max); - vertex_tree->Branch("reco_shower_dEdx_plane1_max",&m_reco_shower_dEdx_plane1_max); - vertex_tree->Branch("reco_shower_dEdx_plane2_max",&m_reco_shower_dEdx_plane2_max); - vertex_tree->Branch("reco_shower_dEdx_plane0_min",&m_reco_shower_dEdx_plane0_min); - vertex_tree->Branch("reco_shower_dEdx_plane1_min",&m_reco_shower_dEdx_plane1_min); - vertex_tree->Branch("reco_shower_dEdx_plane2_min",&m_reco_shower_dEdx_plane2_min); - vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&m_reco_shower_dEdx_plane0_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&m_reco_shower_dEdx_plane1_nhits); - vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&m_reco_shower_dEdx_plane2_nhits); - -// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&m_reco_shower_start_to_nearest_dead_wire_plane0); -// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&m_reco_shower_start_to_nearest_dead_wire_plane1); -// vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&m_reco_shower_start_to_nearest_dead_wire_plane2); - - vertex_tree->Branch("reco_shower_flash_shortest_distz",&m_reco_shower_flash_shortest_distz); - vertex_tree->Branch("reco_shower_flash_shortest_disty",&m_reco_shower_flash_shortest_disty); - vertex_tree->Branch("reco_shower_flash_shortest_distyz",&m_reco_shower_flash_shortest_distyz); - vertex_tree->Branch("reco_shower_flash_shortest_index_z",&m_reco_shower_flash_shortest_index_z); - vertex_tree->Branch("reco_shower_flash_shortest_index_y",&m_reco_shower_flash_shortest_index_y); - vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&m_reco_shower_flash_shortest_index_yz); - - vertex_tree->Branch("reco_shower_sliceId",& m_reco_shower_sliceId); - vertex_tree->Branch("reco_shower_nuscore",& m_reco_shower_nuscore); - vertex_tree->Branch("reco_shower_isclearcosmic",& m_reco_shower_isclearcosmic); - vertex_tree->Branch("reco_shower_is_nuslice", & m_reco_shower_is_nuslice); - vertex_tree->Branch("reco_shower_trackscore", & m_reco_shower_trackscore); - vertex_tree->Branch("reco_shower_pfparticle_pdg", & m_reco_shower_pfparticle_pdg); - - - vertex_tree->Branch("reco_shower3d_exists", &m_reco_shower3d_exists); - vertex_tree->Branch("reco_shower3d_length", &m_reco_shower3d_length); - vertex_tree->Branch("reco_shower3d_opening_angle", &m_reco_shower3d_openingangle); - vertex_tree->Branch("reco_shower3d_dirx", &m_reco_shower3d_dirx); - vertex_tree->Branch("reco_shower3d_diry", &m_reco_shower3d_diry); - vertex_tree->Branch("reco_shower3d_dirz", &m_reco_shower3d_dirz); - vertex_tree->Branch("reco_shower3d_startx", &m_reco_shower3d_startx); - vertex_tree->Branch("reco_shower3d_starty", &m_reco_shower3d_starty); - vertex_tree->Branch("reco_shower3d_startz", &m_reco_shower3d_startz); - vertex_tree->Branch("reco_shower3d_theta_yz",&m_reco_shower3d_theta_yz); - vertex_tree->Branch("reco_shower3d_phi_yx",&m_reco_shower3d_phi_yx); - vertex_tree->Branch("reco_shower3d_conversion_distance",& m_reco_shower3d_conversion_distance); - vertex_tree->Branch("reco_shower3d_impact_parameter",& m_reco_shower3d_impact_parameter); - vertex_tree->Branch("reco_shower3d_implied_dirx", &m_reco_shower3d_implied_dirx); - vertex_tree->Branch("reco_shower3d_implied_diry", &m_reco_shower3d_implied_diry); - vertex_tree->Branch("reco_shower3d_implied_dirz", &m_reco_shower3d_implied_dirz); - - vertex_tree->Branch("reco_shower3d_energy_plane0", &m_reco_shower3d_energy_plane0); - vertex_tree->Branch("reco_shower3d_energy_plane1", &m_reco_shower3d_energy_plane1); - vertex_tree->Branch("reco_shower3d_energy_plane2", &m_reco_shower3d_energy_plane2); - vertex_tree->Branch("reco_shower3d_dEdx_plane0", &m_reco_shower3d_dEdx_plane0); - vertex_tree->Branch("reco_shower3d_dEdx_plane1", &m_reco_shower3d_dEdx_plane1); - vertex_tree->Branch("reco_shower3d_dEdx_plane2", &m_reco_shower3d_dEdx_plane2); - - vertex_tree->Branch("reco_shower_kalman_exists",&m_reco_shower_kalman_exists); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&m_reco_shower_kalman_median_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&m_reco_shower_kalman_median_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&m_reco_shower_kalman_median_dEdx_plane2); - vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&m_reco_shower_kalman_median_dEdx_allplane); - - vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&m_reco_shower_kalman_mean_dEdx_plane0); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&m_reco_shower_kalman_mean_dEdx_plane1); - vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&m_reco_shower_kalman_mean_dEdx_plane2); - - - vertex_tree->Branch("sim_shower_matched",&m_sim_shower_matched); - vertex_tree->Branch("sim_shower_energy",&m_sim_shower_energy); - vertex_tree->Branch("sim_shower_kinetic_energy",&m_sim_shower_kinetic_energy); - vertex_tree->Branch("sim_shower_mass",&m_sim_shower_mass); - vertex_tree->Branch("sim_shower_pdg",&m_sim_shower_pdg); - vertex_tree->Branch("sim_shower_trackID",&m_sim_shower_trackID); - vertex_tree->Branch("sim_shower_parent_pdg",&m_sim_shower_parent_pdg); - vertex_tree->Branch("sim_shower_parent_trackID",&m_sim_shower_parent_trackID); - vertex_tree->Branch("sim_shower_origin",&m_sim_shower_origin); - vertex_tree->Branch("sim_shower_process",&m_sim_shower_process); - vertex_tree->Branch("sim_shower_end_process",&m_sim_shower_end_process); - vertex_tree->Branch("sim_shower_start_x",&m_sim_shower_start_x); - vertex_tree->Branch("sim_shower_start_y",&m_sim_shower_start_y); - vertex_tree->Branch("sim_shower_start_z",&m_sim_shower_start_z); - vertex_tree->Branch("sim_shower_vertex_x",&m_sim_shower_vertex_x); - vertex_tree->Branch("sim_shower_vertex_y",&m_sim_shower_vertex_y); - vertex_tree->Branch("sim_shower_vertex_z",&m_sim_shower_vertex_z); - vertex_tree->Branch("sim_shower_px",&m_sim_shower_px); - vertex_tree->Branch("sim_shower_py",&m_sim_shower_py); - vertex_tree->Branch("sim_shower_pz",&m_sim_shower_pz); - - vertex_tree->Branch("sim_shower_is_true_shower",&m_sim_shower_is_true_shower); - vertex_tree->Branch("sim_shower_best_matched_plane",&m_sim_shower_best_matched_plane); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&m_sim_shower_matched_energy_fraction_plane0); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&m_sim_shower_matched_energy_fraction_plane1); - vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&m_sim_shower_matched_energy_fraction_plane2); - vertex_tree->Branch("sim_shower_overlay_fraction",&m_sim_shower_overlay_fraction); - vertex_tree->Branch("sim_shower_sliceId", & m_sim_shower_sliceId); - vertex_tree->Branch("sim_shower_nuscore", & m_sim_shower_nuscore); - vertex_tree->Branch("sim_shower_isclearcosmic", & m_sim_shower_isclearcosmic); - vertex_tree->Branch("sim_shower_is_nusclice", & m_sim_shower_is_nuslice); + vars.vertex_tree->Branch("reco_shower_energy_max",&vars.m_reco_shower_energy_max); + vars.vertex_tree->Branch("reco_shower_energy_plane0",&vars.m_reco_shower_energy_plane0); + vars.vertex_tree->Branch("reco_shower_energy_plane1",&vars.m_reco_shower_energy_plane1); + vars.vertex_tree->Branch("reco_shower_energy_plane2",&vars.m_reco_shower_energy_plane2); + vars.vertex_tree->Branch("reco_shower_plane0_nhits",&vars.m_reco_shower_plane0_nhits); + vars.vertex_tree->Branch("reco_shower_plane1_nhits",&vars.m_reco_shower_plane1_nhits); + vars.vertex_tree->Branch("reco_shower_plane2_nhits",&vars.m_reco_shower_plane2_nhits); + vars.vertex_tree->Branch("reco_shower_plane0_meanRMS",&vars.m_reco_shower_plane0_meanRMS); + vars.vertex_tree->Branch("reco_shower_plane1_meanRMS",&vars.m_reco_shower_plane1_meanRMS); + vars.vertex_tree->Branch("reco_shower_plane2_meanRMS",&vars.m_reco_shower_plane2_meanRMS); + + vars.vertex_tree->Branch("reco_shower_reclustered_energy_plane0",&vars.m_reco_shower_reclustered_energy_plane0); + vars.vertex_tree->Branch("reco_shower_reclustered_energy_plane1",&vars.m_reco_shower_reclustered_energy_plane1); + vars.vertex_tree->Branch("reco_shower_reclustered_energy_plane2",&vars.m_reco_shower_reclustered_energy_plane2); + vars.vertex_tree->Branch("reco_shower_reclustered_energy_max",&vars.m_reco_shower_reclustered_energy_max); + + vars.vertex_tree->Branch("reco_shower_hit_tick",&vars.m_reco_shower_hit_tick); + vars.vertex_tree->Branch("reco_shower_hit_wire",&vars.m_reco_shower_hit_wire); + vars.vertex_tree->Branch("reco_shower_hit_plane",&vars.m_reco_shower_hit_plane); + + vars.vertex_tree->Branch("reco_shower_spacepoint_x",&vars.m_reco_shower_spacepoint_x); + vars.vertex_tree->Branch("reco_shower_spacepoint_y",&vars.m_reco_shower_spacepoint_y); + vars.vertex_tree->Branch("reco_shower_spacepoint_z",&vars.m_reco_shower_spacepoint_z); + + vars.vertex_tree->Branch("reco_shower_ordered_energy_index",&vars.m_reco_shower_ordered_energy_index); + vars.vertex_tree->Branch("i_shr",&vars.m_reco_shower_ordered_energy_index); + vars.vertex_tree->Branch("reco_shower_dQdx_plane0",&vars.m_reco_shower_dQdx_plane0); + vars.vertex_tree->Branch("reco_shower_dQdx_plane1",&vars.m_reco_shower_dQdx_plane1); + vars.vertex_tree->Branch("reco_shower_dQdx_plane2",&vars.m_reco_shower_dQdx_plane2); + vars.vertex_tree->Branch("reco_shower_dEdx_plane0",&vars.m_reco_shower_dEdx_plane0); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1",&vars.m_reco_shower_dEdx_plane1); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2",&vars.m_reco_shower_dEdx_plane2); + vars.vertex_tree->Branch("reco_shower_dEdx_plane0_median",&vars.m_reco_shower_dEdx_plane0_median); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1_median",&vars.m_reco_shower_dEdx_plane1_median); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2_median",&vars.m_reco_shower_dEdx_plane2_median); + + vars.vertex_tree->Branch("reco_shower_angle_wrt_wires_plane0",& vars.m_reco_shower_angle_wrt_wires_plane0); + vars.vertex_tree->Branch("reco_shower_angle_wrt_wires_plane1",& vars.m_reco_shower_angle_wrt_wires_plane1); + vars.vertex_tree->Branch("reco_shower_angle_wrt_wires_plane2",& vars.m_reco_shower_angle_wrt_wires_plane2); + + vars.vertex_tree->Branch("reco_shower_dEdx_amalgamated",&vars.m_reco_shower_dEdx_amalgamated); + vars.vertex_tree->Branch("reco_shower_dEdx_amalgamated_nhits",&vars.m_reco_shower_dEdx_amalgamated_nhits); + + + vars.vertex_tree->Branch("reco_shower_dQdx_plane0_median",&vars.m_reco_shower_dQdx_plane0_median); + vars.vertex_tree->Branch("reco_shower_dQdx_plane1_median",&vars.m_reco_shower_dQdx_plane1_median); + vars.vertex_tree->Branch("reco_shower_dQdx_plane2_median",&vars.m_reco_shower_dQdx_plane2_median); + + vars.vertex_tree->Branch("reco_shower_dEdx_plane0_mean",&vars.m_reco_shower_dEdx_plane0_mean); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1_mean",&vars.m_reco_shower_dEdx_plane1_mean); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2_mean",&vars.m_reco_shower_dEdx_plane2_mean); + vars.vertex_tree->Branch("reco_shower_dEdx_plane0_max",&vars.m_reco_shower_dEdx_plane0_max); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1_max",&vars.m_reco_shower_dEdx_plane1_max); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2_max",&vars.m_reco_shower_dEdx_plane2_max); + vars.vertex_tree->Branch("reco_shower_dEdx_plane0_min",&vars.m_reco_shower_dEdx_plane0_min); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1_min",&vars.m_reco_shower_dEdx_plane1_min); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2_min",&vars.m_reco_shower_dEdx_plane2_min); + vars.vertex_tree->Branch("reco_shower_dEdx_plane0_nhits",&vars.m_reco_shower_dEdx_plane0_nhits); + vars.vertex_tree->Branch("reco_shower_dEdx_plane1_nhits",&vars.m_reco_shower_dEdx_plane1_nhits); + vars.vertex_tree->Branch("reco_shower_dEdx_plane2_nhits",&vars.m_reco_shower_dEdx_plane2_nhits); + +// vars.vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane0",&vars.m_reco_shower_start_to_nearest_dead_wire_plane0); +// vars.vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane1",&vars.m_reco_shower_start_to_nearest_dead_wire_plane1); +// vars.vertex_tree->Branch("reco_shower_start_to_nearest_dead_wire_plane2",&vars.m_reco_shower_start_to_nearest_dead_wire_plane2); + + vars.vertex_tree->Branch("reco_shower_flash_shortest_distz",&vars.m_reco_shower_flash_shortest_distz); + vars.vertex_tree->Branch("reco_shower_flash_shortest_disty",&vars.m_reco_shower_flash_shortest_disty); + vars.vertex_tree->Branch("reco_shower_flash_shortest_distyz",&vars.m_reco_shower_flash_shortest_distyz); + vars.vertex_tree->Branch("reco_shower_flash_shortest_index_z",&vars.m_reco_shower_flash_shortest_index_z); + vars.vertex_tree->Branch("reco_shower_flash_shortest_index_y",&vars.m_reco_shower_flash_shortest_index_y); + vars.vertex_tree->Branch("reco_shower_flash_shortest_index_yz",&vars.m_reco_shower_flash_shortest_index_yz); + + vars.vertex_tree->Branch("reco_shower_sliceId",& vars.m_reco_shower_sliceId); + vars.vertex_tree->Branch("reco_shower_nuscore",& vars.m_reco_shower_nuscore); + vars.vertex_tree->Branch("reco_shower_isclearcosmic",& vars.m_reco_shower_isclearcosmic); + vars.vertex_tree->Branch("reco_shower_is_nuslice", & vars.m_reco_shower_is_nuslice); + vars.vertex_tree->Branch("reco_shower_trackscore", & vars.m_reco_shower_trackscore); + vars.vertex_tree->Branch("reco_shower_pfparticle_pdg", & vars.m_reco_shower_pfparticle_pdg); + + + vars.vertex_tree->Branch("reco_shower3d_exists", &vars.m_reco_shower3d_exists); + vars.vertex_tree->Branch("reco_shower3d_length", &vars.m_reco_shower3d_length); + vars.vertex_tree->Branch("reco_shower3d_opening_angle", &vars.m_reco_shower3d_openingangle); + vars.vertex_tree->Branch("reco_shower3d_dirx", &vars.m_reco_shower3d_dirx); + vars.vertex_tree->Branch("reco_shower3d_diry", &vars.m_reco_shower3d_diry); + vars.vertex_tree->Branch("reco_shower3d_dirz", &vars.m_reco_shower3d_dirz); + vars.vertex_tree->Branch("reco_shower3d_startx", &vars.m_reco_shower3d_startx); + vars.vertex_tree->Branch("reco_shower3d_starty", &vars.m_reco_shower3d_starty); + vars.vertex_tree->Branch("reco_shower3d_startz", &vars.m_reco_shower3d_startz); + vars.vertex_tree->Branch("reco_shower3d_theta_yz",&vars.m_reco_shower3d_theta_yz); + vars.vertex_tree->Branch("reco_shower3d_phi_yx",&vars.m_reco_shower3d_phi_yx); + vars.vertex_tree->Branch("reco_shower3d_conversion_distance",& vars.m_reco_shower3d_conversion_distance); + vars.vertex_tree->Branch("reco_shower3d_impact_parameter",& vars.m_reco_shower3d_impact_parameter); + vars.vertex_tree->Branch("reco_shower3d_implied_dirx", &vars.m_reco_shower3d_implied_dirx); + vars.vertex_tree->Branch("reco_shower3d_implied_diry", &vars.m_reco_shower3d_implied_diry); + vars.vertex_tree->Branch("reco_shower3d_implied_dirz", &vars.m_reco_shower3d_implied_dirz); + + vars.vertex_tree->Branch("reco_shower3d_energy_plane0", &vars.m_reco_shower3d_energy_plane0); + vars.vertex_tree->Branch("reco_shower3d_energy_plane1", &vars.m_reco_shower3d_energy_plane1); + vars.vertex_tree->Branch("reco_shower3d_energy_plane2", &vars.m_reco_shower3d_energy_plane2); + vars.vertex_tree->Branch("reco_shower3d_dEdx_plane0", &vars.m_reco_shower3d_dEdx_plane0); + vars.vertex_tree->Branch("reco_shower3d_dEdx_plane1", &vars.m_reco_shower3d_dEdx_plane1); + vars.vertex_tree->Branch("reco_shower3d_dEdx_plane2", &vars.m_reco_shower3d_dEdx_plane2); + + vars.vertex_tree->Branch("reco_shower_kalman_exists",&vars.m_reco_shower_kalman_exists); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_median",&vars.m_reco_shower_kalman_median_dEdx_plane0); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_median",&vars.m_reco_shower_kalman_median_dEdx_plane1); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_median",&vars.m_reco_shower_kalman_median_dEdx_plane2); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_allplane_median",&vars.m_reco_shower_kalman_median_dEdx_allplane); + + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane0_mean",&vars.m_reco_shower_kalman_mean_dEdx_plane0); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane1_mean",&vars.m_reco_shower_kalman_mean_dEdx_plane1); + vars.vertex_tree->Branch("reco_shower_kalman_dEdx_plane2_mean",&vars.m_reco_shower_kalman_mean_dEdx_plane2); + + + vars.vertex_tree->Branch("sim_shower_matched",&vars.m_sim_shower_matched); + vars.vertex_tree->Branch("sim_shower_energy",&vars.m_sim_shower_energy); + vars.vertex_tree->Branch("sim_shower_kinetic_energy",&vars.m_sim_shower_kinetic_energy); + vars.vertex_tree->Branch("sim_shower_mass",&vars.m_sim_shower_mass); + vars.vertex_tree->Branch("sim_shower_pdg",&vars.m_sim_shower_pdg); + vars.vertex_tree->Branch("sim_shower_trackID",&vars.m_sim_shower_trackID); + vars.vertex_tree->Branch("sim_shower_parent_pdg",&vars.m_sim_shower_parent_pdg); + vars.vertex_tree->Branch("sim_shower_parent_trackID",&vars.m_sim_shower_parent_trackID); + vars.vertex_tree->Branch("sim_shower_origin",&vars.m_sim_shower_origin); + vars.vertex_tree->Branch("sim_shower_process",&vars.m_sim_shower_process); + vars.vertex_tree->Branch("sim_shower_end_process",&vars.m_sim_shower_end_process); + vars.vertex_tree->Branch("sim_shower_start_x",&vars.m_sim_shower_start_x); + vars.vertex_tree->Branch("sim_shower_start_y",&vars.m_sim_shower_start_y); + vars.vertex_tree->Branch("sim_shower_start_z",&vars.m_sim_shower_start_z); + vars.vertex_tree->Branch("sim_shower_vertex_x",&vars.m_sim_shower_vertex_x); + vars.vertex_tree->Branch("sim_shower_vertex_y",&vars.m_sim_shower_vertex_y); + vars.vertex_tree->Branch("sim_shower_vertex_z",&vars.m_sim_shower_vertex_z); + vars.vertex_tree->Branch("sim_shower_px",&vars.m_sim_shower_px); + vars.vertex_tree->Branch("sim_shower_py",&vars.m_sim_shower_py); + vars.vertex_tree->Branch("sim_shower_pz",&vars.m_sim_shower_pz); + + vars.vertex_tree->Branch("sim_shower_is_true_shower",&vars.m_sim_shower_is_true_shower); + vars.vertex_tree->Branch("sim_shower_best_matched_plane",&vars.m_sim_shower_best_matched_plane); + vars.vertex_tree->Branch("sim_shower_matched_energy_fraction_plane0",&vars.m_sim_shower_matched_energy_fraction_plane0); + vars.vertex_tree->Branch("sim_shower_matched_energy_fraction_plane1",&vars.m_sim_shower_matched_energy_fraction_plane1); + vars.vertex_tree->Branch("sim_shower_matched_energy_fraction_plane2",&vars.m_sim_shower_matched_energy_fraction_plane2); + vars.vertex_tree->Branch("sim_shower_overlay_fraction",&vars.m_sim_shower_overlay_fraction); + vars.vertex_tree->Branch("sim_shower_sliceId", & vars.m_sim_shower_sliceId); + vars.vertex_tree->Branch("sim_shower_nuscore", & vars.m_sim_shower_nuscore); + vars.vertex_tree->Branch("sim_shower_isclearcosmic", & vars.m_sim_shower_isclearcosmic); + vars.vertex_tree->Branch("sim_shower_is_nusclice", & vars.m_sim_shower_is_nuslice); } - void ResizeShowers(size_t size){ - m_reco_shower_num_daughters.resize(size); - m_reco_shower_daughter_trackscore.resize(size); - - m_reco_shower_kalman_exists.resize(size); - m_reco_shower_kalman_median_dEdx_plane0.resize(size); - m_reco_shower_kalman_median_dEdx_plane1.resize(size); - m_reco_shower_kalman_median_dEdx_plane2.resize(size); - m_reco_shower_kalman_median_dEdx_allplane.resize(size); - m_reco_shower_kalman_mean_dEdx_plane0.resize(size); - m_reco_shower_kalman_mean_dEdx_plane1.resize(size); - m_reco_shower_kalman_mean_dEdx_plane2.resize(size); - - m_reco_shower_reclustered_energy_plane0.resize(size); - m_reco_shower_reclustered_energy_plane1.resize(size); - m_reco_shower_reclustered_energy_plane2.resize(size); - m_reco_shower_reclustered_energy_max.resize(size); - - - m_reco_shower3d_exists.resize(size); - m_reco_shower3d_startx.resize(size); - m_reco_shower3d_starty.resize(size); - m_reco_shower3d_startz.resize(size); - m_reco_shower3d_dirx.resize(size); - m_reco_shower3d_diry.resize(size); - m_reco_shower3d_dirz.resize(size); - m_reco_shower3d_theta_yz.resize(size); - m_reco_shower3d_phi_yx.resize(size); - m_reco_shower3d_conversion_distance.resize(size); - m_reco_shower3d_openingangle.resize(size); - m_reco_shower3d_length.resize(size); - m_reco_shower3d_impact_parameter.resize(size); - m_reco_shower3d_implied_dirx.resize(size); - m_reco_shower3d_implied_diry.resize(size); - m_reco_shower3d_implied_dirz.resize(size); - m_reco_shower3d_energy_plane0.resize(size); - m_reco_shower3d_energy_plane1.resize(size); - m_reco_shower3d_energy_plane2.resize(size); - m_reco_shower3d_dEdx_plane0.resize(size); - m_reco_shower3d_dEdx_plane1.resize(size); - m_reco_shower3d_dEdx_plane2.resize(size); - - m_reco_shower_start_dist_to_active_TPC.resize(size); - m_reco_shower_start_dist_to_CPA.resize(size); - m_reco_shower_start_dist_to_SCB.resize(size); - m_reco_shower_start_in_SCB.resize(size); - - m_reco_shower_end_dist_to_active_TPC.resize(size); - m_reco_shower_end_dist_to_SCB.resize(size); - - - m_reco_shower_startx.resize(size); - m_reco_shower_starty.resize(size); - m_reco_shower_startz.resize(size); - m_reco_shower_dirx.resize(size); - m_reco_shower_diry.resize(size); - m_reco_shower_dirz.resize(size); - m_reco_shower_theta_yz.resize(size); - m_reco_shower_phi_yx.resize(size); - m_reco_shower_conversion_distance.resize(size); - m_reco_shower_openingangle.resize(size); - m_reco_shower_length.resize(size); - m_reco_shower_impact_parameter.resize(size); - m_reco_shower_implied_dirx.resize(size); - m_reco_shower_implied_diry.resize(size); - m_reco_shower_implied_dirz.resize(size); - m_reco_shower_delaunay_num_triangles_plane0.resize(size); - m_reco_shower_delaunay_num_triangles_plane1.resize(size); - m_reco_shower_delaunay_num_triangles_plane2.resize(size); - m_reco_shower_num_hits_plane0.resize(size); - m_reco_shower_num_hits_plane1.resize(size); - m_reco_shower_num_hits_plane2.resize(size); - m_reco_shower_delaunay_area_plane0.resize(size); - m_reco_shower_delaunay_area_plane1.resize(size); - m_reco_shower_delaunay_area_plane2.resize(size); - - m_reco_shower_energy_max.resize(size); - m_reco_shower_energy_plane0.resize(size); - m_reco_shower_energy_plane1.resize(size); - m_reco_shower_energy_plane2.resize(size); - - m_reco_shower_plane0_nhits.resize(size); - m_reco_shower_plane1_nhits.resize(size); - m_reco_shower_plane2_nhits.resize(size); - - m_reco_shower_plane0_meanRMS.resize(size); - m_reco_shower_plane1_meanRMS.resize(size); - m_reco_shower_plane2_meanRMS.resize(size); - - - - m_reco_shower_ordered_energy_index.resize(size); - m_reco_shower_dQdx_plane0.resize(size); - m_reco_shower_dQdx_plane1.resize(size); - m_reco_shower_dQdx_plane2.resize(size); - m_reco_shower_dEdx_plane0.resize(size); - m_reco_shower_dEdx_plane1.resize(size); - m_reco_shower_dEdx_plane2.resize(size); - m_reco_shower_dEdx_plane0_median.resize(size); - m_reco_shower_dEdx_plane1_median.resize(size); - m_reco_shower_dEdx_plane2_median.resize(size); - - m_reco_shower_angle_wrt_wires_plane0.resize(size); - m_reco_shower_angle_wrt_wires_plane1.resize(size); - m_reco_shower_angle_wrt_wires_plane2.resize(size); - - m_reco_shower_dEdx_amalgamated.resize(size); - m_reco_shower_dEdx_amalgamated_nhits.resize(size); - - m_reco_shower_dQdx_plane0_median.resize(size); - m_reco_shower_dQdx_plane1_median.resize(size); - m_reco_shower_dQdx_plane2_median.resize(size); - - m_reco_shower_dEdx_plane0_min.resize(size); - m_reco_shower_dEdx_plane1_min.resize(size); - m_reco_shower_dEdx_plane2_min.resize(size); - m_reco_shower_dEdx_plane0_max.resize(size); - m_reco_shower_dEdx_plane1_max.resize(size); - m_reco_shower_dEdx_plane2_max.resize(size); - m_reco_shower_dEdx_plane0_mean.resize(size); - m_reco_shower_dEdx_plane1_mean.resize(size); - m_reco_shower_dEdx_plane2_mean.resize(size); - - - - - m_reco_shower_dEdx_plane0_nhits.resize(size); - m_reco_shower_dEdx_plane1_nhits.resize(size); - m_reco_shower_dEdx_plane2_nhits.resize(size); - -// m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); -// m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); -// m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); - - m_reco_shower_flash_shortest_distz.resize(size); - m_reco_shower_flash_shortest_index_z.resize(size); - m_reco_shower_flash_shortest_disty.resize(size); - m_reco_shower_flash_shortest_index_y.resize(size); - - m_reco_shower_flash_shortest_distyz.resize(size); - m_reco_shower_flash_shortest_index_yz.resize(size); - - m_reco_shower_sliceId.resize(size); - m_reco_shower_nuscore.resize(size); - m_reco_shower_isclearcosmic.resize(size); - m_reco_shower_is_nuslice.resize(size); - m_reco_shower_trackscore.resize(size); - m_reco_shower_pfparticle_pdg.resize(size); - - - m_sim_shower_energy.resize(size); - m_sim_shower_matched.resize(size); - m_sim_shower_kinetic_energy.resize(size); - m_sim_shower_mass.resize(size); - m_sim_shower_pdg.resize(size); - m_sim_shower_trackID.resize(size); - m_sim_shower_parent_pdg.resize(size); - m_sim_shower_parent_trackID.resize(size); - m_sim_shower_origin.resize(size); - m_sim_shower_process.resize(size); - m_sim_shower_end_process.resize(size); - m_sim_shower_start_x.resize(size); - m_sim_shower_start_y.resize(size); - m_sim_shower_start_z.resize(size); - m_sim_shower_vertex_x.resize(size); - m_sim_shower_vertex_y.resize(size); - m_sim_shower_vertex_z.resize(size); - m_sim_shower_is_true_shower.resize(size); - m_sim_shower_best_matched_plane.resize(size); - m_sim_shower_matched_energy_fraction_plane0.resize(size); - m_sim_shower_matched_energy_fraction_plane1.resize(size); - m_sim_shower_matched_energy_fraction_plane2.resize(size); - m_sim_shower_overlay_fraction.resize(size); - m_sim_shower_px.resize(size); - m_sim_shower_py.resize(size); - m_sim_shower_pz.resize(size); - m_sim_shower_sliceId.resize(size); - m_sim_shower_nuscore.resize(size); - m_sim_shower_isclearcosmic.resize(size); - m_sim_shower_is_nuslice.resize(size); + void ResizeShowers(size_t size, var_all& vars){ + vars.m_reco_shower_num_daughters.resize(size); + vars.m_reco_shower_daughter_trackscore.resize(size); + + vars.m_reco_shower_kalman_exists.resize(size); + vars.m_reco_shower_kalman_median_dEdx_plane0.resize(size); + vars.m_reco_shower_kalman_median_dEdx_plane1.resize(size); + vars.m_reco_shower_kalman_median_dEdx_plane2.resize(size); + vars.m_reco_shower_kalman_median_dEdx_allplane.resize(size); + vars.m_reco_shower_kalman_mean_dEdx_plane0.resize(size); + vars.m_reco_shower_kalman_mean_dEdx_plane1.resize(size); + vars.m_reco_shower_kalman_mean_dEdx_plane2.resize(size); + + vars.m_reco_shower_reclustered_energy_plane0.resize(size); + vars.m_reco_shower_reclustered_energy_plane1.resize(size); + vars.m_reco_shower_reclustered_energy_plane2.resize(size); + vars.m_reco_shower_reclustered_energy_max.resize(size); + + + vars.m_reco_shower3d_exists.resize(size); + vars.m_reco_shower3d_startx.resize(size); + vars.m_reco_shower3d_starty.resize(size); + vars.m_reco_shower3d_startz.resize(size); + vars.m_reco_shower3d_dirx.resize(size); + vars.m_reco_shower3d_diry.resize(size); + vars.m_reco_shower3d_dirz.resize(size); + vars.m_reco_shower3d_theta_yz.resize(size); + vars.m_reco_shower3d_phi_yx.resize(size); + vars.m_reco_shower3d_conversion_distance.resize(size); + vars.m_reco_shower3d_openingangle.resize(size); + vars.m_reco_shower3d_length.resize(size); + vars.m_reco_shower3d_impact_parameter.resize(size); + vars.m_reco_shower3d_implied_dirx.resize(size); + vars.m_reco_shower3d_implied_diry.resize(size); + vars.m_reco_shower3d_implied_dirz.resize(size); + vars.m_reco_shower3d_energy_plane0.resize(size); + vars.m_reco_shower3d_energy_plane1.resize(size); + vars.m_reco_shower3d_energy_plane2.resize(size); + vars.m_reco_shower3d_dEdx_plane0.resize(size); + vars.m_reco_shower3d_dEdx_plane1.resize(size); + vars.m_reco_shower3d_dEdx_plane2.resize(size); + + vars.m_reco_shower_start_dist_to_active_TPC.resize(size); + vars.m_reco_shower_start_dist_to_CPA.resize(size); + vars.m_reco_shower_start_dist_to_SCB.resize(size); + vars.m_reco_shower_start_in_SCB.resize(size); + + vars.m_reco_shower_end_dist_to_active_TPC.resize(size); + vars.m_reco_shower_end_dist_to_SCB.resize(size); + + + vars.m_reco_shower_startx.resize(size); + vars.m_reco_shower_starty.resize(size); + vars.m_reco_shower_startz.resize(size); + vars.m_reco_shower_dirx.resize(size); + vars.m_reco_shower_diry.resize(size); + vars.m_reco_shower_dirz.resize(size); + vars.m_reco_shower_theta_yz.resize(size); + vars.m_reco_shower_phi_yx.resize(size); + vars.m_reco_shower_conversion_distance.resize(size); + vars.m_reco_shower_openingangle.resize(size); + vars.m_reco_shower_length.resize(size); + vars.m_reco_shower_impact_parameter.resize(size); + vars.m_reco_shower_implied_dirx.resize(size); + vars.m_reco_shower_implied_diry.resize(size); + vars.m_reco_shower_implied_dirz.resize(size); + vars.m_reco_shower_delaunay_num_triangles_plane0.resize(size); + vars.m_reco_shower_delaunay_num_triangles_plane1.resize(size); + vars.m_reco_shower_delaunay_num_triangles_plane2.resize(size); + vars.m_reco_shower_num_hits_plane0.resize(size); + vars.m_reco_shower_num_hits_plane1.resize(size); + vars.m_reco_shower_num_hits_plane2.resize(size); + vars.m_reco_shower_delaunay_area_plane0.resize(size); + vars.m_reco_shower_delaunay_area_plane1.resize(size); + vars.m_reco_shower_delaunay_area_plane2.resize(size); + + vars.m_reco_shower_energy_max.resize(size); + vars.m_reco_shower_energy_plane0.resize(size); + vars.m_reco_shower_energy_plane1.resize(size); + vars.m_reco_shower_energy_plane2.resize(size); + + vars.m_reco_shower_plane0_nhits.resize(size); + vars.m_reco_shower_plane1_nhits.resize(size); + vars.m_reco_shower_plane2_nhits.resize(size); + + vars.m_reco_shower_plane0_meanRMS.resize(size); + vars.m_reco_shower_plane1_meanRMS.resize(size); + vars.m_reco_shower_plane2_meanRMS.resize(size); + + + + vars.m_reco_shower_ordered_energy_index.resize(size); + vars.m_reco_shower_dQdx_plane0.resize(size); + vars.m_reco_shower_dQdx_plane1.resize(size); + vars.m_reco_shower_dQdx_plane2.resize(size); + vars.m_reco_shower_dEdx_plane0.resize(size); + vars.m_reco_shower_dEdx_plane1.resize(size); + vars.m_reco_shower_dEdx_plane2.resize(size); + vars.m_reco_shower_dEdx_plane0_median.resize(size); + vars.m_reco_shower_dEdx_plane1_median.resize(size); + vars.m_reco_shower_dEdx_plane2_median.resize(size); + + vars.m_reco_shower_angle_wrt_wires_plane0.resize(size); + vars.m_reco_shower_angle_wrt_wires_plane1.resize(size); + vars.m_reco_shower_angle_wrt_wires_plane2.resize(size); + + vars.m_reco_shower_dEdx_amalgamated.resize(size); + vars.m_reco_shower_dEdx_amalgamated_nhits.resize(size); + + vars.m_reco_shower_dQdx_plane0_median.resize(size); + vars.m_reco_shower_dQdx_plane1_median.resize(size); + vars.m_reco_shower_dQdx_plane2_median.resize(size); + + vars.m_reco_shower_dEdx_plane0_min.resize(size); + vars.m_reco_shower_dEdx_plane1_min.resize(size); + vars.m_reco_shower_dEdx_plane2_min.resize(size); + vars.m_reco_shower_dEdx_plane0_max.resize(size); + vars.m_reco_shower_dEdx_plane1_max.resize(size); + vars.m_reco_shower_dEdx_plane2_max.resize(size); + vars.m_reco_shower_dEdx_plane0_mean.resize(size); + vars.m_reco_shower_dEdx_plane1_mean.resize(size); + vars.m_reco_shower_dEdx_plane2_mean.resize(size); + + + + + vars.m_reco_shower_dEdx_plane0_nhits.resize(size); + vars.m_reco_shower_dEdx_plane1_nhits.resize(size); + vars.m_reco_shower_dEdx_plane2_nhits.resize(size); + +// vars.m_reco_shower_start_to_nearest_dead_wire_plane0.resize(size); +// vars.m_reco_shower_start_to_nearest_dead_wire_plane1.resize(size); +// vars.m_reco_shower_start_to_nearest_dead_wire_plane2.resize(size); + + vars.m_reco_shower_flash_shortest_distz.resize(size); + vars.m_reco_shower_flash_shortest_index_z.resize(size); + vars.m_reco_shower_flash_shortest_disty.resize(size); + vars.m_reco_shower_flash_shortest_index_y.resize(size); + + vars.m_reco_shower_flash_shortest_distyz.resize(size); + vars.m_reco_shower_flash_shortest_index_yz.resize(size); + + vars.m_reco_shower_sliceId.resize(size); + vars.m_reco_shower_nuscore.resize(size); + vars.m_reco_shower_isclearcosmic.resize(size); + vars.m_reco_shower_is_nuslice.resize(size); + vars.m_reco_shower_trackscore.resize(size); + vars.m_reco_shower_pfparticle_pdg.resize(size); + + + vars.m_sim_shower_energy.resize(size); + vars.m_sim_shower_matched.resize(size); + vars.m_sim_shower_kinetic_energy.resize(size); + vars.m_sim_shower_mass.resize(size); + vars.m_sim_shower_pdg.resize(size); + vars.m_sim_shower_trackID.resize(size); + vars.m_sim_shower_parent_pdg.resize(size); + vars.m_sim_shower_parent_trackID.resize(size); + vars.m_sim_shower_origin.resize(size); + vars.m_sim_shower_process.resize(size); + vars.m_sim_shower_end_process.resize(size); + vars.m_sim_shower_start_x.resize(size); + vars.m_sim_shower_start_y.resize(size); + vars.m_sim_shower_start_z.resize(size); + vars.m_sim_shower_vertex_x.resize(size); + vars.m_sim_shower_vertex_y.resize(size); + vars.m_sim_shower_vertex_z.resize(size); + vars.m_sim_shower_is_true_shower.resize(size); + vars.m_sim_shower_best_matched_plane.resize(size); + vars.m_sim_shower_matched_energy_fraction_plane0.resize(size); + vars.m_sim_shower_matched_energy_fraction_plane1.resize(size); + vars.m_sim_shower_matched_energy_fraction_plane2.resize(size); + vars.m_sim_shower_overlay_fraction.resize(size); + vars.m_sim_shower_px.resize(size); + vars.m_sim_shower_py.resize(size); + vars.m_sim_shower_pz.resize(size); + vars.m_sim_shower_sliceId.resize(size); + vars.m_sim_shower_nuscore.resize(size); + vars.m_sim_shower_isclearcosmic.resize(size); + vars.m_sim_shower_is_nuslice.resize(size); } //analyze_MCTruth.h - void ClearMCTruths(){ - m_mctruth_num = 0; - m_mctruth_origin = -99; - m_mctruth_mode = -99; - m_mctruth_interaction_type = -99; - m_mctruth_nu_vertex_x = -9999; - m_mctruth_nu_vertex_y = -9999; - m_mctruth_nu_vertex_z = -9999; - m_mctruth_reco_vertex_dist = -9999; - m_mctruth_ccnc = -99; - m_mctruth_qsqr = -99; - m_mctruth_nu_E = -99; - m_mctruth_nu_pdg = 0; - m_mctruth_lepton_pdg = 0; - m_mctruth_num_daughter_particles = -99; - m_mctruth_daughters_pdg.clear(); - m_mctruth_daughters_E.clear(); - - m_mctruth_daughters_status_code.clear(); - m_mctruth_daughters_trackID.clear(); - m_mctruth_daughters_mother_trackID.clear(); - m_mctruth_daughters_px.clear(); - m_mctruth_daughters_py.clear(); - m_mctruth_daughters_pz.clear(); - m_mctruth_daughters_startx.clear(); - m_mctruth_daughters_starty.clear(); - m_mctruth_daughters_startz.clear(); - m_mctruth_daughters_time.clear(); - m_mctruth_daughters_endx.clear(); - m_mctruth_daughters_endy.clear(); - m_mctruth_daughters_endz.clear(); - m_mctruth_daughters_endtime.clear(); - m_mctruth_daughters_process.clear(); - m_mctruth_daughters_end_process.clear(); - - - m_mctruth_is_delta_radiative = 0; - m_mctruth_delta_radiative_1g1p_or_1g1n = -999; - - m_mctruth_delta_photon_energy=-999; - m_mctruth_delta_proton_energy=-999; - m_mctruth_delta_neutron_energy=-999; - - m_mctruth_num_exiting_photons =0; - m_mctruth_num_exiting_protons =0; - m_mctruth_num_exiting_pi0 =0; - m_mctruth_num_exiting_pipm =0; - m_mctruth_num_exiting_neutrons=0; - m_mctruth_num_exiting_delta0=0; - m_mctruth_num_exiting_deltapm=0; - m_mctruth_num_exiting_deltapp=0; - - m_mctruth_num_reconstructable_protons = 0; - - m_mctruth_is_reconstructable_1g1p = 0; - m_mctruth_is_reconstructable_1g0p = 0; - - m_mctruth_leading_exiting_proton_energy = -9999; - - m_mctruth_exiting_pi0_E.clear(); - m_mctruth_exiting_pi0_mom.clear(); - m_mctruth_exiting_pi0_px.clear(); - m_mctruth_exiting_pi0_py.clear(); - m_mctruth_exiting_pi0_pz.clear(); - - m_mctruth_pi0_leading_photon_energy = -9999; - m_mctruth_pi0_subleading_photon_energy = -9999; - m_mctruth_pi0_leading_photon_end_process = "none"; - m_mctruth_pi0_subleading_photon_end_process = "none"; - m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; - m_mctruth_pi0_leading_photon_exiting_TPC = -999; - m_mctruth_pi0_subleading_photon_exiting_TPC = -999; - m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; - m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; - - m_mctruth_exiting_delta0_num_daughters.clear(); - - m_mctruth_exiting_photon_mother_trackID.clear(); - m_mctruth_exiting_photon_trackID.clear(); - m_mctruth_exiting_photon_from_delta_decay.clear(); - m_mctruth_exiting_photon_energy.clear(); - m_mctruth_exiting_photon_px.clear(); - m_mctruth_exiting_photon_py.clear(); - m_mctruth_exiting_photon_pz.clear(); - - m_mctruth_exiting_proton_mother_trackID.clear(); - m_mctruth_exiting_proton_trackID.clear(); - m_mctruth_exiting_proton_from_delta_decay.clear(); - m_mctruth_exiting_proton_energy.clear(); - m_mctruth_exiting_proton_px.clear(); - m_mctruth_exiting_proton_py.clear(); - m_mctruth_exiting_proton_pz.clear(); - - m_mctruth_exiting_neutron_mother_trackID.clear(); - m_mctruth_exiting_neutron_trackID.clear(); - m_mctruth_exiting_neutron_from_delta_decay.clear(); - m_mctruth_exiting_neutron_energy.clear(); - m_mctruth_exiting_neutron_px.clear(); - m_mctruth_exiting_neutron_py.clear(); - m_mctruth_exiting_neutron_pz.clear(); + void ClearMCTruths(var_all& vars){ + vars.m_mctruth_num = 0; + vars.m_mctruth_origin = -99; + vars.m_mctruth_mode = -99; + vars.m_mctruth_interaction_type = -99; + vars.m_mctruth_nu_vertex_x = -9999; + vars.m_mctruth_nu_vertex_y = -9999; + vars.m_mctruth_nu_vertex_z = -9999; + vars.m_mctruth_reco_vertex_dist = -9999; + vars.m_mctruth_ccnc = -99; + vars.m_mctruth_qsqr = -99; + vars.m_mctruth_nu_E = -99; + vars.m_mctruth_nu_pdg = 0; + vars.m_mctruth_lepton_pdg = 0; + vars.m_mctruth_num_daughter_particles = -99; + vars.m_mctruth_daughters_pdg.clear(); + vars.m_mctruth_daughters_E.clear(); + + vars.m_mctruth_daughters_status_code.clear(); + vars.m_mctruth_daughters_trackID.clear(); + vars.m_mctruth_daughters_mother_trackID.clear(); + vars.m_mctruth_daughters_px.clear(); + vars.m_mctruth_daughters_py.clear(); + vars.m_mctruth_daughters_pz.clear(); + vars.m_mctruth_daughters_startx.clear(); + vars.m_mctruth_daughters_starty.clear(); + vars.m_mctruth_daughters_startz.clear(); + vars.m_mctruth_daughters_time.clear(); + vars.m_mctruth_daughters_endx.clear(); + vars.m_mctruth_daughters_endy.clear(); + vars.m_mctruth_daughters_endz.clear(); + vars.m_mctruth_daughters_endtime.clear(); + vars.m_mctruth_daughters_process.clear(); + vars.m_mctruth_daughters_end_process.clear(); + + + vars.m_mctruth_is_delta_radiative = 0; + vars.m_mctruth_delta_radiative_1g1p_or_1g1n = -999; + + vars.m_mctruth_delta_photon_energy=-999; + vars.m_mctruth_delta_proton_energy=-999; + vars.m_mctruth_delta_neutron_energy=-999; + + vars.m_mctruth_num_exiting_photons =0; + vars.m_mctruth_num_exiting_protons =0; + vars.m_mctruth_num_exiting_pi0 =0; + vars.m_mctruth_num_exiting_pipm =0; + vars.m_mctruth_num_exiting_neutrons=0; + vars.m_mctruth_num_exiting_delta0=0; + vars.m_mctruth_num_exiting_deltapm=0; + vars.m_mctruth_num_exiting_deltapp=0; + + vars.m_mctruth_num_reconstructable_protons = 0; + + vars.m_mctruth_is_reconstructable_1g1p = 0; + vars.m_mctruth_is_reconstructable_1g0p = 0; + + vars.m_mctruth_leading_exiting_proton_energy = -9999; + + vars.m_mctruth_exiting_pi0_E.clear(); + vars.m_mctruth_exiting_pi0_mom.clear(); + vars.m_mctruth_exiting_pi0_px.clear(); + vars.m_mctruth_exiting_pi0_py.clear(); + vars.m_mctruth_exiting_pi0_pz.clear(); + + vars.m_mctruth_pi0_leading_photon_energy = -9999; + vars.m_mctruth_pi0_subleading_photon_energy = -9999; + vars.m_mctruth_pi0_leading_photon_end_process = "none"; + vars.m_mctruth_pi0_subleading_photon_end_process = "none"; + vars.m_mctruth_pi0_leading_photon_end = {-9999,-9999,-9999}; + vars.m_mctruth_pi0_leading_photon_start = {-9999,-9999,-9999}; + vars.m_mctruth_pi0_subleading_photon_end = {-9999,-9999,-9999}; + vars.m_mctruth_pi0_subleading_photon_start = {-9999,-9999,-9999}; + vars.m_mctruth_pi0_leading_photon_exiting_TPC = -999; + vars.m_mctruth_pi0_subleading_photon_exiting_TPC = -999; + vars.m_mctruth_pi0_leading_photon_mom = {-9999,-9999,-9999}; + vars.m_mctruth_pi0_subleading_photon_mom = {-9999,-9999,-9999}; + + vars.m_mctruth_exiting_delta0_num_daughters.clear(); + + vars.m_mctruth_exiting_photon_mother_trackID.clear(); + vars.m_mctruth_exiting_photon_trackID.clear(); + vars.m_mctruth_exiting_photon_from_delta_decay.clear(); + vars.m_mctruth_exiting_photon_energy.clear(); + vars.m_mctruth_exiting_photon_px.clear(); + vars.m_mctruth_exiting_photon_py.clear(); + vars.m_mctruth_exiting_photon_pz.clear(); + + vars.m_mctruth_exiting_proton_mother_trackID.clear(); + vars.m_mctruth_exiting_proton_trackID.clear(); + vars.m_mctruth_exiting_proton_from_delta_decay.clear(); + vars.m_mctruth_exiting_proton_energy.clear(); + vars.m_mctruth_exiting_proton_px.clear(); + vars.m_mctruth_exiting_proton_py.clear(); + vars.m_mctruth_exiting_proton_pz.clear(); + + vars.m_mctruth_exiting_neutron_mother_trackID.clear(); + vars.m_mctruth_exiting_neutron_trackID.clear(); + vars.m_mctruth_exiting_neutron_from_delta_decay.clear(); + vars.m_mctruth_exiting_neutron_energy.clear(); + vars.m_mctruth_exiting_neutron_px.clear(); + vars.m_mctruth_exiting_neutron_py.clear(); + vars.m_mctruth_exiting_neutron_pz.clear(); } - void CreateMCTruthBranches(){ - vertex_tree->Branch("mctruth_num",&m_mctruth_num); - vertex_tree->Branch("mctruth_origin",&m_mctruth_origin); - vertex_tree->Branch("mctruth_nu_pdg",&m_mctruth_nu_pdg); - vertex_tree->Branch("mctruth_nu_E",&m_mctruth_nu_E); - - vertex_tree->Branch("mctruth_nu_vertex_x",&m_mctruth_nu_vertex_x); - vertex_tree->Branch("mctruth_nu_vertex_y",&m_mctruth_nu_vertex_y); - vertex_tree->Branch("mctruth_nu_vertex_z",&m_mctruth_nu_vertex_z); - vertex_tree->Branch("mctruth_reco_vertex_dist",&m_mctruth_reco_vertex_dist); - - vertex_tree->Branch("mctruth_lepton_pdg",&m_mctruth_lepton_pdg); - vertex_tree->Branch("mctruth_lepton_E",&m_mctruth_lepton_E); - vertex_tree->Branch("mctruth_mode",&m_mctruth_mode); - vertex_tree->Branch("mctruth_qsqr",&m_mctruth_qsqr); - vertex_tree->Branch("mctruth_cc_or_nc",&m_mctruth_ccnc); - vertex_tree->Branch("mctruth_interaction_type",&m_mctruth_interaction_type); - - vertex_tree->Branch("mctruth_num_daughter_particles",&m_mctruth_num_daughter_particles); - vertex_tree->Branch("mctruth_daughters_pdg",&m_mctruth_daughters_pdg); - vertex_tree->Branch("mctruth_daughters_E",&m_mctruth_daughters_E); - vertex_tree->Branch("mctruth_daughters_status_code",&m_mctruth_daughters_status_code); - vertex_tree->Branch("mctruth_daughters_trackID",&m_mctruth_daughters_trackID); - vertex_tree->Branch("mctruth_daughters_mother_trackID",&m_mctruth_daughters_mother_trackID); - vertex_tree->Branch("mctruth_daughters_px",&m_mctruth_daughters_px); - vertex_tree->Branch("mctruth_daughters_py",&m_mctruth_daughters_py); - vertex_tree->Branch("mctruth_daughters_pz",&m_mctruth_daughters_pz); - vertex_tree->Branch("mctruth_daughters_startx",&m_mctruth_daughters_startx); - vertex_tree->Branch("mctruth_daughters_starty",&m_mctruth_daughters_starty); - vertex_tree->Branch("mctruth_daughters_startz",&m_mctruth_daughters_startz); - vertex_tree->Branch("mctruth_daughters_time",&m_mctruth_daughters_time); - vertex_tree->Branch("mctruth_daughters_endx",&m_mctruth_daughters_endx); - vertex_tree->Branch("mctruth_daughters_endy",&m_mctruth_daughters_endy); - vertex_tree->Branch("mctruth_daughters_endz",&m_mctruth_daughters_endz); - vertex_tree->Branch("mctruth_daughters_endtime",&m_mctruth_daughters_endtime); - vertex_tree->Branch("mctruth_daughters_process",&m_mctruth_daughters_process); - vertex_tree->Branch("mctruth_daughters_end_process",&m_mctruth_daughters_end_process); - - - - - vertex_tree->Branch("mctruth_num_exiting_protons",&m_mctruth_num_exiting_protons); - vertex_tree->Branch("mctruth_num_exiting_photons",&m_mctruth_num_exiting_photons); - vertex_tree->Branch("mctruth_num_exiting_neutrons",&m_mctruth_num_exiting_neutrons); - vertex_tree->Branch("mctruth_num_exiting_pi0",&m_mctruth_num_exiting_pi0); - vertex_tree->Branch("mctruth_num_exiting_pipm",&m_mctruth_num_exiting_pipm); - vertex_tree->Branch("mctruth_num_exiting_delta0",&m_mctruth_num_exiting_delta0); - vertex_tree->Branch("mctruth_num_exiting_deltapm",&m_mctruth_num_exiting_deltapm); - vertex_tree->Branch("mctruth_num_exiting_deltapp",&m_mctruth_num_exiting_deltapp); - - vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&m_mctruth_leading_exiting_proton_energy); - vertex_tree->Branch("mctruth_is_delta_radiative",&m_mctruth_is_delta_radiative); - vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&m_mctruth_delta_radiative_1g1p_or_1g1n); - vertex_tree->Branch("mctruth_delta_photon_energy",&m_mctruth_delta_photon_energy); - vertex_tree->Branch("mctruth_delta_proton_energy",&m_mctruth_delta_proton_energy); - vertex_tree->Branch("mctruth_delta_neutron_energy",&m_mctruth_delta_neutron_energy); - vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&m_mctruth_exiting_delta0_num_daughters); - - vertex_tree->Branch("mctruth_exiting_photon_trackID",&m_mctruth_exiting_photon_trackID); - vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&m_mctruth_exiting_photon_mother_trackID); - vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&m_mctruth_exiting_photon_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_photon_energy",&m_mctruth_exiting_photon_energy); - vertex_tree->Branch("mctruth_exiting_photon_px",&m_mctruth_exiting_photon_px); - vertex_tree->Branch("mctruth_exiting_photon_py",&m_mctruth_exiting_photon_py); - vertex_tree->Branch("mctruth_exiting_photon_pz",&m_mctruth_exiting_photon_pz); - - vertex_tree->Branch("mctruth_exiting_proton_trackID",&m_mctruth_exiting_proton_trackID); - vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&m_mctruth_exiting_proton_mother_trackID); - vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&m_mctruth_exiting_proton_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_proton_energy",&m_mctruth_exiting_proton_energy); - vertex_tree->Branch("mctruth_exiting_proton_px",&m_mctruth_exiting_proton_px); - vertex_tree->Branch("mctruth_exiting_proton_py",&m_mctruth_exiting_proton_py); - vertex_tree->Branch("mctruth_exiting_proton_pz",&m_mctruth_exiting_proton_pz); - - vertex_tree->Branch("mctruth_exiting_neutron_trackID",&m_mctruth_exiting_neutron_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&m_mctruth_exiting_neutron_mother_trackID); - vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&m_mctruth_exiting_neutron_from_delta_decay); - vertex_tree->Branch("mctruth_exiting_neutron_energy",&m_mctruth_exiting_neutron_energy); - vertex_tree->Branch("mctruth_exiting_neutron_px",&m_mctruth_exiting_neutron_px); - vertex_tree->Branch("mctruth_exiting_neutron_py",&m_mctruth_exiting_neutron_py); - vertex_tree->Branch("mctruth_exiting_neutron_pz",&m_mctruth_exiting_neutron_pz); - - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - - vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&m_mctruth_is_reconstructable_1g1p); - vertex_tree->Branch("mctruth_num_reconstructable_protons",&m_mctruth_num_reconstructable_protons); - - vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&m_mctruth_pi0_leading_photon_energy); - vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&m_mctruth_pi0_leading_photon_mom); - vertex_tree->Branch("mctruth_pi0_leading_photon_start",&m_mctruth_pi0_leading_photon_start); - vertex_tree->Branch("mctruth_pi0_leading_photon_end",&m_mctruth_pi0_leading_photon_end); - vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&m_mctruth_pi0_leading_photon_exiting_TPC); - vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&m_mctruth_pi0_subleading_photon_energy); - vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&m_mctruth_pi0_subleading_photon_mom); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&m_mctruth_pi0_subleading_photon_end_process); - vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&m_mctruth_pi0_subleading_photon_start); - vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&m_mctruth_pi0_subleading_photon_end); - vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&m_mctruth_pi0_subleading_photon_exiting_TPC); - - - vertex_tree->Branch("mctruth_exiting_pi0_E",&m_mctruth_exiting_pi0_E); - vertex_tree->Branch("mctruth_exiting_pi0_mom",&m_mctruth_exiting_pi0_mom); - vertex_tree->Branch("mctruth_exiting_pi0_px",&m_mctruth_exiting_pi0_px); - vertex_tree->Branch("mctruth_exiting_pi0_py",&m_mctruth_exiting_pi0_py); - vertex_tree->Branch("mctruth_exiting_pi0_pz",&m_mctruth_exiting_pi0_pz); + void CreateMCTruthBranches(var_all& vars){ + vars.vertex_tree->Branch("mctruth_num",&vars.m_mctruth_num); + vars.vertex_tree->Branch("mctruth_origin",&vars.m_mctruth_origin); + vars.vertex_tree->Branch("mctruth_nu_pdg",&vars.m_mctruth_nu_pdg); + vars.vertex_tree->Branch("mctruth_nu_E",&vars.m_mctruth_nu_E); + + vars.vertex_tree->Branch("mctruth_nu_vertex_x",&vars.m_mctruth_nu_vertex_x); + vars.vertex_tree->Branch("mctruth_nu_vertex_y",&vars.m_mctruth_nu_vertex_y); + vars.vertex_tree->Branch("mctruth_nu_vertex_z",&vars.m_mctruth_nu_vertex_z); + vars.vertex_tree->Branch("mctruth_reco_vertex_dist",&vars.m_mctruth_reco_vertex_dist); + + vars.vertex_tree->Branch("mctruth_lepton_pdg",&vars.m_mctruth_lepton_pdg); + vars.vertex_tree->Branch("mctruth_lepton_E",&vars.m_mctruth_lepton_E); + vars.vertex_tree->Branch("mctruth_mode",&vars.m_mctruth_mode); + vars.vertex_tree->Branch("mctruth_qsqr",&vars.m_mctruth_qsqr); + vars.vertex_tree->Branch("mctruth_cc_or_nc",&vars.m_mctruth_ccnc); + vars.vertex_tree->Branch("mctruth_interaction_type",&vars.m_mctruth_interaction_type); + + vars.vertex_tree->Branch("mctruth_num_daughter_particles",&vars.m_mctruth_num_daughter_particles); + vars.vertex_tree->Branch("mctruth_daughters_pdg",&vars.m_mctruth_daughters_pdg); + vars.vertex_tree->Branch("mctruth_daughters_E",&vars.m_mctruth_daughters_E); + vars.vertex_tree->Branch("mctruth_daughters_status_code",&vars.m_mctruth_daughters_status_code); + vars.vertex_tree->Branch("mctruth_daughters_trackID",&vars.m_mctruth_daughters_trackID); + vars.vertex_tree->Branch("mctruth_daughters_mother_trackID",&vars.m_mctruth_daughters_mother_trackID); + vars.vertex_tree->Branch("mctruth_daughters_px",&vars.m_mctruth_daughters_px); + vars.vertex_tree->Branch("mctruth_daughters_py",&vars.m_mctruth_daughters_py); + vars.vertex_tree->Branch("mctruth_daughters_pz",&vars.m_mctruth_daughters_pz); + vars.vertex_tree->Branch("mctruth_daughters_startx",&vars.m_mctruth_daughters_startx); + vars.vertex_tree->Branch("mctruth_daughters_starty",&vars.m_mctruth_daughters_starty); + vars.vertex_tree->Branch("mctruth_daughters_startz",&vars.m_mctruth_daughters_startz); + vars.vertex_tree->Branch("mctruth_daughters_time",&vars.m_mctruth_daughters_time); + vars.vertex_tree->Branch("mctruth_daughters_endx",&vars.m_mctruth_daughters_endx); + vars.vertex_tree->Branch("mctruth_daughters_endy",&vars.m_mctruth_daughters_endy); + vars.vertex_tree->Branch("mctruth_daughters_endz",&vars.m_mctruth_daughters_endz); + vars.vertex_tree->Branch("mctruth_daughters_endtime",&vars.m_mctruth_daughters_endtime); + vars.vertex_tree->Branch("mctruth_daughters_process",&vars.m_mctruth_daughters_process); + vars.vertex_tree->Branch("mctruth_daughters_end_process",&vars.m_mctruth_daughters_end_process); + + + + + vars.vertex_tree->Branch("mctruth_num_exiting_protons",&vars.m_mctruth_num_exiting_protons); + vars.vertex_tree->Branch("mctruth_num_exiting_photons",&vars.m_mctruth_num_exiting_photons); + vars.vertex_tree->Branch("mctruth_num_exiting_neutrons",&vars.m_mctruth_num_exiting_neutrons); + vars.vertex_tree->Branch("mctruth_num_exiting_pi0",&vars.m_mctruth_num_exiting_pi0); + vars.vertex_tree->Branch("mctruth_num_exiting_pipm",&vars.m_mctruth_num_exiting_pipm); + vars.vertex_tree->Branch("mctruth_num_exiting_delta0",&vars.m_mctruth_num_exiting_delta0); + vars.vertex_tree->Branch("mctruth_num_exiting_deltapm",&vars.m_mctruth_num_exiting_deltapm); + vars.vertex_tree->Branch("mctruth_num_exiting_deltapp",&vars.m_mctruth_num_exiting_deltapp); + + vars.vertex_tree->Branch("mctruth_leading_exiting_proton_energy",&vars.m_mctruth_leading_exiting_proton_energy); + vars.vertex_tree->Branch("mctruth_is_delta_radiative",&vars.m_mctruth_is_delta_radiative); + vars.vertex_tree->Branch("mctruth_delta_radiative_1g1p_or_1g1n",&vars.m_mctruth_delta_radiative_1g1p_or_1g1n); + vars.vertex_tree->Branch("mctruth_delta_photon_energy",&vars.m_mctruth_delta_photon_energy); + vars.vertex_tree->Branch("mctruth_delta_proton_energy",&vars.m_mctruth_delta_proton_energy); + vars.vertex_tree->Branch("mctruth_delta_neutron_energy",&vars.m_mctruth_delta_neutron_energy); + vars.vertex_tree->Branch("mctruth_exiting_delta0_num_daughters",&vars.m_mctruth_exiting_delta0_num_daughters); + + vars.vertex_tree->Branch("mctruth_exiting_photon_trackID",&vars.m_mctruth_exiting_photon_trackID); + vars.vertex_tree->Branch("mctruth_exiting_photon_mother_trackID",&vars.m_mctruth_exiting_photon_mother_trackID); + vars.vertex_tree->Branch("mctruth_exiting_photon_from_delta_decay",&vars.m_mctruth_exiting_photon_from_delta_decay); + vars.vertex_tree->Branch("mctruth_exiting_photon_energy",&vars.m_mctruth_exiting_photon_energy); + vars.vertex_tree->Branch("mctruth_exiting_photon_px",&vars.m_mctruth_exiting_photon_px); + vars.vertex_tree->Branch("mctruth_exiting_photon_py",&vars.m_mctruth_exiting_photon_py); + vars.vertex_tree->Branch("mctruth_exiting_photon_pz",&vars.m_mctruth_exiting_photon_pz); + + vars.vertex_tree->Branch("mctruth_exiting_proton_trackID",&vars.m_mctruth_exiting_proton_trackID); + vars.vertex_tree->Branch("mctruth_exiting_proton_mother_trackID",&vars.m_mctruth_exiting_proton_mother_trackID); + vars.vertex_tree->Branch("mctruth_exiting_proton_from_delta_decay",&vars.m_mctruth_exiting_proton_from_delta_decay); + vars.vertex_tree->Branch("mctruth_exiting_proton_energy",&vars.m_mctruth_exiting_proton_energy); + vars.vertex_tree->Branch("mctruth_exiting_proton_px",&vars.m_mctruth_exiting_proton_px); + vars.vertex_tree->Branch("mctruth_exiting_proton_py",&vars.m_mctruth_exiting_proton_py); + vars.vertex_tree->Branch("mctruth_exiting_proton_pz",&vars.m_mctruth_exiting_proton_pz); + + vars.vertex_tree->Branch("mctruth_exiting_neutron_trackID",&vars.m_mctruth_exiting_neutron_trackID); + vars.vertex_tree->Branch("mctruth_exiting_neutron_mother_trackID",&vars.m_mctruth_exiting_neutron_mother_trackID); + vars.vertex_tree->Branch("mctruth_exiting_neutron_from_delta_decay",&vars.m_mctruth_exiting_neutron_from_delta_decay); + vars.vertex_tree->Branch("mctruth_exiting_neutron_energy",&vars.m_mctruth_exiting_neutron_energy); + vars.vertex_tree->Branch("mctruth_exiting_neutron_px",&vars.m_mctruth_exiting_neutron_px); + vars.vertex_tree->Branch("mctruth_exiting_neutron_py",&vars.m_mctruth_exiting_neutron_py); + vars.vertex_tree->Branch("mctruth_exiting_neutron_pz",&vars.m_mctruth_exiting_neutron_pz); + + + vars.vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&vars.m_mctruth_is_reconstructable_1g1p); + + vars.vertex_tree->Branch("mctruth_is_reconstructable_1g1p",&vars.m_mctruth_is_reconstructable_1g1p); + vars.vertex_tree->Branch("mctruth_num_reconstructable_protons",&vars.m_mctruth_num_reconstructable_protons); + + vars.vertex_tree->Branch("mctruth_pi0_leading_photon_energy",&vars.m_mctruth_pi0_leading_photon_energy); + vars.vertex_tree->Branch("mctruth_pi0_leading_photon_mom",&vars.m_mctruth_pi0_leading_photon_mom); + vars.vertex_tree->Branch("mctruth_pi0_leading_photon_start",&vars.m_mctruth_pi0_leading_photon_start); + vars.vertex_tree->Branch("mctruth_pi0_leading_photon_end",&vars.m_mctruth_pi0_leading_photon_end); + vars.vertex_tree->Branch("mctruth_pi0_leading_photon_exiting_TPC",&vars.m_mctruth_pi0_leading_photon_exiting_TPC); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_energy",&vars.m_mctruth_pi0_subleading_photon_energy); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_mom",&vars.m_mctruth_pi0_subleading_photon_mom); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_end_process",&vars.m_mctruth_pi0_subleading_photon_end_process); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_start",&vars.m_mctruth_pi0_subleading_photon_start); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_end",&vars.m_mctruth_pi0_subleading_photon_end); + vars.vertex_tree->Branch("mctruth_pi0_subleading_photon_exiting_TPC",&vars.m_mctruth_pi0_subleading_photon_exiting_TPC); + + + vars.vertex_tree->Branch("mctruth_exiting_pi0_E",&vars.m_mctruth_exiting_pi0_E); + vars.vertex_tree->Branch("mctruth_exiting_pi0_mom",&vars.m_mctruth_exiting_pi0_mom); + vars.vertex_tree->Branch("mctruth_exiting_pi0_px",&vars.m_mctruth_exiting_pi0_px); + vars.vertex_tree->Branch("mctruth_exiting_pi0_py",&vars.m_mctruth_exiting_pi0_py); + vars.vertex_tree->Branch("mctruth_exiting_pi0_pz",&vars.m_mctruth_exiting_pi0_pz); } - void ResizeMCTruths(size_t size){ - m_mctruth_daughters_pdg.resize(size); - m_mctruth_daughters_E.resize(size); - m_mctruth_daughters_status_code.resize(size); - m_mctruth_daughters_trackID.resize(size); - m_mctruth_daughters_mother_trackID.resize(size); - m_mctruth_daughters_px.resize(size); - m_mctruth_daughters_py.resize(size); - m_mctruth_daughters_pz.resize(size); - m_mctruth_daughters_startx.resize(size); - m_mctruth_daughters_starty.resize(size); - m_mctruth_daughters_startz.resize(size); - m_mctruth_daughters_time.resize(size); - m_mctruth_daughters_endx.resize(size); - m_mctruth_daughters_endy.resize(size); - m_mctruth_daughters_endz.resize(size); - m_mctruth_daughters_endtime.resize(size); - m_mctruth_daughters_end_process.resize(size); - m_mctruth_daughters_process.resize(size); + void ResizeMCTruths(size_t size, var_all& vars){ + vars.m_mctruth_daughters_pdg.resize(size); + vars.m_mctruth_daughters_E.resize(size); + vars.m_mctruth_daughters_status_code.resize(size); + vars.m_mctruth_daughters_trackID.resize(size); + vars.m_mctruth_daughters_mother_trackID.resize(size); + vars.m_mctruth_daughters_px.resize(size); + vars.m_mctruth_daughters_py.resize(size); + vars.m_mctruth_daughters_pz.resize(size); + vars.m_mctruth_daughters_startx.resize(size); + vars.m_mctruth_daughters_starty.resize(size); + vars.m_mctruth_daughters_startz.resize(size); + vars.m_mctruth_daughters_time.resize(size); + vars.m_mctruth_daughters_endx.resize(size); + vars.m_mctruth_daughters_endy.resize(size); + vars.m_mctruth_daughters_endz.resize(size); + vars.m_mctruth_daughters_endtime.resize(size); + vars.m_mctruth_daughters_end_process.resize(size); + vars.m_mctruth_daughters_process.resize(size); } //analyze_EventWeight.h - void ClearEventWeightBranches(){ - m_mcflux_nu_pos_x=-9999; - m_mcflux_nu_pos_y=-9999; - m_mcflux_nu_pos_z=-9999; - m_mcflux_nu_mom_x=-9999; - m_mcflux_nu_mom_y=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_z=-9999; - m_mcflux_nu_mom_E=-9999; - m_mcflux_ntype=0; - m_mcflux_ptype=0; - m_mcflux_nimpwt=-9999; - m_mcflux_dk2gen=-9999; - m_mcflux_nenergyn=-9999; - m_mcflux_tpx=-9999; - m_mcflux_tpy=-9999; - m_mcflux_tpz=-9999; - m_mcflux_vx=-9999; - m_mcflux_vy=-9999; - m_mcflux_vz=-9999; - m_mcflux_tptype=0; - m_mctruth_nparticles=0; - /* - // m_mctruth_particles_track_ID[]; - // m_mctruth_particles_pdg_code[]; - // m_mctruth_particles_mother[]; - // m_mctruth_particles_status_code[]; - // m_mctruth_particles_num_daughters[]; //other similar variables - // m_mctruth_particles_daughters[]; - //m_mctruth_particles_Gvx.clear(); - //m_mctruth_particles_Gvy.clear(); - m_mctruth_particles_Gvz.clear(); - m_mctruth_particles_Gvt.clear(); - m_mctruth_particles_px0.clear(); - m_mctruth_particles_py0.clear(); - m_mctruth_particles_pz0.clear(); - m_mctruth_particles_e0.clear(); - //int m_mctruth_particles_rescatter.clear(); - m_mctruth_particles_polx.clear(); - m_mctruth_particles_poly.clear(); - m_mctruth_particles_polz.clear(); - - //int m_mctruth_neutrino_CCNC; - //int m_mctruth_neutrino_mode: "m_mctruth_neutrino_mode" //declared in mctruth vars - //m_mctruth_neutrino_interactionType: "m_mctruth_neutrino_interactionType" - int m_mctruth_neutrino_target.clear(); - int m_mctruth_neutrino_nucleon.clear(); - int m_mctruth_neutrino_quark.clear(); - m_mctruth_neutrino_w.clear(); - m_mctruth_neutrino_x.clear(); - m_mctruth_neutrino_y.clear(); - */ - //m_mctruth_neutrino_QSqr: "m_mctruth_neutrino_QSqr" - m_gtruth_is_sea_quark=false; - m_gtruth_tgt_pdg=0; - m_gtruth_tgt_Z = -9999; - m_gtruth_tgt_A = -9999; - m_gtruth_tgt_p4_x = -9999; - m_gtruth_tgt_p4_y = -9999; - m_gtruth_tgt_p4_z = -9999; - m_gtruth_tgt_p4_E = -9999; - m_gtruth_weight=-9999; - m_gtruth_probability=-9999; - m_gtruth_xsec=-9999; - m_gtruth_diff_xsec=-9999; - m_gtruth_gphase_space=-9999; - m_gtruth_vertex_x=-9999; - m_gtruth_vertex_y=-9999; - m_gtruth_vertex_z=-9999; - m_gtruth_vertex_T=-9999; - m_gtruth_gscatter=-9999; - m_gtruth_gint=-9999; - m_gtruth_res_num=-9999; - m_gtruth_num_piplus=-9999; - m_gtruth_num_pi0=-9999; - m_gtruth_num_piminus=-9999; - m_gtruth_num_proton=-9999; - m_gtruth_num_neutron=-9999; - m_gtruth_is_charm=false; - m_gtruth_is_strange=false; - m_gtruth_charm_hadron_pdg = -9999; - m_gtruth_strange_hadron_pdg = -9999; - m_gtruth_decay_mode = -9999; - m_gtruth_gx=-9999; - m_gtruth_gy=-9999; - m_gtruth_gy=-9999; - m_gtruth_gt=-9999; - m_gtruth_gw=-9999; - m_gtruth_gQ2=-9999; - m_gtruth_gq2=-9999; - m_gtruth_probe_pdg=0; - m_gtruth_probe_p4_x=-9999; - m_gtruth_probe_p4_y=-9999; - m_gtruth_probe_p4_z=-9999; - m_gtruth_probe_p4_E=-9999; - m_gtruth_hit_nuc_p4_x=-9999; - m_gtruth_hit_nuc_p4_y=-9999; - m_gtruth_hit_nuc_p4_z=-9999; - m_gtruth_hit_nuc_p4_E=-9999; - m_gtruth_hit_nuc_pos=-9999; - m_gtruth_fs_had_syst_p4_x=-9999; - m_gtruth_fs_had_syst_p4_y=-9999; - m_gtruth_fs_had_syst_p4_z=-9999; - m_gtruth_fs_had_syst_p4_E=-9999; + void ClearEventWeightBranches(var_all& vars){ + vars.m_mcflux_nu_pos_x=-9999; + vars.m_mcflux_nu_pos_y=-9999; + vars.m_mcflux_nu_pos_z=-9999; + vars.m_mcflux_nu_mom_x=-9999; + vars.m_mcflux_nu_mom_y=-9999; + vars.m_mcflux_nu_mom_z=-9999; + vars.m_mcflux_nu_mom_z=-9999; + vars.m_mcflux_nu_mom_E=-9999; + vars.m_mcflux_ntype=0; + vars.m_mcflux_ptype=0; + vars.m_mcflux_nimpwt=-9999; + vars.m_mcflux_dk2gen=-9999; + vars.m_mcflux_nenergyn=-9999; + vars.m_mcflux_tpx=-9999; + vars.m_mcflux_tpy=-9999; + vars.m_mcflux_tpz=-9999; + vars.m_mcflux_vx=-9999; + vars.m_mcflux_vy=-9999; + vars.m_mcflux_vz=-9999; + vars.m_mcflux_tptype=0; + vars.m_mctruth_nparticles=0; +// vars.fmcweight.clear(); + + //vars.m_mctruth_particles_track_ID[]; + //vars.m_mctruth_particles_pdg_code[]; + //vars.m_mctruth_particles_mother[]; + //vars.m_mctruth_particles_status_code[]; + //vars.m_mctruth_particles_num_daughters[]; //other similar variables + //vars.m_mctruth_particles_daughters[]; + //vars.m_mctruth_particles_Gvx.clear(); + //vars.m_mctruth_particles_Gvy.clear(); + //vars.m_mctruth_particles_Gvz.clear(); + //vars.m_mctruth_particles_Gvt.clear(); + //vars.m_mctruth_particles_px0.clear(); + //vars.m_mctruth_particles_py0.clear(); + //vars.m_mctruth_particles_pz0.clear(); + //vars.m_mctruth_particles_e0.clear(); + ////int vars.m_mctruth_particles_rescatter.clear(); + //vars.m_mctruth_particles_polx.clear(); + //vars.m_mctruth_particles_poly.clear(); + //vars.m_mctruth_particles_polz.clear(); + + //int vars.m_mctruth_neutrino_CCNC; + //int vars.m_mctruth_neutrino_mode: "vars.m_mctruth_neutrino_mode" //declared in mctruth vars + //vars.m_mctruth_neutrino_interactionType: "vars.m_mctruth_neutrino_interactionType" + //int vars.m_mctruth_neutrino_target.clear(); + //int vars.m_mctruth_neutrino_nucleon.clear(); + //int vars.m_mctruth_neutrino_quark.clear(); + //vars.m_mctruth_neutrino_w.clear(); + //vars.m_mctruth_neutrino_x.clear(); + //vars.m_mctruth_neutrino_y.clear(); + //vars.m_mctruth_neutrino_QSqr: "vars.m_mctruth_neutrino_QSqr" + vars.m_gtruth_is_sea_quark=false; + vars.m_gtruth_tgt_pdg=0; + vars.m_gtruth_tgt_Z = -9999; + vars.m_gtruth_tgt_A = -9999; + vars.m_gtruth_tgt_p4_x = -9999; + vars.m_gtruth_tgt_p4_y = -9999; + vars.m_gtruth_tgt_p4_z = -9999; + vars.m_gtruth_tgt_p4_E = -9999; + vars.m_gtruth_weight=-9999; + vars.m_gtruth_probability=-9999; + vars.m_gtruth_xsec=-9999; + vars.m_gtruth_diff_xsec=-9999; + vars.m_gtruth_gphase_space=-9999; + vars.m_gtruth_vertex_x=-9999; + vars.m_gtruth_vertex_y=-9999; + vars.m_gtruth_vertex_z=-9999; + vars.m_gtruth_vertex_T=-9999; + vars.m_gtruth_gscatter=-9999; + vars.m_gtruth_gint=-9999; + vars.m_gtruth_res_num=-9999; + vars.m_gtruth_num_piplus=-9999; + vars.m_gtruth_num_pi0=-9999; + vars.m_gtruth_num_piminus=-9999; + vars.m_gtruth_num_proton=-9999; + vars.m_gtruth_num_neutron=-9999; + vars.m_gtruth_is_charm=false; + vars.m_gtruth_is_strange=false; + vars.m_gtruth_charm_hadron_pdg = -9999; + vars.m_gtruth_strange_hadron_pdg = -9999; + vars.m_gtruth_decay_mode = -9999; + vars.m_gtruth_gx=-9999; + vars.m_gtruth_gy=-9999; + vars.m_gtruth_gy=-9999; + vars.m_gtruth_gt=-9999; + vars.m_gtruth_gw=-9999; + vars.m_gtruth_gQ2=-9999; + vars.m_gtruth_gq2=-9999; + vars.m_gtruth_probe_pdg=0; + vars.m_gtruth_probe_p4_x=-9999; + vars.m_gtruth_probe_p4_y=-9999; + vars.m_gtruth_probe_p4_z=-9999; + vars.m_gtruth_probe_p4_E=-9999; + vars.m_gtruth_hit_nuc_p4_x=-9999; + vars.m_gtruth_hit_nuc_p4_y=-9999; + vars.m_gtruth_hit_nuc_p4_z=-9999; + vars.m_gtruth_hit_nuc_p4_E=-9999; + vars.m_gtruth_hit_nuc_pos=-9999; + vars.m_gtruth_fs_had_syst_p4_x=-9999; + vars.m_gtruth_fs_had_syst_p4_y=-9999; + vars.m_gtruth_fs_had_syst_p4_z=-9999; + vars.m_gtruth_fs_had_syst_p4_E=-9999; } - void CreateEventWeightBranches(){ + void CreateEventWeightBranches(var_all& vars){ //-----------------run info - eventweight_tree->Branch("run", &m_run_number_eventweight); - eventweight_tree->Branch("subrun", &m_subrun_number_eventweight); - eventweight_tree->Branch("event", &m_event_number_eventweight); + vars.eventweight_tree->Branch("run", &vars.m_run_number_eventweight); + vars.eventweight_tree->Branch("subrun", &vars.m_subrun_number_eventweight); + vars.eventweight_tree->Branch("event", &vars.m_event_number_eventweight); //------------------mcflux - eventweight_tree->Branch("MCFlux_NuPosX", &m_mcflux_nu_pos_x ); - eventweight_tree->Branch("MCFlux_NuPosY", &m_mcflux_nu_pos_y ); - eventweight_tree->Branch("MCFlux_NuPosZ", &m_mcflux_nu_pos_z ); - eventweight_tree->Branch("MCFlux_NuMomX", &m_mcflux_nu_mom_x); - eventweight_tree->Branch("MCFlux_NuMomY", &m_mcflux_nu_mom_y ); - eventweight_tree->Branch("MCFlux_NuMomZ", &m_mcflux_nu_mom_z); - eventweight_tree->Branch("MCFlux_NuMomE", &m_mcflux_nu_mom_E); - eventweight_tree->Branch("MCFlux_ntype", &m_mcflux_ntype ); - eventweight_tree->Branch("MCFlux_ptype", &m_mcflux_ptype ); - eventweight_tree->Branch("MCFlux_nimpwt", &m_mcflux_nimpwt ); - eventweight_tree->Branch("MCFlux_dk2gen", &m_mcflux_dk2gen ); - eventweight_tree->Branch("MCFlux_nenergyn", &m_mcflux_nenergyn); - eventweight_tree->Branch("MCFlux_tpx", &m_mcflux_tpx ); - eventweight_tree->Branch("MCFlux_tpy", &m_mcflux_tpy ); - eventweight_tree->Branch("MCFlux_tpz", &m_mcflux_tpz ); - eventweight_tree->Branch("MCFlux_vx", &m_mcflux_vx); - eventweight_tree->Branch("MCFlux_vy", &m_mcflux_vy ); - eventweight_tree->Branch("MCFlux_vz", &m_mcflux_vz ); - eventweight_tree->Branch("MCFlux_tptype", & m_mcflux_tptype ); + vars.eventweight_tree->Branch("MCFlux_NuPosX", &vars.m_mcflux_nu_pos_x ); + vars.eventweight_tree->Branch("MCFlux_NuPosY", &vars.m_mcflux_nu_pos_y ); + vars.eventweight_tree->Branch("MCFlux_NuPosZ", &vars.m_mcflux_nu_pos_z ); + vars.eventweight_tree->Branch("MCFlux_NuMomX", &vars.m_mcflux_nu_mom_x); + vars.eventweight_tree->Branch("MCFlux_NuMomY", &vars.m_mcflux_nu_mom_y ); + vars.eventweight_tree->Branch("MCFlux_NuMomZ", &vars.m_mcflux_nu_mom_z); + vars.eventweight_tree->Branch("MCFlux_NuMomE", &vars.m_mcflux_nu_mom_E); + vars.eventweight_tree->Branch("MCFlux_ntype", &vars.m_mcflux_ntype ); + vars.eventweight_tree->Branch("MCFlux_ptype", &vars.m_mcflux_ptype ); + vars.eventweight_tree->Branch("MCFlux_nimpwt", &vars.m_mcflux_nimpwt ); + vars.eventweight_tree->Branch("MCFlux_dk2gen", &vars.m_mcflux_dk2gen ); + vars.eventweight_tree->Branch("MCFlux_nenergyn", &vars.m_mcflux_nenergyn); + vars.eventweight_tree->Branch("MCFlux_tpx", &vars.m_mcflux_tpx ); + vars.eventweight_tree->Branch("MCFlux_tpy", &vars.m_mcflux_tpy ); + vars.eventweight_tree->Branch("MCFlux_tpz", &vars.m_mcflux_tpz ); + vars.eventweight_tree->Branch("MCFlux_vx", &vars.m_mcflux_vx); + vars.eventweight_tree->Branch("MCFlux_vy", &vars.m_mcflux_vy ); + vars.eventweight_tree->Branch("MCFlux_vz", &vars.m_mcflux_vz ); + vars.eventweight_tree->Branch("MCFlux_tptype", & vars.m_mcflux_tptype ); //---------------mctruth - eventweight_tree->Branch("MCTruth_NParticles", &m_mctruth_nparticles); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "m_mctruth_particles_track_Id[m_mctruth_nparticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); - //eventweight_tree->Branch("MCTruth_particles_TrackId", &m_mctruth_particles_track_Id); - eventweight_tree->Branch("MCTruth_particles_PdgCode", &m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Mother", &m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_StatusCode", &m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); - eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_Daughters", &m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); - eventweight_tree->Branch("MCTruth_particles_Gvx", &m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_particles_Gvy", &m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvz", &m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Gvt", &m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_px0", &m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_py0", &m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_pz0", &m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_e0", &m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_Rescatter", &m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); - eventweight_tree->Branch("MCTruth_particles_polx", &m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_poly", &m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); - eventweight_tree->Branch("MCTruth_particles_polz", &m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); - eventweight_tree->Branch("MCTruth_neutrino_CCNC", &m_mctruth_neutrino_ccnc ); - eventweight_tree->Branch("MCTruth_neutrino_mode", &m_mctruth_neutrino_mode ); - eventweight_tree->Branch("MCTruth_neutrino_interactionType", &m_mctruth_neutrino_interaction_type ); - eventweight_tree->Branch("MCTruth_neutrino_target", &m_mctruth_neutrino_target ); - eventweight_tree->Branch("MCTruth_neutrino_nucleon", &m_mctruth_neutrino_nucleon ); - eventweight_tree->Branch("MCTruth_neutrino_quark", &m_mctruth_neutrino_quark ); - eventweight_tree->Branch("MCTruth_neutrino_W", &m_mctruth_neutrino_w ); - eventweight_tree->Branch("MCTruth_neutrino_X", &m_mctruth_neutrino_x ); - eventweight_tree->Branch("MCTruth_neutrino_Y", &m_mctruth_neutrino_y ); - eventweight_tree->Branch("MCTruth_neutrino_QSqr", &m_mctruth_neutrino_qsqr ); + vars.eventweight_tree->Branch("MCTruth_NParticles", &vars.m_mctruth_nparticles); + //vars.eventweight_tree->Branch("MCTruth_particles_TrackId", &vars.m_mctruth_particles_track_Id, "vars.m_mctruth_particles_track_Id[vars.m_mctruth_nparticles]/I" ); + vars.eventweight_tree->Branch("MCTruth_particles_TrackId", &vars.m_mctruth_particles_track_Id, "MCTruth_particles_TrackId[MCTruth_NParticles]/I" ); + //vars.eventweight_tree->Branch("MCTruth_particles_TrackId", &vars.m_mctruth_particles_track_Id); + vars.eventweight_tree->Branch("MCTruth_particles_PdgCode", &vars.m_mctruth_particles_pdg_code, "MCTruth_particles_PdgCode[MCTruth_NParticles]/I" ); + vars.eventweight_tree->Branch("MCTruth_particles_Mother", &vars.m_mctruth_particles_mother, "MCTruth_particles_Mother[MCTruth_NParticles]/I" ); + vars.eventweight_tree->Branch("MCTruth_particles_StatusCode", &vars.m_mctruth_particles_status_code, "MCTruth_particles_StatusCode[MCTruth_NParticles]/I"); + vars.eventweight_tree->Branch("MCTruth_particles_NumberDaughters", &vars.m_mctruth_particles_num_daughters ,"MCTruth_particles_NumberDaughters[MCTruth_NParticles]/I" ); + vars.eventweight_tree->Branch("MCTruth_particles_Daughters", &vars.m_mctruth_particles_daughters,"MCTruth_particles_Daughters[MCTruth_NParticles][100]" ); + vars.eventweight_tree->Branch("MCTruth_particles_Gvx", &vars.m_mctruth_particles_Gvx,"MCTruth_particles_Gvx[MCTruth_NParticles]/D"); + vars.eventweight_tree->Branch("MCTruth_particles_Gvy", &vars.m_mctruth_particles_Gvy,"MCTruth_particles_Gvy[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_Gvz", &vars.m_mctruth_particles_Gvz,"MCTruth_particles_Gvz[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_Gvt", &vars.m_mctruth_particles_Gvt,"MCTruth_particles_Gvt[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_px0", &vars.m_mctruth_particles_px0, "MCTruth_particles_px0[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_py0", &vars.m_mctruth_particles_py0, "MCTruth_particles_py0[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_pz0", &vars.m_mctruth_particles_pz0, "MCTruth_particles_pz0[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_e0", &vars.m_mctruth_particles_e0, "MCTruth_particles_e0[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_Rescatter", &vars.m_mctruth_particles_rescatter,"MCTruth_particles_Rescatter[MCTruth_NParticles]/I" ); + vars.eventweight_tree->Branch("MCTruth_particles_polx", &vars.m_mctruth_particles_polx, "MCTruth_particles_polx[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_poly", &vars.m_mctruth_particles_poly, "MCTruth_particles_poly[MCTruth_NParticles]/D" ); + vars.eventweight_tree->Branch("MCTruth_particles_polz", &vars.m_mctruth_particles_polz, "MCTruth_particles_polz[MCTruth_NParticles]/D"); + vars.eventweight_tree->Branch("MCTruth_neutrino_CCNC", &vars.m_mctruth_neutrino_ccnc ); + vars.eventweight_tree->Branch("MCTruth_neutrino_mode", &vars.m_mctruth_neutrino_mode ); + vars.eventweight_tree->Branch("MCTruth_neutrino_interactionType", &vars.m_mctruth_neutrino_interaction_type ); + vars.eventweight_tree->Branch("MCTruth_neutrino_target", &vars.m_mctruth_neutrino_target ); + vars.eventweight_tree->Branch("MCTruth_neutrino_nucleon", &vars.m_mctruth_neutrino_nucleon ); + vars.eventweight_tree->Branch("MCTruth_neutrino_quark", &vars.m_mctruth_neutrino_quark ); + vars.eventweight_tree->Branch("MCTruth_neutrino_W", &vars.m_mctruth_neutrino_w ); + vars.eventweight_tree->Branch("MCTruth_neutrino_X", &vars.m_mctruth_neutrino_x ); + vars.eventweight_tree->Branch("MCTruth_neutrino_Y", &vars.m_mctruth_neutrino_y ); + vars.eventweight_tree->Branch("MCTruth_neutrino_QSqr", &vars.m_mctruth_neutrino_qsqr ); //---------------------gtruth - eventweight_tree->Branch("GTruth_IsSeaQuark", &m_gtruth_is_sea_quark ); - eventweight_tree->Branch("GTruth_tgtPDG", &m_gtruth_tgt_pdg ); - eventweight_tree->Branch("GTruth_tgtA", &m_gtruth_tgt_A ); - eventweight_tree->Branch("GTruth_tgtZ", &m_gtruth_tgt_Z ); - eventweight_tree->Branch("GTruth_TgtP4x", &m_gtruth_tgt_p4_x ); - eventweight_tree->Branch("GTruth_TgtP4y", &m_gtruth_tgt_p4_y ); - eventweight_tree->Branch("GTruth_TgtP4z", &m_gtruth_tgt_p4_z ); - eventweight_tree->Branch("GTruth_TgtP4E", &m_gtruth_tgt_p4_E ); - eventweight_tree->Branch("GTruth_weight", &m_gtruth_weight ); - eventweight_tree->Branch("GTruth_probability", &m_gtruth_probability ); - eventweight_tree->Branch("GTruth_Xsec", &m_gtruth_xsec ); - eventweight_tree->Branch("GTruth_DiffXsec", &m_gtruth_diff_xsec ); - eventweight_tree->Branch("GTruth_GPhaseSpace", &m_gtruth_gphase_space ); - eventweight_tree->Branch("GTruth_vertexX", &m_gtruth_vertex_x ); - eventweight_tree->Branch("GTruth_vertexY", &m_gtruth_vertex_y ); - eventweight_tree->Branch("GTruth_vertexZ", &m_gtruth_vertex_z ); - eventweight_tree->Branch("GTruth_vertexT", &m_gtruth_vertex_T ); - eventweight_tree->Branch("GTruth_Gscatter", &m_gtruth_gscatter ); - eventweight_tree->Branch("GTruth_Gint", &m_gtruth_gint ); - eventweight_tree->Branch("GTruth_ResNum", &m_gtruth_res_num); - eventweight_tree->Branch("GTruth_NumPiPlus", &m_gtruth_num_piplus); - eventweight_tree->Branch("GTruth_NumPi0", &m_gtruth_num_pi0); - eventweight_tree->Branch("GTruth_NumPiMinus", &m_gtruth_num_piminus); - eventweight_tree->Branch("GTruth_NumProton", &m_gtruth_num_proton ); - eventweight_tree->Branch("GTruth_NumNeutron", &m_gtruth_num_neutron ); - eventweight_tree->Branch("GTruth_IsCharm", &m_gtruth_is_charm ); - eventweight_tree->Branch("GTruth_IsStrange", &m_gtruth_is_strange ); - eventweight_tree->Branch("GTruth_StrangeHadronPDG", &m_gtruth_strange_hadron_pdg ); - eventweight_tree->Branch("GTruth_CharmHadronPDG", &m_gtruth_charm_hadron_pdg ); - eventweight_tree->Branch("GTruth_DecayMode",&m_gtruth_decay_mode); - eventweight_tree->Branch("GTruth_gX", &m_gtruth_gx ); - eventweight_tree->Branch("GTruth_gY", &m_gtruth_gy ); - eventweight_tree->Branch("GTruth_gT", &m_gtruth_gt ); - eventweight_tree->Branch("GTruth_gW", &m_gtruth_gw ); - eventweight_tree->Branch("GTruth_gQ2", &m_gtruth_gQ2 ); - eventweight_tree->Branch("GTruth_gq2", &m_gtruth_gq2 ); - eventweight_tree->Branch("GTruth_ProbePDG", &m_gtruth_probe_pdg ); - eventweight_tree->Branch("GTruth_ProbeP4x", &m_gtruth_probe_p4_x ); - eventweight_tree->Branch("GTruth_ProbeP4y", &m_gtruth_probe_p4_y ); - eventweight_tree->Branch("GTruth_ProbeP4z", &m_gtruth_probe_p4_z ); - eventweight_tree->Branch("GTruth_ProbeP4E", &m_gtruth_probe_p4_E ); - eventweight_tree->Branch("GTruth_HitNucP4x", &m_gtruth_hit_nuc_p4_x ); - eventweight_tree->Branch("GTruth_HitNucP4y", &m_gtruth_hit_nuc_p4_y ); - eventweight_tree->Branch("GTruth_HitNucP4z", &m_gtruth_hit_nuc_p4_z ); - eventweight_tree->Branch("GTruth_HitNucP4E", &m_gtruth_hit_nuc_p4_E ); - eventweight_tree->Branch("GTruth_HitNucPos", &m_gtruth_hit_nuc_pos ); - eventweight_tree->Branch("GTruth_FShadSystP4x", &m_gtruth_fs_had_syst_p4_x ); - eventweight_tree->Branch("GTruth_FShadSystP4y", &m_gtruth_fs_had_syst_p4_y ); - eventweight_tree->Branch("GTruth_FShadSystP4z", &m_gtruth_fs_had_syst_p4_z ); - eventweight_tree->Branch("GTruth_FShadSystP4E", &m_gtruth_fs_had_syst_p4_E ); + vars.eventweight_tree->Branch("GTruth_IsSeaQuark", &vars.m_gtruth_is_sea_quark ); + vars.eventweight_tree->Branch("GTruth_tgtPDG", &vars.m_gtruth_tgt_pdg ); + vars.eventweight_tree->Branch("GTruth_tgtA", &vars.m_gtruth_tgt_A ); + vars.eventweight_tree->Branch("GTruth_tgtZ", &vars.m_gtruth_tgt_Z ); + vars.eventweight_tree->Branch("GTruth_TgtP4x", &vars.m_gtruth_tgt_p4_x ); + vars.eventweight_tree->Branch("GTruth_TgtP4y", &vars.m_gtruth_tgt_p4_y ); + vars.eventweight_tree->Branch("GTruth_TgtP4z", &vars.m_gtruth_tgt_p4_z ); + vars.eventweight_tree->Branch("GTruth_TgtP4E", &vars.m_gtruth_tgt_p4_E ); + vars.eventweight_tree->Branch("GTruth_weight", &vars.m_gtruth_weight ); + vars.eventweight_tree->Branch("GTruth_probability", &vars.m_gtruth_probability ); + vars.eventweight_tree->Branch("GTruth_Xsec", &vars.m_gtruth_xsec ); + vars.eventweight_tree->Branch("GTruth_DiffXsec", &vars.m_gtruth_diff_xsec ); + vars.eventweight_tree->Branch("GTruth_GPhaseSpace", &vars.m_gtruth_gphase_space ); + vars.eventweight_tree->Branch("GTruth_vertexX", &vars.m_gtruth_vertex_x ); + vars.eventweight_tree->Branch("GTruth_vertexY", &vars.m_gtruth_vertex_y ); + vars.eventweight_tree->Branch("GTruth_vertexZ", &vars.m_gtruth_vertex_z ); + vars.eventweight_tree->Branch("GTruth_vertexT", &vars.m_gtruth_vertex_T ); + vars.eventweight_tree->Branch("GTruth_Gscatter", &vars.m_gtruth_gscatter ); + vars.eventweight_tree->Branch("GTruth_Gint", &vars.m_gtruth_gint ); + vars.eventweight_tree->Branch("GTruth_ResNum", &vars.m_gtruth_res_num); + vars.eventweight_tree->Branch("GTruth_NumPiPlus", &vars.m_gtruth_num_piplus); + vars.eventweight_tree->Branch("GTruth_NumPi0", &vars.m_gtruth_num_pi0); + vars.eventweight_tree->Branch("GTruth_NumPiMinus", &vars.m_gtruth_num_piminus); + vars.eventweight_tree->Branch("GTruth_NumProton", &vars.m_gtruth_num_proton ); + vars.eventweight_tree->Branch("GTruth_NumNeutron", &vars.m_gtruth_num_neutron ); + vars.eventweight_tree->Branch("GTruth_IsCharm", &vars.m_gtruth_is_charm ); + vars.eventweight_tree->Branch("GTruth_IsStrange", &vars.m_gtruth_is_strange ); + vars.eventweight_tree->Branch("GTruth_StrangeHadronPDG", &vars.m_gtruth_strange_hadron_pdg ); + vars.eventweight_tree->Branch("GTruth_CharmHadronPDG", &vars.m_gtruth_charm_hadron_pdg ); + vars.eventweight_tree->Branch("GTruth_DecayMode",&vars.m_gtruth_decay_mode); + vars.eventweight_tree->Branch("GTruth_gX", &vars.m_gtruth_gx ); + vars.eventweight_tree->Branch("GTruth_gY", &vars.m_gtruth_gy ); + vars.eventweight_tree->Branch("GTruth_gT", &vars.m_gtruth_gt ); + vars.eventweight_tree->Branch("GTruth_gW", &vars.m_gtruth_gw ); + vars.eventweight_tree->Branch("GTruth_gQ2", &vars.m_gtruth_gQ2 ); + vars.eventweight_tree->Branch("GTruth_gq2", &vars.m_gtruth_gq2 ); + vars.eventweight_tree->Branch("GTruth_ProbePDG", &vars.m_gtruth_probe_pdg ); + vars.eventweight_tree->Branch("GTruth_ProbeP4x", &vars.m_gtruth_probe_p4_x ); + vars.eventweight_tree->Branch("GTruth_ProbeP4y", &vars.m_gtruth_probe_p4_y ); + vars.eventweight_tree->Branch("GTruth_ProbeP4z", &vars.m_gtruth_probe_p4_z ); + vars.eventweight_tree->Branch("GTruth_ProbeP4E", &vars.m_gtruth_probe_p4_E ); + vars.eventweight_tree->Branch("GTruth_HitNucP4x", &vars.m_gtruth_hit_nuc_p4_x ); + vars.eventweight_tree->Branch("GTruth_HitNucP4y", &vars.m_gtruth_hit_nuc_p4_y ); + vars.eventweight_tree->Branch("GTruth_HitNucP4z", &vars.m_gtruth_hit_nuc_p4_z ); + vars.eventweight_tree->Branch("GTruth_HitNucP4E", &vars.m_gtruth_hit_nuc_p4_E ); + vars.eventweight_tree->Branch("GTruth_HitNucPos", &vars.m_gtruth_hit_nuc_pos ); + vars.eventweight_tree->Branch("GTruth_FShadSystP4x", &vars.m_gtruth_fs_had_syst_p4_x ); + vars.eventweight_tree->Branch("GTruth_FShadSystP4y", &vars.m_gtruth_fs_had_syst_p4_y ); + vars.eventweight_tree->Branch("GTruth_FShadSystP4z", &vars.m_gtruth_fs_had_syst_p4_z ); + vars.eventweight_tree->Branch("GTruth_FShadSystP4E", &vars.m_gtruth_fs_had_syst_p4_E ); } //analyze_Geant4.h - void ClearGeant4Branches(var_geant4 m_collection_geant4){ - - m_collection_geant4.m_geant4_pdg.clear(); - m_collection_geant4.m_geant4_trackid.clear(); - m_collection_geant4.m_geant4_mother.clear(); - m_collection_geant4.m_geant4_statuscode.clear(); - m_collection_geant4.m_geant4_E.clear(); - m_collection_geant4.m_geant4_mass.clear(); - m_collection_geant4.m_geant4_px.clear(); - m_collection_geant4.m_geant4_py.clear(); - m_collection_geant4.m_geant4_pz.clear(); - m_collection_geant4.m_geant4_dx.clear(); - m_collection_geant4.m_geant4_dy.clear(); - m_collection_geant4.m_geant4_dz.clear(); - - m_collection_geant4.m_geant4_vx.clear(); - m_collection_geant4.m_geant4_vy.clear(); - m_collection_geant4.m_geant4_vz.clear(); - m_collection_geant4.m_geant4_process.clear(); - m_collection_geant4.m_geant4_end_process.clear(); - - m_collection_geant4.m_geant4_costheta.clear(); + void ClearGeant4Branches(var_all& vars){ + + vars.m_geant4_pdg.clear(); + vars.m_geant4_trackid.clear(); + vars.m_geant4_mother.clear(); + vars.m_geant4_statuscode.clear(); + vars.m_geant4_E.clear(); + vars.m_geant4_mass.clear(); + vars.m_geant4_px.clear(); + vars.m_geant4_py.clear(); + vars.m_geant4_pz.clear(); + vars.m_geant4_dx.clear(); + vars.m_geant4_dy.clear(); + vars.m_geant4_dz.clear(); + + vars.m_geant4_vx.clear(); + vars.m_geant4_vy.clear(); + vars.m_geant4_vz.clear(); + vars.m_geant4_process.clear(); + vars.m_geant4_end_process.clear(); + + vars.m_geant4_costheta.clear(); } - void CreateGeant4Branches(var_geant4 m_collection_geant4){ - geant4_tree->Branch("geant4_pdg",&m_collection_geant4.m_geant4_pdg); - geant4_tree->Branch("geant4_trackid",&m_collection_geant4.m_geant4_trackid); - geant4_tree->Branch("geant4_mother",&m_collection_geant4.m_geant4_mother); - geant4_tree->Branch("geant4_statuscode",&m_collection_geant4.m_geant4_statuscode); - geant4_tree->Branch("geant4_E",&m_collection_geant4.m_geant4_E); - geant4_tree->Branch("geant4_mass",&m_collection_geant4.m_geant4_mass); - geant4_tree->Branch("geant4_px", &m_collection_geant4.m_geant4_px); - geant4_tree->Branch("geant4_py", &m_collection_geant4.m_geant4_py); - geant4_tree->Branch("geant4_pz", &m_collection_geant4.m_geant4_pz); - - geant4_tree->Branch("geant4_dx", &m_collection_geant4.m_geant4_dx); - geant4_tree->Branch("geant4_dy", &m_collection_geant4.m_geant4_dy); - geant4_tree->Branch("geant4_dz", &m_collection_geant4.m_geant4_dz); - - geant4_tree->Branch("geant4_vx", &m_collection_geant4.m_geant4_vx); - geant4_tree->Branch("geant4_vy", &m_collection_geant4.m_geant4_vy); - geant4_tree->Branch("geant4_vz", &m_collection_geant4.m_geant4_vz); - geant4_tree->Branch("geant4_costheta",&m_collection_geant4.m_geant4_costheta); - - geant4_tree->Branch("geant4_end_process", &m_collection_geant4.m_geant4_end_process); - geant4_tree->Branch("geant4_process", &m_collection_geant4.m_geant4_process); + void CreateGeant4Branches(var_all& vars){ + vars.geant4_tree->Branch("geant4_pdg",&vars.m_geant4_pdg); + vars.geant4_tree->Branch("geant4_trackid",&vars.m_geant4_trackid); + vars.geant4_tree->Branch("geant4_mother",&vars.m_geant4_mother); + vars.geant4_tree->Branch("geant4_statuscode",&vars.m_geant4_statuscode); + vars.geant4_tree->Branch("geant4_E",&vars.m_geant4_E); + vars.geant4_tree->Branch("geant4_mass",&vars.m_geant4_mass); + vars.geant4_tree->Branch("geant4_px", &vars.m_geant4_px); + vars.geant4_tree->Branch("geant4_py", &vars.m_geant4_py); + vars.geant4_tree->Branch("geant4_pz", &vars.m_geant4_pz); + + vars.geant4_tree->Branch("geant4_dx", &vars.m_geant4_dx); + vars.geant4_tree->Branch("geant4_dy", &vars.m_geant4_dy); + vars.geant4_tree->Branch("geant4_dz", &vars.m_geant4_dz); + + vars.geant4_tree->Branch("geant4_vx", &vars.m_geant4_vx); + vars.geant4_tree->Branch("geant4_vy", &vars.m_geant4_vy); + vars.geant4_tree->Branch("geant4_vz", &vars.m_geant4_vz); + vars.geant4_tree->Branch("geant4_costheta",&vars.m_geant4_costheta); + + vars.geant4_tree->Branch("geant4_end_process", &vars.m_geant4_end_process); + vars.geant4_tree->Branch("geant4_process", &vars.m_geant4_process); } //analyze_Slice.h - void ClearSlices(){ - m_reco_slice_num = 0; - m_reco_slice_nuscore.clear(); - m_matched_signal_shower_overlay_fraction.clear(); - //std::vector m_matched_signal_shower_conversion_length; - m_matched_signal_shower_true_E.clear(); - m_matched_signal_shower_nuscore.clear(); - m_matched_signal_shower_sliceId.clear(); - m_matched_signal_shower_is_clearcosmic.clear(); - m_matched_signal_shower_num = 0; - m_matched_signal_shower_is_nuslice.clear(); - m_matched_signal_shower_tracks_in_slice.clear(); - m_matched_signal_shower_showers_in_slice.clear(); - - m_reco_slice_num_pfps.clear(); - m_reco_slice_num_showers.clear(); - m_reco_slice_num_tracks.clear(); - - - m_matched_signal_track_true_E.clear(); - m_matched_signal_track_nuscore.clear(); - m_matched_signal_track_sliceId.clear(); - m_matched_signal_track_is_clearcosmic.clear(); - m_matched_signal_track_is_nuslice.clear(); - m_matched_signal_track_tracks_in_slice.clear(); - m_matched_signal_track_showers_in_slice.clear(); - - - m_matched_signal_track_num = 0; - - - //int m_matched_signal_total_num_slices; - - m_reco_1g1p_is_same_slice = false; - m_reco_1g1p_is_multiple_slices = false; - m_reco_1g1p_is_nuslice = false; - m_reco_1g0p_is_nuslice = false; - m_reco_1g1p_nuscore = -999; - m_reco_1g0p_nuscore = -999; - m_is_matched_1g1p = false; - m_is_matched_1g0p = false; - m_no_matched_showers = false; - m_multiple_matched_showers = false; - m_multiple_matched_tracks = false; - - - /* m_reco_slice_shower_num_matched_signal = -999; - m_reco_slice_track_num_matched_signal = -999; - m_reco_slice_shower_matched_sliceId.clear(); - m_reco_slice_track_matched_sliceId.clear(); - m_reco_slice_shower_matched_energy.clear(); - m_reco_slice_track_matched_energy.clear(); - m_reco_slice_shower_matched_conversion.clear(); - m_reco_slice_shower_matched_overlay_frac.clear(); + void ClearSlices(var_all& vars){ + vars.m_reco_slice_num = 0; + vars.m_reco_slice_nuscore.clear(); + vars.m_matched_signal_shower_overlay_fraction.clear(); + //std::vector vars.m_matched_signal_shower_conversion_length; + vars.m_matched_signal_shower_true_E.clear(); + vars.m_matched_signal_shower_nuscore.clear(); + vars.m_matched_signal_shower_sliceId.clear(); + vars.m_matched_signal_shower_is_clearcosmic.clear(); + vars.m_matched_signal_shower_num = 0; + vars.m_matched_signal_shower_is_nuslice.clear(); + vars.m_matched_signal_shower_tracks_in_slice.clear(); + vars.m_matched_signal_shower_showers_in_slice.clear(); + + vars.m_reco_slice_num_pfps.clear(); + vars.m_reco_slice_num_showers.clear(); + vars.m_reco_slice_num_tracks.clear(); + + + vars.m_matched_signal_track_true_E.clear(); + vars.m_matched_signal_track_nuscore.clear(); + vars.m_matched_signal_track_sliceId.clear(); + vars.m_matched_signal_track_is_clearcosmic.clear(); + vars.m_matched_signal_track_is_nuslice.clear(); + vars.m_matched_signal_track_tracks_in_slice.clear(); + vars.m_matched_signal_track_showers_in_slice.clear(); + + + vars.m_matched_signal_track_num = 0; + + + //int vars.m_matched_signal_total_num_slices; + + vars.m_reco_1g1p_is_same_slice = false; + vars.m_reco_1g1p_is_multiple_slices = false; + vars.m_reco_1g1p_is_nuslice = false; + vars.m_reco_1g0p_is_nuslice = false; + vars.m_reco_1g1p_nuscore = -999; + vars.m_reco_1g0p_nuscore = -999; + vars.m_is_matched_1g1p = false; + vars.m_is_matched_1g0p = false; + vars.m_no_matched_showers = false; + vars.m_multiple_matched_showers = false; + vars.m_multiple_matched_tracks = false; + + + /* vars.m_reco_slice_shower_num_matched_signal = -999; + vars.m_reco_slice_track_num_matched_signal = -999; + vars.m_reco_slice_shower_matched_sliceId.clear(); + vars.m_reco_slice_track_matched_sliceId.clear(); + vars.m_reco_slice_shower_matched_energy.clear(); + vars.m_reco_slice_track_matched_energy.clear(); + vars.m_reco_slice_shower_matched_conversion.clear(); + vars.m_reco_slice_shower_matched_overlay_frac.clear(); */ } - void CreateSliceBranches(){ - vertex_tree->Branch("reco_slice_nuscore",&m_reco_slice_nuscore); - vertex_tree->Branch("reco_slice_num",&m_reco_slice_num); - vertex_tree->Branch("reco_slice_shower_num_matched_signal",& m_reco_slice_shower_num_matched_signal); - vertex_tree->Branch("reco_slice_track_num_matched_signal",& m_reco_slice_track_num_matched_signal); - - ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &m_matched_signal_shower_overlay_fraction); - //std::vector m_matched_signal_shower_conversion_length; - ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &m_matched_signal_shower_true_E); - ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &m_matched_signal_shower_nuscore); - ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &m_matched_signal_shower_sliceId); - ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &m_matched_signal_shower_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_shower_num", &m_matched_signal_shower_num); - ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &m_matched_signal_shower_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &m_matched_signal_shower_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &m_matched_signal_shower_showers_in_slice); - - ncdelta_slice_tree->Branch("reco_slice_num_pfps", & m_reco_slice_num_pfps); - ncdelta_slice_tree->Branch("reco_slice_num_showers", & m_reco_slice_num_showers); - ncdelta_slice_tree->Branch("reco_slice_num_tracks", & m_reco_slice_num_tracks); - - // ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &m_matched_signal_track_overlay_fraction); - ncdelta_slice_tree->Branch("matched_signal_track_true_E", &m_matched_signal_track_true_E); - ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &m_matched_signal_track_nuscore); - ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &m_matched_signal_track_sliceId); - ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &m_matched_signal_track_is_clearcosmic); - ncdelta_slice_tree->Branch("matched_signal_track_num", &m_matched_signal_track_num); - ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &m_matched_signal_track_is_nuslice); - ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &m_matched_signal_track_tracks_in_slice); - ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &m_matched_signal_track_showers_in_slice); - - //int m_matched_signal_total_num_slices; - ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&m_reco_1g1p_is_same_slice); - ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&m_reco_1g1p_is_nuslice); - ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&m_reco_1g1p_is_multiple_slices); - ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&m_reco_1g1p_nuscore); - ncdelta_slice_tree->Branch("is_matched_1g1p",&m_is_matched_1g1p); - - ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&m_reco_1g0p_nuscore); - ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&m_reco_1g0p_is_nuslice); - ncdelta_slice_tree->Branch("is_matched_1g0p",&m_is_matched_1g0p); - - ncdelta_slice_tree->Branch("no_matched_showers",& m_no_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_showers",& m_multiple_matched_showers); - ncdelta_slice_tree->Branch("multiple_matched_tracks",& m_multiple_matched_tracks); + void CreateSliceBranches(var_all& vars){ + vars.vertex_tree->Branch("reco_slice_nuscore",&vars.m_reco_slice_nuscore); + vars.vertex_tree->Branch("reco_slice_num",&vars.m_reco_slice_num); + vars.vertex_tree->Branch("reco_slice_shower_num_matched_signal",& vars.m_reco_slice_shower_num_matched_signal); + vars.vertex_tree->Branch("reco_slice_track_num_matched_signal",& vars.m_reco_slice_track_num_matched_signal); + + vars.ncdelta_slice_tree->Branch("matched_signal_shower_overlay_fraction", &vars.m_matched_signal_shower_overlay_fraction); + //std::vector vars.m_matched_signal_shower_conversion_length; + vars.ncdelta_slice_tree->Branch("matched_signal_shower_true_E", &vars.m_matched_signal_shower_true_E); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_nuscore", &vars.m_matched_signal_shower_nuscore); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_sliceId", &vars.m_matched_signal_shower_sliceId); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_is_clearcosmic", &vars.m_matched_signal_shower_is_clearcosmic); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_num", &vars.m_matched_signal_shower_num); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_is_nuslice", &vars.m_matched_signal_shower_is_nuslice); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_tracks_in_slice", &vars.m_matched_signal_shower_tracks_in_slice); + vars.ncdelta_slice_tree->Branch("matched_signal_shower_showers_in_slice", &vars.m_matched_signal_shower_showers_in_slice); + + vars.ncdelta_slice_tree->Branch("reco_slice_num_pfps", & vars.m_reco_slice_num_pfps); + vars.ncdelta_slice_tree->Branch("reco_slice_num_showers", & vars.m_reco_slice_num_showers); + vars.ncdelta_slice_tree->Branch("reco_slice_num_tracks", & vars.m_reco_slice_num_tracks); + + // vars.ncdelta_slice_tree->Branch("matched_signal_track_overlay_fraction", &vars.m_matched_signal_track_overlay_fraction); + vars.ncdelta_slice_tree->Branch("matched_signal_track_true_E", &vars.m_matched_signal_track_true_E); + vars.ncdelta_slice_tree->Branch("matched_signal_track_nuscore", &vars.m_matched_signal_track_nuscore); + vars.ncdelta_slice_tree->Branch("matched_signal_track_sliceId", &vars.m_matched_signal_track_sliceId); + vars.ncdelta_slice_tree->Branch("matched_signal_track_is_clearcosmic", &vars.m_matched_signal_track_is_clearcosmic); + vars.ncdelta_slice_tree->Branch("matched_signal_track_num", &vars.m_matched_signal_track_num); + vars.ncdelta_slice_tree->Branch("matched_signal_track_is_nuslice", &vars.m_matched_signal_track_is_nuslice); + vars.ncdelta_slice_tree->Branch("matched_signal_track_tracks_in_slice", &vars.m_matched_signal_track_tracks_in_slice); + vars.ncdelta_slice_tree->Branch("matched_signal_track_showers_in_slice", &vars.m_matched_signal_track_showers_in_slice); + + //int vars.m_matched_signal_total_num_slices; + vars.ncdelta_slice_tree->Branch("reco_1g1p_is_same_slice",&vars.m_reco_1g1p_is_same_slice); + vars.ncdelta_slice_tree->Branch("reco_1g1p_is_nuslice",&vars.m_reco_1g1p_is_nuslice); + vars.ncdelta_slice_tree->Branch("reco_1g1p_is_multiple_slices",&vars.m_reco_1g1p_is_multiple_slices); + vars.ncdelta_slice_tree->Branch("reco_1g1p_nuscore",&vars.m_reco_1g1p_nuscore); + vars.ncdelta_slice_tree->Branch("is_matched_1g1p",&vars.m_is_matched_1g1p); + + vars.ncdelta_slice_tree->Branch("reco_1g0p_nuscore",&vars.m_reco_1g0p_nuscore); + vars.ncdelta_slice_tree->Branch("reco_1g0p_is_nuslice",&vars.m_reco_1g0p_is_nuslice); + vars.ncdelta_slice_tree->Branch("is_matched_1g0p",&vars.m_is_matched_1g0p); + + vars.ncdelta_slice_tree->Branch("no_matched_showers",& vars.m_no_matched_showers); + vars.ncdelta_slice_tree->Branch("multiple_matched_showers",& vars.m_multiple_matched_showers); + vars.ncdelta_slice_tree->Branch("multiple_matched_tracks",& vars.m_multiple_matched_tracks); } - void ResizeSlices(size_t size){ - m_reco_slice_nuscore.resize(size,-999); - m_reco_slice_num_pfps.resize(size,0); - m_reco_slice_num_showers.resize(size,0); - m_reco_slice_num_tracks.resize(size,0); + void ResizeSlices(size_t size, var_all& vars){ + vars.m_reco_slice_nuscore.resize(size,-999); + vars.m_reco_slice_num_pfps.resize(size,0); + vars.m_reco_slice_num_showers.resize(size,0); + vars.m_reco_slice_num_tracks.resize(size,0); } - void Output_EventMeta( art::Event &evt){ + void Save_EventMeta( art::Event &evt, var_all& vars){ //Some event based properties - m_subrun_counts++; - m_number_of_events++; - m_run_number = evt.run(); - m_subrun_number = evt.subRun(); - m_event_number = evt.id().event(); + vars.m_subrun_counts++; + vars.m_number_of_events++; + vars.m_run_number = evt.run(); + vars.m_subrun_number = evt.subRun(); + vars.m_event_number = evt.id().event(); } //set the vertex for now; - void Output_PFParticleInfo( std::vector PPFPs){ + void Save_PFParticleInfo( std::vector PPFPs, var_all& vars, para_all& paras){ int pfp_size = PPFPs.size(); for(int index = 0; index < pfp_size; index++){ PandoraPFParticle* temp_p = &PPFPs[index]; - if(!(pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; - m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; - m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; - m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; + if(!(vars.pfp_w_bestnuID == temp_p->get_SliceID() && temp_p->get_IsNeutrino()) ) continue; + vars.m_vertex_pos_x = temp_p->get_Vertex_pos()[0]; + vars.m_vertex_pos_y = temp_p->get_Vertex_pos()[1]; + vars.m_vertex_pos_z = temp_p->get_Vertex_pos()[2]; // std::cout<<"Best NuScore is found, define the vertice as: ("<get_Vertex_pos()[0]<<","<get_Vertex_pos()[1]<<","<get_Vertex_pos()[2]<<")"< tmp = {m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z}; - m_reco_vertex_in_SCB = distToSCB(m_reco_vertex_dist_to_SCB,tmp); - m_reco_vertex_dist_to_active_TPC = distToTPCActive(tmp); - m_reco_vertex_dist_to_CPA = distToCPA(tmp); + std::vector tmp = {vars.m_vertex_pos_x, vars.m_vertex_pos_y, vars.m_vertex_pos_z}; + vars.m_reco_vertex_in_SCB = distToSCB(vars.m_reco_vertex_dist_to_SCB,tmp, paras); + vars.m_reco_vertex_dist_to_active_TPC = distToTPCActive(tmp, paras); + vars.m_reco_vertex_dist_to_CPA = distToCPA(tmp, paras); if(temp_p->get_IsNeutrino() ){ - m_reco_slice_num++; - m_reco_slice_nuscore.push_back(temp_p->get_NuScore()); + vars.m_reco_slice_num++; + vars.m_reco_slice_nuscore.push_back(temp_p->get_NuScore()); } } //resize slice variables size; - // this->ResizeSlices(m_reco_slice_num); + // this->ResizeSlices(vars.m_reco_slice_num); } } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index b2451d7eb..94c436745 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -10,1129 +10,65 @@ namespace single_photon { - std::map is_delta_map = { - {2224,"Delta++"}, - {2214,"Delta+"}, - {1114,"Delta-"}, - {2114,"Delta0"}, - {-2224,"Anti-Delta++"}, - {-2214,"Anti-Delta+"}, - {-1114,"Anti-Delta-"}, - {-2114,"Anti-Delta0"}}; - - std::vector> fTPCVolumes; - std::vector fActiveVolumes; - - //------- Second shower related variables ---- - int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_sss_candidate_in_nu_slice; - std::vector m_sss_candidate_num_hits; - std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_sss_candidate_num_ticks; - std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_sss_candidate_PCA; - std::vector m_sss_candidate_mean_ADC; - std::vector m_sss_candidate_ADC_RMS; - std::vector m_sss_candidate_impact_parameter; - std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - std::vector m_sss_candidate_veto_score; - std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - std::vector m_sss_candidate_mean_tick; - std::vector m_sss_candidate_max_tick; - std::vector m_sss_candidate_min_tick; - std::vector m_sss_candidate_min_wire; - std::vector m_sss_candidate_max_wire; - std::vector m_sss_candidate_mean_wire; - std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_sss_candidate_energy; - std::vector m_sss_candidate_angle_to_shower; - std::vector m_sss_candidate_closest_neighbour; - std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_sss_candidate_parent_pdg; - std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_sss_candidate_true_energy; - std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - std::vector m_sss3d_shower_start_y; - std::vector m_sss3d_shower_start_z; - std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - std::vector m_sss3d_shower_dir_y; - std::vector m_sss3d_shower_dir_z; - std::vector m_sss3d_shower_length; - std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - * calculated assuming vertex is where their mother particle decays */ - - std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - * is calced direclty using shower direction of two showers */ - - std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - * 0 if the conversion distance is 0*/ - std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - std::vector m_sss3d_shower_score; - std::vector m_sss3d_slice_nu; - std::vector m_sss3d_slice_clear_cosmic; - bool bool_make_sss_plots; - - double m_sss3d_ioc_ranked_en; - double m_sss3d_ioc_ranked_conv; - double m_sss3d_ioc_ranked_invar; - double m_sss3d_ioc_ranked_implied_invar; - double m_sss3d_ioc_ranked_ioc; - double m_sss3d_ioc_ranked_opang; - double m_sss3d_ioc_ranked_implied_opang; - int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - //same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - double m_sss3d_invar_ranked_en; - double m_sss3d_invar_ranked_conv; - double m_sss3d_invar_ranked_invar; - double m_sss3d_invar_ranked_implied_invar; - double m_sss3d_invar_ranked_ioc; - double m_sss3d_invar_ranked_opang; - double m_sss3d_invar_ranked_implied_opang; - int m_sss3d_invar_ranked_id; - - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - double m_sss2d_ioc_ranked_en; - double m_sss2d_ioc_ranked_conv; - double m_sss2d_ioc_ranked_ioc; - double m_sss2d_ioc_ranked_pca; - double m_sss2d_ioc_ranked_invar; - double m_sss2d_ioc_ranked_angle_to_shower; - int m_sss2d_ioc_ranked_num_planes; - - double m_sss2d_conv_ranked_en; - double m_sss2d_conv_ranked_conv; - double m_sss2d_conv_ranked_ioc; - double m_sss2d_conv_ranked_pca; - double m_sss2d_conv_ranked_invar; - double m_sss2d_conv_ranked_angle_to_shower; - int m_sss2d_conv_ranked_num_planes; - - double m_sss2d_invar_ranked_en; - double m_sss2d_invar_ranked_conv; - double m_sss2d_invar_ranked_ioc; - double m_sss2d_invar_ranked_pca; - double m_sss2d_invar_ranked_invar; - double m_sss2d_invar_ranked_angle_to_shower; - int m_sss2d_invar_ranked_num_planes; - - - //-------------- Flash related variables ------------- - std::vector m_reco_flash_total_pe; - std::vector m_reco_flash_time; - std::vector m_reco_flash_time_width; - std::vector m_reco_flash_abs_time; - std::vector m_reco_flash_frame; - std::vector m_reco_flash_ycenter; - std::vector m_reco_flash_ywidth; - std::vector m_reco_flash_zcenter; - std::vector m_reco_flash_zwidth; - std::vector m_reco_flash_total_pe_in_beamgate; - std::vector m_reco_flash_time_in_beamgate; - std::vector m_reco_flash_ycenter_in_beamgate; - std::vector m_reco_flash_zcenter_in_beamgate; - - int m_reco_num_flashes; - int m_reco_num_flashes_in_beamgate; - - double m_beamgate_flash_start; - double m_beamgate_flash_end; - - bool m_runCRT; - double m_DTOffset; - double m_Resolution; - std::string m_DAQHeaderProducer;//"daq" - // std::ofstream out_stream; - - double m_tpc_active_XMin; - double m_tpc_active_YMin; - double m_tpc_active_ZMin; - double m_tpc_active_XMax; - double m_tpc_active_YMax; - double m_tpc_active_ZMax; - - TRandom3 *rangen; - std::string m_shower3dLabel; - std::string m_showerKalmanLabel; - std::string m_showerKalmanCaloLabel; - std::string m_pandoraLabel; ///< The label for the pandora producer - std::string m_trackLabel; ///< The label for the track producer from PFParticles - // std::string m_sliceLabel; - std::string m_showerLabel; ///< The label for the shower producer from PFParticles - std::string m_caloLabel; ///< The label for calorimetry associations producer - std::string m_flashLabel; - std::string m_geantModuleLabel; - // std::string m_backtrackerLabel; - std::string m_hitfinderLabel; - std::string m_hitMCParticleAssnsLabel; - std::string m_potLabel; - std::string m_generatorLabel; - - - std::string m_pidLabel; ///< For PID stuff - std::string m_CRTVetoLabel; - std::string m_CRTTzeroLabel; - std::string m_CRTHitProducer; - std::string m_true_eventweight_label; - - bool m_use_PID_algorithms; - bool m_use_delaunay; - int m_delaunay_max_hits; - bool m_is_verbose; - bool m_print_out_event; - bool m_is_data; // value provided by pset - bool m_is_overlayed; - bool m_is_textgen; - bool m_run_all_pfps; - bool m_has_CRT; - bool m_fill_trees; - bool m_run_pi0_filter; //value provided by pset - bool m_run_pi0_filter_2g1p; - bool m_run_pi0_filter_2g0p; - - bool m_runPhotoNuTruth; - bool m_runTrueEventweight; - - bool m_runSelectedEvent; //if it should run only selected events - std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - std::set> m_selected_set; //set of selected events - - //SEAviwer bits - bool m_runSEAview; - double m_SEAviewPlotDistance; //parameters related to shower-like object finding - double m_SEAviewHitThreshold; - double m_SEAviewDbscanMinPts; - double m_SEAviewDbscanEps; - double m_SEAviewMaxPtsLinFit; - bool m_SEAviewMakePDF; - int m_SEAviewNumRecoShower; - int m_SEAviewNumRecoTrack; - - bool m_runSEAviewStub; - double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - double m_SEAviewStubPlotDistance; - double m_SEAviewStubDbscanMinPts; - double m_SEAviewStubDbscanEps; - bool m_SEAviewStubMakePDF; - int m_SEAviewStubNumRecoShower; - int m_SEAviewStubNumRecoTrack; - - std::string m_Spline_CV_label; //"eventweight4to4aFix" - - //SSS parameters - double m_max_conv_dist; - double m_mass_pi0_mev; - - double m_exiting_photon_energy_threshold ; - double m_exiting_proton_energy_threshold ; - - // spacecharge::SpaceCharge const * SCE; - geo::GeometryCore const * geom; - double m_work_function; //value provided by pset - double m_recombination_factor; // value provided by pset - - std::vector m_gain_mc; // value provided by pset - std::vector m_gain_data; - double m_wire_spacing; - - // int m_Cryostat; - // int m_TPC; - - double m_width_dqdx_box; // value provided by pset - double m_length_dqdx_box; - - - TTree* run_subrun_tree; - TTree* pot_tree; - TTree* vertex_tree; - TTree* eventweight_tree; - TTree* ncdelta_slice_tree; - - TTree* geant4_tree; - - TTree* true_eventweight_tree; - std::map> fmcweight; - - //------------ POT related variables -------------- - int m_number_of_events; - int m_number_of_events_in_subrun; - double m_pot_count; - int m_number_of_vertices; - - int m_run; - int m_subrun; - double m_subrun_pot; - int m_subrun_counts; - - //------------ Event Related Variables ------------- - int m_run_number; - int m_subrun_number; - int m_event_number; - double m_pot_per_event; - double m_pot_per_subrun; - - int m_test_matched_hits; - int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - std::vector m_trackstub_candidate_num_hits; - std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - std::vector m_trackstub_candidate_num_ticks; - std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - std::vector m_trackstub_candidate_PCA; - std::vector m_trackstub_candidate_mean_ADC; - std::vector m_trackstub_candidate_ADC_RMS; - std::vector m_trackstub_candidate_veto_score; - std::vector m_trackstub_candidate_mean_tick; - std::vector m_trackstub_candidate_max_tick; - std::vector m_trackstub_candidate_min_tick; - std::vector m_trackstub_candidate_min_wire; - std::vector m_trackstub_candidate_max_wire; - std::vector m_trackstub_candidate_mean_wire; - std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - std::vector m_trackstub_candidate_mean_ADC_second_half; - std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - std::vector m_trackstub_candidate_energy; - std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - std::vector m_trackstub_candidate_parent_pdg; - std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - int m_trackstub_num_candidate_groups; /* number of groups */ - std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - - - - - - - - - //------------ Vertex Related variables ------------- - int m_reco_vertex_size; - double m_vertex_pos_x; - double m_vertex_pos_y; - double m_vertex_pos_z; - double m_vertex_pos_tick; /* time tick of vertex pos */ - double m_vertex_pos_wire_p0; - double m_vertex_pos_wire_p2; - double m_vertex_pos_wire_p1; - int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - double m_reco_vertex_dist_to_CPA; - - - int m_reco_asso_showers; - - // double m_reco_vertex_to_nearest_dead_wire_plane0; - // double m_reco_vertex_to_nearest_dead_wire_plane1; - // double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - - int m_run_number_eventweight; - int m_subrun_number_eventweight; - int m_event_number_eventweight; - - double m_mcflux_nu_pos_x; - double m_mcflux_nu_pos_y; - double m_mcflux_nu_pos_z; - double m_mcflux_nu_mom_x; - double m_mcflux_nu_mom_y; - double m_mcflux_nu_mom_z; - double m_mcflux_nu_mom_E; - int m_mcflux_ntype; - int m_mcflux_ptype; - double m_mcflux_nimpwt; - double m_mcflux_dk2gen; - double m_mcflux_nenergyn; - double m_mcflux_tpx; - double m_mcflux_tpy; - double m_mcflux_tpz; - double m_mcflux_vx; - double m_mcflux_vy; - double m_mcflux_vz; - int m_mcflux_tptype; - int m_mctruth_nparticles; - int m_mctruth_particles_track_Id[k_max_mc_particles]; - int m_mctruth_particles_pdg_code[k_max_mc_particles]; - int m_mctruth_particles_mother[k_max_mc_particles]; - int m_mctruth_particles_status_code[k_max_mc_particles]; - int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - int m_mctruth_particles_daughters[100][100]; - double m_mctruth_particles_Gvx[k_max_mc_particles]; - double m_mctruth_particles_Gvy[k_max_mc_particles]; - double m_mctruth_particles_Gvz[k_max_mc_particles]; - double m_mctruth_particles_Gvt[k_max_mc_particles]; - double m_mctruth_particles_px0[k_max_mc_particles]; - double m_mctruth_particles_py0[k_max_mc_particles]; - double m_mctruth_particles_pz0[k_max_mc_particles]; - double m_mctruth_particles_e0[k_max_mc_particles]; - int m_mctruth_particles_rescatter[k_max_mc_particles]; - double m_mctruth_particles_polx[k_max_mc_particles]; - double m_mctruth_particles_poly[k_max_mc_particles]; - double m_mctruth_particles_polz[k_max_mc_particles]; - int m_mctruth_neutrino_ccnc; - int m_mctruth_neutrino_mode; - int m_mctruth_neutrino_interaction_type; - int m_mctruth_neutrino_target; - int m_mctruth_neutrino_nucleon; - int m_mctruth_neutrino_quark; - double m_mctruth_neutrino_w; - double m_mctruth_neutrino_x; - double m_mctruth_neutrino_y; - double m_mctruth_neutrino_qsqr; - bool m_gtruth_is_sea_quark; - int m_gtruth_tgt_pdg; - int m_gtruth_tgt_Z; - int m_gtruth_tgt_A; - double m_gtruth_tgt_p4_x; - double m_gtruth_tgt_p4_y; - double m_gtruth_tgt_p4_z; - double m_gtruth_tgt_p4_E; - double m_gtruth_weight; - double m_gtruth_probability; - double m_gtruth_xsec; - double m_gtruth_diff_xsec; - int m_gtruth_gphase_space; - double m_gtruth_vertex_x; - double m_gtruth_vertex_y; - double m_gtruth_vertex_z; - double m_gtruth_vertex_T; - int m_gtruth_gscatter; - int m_gtruth_gint; - int m_gtruth_res_num; - int m_gtruth_num_piplus; - int m_gtruth_num_pi0; - int m_gtruth_num_piminus; - int m_gtruth_num_proton; - int m_gtruth_num_neutron; - bool m_gtruth_is_charm; - bool m_gtruth_is_strange; - int m_gtruth_charm_hadron_pdg; - int m_gtruth_strange_hadron_pdg; - int m_gtruth_decay_mode; - double m_gtruth_gx; - double m_gtruth_gy; - double m_gtruth_gt; - double m_gtruth_gw; - double m_gtruth_gQ2; - double m_gtruth_gq2; - int m_gtruth_probe_pdg; - double m_gtruth_probe_p4_x; - double m_gtruth_probe_p4_y; - double m_gtruth_probe_p4_z; - double m_gtruth_probe_p4_E; - double m_gtruth_hit_nuc_p4_x; - double m_gtruth_hit_nuc_p4_y; - double m_gtruth_hit_nuc_p4_z; - double m_gtruth_hit_nuc_p4_E; - double m_gtruth_hit_nuc_pos; - double m_gtruth_fs_had_syst_p4_x; - double m_gtruth_fs_had_syst_p4_y; - double m_gtruth_fs_had_syst_p4_z; - double m_gtruth_fs_had_syst_p4_E; - - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - int m_CRT_veto_nhits; /* number of CRT veto hits */ - std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - double m_CRT_min_hit_time; - double m_CRT_min_hit_PE; - double m_CRT_min_hit_x; - double m_CRT_min_hit_y; - double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - std::vector m_CRT_hits_time; - std::vector m_CRT_hits_PE; - std::vector m_CRT_hits_x; - std::vector m_CRT_hits_y; - std::vector m_CRT_hits_z; - double m_CRT_dt; //time between flash and nearest CRT hit - - double m_genie_spline_weight; - double m_genie_CV_tune_weight; - - double m_photonu_weight_low; - double m_photonu_weight_high; - - - int pfp_w_bestnuID; - //------------ Track related Variables ------------- - double m_track_calo_min_dEdx; - double m_track_calo_max_dEdx; - double m_track_calo_min_dEdx_hits; - double m_track_calo_trunc_fraction; - - - int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - std::vector m_reco_track_num_daughters; - std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - std::vector m_reco_track_length; /* whole length of the reco track */ - std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - std::vector m_reco_track_diry; - std::vector m_reco_track_dirz; - std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - std::vector m_reco_track_starty; - std::vector m_reco_track_startz; - std::vector m_reco_track_endx; /* end of the track in cartesian X */ - std::vector m_reco_track_endy; - std::vector m_reco_track_endz; - std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - std::vector m_reco_track_end_dist_to_CPA; - std::vector m_reco_track_start_dist_to_CPA; - std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - std::vector m_reco_track_start_dist_to_SCB; - std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - std::vector m_reco_track_start_in_SCB; - std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - std::vector m_reco_track_calo_energy_plane1; - std::vector m_reco_track_calo_energy_plane2; - std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - std::vector m_reco_track_phi_yx; - - std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - std::vector m_reco_track_spacepoint_principal1; - std::vector m_reco_track_spacepoint_principal2; - - std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - //corresponding variables on the best plane of reco track, which is defined as such------ - //plane 2 have good hits, then plane 2 is the best-plane - // which plane of plane 0 and 1 has more good hits will be best plane - //one of 3 planes has good hits, then best-plane is set to -1 - std::vector m_reco_track_best_calo_plane; - std::vector m_reco_track_mean_dEdx_best_plane; - std::vector m_reco_track_mean_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_dEdx_end_half_best_plane; - std::vector m_reco_track_good_calo_best_plane; - std::vector> m_reco_track_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - std::vector m_reco_track_trunc_PIDA_best_plane; - std::vector> m_reco_track_resrange_best_plane; - std::vector> m_reco_track_dEdx_best_plane; - - std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - std::vector m_reco_track_mean_dEdx_end_half_p0; - std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - std::vector> m_reco_track_trunc_dEdx_p0; - std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - std::vector m_reco_track_mean_dEdx_p1; - std::vector m_reco_track_mean_dEdx_start_half_p1; - std::vector m_reco_track_mean_dEdx_end_half_p1; - std::vector m_reco_track_good_calo_p1; - std::vector> m_reco_track_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_p1; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - std::vector m_reco_track_trunc_PIDA_p1; - std::vector> m_reco_track_resrange_p1; - std::vector> m_reco_track_dEdx_p1; - - std::vector m_reco_track_mean_dEdx_p2; - std::vector m_reco_track_mean_dEdx_start_half_p2; - std::vector m_reco_track_mean_dEdx_end_half_p2; - std::vector m_reco_track_good_calo_p2; - std::vector> m_reco_track_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_p2; - std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - std::vector m_reco_track_trunc_PIDA_p2; - std::vector> m_reco_track_resrange_p2; - std::vector> m_reco_track_dEdx_p2; - - std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - std::vector m_reco_track_num_calo_hits_p1; - std::vector m_reco_track_num_calo_hits_p2; - - // vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ - // vector m_reco_track_end_to_nearest_dead_wire_plane1; - // vector m_reco_track_end_to_nearest_dead_wire_plane2; - - std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - std::vector m_sim_track_overlay_fraction; - std::vector m_sim_track_energy; - std::vector m_sim_track_mass; - std::vector m_sim_track_kinetic_energy; - std::vector m_sim_track_pdg; - std::vector m_sim_track_parent_pdg; - - std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - std::vector m_sim_track_process; - std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - std::vector m_sim_track_starty; - std::vector m_sim_track_startz; - std::vector m_sim_track_px; - std::vector m_sim_track_py; - std::vector m_sim_track_pz; - std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - std::vector m_sim_track_endy; - std::vector m_sim_track_endz; - std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - std::vector m_sim_track_trackID; - //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - ere is no shower hits, set to 999 - ere is shower hits but no track hits, set to -999 - */ - - std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - ch plane (this is a 3 element vector) */ - std::vector m_isolation_num_shr_hits_win_2cm_trk; - std::vector m_isolation_num_shr_hits_win_5cm_trk; - std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - o -999 if there is no unassociated hits or track hits on plane - */ - - std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - ch plane (this vector has 3 elements) */ - std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - std::vector m_reco_shower_num_daughters; - std::vector m_reco_shower_daughter_trackscore; - - std::vector m_reco_shower3d_exists; - std::vector m_reco_shower3d_startx; - std::vector m_reco_shower3d_starty; - std::vector m_reco_shower3d_startz; - std::vector m_reco_shower3d_dirx; - std::vector m_reco_shower3d_diry; - std::vector m_reco_shower3d_dirz; - std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - std::vector m_reco_shower3d_phi_yx; - - std::vector m_reco_shower3d_openingangle; - std::vector m_reco_shower3d_length; - std::vector m_reco_shower3d_conversion_distance; - - std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - std::vector m_reco_shower3d_implied_diry; - std::vector m_reco_shower3d_implied_dirz; - - std::vector m_reco_shower3d_energy_plane0; - std::vector m_reco_shower3d_energy_plane1; - std::vector m_reco_shower3d_energy_plane2; - - std::vector m_reco_shower3d_dEdx_plane0; - std::vector m_reco_shower3d_dEdx_plane1; - std::vector m_reco_shower3d_dEdx_plane2; - - - - std::vector m_reco_shower_startx; - std::vector m_reco_shower_starty; - std::vector m_reco_shower_startz; - std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ - std::vector m_reco_shower_start_dist_to_SCB; - std::vector m_reco_shower_start_in_SCB; - std::vector m_reco_shower_end_dist_to_active_TPC; - std::vector m_reco_shower_end_dist_to_SCB; - - std::vector m_reco_shower_dirx; /* X component of shower direction */ - std::vector m_reco_shower_diry; - std::vector m_reco_shower_dirz; - std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - std::vector m_reco_shower_phi_yx; - - std::vector m_reco_shower_openingangle; - std::vector m_reco_shower_length; - std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - std::vector m_reco_shower_implied_diry; - std::vector m_reco_shower_implied_dirz; - - std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_num_triangles_plane1; - std::vector m_reco_shower_delaunay_num_triangles_plane2; - // - // vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ - // vector m_reco_shower_start_to_nearest_dead_wire_plane1; - // vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - - std::vector m_reco_shower_flash_shortest_distz; - std::vector m_reco_shower_flash_shortest_disty; - std::vector m_reco_shower_flash_shortest_distyz; - - std::vector m_reco_shower_flash_shortest_index_z; - std::vector m_reco_shower_flash_shortest_index_y; - std::vector m_reco_shower_flash_shortest_index_yz; - - double m_flash_optfltr_pe_beam; - double m_flash_optfltr_pe_beam_tot; - double m_flash_optfltr_pe_veto; - double m_flash_optfltr_pe_veto_tot; - - std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - std::vector m_reco_shower_num_hits_plane1; - std::vector m_reco_shower_num_hits_plane2; - std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - std::vector m_reco_shower_delaunay_area_plane1; - std::vector m_reco_shower_delaunay_area_plane2; - std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - std::vector m_reco_shower_trackscore; - std::vector m_reco_shower_pfparticle_pdg; - std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - std::vector m_reco_shower_kalman_median_dEdx_plane0; - std::vector m_reco_shower_kalman_median_dEdx_plane1; - std::vector m_reco_shower_kalman_median_dEdx_plane2; - std::vector m_reco_shower_kalman_median_dEdx_allplane; - std::vector m_reco_shower_kalman_mean_dEdx_plane0; - std::vector m_reco_shower_kalman_mean_dEdx_plane1; - std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - std::vector m_sim_shower_energy; - std::vector m_sim_shower_kinetic_energy; - std::vector m_sim_shower_mass; - std::vector m_sim_shower_pdg; - std::vector m_sim_shower_trackID; - std::vector m_sim_shower_parent_pdg; - std::vector m_sim_shower_parent_trackID; - std::vector m_sim_shower_origin; - std::vector m_sim_shower_process; - std::vector m_sim_shower_end_process; - - - std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - std::vector m_sim_shower_start_y; - std::vector m_sim_shower_start_z; - std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - std::vector m_sim_shower_vertex_y; - std::vector m_sim_shower_vertex_z; - - std::vector m_sim_shower_px; - std::vector m_sim_shower_py; - std::vector m_sim_shower_pz; - std::vector m_sim_shower_is_true_shower; - std::vector m_sim_shower_best_matched_plane; - std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - 0 over all energy deposited on plane 0 by the shower */ - std::vector m_sim_shower_matched_energy_fraction_plane1; - std::vector m_sim_shower_matched_energy_fraction_plane2; - std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - int m_mctruth_num; - int m_mctruth_origin; - double m_mctruth_nu_E; - double m_mctruth_nu_vertex_x; - double m_mctruth_nu_vertex_y; - double m_mctruth_nu_vertex_z; - double m_mctruth_reco_vertex_dist; - double m_mctruth_lepton_E; - int m_mctruth_nu_pdg; - int m_mctruth_lepton_pdg; - int m_mctruth_mode ; - int m_mctruth_interaction_type ; - int m_mctruth_ccnc; - double m_mctruth_qsqr; - int m_mctruth_num_daughter_particles; - std::vector m_mctruth_daughters_pdg; - std::vector m_mctruth_daughters_E; - std::vector m_mctruth_daughters_status_code; - std::vector m_mctruth_daughters_trackID; - std::vector m_mctruth_daughters_mother_trackID; - std::vector m_mctruth_daughters_px; - std::vector m_mctruth_daughters_py; - std::vector m_mctruth_daughters_pz; - std::vector m_mctruth_daughters_startx; - std::vector m_mctruth_daughters_starty; - std::vector m_mctruth_daughters_startz; - std::vector m_mctruth_daughters_time; - std::vector m_mctruth_daughters_endx; - std::vector m_mctruth_daughters_endy; - std::vector m_mctruth_daughters_endz; - std::vector m_mctruth_daughters_endtime; - std::vector m_mctruth_daughters_process; - std::vector m_mctruth_daughters_end_process; - int m_mctruth_num_exiting_photons ; - int m_mctruth_num_exiting_protons ; - int m_mctruth_num_exiting_pi0 ; - int m_mctruth_num_exiting_pipm ; - int m_mctruth_num_exiting_neutrons; - int m_mctruth_num_exiting_delta0; - int m_mctruth_num_exiting_deltapm; - int m_mctruth_num_exiting_deltapp; - double m_mctruth_leading_exiting_proton_energy; - int m_mctruth_is_delta_radiative; - int m_mctruth_delta_radiative_1g1p_or_1g1n; - double m_mctruth_delta_photon_energy; - double m_mctruth_delta_proton_energy; - double m_mctruth_delta_neutron_energy; - std::vector m_mctruth_exiting_delta0_num_daughters; - - std::vector m_mctruth_exiting_photon_trackID; - std::vector m_mctruth_exiting_photon_mother_trackID; - std::vector m_mctruth_exiting_photon_from_delta_decay; - std::vector m_mctruth_exiting_photon_energy; - std::vector m_mctruth_exiting_photon_px; - std::vector m_mctruth_exiting_photon_py; - std::vector m_mctruth_exiting_photon_pz; - - std::vector m_mctruth_exiting_proton_trackID; - std::vector m_mctruth_exiting_proton_mother_trackID; - std::vector m_mctruth_exiting_proton_from_delta_decay; - std::vector m_mctruth_exiting_proton_energy; - std::vector m_mctruth_exiting_proton_px; - std::vector m_mctruth_exiting_proton_py; - std::vector m_mctruth_exiting_proton_pz; - - std::vector m_mctruth_exiting_neutron_trackID; - std::vector m_mctruth_exiting_neutron_mother_trackID; - std::vector m_mctruth_exiting_neutron_from_delta_decay; - std::vector m_mctruth_exiting_neutron_energy; - std::vector m_mctruth_exiting_neutron_px; - std::vector m_mctruth_exiting_neutron_py; - std::vector m_mctruth_exiting_neutron_pz; - int m_mctruth_num_reconstructable_protons; - bool m_mctruth_is_reconstructable_1g1p; - bool m_mctruth_is_reconstructable_1g0p; - - std::vector m_mctruth_exiting_pi0_E; - std::vector m_mctruth_exiting_pi0_mom; - std::vector m_mctruth_exiting_pi0_px; - std::vector m_mctruth_exiting_pi0_py; - std::vector m_mctruth_exiting_pi0_pz; - - double m_mctruth_pi0_leading_photon_energy; - std::string m_mctruth_pi0_leading_photon_end_process; - double m_mctruth_pi0_subleading_photon_energy; - std::string m_mctruth_pi0_subleading_photon_end_process; - int m_mctruth_pi0_leading_photon_exiting_TPC; - int m_mctruth_pi0_subleading_photon_exiting_TPC; - std::vector m_mctruth_pi0_subleading_photon_end; - std::vector m_mctruth_pi0_subleading_photon_start; - std::vector m_mctruth_pi0_leading_photon_end; - std::vector m_mctruth_pi0_leading_photon_start; - std::vector m_mctruth_pi0_leading_photon_mom; - std::vector m_mctruth_pi0_subleading_photon_mom; - - std::string m_truthmatching_signaldef; - - //the calo calculated quantities - std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - std::vector m_reco_shower_energy_plane1; - std::vector m_reco_shower_energy_plane2; - std::vector m_reco_shower_reclustered_energy_max; - std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - enough to it */ - std::vector m_reco_shower_reclustered_energy_plane1; - std::vector m_reco_shower_reclustered_energy_plane2; - std::vector m_reco_shower_plane0; - std::vector m_reco_shower_plane1; - std::vector m_reco_shower_plane2; - std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - std::vector m_reco_shower_plane1_nhits; - std::vector m_reco_shower_plane2_nhits; - std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - std::vector m_reco_shower_plane1_meanRMS; - std::vector m_reco_shower_plane2_meanRMS; - std::vector m_reco_shower_hit_wire; - std::vector m_reco_shower_hit_plane; - std::vector m_reco_shower_hit_tick; - std::vector m_reco_shower_spacepoint_x; - std::vector m_reco_shower_spacepoint_z; - std::vector m_reco_shower_spacepoint_y; - std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - std::vector> m_reco_shower_dQdx_plane1; - std::vector> m_reco_shower_dQdx_plane2; - std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - std::vector> m_reco_shower_dEdx_plane1; - std::vector> m_reco_shower_dEdx_plane2; - std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - std::vector m_reco_shower_dEdx_plane1_mean; - std::vector m_reco_shower_dEdx_plane2_mean; - std::vector m_reco_shower_dEdx_plane0_max; - std::vector m_reco_shower_dEdx_plane1_max; - std::vector m_reco_shower_dEdx_plane2_max; - std::vector m_reco_shower_dEdx_plane0_min; - std::vector m_reco_shower_dEdx_plane1_min; - std::vector m_reco_shower_dEdx_plane2_min; - std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - std::vector m_reco_shower_dEdx_plane1_median; - std::vector m_reco_shower_dEdx_plane2_median; - std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - std::vector m_reco_shower_angle_wrt_wires_plane1; - std::vector m_reco_shower_angle_wrt_wires_plane2; - std::vector m_reco_shower_dEdx_amalgamated; - std::vector m_reco_shower_dEdx_amalgamated_nhits; - std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - std::vector m_reco_shower_dQdx_plane1_median; - std::vector m_reco_shower_dQdx_plane2_median; - std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - std::vector m_reco_shower_dEdx_plane1_nhits; - std::vector m_reco_shower_dEdx_plane2_nhits; - double _time2cm;//value modeled from David's shower code - // related variables - std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - std::vector m_reco_track_pid_pida_plane0; - std::vector m_reco_track_pid_pida_plane1; - std::vector m_reco_track_pid_pida_plane2; - std::vector m_reco_track_pid_chi2_mu_plane0; - std::vector m_reco_track_pid_chi2_mu_plane1; - std::vector m_reco_track_pid_chi2_mu_plane2; - std::vector m_reco_track_pid_chi2_p_plane0; - std::vector m_reco_track_pid_chi2_p_plane1; - std::vector m_reco_track_pid_chi2_p_plane2; - std::vector m_reco_track_pid_three_plane_proton_pid; - - - //matching variables - int m_reco_slice_num; //total number of slices in the event - std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ - std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - std::vector m_matched_signal_shower_is_clearcosmic; - std::vector m_matched_signal_shower_is_nuslice; - std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - - //-------- for reco tracks that match to a primary proton --------- - std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - std::vector m_matched_signal_track_sliceId; - std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_is_nuslice; - std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - std::vector m_matched_signal_track_showers_in_slice; - - int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - bool m_reco_1g1p_is_same_slice; - bool m_reco_1g1p_is_multiple_slices; - bool m_reco_1g1p_is_nuslice; - bool m_reco_1g0p_is_nuslice; - double m_reco_1g1p_nuscore; - double m_reco_1g0p_nuscore; - bool m_is_matched_1g1p; - bool m_is_matched_1g0p; - bool m_no_matched_showers; - bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ - + bool g_is_verbose = true; /** * @brief: reset/clear data members */ - void ClearMeta(); - void CreateMetaBranches(); + void ClearMeta(var_all& vars); + void CreateMetaBranches(var_all& vars); - void ClearStubs(); - void CreateStubBranches(); + void ClearStubs(var_all& vars); + void CreateStubBranches(var_all& vars); - void ClearSecondShowers(); /* reset and clear variable/vectors related to second shower */ - void ResizeSecondShowers(size_t size); /* currently does nothing */ - void CreateSecondShowerBranches(); /*create branches in vertex tree for second shower related variables */ + void ClearSecondShowers(var_all& vars); /* reset and clear variable/vectors related to second shower */ +// void ResizeSecondShowers(size_t size); /* currently does nothing */ + void CreateSecondShowerBranches(var_all& vars); /*create branches in vertex tree for second shower related variables */ - void ClearSecondShowers3D(); /* reset and clear variables/vectors realted to second shower 3D */ - void CreateSecondShowerBranches3D(); /*create branches in vertex tree for second shower 3D */ + void ClearSecondShowers3D(var_all& vars); /* reset and clear variables/vectors realted to second shower 3D */ + void CreateSecondShowerBranches3D(var_all& vars); /*create branches in vertex tree for second shower 3D */ - void ClearIsolation(); /* clear vector members related to isolation */ - void CreateIsolationBranches(); /* create branches for vectors related to isolation in vertex_tree */ + void ClearIsolation(var_all& vars); /* clear vector members related to isolation */ + void CreateIsolationBranches(var_all& vars); /* create branches for vectors related to isolation in vertex_tree */ - void ClearFlashes(); /* clear and reset all the flash-related vectors/variables */ - void ResizeFlashes(size_t); /* resize flash-related vectors */ - void CreateFlashBranches(); /* create branches for flashes in vertex_tree */ + void ClearFlashes(var_all& vars); /* clear and reset all the flash-related vectors/variables */ + void ResizeFlashes(size_t size, var_all& vars); /* resize flash-related vectors */ + void CreateFlashBranches(var_all& vars); /* create branches for flashes in vertex_tree */ - void ClearTracks(); /* clear track related variable and vectors */ - void ResizeTracks(size_t); /* resize track related vectors */ - void CreateTrackBranches(); /* create track related branch in vertex tree */ + void ClearTracks(var_all& vars); /* clear track related variable and vectors */ + void ResizeTracks(size_t size, var_all& vars); /* resize track related vectors */ + void CreateTrackBranches(var_all& vars); /* create track related branch in vertex tree */ - void ClearShowers(); /* clear and reset shower related vectors/variables, for reco, and sim shower */ - void ResizeShowers(size_t); /* resize vectors related to reco, and sim showers */ - void CreateShowerBranches(); /* create branches for shower-related vec/vars in vertex_tree */ + void ClearShowers(var_all& vars); /* clear and reset shower related vectors/variables, for reco, and sim shower */ + void ResizeShowers(size_t size, var_all& vars); /* resize vectors related to reco, and sim showers */ + void CreateShowerBranches(var_all& vars); /* create branches for shower-related vec/vars in vertex_tree */ - void ClearMCTruths(); - void ResizeMCTruths(size_t); /* resize mctruth daughters vectors */ - void CreateMCTruthBranches(); + void ClearMCTruths(var_all& vars); + void ResizeMCTruths(size_t size, var_all& vars); /* resize mctruth daughters vectors */ + void CreateMCTruthBranches(var_all& vars); /** * @brief: fill event weight related variables */ void AnalyzeEventWeight(art::Event const & e ); - void ClearEventWeightBranches(); /* reset eventweight related variable */ - void CreateEventWeightBranches(); /* create branches for eventweight related variable in eventweight_tree */ + void ClearEventWeightBranches(var_all& vars); /* reset eventweight related variable */ + void CreateEventWeightBranches(var_all& vars); /* create branches for eventweight related variable in eventweight_tree */ /** * @brief: fill event weight related variables */ - void ClearGeant4Branches(var_geant4 m_collection_geant4); /* reset eventweight related variable */ - void CreateGeant4Branches(var_geant4 m_collection_geant4); /* create branches for eventweight related variable in eventweight_tree */ - void AnalyzeGeant4( const std::vector> &mcParticleVector,var_geant4 m_collection_geant4); + void ClearGeant4Branches(var_all& vars); /* reset eventweight related variable */ + void CreateGeant4Branches(var_all& vars); /* create branches for eventweight related variable in eventweight_tree */ + void AnalyzeGeant4( const std::vector> &mcParticleVector,var_all& vars); + + void ClearSlices(var_all& vars); /* reset and clear variables/vectors related to slice */ + void ResizeSlices(size_t size, var_all& vars); /* resize vectors related to slice */ + void CreateSliceBranches(var_all& vars); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - void ClearSlices(); /* reset and clear variables/vectors related to slice */ - void ResizeSlices(size_t size); /* resize vectors related to slice */ - void CreateSliceBranches(); /* create slice branches in ncdelta_slice_tree and vertex_tree */ - void Output_EventMeta( art::Event &evt); - void Output_PFParticleInfo( std::vector PPFPs); + void Save_EventMeta( art::Event &evt, var_all& vars); + void Save_PFParticleInfo( std::vector PPFPs, var_all& vars, para_all& paras); } #endif diff --git a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx index 7a46c3f21..7aadcd00d 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx @@ -13,18 +13,19 @@ namespace single_photon std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::vector & vfrac + std::vector & vfrac, + var_all& vars ){ - //if(m_is_verbose) + //if(g_is_verbose) std::cout<<"RecoMCTracks()\t||\t Begininning recob::Track Reco-MC suite on: "< track = tracks[k]; - m_sim_track_matched[i_trk] = 0; + vars.m_sim_track_matched[i_trk] = 0; if(trackToMCParticleMap.count(track)>0){ @@ -46,40 +47,40 @@ namespace single_photon //std::cout<<"the corrected end of this mcparticle is "<E(); - m_sim_track_mass[i_trk] = mcparticle->Mass(); - m_sim_track_kinetic_energy[i_trk] = m_sim_track_energy[i_trk]-m_sim_track_mass[i_trk]; - m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); - m_sim_track_process[i_trk] = mcparticle->Process(); - m_sim_track_startx[i_trk] = correctedstart[0]; - m_sim_track_starty[i_trk] = correctedstart[1]; - m_sim_track_startz[i_trk] = correctedstart[2]; + vars.m_sim_track_matched[i_trk] = 1; + vars.m_sim_track_energy[i_trk] = mcparticle->E(); + vars.m_sim_track_mass[i_trk] = mcparticle->Mass(); + vars.m_sim_track_kinetic_energy[i_trk] = vars.m_sim_track_energy[i_trk]-vars.m_sim_track_mass[i_trk]; + vars.m_sim_track_pdg[i_trk] = mcparticle->PdgCode(); + vars.m_sim_track_process[i_trk] = mcparticle->Process(); + vars.m_sim_track_startx[i_trk] = correctedstart[0]; + vars.m_sim_track_starty[i_trk] = correctedstart[1]; + vars.m_sim_track_startz[i_trk] = correctedstart[2]; - m_sim_track_endx[i_trk]= correctedend[0]; - m_sim_track_endy[i_trk]= correctedend[1]; - m_sim_track_endz[i_trk]= correctedend[2]; + vars.m_sim_track_endx[i_trk]= correctedend[0]; + vars.m_sim_track_endy[i_trk]= correctedend[1]; + vars.m_sim_track_endz[i_trk]= correctedend[2]; - m_sim_track_length[i_trk]= sqrt(pow( m_sim_track_endx[i_trk] - m_sim_track_startx[i_trk], 2)+ pow( m_sim_track_endy[i_trk] - m_sim_track_starty[i_trk], 2) + pow( m_sim_track_endz[i_trk] - m_sim_track_startz[i_trk], 2)); + vars.m_sim_track_length[i_trk]= sqrt(pow( vars.m_sim_track_endx[i_trk] - vars.m_sim_track_startx[i_trk], 2)+ pow( vars.m_sim_track_endy[i_trk] - vars.m_sim_track_starty[i_trk], 2) + pow( vars.m_sim_track_endz[i_trk] - vars.m_sim_track_startz[i_trk], 2)); - m_sim_track_px[i_trk]= mcparticle->Px(); - m_sim_track_py[i_trk]= mcparticle->Py(); - m_sim_track_pz[i_trk]= mcparticle->Pz(); + vars.m_sim_track_px[i_trk]= mcparticle->Px(); + vars.m_sim_track_py[i_trk]= mcparticle->Py(); + vars.m_sim_track_pz[i_trk]= mcparticle->Pz(); - m_sim_track_origin[i_trk] = mctruth->Origin(); - m_sim_track_trackID[i_trk] = mcparticle->TrackId(); - m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; + vars.m_sim_track_origin[i_trk] = mctruth->Origin(); + vars.m_sim_track_trackID[i_trk] = mcparticle->TrackId(); + vars.m_sim_track_overlay_fraction[i_trk] = vfrac[i_trk]; - m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_track_sliceId[i_trk]] ; - m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + vars.m_sim_track_sliceId[i_trk] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + vars.m_sim_track_nuscore[i_trk] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ vars.m_sim_track_sliceId[i_trk]] ; + vars.m_sim_track_isclearcosmic[i_trk] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; if(mcparticle->Mother()>=(int)mcParticleVector.size()){ - m_sim_track_parent_pdg[i_trk] = -1; + vars.m_sim_track_parent_pdg[i_trk] = -1; }else{ - m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); + vars.m_sim_track_parent_pdg[i_trk] = mcParticleVector[mcparticle->Mother()]->PdgCode(); } } @@ -95,7 +96,9 @@ namespace single_photon std::map,art::Ptr>& showerToMCParticleMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap){ + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + var_all& vars + ){ std::vector vec_fraction_matched; //processes that are "showery" @@ -109,13 +112,11 @@ namespace single_photon std::vector spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); //for each recob::track/shower in the event - bool default_verbose = m_is_verbose; - m_is_verbose = false; for(size_t i=0; i pfp = ppfp->pPFParticle; @@ -214,8 +215,8 @@ namespace single_photon double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)obj_hits_ptrs.size(); - if(m_is_verbose)std::cout << "recoMC()\t||\t On Object "< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"< "< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Process()=="primary"){ //if its primary, great! Note it. - if(m_is_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<EndProcess()<<"! breaking"<= 0){ //Guanqun: this line here doesn't really cosider other break cases than finding primary particle - if(m_is_verbose) std::cout<<"L1: ("< "<PdgCode()<<" and status code "<StatusCode()< "<PdgCode()<<" and status code "<StatusCode()< mother = marks_mother_vector[p]; std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(m_is_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ best_mother_index = p; @@ -410,7 +411,7 @@ namespace single_photon // now have found the best mother of the shower - if(m_is_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; std::vector corrected_vertex(3), corrected_start(3); @@ -420,66 +421,66 @@ namespace single_photon if(match->PdgCode()==22){ // if it's a gamma std::vector tmp ={match->EndX(), match->EndY(), match->EndZ()}; spacecharge_correction(match, corrected_start, tmp ); - m_sim_shower_is_true_shower[i] = 1; + vars.m_sim_shower_is_true_shower[i] = 1; }else if(abs(match->PdgCode())==11){ // if it's e+/e- spacecharge_correction(match, corrected_start); - m_sim_shower_is_true_shower[i] = 1; + vars.m_sim_shower_is_true_shower[i] = 1; }else{ corrected_start = {-999,-999,-999}; - m_sim_shower_is_true_shower[i] = 0; + vars.m_sim_shower_is_true_shower[i] = 0; } art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; if (match_mother.isNull()){ - m_sim_shower_parent_pdg[i] = -1; - m_sim_shower_parent_trackID[i] = -1; + vars.m_sim_shower_parent_pdg[i] = -1; + vars.m_sim_shower_parent_trackID[i] = -1; }else{ - m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); - m_sim_shower_parent_trackID[i] = match_mother->TrackId(); + vars.m_sim_shower_parent_pdg[i] = match_mother->PdgCode(); + vars.m_sim_shower_parent_trackID[i] = match_mother->TrackId(); } - m_sim_shower_matched[i] = 1; - m_sim_shower_energy[i] = match->E(); - m_sim_shower_mass[i] = match->Mass(); - m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); - m_sim_shower_pdg[i] = match->PdgCode(); - m_sim_shower_trackID[i] = match->TrackId(); - m_sim_shower_process[i] = match->Process(); - m_sim_shower_end_process[i] = match->EndProcess(); - m_sim_shower_vertex_x[i] = corrected_vertex[0]; - m_sim_shower_vertex_y[i] = corrected_vertex[1]; - m_sim_shower_vertex_z[i] =corrected_vertex[2]; + vars.m_sim_shower_matched[i] = 1; + vars.m_sim_shower_energy[i] = match->E(); + vars.m_sim_shower_mass[i] = match->Mass(); + vars.m_sim_shower_kinetic_energy[i] = match->E()-match->Mass(); + vars.m_sim_shower_pdg[i] = match->PdgCode(); + vars.m_sim_shower_trackID[i] = match->TrackId(); + vars.m_sim_shower_process[i] = match->Process(); + vars.m_sim_shower_end_process[i] = match->EndProcess(); + vars.m_sim_shower_vertex_x[i] = corrected_vertex[0]; + vars.m_sim_shower_vertex_y[i] = corrected_vertex[1]; + vars.m_sim_shower_vertex_z[i] =corrected_vertex[2]; - m_sim_shower_start_x[i] = corrected_start[0]; - m_sim_shower_start_y[i] = corrected_start[1]; - m_sim_shower_start_z[i] =corrected_start[2]; + vars.m_sim_shower_start_x[i] = corrected_start[0]; + vars.m_sim_shower_start_y[i] = corrected_start[1]; + vars.m_sim_shower_start_z[i] =corrected_start[2]; - m_sim_shower_px[i] = match->Px(); - m_sim_shower_py[i] = match->Py(); - m_sim_shower_pz[i] = match->Pz(); + vars.m_sim_shower_px[i] = match->Px(); + vars.m_sim_shower_py[i] = match->Py(); + vars.m_sim_shower_pz[i] = match->Pz(); // should've use 'best_mother_plane' here - m_sim_shower_best_matched_plane[i] = best_mother_index; - m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; - m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; - m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; + vars.m_sim_shower_best_matched_plane[i] = best_mother_index; + vars.m_sim_shower_matched_energy_fraction_plane0[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][0]/total_energy_on_plane[0]; + vars.m_sim_shower_matched_energy_fraction_plane1[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][1]/total_energy_on_plane[1]; + vars.m_sim_shower_matched_energy_fraction_plane2[i] = marks_mother_energy_fraction_map[marks_mother_vector[best_mother_index]][2]/total_energy_on_plane[2]; - m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; + vars.m_sim_shower_overlay_fraction[i] = fraction_num_hits_overlay; mcParticleVector.push_back(match); showerToMCParticleMap[shower] = mcParticleVector.back(); - m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; - m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ m_sim_shower_sliceId[i]] ; - m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; - m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; + vars.m_sim_shower_sliceId[i] = ppfp->get_SliceID();//PFPToSliceIdMap[pfp]; + vars.m_sim_shower_nuscore[i] = ppfp->get_NuScore();//sliceIdToNuScoreMap[ vars.m_sim_shower_sliceId[i]] ; + vars.m_sim_shower_isclearcosmic[i] = ppfp->get_IsClearCosmic();//PFPToClearCosmicMap[pfp]; + vars.m_sim_shower_is_nuslice[i] = ppfp->get_IsNuSlice();//PFPToNuSliceMap[pfp]; // if(marks_mother_vector.size()!=0){ - // //if(m_is_verbose) std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< spacers = Printer_header({"pfpID", " matched_#simb", " pdg"," E_plane0"," E_plane1"," E_plane2"," cosmic?"}); // std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<Self()<Self()), @@ -500,10 +501,9 @@ namespace single_photon std::to_string(ppfp->get_IsClearCosmic()) },spacers); - if (m_is_verbose) std::cout<<"looking at pfp "<< pfp->Self()<<" with is matched to true particle with pdg m_sim_shower_pdg[i]= "<< m_sim_shower_pdg[i]<< ". is_nuslice = "<< m_sim_shower_is_nuslice[i]<<" in slice "<< m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<Self()<<" with is matched to true particle with pdg vars.m_sim_shower_pdg[i]= "<< vars.m_sim_shower_pdg[i]<< ". is_nuslice = "<< vars.m_sim_shower_is_nuslice[i]<<" in slice "<< vars.m_sim_shower_sliceId[i]<<". The matched energy for this shower from mark's mother particle with pdg "<PdgCode()<< " is "<,art::Ptr>& objectToPFParticleMap, std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector){ + std::vector>& mcParticleVector, + var_all& vars ){ std::vector trk_overlay_vec; std::vector vec_fraction_matched; @@ -618,7 +619,7 @@ namespace single_photon // mcParticleVector.push_back(0); } vec_fraction_matched.push_back(maxe/tote); - // if(m_is_verbose){ + // if(g_is_verbose){ // std::cout << "recoMC()\t||\t the fracrion matched is "<, art::Ptr> & MCParticleToMCTruthMap, std::vector> & mcParticleVector, std::map< int, art::Ptr > & MCParticleToTrackIdMap, - std::vector & vfrac + std::vector & vfrac, + var_all& vars ); //recoMCmatching but specifically for recob::showers @@ -34,7 +36,9 @@ namespace single_photon std::map,art::Ptr>& showerToMCParticleMap, art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, - std::map< int ,art::Ptr > & MCParticleToTrackIdMap); + std::map< int ,art::Ptr > & MCParticleToTrackIdMap, + var_all& vars + ); @@ -50,7 +54,9 @@ namespace single_photon std::map,art::Ptr>& objectToPFParticleMap, std::map, std::vector> >& pfParticleToHitsMap, art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector); + std::vector>& mcParticleVector, + var_all& vars + ); int photoNuclearTesting(std::vector>& mcParticleVector); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx index 835878917..bc6dd028d 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.cxx @@ -18,1030 +18,1033 @@ namespace single_photon { - TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; - std::vectorall_wire; // wire of all hits - std::vectorall_tick; - std::vectorall_dist; // distance to vertex of all hits + std::vectorall_wire; // wire of all hits + std::vectorall_tick; + std::vectorall_dist; // distance to vertex of all hits - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - std::vector sorted_in = sort_indexes(all_dist); // index of all dist in descending order - size_t max_e = std::min((size_t)Npts,hitz.size()); + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } - for(size_t i =0; i sorted_in = sort_indexes(all_dist); // index of all dist in descending order + size_t max_e = std::min((size_t)Npts,hitz.size()); - return new TGraph(t_wire.size(),&t_wire[0],&t_tick[0]); + for(size_t i =0; i> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - sss_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; + return new TGraph(t_wire.size(),&t_wire[0],&t_tick[0]); + } - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; + sss_score ScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + sss_score score(p,cl); + score.n_hits = hits.size(); - score.pass = true; + std::vector t_wires; + std::vector t_ticks; - // ************* Some simple metrics relative to study point (usually vertex) *************** - // this can be moved to inclass initializer - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; + score.pass = true; - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; + // ************* Some simple metrics relative to study point (usually vertex) *************** + // this can be moved to inclass initializer + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; - score.n_wires = 0; - score.n_ticks = 0; + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; - score.impact_parameter = -99; + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; - score.close_tick = -99; - score.close_wire = -99; + score.n_wires = 0; + score.n_ticks = 0; - std::map wire_count; - std::map tick_count; + score.impact_parameter = -99; - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; + score.close_tick = -99; + score.close_wire = -99; - score.mean_wire += h_wire; - score.mean_tick += h_tick; + std::map wire_count; + std::map tick_count; - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); + score.mean_wire += h_wire; + score.mean_tick += h_tick; - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - //wierd dits - //requires that hit in hits has to be on the same plane as vertex_wire. - double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + //wierd dits + //requires that hit in hits has to be on the same plane as vertex_wire. + double dd =sqrt(pow(h_wire*0.3-vertex_wire*0.3,2)+pow(h_tick/25.0- vertex_tick/25.0,2)); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - } + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; + } - score.mean_dist = score.mean_dist/(double)score.n_hits; + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA + score.mean_dist = score.mean_dist/(double)score.n_hits; - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SSS\t||\tEigen: "<GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - score.pca_theta = atan((*covar)[0][0]/(*covar)[0][1])*180.0/3.14159; + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } + double slope = ((*covar)[0][0]/(*covar)[0][1]); + double c = score.mean_tick*mod_wire - slope*score.mean_wire/mod_tick; + score.impact_parameter = fabs(slope*vertex_wire*mod_wire +vertex_tick/mod_tick+c)/sqrt(slope*slope+1.0*1.0); + if(score.n_wires < n_min_wires || score.n_ticks < n_min_ticks || score.pca_0 >= n_max_pca){ + score.pass = false; + } - delete principal; - return score; - } - int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + delete principal; + return score; + } - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); - std::vector> showerhits = pfParticleToHitsMap.at(pfp); + int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); + std::vector> showerhits = pfParticleToHitsMap.at(pfp); - for(auto &sh: showerhits){ + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); - if(sh->View() != hit->View()) continue; - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); + for(auto &sh: showerhits){ + if(sh->View() != hit->View()) continue; - double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } - } + double dist = sqrt(pow(sh_wire*0.3-h_wire*0.3,2)+pow(sh_tick/25.0-h_tick/25.0,2)); - } + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } - if(in_primary_shower){ - return (int)s; - } } + } - return -1; + if(in_primary_shower){ + return (int)s; + } } + return -1; + } - std::vectorSecondShowerMatching( + + + std::vectorSecondShowerMatching( std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, -// std::map< size_t, art::Ptr> & pfParticleIdMap, - std::map< int ,art::Ptr> & MCParticleToTrackIdMap - ){ - - - std::vector ans; //matched,pdg,parentpdg,trkid - - - std::vector vec_fraction_matched; - std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; - bool reco_verbose = false; - - std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy - - //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP - //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle - double maxe=-1, tote=0; - - std::vector total_energy_on_plane = {0.0,0.0,0.0}; - art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate - std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster - std::vector match_vec; //vector of some backtracker thing - - int n_associated_mcparticle_hits = 0; - int n_not_associated_hits = 0; - - //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated - std::vector> asso_mcparticles_vec; - std::map, std::vector> map_asso_mcparticles_energy; - bool found_a_match = false; - - //loop only over hits associated to this reco PFP - for(size_t i_h=0; i_h < hitz.size(); ++i_h){ - int which_plane = (int)hitz[i_h]->View(); - particle_vec.clear(); match_vec.clear(); //only store per hit - //for the hit, fill the backtracker info - mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); - - //if there is an MCParticle associated to this hit - if(particle_vec.size()>0) n_associated_mcparticle_hits++; - if(particle_vec.size()==0) n_not_associated_hits++; - - //for each MCParticle associated with this hit - for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id - - //if the id isn't already in the map, store it in the vector of all associated MCParticles - if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ - asso_mcparticles_vec.push_back(particle_vec[i_p]); - map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; - }else{ - map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; - } - //add the energy of the back tracked hit to the total energy for the PFP - tote += match_vec[i_p]->energy; //calculate total energy deposited - total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; - - //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP - //TODO: this part will change once the parts below are fully implemented - if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum - maxe = objide[ particle_vec[i_p]->TrackId() ]; - best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor - found_a_match = true;//will be false for showers from overlay - } - }//end loop over particles per hit - - } // end loop over hit - if(found_a_match){ - std::cout<<"Found a match!"<& mcparticles_per_hit, + std::vector>& mcParticleVector, + // std::map< size_t, art::Ptr> & pfParticleIdMap, + std::map< int ,art::Ptr> & MCParticleToTrackIdMap, + var_all& vars){ + + + std::vector ans; //matched,pdg,parentpdg,trkid + + + std::vector vec_fraction_matched; + std::map map_is_shower_process = {{"compt",true},{"FastScintillation",true},{"eBrem",true},{"phot",true},{"eIoni",true},{"conv",true},{"annihil",true}}; + bool reco_verbose = false; + + std::unordered_map objide; //map between the MCParticle track ID and the backtracker energy + + //energy for an MCParticle that comprises the most energy when sum over associated hits in PFP + //total energy of the reco PFP taken from the sum of the hits associated to an MCParticle + double maxe=-1, tote=0; + + std::vector total_energy_on_plane = {0.0,0.0,0.0}; + art::Ptr best_matched_mcparticle; //pointer for the MCParticle match we will calculate + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the cluster + std::vector match_vec; //vector of some backtracker thing + + int n_associated_mcparticle_hits = 0; + int n_not_associated_hits = 0; + + //this is the vector that will store the associated MC paritcles, as well as a MAP to the amount of energy associated + std::vector> asso_mcparticles_vec; + std::map, std::vector> map_asso_mcparticles_energy; + bool found_a_match = false; + + //loop only over hits associated to this reco PFP + for(size_t i_h=0; i_h < hitz.size(); ++i_h){ + int which_plane = (int)hitz[i_h]->View(); + particle_vec.clear(); match_vec.clear(); //only store per hit + //for the hit, fill the backtracker info + mcparticles_per_hit.get(hitz[i_h].key(), particle_vec, match_vec); + + //if there is an MCParticle associated to this hit + if(particle_vec.size()>0) n_associated_mcparticle_hits++; + if(particle_vec.size()==0) n_not_associated_hits++; + + //for each MCParticle associated with this hit + for(size_t i_p=0; i_pTrackId()] += match_vec[i_p]->energy; //store energy per track id + + //if the id isn't already in the map, store it in the vector of all associated MCParticles + if(std::find(asso_mcparticles_vec.begin(), asso_mcparticles_vec.end(), particle_vec[i_p]) == asso_mcparticles_vec.end()){ + asso_mcparticles_vec.push_back(particle_vec[i_p]); + map_asso_mcparticles_energy[particle_vec[i_p]] = {0.0,0.0,0.0}; + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] = match_vec[i_p]->energy; + }else{ + map_asso_mcparticles_energy[particle_vec[i_p]][which_plane] += match_vec[i_p]->energy; } - double fraction_num_hits_overlay = (double)n_not_associated_hits/(double)hitz.size(); - - // if(reco_verbose)std::cout << "recoMC()\t||\t On Object "<> mother_MCP_map; //map between MCP track id and the source MCP - - std::vector> marks_mother_vector; - std::map, std::vector> marks_mother_energy_fraction_map; - - int this_mcp_id = -1; //the track id for the current MCP in parent tree - int last_mcp_id = -1; //the track id for the previous MCP in parent tree - int i_mcp = 0; - - int num_bt_mothers =0; - - //reco_verbose = false; - //for each MCP that's associated to the reco shower - for(auto mcp:asso_mcparticles_vec){ - - if(reco_verbose) std::cout<<"-----------------------------Start L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"<TrackId(); - last_mcp_id = this_mcp_id;//initialize the previous one - - //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower - //currently it keeps going until it hits the top of the interaction chain, but this is likely too far - //to do a proper match you need to check for different cases and stop once one is fulfilled - while(this_mcp_id >= 0 ){ - art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID - // std::cout<<"going up the tree got mother particle"< "< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); - - //Check to see if this MCP was created in a "showery" process - if(map_is_shower_process.count(this_mcp->Process()) > 0){ - //if it was, keep going, - - }else if(this_mcp->Process()=="primary"){ - //if its primary, great! Note it. - if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<energy; //calculate total energy deposited + total_energy_on_plane[which_plane]+=match_vec[i_p]->energy; + + //want the MCParticle with the max total energy summed from the back tracker hit energy from hits in PFP + //TODO: this part will change once the parts below are fully implemented + if( objide[ particle_vec[i_p]->TrackId()] > maxe ){ //keep track of maximum + maxe = objide[ particle_vec[i_p]->TrackId() ]; + best_matched_mcparticle = particle_vec[i_p]; //we will now define the best match as a source MCP rather than the max single energy contributor + found_a_match = true;//will be false for showers from overlay + } + }//end loop over particles per hit - //if the MCP at the top of the interaction chain has a valid track id store this in the mother map - if (this_mcp_id >= 0){ + } // end loop over hit + if(found_a_match){ + std::cout<<"Found a match!"<> mother_MCP_map; //map between MCP track id and the source MCP - } + std::vector> marks_mother_vector; + std::map, std::vector> marks_mother_energy_fraction_map; - if(reco_verbose) std::cout<<"-----------------------------End L1 Loop --------------------------------------------------"< "<PdgCode()<<" and status code "<StatusCode()<<" TrackID: "<TrackId()< "<Mother()<<" and there are "<NumberDaughters()<<" daughters"< mother = marks_mother_vector[p]; - std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; - if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"<TrackId(); + last_mcp_id = this_mcp_id;//initialize the previous one - if( mother_energy_recod[0] > best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[0]; - best_mother_plane = 0; - } + //while the track id is valid, move up the parent tree for the MCP that contributes to the reco shower + //currently it keeps going until it hits the top of the interaction chain, but this is likely too far + //to do a proper match you need to check for different cases and stop once one is fulfilled + while(this_mcp_id >= 0 ){ + art::Ptr this_mcp = MCParticleToTrackIdMap[this_mcp_id];//get the MCP associated to the track ID + // std::cout<<"going up the tree got mother particle"< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[1]; - best_mother_plane = 1; - } + //check if it's a valid MCP + if (this_mcp.isNull()){ + // if(reco_verbose) std::cout<<"L1: ("< "< best_mother_energy){ - best_mother_index = p; - best_mother_energy = mother_energy_recod[2]; - best_mother_plane = 2; - } + //If primary particle will have process "primary" + // if(reco_verbose) std::cout<<"L1: ("< "<PdgCode()<<", and status code "<StatusCode()<<" and Mother: "<Mother()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<Mother(); + //Check to see if this MCP was created in a "showery" process + if(map_is_shower_process.count(this_mcp->Process()) > 0){ + //if it was, keep going, + + }else if(this_mcp->Process()=="primary"){ + //if its primary, great! Note it. + if(reco_verbose) std::cout<<"L1: Backtracked to primary! breaking"<EndProcess()<<"! breaking"<PdgCode()<<" at "<PdgCode()<<" at "<= 0){ + + mother_MCP_map[this_mcp_id] = MCParticleToTrackIdMap[this_mcp_id];//putting it in a map allows for multiple contributing MCP's in the reco shower to have the same mother MCP + + bool is_old = false; + + for(size_t k=0; k< marks_mother_vector.size(); k++){ + //if its in it before, just run with it + if(marks_mother_vector[k]==MCParticleToTrackIdMap[this_mcp_id]){ + marks_mother_energy_fraction_map[marks_mother_vector[k]][0] += map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][1] += map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector[k]][2] += map_asso_mcparticles_energy[mcp][2]; + is_old = true; + break; + } + } + if(is_old==false){ + marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); + marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; + marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][1] = map_asso_mcparticles_energy[mcp][1]; + marks_mother_energy_fraction_map[marks_mother_vector.back()][2] = map_asso_mcparticles_energy[mcp][2]; } - if(reco_verbose) std::cout<<"---------------------------- L2-------------------------------"< match = marks_mother_vector[best_mother_index]; + num_bt_mothers++; + } else{ + if(reco_verbose) std::cout<<"L1: error, the mother mother id was "< corrected_vertex(3), corrected_start(3); - spacecharge_correction(match, corrected_vertex); + } + if(reco_verbose) std::cout<<"-----------------------------End L1 Loop --------------------------------------------------"< match_mother = MCParticleToTrackIdMap[match->Mother()]; - int par_pdg = -1; - if (match_mother.isNull()){ - par_pdg = -1; + //reco_verbose = true; + //there should be at least 1 mother MCP + if(reco_verbose) std::cout<<"recoMC()\t||\t the number of source mother particles is "<PdgCode(); - } + if(reco_verbose) std::cout<<"---------------------------- L2-------------------------------"<PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; + double best_mother_index = 0; + double best_mother_energy = -9999; + int best_mother_plane = -99; - return ans; - }//end sss matching; + for(size_t p=0; p< marks_mother_vector.size(); p++){ + art::Ptr mother = marks_mother_vector[p]; + std::vector mother_energy_recod = marks_mother_energy_fraction_map[mother]; + if(reco_verbose) std::cout<<"L2: Mother candidate "<TrackId()<<" Process: "<Process()<<" EndProcess: "<EndProcess()<E()<<" Reco'd Energy: "<E())*100.0<<"% , "<E())*100.0<<"% , "<E())*100.0<<"% )"< best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[0]; + best_mother_plane = 0; + } + + if( mother_energy_recod[1] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[1]; + best_mother_plane = 1; + } + + if( mother_energy_recod[2] > best_mother_energy){ + best_mother_index = p; + best_mother_energy = mother_energy_recod[2]; + best_mother_plane = 2; + } + + } + + if(marks_mother_vector.size()!=0){ + //if(reco_verbose) std::cout<<"recoMC()\t||\t The `BEST` mother is a "<PdgCode()<<" at "<PdgCode()<<" at "< match = marks_mother_vector[best_mother_index]; + std::vector corrected_vertex(3), corrected_start(3); + spacecharge_correction(match, corrected_vertex); + + + art::Ptr match_mother = MCParticleToTrackIdMap[match->Mother()]; + int par_pdg = -1; + if (match_mother.isNull()){ + par_pdg = -1; + + }else{ + par_pdg = match_mother->PdgCode(); + } + + ans = {1,(double)match->PdgCode(), (double)par_pdg, (double)match->TrackId(), match->E(), fraction_num_hits_overlay, best_mother_energy/total_energy_on_plane.at(best_mother_plane)}; + + return ans; + }//end sss matching; - //************************************************ Shower Search Slice Second SSS3D ********** / + //************************************************ Shower Search Slice Second SSS3D ********** / - void SecondShowerSearch3D( - std::vector> & showers, - std::map, art::Ptr> & NormalShowerToPFParticleMap, - std::vector> & tracks, - std::map, - art::Ptr> & NormalTrackToPFParticleMap, - art::Event const & evt ){ - std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" WARNING, should check this! - art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); - std::vector> allShowerVector; - art::fill_ptr_vector(allShowerVector,allShowerHandle); - std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, std::vector> > showerToHitsMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); + void SecondShowerSearch3D( + std::vector> & showers, + std::map, art::Ptr> & NormalShowerToPFParticleMap, + std::vector> & tracks, + std::map, + art::Ptr> & NormalTrackToPFParticleMap, + art::Event const & evt, + var_all& vars, + para_all& paras + ){ + + std::string sss3dlabel = "pandoraShower";//"pandoraAllOutcomesShower" WARNING, should check this! + + art::ValidHandle> const & allShowerHandle = evt.getValidHandle>(sss3dlabel); + std::vector> allShowerVector; + art::fill_ptr_vector(allShowerVector,allShowerHandle); + std::cout<<"We have "< hits_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, std::vector> > showerToHitsMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToHitsMap[allShowerVector[i]] = hits_per_shower.at(allShowerVector[i].key()); + } + + art::FindOneP pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); + std::map, art::Ptr > showerToPFParticleMap; + for(size_t i=0; i< allShowerVector.size(); ++i){ + showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); + } + + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); + std::vector> allPFParticleVector; + art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); + + //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); + //pfPartToMetadataAssoc.at(pfp.key()); + + size_t n_all_shr = allShowerVector.size(); + vars.m_sss3d_num_showers = (int)n_all_shr-showers.size(); + + if(showers.size()==0) return; + + auto primary_shower = showers.front(); + + std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(vars.m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(vars.m_vertex_pos_z - shr->ShowerStart().Z(),2) ); + if(dist>paras.s_max_conv_dist) continue; + + auto pfp = showerToPFParticleMap[shr]; + //for(auto &prr: allPFParticleVector){ + // std::cout<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; + + /* + std::vector> metadatas = pfPartToMetadataAssoc.at(pfp.key()); + for(auto &meta: metadatas){ + std::map propertiesmap = meta->GetPropertiesMap(); + + for (auto it:propertiesmap ){ + std::cout<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); + //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"< pfparticle_per_shower(allShowerHandle, evt, sss3dlabel); - std::map, art::Ptr > showerToPFParticleMap; - for(size_t i=0; i< allShowerVector.size(); ++i){ - showerToPFParticleMap[allShowerVector[i]] = pfparticle_per_shower.at(allShowerVector[i].key()); + for(auto &s: tracks){ + //const art::Ptr s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); + //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ + //std::cout<<"Its a match!"<> const & pfParticleHandle = evt.getValidHandle>("pandora");//""pandoraPatRec:allOutcomes"); - std::vector> allPFParticleVector; - art::fill_ptr_vector(allPFParticleVector,pfParticleHandle); + double senergy = std::max( CalcEShowerPlane(showerToHitsMap[shr], 0, paras), std::max( CalcEShowerPlane(showerToHitsMap[shr], 1, paras), CalcEShowerPlane(showerToHitsMap[shr], 2, paras)) ); + double invar = implied_invar_mass(vars.m_vertex_pos_x, vars.m_vertex_pos_y, vars.m_vertex_pos_z, primary_shower, vars.m_reco_shower_energy_max[0], shr, senergy); + double implied_invar = invar_mass(primary_shower, vars.m_reco_shower_energy_max[0], shr, senergy) ; + double shr_score = 0.0; //need pfp and metadata to get score, and might give slice! (This will be harder..) but on reflection, kinda important. PCA spread might be a good rplacement. + int is_clear_cosmic_slice = 0 ; + int is_nu_slice = 0; + + + vars.m_sss3d_shower_start_x.push_back(shr->ShowerStart().X()); + vars.m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); + vars.m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); + vars.m_sss3d_shower_dir_x.push_back(shr->Direction().X()); + vars.m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); + vars.m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); + vars.m_sss3d_shower_length.push_back(shr->Length()); + vars.m_sss3d_shower_conversion_dist.push_back(dist); + vars.m_sss3d_shower_invariant_mass.push_back(invar); + vars.m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); + double imp = impact_paramater_shr(vars.m_vertex_pos_x, vars.m_vertex_pos_y, vars.m_vertex_pos_z, shr); + vars.m_sss3d_shower_impact_parameter.push_back(imp); + + if(dist!=0) { + vars.m_sss3d_shower_ioc_ratio.push_back(imp/dist); + }else{ + vars.m_sss3d_shower_ioc_ratio.push_back(0); - //art::FindManyP< larpandoraobj::PFParticleMetadata > pfPartToMetadataAssoc(pfParticleHandle, evt, "pandora");//PatRec:allOutcomes"); - //pfPartToMetadataAssoc.at(pfp.key()); + } + vars.m_sss3d_shower_energy_max.push_back(senergy); + vars.m_sss3d_shower_score.push_back(shr_score); + vars.m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); + vars.m_sss3d_slice_nu.push_back(is_nu_slice); + } - size_t n_all_shr = allShowerVector.size(); - m_sss3d_num_showers = (int)n_all_shr-showers.size(); + return; + } - if(showers.size()==0) return; - auto primary_shower = showers.front(); - std::cout<<"PandoraAllOutcomesShower has "<ShowerStart().X(),2)+pow(m_vertex_pos_y - shr->ShowerStart().Y(),2)+pow(m_vertex_pos_z - shr->ShowerStart().Z(),2) ); - if(dist>m_max_conv_dist) continue; + void SimpleSecondShowerCluster(var_all& vars, para_all& paras){ + + std::string base = "sss3d_"; + std::vector mod = {"ioc_ranked","invar_ranked"}; + + vars.m_sss3d_ioc_ranked_en = -9; + vars.m_sss3d_ioc_ranked_conv = -9; + vars.m_sss3d_ioc_ranked_invar = -9; + vars.m_sss3d_ioc_ranked_implied_invar = -9; + vars.m_sss3d_ioc_ranked_ioc = -9; + vars.m_sss3d_ioc_ranked_opang = -9; + vars.m_sss3d_ioc_ranked_implied_opang = -9; + vars.m_sss3d_ioc_ranked_id = -9; + + vars.m_sss3d_invar_ranked_en = -9; + vars.m_sss3d_invar_ranked_conv = -9; + vars.m_sss3d_invar_ranked_invar = -9; + vars.m_sss3d_invar_ranked_implied_invar = -9; + vars.m_sss3d_invar_ranked_ioc = -9; + vars.m_sss3d_invar_ranked_opang = -9; + vars.m_sss3d_invar_ranked_implied_opang = -9; + vars.m_sss3d_invar_ranked_id = -9; + + + std::string base2d = "sss_"; + std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; + + vars.m_sss2d_ioc_ranked_en = -9; + vars.m_sss2d_ioc_ranked_conv = -9; + vars.m_sss2d_ioc_ranked_ioc = -9; + vars.m_sss2d_ioc_ranked_pca = -9; + vars.m_sss2d_ioc_ranked_invar = -9; + vars.m_sss2d_ioc_ranked_angle_to_shower = -9; + vars.m_sss2d_ioc_ranked_num_planes = -9; + + vars.m_sss2d_conv_ranked_en = -9; + vars.m_sss2d_conv_ranked_conv = -9; + vars.m_sss2d_conv_ranked_ioc = -9; + vars.m_sss2d_conv_ranked_pca = -9; + vars.m_sss2d_conv_ranked_invar = -9; + vars.m_sss2d_conv_ranked_angle_to_shower = -9; + vars.m_sss2d_conv_ranked_num_planes = -9; + + vars.m_sss2d_invar_ranked_en = -9; + vars.m_sss2d_invar_ranked_conv = -9; + vars.m_sss2d_invar_ranked_ioc = -9; + vars.m_sss2d_invar_ranked_pca = -9; + vars.m_sss2d_invar_ranked_invar = -9; + vars.m_sss2d_invar_ranked_angle_to_shower = -9; + vars.m_sss2d_invar_ranked_num_planes = -9; + + //--------------------------------------- + //First off, the 3D showers + //First some 3D shower information + if(vars.m_sss3d_shower_conversion_dist.size()>0 && vars.m_reco_shower_energy_max.size()>0){ + //std::cout<<"Primary shower en "<at(0)< inv = vars.m_sss3d_shower_implied_invariant_mass; + for(auto &v : inv) v = fabs(v-paras.s_mass_pi0_mev); + + std::vector ranked_ioc = sort_indexes_rev((vars.m_sss3d_shower_ioc_ratio)); + std::vector ranked_invar = sort_indexes_rev((inv)); + std::vector ranked_conv = sort_indexes_rev((vars.m_sss3d_shower_conversion_dist)); + std::vector ranked_en = sort_indexes_rev((vars.m_sss3d_shower_energy_max)); + + int to_consider = vars.m_sss3d_shower_conversion_dist.size(); + + if(false){ + std::cout<<"IOC"<Self()<<" "<Self()<<" "< interested = {"IsClearCosmic","TrackScore","NuScore","IsNeutrino","SliceIndex"}; + std::cout<<"EN"<> metadatas = pfPartToMetadataAssoc.at(pfp.key()); - for(auto &meta: metadatas){ - std::map propertiesmap = meta->GetPropertiesMap(); - for (auto it:propertiesmap ){ - std::cout<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<Length()<<" Dist "<Self()< s_slice = slice_per_pfparticle.at(NormalShowerToPFParticleMap[s].key()); - //std::cout<ID()<ShowerStart().X() == shr->ShowerStart().X() || pfp->Self()== NormalShowerToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"< s_slice = slice_per_pfparticle.at(NormalTrackToPFParticleMap[s].key()); - //std::cout<ID()<Self()== NormalTrackToPFParticleMap[s]->Self()){ - //std::cout<<"Its a match!"<0){ + //std::cout<<"2D clusters: "< nplans(3,0); + std::vector> indexmap(3); - if(is_matched) - { - // std::cout<<"matched and continuing"<ShowerStart().X()); - m_sss3d_shower_start_y.push_back(shr->ShowerStart().Y()); - m_sss3d_shower_start_z.push_back(shr->ShowerStart().Z()); - m_sss3d_shower_dir_x.push_back(shr->Direction().X()); - m_sss3d_shower_dir_y.push_back(shr->Direction().Y()); - m_sss3d_shower_dir_z.push_back(shr->Direction().Z()); - m_sss3d_shower_length.push_back(shr->Length()); - m_sss3d_shower_conversion_dist.push_back(dist); - m_sss3d_shower_invariant_mass.push_back(invar); - m_sss3d_shower_implied_invariant_mass.push_back(implied_invar); - double imp = impact_paramater_shr(m_vertex_pos_x, m_vertex_pos_y, m_vertex_pos_z, shr); - m_sss3d_shower_impact_parameter.push_back(imp); - - if(dist!=0) { - m_sss3d_shower_ioc_ratio.push_back(imp/dist); - }else{ - m_sss3d_shower_ioc_ratio.push_back(0); + for(int i=0; i< vars.m_sss_num_candidates; i++){ + //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; + + for(int i=0; i< vars.m_sss_num_candidates; i++){ + int ip = vars.m_sss_candidate_plane.at(i); + //int nhits = sss_candidate_num_hits.at(i); + nplans[ip]++; + indexmap[ip].push_back(i); + + //Two passes to build up all "Candidates" for 2 and 3 plane matches + for(int j=i;j= vars.m_sss_candidate_min_tick.at(i))contain_ij = true; + if(vars.m_sss_candidate_mean_tick.at(i)<=vars.m_sss_candidate_max_tick.at(j) && vars.m_sss_candidate_mean_tick.at(i) >= vars.m_sss_candidate_min_tick.at(j))contain_ji = true; + // std::cout<= vars.m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; + if(vars.m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=vars.m_sss_candidate_max_tick.at(k) && vars.m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= vars.m_sss_candidate_min_tick.at(k))contain_ki = true; + if(vars.m_sss_candidate_mean_tick.at(k)<=vars.m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && vars.m_sss_candidate_mean_tick.at(k) >= vars.m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; + if(vars.m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=vars.m_sss_candidate_max_tick.at(k) && vars.m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= vars.m_sss_candidate_min_tick.at(k))contain_ki = true; + + //If this matches well with Either last candidate, include as a possibility + if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ + uniq_candidates[i].push_back(k); } - m_sss3d_shower_energy_max.push_back(senergy);// - m_sss3d_shower_score.push_back(shr_score); - m_sss3d_slice_clear_cosmic.push_back(is_clear_cosmic_slice); - m_sss3d_slice_nu.push_back(is_nu_slice); - } - return; - } + } + } + } + //Check which candidates have been used where + std::vector used_candidates(vars.m_sss_num_candidates); + for(int i = 0; i< (int)uniq_candidates.size(); i++){ + for(auto &j: uniq_candidates[i]){ + used_candidates[j]++; + } + } + //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own + for(int i = 0; i< (int)used_candidates.size(); i++){ + if(used_candidates[i]==0) uniq_candidates.push_back({i}); + } + //Now lets delete any permutations + std::vector> uniq_candidates2; + uniq_candidates2.push_back(uniq_candidates.front()); + + for(int i = 1; i< (int)uniq_candidates.size(); i++){ + + bool perm = false; + for(int j = 0; j< (int)uniq_candidates2.size(); j++){ + perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); + if(perm) break; + } + if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); + } + + //Printing candidates (After perm check) + std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); + std::vector candidates_en(uniq_candidates2.size(),0); + std::vector candidates_ioc(uniq_candidates2.size(),0); + std::vector candidates_conv(uniq_candidates2.size(),0); + std::vector candidates_pca(uniq_candidates2.size(),0); + std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); + std::vector candidates_num_planes(uniq_candidates2.size(),0); + std::vector candidates_eff_invar(uniq_candidates2.size(),0); + std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); + + //rank by min_impat/max_min_dist and select + //rank by Energy energy + + for(int j=0; j<(int)uniq_candidates2.size();j++){ + int nt=uniq_candidates2[j].size(); + //std::cout<<"Candidate #: "< mod = {"ioc_ranked","invar_ranked"}; - - m_sss3d_ioc_ranked_en = -9; - m_sss3d_ioc_ranked_conv = -9; - m_sss3d_ioc_ranked_invar = -9; - m_sss3d_ioc_ranked_implied_invar = -9; - m_sss3d_ioc_ranked_ioc = -9; - m_sss3d_ioc_ranked_opang = -9; - m_sss3d_ioc_ranked_implied_opang = -9; - m_sss3d_ioc_ranked_id = -9; - - m_sss3d_invar_ranked_en = -9; - m_sss3d_invar_ranked_conv = -9; - m_sss3d_invar_ranked_invar = -9; - m_sss3d_invar_ranked_implied_invar = -9; - m_sss3d_invar_ranked_ioc = -9; - m_sss3d_invar_ranked_opang = -9; - m_sss3d_invar_ranked_implied_opang = -9; - m_sss3d_invar_ranked_id = -9; - - - std::string base2d = "sss_"; - std::vector mod2d = {"ioc_ranked","conv_ranked","invar_ranked"}; - - m_sss2d_ioc_ranked_en = -9; - m_sss2d_ioc_ranked_conv = -9; - m_sss2d_ioc_ranked_ioc = -9; - m_sss2d_ioc_ranked_pca = -9; - m_sss2d_ioc_ranked_invar = -9; - m_sss2d_ioc_ranked_angle_to_shower = -9; - m_sss2d_ioc_ranked_num_planes = -9; - - m_sss2d_conv_ranked_en = -9; - m_sss2d_conv_ranked_conv = -9; - m_sss2d_conv_ranked_ioc = -9; - m_sss2d_conv_ranked_pca = -9; - m_sss2d_conv_ranked_invar = -9; - m_sss2d_conv_ranked_angle_to_shower = -9; - m_sss2d_conv_ranked_num_planes = -9; - - m_sss2d_invar_ranked_en = -9; - m_sss2d_invar_ranked_conv = -9; - m_sss2d_invar_ranked_ioc = -9; - m_sss2d_invar_ranked_pca = -9; - m_sss2d_invar_ranked_invar = -9; - m_sss2d_invar_ranked_angle_to_shower = -9; - m_sss2d_invar_ranked_num_planes = -9; - - //--------------------------------------- - //First off, the 3D showers - //First some 3D shower information - if(m_sss3d_shower_conversion_dist.size()>0 && m_reco_shower_energy_max.size()>0){ - //std::cout<<"Primary shower en "<at(0)< inv = m_sss3d_shower_implied_invariant_mass; - for(auto &v : inv) v = fabs(v-m_mass_pi0_mev); - - std::vector ranked_ioc = sort_indexes_rev((m_sss3d_shower_ioc_ratio)); - std::vector ranked_invar = sort_indexes_rev((inv)); - std::vector ranked_conv = sort_indexes_rev((m_sss3d_shower_conversion_dist)); - std::vector ranked_en = sort_indexes_rev((m_sss3d_shower_energy_max)); - - int to_consider = m_sss3d_shower_conversion_dist.size(); - - if(false){ - std::cout<<"IOC"<at( ranked_ioc[0] )<<" invar: "<at(ranked_ioc[0])<<" en: "<at(ranked_ioc[0])<<" conv: "<at(ranked_ioc[0])<0){ - //std::cout<<"2D clusters: "< nplans(3,0); - std::vector> indexmap(3); - - - for(int i=0; i< m_sss_num_candidates; i++){ - //std::cout<at(i)<<" pdg: "<at(i)<<" ovf "<at(i)<<" conv: "<at(i)<> uniq_candidates; - - for(int i=0; i< m_sss_num_candidates; i++){ - int ip = m_sss_candidate_plane.at(i); - //int nhits = sss_candidate_num_hits.at(i); - nplans[ip]++; - indexmap[ip].push_back(i); - - //Two passes to build up all "Candidates" for 2 and 3 plane matches - for(int j=i;j= m_sss_candidate_min_tick.at(i))contain_ij = true; - if(m_sss_candidate_mean_tick.at(i)<=m_sss_candidate_max_tick.at(j) && m_sss_candidate_mean_tick.at(i) >= m_sss_candidate_min_tick.at(j))contain_ji = true; - // std::cout<= m_sss_candidate_min_tick.at(uniq_candidates[i][0]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][0])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][0]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - if(m_sss_candidate_mean_tick.at(k)<=m_sss_candidate_max_tick.at(uniq_candidates[i][1]) && m_sss_candidate_mean_tick.at(k) >= m_sss_candidate_min_tick.at(uniq_candidates[i][1]))contain_ik = true; - if(m_sss_candidate_mean_tick.at(uniq_candidates[i][1])<=m_sss_candidate_max_tick.at(k) && m_sss_candidate_mean_tick.at(uniq_candidates[i][1]) >= m_sss_candidate_min_tick.at(k))contain_ki = true; - - //If this matches well with Either last candidate, include as a possibility - if((contain_ik&&contain_ki) || (contain_jk&&contain_kj)){ - uniq_candidates[i].push_back(k); - } - - } - } - } - //Check which candidates have been used where - std::vector used_candidates(m_sss_num_candidates); - for(int i = 0; i< (int)uniq_candidates.size(); i++){ - for(auto &j: uniq_candidates[i]){ - used_candidates[j]++; - } - } - - //If a candidate has been included in NO 2 or 3 plane cluster, treat it on its own - for(int i = 0; i< (int)used_candidates.size(); i++){ - if(used_candidates[i]==0) uniq_candidates.push_back({i}); - } - - //Now lets delete any permutations - std::vector> uniq_candidates2; - uniq_candidates2.push_back(uniq_candidates.front()); - - for(int i = 1; i< (int)uniq_candidates.size(); i++){ - - bool perm = false; - for(int j = 0; j< (int)uniq_candidates2.size(); j++){ - perm = marks_compare_vec_nonsense(uniq_candidates[i], uniq_candidates2[j]); - if(perm) break; - } - if(!perm) uniq_candidates2.push_back(uniq_candidates[i]); - } - - //Printing candidates (After perm check) - std::cout<<"After: used_candidates "< candidate_pass(uniq_candidates2.size(),false); - std::vector candidates_en(uniq_candidates2.size(),0); - std::vector candidates_ioc(uniq_candidates2.size(),0); - std::vector candidates_conv(uniq_candidates2.size(),0); - std::vector candidates_pca(uniq_candidates2.size(),0); - std::vector candidates_angle_to_shower(uniq_candidates2.size(),0); - std::vector candidates_num_planes(uniq_candidates2.size(),0); - std::vector candidates_eff_invar(uniq_candidates2.size(),0); - std::vector candidates_eff_invar_diff(uniq_candidates2.size(),0); - - //rank by min_impat/max_min_dist and select - //rank by Energy energy - - for(int j=0; j<(int)uniq_candidates2.size();j++){ - int nt=uniq_candidates2[j].size(); - //std::cout<<"Candidate #: "< is_in_slice; - - for(int c=0; c< nt;++c){ - int ic = uniq_candidates2[j][c]; - - //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); - std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); - std::vector ranked_conv = sort_indexes_rev(candidates_conv); - - std::cout<<"========== Ranking ======== "< is_in_slice; + + for(int c=0; c< nt;++c){ + int ic = uniq_candidates2[j][c]; + + //std::cout<<"----- plane: "< ranked_ioc = sort_indexes_rev(candidates_ioc); + std::vector ranked_invar = sort_indexes_rev(candidates_eff_invar_diff); + std::vector ranked_conv = sort_indexes_rev(candidates_conv); + + std::cout<<"========== Ranking ======== "<> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ - size_t size = candidate_indices.size(); - if(size == 0){ + size_t size = candidate_indices.size(); + if(size == 0){ throw std::runtime_error("clusterCandidateOverlap: No cluster candidates to analyze time overlap for.."); - } + } - // at most 3 cluster indices (for 3 planes) - std::vector planes; - std::vector max_ticks; - std::vector min_ticks; - std::vector tick_length; - - for(auto i : candidate_indices){ - planes.push_back(cluster_planes[i]); - - max_ticks.push_back(cluster_max_ticks[i]); - min_ticks.push_back(cluster_min_ticks[i]); - tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); - } + // at most 3 cluster indices (for 3 planes) + std::vector planes; + std::vector max_ticks; + std::vector min_ticks; + std::vector tick_length; + for(auto i : candidate_indices){ + planes.push_back(cluster_planes[i]); - //if candidates are not on different planes - if( size == 2 && planes[0] == planes[1]) - return {false, std::vector(2, -1.0)}; - if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) - return {false, std::vector(3, -1.0)}; - - //calculate the overlapping tick-span - double tick_overlap = DBL_MAX; - - //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction - for(auto max_e : max_ticks) - for(auto min_e : min_ticks) - if(max_e - min_e < tick_overlap) - tick_overlap = max_e - min_e; - - // if tick overlap is negative, meaning these clusters are not overlapping - if(tick_overlap < 0) - return {false, std::vector(size, -1.0)}; - else{ - std::vector overlap_fraction; - for(auto l: tick_length){ - overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); + max_ticks.push_back(cluster_max_ticks[i]); + min_ticks.push_back(cluster_min_ticks[i]); + tick_length.push_back(cluster_max_ticks[i] - cluster_min_ticks[i]); + } + + + //if candidates are not on different planes + if( size == 2 && planes[0] == planes[1]) + return {false, std::vector(2, -1.0)}; + if( size == 3 && (planes[0] == planes[1] || planes[1] == planes[2] || planes[0] == planes[2])) + return {false, std::vector(3, -1.0)}; + + //calculate the overlapping tick-span + double tick_overlap = DBL_MAX; + + //can be simplied as picking the minimum max_tick and maximum min_tick and do the subtraction + for(auto max_e : max_ticks) + for(auto min_e : min_ticks) + if(max_e - min_e < tick_overlap) + tick_overlap = max_e - min_e; + + // if tick overlap is negative, meaning these clusters are not overlapping + if(tick_overlap < 0) + return {false, std::vector(size, -1.0)}; + else{ + std::vector overlap_fraction; + for(auto l: tick_length){ + overlap_fraction.push_back( l==0? 1.0 : tick_overlap/l); } - return {true, overlap_fraction}; - } + return {true, overlap_fraction}; } + } + - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks){ std::cout << "group_cluster_candidate\t|| Total of " << num_clusters << " to be grouped" << std::endl; @@ -1098,7 +1101,9 @@ namespace single_photon std::vector all_PPFPs, const std::vector>& tracks, const std::vector>& showers, - detinfo::DetectorPropertiesData const & theDetector) { + detinfo::DetectorPropertiesData const & theDetector, + var_all& vars, + para_all& paras){ int total_track_hits =0; int total_shower_hits =0; @@ -1172,7 +1177,7 @@ namespace single_photon } // END FOR LOOP COUNTING SHOWER HITS - m_sss_num_associated_hits = total_shower_hits + total_track_hits; + vars.m_sss_num_associated_hits = total_shower_hits + total_track_hits; // PRINT SUMMARY OF HIT TYPES std::cout<<"*SSS: So in total we have "<= 0){ - m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; + vars.m_sss_num_unassociated_hits = slicehits.size()-total_shower_hits-total_track_hits; std::cout<<"*SSS: So that leaves "<Divide(4, 1, 0.0, 0.1); @@ -1359,25 +1364,25 @@ namespace single_photon // place data into approriate vertex_tree variables for(int plane = 0; plane < 3; plane++){ if (num_shr_hits[plane] == 0){ // if there are no shower hits on this plane, is extremely isolated - m_isolation_min_dist_trk_shr.push_back(999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(999); + vars.m_isolation_min_dist_trk_shr.push_back(999); + vars.m_isolation_nearest_shr_hit_to_trk_wire.push_back(999); + vars.m_isolation_nearest_shr_hit_to_trk_time.push_back(999); } else if (t_vec_t[plane].size() > 0) { // have to have both shower and track hits on this plane to have valid comparisons for distance auto abs_min = (*std::min_element(sh_dist[plane].begin(), sh_dist[plane].end(), map_min_fn)); - m_isolation_min_dist_trk_shr.push_back(abs_min.second); - m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); - m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); + vars.m_isolation_min_dist_trk_shr.push_back(abs_min.second); + vars.m_isolation_nearest_shr_hit_to_trk_wire.push_back((double)abs_min.first->WireID().Wire); + vars.m_isolation_nearest_shr_hit_to_trk_time.push_back((double)abs_min.first->PeakTime()); } else{ // if there are no shower hits or there are no track hits on this plane, getting min distance fails - m_isolation_min_dist_trk_shr.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); + vars.m_isolation_min_dist_trk_shr.push_back(-999); + vars.m_isolation_nearest_shr_hit_to_trk_wire.push_back(-999); + vars.m_isolation_nearest_shr_hit_to_trk_time.push_back(-999); } - m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); - m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); - m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); - m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); + vars.m_isolation_num_shr_hits_win_1cm_trk.push_back(s_hists[plane]->Integral(1,1)); + vars.m_isolation_num_shr_hits_win_2cm_trk.push_back(s_hists[plane]->Integral(1,2)); + vars.m_isolation_num_shr_hits_win_5cm_trk.push_back(s_hists[plane]->Integral(1,5)); + vars.m_isolation_num_shr_hits_win_10cm_trk.push_back(s_hists[plane]->Integral(1,10)); } /* DRAW SHOWER HISTOGRAM */ @@ -1450,19 +1455,19 @@ namespace single_photon // place data into appropriate vertex_tree variables for(int plane = 0; plane < 3; plane++){ if (t_vec_t[plane].size() > 0 && unassociated_hits_all[plane].size() > 0){ - m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); + vars.m_isolation_min_dist_trk_unassoc.push_back(minDist_tot[plane]); + vars.m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(minWire[plane]); + vars.m_isolation_nearest_unassoc_hit_to_trk_time.push_back(minTime[plane]); } else { - m_isolation_min_dist_trk_unassoc.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); - m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); + vars.m_isolation_min_dist_trk_unassoc.push_back(-999); + vars.m_isolation_nearest_unassoc_hit_to_trk_wire.push_back(-999); + vars.m_isolation_nearest_unassoc_hit_to_trk_time.push_back(-999); } - m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); - m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); - m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); - m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); + vars.m_isolation_num_unassoc_hits_win_1cm_trk.push_back(u_hists[plane]->Integral(1,1)); + vars.m_isolation_num_unassoc_hits_win_2cm_trk.push_back(u_hists[plane]->Integral(1,2)); + vars.m_isolation_num_unassoc_hits_win_5cm_trk.push_back(u_hists[plane]->Integral(1,5)); + vars.m_isolation_num_unassoc_hits_win_10cm_trk.push_back(u_hists[plane]->Integral(1,10)); } /* DRAW UNASSOCIATED HITS DISTANCE HISTOGRAMS */ @@ -1495,12 +1500,12 @@ namespace single_photon int used_col=0; if(showers.size()+tracks.size() > tcols.size()){ for(int i =0; i< (int)(showers.size()+tracks.size() - tcols.size() +2); i++){ - tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + tcols.push_back(tcols[(int)paras.rangen->Uniform(0,7)]+(int)paras.rangen->Uniform(-5,5)); } } std::cout<<"*Tick Min: "<SetLeftMargin(0.1); - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {theDetector.ConvertXToTicks(m_vertex_pos_x, i, fTPC,fCryostat)}; + std::vector wire = {(double)calcWire(vars.m_vertex_pos_y, vars.m_vertex_pos_z, i, fTPC, fCryostat, *paras.s_geom)}; + std::vector time = {theDetector.ConvertXToTicks(vars.m_vertex_pos_x, i, fTPC,fCryostat)}; vertex_time[i] = time[0]; vertex_wire[i] = wire[0]; - if(i==0) m_vertex_pos_wire_p0 = wire[0]; - if(i==1) m_vertex_pos_wire_p1 = wire[0]; - if(i==2) m_vertex_pos_wire_p2 = wire[0]; - m_vertex_pos_tick = time[0]; + if(i==0) vars.m_vertex_pos_wire_p0 = wire[0]; + if(i==1) vars.m_vertex_pos_wire_p1 = wire[0]; + if(i==2) vars.m_vertex_pos_wire_p2 = wire[0]; + vars.m_vertex_pos_tick = time[0]; chan_max[i] = std::max( chan_max[i],wire[0]); chan_min[i] = std::min( chan_min[i],wire[0]); @@ -1556,23 +1561,23 @@ namespace single_photon // ******************************** DeadWireRegions ******************************************** //plot dead wire -// for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ -// int badchan = bad_channel_list_fixed_mcc9[i].first; -// int ok = bad_channel_list_fixed_mcc9[i].second; -// -// if(ok>1)continue; -// auto hs = geom->ChannelToWire(badchan); -// -// int thisp = (int)hs[0].Plane; -// double bc = hs[0].Wire; -// // std::cout<<"WIRE "<cd(thisp+1); -// TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); -// l->SetLineColor(kGray+1); -// l->Draw("same"); -// } -// } + // for(size_t i=0; i< bad_channel_list_fixed_mcc9.size(); i++){ + // int badchan = bad_channel_list_fixed_mcc9[i].first; + // int ok = bad_channel_list_fixed_mcc9[i].second; + // + // if(ok>1)continue; + // auto hs = geom->ChannelToWire(badchan); + // + // int thisp = (int)hs[0].Plane; + // double bc = hs[0].Wire; + // // std::cout<<"WIRE "<cd(thisp+1); + // TLine *l = new TLine(bc,tick_min*0.9,bc,tick_max*1.1); + // l->SetLineColor(kGray+1); + // l->Draw("same"); + // } + // } // plot track for(size_t t=0; t< pts_trk.size(); t++){ @@ -1632,7 +1637,7 @@ namespace single_photon pottex.SetTextSize(0.045); pottex.SetTextAlign(13); //align at top pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + std::string pot_draw = "Run: "+std::to_string(vars.m_run_number)+" SubRun: "+std::to_string(vars.m_subrun_number)+" Event: "+std::to_string(vars.m_event_number); pottex.DrawLatex(.1,.94, pot_draw.c_str()); TLegend * l_top = new TLegend(0.5,0.5,0.85,0.85); diff --git a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h index ec6fa9340..ae38427a8 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h @@ -4,6 +4,7 @@ #include "TGraph.h" #include "sbncode/SinglePhotonAnalysis/HelperFunctions/helper_PandoraPFParticles.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" namespace single_photon { @@ -51,55 +52,59 @@ namespace single_photon }; //end of class sss_score - TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); + TGraph* GetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts); - sss_score ScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); + sss_score ScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower); - int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, - const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); + int CompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, + const std::vector>& showers, std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps); - std::vectorSecondShowerMatching( + std::vectorSecondShowerMatching( std::vector>& hitz, - art::FindManyP& mcparticles_per_hit, - std::vector>& mcParticleVector, - std::map< int ,art::Ptr> & MCParticleToTrackIdMap - ); + art::FindManyP& mcparticles_per_hit, + std::vector>& mcParticleVector, + std::map< int ,art::Ptr> & MCParticleToTrackIdMap, + var_all& vars); - //************************************************ Shower Search Slice Second SSS3D ********** / + //************************************************ Shower Search Slice Second SSS3D ********** / - void SecondShowerSearch3D( - std::vector> & showers, - std::map, art::Ptr> & NormalShowerToPFParticleMap, - std::vector> & tracks, - std::map, - art::Ptr> & NormalTrackToPFParticleMap, - art::Event const & evt ); + void SecondShowerSearch3D( + std::vector> & showers, + std::map, art::Ptr> & NormalShowerToPFParticleMap, + std::vector> & tracks, + std::map, + art::Ptr> & NormalTrackToPFParticleMap, + art::Event const & evt , + var_all& vars, + para_all& paras); - void SimpleSecondShowerCluster(); + void SimpleSecondShowerCluster(var_all& vars, para_all& paras); + + std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); - std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); -//isolation.h -bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second < p2.second); -} + //isolation.h + bool map_max_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second < p2.second); + } -// override function of sorts for min_element function comparison -bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ - return (p1.second > p2.second); -} + // override function of sorts for min_element function comparison + bool map_min_fn(const std::pair,double> p1, const std::pair, double> p2){ + return (p1.second > p2.second); + } void IsolationStudy( std::vector all_PPFPs, const std::vector>& tracks, const std::vector>& showers, - detinfo::DetectorPropertiesData const & theDetector); + detinfo::DetectorPropertiesData const & theDetector, + var_all& vars, + para_all& paras); } diff --git a/sbncode/SinglePhotonAnalysis/Libraries/variables.h b/sbncode/SinglePhotonAnalysis/Libraries/variables.h index 93615efa7..7a0155e41 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/variables.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/variables.h @@ -5,6 +5,7 @@ #include "larcore/Geometry/Geometry.h" #include "larcorealg/Geometry/BoxBoundedGeo.h" +#include "larevt/SpaceChargeServices/SpaceChargeService.h" #include "lardataobj/RecoBase/PFParticle.h" #include "lardataobj/RecoBase/Track.h" @@ -42,1113 +43,1085 @@ namespace single_photon typedef std::vector< art::Ptr > ShowerVector; typedef std::map< size_t, art::Ptr> PFParticleIdMap; - extern std::map is_delta_map; - -//DECLARATION HERE - //Geometry dimensions; Fiducial volume and SCB (no SCB yet?) - extern std::vector> fTPCVolumes; - extern std::vector fActiveVolumes; - extern double m_tpc_active_XMin; - extern double m_tpc_active_YMin; - extern double m_tpc_active_ZMin; - extern double m_tpc_active_XMax; - extern double m_tpc_active_YMax; - extern double m_tpc_active_ZMax; - - extern TRandom3 *rangen; - extern std::string m_shower3dLabel; - extern std::string m_showerKalmanLabel; - extern std::string m_showerKalmanCaloLabel; - extern std::string m_pandoraLabel; ///< The label for the pandora producer - extern std::string m_trackLabel; ///< The label for the track producer from PFParticles - - extern std::string m_showerLabel; ///< The label for the shower producer from PFParticles - extern std::string m_caloLabel; ///< The label for calorimetry associations producer - extern std::string m_flashLabel; - extern std::string m_geantModuleLabel; - extern std::string m_hitfinderLabel; - extern std::string m_hitMCParticleAssnsLabel; - extern std::string m_potLabel; - extern std::string m_generatorLabel; - - - extern std::string m_pidLabel; ///< For PID stuff - extern std::string m_CRTVetoLabel; - extern std::string m_CRTTzeroLabel; - extern std::string m_CRTHitProducer; - extern std::string m_true_eventweight_label; - - extern bool m_use_PID_algorithms; - extern bool m_use_delaunay; - extern int m_delaunay_max_hits; - extern bool m_is_verbose; - extern bool m_print_out_event; - extern bool m_is_data; // value provided by pset - extern bool m_is_overlayed; - extern bool m_is_textgen; - extern bool m_run_all_pfps; - extern bool m_has_CRT; - extern bool m_fill_trees; - extern bool m_run_pi0_filter; //value provided by pset - extern bool m_run_pi0_filter_2g1p; - extern bool m_run_pi0_filter_2g0p; - - extern bool m_runPhotoNuTruth; - extern bool m_runTrueEventweight; - - extern bool m_runSelectedEvent; //if it should run only selected events - extern std::string m_selected_event_list; //full path for the file containing run/subrun/event number of selected events - extern std::set> m_selected_set; //set of selected events - - //SEAviwer bits - extern bool m_runSEAview; - extern double m_SEAviewPlotDistance; //parameters related to shower-like object finding - extern double m_SEAviewHitThreshold; - extern double m_SEAviewDbscanMinPts; - extern double m_SEAviewDbscanEps; - extern double m_SEAviewMaxPtsLinFit; - extern bool m_SEAviewMakePDF; - extern int m_SEAviewNumRecoShower; - extern int m_SEAviewNumRecoTrack; - - extern bool m_runSEAviewStub; - extern double m_SEAviewStubHitThreshold; //parameters related to track-like object finding - extern double m_SEAviewStubPlotDistance; - extern double m_SEAviewStubDbscanMinPts; - extern double m_SEAviewStubDbscanEps; - extern bool m_SEAviewStubMakePDF; - extern int m_SEAviewStubNumRecoShower; - extern int m_SEAviewStubNumRecoTrack; - - extern std::string m_Spline_CV_label; //"eventweight4to4aFix" - - extern bool m_runCRT; - extern double m_DTOffset; - extern double m_Resolution; - extern std::string m_DAQHeaderProducer;//"daq" - - //SSS parameters - extern double m_max_conv_dist; - extern double m_mass_pi0_mev; - - extern double m_exiting_photon_energy_threshold ; - extern double m_exiting_proton_energy_threshold ; - - extern geo::GeometryCore const * geom; - extern double m_work_function; //value provided by pset - extern double m_recombination_factor; // value provided by pset - - extern std::vector m_gain_mc; // value provided by pset - extern std::vector m_gain_data; - extern double m_wire_spacing; - - extern double m_width_dqdx_box; // value provided by pset - extern double m_length_dqdx_box; - - - //------- TTree stuff - extern TTree* run_subrun_tree; - extern TTree* pot_tree; - extern TTree* vertex_tree; - extern TTree* eventweight_tree; - extern TTree* ncdelta_slice_tree; - - extern TTree* geant4_tree; - - extern TTree* true_eventweight_tree; - extern std::map> fmcweight; - - //------------ POT related variables -------------- - extern int m_number_of_events; - extern int m_number_of_events_in_subrun; - extern double m_pot_count; - extern int m_number_of_vertices; - - extern int m_run; - extern int m_subrun; - extern double m_subrun_pot; - extern int m_subrun_counts; - - //------------ Event Related Variables ------------- - extern int m_run_number; - extern int m_subrun_number; - extern int m_event_number; - extern double m_pot_per_event; - extern double m_pot_per_subrun; - - extern int m_test_matched_hits; - extern int m_reco_slice_objects; - - //------- Potential Unreconstructed Track Stub related variables ---- - extern int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - extern int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - extern int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - extern int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - extern std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ - extern std::vector m_trackstub_candidate_num_hits; - extern std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster - extern std::vector m_trackstub_candidate_num_ticks; - extern std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ - extern std::vector m_trackstub_candidate_PCA; - extern std::vector m_trackstub_candidate_mean_ADC; - extern std::vector m_trackstub_candidate_ADC_RMS; - extern std::vector m_trackstub_candidate_veto_score; - extern std::vector m_trackstub_candidate_mean_tick; - extern std::vector m_trackstub_candidate_max_tick; - extern std::vector m_trackstub_candidate_min_tick; - extern std::vector m_trackstub_candidate_min_wire; - extern std::vector m_trackstub_candidate_max_wire; - extern std::vector m_trackstub_candidate_mean_wire; - extern std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ - extern std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) - extern std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) - extern std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster - extern std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit - extern std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - extern std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) - extern std::vector m_trackstub_candidate_mean_ADC_second_half; - extern std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. - extern std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction - extern std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster - extern std::vector m_trackstub_candidate_energy; - extern std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - extern std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - extern std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - extern std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ - extern std::vector m_trackstub_candidate_parent_pdg; - extern std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ - extern std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ - extern std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - //------- grouped stub clusters -------------- - extern int m_trackstub_num_candidate_groups; /* number of groups */ - extern std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ - extern std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ - - - - //------- Second shower related variables ---- - extern int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ - extern int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ - extern int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ - - - //currently commenting this out for speed as its not used - //ReadBDT * sssVetov1; - - extern int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ - extern std::vector m_sss_candidate_in_nu_slice; - extern std::vector m_sss_candidate_num_hits; - extern std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster - extern std::vector m_sss_candidate_num_ticks; - extern std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ - extern std::vector m_sss_candidate_PCA; - extern std::vector m_sss_candidate_mean_ADC; - extern std::vector m_sss_candidate_ADC_RMS; - extern std::vector m_sss_candidate_impact_parameter; - extern std::vector m_sss_candidate_fit_slope; //slope of the cluster direction - extern std::vector m_sss_candidate_veto_score; - extern std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction - extern std::vector m_sss_candidate_mean_tick; - extern std::vector m_sss_candidate_max_tick; - extern std::vector m_sss_candidate_min_tick; - extern std::vector m_sss_candidate_min_wire; - extern std::vector m_sss_candidate_max_wire; - extern std::vector m_sss_candidate_mean_wire; - extern std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ - extern std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster - extern std::vector m_sss_candidate_energy; - extern std::vector m_sss_candidate_angle_to_shower; - extern std::vector m_sss_candidate_closest_neighbour; - extern std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) - extern std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ - extern std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ - extern std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ - extern std::vector m_sss_candidate_parent_pdg; - extern std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ - extern std::vector m_sss_candidate_true_energy; - extern std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ - - - - //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- - - extern int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ - extern std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ - extern std::vector m_sss3d_shower_start_y; - extern std::vector m_sss3d_shower_start_z; - extern std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ - extern std::vector m_sss3d_shower_dir_y; - extern std::vector m_sss3d_shower_dir_z; - extern std::vector m_sss3d_shower_length; - extern std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ - - extern std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, - extern * calculated assuming vertex is where their mother particle decays */ - - extern std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass - extern * is calced direclty using shower direction of two showers */ - - extern std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ - extern std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist - extern * 0 if the conversion distance is 0*/ - extern std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ - extern std::vector m_sss3d_shower_score; - extern std::vector m_sss3d_slice_nu; - extern std::vector m_sss3d_slice_clear_cosmic; - - extern bool bool_make_sss_plots; - - - //------ max_energy, conversion dist, ioc of the sss3d shower that has the smallest ioc parameter ---- - extern double m_sss3d_ioc_ranked_en; - extern double m_sss3d_ioc_ranked_conv; - extern double m_sss3d_ioc_ranked_invar; - extern double m_sss3d_ioc_ranked_implied_invar; - extern double m_sss3d_ioc_ranked_ioc; - extern double m_sss3d_ioc_ranked_opang; - extern double m_sss3d_ioc_ranked_implied_opang; - extern int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. - - // --- same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- - extern double m_sss3d_invar_ranked_en; - extern double m_sss3d_invar_ranked_conv; - extern double m_sss3d_invar_ranked_invar; - extern double m_sss3d_invar_ranked_implied_invar; - extern double m_sss3d_invar_ranked_ioc; - extern double m_sss3d_invar_ranked_opang; - extern double m_sss3d_invar_ranked_implied_opang; - extern int m_sss3d_invar_ranked_id; - - - //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- - //--------------- they are not recob::showers -------------------------- - - // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc - // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance - // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. - extern double m_sss2d_ioc_ranked_en; - extern double m_sss2d_ioc_ranked_conv; - extern double m_sss2d_ioc_ranked_ioc; - extern double m_sss2d_ioc_ranked_pca; - extern double m_sss2d_ioc_ranked_invar; - extern double m_sss2d_ioc_ranked_angle_to_shower; - extern int m_sss2d_ioc_ranked_num_planes; - - extern double m_sss2d_conv_ranked_en; - extern double m_sss2d_conv_ranked_conv; - extern double m_sss2d_conv_ranked_ioc; - extern double m_sss2d_conv_ranked_pca; - extern double m_sss2d_conv_ranked_invar; - extern double m_sss2d_conv_ranked_angle_to_shower; - extern int m_sss2d_conv_ranked_num_planes; - - extern double m_sss2d_invar_ranked_en; - extern double m_sss2d_invar_ranked_conv; - extern double m_sss2d_invar_ranked_ioc; - extern double m_sss2d_invar_ranked_pca; - extern double m_sss2d_invar_ranked_invar; - extern double m_sss2d_invar_ranked_angle_to_shower; - extern int m_sss2d_invar_ranked_num_planes; - - - //------------ Vertex Related variables ------------- - extern int m_reco_vertex_size; - extern double m_vertex_pos_x; - extern double m_vertex_pos_y; - extern double m_vertex_pos_z; - extern double m_vertex_pos_tick; /* time tick of vertex pos */ - extern double m_vertex_pos_wire_p0; - extern double m_vertex_pos_wire_p2; - extern double m_vertex_pos_wire_p1; - extern int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ - extern double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ - extern double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ - extern double m_reco_vertex_dist_to_CPA; - - - extern int m_reco_asso_showers; - -// extern double m_reco_vertex_to_nearest_dead_wire_plane0; -// extern double m_reco_vertex_to_nearest_dead_wire_plane1; -// extern double m_reco_vertex_to_nearest_dead_wire_plane2; - - //added eventweight - //-------------- EventWeight related variables ------------- - static const int k_max_mc_particles=100; - - extern int m_run_number_eventweight; - extern int m_subrun_number_eventweight; - extern int m_event_number_eventweight; - - extern double m_mcflux_nu_pos_x; - extern double m_mcflux_nu_pos_y; - extern double m_mcflux_nu_pos_z; - extern double m_mcflux_nu_mom_x; - extern double m_mcflux_nu_mom_y; - extern double m_mcflux_nu_mom_z; - extern double m_mcflux_nu_mom_E; - extern int m_mcflux_ntype; - extern int m_mcflux_ptype; - extern double m_mcflux_nimpwt; - extern double m_mcflux_dk2gen; - extern double m_mcflux_nenergyn; - extern double m_mcflux_tpx; - extern double m_mcflux_tpy; - extern double m_mcflux_tpz; - extern double m_mcflux_vx; - extern double m_mcflux_vy; - extern double m_mcflux_vz; - extern int m_mcflux_tptype; - extern int m_mctruth_nparticles; - extern int m_mctruth_particles_track_Id[k_max_mc_particles]; - extern int m_mctruth_particles_pdg_code[k_max_mc_particles]; - extern int m_mctruth_particles_mother[k_max_mc_particles]; - extern int m_mctruth_particles_status_code[k_max_mc_particles]; - extern int m_mctruth_particles_num_daughters[k_max_mc_particles]; //other similar variables - extern int m_mctruth_particles_daughters[100][100]; - extern double m_mctruth_particles_Gvx[k_max_mc_particles]; - extern double m_mctruth_particles_Gvy[k_max_mc_particles]; - extern double m_mctruth_particles_Gvz[k_max_mc_particles]; - extern double m_mctruth_particles_Gvt[k_max_mc_particles]; - extern double m_mctruth_particles_px0[k_max_mc_particles]; - extern double m_mctruth_particles_py0[k_max_mc_particles]; - extern double m_mctruth_particles_pz0[k_max_mc_particles]; - extern double m_mctruth_particles_e0[k_max_mc_particles]; - extern int m_mctruth_particles_rescatter[k_max_mc_particles]; - extern double m_mctruth_particles_polx[k_max_mc_particles]; - extern double m_mctruth_particles_poly[k_max_mc_particles]; - extern double m_mctruth_particles_polz[k_max_mc_particles]; - extern int m_mctruth_neutrino_ccnc; - extern int m_mctruth_neutrino_mode; - extern int m_mctruth_neutrino_interaction_type; - extern int m_mctruth_neutrino_target; - extern int m_mctruth_neutrino_nucleon; - extern int m_mctruth_neutrino_quark; - extern double m_mctruth_neutrino_w; - extern double m_mctruth_neutrino_x; - extern double m_mctruth_neutrino_y; - extern double m_mctruth_neutrino_qsqr; - extern bool m_gtruth_is_sea_quark; - extern int m_gtruth_tgt_pdg; - extern int m_gtruth_tgt_Z; - extern int m_gtruth_tgt_A; - extern double m_gtruth_tgt_p4_x; - extern double m_gtruth_tgt_p4_y; - extern double m_gtruth_tgt_p4_z; - extern double m_gtruth_tgt_p4_E; - extern double m_gtruth_weight; - extern double m_gtruth_probability; - extern double m_gtruth_xsec; - extern double m_gtruth_diff_xsec; - extern int m_gtruth_gphase_space; - extern double m_gtruth_vertex_x; - extern double m_gtruth_vertex_y; - extern double m_gtruth_vertex_z; - extern double m_gtruth_vertex_T; - extern int m_gtruth_gscatter; - extern int m_gtruth_gint; - extern int m_gtruth_res_num; - extern int m_gtruth_num_piplus; - extern int m_gtruth_num_pi0; - extern int m_gtruth_num_piminus; - extern int m_gtruth_num_proton; - extern int m_gtruth_num_neutron; - extern bool m_gtruth_is_charm; - extern bool m_gtruth_is_strange; - extern int m_gtruth_charm_hadron_pdg; - extern int m_gtruth_strange_hadron_pdg; - extern int m_gtruth_decay_mode; - extern double m_gtruth_gx; - extern double m_gtruth_gy; - extern double m_gtruth_gt; - extern double m_gtruth_gw; - extern double m_gtruth_gQ2; - extern double m_gtruth_gq2; - extern int m_gtruth_probe_pdg; - extern double m_gtruth_probe_p4_x; - extern double m_gtruth_probe_p4_y; - extern double m_gtruth_probe_p4_z; - extern double m_gtruth_probe_p4_E; - extern double m_gtruth_hit_nuc_p4_x; - extern double m_gtruth_hit_nuc_p4_y; - extern double m_gtruth_hit_nuc_p4_z; - extern double m_gtruth_hit_nuc_p4_E; - extern double m_gtruth_hit_nuc_pos; - extern double m_gtruth_fs_had_syst_p4_x; - extern double m_gtruth_fs_had_syst_p4_y; - extern double m_gtruth_fs_had_syst_p4_z; - extern double m_gtruth_fs_had_syst_p4_E; - - //-------------- Flash related variables ------------- - extern int m_reco_num_templates; - extern std::vector m_reco_template; /* temp comment: does not seem to be used */ - - - //-------------- Flash related variables ------------- - extern std::vector m_reco_flash_total_pe; - extern std::vector m_reco_flash_time; - extern std::vector m_reco_flash_time_width; - extern std::vector m_reco_flash_abs_time; - extern std::vector m_reco_flash_frame; - extern std::vector m_reco_flash_ycenter; - extern std::vector m_reco_flash_ywidth; - extern std::vector m_reco_flash_zcenter; - extern std::vector m_reco_flash_zwidth; - extern std::vector m_reco_flash_total_pe_in_beamgate; - extern std::vector m_reco_flash_time_in_beamgate; - extern std::vector m_reco_flash_ycenter_in_beamgate; - extern std::vector m_reco_flash_zcenter_in_beamgate; - - extern int m_reco_num_flashes; - extern int m_reco_num_flashes_in_beamgate; - - extern double m_beamgate_flash_start; - extern double m_beamgate_flash_end; - - - //----------- CRT related variables ----------------- - - //for crt hits from the CRT veto product - extern int m_CRT_veto_nhits; /* number of CRT veto hits */ - extern std::vector m_CRT_veto_hit_PE; - - //fields storing information about the CRT hit closest to the flash - extern double m_CRT_min_hit_time; - extern double m_CRT_min_hit_PE; - extern double m_CRT_min_hit_x; - extern double m_CRT_min_hit_y; - extern double m_CRT_min_hit_z; - - //Fields storing information about all CRT hits in event - extern std::vector m_CRT_hits_time; - extern std::vector m_CRT_hits_PE; - extern std::vector m_CRT_hits_x; - extern std::vector m_CRT_hits_y; - extern std::vector m_CRT_hits_z; - extern double m_CRT_dt; //time between flash and nearest CRT hit - - extern double m_genie_spline_weight; - extern double m_genie_CV_tune_weight; - - extern double m_photonu_weight_low; - extern double m_photonu_weight_high; - - - extern int pfp_w_bestnuID; + extern bool g_is_verbose; + + struct para_all{ + std::vector> fTPCVolumes; + std::vector fActiveVolumes; + double _time2cm;//value modeled from David's shower code + + bool s_use_PID_algorithms; + bool s_use_delaunay; + int s_delaunay_max_hits; + bool s_print_out_event; + bool s_is_data; // value provided by pset + bool s_is_overlayed; + bool s_is_textgen; + bool s_run_all_pfps; + bool s_has_CRT; + bool s_fill_trees; + bool s_run_pi0_filter; //value provided by pset + bool s_run_pi0_filter_2g1p; + bool s_run_pi0_filter_2g0p; + + bool s_runPhotoNuTruth; + bool s_runTrueEventweight; + + bool s_runSelectedEvent; //if it should run only selected events + bool s_runSEAview; + bool s_runSEAviewStub; + bool s_make_sss_plots; + + //SEAviwer bits + double s_SEAviewPlotDistance; //parameters related to shower-like object finding + double s_SEAviewHitThreshold; + double s_SEAviewDbscanMinPts; + double s_SEAviewDbscanEps; + double s_SEAviewMaxPtsLinFit; + bool s_SEAviewMakePDF; + int s_SEAviewNumRecoShower; + int s_SEAviewNumRecoTrack; + + double s_SEAviewStubHitThreshold; //parameters related to track-like object finding + double s_SEAviewStubPlotDistance; + double s_SEAviewStubDbscanMinPts; + double s_SEAviewStubDbscanEps; + bool s_SEAviewStubMakePDF; + int s_SEAviewStubNumRecoShower; + int s_SEAviewStubNumRecoTrack; + + + std::string s_selected_event_list; //full path for the file containing run/subrun/event number of selected events + std::string s_shower3dLabel; + std::string s_showerKalmanLabel; + std::string s_showerKalmanCaloLabel; + std::string s_pandoraLabel; ///< The label for the pandora producer + std::string s_trackLabel; ///< The label for the track producer from PFParticles + std::string s_showerLabel; ///< The label for the shower producer from PFParticles + std::string s_caloLabel; ///< The label for calorimetry associations producer + std::string s_flashLabel; + std::string s_geantModuleLabel; + // std::string m_backtrackerLabel; + std::string s_hitfinderLabel; + std::string s_hitMCParticleAssnsLabel; + std::string s_potLabel; + std::string s_generatorLabel; + + std::string s_pidLabel; ///< For PID stuff + std::string s_CRTVetoLabel; + std::string s_CRTTzeroLabel; + std::string s_CRTHitProducer; + std::string s_true_eventweight_label; + + std::string s_Spline_CV_label; //"eventweight4to4aFix" + std::string s_truthmatching_signaldef; + + double s_max_conv_dist; + double s_mass_pi0_mev; + double s_beamgate_flash_start; + double s_beamgate_flash_end; + + TRandom3 *rangen; + + double s_work_function; //value provided by pset + double s_recombination_factor; // value provided by pset + + std::vector s_gain_mc; // value provided by pset + std::vector s_gain_data; + double s_wire_spacing; + + // int m_Cryostat; + // int m_TPC; + + bool s_runCRT; + double s_DTOffset; + double s_Resolution; + std::string s_DAQHeaderProducer;//"daq" + // std::ofstream out_stream; + + spacecharge::SpaceCharge const * s_SCE; + geo::GeometryCore const * s_geom; + double s_tpc_active_XMin; + double s_tpc_active_YMin; + double s_tpc_active_ZMin; + double s_tpc_active_XMax; + double s_tpc_active_YMax; + double s_tpc_active_ZMax; + + double s_width_dqdx_box; // value provided by pset + double s_length_dqdx_box; + + double s_track_calo_min_dEdx; + double s_track_calo_max_dEdx; + double s_track_calo_min_dEdx_hits; + double s_track_calo_trunc_fraction; + + + double s_exiting_photon_energy_threshold ; + double s_exiting_proton_energy_threshold ; + + + }; + + + struct var_all{ + int pfp_w_bestnuID; +// std::map> fmcweight; + + //Geant4 + std::vector m_geant4_pdg; + std::vector m_geant4_trackid; + std::vector m_geant4_mother; + std::vector m_geant4_statuscode; + std::vector m_geant4_E; + std::vector m_geant4_mass; + std::vector m_geant4_px; + std::vector m_geant4_py; + std::vector m_geant4_pz; + std::vector m_geant4_vx; + std::vector m_geant4_vy; + std::vector m_geant4_vz; + std::vector m_geant4_dx; + std::vector m_geant4_dy; + std::vector m_geant4_dz; + std::vector m_geant4_process; + std::vector m_geant4_end_process; + + std::vector m_geant4_costheta; + + //------- Second shower related variables ---- + int m_sss_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_sss_num_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_sss_num_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + //currently commenting this out for speed as its not used + //ReadBDT * sssVetov1; + + int m_sss_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_sss_candidate_in_nu_slice; + std::vector m_sss_candidate_num_hits; + std::vector m_sss_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_sss_candidate_num_ticks; + std::vector m_sss_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_sss_candidate_PCA; + std::vector m_sss_candidate_mean_ADC; + std::vector m_sss_candidate_ADC_RMS; + std::vector m_sss_candidate_impact_parameter; + std::vector m_sss_candidate_fit_slope; //slope of the cluster direction + std::vector m_sss_candidate_veto_score; + std::vector m_sss_candidate_fit_constant; //intercept of the cluster direction + std::vector m_sss_candidate_mean_tick; + std::vector m_sss_candidate_max_tick; + std::vector m_sss_candidate_min_tick; + std::vector m_sss_candidate_min_wire; + std::vector m_sss_candidate_max_wire; + std::vector m_sss_candidate_mean_wire; + std::vector m_sss_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_sss_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_sss_candidate_energy; + std::vector m_sss_candidate_angle_to_shower; + std::vector m_sss_candidate_closest_neighbour; + std::vector m_sss_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_sss_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_sss_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_sss_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_sss_candidate_parent_pdg; + std::vector m_sss_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_sss_candidate_true_energy; + std::vector m_sss_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + + //------------ sss3d_showers variables are for reco::showers which are in the events, but not in the slice ---- + + int m_sss3d_num_showers; /* number of showers in the event but not in the slice */ + std::vector m_sss3d_shower_start_x; /* shower start in X axis, for all showers in the event but not in the slice*/ + std::vector m_sss3d_shower_start_y; + std::vector m_sss3d_shower_start_z; + std::vector m_sss3d_shower_dir_x; /* shower direction projection on X axis */ + std::vector m_sss3d_shower_dir_y; + std::vector m_sss3d_shower_dir_z; + std::vector m_sss3d_shower_length; + std::vector m_sss3d_shower_conversion_dist; /* dist between shower start and vertex*/ + + std::vector m_sss3d_shower_invariant_mass; /* invariant mass of primary recob::shower, and each shower in the event, + * calculated assuming vertex is where their mother particle decays */ + + std::vector m_sss3d_shower_implied_invariant_mass; /* similar to invariance mass, except this invariant mass + * is calced direclty using shower direction of two showers */ + + std::vector m_sss3d_shower_impact_parameter; /* dist between vertex and shower direction line */ + std::vector m_sss3d_shower_ioc_ratio; /* ratio of impact parameter over conversion dist + * 0 if the conversion distance is 0*/ + std::vector m_sss3d_shower_energy_max; /* max energy of all planes (E summed from hits) */ + std::vector m_sss3d_shower_score; + std::vector m_sss3d_slice_nu; + std::vector m_sss3d_slice_clear_cosmic; + + double m_sss3d_ioc_ranked_en; + double m_sss3d_ioc_ranked_conv; + double m_sss3d_ioc_ranked_invar; + double m_sss3d_ioc_ranked_implied_invar; + double m_sss3d_ioc_ranked_ioc; + double m_sss3d_ioc_ranked_opang; + double m_sss3d_ioc_ranked_implied_opang; + int m_sss3d_ioc_ranked_id; //index of the sss3d_shower that has the smallest ioc. + + //same parameters, of the sss3d shower whose implied invariant mass together with primary recob::shower is closest to pi0 mass -- + double m_sss3d_invar_ranked_en; + double m_sss3d_invar_ranked_conv; + double m_sss3d_invar_ranked_invar; + double m_sss3d_invar_ranked_implied_invar; + double m_sss3d_invar_ranked_ioc; + double m_sss3d_invar_ranked_opang; + double m_sss3d_invar_ranked_implied_opang; + int m_sss3d_invar_ranked_id; + + + + //--------------- sss2d showers are essentially group of cluters on 3 planes, that have the potential to be a shower ------- + //--------------- they are not recob::showers -------------------------- + + // sss2d_ioc_ranked variables are the varaibles (mean shower energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest ioc + // sss2d_conv_ranked variables are the varaibles (energy, conv. dist, ioc, etc) of the sss2d shower that has the smallest conv. distance + // sss2d_invar_ranked variables are the varaibles of the sss2d shower whose invariant mass together with primary shower is closest to pi0. + double m_sss2d_ioc_ranked_en; + double m_sss2d_ioc_ranked_conv; + double m_sss2d_ioc_ranked_ioc; + double m_sss2d_ioc_ranked_pca; + double m_sss2d_ioc_ranked_invar; + double m_sss2d_ioc_ranked_angle_to_shower; + int m_sss2d_ioc_ranked_num_planes; + + double m_sss2d_conv_ranked_en; + double m_sss2d_conv_ranked_conv; + double m_sss2d_conv_ranked_ioc; + double m_sss2d_conv_ranked_pca; + double m_sss2d_conv_ranked_invar; + double m_sss2d_conv_ranked_angle_to_shower; + int m_sss2d_conv_ranked_num_planes; + + double m_sss2d_invar_ranked_en; + double m_sss2d_invar_ranked_conv; + double m_sss2d_invar_ranked_ioc; + double m_sss2d_invar_ranked_pca; + double m_sss2d_invar_ranked_invar; + double m_sss2d_invar_ranked_angle_to_shower; + int m_sss2d_invar_ranked_num_planes; + + + + std::set> m_selected_set; //set of selected events + + + //SSS parameters + TTree* run_subrun_tree; + TTree* pot_tree; + TTree* vertex_tree; + TTree* eventweight_tree; + TTree* ncdelta_slice_tree; + + TTree* geant4_tree; + + TTree* true_eventweight_tree; + + //------------ POT related variables -------------- + int m_number_of_events; + int m_number_of_events_in_subrun; + double m_pot_count; + int m_number_of_vertices; + + int m_run; + int m_subrun; + double m_subrun_pot; + int m_subrun_counts; + + //------------ Event Related Variables ------------- + int m_run_number; + int m_subrun_number; + int m_event_number; + double m_pot_per_event; + double m_pot_per_subrun; + + int m_test_matched_hits; + int m_reco_slice_objects; + + + //------- Potential Unreconstructed Track Stub related variables ---- + int m_trackstub_num_unassociated_hits; /* number of hits in the slice that're associated with neither shower nor tracks */ + int m_trackstub_unassociated_hits_below_threshold; /*number of unassociated hits that also didn't pass hit threshold,in the slice*/ + int m_trackstub_associated_hits; /* total number of hits from showers and tracks in the slice */ + + + int m_trackstub_num_candidates; /* number of unasso hit clusters which are not close enough to reco showers */ + std::vector m_trackstub_candidate_in_nu_slice; /* check if candidate is in neutrino slice: 1->YES, 0->Parts in neutrino slice, -1->Not at all */ + std::vector m_trackstub_candidate_num_hits; + std::vector m_trackstub_candidate_num_wires; //number of wires spanned by the candidate cluster + std::vector m_trackstub_candidate_num_ticks; + std::vector m_trackstub_candidate_plane; /* on which plan the unasso cluster is */ + std::vector m_trackstub_candidate_PCA; + std::vector m_trackstub_candidate_mean_ADC; + std::vector m_trackstub_candidate_ADC_RMS; + std::vector m_trackstub_candidate_veto_score; + std::vector m_trackstub_candidate_mean_tick; + std::vector m_trackstub_candidate_max_tick; + std::vector m_trackstub_candidate_min_tick; + std::vector m_trackstub_candidate_min_wire; + std::vector m_trackstub_candidate_max_wire; + std::vector m_trackstub_candidate_mean_wire; + std::vector m_trackstub_candidate_min_dist; // min distance from unasso cluter to the vertex */ + std::vector m_trackstub_candidate_min_impact_parameter_to_shower; //min impact parameter of all hits in cluster to the recob::shower direction line (on 2D plane) + std::vector m_trackstub_candidate_min_conversion_dist_to_shower_start; //min distance between hits and recob::shower start (on 2D plane) + std::vector m_trackstub_candidate_min_ioc_to_shower_start; //min ratio of impact_parameter_to_shower/conversion_dist_to_shower_start of all hits in the cluster + std::vector m_trackstub_candidate_ioc_based_length; //length of the cluster, calculated based on the IOC of hit + std::vector m_trackstub_candidate_wire_tick_based_length; //length of the cluster, calculated based on the wire & tick span of the cluster + std::vector m_trackstub_candidate_mean_ADC_first_half; // mean ADC per hit for the first half of cluster (cluster divided into halves based on hit IOC) + std::vector m_trackstub_candidate_mean_ADC_second_half; + std::vector m_trackstub_candidate_mean_ADC_first_to_second_ratio; // ratio of the mean ADC per hit, first half of cluster over second half. + std::vector m_trackstub_candidate_track_angle_wrt_shower_direction; //treat cluster as a track, angle between track direction and the shower direction + std::vector m_trackstub_candidate_linear_fit_chi2; // chi2 from linear fit of the {wire, tick} distribution of the cluster + std::vector m_trackstub_candidate_energy; + std::vector m_trackstub_candidate_remerge; // index of the recob::shower candidate cluster is close to (expect it to be -1) + std::vector m_trackstub_candidate_matched; /* has matched this unasso cluter to a primary MCParticle: 0-No, 1-Yes */ + std::vector m_trackstub_candidate_matched_energy_fraction_best_plane; /* matched energy fraction of the best-matched MCParticle on best-plane */ + std::vector m_trackstub_candidate_pdg; /* pdg of the matched MCParticle */ + std::vector m_trackstub_candidate_parent_pdg; + std::vector m_trackstub_candidate_trackid; /* track ID of the matched MCParticle */ + std::vector m_trackstub_candidate_true_energy; /* true energy of the matched MCParticle */ + std::vector m_trackstub_candidate_overlay_fraction; /* fraction of overlay in the unasso cluster hits */ + + //------- grouped stub clusters -------------- + int m_trackstub_num_candidate_groups; /* number of groups */ + std::vector> m_grouped_trackstub_candidate_indices; /* indices of stub clusters that are matched as a group */ + std::vector m_trackstub_candidate_group_timeoverlap_fraction; /* minimum fraction of the time overlap of grouped stub clusters */ + + + //-------------- Flash related variables ------------- + std::vector m_reco_flash_total_pe; + std::vector m_reco_flash_time; + std::vector m_reco_flash_time_width; + std::vector m_reco_flash_abs_time; + std::vector m_reco_flash_frame; + std::vector m_reco_flash_ycenter; + std::vector m_reco_flash_ywidth; + std::vector m_reco_flash_zcenter; + std::vector m_reco_flash_zwidth; + std::vector m_reco_flash_total_pe_in_beamgate; + std::vector m_reco_flash_time_in_beamgate; + std::vector m_reco_flash_ycenter_in_beamgate; + std::vector m_reco_flash_zcenter_in_beamgate; + + int m_reco_num_flashes; + int m_reco_num_flashes_in_beamgate; + //------------ Vertex Related variables ------------- + int m_reco_vertex_size; + double m_vertex_pos_x; + double m_vertex_pos_y; + double m_vertex_pos_z; + double m_vertex_pos_tick; /* time tick of vertex pos */ + double m_vertex_pos_wire_p0; + double m_vertex_pos_wire_p2; + double m_vertex_pos_wire_p1; + int m_reco_vertex_in_SCB; /* is vertex in SCB: 0- No, 1- Yes */ + double m_reco_vertex_dist_to_SCB; /* dist between vertex to SCB */ + double m_reco_vertex_dist_to_active_TPC; /* dist from vertex to closest active TPC wall, -999 if not in active TPC */ + double m_reco_vertex_dist_to_CPA; + + + int m_reco_asso_showers; + + // double m_reco_vertex_to_nearest_dead_wire_plane0; + // double m_reco_vertex_to_nearest_dead_wire_plane1; + // double m_reco_vertex_to_nearest_dead_wire_plane2; + + //added eventweight + //-------------- EventWeight related variables ------------- + + int m_run_number_eventweight; + int m_subrun_number_eventweight; + int m_event_number_eventweight; + + double m_mcflux_nu_pos_x; + double m_mcflux_nu_pos_y; + double m_mcflux_nu_pos_z; + double m_mcflux_nu_mom_x; + double m_mcflux_nu_mom_y; + double m_mcflux_nu_mom_z; + double m_mcflux_nu_mom_E; + int m_mcflux_ntype; + int m_mcflux_ptype; + double m_mcflux_nimpwt; + double m_mcflux_dk2gen; + double m_mcflux_nenergyn; + double m_mcflux_tpx; + double m_mcflux_tpy; + double m_mcflux_tpz; + double m_mcflux_vx; + double m_mcflux_vy; + double m_mcflux_vz; + int m_mcflux_tptype; + int m_mctruth_nparticles; + int m_mctruth_particles_track_Id[100]; + int m_mctruth_particles_pdg_code[100]; + int m_mctruth_particles_mother[100]; + int m_mctruth_particles_status_code[100]; + int m_mctruth_particles_num_daughters[100]; //other similar variables + int m_mctruth_particles_daughters[100][100]; + double m_mctruth_particles_Gvx[100]; + double m_mctruth_particles_Gvy[100]; + double m_mctruth_particles_Gvz[100]; + double m_mctruth_particles_Gvt[100]; + double m_mctruth_particles_px0[100]; + double m_mctruth_particles_py0[100]; + double m_mctruth_particles_pz0[100]; + double m_mctruth_particles_e0[100]; + int m_mctruth_particles_rescatter[100]; + double m_mctruth_particles_polx[100]; + double m_mctruth_particles_poly[100]; + double m_mctruth_particles_polz[100]; + int m_mctruth_neutrino_ccnc; + int m_mctruth_neutrino_mode; + int m_mctruth_neutrino_interaction_type; + int m_mctruth_neutrino_target; + int m_mctruth_neutrino_nucleon; + int m_mctruth_neutrino_quark; + double m_mctruth_neutrino_w; + double m_mctruth_neutrino_x; + double m_mctruth_neutrino_y; + double m_mctruth_neutrino_qsqr; + bool m_gtruth_is_sea_quark; + int m_gtruth_tgt_pdg; + int m_gtruth_tgt_Z; + int m_gtruth_tgt_A; + double m_gtruth_tgt_p4_x; + double m_gtruth_tgt_p4_y; + double m_gtruth_tgt_p4_z; + double m_gtruth_tgt_p4_E; + double m_gtruth_weight; + double m_gtruth_probability; + double m_gtruth_xsec; + double m_gtruth_diff_xsec; + int m_gtruth_gphase_space; + double m_gtruth_vertex_x; + double m_gtruth_vertex_y; + double m_gtruth_vertex_z; + double m_gtruth_vertex_T; + int m_gtruth_gscatter; + int m_gtruth_gint; + int m_gtruth_res_num; + int m_gtruth_num_piplus; + int m_gtruth_num_pi0; + int m_gtruth_num_piminus; + int m_gtruth_num_proton; + int m_gtruth_num_neutron; + bool m_gtruth_is_charm; + bool m_gtruth_is_strange; + int m_gtruth_charm_hadron_pdg; + int m_gtruth_strange_hadron_pdg; + int m_gtruth_decay_mode; + double m_gtruth_gx; + double m_gtruth_gy; + double m_gtruth_gt; + double m_gtruth_gw; + double m_gtruth_gQ2; + double m_gtruth_gq2; + int m_gtruth_probe_pdg; + double m_gtruth_probe_p4_x; + double m_gtruth_probe_p4_y; + double m_gtruth_probe_p4_z; + double m_gtruth_probe_p4_E; + double m_gtruth_hit_nuc_p4_x; + double m_gtruth_hit_nuc_p4_y; + double m_gtruth_hit_nuc_p4_z; + double m_gtruth_hit_nuc_p4_E; + double m_gtruth_hit_nuc_pos; + double m_gtruth_fs_had_syst_p4_x; + double m_gtruth_fs_had_syst_p4_y; + double m_gtruth_fs_had_syst_p4_z; + double m_gtruth_fs_had_syst_p4_E; + + + //----------- CRT related variables ----------------- + //for crt hits from the CRT veto product + int m_CRT_veto_nhits; /* number of CRT veto hits */ + std::vector m_CRT_veto_hit_PE; + + //fields storing information about the CRT hit closest to the flash + double m_CRT_min_hit_time; + double m_CRT_min_hit_PE; + double m_CRT_min_hit_x; + double m_CRT_min_hit_y; + double m_CRT_min_hit_z; + + //Fields storing information about all CRT hits in event + std::vector m_CRT_hits_time; + std::vector m_CRT_hits_PE; + std::vector m_CRT_hits_x; + std::vector m_CRT_hits_y; + std::vector m_CRT_hits_z; + double m_CRT_dt; //time between flash and nearest CRT hit + + double m_genie_spline_weight; + double m_genie_CV_tune_weight; + + double m_photonu_weight_low; + double m_photonu_weight_high; + //------------ Track related Variables ------------- - extern double m_track_calo_min_dEdx; - extern double m_track_calo_max_dEdx; - extern double m_track_calo_min_dEdx_hits; - extern double m_track_calo_trunc_fraction; - - extern int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ - extern std::vector m_reco_track_num_daughters; - extern std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ - extern std::vector m_reco_track_length; /* whole length of the reco track */ - extern std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ - extern std::vector m_reco_track_diry; - extern std::vector m_reco_track_dirz; - extern std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ - extern std::vector m_reco_track_starty; - extern std::vector m_reco_track_startz; - extern std::vector m_reco_track_endx; /* end of the track in cartesian X */ - extern std::vector m_reco_track_endy; - extern std::vector m_reco_track_endz; - extern std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ - extern std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ - extern std::vector m_reco_track_end_dist_to_CPA; - extern std::vector m_reco_track_start_dist_to_CPA; - extern std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ - extern std::vector m_reco_track_start_dist_to_SCB; - extern std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ - extern std::vector m_reco_track_start_in_SCB; - extern std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ - extern std::vector m_reco_track_calo_energy_plane1; - extern std::vector m_reco_track_calo_energy_plane2; - extern std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ - - extern std::vector m_reco_track_theta_yz; /* theta, phi of the track */ - extern std::vector m_reco_track_phi_yx; - - extern std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ - extern std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ - extern std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track - * set to -9999 if m_run_pi0_filter is set to true */ - - extern std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ - extern std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ - extern std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ - extern std::vector m_reco_track_spacepoint_principal1; - extern std::vector m_reco_track_spacepoint_principal2; - - extern std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ - extern std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ - - - // ---- corresponding variables on the best plane of reco track, which is defined as such------ - // if plane 2 have good hits, then plane 2 is the best-plane - // otherwise, which plane of plane 0 and 1 has more good hits will be best plane - // if none of 3 planes has good hits, then best-plane is set to -1 - extern std::vector m_reco_track_best_calo_plane; - extern std::vector m_reco_track_mean_dEdx_best_plane; - extern std::vector m_reco_track_mean_dEdx_start_half_best_plane; - extern std::vector m_reco_track_mean_dEdx_end_half_best_plane; - extern std::vector m_reco_track_good_calo_best_plane; - extern std::vector> m_reco_track_trunc_dEdx_best_plane; - extern std::vector m_reco_track_mean_trunc_dEdx_best_plane; - extern std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; - extern std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; - extern std::vector m_reco_track_trunc_PIDA_best_plane; - extern std::vector> m_reco_track_resrange_best_plane; - extern std::vector> m_reco_track_dEdx_best_plane; - - extern std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ - extern std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ - extern std::vector m_reco_track_mean_dEdx_end_half_p0; - extern std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ - extern std::vector> m_reco_track_trunc_dEdx_p0; - extern std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ - extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ - extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; - extern std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ - extern std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ - extern std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ - - extern std::vector m_reco_track_mean_dEdx_p1; - extern std::vector m_reco_track_mean_dEdx_start_half_p1; - extern std::vector m_reco_track_mean_dEdx_end_half_p1; - extern std::vector m_reco_track_good_calo_p1; - extern std::vector> m_reco_track_trunc_dEdx_p1; - extern std::vector m_reco_track_mean_trunc_dEdx_p1; - extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; - extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; - extern std::vector m_reco_track_trunc_PIDA_p1; - extern std::vector> m_reco_track_resrange_p1; - extern std::vector> m_reco_track_dEdx_p1; - - extern std::vector m_reco_track_mean_dEdx_p2; - extern std::vector m_reco_track_mean_dEdx_start_half_p2; - extern std::vector m_reco_track_mean_dEdx_end_half_p2; - extern std::vector m_reco_track_good_calo_p2; - extern std::vector> m_reco_track_trunc_dEdx_p2; - extern std::vector m_reco_track_mean_trunc_dEdx_p2; - extern std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; - extern std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; - extern std::vector m_reco_track_trunc_PIDA_p2; - extern std::vector> m_reco_track_resrange_p2; - extern std::vector> m_reco_track_dEdx_p2; - - extern std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ - extern std::vector m_reco_track_num_calo_hits_p1; - extern std::vector m_reco_track_num_calo_hits_p2; - -// std::vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ -// std::vector m_reco_track_end_to_nearest_dead_wire_plane1; -// std::vector m_reco_track_end_to_nearest_dead_wire_plane2; - - extern std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track - extern std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track - extern std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice - extern std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ - extern std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ - extern std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ - - - - - extern std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ - - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - extern std::vector m_sim_track_overlay_fraction; - extern std::vector m_sim_track_energy; - extern std::vector m_sim_track_mass; - extern std::vector m_sim_track_kinetic_energy; - extern std::vector m_sim_track_pdg; - extern std::vector m_sim_track_parent_pdg; - - /* event origin types: - * kUnknown: ??? - * kBeamNeutrino: Beam neutrinos. - * kCosmicRay: Cosmic rays. - * kSuperNovaNeutrino: Supernova neutrinos. - * kSingleParticle: single particles thrown at the detector - */ - extern std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ - extern std::vector m_sim_track_process; - extern std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ - extern std::vector m_sim_track_starty; - extern std::vector m_sim_track_startz; - extern std::vector m_sim_track_px; - extern std::vector m_sim_track_py; - extern std::vector m_sim_track_pz; - extern std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ - extern std::vector m_sim_track_endy; - extern std::vector m_sim_track_endz; - extern std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ - - extern std::vector m_sim_track_trackID; - //-------- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- - - - - extern std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP - extern std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track - extern std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice - - /*-------------------------------------------------------------------------------------*/ - extern std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane - * if there is no shower hits, set to 999 - * if there is shower hits but no track hits, set to -999 - */ - extern std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ - extern std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ - - - extern std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm - * of each plane (this is a 3 element vector) */ - extern std::vector m_isolation_num_shr_hits_win_2cm_trk; - extern std::vector m_isolation_num_shr_hits_win_5cm_trk; - extern std::vector m_isolation_num_shr_hits_win_10cm_trk; - - - extern std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits - * set to -999 if there is no unassociated hits or track hits on plane - */ - extern std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ - extern std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ - extern std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm - * on each plane (this vector has 3 elements) */ - extern std::vector m_isolation_num_unassoc_hits_win_2cm_trk; - extern std::vector m_isolation_num_unassoc_hits_win_5cm_trk; - extern std::vector m_isolation_num_unassoc_hits_win_10cm_trk; - - - /*-------------------------------------------------------------------------------------*/ - //------------ Shower related Variables ------------- - - extern std::vector m_reco_shower_num_daughters; - extern std::vector m_reco_shower_daughter_trackscore; - - extern std::vector m_reco_shower3d_exists; - extern std::vector m_reco_shower3d_startx; - extern std::vector m_reco_shower3d_starty; - extern std::vector m_reco_shower3d_startz; - extern std::vector m_reco_shower3d_dirx; - extern std::vector m_reco_shower3d_diry; - extern std::vector m_reco_shower3d_dirz; - extern std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ - extern std::vector m_reco_shower3d_phi_yx; - - extern std::vector m_reco_shower3d_openingangle; - extern std::vector m_reco_shower3d_length; - extern std::vector m_reco_shower3d_conversion_distance; - - extern std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ - extern std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ - extern std::vector m_reco_shower3d_implied_diry; - extern std::vector m_reco_shower3d_implied_dirz; - - extern std::vector m_reco_shower3d_energy_plane0; - extern std::vector m_reco_shower3d_energy_plane1; - extern std::vector m_reco_shower3d_energy_plane2; - - extern std::vector m_reco_shower3d_dEdx_plane0; - extern std::vector m_reco_shower3d_dEdx_plane1; - extern std::vector m_reco_shower3d_dEdx_plane2; - - - - extern std::vector m_reco_shower_startx; - extern std::vector m_reco_shower_starty; - extern std::vector m_reco_shower_startz; - extern std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ - extern std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ - extern std::vector m_reco_shower_start_dist_to_SCB; - extern std::vector m_reco_shower_start_in_SCB; - extern std::vector m_reco_shower_end_dist_to_active_TPC; - extern std::vector m_reco_shower_end_dist_to_SCB; - - extern std::vector m_reco_shower_dirx; /* X component of shower direction */ - extern std::vector m_reco_shower_diry; - extern std::vector m_reco_shower_dirz; - extern std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ - extern std::vector m_reco_shower_phi_yx; - - extern std::vector m_reco_shower_openingangle; - extern std::vector m_reco_shower_length; - extern std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ - - extern std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ - extern std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ - extern std::vector m_reco_shower_implied_diry; - extern std::vector m_reco_shower_implied_dirz; - - extern std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ - extern std::vector m_reco_shower_delaunay_num_triangles_plane1; - extern std::vector m_reco_shower_delaunay_num_triangles_plane2; -// -// std::vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ -// std::vector m_reco_shower_start_to_nearest_dead_wire_plane1; -// std::vector m_reco_shower_start_to_nearest_dead_wire_plane2; - - - //shower flash matching - - extern std::vector m_reco_shower_flash_shortest_distz; - extern std::vector m_reco_shower_flash_shortest_disty; - extern std::vector m_reco_shower_flash_shortest_distyz; - - extern std::vector m_reco_shower_flash_shortest_index_z; - extern std::vector m_reco_shower_flash_shortest_index_y; - extern std::vector m_reco_shower_flash_shortest_index_yz; - - extern double m_flash_optfltr_pe_beam; - extern double m_flash_optfltr_pe_beam_tot; - extern double m_flash_optfltr_pe_veto; - extern double m_flash_optfltr_pe_veto_tot; - - //end flash matching - extern std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ - extern std::vector m_reco_shower_num_hits_plane1; - extern std::vector m_reco_shower_num_hits_plane2; - extern std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ - extern std::vector m_reco_shower_delaunay_area_plane1; - extern std::vector m_reco_shower_delaunay_area_plane2; - extern std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower - extern std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower - extern std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice - extern std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice - extern std::vector m_reco_shower_trackscore; - extern std::vector m_reco_shower_pfparticle_pdg; - extern std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ - extern std::vector m_reco_shower_kalman_median_dEdx_plane0; - extern std::vector m_reco_shower_kalman_median_dEdx_plane1; - extern std::vector m_reco_shower_kalman_median_dEdx_plane2; - extern std::vector m_reco_shower_kalman_median_dEdx_allplane; - extern std::vector m_reco_shower_kalman_mean_dEdx_plane0; - extern std::vector m_reco_shower_kalman_mean_dEdx_plane1; - extern std::vector m_reco_shower_kalman_mean_dEdx_plane2; - - - - - extern std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ - - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - extern std::vector m_sim_shower_energy; - extern std::vector m_sim_shower_kinetic_energy; - extern std::vector m_sim_shower_mass; - extern std::vector m_sim_shower_pdg; - extern std::vector m_sim_shower_trackID; - extern std::vector m_sim_shower_parent_pdg; - extern std::vector m_sim_shower_parent_trackID; - extern std::vector m_sim_shower_origin; - extern std::vector m_sim_shower_process; - extern std::vector m_sim_shower_end_process; - // ----- energy, mass, pdg ... of the best-matched MCParticle for the shower ------ - - - extern std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ - extern std::vector m_sim_shower_start_y; - extern std::vector m_sim_shower_start_z; - extern std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ - extern std::vector m_sim_shower_vertex_y; - extern std::vector m_sim_shower_vertex_z; - - extern std::vector m_sim_shower_px; - extern std::vector m_sim_shower_py; - extern std::vector m_sim_shower_pz; - extern std::vector m_sim_shower_is_true_shower; - extern std::vector m_sim_shower_best_matched_plane; - extern std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on - * plane 0 over all energy deposited on plane 0 by the shower */ - extern std::vector m_sim_shower_matched_energy_fraction_plane1; - extern std::vector m_sim_shower_matched_energy_fraction_plane2; - extern std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ - extern std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco - extern std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco - extern std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice - extern std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice - - - - //------------ MCTruth related Variables ------------- - extern int m_mctruth_num; - extern int m_mctruth_origin; - extern double m_mctruth_nu_E; - extern double m_mctruth_nu_vertex_x; - extern double m_mctruth_nu_vertex_y; - extern double m_mctruth_nu_vertex_z; - extern double m_mctruth_reco_vertex_dist; - extern double m_mctruth_lepton_E; - extern int m_mctruth_nu_pdg; - extern int m_mctruth_lepton_pdg; - extern int m_mctruth_mode ; - extern int m_mctruth_interaction_type ; - extern int m_mctruth_ccnc; - extern double m_mctruth_qsqr; - extern int m_mctruth_num_daughter_particles; - extern std::vector m_mctruth_daughters_pdg; - extern std::vector m_mctruth_daughters_E; - extern std::vector m_mctruth_daughters_status_code; - extern std::vector m_mctruth_daughters_trackID; - extern std::vector m_mctruth_daughters_mother_trackID; - extern std::vector m_mctruth_daughters_px; - extern std::vector m_mctruth_daughters_py; - extern std::vector m_mctruth_daughters_pz; - extern std::vector m_mctruth_daughters_startx; - extern std::vector m_mctruth_daughters_starty; - extern std::vector m_mctruth_daughters_startz; - extern std::vector m_mctruth_daughters_time; - extern std::vector m_mctruth_daughters_endx; - extern std::vector m_mctruth_daughters_endy; - extern std::vector m_mctruth_daughters_endz; - extern std::vector m_mctruth_daughters_endtime; - extern std::vector m_mctruth_daughters_process; - extern std::vector m_mctruth_daughters_end_process; - extern int m_mctruth_num_exiting_photons ; - extern int m_mctruth_num_exiting_protons ; - extern int m_mctruth_num_exiting_pi0 ; - extern int m_mctruth_num_exiting_pipm ; - extern int m_mctruth_num_exiting_neutrons; - extern int m_mctruth_num_exiting_delta0; - extern int m_mctruth_num_exiting_deltapm; - extern int m_mctruth_num_exiting_deltapp; - extern double m_mctruth_leading_exiting_proton_energy; - extern int m_mctruth_is_delta_radiative; - extern int m_mctruth_delta_radiative_1g1p_or_1g1n; - extern double m_mctruth_delta_photon_energy; - extern double m_mctruth_delta_proton_energy; - extern double m_mctruth_delta_neutron_energy; - extern std::vector m_mctruth_exiting_delta0_num_daughters; - - extern std::vector m_mctruth_exiting_photon_trackID; - extern std::vector m_mctruth_exiting_photon_mother_trackID; - extern std::vector m_mctruth_exiting_photon_from_delta_decay; - extern std::vector m_mctruth_exiting_photon_energy; - extern std::vector m_mctruth_exiting_photon_px; - extern std::vector m_mctruth_exiting_photon_py; - extern std::vector m_mctruth_exiting_photon_pz; - - extern std::vector m_mctruth_exiting_proton_trackID; - extern std::vector m_mctruth_exiting_proton_mother_trackID; - extern std::vector m_mctruth_exiting_proton_from_delta_decay; - extern std::vector m_mctruth_exiting_proton_energy; - extern std::vector m_mctruth_exiting_proton_px; - extern std::vector m_mctruth_exiting_proton_py; - extern std::vector m_mctruth_exiting_proton_pz; - - extern std::vector m_mctruth_exiting_neutron_trackID; - extern std::vector m_mctruth_exiting_neutron_mother_trackID; - extern std::vector m_mctruth_exiting_neutron_from_delta_decay; - extern std::vector m_mctruth_exiting_neutron_energy; - extern std::vector m_mctruth_exiting_neutron_px; - extern std::vector m_mctruth_exiting_neutron_py; - extern std::vector m_mctruth_exiting_neutron_pz; - extern int m_mctruth_num_reconstructable_protons; - extern bool m_mctruth_is_reconstructable_1g1p; - extern bool m_mctruth_is_reconstructable_1g0p; - - extern std::vector m_mctruth_exiting_pi0_E; - extern std::vector m_mctruth_exiting_pi0_mom; - extern std::vector m_mctruth_exiting_pi0_px; - extern std::vector m_mctruth_exiting_pi0_py; - extern std::vector m_mctruth_exiting_pi0_pz; - - extern double m_mctruth_pi0_leading_photon_energy; - extern std::string m_mctruth_pi0_leading_photon_end_process; - extern double m_mctruth_pi0_subleading_photon_energy; - extern std::string m_mctruth_pi0_subleading_photon_end_process; - extern std::vector m_mctruth_pi0_subleading_photon_end; - extern std::vector m_mctruth_pi0_subleading_photon_start; - extern std::vector m_mctruth_pi0_leading_photon_end; - extern std::vector m_mctruth_pi0_leading_photon_start; - extern int m_mctruth_pi0_leading_photon_exiting_TPC; - extern int m_mctruth_pi0_subleading_photon_exiting_TPC; - extern std::vector m_mctruth_pi0_leading_photon_mom; - extern std::vector m_mctruth_pi0_subleading_photon_mom; - extern std::string m_truthmatching_signaldef; - - //the calo calculated quantities - extern std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes - extern std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ - extern std::vector m_reco_shower_energy_plane1; - extern std::vector m_reco_shower_energy_plane2; - extern std::vector m_reco_shower_reclustered_energy_max; - extern std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters - * close enough to it */ - extern std::vector m_reco_shower_reclustered_energy_plane1; - extern std::vector m_reco_shower_reclustered_energy_plane2; - extern std::vector m_reco_shower_plane0; - extern std::vector m_reco_shower_plane1; - extern std::vector m_reco_shower_plane2; - extern std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ - extern std::vector m_reco_shower_plane1_nhits; - extern std::vector m_reco_shower_plane2_nhits; - extern std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ - extern std::vector m_reco_shower_plane1_meanRMS; - extern std::vector m_reco_shower_plane2_meanRMS; - extern std::vector m_reco_shower_hit_wire; - extern std::vector m_reco_shower_hit_plane; - extern std::vector m_reco_shower_hit_tick; - extern std::vector m_reco_shower_spacepoint_x; - extern std::vector m_reco_shower_spacepoint_z; - extern std::vector m_reco_shower_spacepoint_y; - extern std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ - extern std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit - extern std::vector> m_reco_shower_dQdx_plane1; - extern std::vector> m_reco_shower_dQdx_plane2; - extern std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane - extern std::vector> m_reco_shower_dEdx_plane1; - extern std::vector> m_reco_shower_dEdx_plane2; - extern std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ - extern std::vector m_reco_shower_dEdx_plane1_mean; - extern std::vector m_reco_shower_dEdx_plane2_mean; - extern std::vector m_reco_shower_dEdx_plane0_max; - extern std::vector m_reco_shower_dEdx_plane1_max; - extern std::vector m_reco_shower_dEdx_plane2_max; - extern std::vector m_reco_shower_dEdx_plane0_min; - extern std::vector m_reco_shower_dEdx_plane1_min; - extern std::vector m_reco_shower_dEdx_plane2_min; - extern std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ - extern std::vector m_reco_shower_dEdx_plane1_median; - extern std::vector m_reco_shower_dEdx_plane2_median; - extern std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ - extern std::vector m_reco_shower_angle_wrt_wires_plane1; - extern std::vector m_reco_shower_angle_wrt_wires_plane2; - extern std::vector m_reco_shower_dEdx_amalgamated; - extern std::vector m_reco_shower_dEdx_amalgamated_nhits; - extern std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ - extern std::vector m_reco_shower_dQdx_plane1_median; - extern std::vector m_reco_shower_dQdx_plane2_median; - extern std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ - extern std::vector m_reco_shower_dEdx_plane1_nhits; - extern std::vector m_reco_shower_dEdx_plane2_nhits; - extern double _time2cm;//value modeled from David's shower code - // PID-related variables - extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; - extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; - extern std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; - extern std::vector m_reco_track_pid_bragg_likelihood_p_plane0; - extern std::vector m_reco_track_pid_bragg_likelihood_p_plane1; - extern std::vector m_reco_track_pid_bragg_likelihood_p_plane2; - extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; - extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; - extern std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; - extern std::vector m_reco_track_pid_pida_plane0; - extern std::vector m_reco_track_pid_pida_plane1; - extern std::vector m_reco_track_pid_pida_plane2; - extern std::vector m_reco_track_pid_chi2_mu_plane0; - extern std::vector m_reco_track_pid_chi2_mu_plane1; - extern std::vector m_reco_track_pid_chi2_mu_plane2; - extern std::vector m_reco_track_pid_chi2_p_plane0; - extern std::vector m_reco_track_pid_chi2_p_plane1; - extern std::vector m_reco_track_pid_chi2_p_plane2; - extern std::vector m_reco_track_pid_three_plane_proton_pid; - - //Geant4 - struct var_geant4{ - std::vector m_geant4_pdg; - std::vector m_geant4_trackid; - std::vector m_geant4_mother; - std::vector m_geant4_statuscode; - std::vector m_geant4_E; - std::vector m_geant4_mass; - std::vector m_geant4_px; - std::vector m_geant4_py; - std::vector m_geant4_pz; - std::vector m_geant4_vx; - std::vector m_geant4_vy; - std::vector m_geant4_vz; - std::vector m_geant4_dx; - std::vector m_geant4_dy; - std::vector m_geant4_dz; - std::vector m_geant4_process; - std::vector m_geant4_end_process; - - std::vector m_geant4_costheta; + + int m_reco_asso_tracks; /* number of track. (temp: will figure out what associate means later) */ + std::vector m_reco_track_num_daughters; + std::vector m_reco_track_daughter_trackscore; /* track score of this reco track's first daughter */ + std::vector m_reco_track_length; /* whole length of the reco track */ + std::vector m_reco_track_dirx; /* need to understand what the pair track->Direction() returns means*/ + std::vector m_reco_track_diry; + std::vector m_reco_track_dirz; + std::vector m_reco_track_startx; /* start pos of the track in cartesian X */ + std::vector m_reco_track_starty; + std::vector m_reco_track_startz; + std::vector m_reco_track_endx; /* end of the track in cartesian X */ + std::vector m_reco_track_endy; + std::vector m_reco_track_endz; + std::vector m_reco_track_end_dist_to_active_TPC; /* min distance from track end to TPC active volume boundaries */ + std::vector m_reco_track_start_dist_to_active_TPC; /* min dist from trk start to TPC active boundaries */ + std::vector m_reco_track_end_dist_to_CPA; + std::vector m_reco_track_start_dist_to_CPA; + std::vector m_reco_track_end_dist_to_SCB; /* min dist from track end to SCB */ + std::vector m_reco_track_start_dist_to_SCB; + std::vector m_reco_track_end_in_SCB; /* if track end is in SCB boundary, 1- yes, 0- no */ + std::vector m_reco_track_start_in_SCB; + std::vector m_reco_track_calo_energy_plane0; /* energy sum of hits on plane 0 that correspond to the reco track */ + std::vector m_reco_track_calo_energy_plane1; + std::vector m_reco_track_calo_energy_plane2; + std::vector m_reco_track_calo_energy_max; /* max energy of 3 plane for the reco track */ + + std::vector m_reco_track_theta_yz; /* theta, phi of the track */ + std::vector m_reco_track_phi_yx; + + std::vector m_reco_track_num_trajpoints; /* number of valid points in the track */ + std::vector m_reco_track_num_spacepoints; /* number of recob::spacepoints coresponding to the reco track */ + std::vector m_reco_track_proton_kinetic_energy; /* energy of the track, under the asssumption it's a proton track + * set to -9999 if m_run_pi0_filter is set to true */ + + std::vector m_reco_track_ordered_energy_index; /* index of m_reco_track_proton_kinetic_energy such that element values are in descending order */ + std::vector m_reco_track_ordered_displacement_index; /* index of m_reco_track_length so that track length are in descending order */ + std::vector m_reco_track_spacepoint_principal0; /* PCA of reco track (in 3D spacepoint) */ + std::vector m_reco_track_spacepoint_principal1; + std::vector m_reco_track_spacepoint_principal2; + + std::vector m_reco_track_spacepoint_chi; /* essentially sum of square of distances between spacepoint and the track line*/ + std::vector m_reco_track_spacepoint_max_dist; /* max distance between a track and its coresponding spacepoints */ + + + //corresponding variables on the best plane of reco track, which is defined as such------ + //plane 2 have good hits, then plane 2 is the best-plane + // which plane of plane 0 and 1 has more good hits will be best plane + //one of 3 planes has good hits, then best-plane is set to -1 + std::vector> m_reco_track_trunc_dEdx_best_plane; + std::vector> m_reco_track_resrange_best_plane; + std::vector> m_reco_track_dEdx_best_plane; + std::vector> m_reco_track_trunc_dEdx_p0; + std::vector> m_reco_track_resrange_p0; /* vec of residual range of good hits per reco track */ + std::vector> m_reco_track_dEdx_p0; /* vec of dEdx of good hits per reco track */ + std::vector> m_reco_track_trunc_dEdx_p1; + std::vector> m_reco_track_resrange_p1; + std::vector> m_reco_track_dEdx_p1; + std::vector> m_reco_track_trunc_dEdx_p2; + + + std::vector m_reco_track_best_calo_plane; + std::vector m_reco_track_mean_dEdx_best_plane; + std::vector m_reco_track_mean_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_dEdx_end_half_best_plane; + std::vector m_reco_track_good_calo_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_start_half_best_plane; + std::vector m_reco_track_mean_trunc_dEdx_end_half_best_plane; + std::vector m_reco_track_trunc_PIDA_best_plane; + + + std::vector m_reco_track_mean_dEdx_p0; /* mean dEdx of hits on plane 0 of the reco track */ + std::vector m_reco_track_mean_dEdx_start_half_p0; /* mean dEdx of first half of the track */ + std::vector m_reco_track_mean_dEdx_end_half_p0; + std::vector m_reco_track_good_calo_p0; /* number of good dEdx hits on plane 0 of track calorimetry */ + std::vector m_reco_track_mean_trunc_dEdx_p0; /* mean of truncated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_start_half_p0; /*mean of first half of trucated dEdx's of good hits */ + std::vector m_reco_track_mean_trunc_dEdx_end_half_p0; + std::vector m_reco_track_trunc_PIDA_p0; /* mean of constant A in residual range formula, calc'd from good hits */ + + std::vector m_reco_track_mean_dEdx_p1; + std::vector m_reco_track_mean_dEdx_start_half_p1; + std::vector m_reco_track_mean_dEdx_end_half_p1; + std::vector m_reco_track_good_calo_p1; + std::vector m_reco_track_mean_trunc_dEdx_p1; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p1; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p1; + std::vector m_reco_track_trunc_PIDA_p1; + + std::vector m_reco_track_mean_dEdx_p2; + std::vector m_reco_track_mean_dEdx_start_half_p2; + std::vector m_reco_track_mean_dEdx_end_half_p2; + std::vector m_reco_track_good_calo_p2; + std::vector m_reco_track_mean_trunc_dEdx_p2; + std::vector m_reco_track_mean_trunc_dEdx_start_half_p2; + std::vector m_reco_track_mean_trunc_dEdx_end_half_p2; + std::vector m_reco_track_trunc_PIDA_p2; + std::vector> m_reco_track_resrange_p2; + std::vector> m_reco_track_dEdx_p2; + + std::vector m_reco_track_num_calo_hits_p0; /* number of hits in calorimetry on plane 0 of each reco track */ + std::vector m_reco_track_num_calo_hits_p1; + std::vector m_reco_track_num_calo_hits_p2; + + // vector m_reco_track_end_to_nearest_dead_wire_plane0; /* distance between track end and the nearest dead wire on plane*/ + // vector m_reco_track_end_to_nearest_dead_wire_plane1; + // vector m_reco_track_end_to_nearest_dead_wire_plane2; + + std::vector m_reco_track_sliceId; //the slice id for the slice continaing the reco track + std::vector m_reco_track_nuscore; //the neutrino score of the slice containing the reco track + std::vector m_reco_track_isclearcosmic;//true if reco track is in a clear cosmic slice + std::vector m_reco_track_trackscore; /* track score of reco track, -999 if track is not found in PFPToTrackScoreMap */ + std::vector m_reco_track_pfparticle_pdg; /* PDG of track's corresponding PFParticle, -999 if track is not found in PFPToTrackScoreMap*/ + std::vector m_reco_track_is_nuslice; /* if reco track is in a neutrino slice */ + + + + + std::vector m_sim_track_matched; /* if reco track has been matched to a MCParticle, 1-YES, 0-NO */ + + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + std::vector m_sim_track_overlay_fraction; + std::vector m_sim_track_energy; + std::vector m_sim_track_mass; + std::vector m_sim_track_kinetic_energy; + std::vector m_sim_track_pdg; + std::vector m_sim_track_parent_pdg; + + std::vector m_sim_track_process; + std::vector m_sim_track_origin; /* truth origin of the matched MCParticle */ + std::vector m_sim_track_startx; /* space-charge corrected start point of the match MCParticle */ + std::vector m_sim_track_starty; + std::vector m_sim_track_startz; + std::vector m_sim_track_px; + std::vector m_sim_track_py; + std::vector m_sim_track_pz; + std::vector m_sim_track_endx; /* space-charge corrected end-point of the matched MCParticle */ + std::vector m_sim_track_endy; + std::vector m_sim_track_endz; + std::vector m_sim_track_length; /* track length calculated based on the SC-corrected start and end point of the matched MCParticle */ + + std::vector m_sim_track_trackID; + //--- energy, mass, pdg ..etc.. of the matched MCParticle of reco track ----- + + + + std::vector m_sim_track_sliceId; //the slice id for the slice continaing the sim track, based on corresponding recob:PFP + std::vector m_sim_track_nuscore; //the neutrino score of the slice containing the sim track + std::vector m_sim_track_isclearcosmic;//true if sim track is in a clear cosmic slice + + std::vector m_isolation_min_dist_trk_shr; /* minimum distance betwee shower hits and track hits on each plane + ere is no shower hits, set to 999 + ere is shower hits but no track hits, set to -999 + */ + + std::vector m_isolation_nearest_shr_hit_to_trk_wire; /* the wire number of shower hit closest to track hits */ + std::vector m_isolation_nearest_shr_hit_to_trk_time; /* the time tick of shower hit closest to track hits in the slice */ + + + std::vector m_isolation_num_shr_hits_win_1cm_trk; /* number of shower hits whose min distance to track hits <= 1cm + ch plane (this is a 3 element vector) */ + std::vector m_isolation_num_shr_hits_win_2cm_trk; + std::vector m_isolation_num_shr_hits_win_5cm_trk; + std::vector m_isolation_num_shr_hits_win_10cm_trk; + + + std::vector m_isolation_min_dist_trk_unassoc; /* of all unassociated hits, min distance to closest track hits + o -999 if there is no unassociated hits or track hits on plane + */ + + std::vector m_isolation_nearest_unassoc_hit_to_trk_wire;/* wire number of the unassociated hit that of all is nearest to track hits in the slice */ + std::vector m_isolation_nearest_unassoc_hit_to_trk_time; /* time tick of the unasso hit that is nearest to track hits in the slice */ + std::vector m_isolation_num_unassoc_hits_win_1cm_trk; /* number of unasso hits whose min distance to track hits <= 1cm + ch plane (this vector has 3 elements) */ + std::vector m_isolation_num_unassoc_hits_win_2cm_trk; + std::vector m_isolation_num_unassoc_hits_win_5cm_trk; + std::vector m_isolation_num_unassoc_hits_win_10cm_trk; + std::vector m_reco_shower_num_daughters; + std::vector m_reco_shower_daughter_trackscore; + + std::vector m_reco_shower3d_exists; + std::vector m_reco_shower3d_startx; + std::vector m_reco_shower3d_starty; + std::vector m_reco_shower3d_startz; + std::vector m_reco_shower3d_dirx; + std::vector m_reco_shower3d_diry; + std::vector m_reco_shower3d_dirz; + std::vector m_reco_shower3d_theta_yz; /* theta, phi of the 3D shower (direction) */ + std::vector m_reco_shower3d_phi_yx; + + std::vector m_reco_shower3d_openingangle; + std::vector m_reco_shower3d_length; + std::vector m_reco_shower3d_conversion_distance; + + std::vector m_reco_shower3d_impact_parameter; /* distance between vertex and 3D shower direction */ + std::vector m_reco_shower3d_implied_dirx; /* X component of the unit vector point from vertex to 3D shower start */ + std::vector m_reco_shower3d_implied_diry; + std::vector m_reco_shower3d_implied_dirz; + + std::vector m_reco_shower3d_energy_plane0; + std::vector m_reco_shower3d_energy_plane1; + std::vector m_reco_shower3d_energy_plane2; + + std::vector m_reco_shower3d_dEdx_plane0; + std::vector m_reco_shower3d_dEdx_plane1; + std::vector m_reco_shower3d_dEdx_plane2; + + + + std::vector m_reco_shower_startx; + std::vector m_reco_shower_starty; + std::vector m_reco_shower_startz; + std::vector m_reco_shower_start_dist_to_active_TPC; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_CPA; /* distance from shower start to closest TPC wall */ + std::vector m_reco_shower_start_dist_to_SCB; + std::vector m_reco_shower_start_in_SCB; + std::vector m_reco_shower_end_dist_to_active_TPC; + std::vector m_reco_shower_end_dist_to_SCB; + + std::vector m_reco_shower_dirx; /* X component of shower direction */ + std::vector m_reco_shower_diry; + std::vector m_reco_shower_dirz; + std::vector m_reco_shower_theta_yz; /* theta, phi of the shower direction */ + std::vector m_reco_shower_phi_yx; + + std::vector m_reco_shower_openingangle; + std::vector m_reco_shower_length; + std::vector m_reco_shower_conversion_distance; /* distance between shower start and vertex */ + + std::vector m_reco_shower_impact_parameter; /* distance from vertex to the shower direction */ + std::vector m_reco_shower_implied_dirx; /* the X component of the unit vector pointing from vertex to shower start */ + std::vector m_reco_shower_implied_diry; + std::vector m_reco_shower_implied_dirz; + + std::vector m_reco_shower_delaunay_num_triangles_plane0; /* num of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_num_triangles_plane1; + std::vector m_reco_shower_delaunay_num_triangles_plane2; + + // vector m_reco_shower_start_to_nearest_dead_wire_plane0;/* dist from shower start to nearest dead wire on plane 0 */ + // vector m_reco_shower_start_to_nearest_dead_wire_plane1; + // vector m_reco_shower_start_to_nearest_dead_wire_plane2; + + + + std::vector m_reco_shower_flash_shortest_distz; + std::vector m_reco_shower_flash_shortest_disty; + std::vector m_reco_shower_flash_shortest_distyz; + + std::vector m_reco_shower_flash_shortest_index_z; + std::vector m_reco_shower_flash_shortest_index_y; + std::vector m_reco_shower_flash_shortest_index_yz; + + double m_flash_optfltr_pe_beam; + double m_flash_optfltr_pe_beam_tot; + double m_flash_optfltr_pe_veto; + double m_flash_optfltr_pe_veto_tot; + + std::vector m_reco_shower_num_hits_plane0; /* number of hits on plane 0 for each shower */ + std::vector m_reco_shower_num_hits_plane1; + std::vector m_reco_shower_num_hits_plane2; + std::vector m_reco_shower_delaunay_area_plane0; /* total area of delaunay triangles found on plane 0 for each shower */ + std::vector m_reco_shower_delaunay_area_plane1; + std::vector m_reco_shower_delaunay_area_plane2; + std::vector m_reco_shower_sliceId; //the slice id for the slice continaing the reco shower + std::vector m_reco_shower_nuscore; //the neutrino score of the slice containing the reco shower + std::vector m_reco_shower_isclearcosmic;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_is_nuslice;//true if reco shower is in a clear cosmic slice + std::vector m_reco_shower_trackscore; + std::vector m_reco_shower_pfparticle_pdg; + std::vector m_reco_shower_kalman_exists; /* if there is a kalman track and reco::Calo related to this shower - 0, 1 */ + std::vector m_reco_shower_kalman_median_dEdx_plane0; + std::vector m_reco_shower_kalman_median_dEdx_plane1; + std::vector m_reco_shower_kalman_median_dEdx_plane2; + std::vector m_reco_shower_kalman_median_dEdx_allplane; + std::vector m_reco_shower_kalman_mean_dEdx_plane0; + std::vector m_reco_shower_kalman_mean_dEdx_plane1; + std::vector m_reco_shower_kalman_mean_dEdx_plane2; + + + + + std::vector m_sim_shower_matched; /* whether shower has been matched to a MCParticle, 0 - False, 1 - True */ + + std::vector m_sim_shower_energy; + std::vector m_sim_shower_kinetic_energy; + std::vector m_sim_shower_mass; + std::vector m_sim_shower_pdg; + std::vector m_sim_shower_trackID; + std::vector m_sim_shower_parent_pdg; + std::vector m_sim_shower_parent_trackID; + std::vector m_sim_shower_origin; + std::vector m_sim_shower_process; + std::vector m_sim_shower_end_process; + + + std::vector m_sim_shower_start_x; /* space charge corrected shower starting point */ + std::vector m_sim_shower_start_y; + std::vector m_sim_shower_start_z; + std::vector m_sim_shower_vertex_x; /* spacecharge corrected shower vertex */ + std::vector m_sim_shower_vertex_y; + std::vector m_sim_shower_vertex_z; + + std::vector m_sim_shower_px; + std::vector m_sim_shower_py; + std::vector m_sim_shower_pz; + std::vector m_sim_shower_is_true_shower; + std::vector m_sim_shower_best_matched_plane; + std::vector m_sim_shower_matched_energy_fraction_plane0; /* fraction of energy of the best-matched mother for shower on + 0 over all energy deposited on plane 0 by the shower */ + std::vector m_sim_shower_matched_energy_fraction_plane1; + std::vector m_sim_shower_matched_energy_fraction_plane2; + std::vector m_sim_shower_overlay_fraction; /* fraction of hits from overlay over all hits in the shower */ + std::vector m_sim_shower_sliceId; //the slice id for the slice continaing the sim shower matched to reco + std::vector m_sim_shower_nuscore; //the neutrino score of the slice containing the sim shower matched to reco + std::vector m_sim_shower_isclearcosmic;//true if sim shower matched to reco is in a clear cosmic slice + std::vector m_sim_shower_is_nuslice;//true if sim shower matched to reco is in a clear cosmic slice + + + + int m_mctruth_num; + int m_mctruth_origin; + double m_mctruth_nu_E; + double m_mctruth_nu_vertex_x; + double m_mctruth_nu_vertex_y; + double m_mctruth_nu_vertex_z; + double m_mctruth_reco_vertex_dist; + double m_mctruth_lepton_E; + int m_mctruth_nu_pdg; + int m_mctruth_lepton_pdg; + int m_mctruth_mode ; + int m_mctruth_interaction_type ; + int m_mctruth_ccnc; + double m_mctruth_qsqr; + int m_mctruth_num_daughter_particles; + std::vector m_mctruth_daughters_pdg; + std::vector m_mctruth_daughters_E; + std::vector m_mctruth_daughters_status_code; + std::vector m_mctruth_daughters_trackID; + std::vector m_mctruth_daughters_mother_trackID; + std::vector m_mctruth_daughters_px; + std::vector m_mctruth_daughters_py; + std::vector m_mctruth_daughters_pz; + std::vector m_mctruth_daughters_startx; + std::vector m_mctruth_daughters_starty; + std::vector m_mctruth_daughters_startz; + std::vector m_mctruth_daughters_time; + std::vector m_mctruth_daughters_endx; + std::vector m_mctruth_daughters_endy; + std::vector m_mctruth_daughters_endz; + std::vector m_mctruth_daughters_endtime; + std::vector m_mctruth_daughters_process; + std::vector m_mctruth_daughters_end_process; + int m_mctruth_num_exiting_photons ; + int m_mctruth_num_exiting_protons ; + int m_mctruth_num_exiting_pi0 ; + int m_mctruth_num_exiting_pipm ; + int m_mctruth_num_exiting_neutrons; + int m_mctruth_num_exiting_delta0; + int m_mctruth_num_exiting_deltapm; + int m_mctruth_num_exiting_deltapp; + double m_mctruth_leading_exiting_proton_energy; + int m_mctruth_is_delta_radiative; + int m_mctruth_delta_radiative_1g1p_or_1g1n; + double m_mctruth_delta_photon_energy; + double m_mctruth_delta_proton_energy; + double m_mctruth_delta_neutron_energy; + std::vector m_mctruth_exiting_delta0_num_daughters; + + std::vector m_mctruth_exiting_photon_trackID; + std::vector m_mctruth_exiting_photon_mother_trackID; + std::vector m_mctruth_exiting_photon_from_delta_decay; + std::vector m_mctruth_exiting_photon_energy; + std::vector m_mctruth_exiting_photon_px; + std::vector m_mctruth_exiting_photon_py; + std::vector m_mctruth_exiting_photon_pz; + + std::vector m_mctruth_exiting_proton_trackID; + std::vector m_mctruth_exiting_proton_mother_trackID; + std::vector m_mctruth_exiting_proton_from_delta_decay; + std::vector m_mctruth_exiting_proton_energy; + std::vector m_mctruth_exiting_proton_px; + std::vector m_mctruth_exiting_proton_py; + std::vector m_mctruth_exiting_proton_pz; + + std::vector m_mctruth_exiting_neutron_trackID; + std::vector m_mctruth_exiting_neutron_mother_trackID; + std::vector m_mctruth_exiting_neutron_from_delta_decay; + std::vector m_mctruth_exiting_neutron_energy; + std::vector m_mctruth_exiting_neutron_px; + std::vector m_mctruth_exiting_neutron_py; + std::vector m_mctruth_exiting_neutron_pz; + int m_mctruth_num_reconstructable_protons; + bool m_mctruth_is_reconstructable_1g1p; + bool m_mctruth_is_reconstructable_1g0p; + + std::vector m_mctruth_exiting_pi0_E; + std::vector m_mctruth_exiting_pi0_mom; + std::vector m_mctruth_exiting_pi0_px; + std::vector m_mctruth_exiting_pi0_py; + std::vector m_mctruth_exiting_pi0_pz; + + double m_mctruth_pi0_leading_photon_energy; + std::string m_mctruth_pi0_leading_photon_end_process; + double m_mctruth_pi0_subleading_photon_energy; + std::string m_mctruth_pi0_subleading_photon_end_process; + int m_mctruth_pi0_leading_photon_exiting_TPC; + int m_mctruth_pi0_subleading_photon_exiting_TPC; + std::vector m_mctruth_pi0_subleading_photon_end; + std::vector m_mctruth_pi0_subleading_photon_start; + std::vector m_mctruth_pi0_leading_photon_end; + std::vector m_mctruth_pi0_leading_photon_start; + std::vector m_mctruth_pi0_leading_photon_mom; + std::vector m_mctruth_pi0_subleading_photon_mom; + + + //the calo calculated quantities + std::vector m_reco_shower_energy_max; //for each hit in a shower, converts Q->E, and sums. The max energy of all planes + std::vector m_reco_shower_energy_plane0; /* shower energy (summed hit energy) on plan 0 */ + std::vector m_reco_shower_energy_plane1; + std::vector m_reco_shower_energy_plane2; + std::vector m_reco_shower_reclustered_energy_max; + std::vector m_reco_shower_reclustered_energy_plane0; /* total energy of the reco shower, and unassociated hit clusters + enough to it */ + std::vector m_reco_shower_reclustered_energy_plane1; + std::vector m_reco_shower_reclustered_energy_plane2; + std::vector m_reco_shower_plane0; + std::vector m_reco_shower_plane1; + std::vector m_reco_shower_plane2; + std::vector m_reco_shower_plane0_nhits; /* num of shower hits on plane 0 */ + std::vector m_reco_shower_plane1_nhits; + std::vector m_reco_shower_plane2_nhits; + std::vector m_reco_shower_plane0_meanRMS; /* the mean of RMS of the shower hit shape (in tick unit) on plane 0 */ + std::vector m_reco_shower_plane1_meanRMS; + std::vector m_reco_shower_plane2_meanRMS; + std::vector m_reco_shower_hit_wire; + std::vector m_reco_shower_hit_plane; + std::vector m_reco_shower_hit_tick; + std::vector m_reco_shower_spacepoint_x; + std::vector m_reco_shower_spacepoint_z; + std::vector m_reco_shower_spacepoint_y; + std::vector m_reco_shower_ordered_energy_index; /* indices of 'm_reco_shower_energy_max' such that energy max is in descending order */ + std::vector> m_reco_shower_dQdx_plane0; //for each shower, looks at the hits for all clusters in the plane, stores the dQ/dx for each hit + std::vector> m_reco_shower_dQdx_plane1; + std::vector> m_reco_shower_dQdx_plane2; + std::vector> m_reco_shower_dEdx_plane0; //dE/dx from the calculated dQ/dx for each hit of all clusters in shower on plane + std::vector> m_reco_shower_dEdx_plane1; + std::vector> m_reco_shower_dEdx_plane2; + std::vector m_reco_shower_dEdx_plane0_mean; /* mean of dE/dx of each hit in shower */ + std::vector m_reco_shower_dEdx_plane1_mean; + std::vector m_reco_shower_dEdx_plane2_mean; + std::vector m_reco_shower_dEdx_plane0_max; + std::vector m_reco_shower_dEdx_plane1_max; + std::vector m_reco_shower_dEdx_plane2_max; + std::vector m_reco_shower_dEdx_plane0_min; + std::vector m_reco_shower_dEdx_plane1_min; + std::vector m_reco_shower_dEdx_plane2_min; + std::vector m_reco_shower_dEdx_plane0_median;/* median of dE/dx of each hit in shower (median of vector element of m_reco_shower_dEdx_plane0) */ + std::vector m_reco_shower_dEdx_plane1_median; + std::vector m_reco_shower_dEdx_plane2_median; + std::vector m_reco_shower_angle_wrt_wires_plane0; /* angle between shower direction and wire dir on plane, in radian*/ + std::vector m_reco_shower_angle_wrt_wires_plane1; + std::vector m_reco_shower_angle_wrt_wires_plane2; + std::vector m_reco_shower_dEdx_amalgamated; + std::vector m_reco_shower_dEdx_amalgamated_nhits; + std::vector m_reco_shower_dQdx_plane0_median;/* median of dQ/dx of each hit in shower (median of m_reco_shower_dQdx_plane0) */ + std::vector m_reco_shower_dQdx_plane1_median; + std::vector m_reco_shower_dQdx_plane2_median; + std::vector m_reco_shower_dEdx_plane0_nhits; /* number of hits of all clusters of the shower on plane 0 */ + std::vector m_reco_shower_dEdx_plane1_nhits; + std::vector m_reco_shower_dEdx_plane2_nhits; + + // related variables + std::vector m_reco_track_pid_bragg_likelihood_mu_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mu_plane2; + std::vector m_reco_track_pid_bragg_likelihood_p_plane0; + std::vector m_reco_track_pid_bragg_likelihood_p_plane1; + std::vector m_reco_track_pid_bragg_likelihood_p_plane2; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane0; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane1; + std::vector m_reco_track_pid_bragg_likelihood_mip_plane2; + std::vector m_reco_track_pid_pida_plane0; + std::vector m_reco_track_pid_pida_plane1; + std::vector m_reco_track_pid_pida_plane2; + std::vector m_reco_track_pid_chi2_mu_plane0; + std::vector m_reco_track_pid_chi2_mu_plane1; + std::vector m_reco_track_pid_chi2_mu_plane2; + std::vector m_reco_track_pid_chi2_p_plane0; + std::vector m_reco_track_pid_chi2_p_plane1; + std::vector m_reco_track_pid_chi2_p_plane2; + std::vector m_reco_track_pid_three_plane_proton_pid; + + + //matching variables + int m_reco_slice_num; //total number of slices in the event + std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event + int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def + int m_matched_signal_shower_num = 0; /* number of match showers (that has unique best-matched primary photon ?) */ + std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower + std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track + + std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice + std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice + std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks + + std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower + std::vector m_reco_slice_track_matched_energy; //the energy for each matched track + std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower + std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower + //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices + + + //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- + std::vector m_matched_signal_shower_overlay_fraction; + //std::vector m_matched_signal_shower_conversion_length; + std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ + std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ + std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ + std::vector m_matched_signal_shower_is_clearcosmic; + std::vector m_matched_signal_shower_is_nuslice; + std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ + std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ + + + //-------- for reco tracks that match to a primary proton --------- + std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ + std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ + std::vector m_matched_signal_track_sliceId; + std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ + // std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_is_nuslice; + std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ + std::vector m_matched_signal_track_showers_in_slice; + + int m_matched_signal_track_num = 0; /* num of reco tracks matched to primary proton */ + + //int m_matched_signal_total_num_slices; + + //---------for reco tracks that match to a primary proton --------- + + bool m_reco_1g1p_is_same_slice; + bool m_reco_1g1p_is_multiple_slices; + bool m_reco_1g1p_is_nuslice; + bool m_reco_1g0p_is_nuslice; + double m_reco_1g1p_nuscore; + double m_reco_1g0p_nuscore; + bool m_is_matched_1g1p; + bool m_is_matched_1g0p; + bool m_no_matched_showers; + bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) + bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ }; -// extern std::vector m_geant4_pdg; -// extern std::vector m_geant4_trackid; -// extern std::vector m_geant4_mother; -// extern std::vector m_geant4_statuscode; -// extern std::vector m_geant4_E; -// extern std::vector m_geant4_mass; -// extern std::vector m_geant4_px; -// extern std::vector m_geant4_py; -// extern std::vector m_geant4_pz; -// extern std::vector m_geant4_vx; -// extern std::vector m_geant4_vy; -// extern std::vector m_geant4_vz; -// extern std::vector m_geant4_dx; -// extern std::vector m_geant4_dy; -// extern std::vector m_geant4_dz; -// extern std::vector m_geant4_process; -// extern std::vector m_geant4_end_process; -// extern std::vector m_geant4_costheta; - - //matching variables - extern int m_reco_slice_num; //total number of slices in the event - extern std::vector m_reco_slice_nuscore; //vector of the neutrino score for each slice in an event - extern int m_reco_slice_shower_num_matched_signal; //the number of sim showers matched an MCP in the signal def - extern int m_reco_slice_track_num_matched_signal; //the number of sim showers matched an MCP in the signal def - extern std::vector m_reco_slice_shower_matched_sliceId; //the slice id for each matched shower - extern std::vector m_reco_slice_track_matched_sliceId; //the slice id for each matched track - - extern std::vector m_reco_slice_num_pfps; //the total number of PFP's per slice - extern std::vector m_reco_slice_num_showers; //the subset of PFP's that are showers, ie number of showers per slice - extern std::vector m_reco_slice_num_tracks; //the subset of PFP's that are tracks - - extern std::vector m_reco_slice_shower_matched_energy; //the energy for each matched shower - extern std::vector m_reco_slice_track_matched_energy; //the energy for each matched track - extern std::vector m_reco_slice_shower_matched_conversion; //the conversion distance for each matched shower - extern std::vector m_reco_slice_shower_matched_overlay_frac; //fraction of overlay hits for each matched shower - //std::map, double > & pfParticleToNuScoreMap;//is filled during analyze slices - - - //------- matched shower: reco shower that matches to a primary photon + max energy of 3 plane > 20 + definition being ncdelta----- - extern std::vector m_matched_signal_shower_overlay_fraction; - //std::vector m_matched_signal_shower_conversion_length; - extern std::vector m_matched_signal_shower_true_E; /* energy of the best-matched MCparticle for the shower */ - extern std::vector m_matched_signal_shower_nuscore; /* the neutrino score of the slice containing the reco shower */ - extern std::vector m_matched_signal_shower_sliceId; /* reco shower slice ID */ - extern std::vector m_matched_signal_shower_is_clearcosmic; - extern int m_matched_signal_shower_num; /* number of match showers (that has unique best-matched primary photon ?) */ - extern std::vector m_matched_signal_shower_is_nuslice; - extern std::vector m_matched_signal_shower_tracks_in_slice; /* number of showers in the same slice as of this reco shower */ - extern std::vector m_matched_signal_shower_showers_in_slice; /* number of tracks in the same slice as of this reco shower */ - - - //-------- for reco tracks that match to a primary proton --------- - extern std::vector m_matched_signal_track_true_E; /* the true energy of matched MCparticle (proton) */ - extern std::vector m_matched_signal_track_nuscore; /* nu score of the slice containing the reco track */ - extern std::vector m_matched_signal_track_sliceId; - extern std::vector m_matched_signal_track_is_clearcosmic; /* if reco track is in clear cosmic slice */ - // std::vector m_matched_signal_track_is_nuslice; - extern std::vector m_matched_signal_track_is_nuslice; - extern std::vector m_matched_signal_track_tracks_in_slice; /* num of PFP that are tracks in the slice this reco track is in */ - extern std::vector m_matched_signal_track_showers_in_slice; - - extern int m_matched_signal_track_num; /* num of reco tracks matched to primary proton */ - - //int m_matched_signal_total_num_slices; - - //---------for reco tracks that match to a primary proton --------- - - extern bool m_reco_1g1p_is_same_slice; - extern bool m_reco_1g1p_is_multiple_slices; - extern bool m_reco_1g1p_is_nuslice; - extern bool m_reco_1g0p_is_nuslice; - extern double m_reco_1g1p_nuscore; - extern double m_reco_1g0p_nuscore; - extern bool m_is_matched_1g1p; - extern bool m_is_matched_1g0p; - extern bool m_no_matched_showers; - extern bool m_multiple_matched_showers; //if there is more than 1 eligible shower (match to primary photon, pass energy threshold) - extern bool m_multiple_matched_tracks; /* if there is more than 1 eligible track (match to primary proton) */ } diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 5a3dff62e..06de6a95a 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -106,7 +106,8 @@ namespace single_photon class SinglePhoton : public art::EDFilter { public: - var_geant4 m_collection_geant4; + var_all vars; + para_all paras; /** * @brief Constructor * @@ -144,733 +145,277 @@ namespace single_photon bool beginSubRun(art::SubRun& sr) override; bool endSubRun(art::SubRun& sr) override; - private: - /** - * @brief Print out scores in PFParticleMetadata - * - * @param evt the art event to analyze - * @param pfParticleHandle the handle for the PFParticle collection - */ -// void PrintOutScores(const art::Event &evt, const PFParticleHandle &pfParticleHandle) const; -// -// /** -// * @brief Collect associated tracks and showers to particles in an input particle vector -// * -// * @param particles a vector holding PFParticles from which to find the associated tracks and showers -// * @param pfParticleHandle the handle for the PFParticle collection -// * @param evt the art event to analyze -// * @param tracks a vector to hold the associated tracks -// * @param showers a vector to hold the associated showers -// */ -// void CollectTracksAndShowers(const PFParticleVector &particles,const PFParticleIdMap pfParticleMap, const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); -// -// /** -// * @brief: analyze associated tracks/showers for an PFParticle -// * @param: pParticle: PFParticle to be analyzed -// * @param: associatedTracks: a vector of asso track for pParticle -// * @param: associatedShowers: a vector of asso shower for pParticle -// * @param: tracks: associated track will be added into tracks -// * @param: showers: associated shower will be added into showers -// * @param: trackToNuPFParticleMap/showerToNuPFParticleMap: map of associated track/shower to the PFParticle -// */ -// void FillTracksAndShowers( const std::vector< art::Ptr > & associatedTracks, const std::vector< art::Ptr > & associatedShowers, const art::Ptr &pParticle , const PFParticleHandle &pfParticleHandle, const art::Event &evt, TrackVector &tracks, ShowerVector &showers, std::map< art::Ptr , art::Ptr> &trackToNuPFParticleMap, std::map< art::Ptr , art::Ptr> &showerToNuPFParticleMap); -// -// -// -// double CalcEShowerPlane(const std::vector>& hits, int plane); /* returns energy sum of hits on a certain plane */ -// /* -// *@brief Calculated the shower energy by looping over all the hits and summing the charge -// *@param hits - an art pointer of all the hits in a shower -// * -// */ -// double CalcEShower(const std::vector> &hits); /* returns max energy on any of the planes */ -// -// /** -// *@brief Takes a hit and multiplies the charge by the gain -// *@param thishitptr art pointer to a hit -// *@param plane the plane the hit is on -// **/ -// double GetQHit(art::Ptr thishitptr, int plane); -// -// -// int getNHitsPlane(std::vector> hits, int this_plane); -// double getMeanHitWidthPlane(std::vector> hits, int this_plane); -// -// -// /** -// * @brief Calculate the E value in MeV for a given hit -// * @param thishit - an individual hit -// * -// * -// * */ -// -// /** -// * @brief Calculate the E value in MeV from a given Q value -// * @param q - the charge value -// * -// * */ -// double QtoEConversion(double q); -// -// -// /** -// *@brief Takes a vector of dQ/dx values and converts to dE/dx -// *@param dqdx - vector of dqdx points -// * -// * */ -// std::vector CalcdEdxFromdQdx(std::vector dqdx); -// -// /** -// * -// *@brief For a single shower, calculates the dQdx for each hit in the clusters in the shower for a single plane -// *@param shower - a Pandora shower -// *@param clusters - all of the clusters in the shower -// *@param clusterToHitMap - a map between each cluster and all of the hits in the cluster -// *@param plane - a single plane -// * * */ -// -// std::vector CalcdQdxShower( -// const art::Ptr& shower, -// const std::vector> & clusters, -// std::map, std::vector> > & clusterToHitMap ,int plane, -// double triggeroffset, -// detinfo::DetectorPropertiesData const & theDetector); -// /** -// *@brief Gets the pitch between the 3D reconstructed shower direction and the wires for a given plane (the dx in dQdx) -// *@param shower_dir - the 3D shower direction -// *@param plane - a single plane -// * */ -// double getPitch(TVector3 shower_dir, int plane); /* distance between hit in shower direction projected on plane */ -// -// -// /** -// * -// *@brief For a 2d point on a plane in cm and a rectangle, returns true if ponint is inside or on the boundary -// *uses triangle area check -// * -// * */ -// bool isInsidev2(std::vector thishit_pos, std::vector> rectangle); -// -// -// //---------------- Potential Track Stub -------------------- -// -// /* @brief: given indices of clusters, determine if they overlap in time -// * @ arguments: cluster_planes, cluster_max_ticks, cluster_min_ticks are full vector containing plane, max/min tick information of all clusters -// * candidate_indices provided the indices of clusters of which we'd like to check the overlap -// */ -// std::pair> clusterCandidateOverlap(const std::vector & candidate_indices, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); -// -// -// /* @brief: given all clusters, and their plane, tick information, find all possible matching clusters using time information -// * @brief: candidate clusters on different plane that overlap in time tick will be grouped together -// * @return: return.first -> number of possible matches -// * return.second.first -> 2D vector, indices of clusters in every possible match -// * return.second.second -> 1D vector, time overlap fraction of clusters in every possible match -// */ -// std::pair>, std::vector>> GroupClusterCandidate(int num_clusters, const std::vector& cluster_planes, const std::vector& cluster_max_ticks, const std::vector& cluster_min_ticks); -// -// -// -// //---------------- SecondShower---- -// void SimpleSecondShowerCluster(); -// -// -// void SecondShowerSearch3D(std::vector> & showers,std::map, art::Ptr> & NormalShowerToPFParticleMap, std::vector> & tracks, std::map, art::Ptr> & normaltrkmap,art::Event const & evt); -// -// -// -// /* brief: analyze hits (second shower), find out which primary MCParticle is the best-match for these hits -// * and return a vector of 7 elements: -// * {has_found_match, PDG for the ancestor match, PDG for the mother particle of ancestor match, track ID of ancestor match, true energy of ancestor match, fraction of overlay in hits, fraction of energy deposited by the matched ancestor particle on the best-plane} -// */ -// std::vectorSecondShowerMatching(std::vector>& hitz, -// art::FindManyP& mcparticles_per_hit, -// std::vector>& mcParticleVector, -// // std::map< size_t, art::Ptr> & pfParticleIdMap, -// std::map< int ,art::Ptr > & MCParticleToTrackIdMap); -// -// -// /* analyze a cluster of hits, and return corresponding sss_score */ -// sss_score ScoreCluster(int,int,std::vector>&,double,double, const art::Ptr&); -// -// /* get the nearest N hits surrounding given position, and return a TGraph of wire-tick for these hits -// * This function is currently used in function 'SecondShowerSearch' -// * @parameter: plane, cluster are not in use -// * @note: need to make sure all the hits in hitz are on the same plane as vertex_wire -// */ -// TGraph* GetNearestNpts(int plane,int cluter,std::vector>& hitz,double vertex_wire,double vertex_tick,int Npt); -// -// -// /* brief: returns index of the first shower in showers which is close enough to one of hit in hitz */ -// int CompareToShowers(int,int,std::vector>& hitz,double,double, -// const std::vector>& showers, std::map, art::Ptr> & showertopfparticlemap, const std::map, std::vector> > & pfparticletohitsmap, double eps); -// //---------------- Isolation ----------------- -// -// -// /* for a slice, study the min distance between track hits, shower hits, and unassociated hits */ -// void IsolationStudy( -// std::vector all_PPFPs, -// const std::vector>& tracks, -// // std::map, art::Ptr> & trackToPFParticleMap, -// const std::vector>& showers, -// // std::map, art::Ptr> & showerToPFParticleMap, -// // const std::map, std::vector> > & pfParticleToHitsMap, -// // const std::map, int> & pfParticleToSliceIDMap, -// // const std::map>>& sliceIDToHitsMap, -// detinfo::DetectorPropertiesData const & theDetector); -// -// -// -// //---------------- Flashes ---------------------------- -// void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap); -// -// -// -// //---------------- Tracks ---------------------------- -// /* @brief: analyze each reco track in vector 'tracks', and save info to track-related data members */ -// -// m_reco_asso_tracks = tracks.size(); -// ResizeTracks(m_reco_asso_tracks); -// void AnalyzeTracks( -// std::vector all_PPFPs, -// const std::vector>& tracks, -// // std::map, art::Ptr> & tracktopfparticlemap, -// // std::map, std::vector>> & pfParticleToHitsMap, -// std::map, std::vector>> & pfparticletospacepointmap , -// std::map > & MCParticleToTrackIdMap, -// std::map &sliceIdToNuScoreMap -// // std::map,bool> &PFPToClearCosmicMap, -// // std::map, int>& PFPToSliceIdMap, -// // std::map,double> &PFPToTrackScoreMap, -// // std::map,bool> &PFPToNuSliceMap, -// // PFParticleIdMap &pfParticleMap -// ); -// -// void AnalyzeTrackCalo(const std::vector> &tracks, std::vector all_PPFPs); -// -// -// //(std::map, std::vector>> &trackToCaloMap); -// -// -// /* @brief: analyze MCParticle related to recob::Track if it has one -// * variables starting with 'm_sim_track_' will be updated -// * */ -// void RecoMCTracks( -// std::vector all_PPFPs, -// const std::vector>& tracks, -// //std::map,art::Ptr> & trackToPFParticleMap, -// std::map, art::Ptr > & trackToMCParticleMap, -// std::map< art::Ptr, art::Ptr> & MCParticleToMCTruthMap, -// std::vector> & mcParticleVector, -// std::map< int, art::Ptr > & MCParticleToTrackIdMap, -// //std::map& sliceIdToNuScoreMap, -// //std::map,bool>& PFPToClearCosmicMap, -// //std::map, int>& PFPToSliceIdMap, -// std::vector& vec); -// -// -// /* collect information from anab::sParticleIDAlgScores of reco track */ -// void CollectPID(std::vector> & tracks, std::vector all_PPFPs); -// //(std::map< art::Ptr, art::Ptr> & trackToPIDMap); -//// TGraph proton_length2energy_tgraph; -// -// //---------------- Showers ---------------------------- -// -// void AnalyzeShowers( -// std::vector all_PPFPs, -// const std::vector>& showers, -// // std::map,art::Ptr> & showerToPFParticleMap, -// // std::map, std::vector>> & pfParticleToHitMap, -// // std::map, std::vector> > & pfParticleToClusterMap, -// std::map, std::vector> > & clusterToHitMap , -// // std::map& sliceIdToNuScoreMap, -// // std::map,bool>& PFPToClearCosmicMap, -// // std::map, int>& PFPToSliceIdMap, -// // std::map,bool> &PFPToNuSliceMap, -// // std::map,double> &PFPToTrackScoreMap, -// // PFParticleIdMap &pfParticleMap, -// // std::map, art::Ptr>& PFPtoShowerReco3DMap, -// double triggeroffset, -// detinfo::DetectorPropertiesData const & theDetector -// ); -// -// void AnalyzeKalmanShowers( -// const std::vector>& showers, -// std::map,art::Ptr> &showerToPFParticleMap, -// std::map,art::Ptr> & pfParticlesToShowerKalmanMap, -// std::map,std::vector>>& kalmanTrackToCaloMap, -// std::map, std::vector>> & pfParticleToHitMap, -// detinfo::DetectorPropertiesData const & theDetector); -// -// /** -// * @brief: match showers to MCParticles -// * @arguments filled during function execution: -// * mcParticleVector: vector of mother particles of showers -// * objectToMCParticleMap: map of shower to its mother particle -// */ -// void showerRecoMCmatching( -// std::vector all_PPFPs, -// std::vector>& objectVector, -// std::map,art::Ptr>& objectToMCParticleMap, -// //std::map,art::Ptr>& objectToPFParticleMap, -// //std::map, std::vector> >& pfParticleToHitsMap, -// art::FindManyP& mcparticles_per_hit, -// std::vector>& mcParticleVector, -// //std::map< size_t, art::Ptr> & pfParticleIdMap, -// std::map< int ,art::Ptr > & MCParticleToTrackIdMap); -// //(std::map & sliceIdToNuScoreMap, -// //std::map,bool>& PFPToClearCosmicMap, -// //std::map, int>& PFPToSliceIdMap, -// //std::map,bool>& PFPToNuSliceMap); -// -// -// /* tranverse through mcParticleVector, and print out infos for photons */ -// int photoNuclearTesting(std::vector>& mcParticleVector); -// -// int setTPCGeom(); -// int isInTPCActive(std::vector& vec); /* if point is in active TPC volume */ -// double distToTPCActive(std::vector&vec); -// double distToCPA(std::vector&vec); -// int distToSCB(double & dist, std::vector &vec); - /* if point in active TPC, returns distance from point to closest TPC wall - * otherwise, returns -999 */ - - - // ------------ Fid Volume and SCB------------------------- // - //CHECK, no SCB stuff yet; - // double m_tpc_active_x_low; - // double m_tpc_active_x_high; - // double m_tpc_active_y_low; - // double m_tpc_active_y_high; - // double m_tpc_active_z_low ; - // double m_tpc_active_z_high; - // - // double m_SCB_YX_TOP_y1_array; - // std::vector m_SCB_YX_TOP_x1_array; - // std::vector m_SCB_YX_TOP_y2_array; - // double m_SCB_YX_TOP_x2_array; - // double m_SCB_YX_BOT_y1_array; - // std::vector m_SCB_YX_BOT_x1_array; - // std::vector m_SCB_YX_BOT_y2_array; - // double m_SCB_YX_BOT_x2_array; - // - // double m_SCB_ZX_Up_z1_array ; - // double m_SCB_ZX_Up_x1_array ; - // double m_SCB_ZX_Up_z2_array ; - // double m_SCB_ZX_Up_x2_array ; - // - // double m_SCB_ZX_Dw_z1_array; - // std::vector m_SCB_ZX_Dw_x1_array; - // std::vector m_SCB_ZX_Dw_z2_array; - // double m_SCB_ZX_Dw_x2_array; - - - //Fiducial stuff? - // int isInSCB(std::vector&); /* if point is inside SCB */ - // int isInSCB(double cut,std::vector&); - /* calc the minimum distance from point to the SC boundary,save to dist. - * return value (0, or 1) indicates whether the point is in SCB */ - - //---------------- MCTruths ---------------------------- - - /** - * @brief: analyze simb::MCTruth neutrino interaction, update truth related variable ('m_mctruth_***' ) - */ -// void AnalyzeMCTruths(std::vector> & mcTruthVector, std::vector> & mcParticleVector ); -// -//// std::map is_delta_map; -// -// //---------------- EventWeight ---------------------------- -// -// //These three are shameless steals from LArPandorHelper But overlays dont work so this is a direct clone. We will filter out later. -// -// -// //---------------- Geant4 ---------------------------- -// -// -// -// -// /** -// * @brief: given an event and a label, collect all the SimChannel with that label -// * @ param: simChannelVector: a vector of SimChannel [to be filled] -// */ -// void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr > &simChannelVector); -// -// /** -// * @brief: given a event, and a label, grab all MCParticle with that label, and fill the corresponding map for future use -// * @param: evt: event, label: given label -// * @param: truthToParticles: a map of MCTruth to a vector of MCParticle [to be filled] -// * @param: particlesToTruth: a map of MCParticle to MCTruth [to be filled] -// * @param: MCParticleToTrackIdMap: a map pf MCParticle track ID to itself [to be filled] -// */ -// void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr, std::vector>> &truthToParticles, std::map< art::Ptr, art::Ptr> &particlesToTruth, std::map< int, art::Ptr> & MCParticleToTrackIdMap); -// void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector> &hitVector, std::map< art::Ptr, std::vector > > &particlesToHits, std::map< art::Ptr, art::Ptr > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr > & MCParticleToTrackIdMap); -// -// -// //-------------- Slices/Pandora Metadata ---------------// -// -// /** -// * brief: analyze metadata of PFParticles, and fill in all these maps -// * argument: primaryPFPSliceIdVec, sliceIdToNuScoreMap, PFPToClearCosmicMap,PFPToSliceIdMap -// * PFPToNuSliceMap, PFPToTrackScoreMap will be filled in the function boby -// */ -// void AnalyzeSlices(std::map, std::vector> > & pfParticleToMetadataMap, -// PFParticleIdMap &pfParticleMap, -// std::vector,int>> & primaryPFPSliceIdVec, -// std::map & sliceIdToNuScoreMap, -// std::map,bool>& PFPToClearCosmicMap, -// std::map, int>& PFPToSliceIdMap, -// std::map,bool>& PFPToNuSliceMap, -// std::map,double>& PFPToTrackScoreMap); -// -// // void GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap, -// // std::map& sliceIdToNumPFPsMap ); -// -// std::vector GetPFPsPerSlice( std::map, int>& PFPToSliceIdMap ); /* get number of PFParticles per slice */ -// -// -// -// /* returns numbr of PFParticles that correspond to showers (and not cosmic) per slice */ -// std::vector GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, -// std::map, int>& PFPToSliceIdMap ); -// // void GetNumShowersPerSlice(std::map< art::Ptr,art::Ptr>& showerToPFParticleMap, -// // std::map, int>& PFPToSliceIdMap, -// // std::map& sliceIdToNumShowersMap ); -// -// -// /* returns numbr of PFParticles that correspond to tracks (and not cosmic) per slice */ -// std::vector GetNumTracksPerSlice(std::map< art::Ptr,art::Ptr>& trackToPFParticleMap, -// std::map, int>& PFPToSliceIdMap); -// -// /** @brief: look at reco showers and reco tracks in the event, together with MCParticle info -// * to determine how many eligible tracks and showers there are in the event -// */ -// void AnalyzeRecoMCSlices( -// std::string signal_def, -// std::vector all_PPFPs, -// std::map> & MCParticleToTrackIDMap, -// // std::map,art::Ptr > & showerToPFParticleMap, -// // std::vector,int>> & allPFPSliceIdVec, -// std::map, art::Ptr > & showerToMCParticleMap, -// // std::map,art::Ptr > & trackToNuPFParticleMap, -// std::map, art::Ptr > &trackToMCParticleMap); -// // ,std::map, int>& PFPToSliceIdMap); -// - - - - //------------------ Delaunay triangle tools -----------// - -// double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2); /* returns area of triangles */ -// int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area); /* get number of Delaunay triangle found -// * and total area of these triangles, -// * save to num_triangles & area */ -//// int delaunay_hit_wrapper(const std::vector>& hits, std::vector & num_hits, std::vector& num_triangles, std::vector & area); /* given hits, calc number of hits, Delaunay triangles and total areas on each plane */ -// -// // given a MCParticle, get its corrected vertex -// //CHECK can merge three in one? -// int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected); -// int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector & corrected); -// // given a particle, and input location calculate its corrected true position, so we can compare it to reco -// int spacecharge_correction(const art::Ptr & mcparticle, std::vector & corrected, std::vector & input); -// -// //databased http://dbdata0vm.fnal.gov:8186/uboonecon_prod/app/data?f=channelstatus_data&t=357812824 -// std::vector> bad_channel_list_fixed_mcc9; -// std::map bad_channel_map_fixed_mcc9; - - - /* @brief: given run/subrun/event number, determine if this event is in the selected event list */ - //bool IsEventInList(int run, int subrun, int event); - }; -//HEADER above? CHECK - - //Constructor from .fcl parameters - SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) - { + + //Constructor from .fcl parameters + SinglePhoton::SinglePhoton(fhicl::ParameterSet const &pset) : art::EDFilter(pset) + { std::cout<<"SinglePhoton::"<<__FUNCTION__<<" kicks off ------------------------------"<reconfigure(pset); - //Set up some detector, timing, spacecharge and geometry services + this->reconfigure(pset); + //Set up some detector, timing, spacecharge and geometry services //Keng, grab theDetector and detClocks in each event. -// theDetector = lar::providerFrom(); -// detClocks = lar::providerFrom(); -// SCE = lar::providerFrom();//Get space charge service - geom = lar::providerFrom(); + // theDetector = lar::providerFrom(); + // detClocks = lar::providerFrom(); + paras.s_SCE = lar::providerFrom();//Get space charge service + paras.s_geom = lar::providerFrom(); std::cout<<"SinglePhoton::"<<__FUNCTION__<<" now can start jobs --------------------"<("PrintOut", false); - m_is_verbose = pset.get("Verbose",false); - m_is_data = pset.get("isData",false); - m_is_overlayed = pset.get("isOverlayed",false); - m_is_textgen = pset.get("isTextGen",false); - - //some specific additonal info, default not include - m_use_PID_algorithms = pset.get("usePID",false); - m_use_delaunay = pset.get("useDelaunay",false); - m_delaunay_max_hits = pset.get("maxDelaunayHits",1000); - - //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) - m_fill_trees = pset.get("FillTrees",true); - m_run_pi0_filter = pset.get("RunPi0Filter",false); - m_run_pi0_filter_2g1p = pset.get("FilterMode2g1p",false); - m_run_pi0_filter_2g0p = pset.get("FilterMode2g0p",false); - - if(m_run_pi0_filter) m_is_data = true;// If running in filter mode, treat all as data - - //Some output for logging - std::cout<<"SinglePhoton::reconfigure || whats configured? "<("SelectEvent", false); - m_selected_event_list = pset.get("SelectEventList", ""); - - //Studies for photo nuclear EventWeights - m_runPhotoNuTruth = pset.get("RunPhotoNu",false); - - //Ability to save some FULL eventweight components, rather than run later. Useful for systematic studies. Harcoded to two currently (TODO) - m_runTrueEventweight = pset.get("RunTrueEventWeight",false); - m_true_eventweight_label = pset.get("true_eventweight_label","eventweight"); - m_Spline_CV_label = pset.get("SplineCVLabel", "eventweight");//4to4aFix"); - - - //Input ArtRoot data products - m_pandoraLabel = pset.get("PandoraLabel"); - m_trackLabel = pset.get("TrackLabel"); -//KENG m_sliceLabel = pset.get("SliceLabel","pandora"); - m_showerLabel = pset.get("ShowerLabel"); - m_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); - m_caloLabel = pset.get("CaloLabel"); - m_flashLabel = pset.get("FlashLabel"); - m_potLabel = pset.get ("POTLabel"); - m_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); -//KENG no such labels in sbnd? -//KENG m_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); -//KENG m_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); -//KENG m_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); - m_generatorLabel = pset.get ("GeneratorLabel","generator"); -//KENG m_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); -//KENG m_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); - m_geantModuleLabel = pset.get ("GeantModule","largeant"); -//KENG m_backtrackerLabel = pset.get ("BackTrackerModule","gaushitTruthMatch"); - m_hitMCParticleAssnsLabel = pset.get ("HitMCParticleAssnLabel","gaushitTruthMatch"); - m_shower3dLabel = pset.get ("Shower3DLabel","shrreco3d"); - - - - //Flash related variables. - m_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change - m_beamgate_flash_end = pset.get("beamgateEndTime",4.8); - - // m_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); -// m_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); - - //CRT related variables, should run only for RUN3+ enabled - m_runCRT = pset.get("runCRT",false); - m_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); - m_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); - m_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); - m_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl - m_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl -// m_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); - - //Some track calorimetry parameters - m_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); - m_track_calo_max_dEdx = pset.get("Max_dEdx", 30); - m_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? - m_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); - - //Some shower calorimetry parameters - m_work_function = pset.get("work_function"); - m_recombination_factor = pset.get("recombination_factor"); - m_gain_mc = pset.get>("gain_mc"); - m_gain_data = pset.get>("gain_data"); - m_wire_spacing = pset.get("wire_spacing"); - m_width_dqdx_box = pset.get("width_box"); - m_length_dqdx_box = pset.get("length_box"); - m_truthmatching_signaldef = pset.get("truthmatching_signaldef"); - - //A seperate mode to run over AllPFPs and not just slice particles - m_run_all_pfps = pset.get("runAllPFPs",false); - - - //Some paramaters for counting protons & photons - m_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); - m_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); - m_max_conv_dist = pset.get("convention_distance_cutoff", 999); - m_mass_pi0_mev = 139.57; - - //SEAviwer Settings for shower clustering and proton stub finding - //Have two sets: - //Base SEAview is for Second Shower Veto - m_runSEAview = pset.get("runSEAviewShower", false); - m_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); - m_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); - m_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); - m_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); - m_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); - m_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); - m_SEAviewNumRecoShower= pset.get("SEAviewShowerNumRecoShower", -1); - m_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); - - // Second set is for Proton Stub finding - m_runSEAviewStub = pset.get("runSEAviewStub", false); - m_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); - m_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); - m_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); - m_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); - m_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); - m_SEAviewStubNumRecoShower =pset.get("SEAviewStubNumRecoShower", -1); - m_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); - - bool_make_sss_plots = true; - - //Misc setup - setTPCGeom(); - rangen = new TRandom3(22); - - //Whats a Delta? -// std::vector delta_names = {"Delta++","Delta+","Delta-","Delta0"}; -// std::vector delta_pdg_list = {2224,2214,1114,2114}; -// for(size_t i=0; i< delta_pdg_list.size(); ++i){ -// is_delta_map[delta_pdg_list[i]] = delta_names[i]; -// is_delta_map[-delta_pdg_list[i]] ="Anti-"+delta_names[i]; -// } - - - //Text print event? Depreciated at the moment. -// if (m_print_out_event ){ -// out_stream.open("v12_ncdelta_missing_trackshower_events.txt"); -// if (!out_stream.is_open()){ -// std::cout<<"ERROR output file not open"<("PrintOut", false); + g_is_verbose = pset.get("Verbose",false); + paras.s_is_data = pset.get("isData",false); + paras.s_is_overlayed = pset.get("isOverlayed",false); + paras.s_is_textgen = pset.get("isTextGen",false); + + //some specific additonal info, default not include + paras.s_use_PID_algorithms = pset.get("usePID",false); + paras.s_use_delaunay = pset.get("useDelaunay",false); + paras.s_delaunay_max_hits = pset.get("maxDelaunayHits",1000); + + //When we moved to filter instead of analyzer, kept ability to run 2g filter. A bit depreciated (not in code, but in our use case) + paras.s_fill_trees = pset.get("FillTrees",true); + paras.s_run_pi0_filter = pset.get("RunPi0Filter",false); + paras.s_run_pi0_filter_2g1p = pset.get("FilterMode2g1p",false); + paras.s_run_pi0_filter_2g0p = pset.get("FilterMode2g0p",false); + + if(paras.s_run_pi0_filter) paras.s_is_data = true;// If running in filter mode, treat all as data + + //Some output for logging + std::cout<<"SinglePhoton::reconfigure || whats configured? "<("SelectEvent", false); + paras.s_selected_event_list = pset.get("SelectEventList", ""); + + //Studies for photo nuclear EventWeights + paras.s_runPhotoNuTruth = pset.get("RunPhotoNu",false); + + //Ability to save some FULL eventweight components, rather than run later. Useful for systematic studies. Harcoded to two currently (TODO) + paras.s_runTrueEventweight = pset.get("RunTrueEventWeight",false); + paras.s_true_eventweight_label = pset.get("true_eventweight_label","eventweight"); + paras.s_Spline_CV_label = pset.get("SplineCVLabel", "eventweight");//4to4aFix"); + + + //Input ArtRoot data products + paras.s_pandoraLabel = pset.get("PandoraLabel"); + paras.s_trackLabel = pset.get("TrackLabel"); + //KENG paras.s_sliceLabel = pset.get("SliceLabel","pandora"); + paras.s_showerLabel = pset.get("ShowerLabel"); + paras.s_pidLabel = pset.get("ParticleIDLabel","pandoracalipidSCE"); + paras.s_caloLabel = pset.get("CaloLabel"); + paras.s_flashLabel = pset.get("FlashLabel"); + paras.s_potLabel = pset.get ("POTLabel"); + paras.s_hitfinderLabel = pset.get ("HitFinderModule", "gaushit"); + //KENG no such labels in sbnd? + //KENG paras.s_badChannelLabel = pset.get ("BadChannelLabel","badmasks"); + //KENG paras.s_showerKalmanLabel = pset.get ("ShowerTrackFitter","pandoraKalmanShower"); + //KENG paras.s_showerKalmanCaloLabel = pset.get ("ShowerTrackFitterCalo","pandoraKalmanShowercali"); + paras.s_generatorLabel = pset.get ("GeneratorLabel","generator"); + //KENG paras.s_mcTrackLabel = pset.get ("MCTrackLabel","mcreco"); + //KENG paras.s_mcShowerLabel = pset.get ("MCShowerLabel","mcreco"); + paras.s_geantModuleLabel = pset.get ("GeantModule","largeant"); + //KENG paras.s_backtrackerLabel = pset.get ("BackTrackerModule","gaushitTruthMatch"); + paras.s_hitMCParticleAssnsLabel = pset.get ("HitMCParticleAssnLabel","gaushitTruthMatch"); + paras.s_shower3dLabel = pset.get ("Shower3DLabel","shrreco3d"); + + + + //Flash related variables. + paras.s_beamgate_flash_start = pset.get("beamgateStartTime",3.2); //Defaults to MC for now. Probably should change + paras.s_beamgate_flash_end = pset.get("beamgateEndTime",4.8); + + // paras.s_badChannelProducer = pset.get("BadChannelProducer","nfspl1"); + // paras.s_badChannelProducer = pset.get("BadChannelProducer","simnfspl1"); + + //CRT related variables, should run only for RUN3+ enabled + paras.s_runCRT = pset.get("runCRT",false); + paras.s_CRTTzeroLabel = pset.get("CRTTzeroLabel","crttzero"); + paras.s_CRTVetoLabel = pset.get("CRTVetoLabel","crtveto"); + paras.s_CRTHitProducer = pset.get("CRTHitProducer", "crthitcorr"); + paras.s_DTOffset = pset.get("DTOffset" , 68600.); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + paras.s_Resolution = pset.get("Resolution" , 1.0); //us, taken from ubcrt/UBCRTCosmicFilter/UBCRTCosmicFilter.fcl + // paras.s_DAQHeaderProducer = pset.get("DAQHeaderProducer" , "daq"); + + //Some track calorimetry parameters + paras.s_track_calo_min_dEdx = pset.get("Min_dEdx",0.005); + paras.s_track_calo_max_dEdx = pset.get("Max_dEdx", 30); + paras.s_track_calo_min_dEdx_hits = pset.get("Min_dEdx_hits",5); //might be good? + paras.s_track_calo_trunc_fraction = pset.get("TruncMeanFraction",20.0); + + //Some shower calorimetry parameters + paras.s_work_function = pset.get("work_function"); + paras.s_recombination_factor = pset.get("recombination_factor"); + paras.s_gain_mc = pset.get>("gain_mc"); + paras.s_gain_data = pset.get>("gain_data"); + paras.s_wire_spacing = pset.get("wire_spacing"); + paras.s_width_dqdx_box = pset.get("width_box"); + paras.s_length_dqdx_box = pset.get("length_box"); + paras.s_truthmatching_signaldef = pset.get("truthmatching_signaldef"); + + //A seperate mode to run over AllPFPs and not just slice particles + paras.s_run_all_pfps = pset.get("runAllPFPs",false); + + + //Some paramaters for counting protons & photons + paras.s_exiting_photon_energy_threshold = pset.get("exiting_photon_energy"); + paras.s_exiting_proton_energy_threshold = pset.get("exiting_proton_energy"); + paras.s_max_conv_dist = pset.get("convention_distance_cutoff", 999); + paras.s_mass_pi0_mev = 139.57; + + //SEAviwer Settings for shower clustering and proton stub finding + //Have two sets: + //Base SEAview is for Second Shower Veto + paras.s_runSEAview = pset.get("runSEAviewShower", false); + paras.s_SEAviewHitThreshold = pset.get("SEAviewShowerHitThreshold",25); + paras.s_SEAviewPlotDistance = pset.get("SEAviewShowerPlotDistance",80); + paras.s_SEAviewDbscanMinPts = pset.get("SEAviewShowerDBSCANMinPts",8); + paras.s_SEAviewDbscanEps = pset.get("SEAviewShowerDBSCANEps",4); + paras.s_SEAviewMaxPtsLinFit = pset.get("SEAviewShowerMaxHitsLinFit",20.0); + paras.s_SEAviewMakePDF = pset.get("SEAviewShowerMakePDF",false); + paras.s_SEAviewNumRecoShower= pset.get("SEAviewShowerNumRecoShower", -1); + paras.s_SEAviewNumRecoTrack = pset.get("SEAviewShowerNumRecoTrack", -1); + + // Second set is for Proton Stub finding + paras.s_runSEAviewStub = pset.get("runSEAviewStub", false); + paras.s_SEAviewStubHitThreshold = pset.get("SEAviewStubHitThreshold",25); + paras.s_SEAviewStubPlotDistance = pset.get("SEAviewStubPlotDistance",80); + paras.s_SEAviewStubDbscanMinPts = pset.get("SEAviewStubDBSCANMinPts",1); + paras.s_SEAviewStubDbscanEps = pset.get("SEAviewStubDBSCANEps",1); + paras.s_SEAviewStubMakePDF = pset.get("SEAviewStubMakePDF",false); + paras.s_SEAviewStubNumRecoShower =pset.get("SEAviewStubNumRecoShower", -1); + paras.s_SEAviewStubNumRecoTrack = pset.get("SEAviewStubNumRecoTrack", -1); + + paras.s_make_sss_plots = true; + + //Misc setup CHECK + // setTPCGeom(); + paras.rangen = new TRandom3(22); + std::cout<<"SinglePhoton::"<<__FUNCTION__<<" finishes ------------------------------"<()->DataFor(evt);//it is detinfo::DetectorClocksData + //--------------------------------------- Primary Filter------------------------------------------------------------------------------------ + // Runs over every artroot event + bool SinglePhoton::filter(art::Event &evt) + { + // //Grab services + auto detClocks = art::ServiceHandle()->DataFor(evt);//it is detinfo::DetectorClocksData auto theDetector = art::ServiceHandle()->DataFor(evt, detClocks);//it is detinfo::DetectorPropertiesData std::cout<<"SinglePhoton::"<<__FUNCTION__<<" a new event ------------------------------"<> trackVector; -// art::fill_ptr_vector(trackVector,trackHandle); + // std::vector> trackVector; + // art::fill_ptr_vector(trackVector,trackHandle); - //Collect the PFParticles from the event. This is the core! - art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> pfParticleVector; - art::fill_ptr_vector(pfParticleVector,pfParticleHandle); - //So a cross check - if (!pfParticleHandle.isValid()) - { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; - return (m_run_pi0_filter ? false : true) ; - } + //Collect the PFParticles from the event. This is the core! + art::ValidHandle> const & pfParticleHandle = evt.getValidHandle>(paras.s_pandoraLabel); + std::vector> pfParticleVector; + art::fill_ptr_vector(pfParticleVector,pfParticleHandle); + //So a cross check + if (!pfParticleHandle.isValid()) + { mf::LogDebug("SinglePhoton") << " Failed to find the PFParticles.\n"; + return (paras.s_run_pi0_filter ? false : true) ; + } - //get the cluster handle for the dQ/dx calc - art::ValidHandle> const & clusterHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector< art::Ptr > clusterVector; - art::fill_ptr_vector(clusterVector,clusterHandle); - - // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; - // typedef std::map< size_t, art::Ptr> - // Produce a map of the PFParticle IDs for fast navigation through the hierarchy -// PFParticleIdMap pfParticleMap; -// this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); - - - //And some verticies. - art::ValidHandle> const & vertexHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> vertexVector; - art::fill_ptr_vector(vertexVector,vertexHandle); - if(vertexVector.size()>0) m_number_of_vertices++; - - //PFParticle to Vertices - art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - auto pfp = pfParticleVector[i]; - pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); - } + //get the cluster handle for the dQ/dx calc + art::ValidHandle> const & clusterHandle = evt.getValidHandle>(paras.s_pandoraLabel); + std::vector< art::Ptr > clusterVector; + art::fill_ptr_vector(clusterVector,clusterHandle); + + // This is another pandora helper. I don't like PFParticle ID lookups but I guess lets keep for now; + // typedef std::map< size_t, art::Ptr> + // Produce a map of the PFParticle IDs for fast navigation through the hierarchy + // PFParticleIdMap pfParticleMap; + // this->GetPFParticleIdMap(pfParticleHandle, pfParticleMap); + + + //And some verticies. + art::ValidHandle> const & vertexHandle = evt.getValidHandle>(paras.s_pandoraLabel); + std::vector> vertexVector; + art::fill_ptr_vector(vertexVector,vertexHandle); + if(vertexVector.size()>0) vars.m_number_of_vertices++; + + //PFParticle to Vertices + art::FindManyP vertices_per_pfparticle(pfParticleHandle, evt, paras.s_pandoraLabel); + std::map< art::Ptr, std::vector> > pfParticlesToVerticesMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + auto pfp = pfParticleVector[i]; + pfParticlesToVerticesMap[pfp] =vertices_per_pfparticle.at(pfp.key()); + } - //------- 3D showers - art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, m_shower3dLabel); + //------- 3D showers + art::FindOneP showerreco3D_per_pfparticle(pfParticleHandle, evt, paras.s_shower3dLabel); + + if(g_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, paras.s_pandoraLabel); - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get PandoraMetadata"< pfPartToMetadataAssoc(pfParticleHandle, evt, m_pandoraLabel); - //PFPartciles -->Showers/Tracks - art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, m_trackLabel); - art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, m_showerLabel); + art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, evt, paras.s_trackLabel); + art::FindManyP< recob::Shower > pfPartToShowerAssoc(pfParticleHandle, evt, paras.s_showerLabel); //Assign Cluster here; - art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - art::FindManyP hits_per_cluster(clusterHandle, evt, m_pandoraLabel); + art::FindManyP clusters_per_pfparticle(pfParticleHandle, evt, paras.s_pandoraLabel); + art::FindManyP hits_per_cluster(clusterHandle, evt, paras.s_pandoraLabel); - std::map, std::vector> > pfParticleToMetadataMap; - for(size_t i=0; i< pfParticleVector.size(); ++i){ - const art::Ptr pfp = pfParticleVector[i]; - pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); - } + std::map, std::vector> > pfParticleToMetadataMap; + for(size_t i=0; i< pfParticleVector.size(); ++i){ + const art::Ptr pfp = pfParticleVector[i]; + pfParticleToMetadataMap[pfp] = pfPartToMetadataAssoc.at(pfp.key()); + } //try the new class, Keng @@ -896,337 +441,337 @@ namespace single_photon //Add slices & hits info. - //Slices - art::ValidHandle> const & sliceHandle = evt.getValidHandle>(m_pandoraLabel); - std::vector> sliceVector; - art::fill_ptr_vector(sliceVector,sliceHandle); - - //And some associations - art::FindManyP pfparticles_per_slice(sliceHandle, evt, m_pandoraLabel); - art::FindManyP hits_per_slice(sliceHandle, evt, m_pandoraLabel); - - //Slice to PFParticle - std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; - std::map> > sliceIDToPFParticlesMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - auto slice = sliceVector[i]; + //Slices + art::ValidHandle> const & sliceHandle = evt.getValidHandle>(paras.s_pandoraLabel); + std::vector> sliceVector; + art::fill_ptr_vector(sliceVector,sliceHandle); + + //And some associations + art::FindManyP pfparticles_per_slice(sliceHandle, evt, paras.s_pandoraLabel); + art::FindManyP hits_per_slice(sliceHandle, evt, paras.s_pandoraLabel); + + //Slice to PFParticle + std::map< art::Ptr, std::vector> > sliceToPFParticlesMap; + std::map> > sliceIDToPFParticlesMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; PPFP_FindSliceIDandHits(allPPFParticles, slice, pfparticles_per_slice.at(slice.key()), hits_per_slice.at(slice.key()) ); - sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); - sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); - } + sliceToPFParticlesMap[slice] =pfparticles_per_slice.at(slice.key()); + sliceIDToPFParticlesMap[slice->ID()] = pfparticles_per_slice.at(slice.key()); + } //Mark all Pandora neutrino slices as neutrino slices and assign the highes neutrino score. - pfp_w_bestnuID = DefineNuSlice(allPPFParticles); + vars.pfp_w_bestnuID = DefineNuSlice(allPPFParticles); - Output_PFParticleInfo( allPPFParticles); - ResizeSlices(m_reco_slice_num); + Save_PFParticleInfo( allPPFParticles, vars, paras); + ResizeSlices(vars.m_reco_slice_num, vars); - //Slice to Hits - std::map> > sliceIDToHitsMap; - for(size_t i=0; i< sliceVector.size(); ++i){ - - auto slice = sliceVector[i]; - sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); - } + //Slice to Hits + std::map> > sliceIDToHitsMap; + for(size_t i=0; i< sliceVector.size(); ++i){ + auto slice = sliceVector[i]; + sliceIDToHitsMap[slice->ID()] = hits_per_slice.at(slice.key()); + } - // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: - //-------------------------------- - // Produce two PFParticle vectors containing final-state particles: - // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis - // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis - std::vector< art::Ptr > nuParticles; - std::vector< art::Ptr > crParticles; + + // Once we have actual verticies, lets concentrate on JUST the neutrino PFParticles for now: + //-------------------------------- + // Produce two PFParticle vectors containing final-state particles: + // 1. Particles identified as cosmic-rays - recontructed under cosmic-hypothesis + // 2. Daughters of the neutrino PFParticle - reconstructed under the neutrino hypothesis + std::vector< art::Ptr > nuParticles; + std::vector< art::Ptr > crParticles; for(size_t jndex=0; jndex< allPPFParticles.size(); ++jndex){ PandoraPFParticle* temp_pf = &allPPFParticles[jndex]; int temp_id = temp_pf->get_AncestorID();//indentify the jndex for the ancestor PPFParticle PandoraPFParticle* temp_ancestor_ppfp = PPFP_GetPPFPFromPFID( allPPFParticles, temp_id); - if ( temp_ancestor_ppfp->get_IsNeutrino() || m_run_all_pfps){ + if ( temp_ancestor_ppfp->get_IsNeutrino() || paras.s_run_all_pfps){ nuParticles.push_back( temp_pf->pPFParticle); -// std::cout<<"Get nuParticles from pfpID "<get_PFParticleID()<get_PFParticleID()<pPFParticle); } } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, m_pandoraLabel); - std::map, std::vector> > pfParticleToSpacePointsMap; - for(size_t i=0; i< nuParticles.size(); ++i){ - const art::Ptr pfp = nuParticles[i]; - pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); - } + if(g_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Spacepoints"< spacePoints_per_pfparticle(pfParticleHandle, evt, paras.s_pandoraLabel); + std::map, std::vector> > pfParticleToSpacePointsMap; + for(size_t i=0; i< nuParticles.size(); ++i){ + const art::Ptr pfp = nuParticles[i]; + pfParticleToSpacePointsMap[pfp] = spacePoints_per_pfparticle.at(pfp.key()); + } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Clusters"<, std::vector> > pfParticleToClustersMap; - std::map, std::vector> > clusterToHitsMap; - //fill map PFP to Clusters - for(size_t i=0; i< nuParticles.size(); ++i){ - auto pfp = nuParticles[i]; - pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - } - //fill map Cluster to Hits - for(size_t i=0; i< clusterVector.size(); ++i){ - auto cluster = clusterVector[i]; - clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); - } - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToClustersMap; + std::map, std::vector> > clusterToHitsMap; + //fill map PFP to Clusters + for(size_t i=0; i< nuParticles.size(); ++i){ + auto pfp = nuParticles[i]; + pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } + //fill map Cluster to Hits + for(size_t i=0; i< clusterVector.size(); ++i){ + auto cluster = clusterVector[i]; + clusterToHitsMap[cluster] = hits_per_cluster.at(cluster.key()); + } + if(g_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Build hits to PFP Maps"<, std::vector> > pfParticleToHitsMap; + //OK Here we build two IMPORTANT maps for the analysis, (a) given a PFParticle get a vector of hits.. + //and (b) given a single hit, get the PFParticle it is in (MARK: is it only one? always? RE-MARK: Yes) + std::map, std::vector> > pfParticleToHitsMap; - //use pfp->cluster and cluster->hit to build pfp->hit map - //for each PFP - for(size_t i=0; icluster and cluster->hit to build pfp->hit map + //for each PFP + for(size_t i=0; i> clusters_vec = pfParticleToClustersMap[pfp] ; + //get the associated clusters + std::vector> clusters_vec = pfParticleToClustersMap[pfp] ; - //make empty vector to store hits - std::vector> hits_for_pfp = {}; + //make empty vector to store hits + std::vector> hits_for_pfp = {}; - //for each cluster, get the associated hits - for (art::Ptr cluster: clusters_vec){ - std::vector> hits_vec = clusterToHitsMap[cluster]; + //for each cluster, get the associated hits + for (art::Ptr cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; - //insert hits into vector - hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); - } + //insert hits into vector + hits_for_pfp.insert( hits_for_pfp.end(), hits_vec.begin(), hits_vec.end() ); + } - //fill the map - pfParticleToHitsMap[pfp] = hits_for_pfp; - - }//for each pfp - - - - /************************************************************************** - * For SEAview: grab cosmic-related PFPaticles and recob::Hits - * - **************************************************************************/ - std::map, std::vector> > cr_pfParticleToClustersMap; - std::map, std::vector> > cr_pfParticleToHitsMap; - - //first, collect all daughters of primary cosmic -// int num_primary_cosmic_particle = crParticles.size(); -// for(int i =0; i!=num_primary_cosmic_particle; ++i){ -// auto& pParticle = crParticles[i]; -// for(const size_t daughterId : pParticle->Daughters()) -// { -// if (pfParticleMap.find(daughterId) == pfParticleMap.end()) -// throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; -// -// crParticles.push_back(pfParticleMap.at(daughterId)); -// } -// } - - //second, build PFP to hits map for cosmic-related PFParticles - for(size_t i=0; i< crParticles.size(); ++i){ - auto pfp = crParticles[i]; - cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); - } + //fill the map + pfParticleToHitsMap[pfp] = hits_for_pfp; + + }//for each pfp + + + + /************************************************************************** + * For SEAview: grab cosmic-related PFPaticles and recob::Hits + * + **************************************************************************/ + std::map, std::vector> > cr_pfParticleToClustersMap; + std::map, std::vector> > cr_pfParticleToHitsMap; + + //first, collect all daughters of primary cosmic + // int nuvars.m_primary_cosmic_particle = crParticles.size(); + // for(int i =0; i!=nuvars.m_primary_cosmic_particle; ++i){ + // auto& pParticle = crParticles[i]; + // for(const size_t daughterId : pParticle->Daughters()) + // { + // if (pfParticleMap.find(daughterId) == pfParticleMap.end()) + // throw cet::exception("SinglePhoton") << " Invalid PFParticle collection!"; + // + // crParticles.push_back(pfParticleMap.at(daughterId)); + // } + // } + + //second, build PFP to hits map for cosmic-related PFParticles + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; + cr_pfParticleToClustersMap[pfp] = clusters_per_pfparticle.at(pfp.key()); + } - for(size_t i=0; i< crParticles.size(); ++i){ - auto pfp = crParticles[i]; + for(size_t i=0; i< crParticles.size(); ++i){ + auto pfp = crParticles[i]; - // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; + // std::cout<<"starting to match to hits for pfp "<Self()<> clusters_vec = cr_pfParticleToClustersMap[pfp] ; - //make empty vector to store hits - std::vector> hits_for_pfp = {}; + //make empty vector to store hits + std::vector> hits_for_pfp = {}; - // std::cout<<"-- there are "< cluster: clusters_vec){ - std::vector> hits_vec = clusterToHitsMap[cluster]; + //for each cluster, get the associated hits + for (art::Ptr cluster: clusters_vec){ + std::vector> hits_vec = clusterToHitsMap[cluster]; - // std::cout<<"looking at cluster in pfp "<Self()<<" with "<Self()<<" with "<Self()<Self()<> of the PFParticles that we are interested in. - //tracks is a vector of recob::Tracks and same for showers. - //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. - std::vector< art::Ptr > tracks; - std::vector< art::Ptr > showers; - std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; - std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; + // These are the vectors to hold the tracks and showers for the final-states of the reconstructed neutrino + //At this point, nuParticles is a std::vector< art::Ptr> of the PFParticles that we are interested in. + //tracks is a vector of recob::Tracks and same for showers. + //Implicitly, tracks.size() + showers.size() = nuParticles.size(); At this point I would like two things. + std::vector< art::Ptr > tracks; + std::vector< art::Ptr > showers; + std::map< art::Ptr , art::Ptr> trackToNuPFParticleMap; + std::map< art::Ptr , art::Ptr> showerToNuPFParticleMap; - if(m_is_verbose) std::cout<<"SinglePhoton::analyze() \t||\t Get Tracks and Showers"<get_IsNuSlice() ) continue;//pass slice not defined as nu-slice in above lines - if(temp_pf->get_HasTrack()){ - tracks.push_back(temp_pf->pTrack); - trackToNuPFParticleMap[temp_pf->pTrack] = temp_pf->pPFParticle; - } - if(temp_pf->get_HasShower()){ - showers.push_back(temp_pf->pShower); - showerToNuPFParticleMap[temp_pf->pShower] = temp_pf->pPFParticle; - } - } - - //Helper function (can be found below) to collect tracks and showers in neutrino slice - //this->CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); - - //Track Calorimetry. Bit odd here but bear with me, good to match and fill here - - //tracks - art::ValidHandle> const & trackHandle = evt.getValidHandle>(m_trackLabel); + if(!temp_pf->get_IsNuSlice() ) continue;//pass slice not defined as nu-slice in above lines + if(temp_pf->get_HasTrack()){ + tracks.push_back(temp_pf->pTrack); + trackToNuPFParticleMap[temp_pf->pTrack] = temp_pf->pPFParticle; + } + if(temp_pf->get_HasShower()){ + showers.push_back(temp_pf->pShower); + showerToNuPFParticleMap[temp_pf->pShower] = temp_pf->pPFParticle; + } + } + + //Helper function (can be found below) to collect tracks and showers in neutrino slice + //this->CollectTracksAndShowers(nuParticles, pfParticleMap, pfParticleHandle, evt, tracks, showers, trackToNuPFParticleMap, showerToNuPFParticleMap); + + //Track Calorimetry. Bit odd here but bear with me, good to match and fill here + + //tracks + art::ValidHandle> const & trackHandle = evt.getValidHandle>(paras.s_trackLabel); //Keng, use pandoraCalo to get the correct Calorimetry; - art::FindManyP calo_per_track(trackHandle, evt, m_caloLabel); -// std::map, std::vector> > trackToCalorimetryMap; - //So a cross check - if (!calo_per_track.isValid()) - { - mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; - return (m_run_pi0_filter ? false : true); - } + art::FindManyP calo_per_track(trackHandle, evt, paras.s_caloLabel); + // std::map, std::vector> > trackToCalorimetryMap; + //So a cross check + if (!calo_per_track.isValid()) + { + mf::LogDebug("SinglePhoton") << " Failed to get Assns between recob::Track and anab::Calorimetry.\n"; + return (paras.s_run_pi0_filter ? false : true); + } - art::FindOneP pid_per_track(trackHandle, evt, m_pidLabel); - std::map, art::Ptr > trackToPIDMap; - //Loop over all tracks we have to fill calorimetry map - for(size_t i=0; i< tracks.size(); ++i){ - if(calo_per_track.at(tracks[i].key()).size() ==0){ - std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."< pid_per_track(trackHandle, evt, paras.s_pidLabel); + std::map, art::Ptr > trackToPIDMap; + //Loop over all tracks we have to fill calorimetry map + for(size_t i=0; i< tracks.size(); ++i){ + if(calo_per_track.at(tracks[i].key()).size() ==0){ + std::cerr<<"Track Calorimetry Breaking! the vector of calo_per_track is of length 0 at this track."<set_Calorimetries(calo_per_track.at(tracks[i].key())); - if(m_use_PID_algorithms){ + if(paras.s_use_PID_algorithms){ temp_ppfp->set_HasPID(true); temp_ppfp->set_ParticleID(pid_per_track.at(tracks[i].key())); } - } + } - // If we want PID algorithms to run. do so here - // Build a map to get PID from PFParticles, then call PID collection function - if(m_use_PID_algorithms){//yes, as set in the FHiCL; - for(size_t i=0; i< tracks.size(); ++i){ - trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); - } - } + // If we want PID algorithms to run. do so here + // Build a map to get PID from PFParticles, then call PID collection function + if(paras.s_use_PID_algorithms){//yes, as set in the FHiCL; + for(size_t i=0; i< tracks.size(); ++i){ + trackToPIDMap[tracks[i]] = pid_per_track.at(tracks[i].key()); + } + } - //**********************************************************************************************/ - //**********************************************************************************************/ - //---------------------------------- MC TRUTH, MC Only--------------------------- - //**********************************************************************************************/ - //**********************************************************************************************/ + //**********************************************************************************************/ + //**********************************************************************************************/ + //---------------------------------- MC TRUTH, MC Only--------------------------- + //**********************************************************************************************/ + //**********************************************************************************************/ - //Get the MCtruth handles and vectors - std::vector> mcTruthVector; - std::vector> mcParticleVector; + //Get the MCtruth handles and vectors + std::vector> mcTruthVector; + std::vector> mcParticleVector; - //Then build a map from MCparticles to Hits and vice versa - std::map< art::Ptr, std::vector > > mcParticleToHitsMap; - std::map< art::Ptr, art::Ptr > hitToMCParticleMap; + //Then build a map from MCparticles to Hits and vice versa + std::map< art::Ptr, std::vector > > mcParticleToHitsMap; + std::map< art::Ptr, art::Ptr > hitToMCParticleMap; - //Apparrently a MCParticle doesn't know its origin (thanks Andy!) - //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa - //Note which map is which! //First is one-to-many. //Second is one-to-one - std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; - std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; - std::map > MCParticleToTrackIdMap; + //Apparrently a MCParticle doesn't know its origin (thanks Andy!) + //I would also like a map from MCparticle to MCtruth and then I will be done. and Vice Versa + //Note which map is which! //First is one-to-many. //Second is one-to-one + std::map< art::Ptr, std::vector>> MCTruthToMCParticlesMap; + std::map< art::Ptr, art::Ptr> MCParticleToMCTruthMap; + std::map > MCParticleToTrackIdMap; - std::vector> mcTrackVector; - std::vector> mcShowerVector; + std::vector> mcTrackVector; + std::vector> mcShowerVector; - std::vector> matchedMCParticleVector; - std::map, art::Ptr > trackToMCParticleMap; - std::map, art::Ptr > showerToMCParticleMap; + std::vector> matchedMCParticleVector; + std::map, art::Ptr > trackToMCParticleMap; + std::map, art::Ptr > showerToMCParticleMap; - //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower - std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; - std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; + //Given a simb::MCParticle we would like a map to either a sim::MCTrack or sim::MCShower + std::map< art::Ptr, art::Ptr > MCParticleToMCTrackMap; + std::map< art::Ptr, art::Ptr > MCParticleToMCShowerMap; - if(m_is_verbose){ - std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; - std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; - } + if(g_is_verbose){ + std::cout << "SinglePhoton::analyze()\t||\t Consolidated event summary:" << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of primary cosmic-ray PFParticles : " << crParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t - Number of neutrino final-state PFParticles : " << nuParticles.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are track-like : " << tracks.size() << "\n"; + std::cout << "SinglePhoton::analyze()\t||\t ... of which are showers-like : " << showers.size() << "\n"; + } - //**********************************************************************************************/ - //**********************************************************************************************/ + //**********************************************************************************************/ + //**********************************************************************************************/ - //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). -// if(!m_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); -// badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + //and now get the simb::MCparticle to both MCtrack and MCshower maps (just for the MCparticles matched ok). + // if(!paras.s_run_pi0_filter) badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); + // badChannelMatching>(badChannelVector, tracks, trackToNuPFParticleMap, pfParticleToHitsMap,geom,bad_channel_list_fixed_mcc9); - //*******************************Slices***************************************************************/ + //*******************************Slices***************************************************************/ - //these are all filled in analyze slice -// std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind - std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind - std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score - std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise -// std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's - std::map,bool> PFPToNuSliceMap; - std::map,double> PFPToTrackScoreMap; - std::map sliceIdToNumPFPsMap; + //these are all filled in analyze slice + // std::vector,int>> allPFPSliceIdVec; //stores a pair of all PFP's in the event and the slice ind + std::vector,int>> primaryPFPSliceIdVec; //stores a pair of only the primary PFP's in the event and the slice ind + std::map sliceIdToNuScoreMap; //map between a slice Id and neutrino score + std::map, bool> PFPToClearCosmicMap; //returns true for clear cosmic, false otherwise + // std::map, int> PFPToSliceIdMap; //returns the slice id for all PFP's + std::map,bool> PFPToNuSliceMap; + std::map,double> PFPToTrackScoreMap; + std::map sliceIdToNumPFPsMap; - if(m_is_verbose) std::cout<<"\nSinglePhoton::AnalyzeSlice()\t||\t Starting"<> const & flashHandle = evt.getValidHandle>(m_flashLabel); - std::vector> flashVector; - art::fill_ptr_vector(flashVector,flashHandle); + //******************************* CRT CRT***************************************************************/ + //Optical Flashes + art::ValidHandle> const & flashHandle = evt.getValidHandle>(paras.s_flashLabel); + std::vector> flashVector; + art::fill_ptr_vector(flashVector,flashHandle); - std::map, std::vector< art::Ptr>> crtvetoToFlashMap; + std::map, std::vector< art::Ptr>> crtvetoToFlashMap; - if(m_runCRT){ - art::FindManyP crtveto_per_flash(flashHandle, evt, m_CRTVetoLabel); - for(size_t i=0; i< flashVector.size(); ++i){ - crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); - } - } + if(paras.s_runCRT){ + art::FindManyP crtveto_per_flash(flashHandle, evt, paras.s_CRTVetoLabel); + for(size_t i=0; i< flashVector.size(); ++i){ + crtvetoToFlashMap[flashVector[i]] = crtveto_per_flash.at(flashVector[i].key()); + } + } - art::Handle> crthit_h; //only filled when there are hits, otherwise empty - //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; - double evt_timeGPS_nsec = -999 ; - if(m_runCRT){ - //evt.getByLabel(m_DAQHeaderProducer, rawHandle_DAQHeader); + art::Handle> crthit_h; //only filled when there are hits, otherwise empty + //art::Handle rawHandle_DAQHeader;//Keng, this is to track CRT hit time; + double evt_timeGPS_nsec = -999 ; + if(paras.s_runCRT){ + //evt.getByLabel(paras.s_DAQHeaderProducer, rawHandle_DAQHeader); // raw::DAQHeaderTimeUBooNE const& my_DAQHeader(*rawHandle_DAQHeader); @@ -1234,69 +779,65 @@ namespace single_photon art::Timestamp evtTimeGPS = evt.time(); evt_timeGPS_nsec = evtTimeGPS.timeLow(); - evt.getByLabel(m_CRTHitProducer, crthit_h); + evt.getByLabel(paras.s_CRTHitProducer, crthit_h); std::cout<<"SinglePhoton::analyze \t||\t Got CRT hits"< uBooNE_common_optFltr; -// if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ -// m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); -// m_flash_optfltr_pe_beam_tot = uBooNE_common_optFltr->PE_Beam_Total(); -// m_flash_optfltr_pe_veto = uBooNE_common_optFltr->PE_Veto(); -// m_flash_optfltr_pe_veto_tot = uBooNE_common_optFltr->PE_Veto_Total(); -// }else{ -// m_flash_optfltr_pe_beam = -999; -// m_flash_optfltr_pe_beam_tot = -999; -// m_flash_optfltr_pe_veto = -999; -// m_flash_optfltr_pe_veto_tot = -999; -// std::cout<<"No opfiltercommon product:"< uBooNE_common_optFltr; + // if(evt.getByLabel("opfiltercommon", uBooNE_common_optFltr)){ + // vars.m_flash_optfltr_pe_beam = uBooNE_common_optFltr->PE_Beam(); + // vars.m_flash_optfltr_pe_beavars.m_tot = uBooNE_common_optFltr->PE_Beavars.m_Total(); + // vars.m_flash_optfltr_pe_veto = uBooNE_common_optFltr->PE_Veto(); + // vars.m_flash_optfltr_pe_veto_tot = uBooNE_common_optFltr->PE_Veto_Total(); + // }else{ + // vars.m_flash_optfltr_pe_beam = -999; + // vars.m_flash_optfltr_pe_beavars.m_tot = -999; + // vars.m_flash_optfltr_pe_veto = -999; + // vars.m_flash_optfltr_pe_veto_tot = -999; + // std::cout<<"No opfiltercommon product:"<AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); - + //KENG no KalmanShowers in SBND? + // this->AnalyzeKalmanShowers(showers,showerToNuPFParticleMap,pfParticlesToShowerKalmanMap, kalmanTrackToCaloMap, pfParticleToHitsMap, theDetector); - //Some misc things thrown in here rather than in a proper helper function. TODO. fix - //Calc a fake shower "end" distance. How to define an end distance? good question - for(size_t i_shr = 0; i_shr s = showers[i_shr]; - const art::Ptr pfp = showerToNuPFParticleMap[s]; - const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; - m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; - m_reco_shower_end_dist_to_SCB[i_shr] = 99999; + //Some misc things thrown in here rather than in a proper helper function. TODO. fix + //Calc a fake shower "end" distance. How to define an end distance? good question + for(size_t i_shr = 0; i_shr s = showers[i_shr]; + const art::Ptr pfp = showerToNuPFParticleMap[s]; + const std::vector< art::Ptr > shr_spacepoints = pfParticleToSpacePointsMap[pfp]; - for(auto &sp: shr_spacepoints){ - std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; - m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt)); - double tmo; - distToSCB(tmo,tmp_spt); - m_reco_shower_end_dist_to_SCB[i_shr] = std::min(m_reco_shower_end_dist_to_SCB[i_shr],tmo); + vars.m_reco_shower_end_dist_to_active_TPC[i_shr] = 99999; + vars.m_reco_shower_end_dist_to_SCB[i_shr] = 99999; - //This section runs for only 1 shower events for purpose of testing delta specifics - if(showers.size()==1){ - m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); - m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); - m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); - } + for(auto &sp: shr_spacepoints){ + std::vector tmp_spt = {sp->XYZ()[0],sp->XYZ()[1] , sp->XYZ()[2]}; + vars.m_reco_shower_end_dist_to_active_TPC[i_shr] = std::min(vars.m_reco_shower_end_dist_to_active_TPC[i_shr], distToTPCActive(tmp_spt, paras)); + double tmo; + distToSCB(tmo,tmp_spt, paras); + vars.m_reco_shower_end_dist_to_SCB[i_shr] = std::min(vars.m_reco_shower_end_dist_to_SCB[i_shr],tmo); - } + //This section runs for only 1 shower events for purpose of testing delta specifics + if(showers.size()==1){ + vars.m_reco_shower_spacepoint_x.push_back(sp->XYZ()[0]); + vars.m_reco_shower_spacepoint_y.push_back(sp->XYZ()[1]); + vars.m_reco_shower_spacepoint_z.push_back(sp->XYZ()[2]); } - //******************************* MCTruth **************************************************************/ - // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. - art::ValidHandle> const & hitHandle = evt.getValidHandle>(m_hitfinderLabel); - std::vector> hitVector; - art::fill_ptr_vector(hitVector,hitHandle); + } + } + + //******************************* MCTruth **************************************************************/ + // Collect all the hits. We will need these. Lets grab both the handle as well as a vector of art::Ptr as I like both. + art::ValidHandle> const & hitHandle = evt.getValidHandle>(paras.s_hitfinderLabel); + std::vector> hitVector; + art::fill_ptr_vector(hitVector,hitHandle); - //Grab the backtracker info for MCTruth Matching - art::FindManyP mcparticles_per_hit(hitHandle, evt, m_hitMCParticleAssnsLabel); + //Grab the backtracker info for MCTruth Matching + art::FindManyP mcparticles_per_hit(hitHandle, evt, paras.s_hitMCParticleAssnsLabel); - // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. - // MCShower and MCTrack come from energy depositions in GEANT4 + // MCTruth, MCParticle, MCNeutrino information all comes directly from GENIE. + // MCShower and MCTrack come from energy depositions in GEANT4 - //Only run if its not data, i.e. MC events :) - if(!m_is_data){ + //Only run if its not data, i.e. MC events :) + if(!paras.s_is_data){ - if(!m_is_textgen){ + if(!paras.s_is_textgen){ std::vector> gTruthVector; std::cout<<"\n Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(m_generatorLabel); - art::fill_ptr_vector(gTruthVector,gTruthHandle); - if(m_is_verbose){ - for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & gTruthHandle= evt.getValidHandle>(paras.s_generatorLabel); + art::fill_ptr_vector(gTruthVector,gTruthHandle); + if(g_is_verbose){ + for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(m_generatorLabel); - art::fill_ptr_vector(mcTruthVector,mcTruthHandle); + } - //get MCPartilces (GEANT4) - art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(m_geantModuleLabel); - art::fill_ptr_vector(mcParticleVector,mcParticleHandle); + //get MCTruth (GENIE) + art::ValidHandle> const & mcTruthHandle= evt.getValidHandle>(paras.s_generatorLabel); + art::fill_ptr_vector(mcTruthVector,mcTruthHandle); - //Found inanalyze_Geant4.h - //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! + //get MCPartilces (GEANT4) + art::ValidHandle> const & mcParticleHandle= evt.getValidHandle>(paras.s_geantModuleLabel); + art::fill_ptr_vector(mcParticleVector,mcParticleHandle); - if(m_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"<> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP - std::vector match_vec; //vector of some backtracker thing - m_test_matched_hits = 0; - for(size_t j=0; j hit = hitVector[j]; + //mcc9 march miniretreat fix + std::vector> particle_vec; //vector of all MCParticles associated with a given hit in the reco PFP + std::vector match_vec; //vector of some backtracker thing + vars.m_test_matched_hits = 0; - particle_vec.clear(); match_vec.clear(); //only store per hit - mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); - if(particle_vec.size() > 0){ - m_test_matched_hits++; - } - } + for(size_t j=0; j hit = hitVector[j]; + particle_vec.clear(); match_vec.clear(); //only store per hit + mcparticles_per_hit.get(hit.key(), particle_vec, match_vec); + if(particle_vec.size() > 0){ + vars.m_test_matched_hits++; + } + } - //Important map, given a MCparticle, whats the "hits" associated - BuildMCParticleHitMaps(evt, m_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap); + //Important map, given a MCparticle, whats the "hits" associated + BuildMCParticleHitMaps(evt, paras.s_geantModuleLabel, hitVector, mcParticleToHitsMap, hitToMCParticleMap, lar_pandora::LArPandoraHelper::kAddDaughters, MCParticleToTrackIdMap, vars); - //The recoMC was originally templated for any track shower, but sufficient differences in showers emerged to have stand alone sadly - std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::track"< trk_overlay_vec = trackRecoMCmatching( tracks, - trackToMCParticleMap, - trackToNuPFParticleMap, - pfParticleToHitsMap, - mcparticles_per_hit, - matchedMCParticleVector); - std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"< trk_overlay_vec = trackRecoMCmatching( tracks, + trackToMCParticleMap, + trackToNuPFParticleMap, + pfParticleToHitsMap, + mcparticles_per_hit, + matchedMCParticleVector, + vars); + + std::cout<<"\nSinglePhoton\t||\t Starting backtracker on recob::shower"<NParticles());//assume only one MCTruth - AnalyzeMCTruths(mcTruthVector, mcParticleVector); + ResizeMCTruths(mcTruthVector[0]->NParticles(), vars);//assume only one MCTruth + AnalyzeMCTruths(mcTruthVector, mcParticleVector, vars, paras); - if(!m_is_textgen){// if Text is in the generator label, skip it. wont contain any + if(!paras.s_is_textgen){// if Text is in the generator label, skip it. wont contain any - //This is important for rebuilding MCFlux and GTruth to do eventweight + //This is important for rebuilding MCFlux and GTruth to do eventweight std::cout<<"\nSinglePhoton\t||\tStarting AnalyzeEventWeight"<> ev_evw ; - if( evt.getByLabel(m_Spline_CV_label,ev_evw)){ - - std::map> const & weight_map = ev_evw->front().fWeight; - if(ev_evw->size() > 1) std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n"<< "WARNING: eventweight slice genie fix has more than one entry\n"; - - for (auto const& x : weight_map){ - std::cout << x.first // string (key) - << ':' - << x.second.size() << std::endl ; - if(x.second.size()==1 && x.first == "splines_general_Spline"){ - m_genie_spline_weight = x.second.front(); - std::cout<<"Its a spline fix, value: "<> ev_evw_ph ; - if( evt.getByLabel("eventweight",ev_evw_ph)){ - std::map> const & weight_map = ev_evw_ph->front().fWeight; - for (auto const& x : weight_map){ - std::cout << x.first // string (key) - << ':' - << x.second.size() << std::endl ; - if(x.first == "photonuclear_photon_PhotoNuclear"){ - auto vec = x.second; - double ph_low = vec[1]; - double ph_high = vec[0]; - std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(m_true_eventweight_label); - std::map> const & weight_map = ev_evw_true->front().fWeight; - if(ev_evw_true->size() > 1) { - std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" - << "WARNING: eventweight has more than one entry\n"; - } - fmcweight=weight_map; - } - - }//end NOT textgen - - - - std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"<> ev_evw_ph ; + if( evt.getByLabel("eventweight",ev_evw_ph)){ + std::map> const & weight_map = ev_evw_ph->front().fWeight; + for (auto const& x : weight_map){ + std::cout << x.first // string (key) + << ':' + << x.second.size() << std::endl ; + if(x.first == "photonuclear_photon_PhotoNuclear"){ + auto vec = x.second; + double ph_low = vec[1]; + double ph_high = vec[0]; + std::cout<<"PhotoNuBit: "<> const & ev_evw_true = evt.getValidHandle>(paras.s_true_eventweight_label); + // std::map> const & weight_map = ev_evw_true->front().fWeight; + // if(ev_evw_true->size() > 1) { + // std::cout << __LINE__ << " " << __PRETTY_FUNCTION__ << "\n" + // << "WARNING: eventweight has more than one entry\n"; + // } + // fmcweight=weight_map; + // } + // + }//end NOT textgen + + + + std::cout<<"SinglePhoton::analyze\t||\t finnished loop for this event"<IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); + // if(!vars.m_run_all_pfps && ! paras.s_run_pi0_filter) this->IsolationStudy(allPPFParticles, tracks, trackToNuPFParticleMap, showers, showerToNuPFParticleMap, pfParticleToHitsMap, PFPToSliceIdMap, sliceIDToHitsMap, theDetector); - // ################################################### SEAview SEAview ######################################################### - // ################################################### Proton Stub ########################################### - // ------------- stub clustering --------------------------- - std::cout << "----------------- Stub clustering --------------------------- " << std::endl; - std::cout << "SEAview Stub formation: " << (m_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << m_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + // ################################################### SEAview SEAview ######################################################### + // ################################################### Proton Stub ########################################### + // ------------- stub clustering --------------------------- + std::cout << "----------------- Stub clustering --------------------------- " << std::endl; + // std::cout << "SEAview Stub formation: " << (paras.s_runSEAviewStub ? "true" : "false" ) << " nshower requirement: " << paras.s_SEAviewStubNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << paras.s_SEAviewStubNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; - if( !m_run_pi0_filter && - m_runSEAviewStub && - (m_SEAviewStubNumRecoShower== -1 || (int)showers.size()== m_SEAviewStubNumRecoShower) && - (m_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewStubNumRecoTrack)){ + if( !paras.s_run_pi0_filter && + paras.s_runSEAviewStub && + (paras.s_SEAviewStubNumRecoShower== -1 || (int)showers.size()== paras.s_SEAviewStubNumRecoShower) && + (paras.s_SEAviewStubNumRecoTrack == -1 || (int)tracks.size() == paras.s_SEAviewStubNumRecoTrack)){ - // grab all hits in the slice of the reco shower - art::Ptr p_shr = showers.front(); + // grab all hits in the slice of the reco shower + art::Ptr p_shr = showers.front(); PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(allPPFParticles, p_shr); - art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; - std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - - int p_sliceid = ppfp->get_SliceID();//PFPToSliceIdMap[p_pfp]; - auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; - - std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewStubHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - - //Setup seaviewr object -////CHECK undefined reference? Found in header, but not defined; -//Solution: add MODULE_LIBRARIES in cmake; - seaview::SEAviewer sevd("Stub_"+uniq_tag, geom, theDetector); - //Pass in any bad channels you like -// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); - //Give it a vertex to center around - sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); - - //Add the hits from just this slice, as well as hits within 150cm of the vertex - sevd.addHitsToConsider(hitVector); // std::vector> - sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view - sevd.addHitsToConsider(p_slice_hits); - - sevd.addAllHits(hitVector); // std::vector> - sevd.setHitThreshold(m_SEAviewStubHitThreshold); - - - //Add all the "nice " PFParticle Hits, as well as what to label - //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string - sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string - - //and add the SingleShower we like - sevd.addShower(p_shr); // art::Ptr - - //Add all track PFP - int i_trk = 0; - for(auto &trk: tracks){ - art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; - std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; - //sevd.addPFParticleHits(p_hits_trk,"track"); - sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); - sevd.addTrack(trk); - ++i_trk; - } + art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + int p_sliceid = ppfp->get_SliceID();//PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(paras.s_SEAviewStubHitThreshold)) + "_" + std::to_string(vars.m_run_number)+"_"+std::to_string(vars.m_subrun_number)+"_"+std::to_string(vars.m_event_number); + + //Setup seaviewr object + ////CHECK undefined reference? Found in header, but not defined; + //Solution: add MODULE_LIBRARIES in cmake; + seaview::SEAviewer sevd("Stub_"+uniq_tag,paras.s_geom, theDetector); + //Pass in any bad channels you like + // sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(vars.m_vertex_pos_x,vars.m_vertex_pos_y, vars.m_vertex_pos_z); + + //Add the hits from just this slice, as well as hits within 150cm of the vertex + sevd.addHitsToConsider(hitVector); // std::vector> + sevd.filterConsideredHits(150); //remve hits that're not within 150cm of the vertex on 2D view + sevd.addHitsToConsider(p_slice_hits); + + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(paras.s_SEAviewStubHitThreshold); + + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", vars.m_reco_shower_energy_max[0], vars.m_reco_shower_conversion_distance[0], vars.m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", vars.m_reco_track_length[i_trk], vars.m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } - //Add all cosmic-relatd PFP - for(auto &cr: crParticles){ - std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; - sevd.addPFParticleHits(p_hits_cr,"cosmic"); - } + //Add all cosmic-relatd PFP + for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } - //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. - auto vnh= sevd.calcUnassociatedHits(); - m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; - m_trackstub_unassociated_hits_below_threshold = vnh[2]; - m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; - - //Recluster, group unassociated hits into different clusters - sevd.runseaDBSCAN(m_SEAviewStubDbscanMinPts, m_SEAviewStubDbscanEps); - - //And some plotting - // If we want to plot pdfs again later, then we can't plot here - //if(m_SEAviewStubMakePDF) sevd.Print(m_SEAviewStubPlotDistance); - - //Analyze formed clusters and save info - std::vector vec_SEAclusters ; - sevd.analyzeTrackLikeClusters(m_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); - - - //And save to file. - std::cout<<"After SEAview we have "<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ - //decide not to add energy of the cluster to reco shower if it's matched - // - //if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; - //if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; - //if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; - - continue;// Dont include this as a viable cluster! - } - - ++m_trackstub_num_candidates; - //determine if this cluster is in neutrino slice - m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); - - //Fill All the bits - m_trackstub_candidate_num_hits.push_back((int)hitz.size()); - m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); - m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); - m_trackstub_candidate_plane.push_back(pl); - m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); - m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); - m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); - m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); - m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); - m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); - m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); - m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); - m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); - m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); - m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); - m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); - m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); - m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); - m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); - m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); - m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); - m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); - m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); - m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); - m_trackstub_candidate_energy.push_back(Ep); - m_trackstub_candidate_remerge.push_back(remerge); - - - //MCTruth matching for pi0's - if(m_is_data){ - m_trackstub_candidate_matched.push_back(-1); - m_trackstub_candidate_pdg.push_back(-1); - m_trackstub_candidate_parent_pdg.push_back(-1); - m_trackstub_candidate_trackid.push_back(-1); - m_trackstub_candidate_true_energy.push_back(-1); - m_trackstub_candidate_overlay_fraction.push_back(-1); - m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); - }else{ - - auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); - m_trackstub_candidate_matched.push_back(ssmatched[0]); - m_trackstub_candidate_pdg.push_back(ssmatched[1]); - m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); - m_trackstub_candidate_trackid.push_back(ssmatched[3]); - m_trackstub_candidate_true_energy.push_back(ssmatched[4]); - m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); - m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); - - //Guanqun: print out (best-matched) truth information of the cluster - std::cout << "Cluster: " << m_trackstub_num_candidates-1 << " plane: " << m_trackstub_candidate_plane.back() << ", energy: " << m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; - std::cout << "Cluster is matched: " << m_trackstub_candidate_matched.back() << ", matched PDG: " << m_trackstub_candidate_pdg.back() << " track ID: " << m_trackstub_candidate_trackid.back() << " overlay fraction: " << m_trackstub_candidate_overlay_fraction.back() << std::endl; - std::cout << "===============================================================" << std::endl; - } - sevd.SetClusterLegend(c, m_trackstub_candidate_energy.back(), m_trackstub_candidate_matched.back(), m_trackstub_candidate_pdg.back() , m_trackstub_candidate_overlay_fraction.back() ); - - - } //end of cluster loop - - // Plot the event - if(m_SEAviewStubMakePDF){ - sevd.Print(m_SEAviewStubPlotDistance); - } + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + vars.m_trackstub_num_unassociated_hits =vnh[1]+vnh[2]; + vars.m_trackstub_unassociated_hits_below_threshold = vnh[2]; + vars.m_trackstub_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(paras.s_SEAviewStubDbscanMinPts, paras.s_SEAviewStubDbscanEps); - //group clusters HERE - std::pair>, std::vector> > group_result = GroupClusterCandidate(m_trackstub_num_candidates, m_trackstub_candidate_plane, m_trackstub_candidate_max_tick, m_trackstub_candidate_min_tick); - m_trackstub_num_candidate_groups = group_result.first; - m_grouped_trackstub_candidate_indices = group_result.second.first; - m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; + //And some plotting + // If we want to plot pdfs again later, then we can't plot here + //if(vars.m_SEAviewStubMakePDF) sevd.Print(vars.m_SEAviewStubPlotDistance); + + //Analyze formed clusters and save info + std::vector vec_SEAclusters ; + sevd.analyzeTrackLikeClusters(paras.s_SEAviewStubDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + + + //And save to file. + std::cout<<"After SEAview we have "<=0 && remerge< (int)vars.m_reco_shower_reclustered_energy_plane2.size()){ + //decide not to add energy of the cluster to reco shower if it's matched + // + //if(pl==0)vars.m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + //if(pl==1)vars.m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + //if(pl==2)vars.m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! } - // --------------- shower clustering -------------------------- - std::cout << "------------- Shower clustering --------------------" << std::endl; - std::cout << "SEAview Shower cluster formation: " << (m_runSEAview ? "true" : "false" ) << " nshower requirement: " << m_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << m_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + ++vars.m_trackstub_num_candidates; + //determine if this cluster is in neutrino slice + vars.m_trackstub_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + vars.m_trackstub_candidate_num_hits.push_back((int)hitz.size()); + vars.m_trackstub_candidate_num_wires.push_back((int)ssscorz->n_wires); + vars.m_trackstub_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + vars.m_trackstub_candidate_plane.push_back(pl); + vars.m_trackstub_candidate_PCA.push_back(ssscorz->pca_0); + vars.m_trackstub_candidate_mean_tick.push_back(ssscorz->mean_tick); + vars.m_trackstub_candidate_max_tick.push_back(ssscorz->max_tick); + vars.m_trackstub_candidate_min_tick.push_back(ssscorz->min_tick); + vars.m_trackstub_candidate_min_wire.push_back(ssscorz->min_wire); + vars.m_trackstub_candidate_max_wire.push_back(ssscorz->max_wire); + vars.m_trackstub_candidate_mean_wire.push_back(ssscorz->mean_wire); + vars.m_trackstub_candidate_min_dist.push_back(ssscorz->min_dist); + vars.m_trackstub_candidate_min_impact_parameter_to_shower.push_back(clu.getMinHitImpactParam()); + vars.m_trackstub_candidate_min_conversion_dist_to_shower_start.push_back(clu.getMinHitConvDist()); + vars.m_trackstub_candidate_min_ioc_to_shower_start.push_back(clu.getMinHitIOC()); + vars.m_trackstub_candidate_ioc_based_length.push_back(clu.getIOCbasedLength()); + vars.m_trackstub_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + vars.m_trackstub_candidate_mean_ADC_first_half.push_back(clu.getMeanADCFirstHalf()); + vars.m_trackstub_candidate_mean_ADC_second_half.push_back(clu.getMeanADCSecondHalf()); + vars.m_trackstub_candidate_mean_ADC_first_to_second_ratio.push_back(clu.getMeanADCRatio()); + vars.m_trackstub_candidate_track_angle_wrt_shower_direction.push_back(clu.getTrackAngleToShowerDirection()); + vars.m_trackstub_candidate_linear_fit_chi2.push_back(clu.getLinearChi()); + vars.m_trackstub_candidate_mean_ADC.push_back(clu.getMeanADC()); + vars.m_trackstub_candidate_ADC_RMS.push_back(clu.getADCrms()); + vars.m_trackstub_candidate_energy.push_back(Ep); + vars.m_trackstub_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(paras.s_is_data){ + vars.m_trackstub_candidate_matched.push_back(-1); + vars.m_trackstub_candidate_pdg.push_back(-1); + vars.m_trackstub_candidate_parent_pdg.push_back(-1); + vars.m_trackstub_candidate_trackid.push_back(-1); + vars.m_trackstub_candidate_true_energy.push_back(-1); + vars.m_trackstub_candidate_overlay_fraction.push_back(-1); + vars.m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap, vars); + vars.m_trackstub_candidate_matched.push_back(ssmatched[0]); + vars.m_trackstub_candidate_pdg.push_back(ssmatched[1]); + vars.m_trackstub_candidate_parent_pdg.push_back(ssmatched[2]); + vars.m_trackstub_candidate_trackid.push_back(ssmatched[3]); + vars.m_trackstub_candidate_true_energy.push_back(ssmatched[4]); + vars.m_trackstub_candidate_overlay_fraction.push_back(ssmatched[5]); + vars.m_trackstub_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << vars.m_trackstub_num_candidates-1 << " plane: " << vars.m_trackstub_candidate_plane.back() << ", energy: " << vars.m_trackstub_candidate_energy.back() << ", min IOC of hit(wrt shower): " << vars.m_trackstub_candidate_min_ioc_to_shower_start.back() << "\n"; + std::cout << "Cluster is matched: " << vars.m_trackstub_candidate_matched.back() << ", matched PDG: " << vars.m_trackstub_candidate_pdg.back() << " track ID: " << vars.m_trackstub_candidate_trackid.back() << " overlay fraction: " << vars.m_trackstub_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; + } + sevd.SetClusterLegend(c, vars.m_trackstub_candidate_energy.back(), vars.m_trackstub_candidate_matched.back(), vars.m_trackstub_candidate_pdg.back() , vars.m_trackstub_candidate_overlay_fraction.back() ); - if(!m_run_pi0_filter && - m_runSEAview && - (m_SEAviewNumRecoShower == -1 || (int)showers.size()== m_SEAviewNumRecoShower) && - (m_SEAviewNumRecoTrack == -1 || (int)tracks.size() == m_SEAviewNumRecoTrack) ){ - art::Ptr p_shr = showers.front(); + } //end of cluster loop + + // Plot the event + if(paras.s_SEAviewStubMakePDF){ + sevd.Print(paras.s_SEAviewStubPlotDistance); + } + + //group clusters HERE + std::pair>, std::vector> > group_result = GroupClusterCandidate(vars.m_trackstub_num_candidates, vars.m_trackstub_candidate_plane, vars.m_trackstub_candidate_max_tick, vars.m_trackstub_candidate_min_tick); + vars.m_trackstub_num_candidate_groups = group_result.first; + vars.m_grouped_trackstub_candidate_indices = group_result.second.first; + vars.m_trackstub_candidate_group_timeoverlap_fraction = group_result.second.second; + } + + // --------------- shower clustering -------------------------- + std::cout << "------------- Shower clustering --------------------" << std::endl; + std::cout << "SEAview Shower cluster formation: " << (paras.s_runSEAview ? "true" : "false" ) << " nshower requirement: " << paras.s_SEAviewNumRecoShower << ", actual num shower: " << showers.size() << " | ntrack requirement: " << paras.s_SEAviewNumRecoTrack << ", actual num track: " << tracks.size() << std::endl; + + if(!paras.s_run_pi0_filter && + paras.s_runSEAview && + (paras.s_SEAviewNumRecoShower == -1 || (int)showers.size()== paras.s_SEAviewNumRecoShower) && + (paras.s_SEAviewNumRecoTrack == -1 || (int)tracks.size() == paras.s_SEAviewNumRecoTrack) ){ + + art::Ptr p_shr = showers.front(); PandoraPFParticle* ppfp = PPFP_GetPPFPFromShower(allPPFParticles, p_shr); - art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; - std::vector> p_hits = pfParticleToHitsMap[p_pfp]; - - - int p_sliceid = ppfp->get_SliceID();// PFPToSliceIdMap[p_pfp]; - auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; - - std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(m_SEAviewHitThreshold)) + "_" + std::to_string(m_run_number)+"_"+std::to_string(m_subrun_number)+"_"+std::to_string(m_event_number); - - //Setup seaviewr object - seaview::SEAviewer sevd("Shower_"+uniq_tag, geom, theDetector ); - //Pass in any bad channels you like -// sevd.setBadChannelList(bad_channel_list_fixed_mcc9); - //Give it a vertex to center around - sevd.loadVertex(m_vertex_pos_x,m_vertex_pos_y, m_vertex_pos_z); - - //Add hits to consider for clustering - //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV - //sevd.filterConsideredHits(150); - sevd.addHitsToConsider(p_slice_hits); - - //Add all hits in the events - sevd.addAllHits(hitVector); // std::vector> - sevd.setHitThreshold(m_SEAviewHitThreshold); - - //Add all the "nice " PFParticle Hits, as well as what to label - //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string - sevd.addPFParticleHits(p_hits, "Shower", m_reco_shower_energy_max[0], m_reco_shower_conversion_distance[0], m_reco_shower_impact_parameter[0]); //std::vector> and std::string - - //and add the SingleShower we like - sevd.addShower(p_shr); // art::Ptr - - //Add all track PFP - int i_trk = 0; - for(auto &trk: tracks){ - art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; - std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; - //sevd.addPFParticleHits(p_hits_trk,"track"); - sevd.addPFParticleHits(p_hits_trk,"track", m_reco_track_length[i_trk], m_reco_track_spacepoint_principal0[i_trk]); - sevd.addTrack(trk); - ++i_trk; - } + art::Ptr p_pfp = ppfp->pPFParticle;//showerToNuPFParticleMap[p_shr]; + std::vector> p_hits = pfParticleToHitsMap[p_pfp]; + + + int p_sliceid = ppfp->get_SliceID();// PFPToSliceIdMap[p_pfp]; + auto p_slice_hits = sliceIDToHitsMap[p_sliceid]; + + std::string uniq_tag = "HitThres_"+ std::to_string(static_cast(paras.s_SEAviewHitThreshold)) + "_" + std::to_string(vars.m_run_number)+"_"+std::to_string(vars.m_subrun_number)+"_"+std::to_string(vars.m_event_number); + + //Setup seaviewr object + seaview::SEAviewer sevd("Shower_"+uniq_tag, paras.s_geom, theDetector ); + //Pass in any bad channels you like + // sevd.setBadChannelList(bad_channel_list_fixed_mcc9); + //Give it a vertex to center around + sevd.loadVertex(vars.m_vertex_pos_x,vars.m_vertex_pos_y, vars.m_vertex_pos_z); + + //Add hits to consider for clustering + //sevd.addHitsToConsider(hitVector);// DONT do this yet, need something smarter for SSV + //sevd.filterConsideredHits(150); + sevd.addHitsToConsider(p_slice_hits); + + //Add all hits in the events + sevd.addAllHits(hitVector); // std::vector> + sevd.setHitThreshold(paras.s_SEAviewHitThreshold); + + //Add all the "nice " PFParticle Hits, as well as what to label + //sevd.addPFParticleHits(p_hits, "Shower"); //std::vector> and std::string + sevd.addPFParticleHits(p_hits, "Shower", vars.m_reco_shower_energy_max[0], vars.m_reco_shower_conversion_distance[0], vars.m_reco_shower_impact_parameter[0]); //std::vector> and std::string + + //and add the SingleShower we like + sevd.addShower(p_shr); // art::Ptr + + //Add all track PFP + int i_trk = 0; + for(auto &trk: tracks){ + art::Ptr p_pfp_trk = trackToNuPFParticleMap[trk]; + std::vector> p_hits_trk = pfParticleToHitsMap[p_pfp_trk]; + //sevd.addPFParticleHits(p_hits_trk,"track"); + sevd.addPFParticleHits(p_hits_trk,"track", vars.m_reco_track_length[i_trk], vars.m_reco_track_spacepoint_principal0[i_trk]); + sevd.addTrack(trk); + ++i_trk; + } - //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 - /*for(auto &cr: crParticles){ - std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; - sevd.addPFParticleHits(p_hits_cr,"cosmic"); - } - */ - - //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. - auto vnh= sevd.calcUnassociatedHits(); - m_sss_num_unassociated_hits =vnh[1]+vnh[2]; - m_sss_num_unassociated_hits_below_threshold = vnh[2]; - m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; - - //Recluster, group unassociated hits into different clusters - sevd.runseaDBSCAN(m_SEAviewDbscanMinPts, m_SEAviewDbscanEps); - - - //This is the place I will put the new Second Shower Search - std::vector vec_SEAclusters ; - sevd.analyzeShowerLikeClusters(m_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); - - //And save to file. - std::cout<<"After SEAview we have "<=0 && remerge< (int)m_reco_shower_reclustered_energy_plane2.size()){ - if(pl==0)m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; - if(pl==1)m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; - if(pl==2)m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; - - continue;// Dont include this as a viable cluster! - } - - ++m_sss_num_candidates; - - //determine if this cluster is in neutrino slice - m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); - - //Fill All the bits - m_sss_candidate_num_hits.push_back((int)hitz.size()); - m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); - m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); - m_sss_candidate_plane.push_back(pl); - m_sss_candidate_PCA.push_back(ssscorz->pca_0); - m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); - m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); - m_sss_candidate_fit_constant.push_back(clu.getFitCons()); - m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); - m_sss_candidate_max_tick.push_back(ssscorz->max_tick); - m_sss_candidate_min_tick.push_back(ssscorz->min_tick); - m_sss_candidate_min_wire.push_back(ssscorz->min_wire); - m_sss_candidate_max_wire.push_back(ssscorz->max_wire); - m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); - m_sss_candidate_min_dist.push_back(ssscorz->min_dist); - m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); - m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); - m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); - m_sss_candidate_energy.push_back(Ep); - m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); - m_sss_candidate_remerge.push_back(remerge); - - - //MCTruth matching for pi0's - if(m_is_data){ - m_sss_candidate_matched.push_back(-1); - m_sss_candidate_pdg.push_back(-1); - m_sss_candidate_parent_pdg.push_back(-1); - m_sss_candidate_trackid.push_back(-1); - m_sss_candidate_true_energy.push_back(-1); - m_sss_candidate_overlay_fraction.push_back(-1); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); - }else{ - - auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap); - m_sss_candidate_matched.push_back(ssmatched[0]); - m_sss_candidate_pdg.push_back(ssmatched[1]); - m_sss_candidate_parent_pdg.push_back(ssmatched[2]); - m_sss_candidate_trackid.push_back(ssmatched[3]); - m_sss_candidate_true_energy.push_back(ssmatched[4]); - m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); - m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); - - //Guanqun: print out (best-matched) truth information of the cluster - std::cout << "Cluster: " << m_sss_num_candidates-1 << " plane: " << m_sss_candidate_plane.back() << ", energy: " << m_sss_candidate_energy.back() << "\n"; - std::cout << "Cluster is matched: " << m_sss_candidate_matched.back() << ", matched PDG: " << m_sss_candidate_pdg.back() << " track ID: " << m_sss_candidate_trackid.back() << " overlay fraction: " << m_sss_candidate_overlay_fraction.back() << std::endl; - std::cout << "===============================================================" << std::endl; - } - - - sevd.SetClusterLegend(c, m_sss_candidate_energy.back(), m_sss_candidate_matched.back(), m_sss_candidate_pdg.back() , m_sss_candidate_overlay_fraction.back() ); - - } //end of cluster loop - - // Plot the event - if(m_SEAviewMakePDF){ - sevd.Print(m_SEAviewPlotDistance); - } + //Add all cosmic-relatd PFP // DONT do this yet, see line 1206 + /*for(auto &cr: crParticles){ + std::vector> p_hits_cr = cr_pfParticleToHitsMap[cr]; + sevd.addPFParticleHits(p_hits_cr,"cosmic"); + } + */ + + //We then calculate Unassociated hits, i.e the hits not associated to the "Shower" or tracksyou passed in. + auto vnh= sevd.calcUnassociatedHits(); + vars.m_sss_num_unassociated_hits =vnh[1]+vnh[2]; + vars.m_sss_num_unassociated_hits_below_threshold = vnh[2]; + vars.m_sss_num_associated_hits = vnh[0]-vnh[1]-vnh[2]; + + //Recluster, group unassociated hits into different clusters + sevd.runseaDBSCAN(paras.s_SEAviewDbscanMinPts, paras.s_SEAviewDbscanEps); + + + //This is the place I will put the new Second Shower Search + std::vector vec_SEAclusters ; + sevd.analyzeShowerLikeClusters(paras.s_SEAviewDbscanEps, showerToNuPFParticleMap, pfParticleToHitsMap, vec_SEAclusters); + //And save to file. + std::cout<<"After SEAview we have "<=0 && remerge< (int)vars.m_reco_shower_reclustered_energy_plane2.size()){ + if(pl==0)vars.m_reco_shower_reclustered_energy_plane0[remerge]+=Ep; + if(pl==1)vars.m_reco_shower_reclustered_energy_plane1[remerge]+=Ep; + if(pl==2)vars.m_reco_shower_reclustered_energy_plane2[remerge]+=Ep; + + continue;// Dont include this as a viable cluster! } - for(int i =0; i<(int)showers.size(); i++){ - m_reco_shower_reclustered_energy_max[i] = std::max(m_reco_shower_reclustered_energy_plane1[i],std::max(m_reco_shower_reclustered_energy_plane0[i],m_reco_shower_reclustered_energy_plane2[i])); + ++vars.m_sss_num_candidates; + + //determine if this cluster is in neutrino slice + vars.m_sss_candidate_in_nu_slice.push_back(clu.InNuSlice(sliceIDToHitsMap, p_sliceid)); + + //Fill All the bits + vars.m_sss_candidate_num_hits.push_back((int)hitz.size()); + vars.m_sss_candidate_num_wires.push_back((int)ssscorz->n_wires); + vars.m_sss_candidate_num_ticks.push_back((int)ssscorz->n_ticks); + vars.m_sss_candidate_plane.push_back(pl); + vars.m_sss_candidate_PCA.push_back(ssscorz->pca_0); + vars.m_sss_candidate_impact_parameter.push_back(clu.getImpactParam()); + vars.m_sss_candidate_fit_slope.push_back(clu.getFitSlope()); + vars.m_sss_candidate_fit_constant.push_back(clu.getFitCons()); + vars.m_sss_candidate_mean_tick.push_back(ssscorz->mean_tick); + vars.m_sss_candidate_max_tick.push_back(ssscorz->max_tick); + vars.m_sss_candidate_min_tick.push_back(ssscorz->min_tick); + vars.m_sss_candidate_min_wire.push_back(ssscorz->min_wire); + vars.m_sss_candidate_max_wire.push_back(ssscorz->max_wire); + vars.m_sss_candidate_mean_wire.push_back(ssscorz->mean_wire); + vars.m_sss_candidate_min_dist.push_back(ssscorz->min_dist); + vars.m_sss_candidate_wire_tick_based_length.push_back(clu.getWireTickBasedLength()); + vars.m_sss_candidate_mean_ADC.push_back(clu.getMeanADC()); + vars.m_sss_candidate_ADC_RMS.push_back(clu.getADCrms()); + vars.m_sss_candidate_energy.push_back(Ep); + vars.m_sss_candidate_angle_to_shower.push_back(clu.getAngleWRTShower()); + vars.m_sss_candidate_remerge.push_back(remerge); + + + //MCTruth matching for pi0's + if(paras.s_is_data){ + vars.m_sss_candidate_matched.push_back(-1); + vars.m_sss_candidate_pdg.push_back(-1); + vars.m_sss_candidate_parent_pdg.push_back(-1); + vars.m_sss_candidate_trackid.push_back(-1); + vars.m_sss_candidate_true_energy.push_back(-1); + vars.m_sss_candidate_overlay_fraction.push_back(-1); + vars.m_sss_candidate_matched_energy_fraction_best_plane.push_back(-1); + }else{ + + auto ssmatched = SecondShowerMatching(hitz, mcparticles_per_hit, mcParticleVector, MCParticleToTrackIdMap, vars); + vars.m_sss_candidate_matched.push_back(ssmatched[0]); + vars.m_sss_candidate_pdg.push_back(ssmatched[1]); + vars.m_sss_candidate_parent_pdg.push_back(ssmatched[2]); + vars.m_sss_candidate_trackid.push_back(ssmatched[3]); + vars.m_sss_candidate_true_energy.push_back(ssmatched[4]); + vars.m_sss_candidate_overlay_fraction.push_back(ssmatched[5]); + vars.m_sss_candidate_matched_energy_fraction_best_plane.push_back(ssmatched[6]); + + //Guanqun: print out (best-matched) truth information of the cluster + std::cout << "Cluster: " << vars.m_sss_num_candidates-1 << " plane: " << vars.m_sss_candidate_plane.back() << ", energy: " << vars.m_sss_candidate_energy.back() << "\n"; + std::cout << "Cluster is matched: " << vars.m_sss_candidate_matched.back() << ", matched PDG: " << vars.m_sss_candidate_pdg.back() << " track ID: " << vars.m_sss_candidate_trackid.back() << " overlay fraction: " << vars.m_sss_candidate_overlay_fraction.back() << std::endl; + std::cout << "===============================================================" << std::endl; } - // ################################################### END SEAview END SEAview ######################################################### - // ##################################################################################################################################### + sevd.SetClusterLegend(c, vars.m_sss_candidate_energy.back(), vars.m_sss_candidate_matched.back(), vars.m_sss_candidate_pdg.back() , vars.m_sss_candidate_overlay_fraction.back() ); + } //end of cluster loop - // PandoraAllOutComes - // I.e This runs over all 3D reco showers in the whole event and find second shower candidates - if(!m_run_pi0_filter){ - std::cout<<"------------ Shower3D --------------"<Self()<Self()<Self()<Self()<Fill(); - ncdelta_slice_tree->Fill(); - eventweight_tree->Fill(); - true_eventweight_tree->Fill(); - geant4_tree->Fill(); - } + } - //Rest the vertex after filling -// this->ClearMeta(); - if(m_run_pi0_filter_2g1p) return filter_pass_2g1p; - else if(m_run_pi0_filter_2g0p) return filter_pass_2g0p; - //if not in filter mode pass all - return true; - }// end filter_module main class + //---------------------- END OF LOOP, fill vertex --------------------- + bool filter_pass_2g1p = Pi0PreselectionFilter(vars,paras); + bool filter_pass_2g0p = Pi0PreselectionFilter2g0p(vars,paras); + if (paras.s_fill_trees && ( (filter_pass_2g1p && paras.s_run_pi0_filter_2g1p) || (filter_pass_2g0p && paras.s_run_pi0_filter_2g0p) || !paras.s_run_pi0_filter ) ) { + vars.vertex_tree->Fill(); + vars.ncdelta_slice_tree->Fill(); + vars.eventweight_tree->Fill(); + vars.true_eventweight_tree->Fill(); + vars.geant4_tree->Fill(); + } + //Rest the vertex after filling + // this->ClearMeta(); + if(paras.s_run_pi0_filter_2g1p) return filter_pass_2g1p; + else if(paras.s_run_pi0_filter_2g0p) return filter_pass_2g0p; - //------------------------------------------------------------------------------------------- + //if not in filter mode pass all + return true; - //This runs ONCE at the start of the job and sets up all the necessary services and TTrees - void SinglePhoton::beginJob() - { - mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; - - art::ServiceHandle tfs;//output ROOT - - run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); - true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); - pot_tree = tfs->make("pot_tree", "pot_tree"); - - eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); - ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); - geant4_tree = tfs->make("geant4_tree","geant4_tree"); - vertex_tree = tfs->make("vertex_tree", "vertex_tree"); - - //run_subrun_tree, reset some POT - m_run = 0; - m_subrun = 0; - m_subrun_pot = 0; - - // --------------------- POT Releated variables ----------------- - m_number_of_events = 0; - m_number_of_vertices = 0; - m_pot_count=0; - m_pot_per_event = 0; - m_pot_per_subrun = 0; - m_number_of_events_in_subrun=0; - - - CreateMetaBranches(); - CreateIsolationBranches(); - CreateSecondShowerBranches(); - CreateSecondShowerBranches3D(); - CreateStubBranches(); - CreateFlashBranches(); - CreateShowerBranches(); - CreateMCTruthBranches(); - CreateTrackBranches(); - - CreateEventWeightBranches(); - CreateSliceBranches(); - CreateGeant4Branches(m_collection_geant4); - - - //------------------- List of Selected Events to run -------- - if(m_runSelectedEvent){ - std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; - - std::ifstream infile(m_selected_event_list); - if(!infile){ - std::cerr << "Fail to open file: " << m_selected_event_list << std::endl; - return; - } + }// end filter_module main class - //read from file, run number, subrun number ,event number that should be run - m_selected_set.clear(); - std::string line; - while(std::getline(infile, line)){ - std::istringstream ss(line); - std::vector event_info; - for(int i; ss >> i; ) event_info.push_back(i); - m_selected_set.insert(event_info); - } + //------------------------------------------------------------------------------------------- - infile.close(); + //This runs ONCE at the start of the job and sets up all the necessary services and TTrees + void SinglePhoton::beginJob() + { + mf::LogDebug("SinglePhoton") << " *** beginJob() *** " << "\n"; + + art::ServiceHandle tfs;//output ROOT + + vars.run_subrun_tree = tfs->make("run_subrun_tree","run_subrun_tree"); + vars.true_eventweight_tree = tfs->make("true_eventweight_tree", "true_eventweight_tree"); + vars.pot_tree = tfs->make("pot_tree", "pot_tree"); + + vars.eventweight_tree = tfs->make("eventweight_tree", "eventweight_tree"); + vars.ncdelta_slice_tree = tfs->make("ncdelta_slice_tree", "ncdelta_slice_tree"); + vars.geant4_tree = tfs->make("geant4_tree","geant4_tree"); + vars.vertex_tree = tfs->make("vertex_tree", "vertex_tree"); + + //run_subrun_tree, reset some POT + vars.m_run = 0; + vars.m_subrun = 0; + vars.m_subrun_pot = 0; + + // --------------------- POT Releated variables ----------------- + vars.m_number_of_events = 0; + vars.m_number_of_vertices = 0; + vars.m_pot_count=0; + vars.m_pot_per_event = 0; + vars.m_pot_per_subrun = 0; + vars.m_number_of_events_in_subrun=0; + + + CreateMetaBranches(vars); + CreateIsolationBranches(vars); + CreateSecondShowerBranches(vars); + CreateSecondShowerBranches3D(vars); + CreateStubBranches(vars); + CreateFlashBranches(vars); + CreateShowerBranches(vars); + CreateMCTruthBranches(vars); + CreateTrackBranches(vars); + + CreateEventWeightBranches(vars); + CreateSliceBranches(vars); + CreateGeant4Branches(vars); + + + //------------------- List of Selected Events to run -------- + if(paras.s_runSelectedEvent){ + std::cout << "SinglePhoton \t||\t Running in selected-event only mode " << std::endl; + + std::ifstream infile(paras.s_selected_event_list); + if(!infile){ + std::cerr << "Fail to open file: " < event_info; + for(int i; ss >> i; ) event_info.push_back(i); + + vars.m_selected_set.insert(event_info); + } + + infile.close(); + + if(g_is_verbose){ + std::cout << "Selected Events: " << std::endl; + std::cout << "Run \t SubRun \t Event" << std::endl; + for(auto & v: vars.m_selected_set){ + std::for_each(v.begin(), v.end(), [](int n){std::cout << n<<" \t "; }); + std::cout << std::endl; } + } } + } - bool SinglePhoton::beginSubRun(art::SubRun& sr) { + bool SinglePhoton::beginSubRun(art::SubRun& sr) { - m_run = sr.run(); - m_subrun = sr.subRun(); + vars.m_run = sr.run(); + vars.m_subrun = sr.subRun(); - double this_pot = 0; + double this_pot = 0; - //reset subrun count - m_subrun_counts = 0; + //reset subrun count + vars.m_subrun_counts = 0; - if(m_potLabel != ""){ - if(m_potLabel == "generator"){ + if(paras.s_potLabel != ""){ + if(paras.s_potLabel == "generator"){ - art::Handle gen_pot_hand; - if(sr.getByLabel(m_potLabel,gen_pot_hand)){ - this_pot = gen_pot_hand->totgoodpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< gen_pot_hand; + if(sr.getByLabel(paras.s_potLabel,gen_pot_hand)){ + this_pot = gen_pot_hand->totgoodpot; + vars.m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "< potSummaryHandlebnbETOR875; - if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ - this_pot =potSummaryHandlebnbETOR875->totpot; - m_pot_count += this_pot; - std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "< potSummaryHandlebnbETOR875; + if (sr.getByLabel("beamdata","bnbETOR875",potSummaryHandlebnbETOR875)){ + this_pot =potSummaryHandlebnbETOR875->totpot; + vars.m_pot_count += this_pot; + std::cout<<"SinglePhoton::beginSubRun()\t||\t SubRun POT: "<totpot<<" . Current total POT this file: "<Fill(); - return true; - } + vars.run_subrun_tree->Fill(); + return true; + } - void SinglePhoton::endJob() - { -// if (m_print_out_event){ -// out_stream.close(); -// } - pot_tree->Fill(); - } + void SinglePhoton::endJob() + { + // if (vars.m_print_out_event){ + // out_stream.close(); + // } + vars.pot_tree->Fill(); + } DEFINE_ART_MODULE(SinglePhoton) -} //namespace - +} //namespace single_photon From 07b8517f48251142ee5b0254fa65d046f033c37f Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Mon, 1 Aug 2022 09:48:12 -0500 Subject: [PATCH 47/54] push this --- .../Libraries/analyze_MC.cxx | 2 +- .../Libraries/reco_truth_matching.cxx | 6 ++--- .../SinglePhoton_module.cc | 26 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx index 912fd2d44..dda259014 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_MC.cxx @@ -11,7 +11,7 @@ namespace single_photon void AnalyzeGeant4( const std::vector> &mcParticleVector, var_all& vars){ - std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, ",", z )"}); + std::vector spacers = Printer_header({"#MCP"," pdg", " Status"," trkID"," Mother"," Process", " Process_End"," Energy", " Vertex(x, "," y, "," z )"}); for(size_t j=0;j< mcParticleVector.size();j++){ const art::Ptr mcp = mcParticleVector[j]; diff --git a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx index 7aadcd00d..e5ece43ff 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.cxx @@ -89,6 +89,7 @@ namespace single_photon return; } + //recoMCmatching but specifically for recob::showers void showerRecoMCmatching( std::vector all_PPFPs, @@ -97,8 +98,7 @@ namespace single_photon art::FindManyP& mcparticles_per_hit, std::vector>& mcParticleVector, std::map< int ,art::Ptr > & MCParticleToTrackIdMap, - var_all& vars - ){ + var_all& vars){ std::vector vec_fraction_matched; //processes that are "showery" @@ -353,7 +353,7 @@ namespace single_photon break; } } - if(is_old==false){ + if(is_old==false){//add one element in marks_mother_vector marks_mother_vector.push_back(MCParticleToTrackIdMap[this_mcp_id]); marks_mother_energy_fraction_map[marks_mother_vector.back()] = {0.0,0.0,0.0}; marks_mother_energy_fraction_map[marks_mother_vector.back()][0] = map_asso_mcparticles_energy[mcp][0]; diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 06de6a95a..c2d507b9e 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -911,18 +911,18 @@ namespace single_photon //Only run if its not data, i.e. MC events :) if(!paras.s_is_data){ - - if(!paras.s_is_textgen){ - std::vector> gTruthVector; - std::cout<<"\n Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(paras.s_generatorLabel); - art::fill_ptr_vector(gTruthVector,gTruthHandle); - if(g_is_verbose){ - for(size_t p=0; p< gTruthVector.size();p++) std::cout<> gTruthVector; +// std::cout<<"\n Get some GTruth info."<> const & gTruthHandle= evt.getValidHandle>(paras.s_generatorLabel); +// art::fill_ptr_vector(gTruthVector,gTruthHandle); +// if(g_is_verbose){ +// for(size_t p=0; p< gTruthVector.size();p++) std::cout<> const & mcTruthHandle= evt.getValidHandle>(paras.s_generatorLabel); @@ -935,7 +935,7 @@ namespace single_photon //Found inanalyze_Geant4.h //Currently just saves first 2 particles. TODO have a input list of things to save. Dont want to save everything!! - if(g_is_verbose) std::cout<<"SinglePhoton::AnalyzeGeant4s()\t||\t Begininning recob::Geant4 analysis suite"< Date: Mon, 1 Aug 2022 10:07:25 -0500 Subject: [PATCH 48/54] fix header bug --- sbncode/SinglePhotonAnalysis/Libraries/init_branches.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h index 94c436745..c76fceb97 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/init_branches.h @@ -1,4 +1,4 @@ -#ifndef SBNCODE_SINGLEPHOTONANALYS_ISINIT_BRANCHES_H +#ifndef SBNCODE_SINGLEPHOTONANALYS_INIT_BRANCHES_H #define SBNCODE_SINGLEPHOTONANALYS_INIT_BRANCHES_H #include "sbncode/SinglePhotonAnalysis/Libraries/variables.h" @@ -71,4 +71,4 @@ namespace single_photon void Save_PFParticleInfo( std::vector PPFPs, var_all& vars, para_all& paras); } -#endif +#endif // SBNCODE_SINGLEPHOTONANALYS_INIT_BRANCHES_H From 0d64e58db731835a10a8edd197c01a4eb8c1ec62 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Tue, 2 Aug 2022 23:38:33 -0500 Subject: [PATCH 49/54] fix small if() error --- .../Libraries/analyze_PandoraReco.cxx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx index 876bce333..5ff4778f5 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/analyze_PandoraReco.cxx @@ -28,7 +28,7 @@ namespace single_photon std::map > & MCParticleToTrackIdMap, std::map &sliceIdToNuScoreMap, var_all& vars, - para_all& paras){ + para_all& paras){ if(g_is_verbose) std::cout<<"AnalyzeTracks()\t||\t Starting recob::Track analysis"<Daughters().front()]]; int pfp_size = all_PPFPs.size(); for(int index = 0; index < pfp_size; index++){ - if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - vars.m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); - break; + if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()){ + vars.m_reco_track_daughter_trackscore[i_trk] = all_PPFPs[index].get_TrackScore(); + break; + } } } @@ -729,7 +730,7 @@ namespace single_photon //Analyze falshes void AnalyzeFlashes(const std::vector>& flashes, art::Handle> crthit_h, double evt_timeGPS_nsec, std::map, std::vector< art::Ptr>> crtvetoToFlashMap, -var_all& vars, para_all& paras){ + var_all& vars, para_all& paras){ for(auto pair: crtvetoToFlashMap){ @@ -843,8 +844,8 @@ var_all& vars, para_all& paras){ std::map, std::vector> > & clusterToHitMap , double triggeroffset, detinfo::DetectorPropertiesData const & theDetector, - var_all& vars, - para_all& paras){ + var_all& vars, + para_all& paras){ // if(g_is_verbose) std::cout<<"AnalyzeShowers()\t||\t Begininning recob::Shower analysis suite"<Daughters().front()<< // " "<Self()<Daughters().front()) == all_PPFPs[index].pPFParticle->Self()); - vars.m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); - break; + if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()){ + vars.m_reco_shower_daughter_trackscore[i_shr] = all_PPFPs[index].get_TrackScore(); + break; + } } } From 6a96d0e7371bda11314c29eff22f6bf7eb4cae43 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 5 Aug 2022 10:35:53 -0500 Subject: [PATCH 50/54] add TruncMean.cxx and seaDBSCAN.cxx; remove DBSCAN.h --- .../SinglePhotonAnalysis/Libraries/DBSCAN.h | 149 -- .../Libraries/TruncMean.h | 288 +--- .../SinglePhotonAnalysis/SEAview/SEAviewer.cc | 1304 ----------------- .../SinglePhotonAnalysis/SEAview/seaDBSCAN.h | 113 +- .../SinglePhoton_module.cc | 2 +- 5 files changed, 71 insertions(+), 1785 deletions(-) delete mode 100644 sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h delete mode 100644 sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cc diff --git a/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h b/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h deleted file mode 100644 index 08373b920..000000000 --- a/sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h +++ /dev/null @@ -1,149 +0,0 @@ -/** - * \file DBSCAN.h - * - * - * \brief Class def header for a class DBSCAN - * - * @author mark ross-lonergan markrl@nevis.columbia.edu - * Written 20th May 2019. - */ - -#ifndef DBSCAN_H -#define DBSCAN_H - -#include -#include -#include -#include -#include -#include - - -class DBSCAN{ - - public: - double m_eps; - int m_minpts; - - /// constructor - DBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {} - - /// Default destructor - // Guanqun: probably not needed - ~DBSCAN(){} - - // scan over points, and group them into different clusters - std::vector Scan2D(std::vector> &pts); - // grab neighbours of point i. - std::vector> GetNeighbours(size_t i, std::vector> &pts,bool); - // merge neighbours in seed and pts together into seed - int UnionSets(std::vector> &seed, std::vector> &pts); -}; - -std::vector DBSCAN::Scan2D(std::vector> &pts){ - - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - this->UnionSets(seed_set, new_neighbours); - } - } - } - return label; - -} - - - -std::vector> DBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; - - //VERY simple, will update soon to a DB - - - for(size_t ip=0; ip p = pts[ip]; - - double dist = sqrt(pow(p[0]*0.3-point[0]*0.3,2)+pow(p[1]/25.0-point[1]/25.0,2)); - - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - - } - } - return neighbours; -} - - -int DBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - - //VERY simple, will update soon if it works - for(auto &p:pts){ - - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } - - } - - - - return 0; -} - - -#endif diff --git a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h index 4857e38c6..90474d742 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h @@ -7,6 +7,7 @@ * * @author david caratelli [davidc@fnal.gov] * Written 08/02/2018. + * */ #ifndef TRUNCMEAN_H @@ -32,229 +33,78 @@ doxygen documentation! */ -static const double kINVALID_FLOAT = std::numeric_limits::max(); - -class TruncMean{ - - public: - - /// Default constructor - TruncMean(){} - - /// Default destructor - ~TruncMean(){} - - /** - @brief Given residual range and dq vectors return truncated local dq. - Input vectors are assumed to be match pair-wise (nth entry in rr_v - corresponds to nth entry in dq_v vector). - Input rr_v values are also assumed to be ordered: monotonically increasing - or decreasing. - For every dq value a truncated linear dq value is calculated as follows: - 0) all dq values within a rr range set by the class variable _rad are selected. - 1) the median and rms of these values is calculated. - 2) the subset of local dq values within the range [median-rms, median+rms] is selected. - 3) the resulting local truncated dq is the average of this truncated subset. - @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) - @input std::vector dq_v -> vector of measured values for which truncated profile is requested - (i.e. charge profile of a track) - @input std::vector dq_trunc_v -> passed by reference -> output stored here - @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation - */ - void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma = 1); - - /** - @brief Iteratively calculate the truncated mean of a distribution - @brief: mean is returned if vecter's size is too small, or reach the max iteration, or median has converged - @input std::vector v -> vector of values for which truncated mean is asked - @input size_t nmin -> minimum number of iterations to converge on truncated mean - @input size_t nmax -> maximum number of iterations to converge on truncated mean - @input size_t lmin -> minimum number of entries in vector before exiting and returning current value - @input size_t currentiteration -> current iteration - @input double convergencelimit -> fractional difference between successive iterations - under which the iteration is completed, provided nmin iterations have occurred. - @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. - */ - double CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed = kINVALID_FLOAT); - - /** - @brief Set the smearing radius over which to take hits for truncated mean computaton. - */ - void setRadius(const double& rad) { _rad = rad; } - - private: - - double Mean (const std::vector& v); - double Median(const std::vector& v); - double RMS (const std::vector& v); - - /** - Smearing radius over which charge from neighboring hits is scanned to calculate local - truncated mean - */ - double _rad; - -}; - -double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, - const size_t& nmax, const size_t& currentiteration, - const size_t& lmin, - const double& convergencelimit, - const double& nsigma, const double& oldmed) -{ - - auto const& mean = Mean(v); - auto const& med = Median(v); - auto const& rms = RMS(v); - - // if the vector length is below the lower limit -> return - if (v.size() < lmin) - return mean; - - // if we have passed the maximum number of iterations -> return - if (currentiteration >= nmax) - return mean; - - // if we passed the minimum number of iterations and the mean is close enough to the old value - double fracdiff = fabs(med-oldmed) / oldmed; - if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) - return mean; - - // if reached here it means we have to go on for another iteration - - // cutoff tails of distribution surrounding the mean - // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom - // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions - v.erase( std::remove_if( v.begin(), v.end(), - [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed - v.end()); - - return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); -} - -void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, - std::vector& dq_trunc_v, const double& nsigma) +namespace single_photon { + static const double kINVALID_FLOAT = std::numeric_limits::max(); + + class TruncMean{ + + public: + + /// Default constructor + TruncMean(){} + + /// Default destructor + ~TruncMean(){} + + /** + @brief Given residual range and dq vectors return truncated local dq. + Input vectors are assumed to be match pair-wise (nth entry in rr_v + corresponds to nth entry in dq_v vector). + Input rr_v values are also assumed to be ordered: monotonically increasing + or decreasing. + For every dq value a truncated linear dq value is calculated as follows: + 0) all dq values within a rr range set by the class variable _rad are selected. + 1) the median and rms of these values is calculated. + 2) the subset of local dq values within the range [median-rms, median+rms] is selected. + 3) the resulting local truncated dq is the average of this truncated subset. + @input std::vector rr_v -> vector of x-axis coordinates (i.e. position for track profile) + @input std::vector dq_v -> vector of measured values for which truncated profile is requested + (i.e. charge profile of a track) + @input std::vector dq_trunc_v -> passed by reference -> output stored here + @input double nsigma -> optional parameter, number of sigma to keep around RMS for TM calculation + */ + void CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma = 1); - // how many points to sample - int Nneighbor = (int)(_rad * 3 * 2); - - dq_trunc_v.clear(); - dq_trunc_v.reserve( rr_v.size() ); - - int Nmax = dq_v.size()-1; - - for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size - - // current residual range - double rr = rr_v.at(n); - - int nmin = n - Nneighbor; - int nmax = n + Nneighbor; - - if (nmin < 0) nmin = 0; - if (nmax > Nmax) nmax = Nmax; - - // vector for local dq values - std::vector dq_local_v; - - for (int i=nmin; i < nmax; i++) { - - double dr = rr - rr_v[i]; - if (dr < 0) dr *= -1; - - if (dr > _rad) continue; - - dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough - - }// for all ticks we want to scan - - if (dq_local_v.size() == 0 ) { - dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself - continue; - } - - // calculate median and rms - double median = Median(dq_local_v); - double rms = RMS(dq_local_v); - - double truncated_dq = 0.; - int npts = 0; - for (auto const& dq : dq_local_v) { - if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ - truncated_dq += dq; - npts += 1; - } - } - - dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma - - if(dq_trunc_v.back() != dq_trunc_v.back()){ - std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) -{ - - double mean = 0.; - for (auto const& n : v) mean += n; - mean /= v.size(); - - return mean; -} - -double TruncMean::Median(const std::vector& v) -{ - - if (v.size() == 1) return v[0]; - - std::vector vcpy = v; - - std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order - - double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice - - return median; -} - -double TruncMean::RMS(const std::vector& v) -{ - - if(v.size()==1) return v.front(); - - double avg = 0.; - for (auto const& val : v) avg += val; - avg /= v.size(); - double rms = 0.; - for (auto const& val : v) rms += (val-avg)*(val-avg); - rms = sqrt( rms / ( v.size() - 1 ) ); - + /** + @brief Iteratively calculate the truncated mean of a distribution + @brief: mean is returned if vecter's size is too small, or reach the max iteration, or median has converged + @input std::vector v -> vector of values for which truncated mean is asked + @input size_t nmin -> minimum number of iterations to converge on truncated mean + @input size_t nmax -> maximum number of iterations to converge on truncated mean + @input size_t lmin -> minimum number of entries in vector before exiting and returning current value + @input size_t currentiteration -> current iteration + @input double convergencelimit -> fractional difference between successive iterations + under which the iteration is completed, provided nmin iterations have occurred. + @input nsigma -> number of sigma around the median value to keep when the distribution is trimmed. + */ + double CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed = kINVALID_FLOAT); + + /** + @brief Set the smearing radius over which to take hits for truncated mean computaton. + */ + void setRadius(const double& rad) { _rad = rad; } + + private: + + double Mean (const std::vector& v); + double Median(const std::vector& v); + double RMS (const std::vector& v); + + /** + Smearing radius over which charge from neighboring hits is scanned to calculate local + truncated mean + */ + double _rad; + + }; - if(rms!=rms){ - std::cout<<"ERROR || TruncMean::RMS || is returning nan."< -#include - -namespace seaview{ - - int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ - - const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); - bool found_hit_in_slice = false, found_hit_not_in_slice = false; - for(auto hit : f_hits){ - auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); - if( iter == slice_hits.end()) - found_hit_not_in_slice = true; - else{ - found_hit_in_slice = true; - } - - if(found_hit_in_slice && found_hit_not_in_slice) return 0; - } - - return found_hit_in_slice ? 1 : -1; - } - - - void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ - - //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC - double max_ioc_to_shower_start = DBL_MIN; - size_t num_hits = cl.f_hits.size(); - - - for(size_t i = 0; i!= num_hits; ++i){ - auto &h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - //geometric properties - double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); - double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); - double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; - cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); - cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); - - //remember two hits with min/max IOC - if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ - cl.f_min_ioc_to_shower_start = ioc_to_shower_start; - cl.start_hit_idx = i; - } - if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. - max_ioc_to_shower_start = ioc_to_shower_start; - cl.end_hit_idx = i; - } - - - } //end of hit loop - - - // second round: group hits in two categories, first half and second half - // get the direction of the cluster - auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); - std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; - std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; - std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; - std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; - cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); - - cl.f_hit_group.resize(num_hits); - for(size_t i = 0; i!=num_hits; ++i){ - auto h = cl.f_hits[i]; //type of h: art_ptr - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; - - if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ - cl.f_hit_group[i] = 1; - cl.f_mean_ADC_first_half += h->SummedADC(); - } - else{ - cl.f_hit_group[i] = 2; - cl.f_mean_ADC_second_half += h->SummedADC(); - } - } - cl.f_track_treated = true; - - size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); - size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); - if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; - if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; - cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); - - if( num_hits < 2){ - std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; - return; - } - - //angle between the track cluster and the shower direction - //cluster direction unit vector - double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); - std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; - //shower direction unit vector - double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); - std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; - //angle between two unit vector, in radian - cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); - - - if(cl.f_score.min_wire == cl.f_score.max_wire){ - std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; - return; - } - //fit to wire-tick plot of the cluster, see how straight cluster is - TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); - //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); - //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. - if(fit_status == 0){ - //f1 = graph_copy->GetFunction("f1"); - f1 = cl.f_graph.GetFunction("f1"); - cl.f_fit_chi2 = f1->GetChisquare(); - } - //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; - } - - - // constructor - // CHECK, this constructor is not found; - SEAviewer::SEAviewer(std::string intag, - geo::GeometryCore const * ingeom, - detinfo::DetectorPropertiesData const & intheDetector ) - : tag(intag), geom(ingeom), theDetector(intheDetector){ - chan_max = {-9999,-9999,-9999}; - chan_min = {9999,9999,9999}; - tick_max = -99999; - tick_min = 99999; - - plot_true_vertex = false; - vertex_tick.resize(3); - vertex_chan.resize(3); - vertex_graph.resize(3); - - true_vertex_tick.resize(3); - true_vertex_chan.resize(3); - true_vertex_graph.resize(3); - - tick_shift = 350; - chan_shift = 100; - - n_showers=0; - n_pfps = 0; - has_been_clustered = false; - hit_threshold = -10; - - rangen = new TRandom3(0); //same seed everytime - } - - - int SEAviewer::setBadChannelList(std::vector> &in){ - m_bad_channel_list = in; - return 0; - } - - int SEAviewer::addHitsToConsider(std::vector>& hits){ - for(auto &h: hits){ - map_unassociated_hits[h] = true; - map_considered_hits[h] = true; - } - return 0; - } - - int SEAviewer::filterConsideredHits(double dist_to_vertex){ - - //collect all hits that are under consideration for clustering - std::vector> current_hits; - for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ - current_hits.push_back(map_iter->first); - } - - //remove hits that are too far from vertex - for(auto &h: current_hits){ - int p = h->View(); - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); - - if(dist > dist_to_vertex){ - map_unassociated_hits.erase(h); - map_considered_hits.erase(h); - } - } - return 0; - } - - int SEAviewer::setHitThreshold(double h){ - hit_threshold = h; - return 0; - } - - int SEAviewer::addAllHits(std::vector>& hits){ - - std::vector> vec_tick(3); - std::vector> vec_chan(3); - - for(auto&h: hits){ - if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - //tick_max = std::max(tick_max, (double)h->PeakTime()); - //tick_min = std::min(tick_min, (double)h->PeakTime()); - //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - } - } - - for(int i=0; i<3; i++){ - vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph - } - - vec_all_ticks = vec_tick; - vec_all_chans = vec_chan; - - return 0; - } - - std::vector SEAviewer::calcUnassociatedHits(){ - int n_unassoc=0; - int n_below_thresh = 0; - std::vector> vec_tick(3); - std::vector> vec_chan(3); - std::vector>> vec_pts(3); - std::vector>> vec_hits(3); - - - int n_all =map_considered_hits.size(); - - for(const auto &pair: map_considered_hits ){ - auto& h = pair.first; //type of h: recob::Hit - if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ - - if(h->SummedADC() < hit_threshold){ - n_below_thresh++; - continue; - } - - // if summed ADC of the hit passes threshold - n_unassoc++; - double wire = (double)h->WireID().Wire; - double tick = (double)h->PeakTime(); - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back(tick); - - vec_pts[(int)h->View()].push_back({wire,tick}); - vec_hits[(int)h->View()].push_back(h); - tick_max = std::max(tick_max, tick); - tick_min = std::min(tick_min, tick); - //chan_max, chan_min stores: max, min unassociated channel for each plane - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - } - - } - - for(int i=0; i<3; i++){ - vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } - - vec_unass_ticks = vec_tick; - vec_unass_chans = vec_chan; - vec_unass_pts = vec_pts; - vec_unass_hits = vec_hits; - - return {n_all,n_unassoc,n_below_thresh}; - } - - - int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ - n_pfps++; - - format_legend(legend, arg1, arg2, arg3); - - vec_pfp_legend.push_back(legend); - - std::vector> vec_tick(3); - std::vector> vec_chan(3); - - for(auto &h: hits){ - double wire = (double)h->WireID().Wire; - vec_chan[(int)h->View()].push_back(wire); - vec_tick[(int)h->View()].push_back((double)h->PeakTime()); - tick_max = std::max(tick_max, (double)h->PeakTime()); - tick_min = std::min(tick_min, (double)h->PeakTime()); - chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); - chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); - - //remove from unassociated hits - map_unassociated_hits[h] = false; - } - - std::vector t_graphs; - for(int i=0; i<3; i++){ - t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); - } - vec_graphs.push_back(t_graphs); - vec_ticks.push_back(vec_tick); - vec_chans.push_back(vec_chan); - return 0; - } - - int SEAviewer::addShower(art::Ptr&shr){ - n_showers++; - - vec_showers.push_back(shr); - - return 0; - } - - int SEAviewer::addTrack(art::Ptr&trk){ - n_tracks++; - - vec_tracks.push_back(trk); - - return 0; - } - - - std::vector> SEAviewer::to2D(std::vector & threeD){ - - auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - std::vector> ans(3); - - for(int i=0; i<3; i++){ - double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); - double time = calcTime(threeD[0], i, fTPC,fCryostat, theDetector); - - ans[i] = {wire,time}; - } - - return ans; - } - - - - int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - for(int i=0; i<3; i++){ - - // use vector here, so that to plot the single point using TGraph - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; - - vertex_tick[i] = time[0]; - vertex_chan[i] = wire[0]; - - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); - - TGraph gtmp(1, &wire[0], &time[0]); - vertex_graph[i] = gtmp; - } - - return 0; - } - - - int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ - - plot_true_vertex = true; - - auto const TPC = (*geom).begin_TPC(); - auto ID = TPC.ID(); - int fCryostat = ID.Cryostat; - int fTPC = ID.TPC; - - for(int i=0; i<3; i++){ - - std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; - std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; - - true_vertex_tick[i] = time[0]; - true_vertex_chan[i] = wire[0]; - - chan_max[i] = std::max( chan_max[i],wire[0]); - chan_min[i] = std::min( chan_min[i],wire[0]); - - TGraph gtmp(1, &wire[0], &time[0]); - true_vertex_graph[i] = gtmp; - } - - return 0; - } - - - int SEAviewer::Print(double plot_distance){ - - - std::string print_name = "SEAview_"+tag; - TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); - can->Divide(4,1,0,0.1); - - double plot_point_size=0.4; - - //******************************* First plot "Vertex" *************************************** - - //Calculate some things - //Guanqun: what does tick_min - tick_shift actually mean? - double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; - double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; - //double real_tick_min = tick_min-tick_shift ; - //double real_tick_max = tick_max+tick_shift ; - - - std::vector real_wire_min(3); //real x axis edges for 3 planes - std::vector real_wire_max(3); - - for(int i=0; i<3; i++){ - TPad * pader = (TPad*)can->cd(i+1); - - if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); - - //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) - real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; - real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; - - //fix the area to show, always show area large enough to hold all track/showers - //real_wire_min[i] = chan_min[i]-chan_shift ; - //real_wire_max[i] = chan_max[i]+chan_shift ; - - vertex_graph[i].SetMarkerStyle(29); - vertex_graph[i].SetMarkerSize(2); - vertex_graph[i].SetMarkerColor(kMagenta-3); - vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); - vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); - vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); - vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); - vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); - vertex_graph[i].Draw("ap"); - - if(i>0){ - vertex_graph[i].GetYaxis()->SetLabelOffset(999); - vertex_graph[i].GetYaxis()->SetLabelSize(0); - } - } - - /********************************* Non Slice Hits ****************************/ - - - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - vec_all_graphs[i].Draw("p same"); - vec_all_graphs[i].SetMarkerColor(kGray); - vec_all_graphs[i].SetFillColor(kWhite); - vec_all_graphs[i].SetMarkerStyle(20); - vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); - } - } - - //******************************** DeadWireRegions******************************************** - for(size_t i=0; i< m_bad_channel_list.size(); i++){ - int badchan = m_bad_channel_list[i].first; - int ok = m_bad_channel_list[i].second; - - if(ok>1)continue; - auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires - - int thisp = (int)hs[0].Plane; - double bc = hs[0].Wire; - - if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ - //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){} - can->cd(thisp+1); - TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); - //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); - l->SetLineColor(kGray+1); - l->Draw("same"); - //can->cd(thisp+5);// Guanqun: how many values can plane ID take? - //l->Draw("same"); - //can->cd(thisp+9); - //l->Draw("same"); - } - } - - - ///******************************** Plotting all PFP's *********************************8 - - std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; - int used_col=0; - - if(n_pfps > (int)tcols.size()){ - for(int i =0; i< (int)(n_pfps +2); i++){ - //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); - tcols.push_back(kRed); - } - } - - - for(int p=0; pcd(i+1); - if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_graphs[p][i].Draw("p same"); - vec_graphs[p][i].SetMarkerColor(tcol); - vec_graphs[p][i].SetFillColor(tcol); - vec_graphs[p][i].SetMarkerStyle(20); - vec_graphs[p][i].SetMarkerSize(plot_point_size); - } - } - } - - - //Plot all Shower lines. Might need a bit of work here.. - std::vector lines; - - for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - - //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); - - for(int i=0; i<3; i++){ - //std::cout<cd(i+1); - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; - - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; - - double x2_plot; - if(other_pt[i][0]cd(i+1); - TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); - lines.push_back(l); - l->SetLineColorAlpha(tcols[s],0.5); - l->SetLineWidth(1); - l->SetLineStyle(2); - l->Draw(); - - } - - } - - /********************************* Unassociated Hits ****************************/ - for(int i=0; i<3; i++){ - can->cd(i+1); - if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. - - vec_unass_graphs[i].Draw("p same"); - vec_unass_graphs[i].SetMarkerColor(kBlack); - vec_unass_graphs[i].SetFillColor(kBlack); - vec_unass_graphs[i].SetMarkerStyle(20); - vec_unass_graphs[i].SetMarkerSize(plot_point_size); - } - } - - /******************************* Clustered Hits ***********************************/ - // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. - if(has_been_clustered){ - - std::vector cluster_colors(vec_clusters.size()+1,0); - std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; - - for(size_t j=0; j< vec_clusters.size()+1; j++){ - int b = (int)rangen->Uniform(0,11); - int mod = (int)rangen->Uniform(-10,+3); - - cluster_colors[j] = base_col[b]+mod; - } - int c_offset = 0; - - for(auto &c: vec_clusters){ - int pl = c.getPlane(); - can->cd(pl+1); - if (c.getGraph()->GetN()>0){ - c.getGraph()->Draw("p same"); - c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); - c.getGraph()->SetFillColor(cluster_colors[c_offset]); - c.getGraph()->SetMarkerStyle(20); - //c.getGraph()->SetMarkerSize(plot_point_size); - c.getGraph()->SetMarkerSize(plot_point_size*1.5); - //std::cout<<"Printing cluster "<cd(i+1); - vertex_graph[i].Draw("p same"); - - double rad_cm = 12.0; - TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); - ell_p.SetLineColor(kRed); - ell_p.SetFillStyle(0); - ell_p.Draw("same"); - } - - //**************************** INFO ***************************/ - TPad *p_top_info = (TPad*)can->cd(4); - p_top_info->cd(); - - /*TLatex pottex; - pottex.SetTextSize(0.045); - pottex.SetTextAlign(13); //align at top - pottex.SetNDC(); - std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); - pottex.DrawLatex(.1,.94, pot_draw.c_str()); - */ - TLegend l_top(0.1,0.0,0.9,1.0); - l_top.SetTextSize(0.05); - - for(int p=0; p0){ - l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][1].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); - }else if(vec_graphs[p][2].GetN()>0){ - l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); - } - - } - - // draw legend for clustered hits if there is any - for(const auto &cluster : vec_clusters){ - - // only consider clusters that are second shower candidates - if(cluster.getLegend().empty()) continue; - - // if the cluster is out of the plotting range, do not include it in the legend - if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ - l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); - } - } - - l_top.SetHeader(print_name.c_str(),"C"); - l_top.SetLineWidth(0); - l_top.SetLineColor(kWhite); - l_top.Draw("same"); - - - - can->Update(); - can->SaveAs((print_name+".pdf").c_str(),"pdf"); - - - return 0; - } - - int SEAviewer::runseaDBSCAN(double min_pts, double eps){ - - has_been_clustered = true; - num_clusters = {0,0,0}; - cluster_labels.resize(3); - - for(int i=0; i<3; i++){ - - std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; - std::vector> hitz; - - - for(size_t p=0; p< vec_unass_pts[i].size(); p++){ - if(cluster_labels[i][p] == 0) continue;//noise - if(cluster_labels[i][p] == c){ - - t_pts.push_back(vec_unass_pts[i][p]); - hitz.push_back(vec_unass_hits[i][p]); - } - - } - - if(hitz.size()!=0){ - std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - - - // Grab the shower start and shower direction - std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); - - - - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ - - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); - - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); - - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - vec_clusters[c].setShowerRemerge(is_in_shower); - - std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); - std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ - - /* - std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); - for(size_t c=0; c< vec_clusters.size(); c++){ - //Loop over all hits in this clusters - for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ - int n2_hits = vec_clusters[c2].getHits().size(); - int n2_matched = 0; - if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane - for(auto &h : vec_clusters[c].getHits()){ - //get time spread of this hit. - double pp = h->PeakTimePlusRMS(1.0); - double pm = h->PeakTimeMinusRMS(1.0); - for(auto &h2 : vec_clusters[c2].getHits()){ - if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; - } - } - percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; - std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; - - std::vector> shr_start_pt = this->to2D(shr_start_3D); - std::vector> shr_other_pt = this->to2D(shr_other_3D); - - - - //Loop over all clusters - for(size_t c=0; c< vec_clusters.size(); c++){ - - auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> - int num_hits_in_cluster = vec_clusters[c].getHits().size(); - int pl = vec_clusters[c].getPlane(); - - //Need to modify this a bit - auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); - vec_clusters[c].setScore(ssscorz); - vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); - BasicClusterCalorimetry(vec_clusters[c]); - - //This is just checking if its in, we can do this earlier; TODO - //TODO: is_in_shower, get back to primary shower (at least available) - //Sim Stuff - //Draw Direction on plot - //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? - int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); - - std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); - std::cout<0){ - - - TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); - - int Npts = 20; - //TODO need to write this function - TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); - - core->Draw("p same"); - tmp->Draw("p same"); - - double fmax = -999; - double fmin = 99999; - for(int b=0; bGetN(); b++){ - double ttx=0; - double tty=0; - core->GetPoint(b,ttx,tty); - fmax = std::max(fmax, ttx); - fmin = std::min(fmin,ttx); - } - - //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad - con = core->GetFunction("pol1")->GetParameter(0); - slope = core->GetFunction("pol1")->GetParameter(1); - } - - double impact_parameter = 1e10; - - //rudimentary! - for(double k=chan_min[pl]; k< chan_max[pl];k++){ - double y = slope*k+con; - double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); - impact_parameter = std::min(impact_parameter,dist); - } - - //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower - //vertex_wire[i] vertex_tick[i] (already calcuated) - //cluster closest point )ssscorz.close_wire and close_tick - //recob::Shower start point, convered to wire tick. - std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; - std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; - double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); - double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); - double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); - - - std::cout<<"SSSNEW "<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; - std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; - - std::vector> start_pt = this->to2D(shr_start_3D); - std::vector> other_pt = this->to2D(shr_other_3D); - - for(int i=0; i<3; i++){ - double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); - double inter = start_pt[i][1]-slope*start_pt[i][0]; - - double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; - double y1_plot = slope*x1_plot+inter; - - double x2_plot; - if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; - double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); - - if(dist< min_d){ - min_p = (int)p; - min_d = dist; - } - } - - } - - - - } - - } - */ - - return {0}; - - - } - - double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ - // convert {wire, tick} coordinate to [cm, cm] coordinate - double x1 =X1.at(0)*wire_con; - double y1 =X1.at(1)*tick_con; - - double x2 =X2.at(0)*wire_con; - double y2 =X2.at(1)*tick_con; - - double x0 =point.at(0)*wire_con; - double y0 =point.at(1)*tick_con; - - double x10 = x1-x0; - double y10 = y1-y0; - - double x21 = x2-x1; - double y21 = y2-y1; - - double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); - - double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); - - - return sqrt(d2); - - } - - cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ - cluster_score score(p,cl); - score.n_hits = hits.size(); - - std::vector t_wires; - std::vector t_ticks; - - // - int n_min_ticks = 4; - int n_min_wires = 3; - double n_max_pca = 0.9999; - - score.pass = true; - - // ************* Some simple metrics relative to study point (usually vertex) *************** - score.max_dist_tick = 0; - score.min_dist_tick = 1e10; - score.mean_dist_tick = 0; - - score.max_dist_wire = 0; - score.min_dist_wire = 1e10; - score.mean_dist_wire = 0; - - score.max_dist = 0; - score.min_dist = 1e10; - score.mean_dist = 0; - - score.mean_tick =0; - score.max_tick =0; - score.min_tick =1e10; - - score.mean_wire =0; - score.max_wire =0; - score.min_wire =1e10; - - score.n_wires = 0; - score.n_ticks = 0; - - score.impact_parameter = -99; - - score.close_tick = -99; - score.close_wire = -99; - - std::map wire_count; - std::map tick_count; - - - for(auto &h: hits){ - double h_tick = (double)h->PeakTime(); - double h_wire = (double)h->WireID().Wire; - - score.mean_wire += h_wire; - score.mean_tick += h_tick; - - score.max_wire = std::max(score.max_wire, h_wire); - score.min_wire = std::min(score.min_wire, h_wire); - - score.max_tick = std::max(score.max_tick, h_tick); - score.min_tick = std::min(score.min_tick, h_tick); - - score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); - score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); - - score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); - score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); - - score.mean_dist_tick += fabs(h_tick-vertex_tick); - score.mean_dist_wire += fabs(h_wire-vertex_wire); - - //wierd dits - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - score.mean_dist += dd; - if(dd< score.min_dist){ - score.close_wire = h_wire; - score.close_tick = h_tick; - } - - score.max_dist = std::max(dd,score.max_dist); - score.min_dist = std::min(dd,score.min_dist); - - - t_wires.push_back(h_wire); - t_ticks.push_back(h_tick); - - if(wire_count.count((int)h_wire)<1){ - wire_count[((int)h_wire)] = true; - score.n_wires++; - } - if(tick_count.count((int)h_tick)<1){ - tick_count[((int)h_tick)] = true; - score.n_ticks++; - } - - } - - // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); - - score.mean_tick = score.mean_tick/(double)score.n_hits; - score.mean_wire = score.mean_wire/(double)score.n_hits; - - score.mean_dist = score.mean_dist/(double)score.n_hits; - - score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; - score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; - - // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* - // **************** First off, PCA - - - TPrincipal* principal = new TPrincipal(2,"D"); - double mod_wire = 1.0; - double mod_tick = 1.0; - - for(int i = 0; i < score.n_hits; i++){ - std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; - principal->AddRow(&tmp_pts[0]); - } - principal->MakePrincipals(); - //principal->Print(); - - TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); - //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); - TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); - - score.pca_0 = (*eigenval)(0); - score.pca_1 = (*eigenval)(1); - - //(*eigenvec).Print(); - //(*covar).Print(); - //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ - score.pass = false; - } - - - - - delete principal; - - return score; - } - - int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ - - - for(size_t s =0; s< showers.size(); s++){ - art::Ptr shower = showers[s]; - art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error - std::vector> showerhits = pfParticleToHitsMap.at(pfp); - - bool in_primary_shower = false; - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - - for(auto &sh: showerhits){ - - if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? - - double sh_wire = (double)sh->WireID().Wire; - double sh_tick = (double)sh->PeakTime(); - - double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); - - if(dist<=eps){ - in_primary_shower = true; - return (int)s; - } - - } - - } // end of hitz loop - - if(in_primary_shower){ - return (int)s; - } - } - - - return -1; - } - - - - TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ - - std::vectort_wire; - std::vectort_tick; - // std::vectort_dist; - - std::vectorall_wire; - std::vectorall_tick; - std::vectorall_dist; - - - for(size_t h = 0; h< hitz.size(); h++){ - auto hit = hitz[h]; - double h_wire = (double)hit->WireID().Wire; - double h_tick = (double)hit->PeakTime(); - - double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); - all_wire.push_back(h_wire); - all_tick.push_back(h_tick); - all_dist.push_back(dd); - } - - // sorted_in has indices of elements in all_dist in descending order - std::vector sorted_in = seaview_sort_indexes(all_dist); - size_t max_e = std::min((size_t)Npts,hitz.size()); - - for(size_t i =0; i>& hitz = cl.getHits(); - cl.f_ADC_hist.StatOverflows(kTRUE); - - for(auto& h : hitz){ - cl.f_ADC_hist.Fill(h->SummedADC()); - } - - cl.f_meanADC = cl.f_ADC_hist.GetMean(); - cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); - return; - } - - - - void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ - - //grab the plane number, and impact parameter of the cluster - int plane = vec_clusters.at(cluster).getPlane(); - double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); - - //need to use stringstream to control the number of digits.. - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << energy; - ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; - ss3 << std::setprecision(2) << std::fixed << overlay_fraction; - - std::string legend; - //add the truth information to the legend if the cluster is matched to a MCParticle - if(is_matched == 1){ - legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " - + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " - + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; - } - else{ - legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); - } - vec_clusters.at(cluster).setLegend(legend); - } - - - void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ - std::ostringstream ss1, ss2, ss3; - ss1 << std::setprecision(1) << std::fixed << arg1; - ss2 << std::setprecision(2) << std::fixed << arg2; - ss3 << std::setprecision(1) << std::fixed << arg3; - - if(leg == "Shower"){ - leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " - + ss3.str() + " impact par.}"; - //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; - - }else{ - //for tracks, 3rd argument is not used - leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; - } - } -} diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h index aef8b2936..14893e77b 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h @@ -19,6 +19,7 @@ #include +namespace seaview{ class seaDBSCAN{ public: @@ -42,118 +43,6 @@ class seaDBSCAN{ }; -std::vector seaDBSCAN::Scan2D(std::vector> &pts){ - - int cluster_count = 0;//we have no clusters - size_t N = pts.size(); - int l_undef = -99; - int l_noise = 0; - std::vector label(N,l_undef); - - for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); - //std::cout<> seed_set = neighbours; - for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. - - if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set - //Guanqun: change vector while looping over its elements - //new elements are pushed back to seed_set - this->UnionSets(seed_set, new_neighbours); - } - } - } - return label; - -} - - - -std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ - std::vector> neighbours; - std::vector point = pts[ipoint]; - - //VERY simple, will update soon to a DB - - - for(size_t ip=0; ip p = pts[ip]; - - double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); - - if(include_self){ - if(dist <= m_eps){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - }else{ - if(dist <= m_eps && p != point ){ - std::vector tp = {p[0],p[1],(double)ip};//Push back original index too - neighbours.push_back(tp); - } - - } - } - return neighbours; -} - -int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ - - //VERY simple, will update soon if it works - for(auto &p:pts){ - - bool is_in=false; - for(auto &s:seed){ - if(s==p){ - is_in = true; - break; - } - } - - if(is_in == false){ - seed.push_back(p); - } - - } - - - - return 0; -} - -double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ - // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 - double wire_con = 0.3; - double tick_con = 1.0/25.0; - - return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); - } #endif diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index c2d507b9e..728578d91 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -94,7 +94,7 @@ #include "sbncode/SinglePhotonAnalysis/Libraries/reco_truth_matching.h" #include "sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h" #include "sbncode/SinglePhotonAnalysis/Libraries/second_shower_search.h" -#include "sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h" +//#include "sbncode/SinglePhotonAnalysis/Libraries/DBSCAN.h" #include "sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h" namespace single_photon From 1884cc01104352c2b104be6744db7bc549401c30 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 5 Aug 2022 12:31:23 -0500 Subject: [PATCH 51/54] turn on the function of reading active TPC boundary --- .../Libraries/fiducial_volume.cxx | 13 +++++++------ .../Libraries/fiducial_volume.h | 4 ++-- sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx index 7d6f25e45..e9ffee572 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.cxx @@ -6,7 +6,7 @@ namespace single_photon { -int setTPCGeom(para_all& paras){ +void setTPCGeom(para_all& paras){ //copy these from CAFMaker/CAFMaker_module.c const geo::GeometryCore *geometry = lar::providerFrom(); @@ -39,12 +39,11 @@ int setTPCGeom(para_all& paras){ } } - return 0; } /* inside TPC or not? */ -int isInTPCActive(std::vector & vec, para_all& paras){ +bool isInTPCActive(std::vector & vec, para_all& paras){ if( vec.size() != 3){ throw cet::exception("single_photon") << " The coordinate dimension is not 3!"; } @@ -60,7 +59,7 @@ int isInTPCActive(std::vector & vec, para_all& paras){ /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ double distToTPCActive(std::vector&vec, para_all& paras){ - if(isInTPCActive(vec, paras)==0) return -999; + if(!isInTPCActive(vec, paras)) return -999; double min_x = std::min( fabs(vec[0] - paras.s_tpc_active_XMin) , fabs(vec[0] - paras.s_tpc_active_XMax)); double min_y = std::min( fabs(vec[1] - paras.s_tpc_active_YMin) , fabs(vec[1] - paras.s_tpc_active_YMax)); double min_z = std::min( fabs(vec[2] - paras.s_tpc_active_ZMin) , fabs(vec[2] - paras.s_tpc_active_ZMax)); @@ -71,7 +70,7 @@ double distToTPCActive(std::vector&vec, para_all& paras){ /* returns minimum distance to the TPCActive boundary around the Cathode Plane Assemble; returns -999 if the point is not in TPC active volume */ double distToCPA(std::vector&vec, para_all& paras){ - if(isInTPCActive(vec, paras)==0) return -999; + if(!isInTPCActive(vec, paras)) return -999; double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45)); return dx; @@ -87,7 +86,9 @@ double distToCPA(std::vector&vec, para_all& paras){ int distToSCB(double & dist, std::vector &vec, para_all& paras){ //CHECK! dist = distToTPCActive( vec, paras); - return isInTPCActive( vec, paras); + int is_it_in = 0; + if(isInTPCActive( vec, paras)) is_it_in++; + return is_it_in; //NOT USE SCB YET, bring it back later! // // //this one returns the distance to the boundary diff --git a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h index 8f493027a..3293bda92 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/fiducial_volume.h @@ -3,11 +3,11 @@ namespace single_photon { //ask YJ - int setTPCGeom(para_all& paras); + void setTPCGeom(para_all& paras); /* inside TPC or not? */ - int isInTPCActive(std::vector & vec, para_all& paras); + bool isInTPCActive(std::vector & vec, para_all& paras); /* returns minimum distance to the TPC active boundary; returns -999 if the point is not in TPC active volume */ diff --git a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc index 728578d91..9229fa369 100644 --- a/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc +++ b/sbncode/SinglePhotonAnalysis/SinglePhoton_module.cc @@ -301,7 +301,7 @@ namespace single_photon paras.s_make_sss_plots = true; //Misc setup CHECK - // setTPCGeom(); + setTPCGeom(paras);//set activeTPC paras.rangen = new TRandom3(22); std::cout<<"SinglePhoton::"<<__FUNCTION__<<" finishes ------------------------------"< Date: Fri, 5 Aug 2022 12:53:51 -0500 Subject: [PATCH 52/54] track files --- .../SEAview/SEAviewer.cxx | 1304 +++++++++++++++++ .../SEAview/seaDBSCAN.cxx | 120 ++ 2 files changed, 1424 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx create mode 100644 sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx new file mode 100644 index 000000000..83e29ca2b --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx @@ -0,0 +1,1304 @@ +#include "SEAviewer.h" +#include +#include + +namespace seaview{ + + int cluster::InNuSlice(const std::map> >& sliceIDToHitsMap, int nuSliceID){ + + const std::vector>& slice_hits = sliceIDToHitsMap.at(nuSliceID); + bool found_hit_in_slice = false, found_hit_not_in_slice = false; + for(auto hit : f_hits){ + auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit); + if( iter == slice_hits.end()) + found_hit_not_in_slice = true; + else{ + found_hit_in_slice = true; + } + + if(found_hit_in_slice && found_hit_not_in_slice) return 0; + } + + return found_hit_in_slice ? 1 : -1; + } + + + void SEAviewer::TrackLikeClusterAnalyzer(cluster &cl, const std::vector &shower_start_pt_2D, const std::vector &shower_other_pt_2D){ + + //first round, grab min ioc, impact, conversion distance, and ADC_histogram, and indx of the hits with min/max IOC + double max_ioc_to_shower_start = DBL_MIN; + size_t num_hits = cl.f_hits.size(); + + + for(size_t i = 0; i!= num_hits; ++i){ + auto &h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + //geometric properties + double impact_parameter_to_shower = dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick}); + double conversion_dist_to_shower_start = dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]); + double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start; + cl.f_min_impact_parameter_to_shower = std::min(cl.f_min_impact_parameter_to_shower, impact_parameter_to_shower); + cl.f_min_conversion_dist_to_shower_start = std::min(cl.f_min_conversion_dist_to_shower_start, conversion_dist_to_shower_start); + + //remember two hits with min/max IOC + if( ioc_to_shower_start < cl.f_min_ioc_to_shower_start){ + cl.f_min_ioc_to_shower_start = ioc_to_shower_start; + cl.start_hit_idx = i; + } + if( ioc_to_shower_start > max_ioc_to_shower_start){ //be careful, should not be "else if" here. + max_ioc_to_shower_start = ioc_to_shower_start; + cl.end_hit_idx = i; + } + + + } //end of hit loop + + + // second round: group hits in two categories, first half and second half + // get the direction of the cluster + auto start_hit_ptr = cl.f_hits.at(cl.start_hit_idx), end_hit_ptr = cl.f_hits.at(cl.end_hit_idx); + std::vector start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()}; + std::vector end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()}; + std::vector mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2}; + std::vector start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2}; + cl.f_ioc_based_length = sqrt(pow((start_hit_point[0]-end_hit_point[0])*wire_con, 2.0) + pow((start_hit_point[1]-end_hit_point[1])*tick_con, 2.0)); + + cl.f_hit_group.resize(num_hits); + for(size_t i = 0; i!=num_hits; ++i){ + auto h = cl.f_hits[i]; //type of h: art_ptr + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + std::vector mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]}; + + if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){ + cl.f_hit_group[i] = 1; + cl.f_mean_ADC_first_half += h->SummedADC(); + } + else{ + cl.f_hit_group[i] = 2; + cl.f_mean_ADC_second_half += h->SummedADC(); + } + } + cl.f_track_treated = true; + + size_t nhits_first_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 1); + size_t nhits_second_half = std::count(cl.f_hit_group.begin(), cl.f_hit_group.end(), 2); + if(nhits_first_half) cl.f_mean_ADC_first_half /= nhits_first_half; + if(nhits_second_half) cl.f_mean_ADC_second_half /= nhits_second_half; + cl.f_mean_ADC_first_to_second_ratio = (cl.f_mean_ADC_second_half != 0 ? cl.f_mean_ADC_first_half/cl.f_mean_ADC_second_half : 0.0); + + if( num_hits < 2){ + std::cerr << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits << " hits, can't calculate direction, skipping it... " << std::endl; + return; + } + + //angle between the track cluster and the shower direction + //cluster direction unit vector + double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0)); + std::vector cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length}; + //shower direction unit vector + double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0)); + std::vector shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length}; + //angle between two unit vector, in radian + cl.f_angle_wrt_shower_direction = acos( cluster_dir[0]*shower_dir[0] + cluster_dir[1]*shower_dir[1]); + + + if(cl.f_score.min_wire == cl.f_score.max_wire){ + std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.f_score.min_wire << ", setting its straight-line fit chi2 to 0.." << std::endl; + return; + } + //fit to wire-tick plot of the cluster, see how straight cluster is + TF1 *f1 = new TF1("f1", "1 ++ x", cl.f_score.min_wire, cl.f_score.max_wire); + //TGraph* graph_copy = (TGraph*)cl.f_graph.Clone("temp"); + //int fit_status = graph_copy->Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + int fit_status = cl.f_graph.Fit(f1, "RQ0"); //if fit status is 0, the fit is ok. + if(fit_status == 0){ + //f1 = graph_copy->GetFunction("f1"); + f1 = cl.f_graph.GetFunction("f1"); + cl.f_fit_chi2 = f1->GetChisquare(); + } + //std::cout << "SEAviewer::TrackLikeClusterAnalyzer\t|| End" << std::endl; + } + + + // constructor + // CHECK, this constructor is not found; + SEAviewer::SEAviewer(std::string intag, + geo::GeometryCore const * ingeom, + detinfo::DetectorPropertiesData const & intheDetector ) + : tag(intag), geom(ingeom), theDetector(intheDetector){ + chan_max = {-9999,-9999,-9999}; + chan_min = {9999,9999,9999}; + tick_max = -99999; + tick_min = 99999; + + plot_true_vertex = false; + vertex_tick.resize(3); + vertex_chan.resize(3); + vertex_graph.resize(3); + + true_vertex_tick.resize(3); + true_vertex_chan.resize(3); + true_vertex_graph.resize(3); + + tick_shift = 350; + chan_shift = 100; + + n_showers=0; + n_pfps = 0; + has_been_clustered = false; + hit_threshold = -10; + + rangen = new TRandom3(0); //same seed everytime + } + + + int SEAviewer::setBadChannelList(std::vector> &in){ + m_bad_channel_list = in; + return 0; + } + + int SEAviewer::addHitsToConsider(std::vector>& hits){ + for(auto &h: hits){ + map_unassociated_hits[h] = true; + map_considered_hits[h] = true; + } + return 0; + } + + int SEAviewer::filterConsideredHits(double dist_to_vertex){ + + //collect all hits that are under consideration for clustering + std::vector> current_hits; + for(auto map_iter = map_considered_hits.begin(); map_iter != map_considered_hits.end(); ++map_iter){ + current_hits.push_back(map_iter->first); + } + + //remove hits that are too far from vertex + for(auto &h: current_hits){ + int p = h->View(); + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + double dist = dist_point_point(wire, tick, vertex_chan[p], vertex_tick[p]); + + if(dist > dist_to_vertex){ + map_unassociated_hits.erase(h); + map_considered_hits.erase(h); + } + } + return 0; + } + + int SEAviewer::setHitThreshold(double h){ + hit_threshold = h; + return 0; + } + + int SEAviewer::addAllHits(std::vector>& hits){ + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto&h: hits){ + if(map_considered_hits.count(h)==0){ // if h is not in the map, push its plane ID, wire ID, and time tick to the vectors + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + //tick_max = std::max(tick_max, (double)h->PeakTime()); + //tick_min = std::min(tick_min, (double)h->PeakTime()); + //chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + //chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + } + } + + for(int i=0; i<3; i++){ + vec_all_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); //implicitly converted to TGraph + } + + vec_all_ticks = vec_tick; + vec_all_chans = vec_chan; + + return 0; + } + + std::vector SEAviewer::calcUnassociatedHits(){ + int n_unassoc=0; + int n_below_thresh = 0; + std::vector> vec_tick(3); + std::vector> vec_chan(3); + std::vector>> vec_pts(3); + std::vector>> vec_hits(3); + + + int n_all =map_considered_hits.size(); + + for(const auto &pair: map_considered_hits ){ + auto& h = pair.first; //type of h: recob::Hit + if(map_unassociated_hits.count(h) !=0 && map_unassociated_hits[h]){ + + if(h->SummedADC() < hit_threshold){ + n_below_thresh++; + continue; + } + + // if summed ADC of the hit passes threshold + n_unassoc++; + double wire = (double)h->WireID().Wire; + double tick = (double)h->PeakTime(); + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back(tick); + + vec_pts[(int)h->View()].push_back({wire,tick}); + vec_hits[(int)h->View()].push_back(h); + tick_max = std::max(tick_max, tick); + tick_min = std::min(tick_min, tick); + //chan_max, chan_min stores: max, min unassociated channel for each plane + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + } + + } + + for(int i=0; i<3; i++){ + vec_unass_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + + vec_unass_ticks = vec_tick; + vec_unass_chans = vec_chan; + vec_unass_pts = vec_pts; + vec_unass_hits = vec_hits; + + return {n_all,n_unassoc,n_below_thresh}; + } + + + int SEAviewer::addPFParticleHits(std::vector>& hits, std::string legend, double arg1, double arg2, double arg3){ + n_pfps++; + + format_legend(legend, arg1, arg2, arg3); + + vec_pfp_legend.push_back(legend); + + std::vector> vec_tick(3); + std::vector> vec_chan(3); + + for(auto &h: hits){ + double wire = (double)h->WireID().Wire; + vec_chan[(int)h->View()].push_back(wire); + vec_tick[(int)h->View()].push_back((double)h->PeakTime()); + tick_max = std::max(tick_max, (double)h->PeakTime()); + tick_min = std::min(tick_min, (double)h->PeakTime()); + chan_max[(int)h->View()] = std::max( chan_max[(int)h->View()],wire); + chan_min[(int)h->View()] = std::min( chan_min[(int)h->View()],wire); + + //remove from unassociated hits + map_unassociated_hits[h] = false; + } + + std::vector t_graphs; + for(int i=0; i<3; i++){ + t_graphs.emplace_back(vec_tick[i].size(),&vec_chan[i][0],&vec_tick[i][0]); + } + vec_graphs.push_back(t_graphs); + vec_ticks.push_back(vec_tick); + vec_chans.push_back(vec_chan); + return 0; + } + + int SEAviewer::addShower(art::Ptr&shr){ + n_showers++; + + vec_showers.push_back(shr); + + return 0; + } + + int SEAviewer::addTrack(art::Ptr&trk){ + n_tracks++; + + vec_tracks.push_back(trk); + + return 0; + } + + + std::vector> SEAviewer::to2D(std::vector & threeD){ + + auto const TPC = (*geom).begin_TPC(); //returns iterator pointing to the first TPC of detector + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + std::vector> ans(3); + + for(int i=0; i<3; i++){ + double wire = (double)calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *geom); + double time = calcTime(threeD[0], i, fTPC,fCryostat, theDetector); + + ans[i] = {wire,time}; + } + + return ans; + } + + + + int SEAviewer::loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + // use vector here, so that to plot the single point using TGraph + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + + vertex_tick[i] = time[0]; + vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::addTrueVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z){ + + plot_true_vertex = true; + + auto const TPC = (*geom).begin_TPC(); + auto ID = TPC.ID(); + int fCryostat = ID.Cryostat; + int fTPC = ID.TPC; + + for(int i=0; i<3; i++){ + + std::vector wire = {(double)calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *geom)}; + std::vector time = {calcTime(m_vertex_pos_x, i, fTPC,fCryostat, theDetector)}; + + true_vertex_tick[i] = time[0]; + true_vertex_chan[i] = wire[0]; + + chan_max[i] = std::max( chan_max[i],wire[0]); + chan_min[i] = std::min( chan_min[i],wire[0]); + + TGraph gtmp(1, &wire[0], &time[0]); + true_vertex_graph[i] = gtmp; + } + + return 0; + } + + + int SEAviewer::Print(double plot_distance){ + + + std::string print_name = "SEAview_"+tag; + TCanvas *can=new TCanvas(print_name.c_str(),print_name.c_str(),3000,800); + can->Divide(4,1,0,0.1); + + double plot_point_size=0.4; + + //******************************* First plot "Vertex" *************************************** + + //Calculate some things + //Guanqun: what does tick_min - tick_shift actually mean? + double real_tick_min = (fabs(vertex_tick[0] - (tick_min-tick_shift))*tick_con > plot_distance) ? vertex_tick[0]-plot_distance/tick_con : tick_min-tick_shift ; + double real_tick_max = (fabs(vertex_tick[0] - (tick_max+tick_shift))*tick_con > plot_distance) ? vertex_tick[0]+plot_distance/tick_con : tick_max+tick_shift ; + //double real_tick_min = tick_min-tick_shift ; + //double real_tick_max = tick_max+tick_shift ; + + + std::vector real_wire_min(3); //real x axis edges for 3 planes + std::vector real_wire_max(3); + + for(int i=0; i<3; i++){ + TPad * pader = (TPad*)can->cd(i+1); + + if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1); + + //only show area surrounding the vertex up to std::min(plot_distance, distance_bw_vertex_channel_min/max) + real_wire_min[i] = (fabs(vertex_chan[i] - (chan_min[i]-chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]-plot_distance/wire_con : chan_min[i]-chan_shift ; + real_wire_max[i] = (fabs(vertex_chan[i] - (chan_max[i]+chan_shift))*wire_con > plot_distance ) ? vertex_chan[i]+plot_distance/wire_con : chan_max[i]+chan_shift ; + + //fix the area to show, always show area large enough to hold all track/showers + //real_wire_min[i] = chan_min[i]-chan_shift ; + //real_wire_max[i] = chan_max[i]+chan_shift ; + + vertex_graph[i].SetMarkerStyle(29); + vertex_graph[i].SetMarkerSize(2); + vertex_graph[i].SetMarkerColor(kMagenta-3); + vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max); + vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]); + vertex_graph[i].SetTitle(("Plane " +std::to_string(i)).c_str()); + vertex_graph[i].GetYaxis()->SetTitle("Peak Hit Time Tick"); + vertex_graph[i].GetXaxis()->SetTitle( ("Wire Number Plane " +std::to_string(i)).c_str()); + vertex_graph[i].Draw("ap"); + + if(i>0){ + vertex_graph[i].GetYaxis()->SetLabelOffset(999); + vertex_graph[i].GetYaxis()->SetLabelSize(0); + } + } + + /********************************* Non Slice Hits ****************************/ + + + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_all_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + vec_all_graphs[i].Draw("p same"); + vec_all_graphs[i].SetMarkerColor(kGray); + vec_all_graphs[i].SetFillColor(kWhite); + vec_all_graphs[i].SetMarkerStyle(20); + vec_all_graphs[i].SetMarkerSize(plot_point_size*0.75); + } + } + + //******************************** DeadWireRegions******************************************** + for(size_t i=0; i< m_bad_channel_list.size(); i++){ + int badchan = m_bad_channel_list[i].first; + int ok = m_bad_channel_list[i].second; + + if(ok>1)continue; + auto hs = geom->ChannelToWire(badchan); //type of hs: vector containing the ID of all the connected wires + + int thisp = (int)hs[0].Plane; + double bc = hs[0].Wire; + + if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){ + //if(chan_min[thisp]-chan_shift < bc && bc < chan_max[thisp]+chan_shift ){} + can->cd(thisp+1); + TLine *l = new TLine(bc, real_tick_min, bc, real_tick_max); + //TLine *l = new TLine(bc,tick_min-tick_shift,bc,tick_max+tick_shift); + l->SetLineColor(kGray+1); + l->Draw("same"); + //can->cd(thisp+5);// Guanqun: how many values can plane ID take? + //l->Draw("same"); + //can->cd(thisp+9); + //l->Draw("same"); + } + } + + + ///******************************** Plotting all PFP's *********************************8 + + std::vector tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1}; + int used_col=0; + + if(n_pfps > (int)tcols.size()){ + for(int i =0; i< (int)(n_pfps +2); i++){ + //tcols.push_back(tcols[(int)rangen->Uniform(0,7)]+(int)rangen->Uniform(-5,5)); + tcols.push_back(kRed); + } + } + + + for(int p=0; pcd(i+1); + if(vec_graphs[p][i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_graphs[p][i].Draw("p same"); + vec_graphs[p][i].SetMarkerColor(tcol); + vec_graphs[p][i].SetFillColor(tcol); + vec_graphs[p][i].SetMarkerStyle(20); + vec_graphs[p][i].SetMarkerSize(plot_point_size); + } + } + } + + + //Plot all Shower lines. Might need a bit of work here.. + std::vector lines; + + for(size_t s=0; s shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + //std::cout<<" "<> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + //std::cout<cd(i+1); + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0]cd(i+1); + TLine *l = new TLine(x1_plot, y1_plot, x2_plot, y2_plot); + lines.push_back(l); + l->SetLineColorAlpha(tcols[s],0.5); + l->SetLineWidth(1); + l->SetLineStyle(2); + l->Draw(); + + } + + } + + /********************************* Unassociated Hits ****************************/ + for(int i=0; i<3; i++){ + can->cd(i+1); + if(vec_unass_graphs[i].GetN()>0){//need a check in case this track has no hits on this plane. + + vec_unass_graphs[i].Draw("p same"); + vec_unass_graphs[i].SetMarkerColor(kBlack); + vec_unass_graphs[i].SetFillColor(kBlack); + vec_unass_graphs[i].SetMarkerStyle(20); + vec_unass_graphs[i].SetMarkerSize(plot_point_size); + } + } + + /******************************* Clustered Hits ***********************************/ + // draw cluster hits after drawing all unassociated hits such that clustered hits would be colored while un-clustered ones will be black. + if(has_been_clustered){ + + std::vector cluster_colors(vec_clusters.size()+1,0); + std::vector base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900}; + + for(size_t j=0; j< vec_clusters.size()+1; j++){ + int b = (int)rangen->Uniform(0,11); + int mod = (int)rangen->Uniform(-10,+3); + + cluster_colors[j] = base_col[b]+mod; + } + int c_offset = 0; + + for(auto &c: vec_clusters){ + int pl = c.getPlane(); + can->cd(pl+1); + if (c.getGraph()->GetN()>0){ + c.getGraph()->Draw("p same"); + c.getGraph()->SetMarkerColor(cluster_colors[c_offset]); + c.getGraph()->SetFillColor(cluster_colors[c_offset]); + c.getGraph()->SetMarkerStyle(20); + //c.getGraph()->SetMarkerSize(plot_point_size); + c.getGraph()->SetMarkerSize(plot_point_size*1.5); + //std::cout<<"Printing cluster "<cd(i+1); + vertex_graph[i].Draw("p same"); + + double rad_cm = 12.0; + TEllipse ell_p(vertex_chan[i],vertex_tick[i],rad_cm/wire_con,rad_cm/tick_con); + ell_p.SetLineColor(kRed); + ell_p.SetFillStyle(0); + ell_p.Draw("same"); + } + + //**************************** INFO ***************************/ + TPad *p_top_info = (TPad*)can->cd(4); + p_top_info->cd(); + + /*TLatex pottex; + pottex.SetTextSize(0.045); + pottex.SetTextAlign(13); //align at top + pottex.SetNDC(); + std::string pot_draw = "Run: "+std::to_string(m_run_number)+" SubRun: "+std::to_string(m_subrun_number)+" Event: "+std::to_string(m_event_number); + pottex.DrawLatex(.1,.94, pot_draw.c_str()); + */ + TLegend l_top(0.1,0.0,0.9,1.0); + l_top.SetTextSize(0.05); + + for(int p=0; p0){ + l_top.AddEntry(&vec_graphs[p][0],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][1].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][1],vec_pfp_legend[p].c_str(),"f"); + }else if(vec_graphs[p][2].GetN()>0){ + l_top.AddEntry(&vec_graphs[p][2],vec_pfp_legend[p].c_str(),"f"); + } + + } + + // draw legend for clustered hits if there is any + for(const auto &cluster : vec_clusters){ + + // only consider clusters that are second shower candidates + if(cluster.getLegend().empty()) continue; + + // if the cluster is out of the plotting range, do not include it in the legend + if(cluster.InRange(real_tick_max, real_tick_min, real_wire_max[cluster.getPlane()], real_wire_min[cluster.getPlane()])){ + l_top.AddEntry(cluster.getGraph(), cluster.getLegend().c_str(), "f"); + } + } + + l_top.SetHeader(print_name.c_str(),"C"); + l_top.SetLineWidth(0); + l_top.SetLineColor(kWhite); + l_top.Draw("same"); + + + + can->Update(); + can->SaveAs((print_name+".pdf").c_str(),"pdf"); + + + return 0; + } + + int SEAviewer::runseaDBSCAN(double min_pts, double eps){ + + has_been_clustered = true; + num_clusters = {0,0,0}; + cluster_labels.resize(3); + + for(int i=0; i<3; i++){ + + std::cout<<"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<> t_pts; + std::vector> hitz; + + + for(size_t p=0; p< vec_unass_pts[i].size(); p++){ + if(cluster_labels[i][p] == 0) continue;//noise + if(cluster_labels[i][p] == c){ + + t_pts.push_back(vec_unass_pts[i][p]); + hitz.push_back(vec_unass_hits[i][p]); + } + + } + + if(hitz.size()!=0){ + std::cout<<"SinglePhoton::seaDBSCAN\t||\t Cluster "< SEAviewer::analyzeTrackLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + + // Grab the shower start and shower direction + std::vector shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + TrackLikeClusterAnalyzer(vec_clusters[c], shr_start_pt[pl], shr_other_pt[pl]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + vec_clusters[c].setShowerRemerge(is_in_shower); + + std::string sname = "Cluster "+std::to_string(c)+", Hits: "+std::to_string(num_hits_in_cluster)+", PCA "+std::to_string(ssscorz.pca_0)+", Theta:" +std::to_string(ssscorz.pca_theta)+", Wires: "+std::to_string(ssscorz.n_wires)+ ", Ticks: "+std::to_string(ssscorz.n_ticks)+", ReMerged: "+std::to_string(is_in_shower); + std::cout< SEAviewer::analyzeShowerLikeClusters(double eps, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap,std::vector& vec_in_clusters ){ + + /* + std::vector> percent_matched(vec_clusters.size(), std::vector(vec_clusters.size(),0.0)); + for(size_t c=0; c< vec_clusters.size(); c++){ + //Loop over all hits in this clusters + for(size_t c2 = 0; c2 < vec_clusters.size(); c2++){ + int n2_hits = vec_clusters[c2].getHits().size(); + int n2_matched = 0; + if(vec_clusters[c2].getPlane() == vec_clusters[c].getPlane()) continue; //ignore clusters on same plane + for(auto &h : vec_clusters[c].getHits()){ + //get time spread of this hit. + double pp = h->PeakTimePlusRMS(1.0); + double pm = h->PeakTimeMinusRMS(1.0); + for(auto &h2 : vec_clusters[c2].getHits()){ + if(h2->PeakTime() < pp && h2->PeakTime() > pm) n2_matched++; + } + } + percent_matched[c][c2] = ((double)n2_matched)/((double)n2_hits)*100.0; + std::cout<<" Cluster "< shr_start_3D= {vec_showers[0]->ShowerStart().X(), vec_showers[0]->ShowerStart().Y(),vec_showers[0]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[0]->ShowerStart().X()+vec_showers[0]->Direction().X(),vec_showers[0]->ShowerStart().Y()+vec_showers[0]->Direction().Y(), vec_showers[0]->ShowerStart().Z()+vec_showers[0]->Direction().Z()}; + + std::vector> shr_start_pt = this->to2D(shr_start_3D); + std::vector> shr_other_pt = this->to2D(shr_other_3D); + + + + //Loop over all clusters + for(size_t c=0; c< vec_clusters.size(); c++){ + + auto hitz = vec_clusters[c].getHits(); // type of hitz: std::vector> + int num_hits_in_cluster = vec_clusters[c].getHits().size(); + int pl = vec_clusters[c].getPlane(); + + //Need to modify this a bit + auto ssscorz = SeaviewScoreCluster(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers.front()); + vec_clusters[c].setScore(ssscorz); + vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*tick_con, 2.0))); + BasicClusterCalorimetry(vec_clusters[c]); + + //This is just checking if its in, we can do this earlier; TODO + //TODO: is_in_shower, get back to primary shower (at least available) + //Sim Stuff + //Draw Direction on plot + //Delauney on here might be good, that said, we have a LOT of things. Hmm, cap at 50 hits maybe? + int is_in_shower = SeaviewCompareToShowers(pl,c+1, hitz ,vertex_chan[pl], vertex_tick[pl], vec_showers, showerToPFParticleMap, pfParticleToHitsMap,eps); + + std::string sname = "Cluster "+std::to_string(c)+" Hits: "+std::to_string(num_hits_in_cluster)+" PCA: "+std::to_string(ssscorz.pca_0)+" Theta: " +std::to_string(ssscorz.pca_theta)+" Wires: "+std::to_string(ssscorz.n_wires)+ " Ticks: "+std::to_string(ssscorz.n_ticks)+" ReMerged: "+std::to_string(is_in_shower); + std::cout<0){ + + + TGraph * tmp = (TGraph*)vec_clusters[c].getGraph()->Clone(("tmp_"+std::to_string(pl)+std::to_string(c)).c_str()); + + int Npts = 20; + //TODO need to write this function + TGraph * core = (TGraph*)SeaviewGetNearestNpts(pl,c+1,hitz,vertex_chan[pl],vertex_tick[pl],Npts); + + core->Draw("p same"); + tmp->Draw("p same"); + + double fmax = -999; + double fmin = 99999; + for(int b=0; bGetN(); b++){ + double ttx=0; + double tty=0; + core->GetPoint(b,ttx,tty); + fmax = std::max(fmax, ttx); + fmin = std::min(fmin,ttx); + } + + //std::cout<<"Just Before Core Fit of "<GetN()<<" pts between "<Fit("pol1","Q","same",fmin,fmax); // fit to polynomial of degree 1, and plot it on the same pad + con = core->GetFunction("pol1")->GetParameter(0); + slope = core->GetFunction("pol1")->GetParameter(1); + } + + double impact_parameter = 1e10; + + //rudimentary! + for(double k=chan_min[pl]; k< chan_max[pl];k++){ + double y = slope*k+con; + double dist = dist_point_point(k, y, vertex_chan[pl], vertex_tick[pl]); + impact_parameter = std::min(impact_parameter,dist); + } + + //Lets assume its potining back to the "vertex" and calculate a kinda_angle w.r.t to the shower + //vertex_wire[i] vertex_tick[i] (already calcuated) + //cluster closest point )ssscorz.close_wire and close_tick + //recob::Shower start point, convered to wire tick. + std::vector vec_c = {(double)(vertex_chan[pl]-ssscorz.close_wire), (double)(vertex_tick[pl]-ssscorz.close_tick)}; + std::vector vec_s = {(double)vertex_chan[pl]-shr_start_pt[pl][0], (double)vertex_tick[pl]-shr_start_pt[pl][1]}; + double l_c = sqrt(pow(wire_con*vec_c[0],2)+pow(vec_c[1]*tick_con,2)); + double l_s = sqrt(pow(wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2)); + double kinda_angle = acos((wire_con*vec_s[0]*wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s)); + + + std::cout<<"SSSNEW "<tag< shr_start_3D= {vec_showers[s]->ShowerStart().X(), vec_showers[s]->ShowerStart().Y(),vec_showers[s]->ShowerStart().Z()}; + std::vector shr_other_3D= {vec_showers[s]->ShowerStart().X()+vec_showers[s]->Direction().X(),vec_showers[s]->ShowerStart().Y()+vec_showers[s]->Direction().Y(), vec_showers[s]->ShowerStart().Z()+vec_showers[s]->Direction().Z()}; + + std::vector> start_pt = this->to2D(shr_start_3D); + std::vector> other_pt = this->to2D(shr_other_3D); + + for(int i=0; i<3; i++){ + double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]); + double inter = start_pt[i][1]-slope*start_pt[i][0]; + + double x1_plot = other_pt[i][0];//chan_min[i]-chan_shift; + double y1_plot = slope*x1_plot+inter; + + double x2_plot; + if(other_pt[i][0] pt = (vec_clusters[c].getPts())[p]; + double dist = this->dist_line_point({x1_plot*wire_con,y1_plot*tick_con}, {x2_plot*wire_con,y2_plot*tick_con}, {pt[0]*wire_con, pt[1]*tick_con}); + + if(dist< min_d){ + min_p = (int)p; + min_d = dist; + } + } + + } + + + + } + + } + */ + + return {0}; + + + } + + double SEAviewer::dist_line_point( const std::vector&X1, const std::vector& X2, const std::vector& point){ + // convert {wire, tick} coordinate to [cm, cm] coordinate + double x1 =X1.at(0)*wire_con; + double y1 =X1.at(1)*tick_con; + + double x2 =X2.at(0)*wire_con; + double y2 =X2.at(1)*tick_con; + + double x0 =point.at(0)*wire_con; + double y0 =point.at(1)*tick_con; + + double x10 = x1-x0; + double y10 = y1-y0; + + double x21 = x2-x1; + double y21 = y2-y1; + + double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21); + + double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2)); + + + return sqrt(d2); + + } + + cluster_score SEAviewer::SeaviewScoreCluster(int p, int cl, std::vector> &hits, double vertex_wire, double vertex_tick, const art::Ptr &shower){ + cluster_score score(p,cl); + score.n_hits = hits.size(); + + std::vector t_wires; + std::vector t_ticks; + + // + int n_min_ticks = 4; + int n_min_wires = 3; + double n_max_pca = 0.9999; + + score.pass = true; + + // ************* Some simple metrics relative to study point (usually vertex) *************** + score.max_dist_tick = 0; + score.min_dist_tick = 1e10; + score.mean_dist_tick = 0; + + score.max_dist_wire = 0; + score.min_dist_wire = 1e10; + score.mean_dist_wire = 0; + + score.max_dist = 0; + score.min_dist = 1e10; + score.mean_dist = 0; + + score.mean_tick =0; + score.max_tick =0; + score.min_tick =1e10; + + score.mean_wire =0; + score.max_wire =0; + score.min_wire =1e10; + + score.n_wires = 0; + score.n_ticks = 0; + + score.impact_parameter = -99; + + score.close_tick = -99; + score.close_wire = -99; + + std::map wire_count; + std::map tick_count; + + + for(auto &h: hits){ + double h_tick = (double)h->PeakTime(); + double h_wire = (double)h->WireID().Wire; + + score.mean_wire += h_wire; + score.mean_tick += h_tick; + + score.max_wire = std::max(score.max_wire, h_wire); + score.min_wire = std::min(score.min_wire, h_wire); + + score.max_tick = std::max(score.max_tick, h_tick); + score.min_tick = std::min(score.min_tick, h_tick); + + score.max_dist_tick = std::max(score.max_dist_tick, fabs(h_tick-vertex_tick)); + score.min_dist_tick = std::min(score.min_dist_tick, fabs(h_tick-vertex_tick)); + + score.max_dist_wire = std::max(score.max_dist_wire, fabs(h_wire-vertex_wire)); + score.min_dist_wire = std::min(score.min_dist_wire, fabs(h_wire-vertex_wire)); + + score.mean_dist_tick += fabs(h_tick-vertex_tick); + score.mean_dist_wire += fabs(h_wire-vertex_wire); + + //wierd dits + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + score.mean_dist += dd; + if(dd< score.min_dist){ + score.close_wire = h_wire; + score.close_tick = h_tick; + } + + score.max_dist = std::max(dd,score.max_dist); + score.min_dist = std::min(dd,score.min_dist); + + + t_wires.push_back(h_wire); + t_ticks.push_back(h_tick); + + if(wire_count.count((int)h_wire)<1){ + wire_count[((int)h_wire)] = true; + score.n_wires++; + } + if(tick_count.count((int)h_tick)<1){ + tick_count[((int)h_tick)] = true; + score.n_ticks++; + } + + } + + // TGraph * g_pts = new TGraph(t_wires.size(),&t_ticks[0],&t_wires[0]); + + score.mean_tick = score.mean_tick/(double)score.n_hits; + score.mean_wire = score.mean_wire/(double)score.n_hits; + + score.mean_dist = score.mean_dist/(double)score.n_hits; + + score.mean_dist_tick = score.mean_dist_tick/(double)score.n_hits; + score.mean_dist_wire = score.mean_dist_wire/(double)score.n_hits; + + // **************** Metrics of Pointing: Does this cluster "point" back to the vertex? ************************* + // **************** First off, PCA + + + TPrincipal* principal = new TPrincipal(2,"D"); + double mod_wire = 1.0; + double mod_tick = 1.0; + + for(int i = 0; i < score.n_hits; i++){ + std::vector tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick}; + principal->AddRow(&tmp_pts[0]); + } + principal->MakePrincipals(); + //principal->Print(); + + TVectorD * eigenval = (TVectorD*) principal->GetEigenValues(); + //TMatrixD * eigenvec = (TMatrixD*) principal->GetEigenVectors(); + TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix(); + + score.pca_0 = (*eigenval)(0); + score.pca_1 = (*eigenval)(1); + + //(*eigenvec).Print(); + //(*covar).Print(); + //std::cout<<"SinglePhoton::SSS\t||\tEigen: "<= n_max_pca){ + score.pass = false; + } + + + + + delete principal; + + return score; + } + + int SEAviewer::SeaviewCompareToShowers(int p ,int cl, std::vector>& hitz,double vertex_wire,double vertex_tick, std::vector>& showers, const std::map, art::Ptr> & showerToPFParticleMap, const std::map, std::vector> > & pfParticleToHitsMap, double eps){ + + + for(size_t s =0; s< showers.size(); s++){ + art::Ptr shower = showers[s]; + art::Ptr pfp = showerToPFParticleMap.at(shower); //key has to be in the map, otherwise out-of-range error + std::vector> showerhits = pfParticleToHitsMap.at(pfp); + + bool in_primary_shower = false; + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + + for(auto &sh: showerhits){ + + if(sh->View() != hit->View()) continue; //Guanqun: if not on the same plane? + + double sh_wire = (double)sh->WireID().Wire; + double sh_tick = (double)sh->PeakTime(); + + double dist = dist_point_point(sh_wire, sh_tick, h_wire, h_tick); + + if(dist<=eps){ + in_primary_shower = true; + return (int)s; + } + + } + + } // end of hitz loop + + if(in_primary_shower){ + return (int)s; + } + } + + + return -1; + } + + + + TGraph* SEAviewer::SeaviewGetNearestNpts(int p, int cl, std::vector> &hitz, double vertex_wire, double vertex_tick, int Npts){ + + std::vectort_wire; + std::vectort_tick; + // std::vectort_dist; + + std::vectorall_wire; + std::vectorall_tick; + std::vectorall_dist; + + + for(size_t h = 0; h< hitz.size(); h++){ + auto hit = hitz[h]; + double h_wire = (double)hit->WireID().Wire; + double h_tick = (double)hit->PeakTime(); + + double dd = dist_point_point(h_wire, h_tick, vertex_wire, vertex_tick); + all_wire.push_back(h_wire); + all_tick.push_back(h_tick); + all_dist.push_back(dd); + } + + // sorted_in has indices of elements in all_dist in descending order + std::vector sorted_in = seaview_sort_indexes(all_dist); + size_t max_e = std::min((size_t)Npts,hitz.size()); + + for(size_t i =0; i>& hitz = cl.getHits(); + cl.f_ADC_hist.StatOverflows(kTRUE); + + for(auto& h : hitz){ + cl.f_ADC_hist.Fill(h->SummedADC()); + } + + cl.f_meanADC = cl.f_ADC_hist.GetMean(); + cl.f_ADC_RMS = cl.f_ADC_hist.GetRMS(); + return; + } + + + + void SEAviewer::SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction){ + + //grab the plane number, and impact parameter of the cluster + int plane = vec_clusters.at(cluster).getPlane(); + double min_ioc_to_shower = vec_clusters.at(cluster).getMinHitIOC(); + + //need to use stringstream to control the number of digits.. + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << energy; + ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower; + ss3 << std::setprecision(2) << std::fixed << overlay_fraction; + + std::string legend; + //add the truth information to the legend if the cluster is matched to a MCParticle + if(is_matched == 1){ + legend = "#splitline{" + std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + + ss2.str() + "}{#splitline{Matched: " + (is_matched == 1 ? "true" : "false") +", PDG: " + + std::to_string(matched_pdg) + "}{Ovelay Frac: "+ ss3.str() + "}}"; + } + else{ + legend = std::to_string(plane) + ", " + ss1.str() + "MeV, Min IOC: " + ss2.str(); + } + vec_clusters.at(cluster).setLegend(legend); + } + + + void SEAviewer::format_legend(std::string &leg, double arg1, double arg2, double arg3){ + std::ostringstream ss1, ss2, ss3; + ss1 << std::setprecision(1) << std::fixed << arg1; + ss2 << std::setprecision(2) << std::fixed << arg2; + ss3 << std::setprecision(1) << std::fixed << arg3; + + if(leg == "Shower"){ + leg = "#splitline{" + leg + ": " + ss1.str() + " MeV | " + ss2.str() + " cm }{conv. dist | " + + ss3.str() + " impact par.}"; + //leg += ": " + ss1.str() + " MeV, " + ss2.str() + " cm conv. dist."; + + }else{ + //for tracks, 3rd argument is not used + leg += ": "+ ss1.str() + " cm | " + ss2.str() + " PCA"; + } + } +} diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx new file mode 100644 index 000000000..dfe888712 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx @@ -0,0 +1,120 @@ +#include "seaDBSCAN.h" + +namespace seaview{ + + std::vector seaDBSCAN::Scan2D(std::vector> &pts){ + + int cluster_count = 0;//we have no clusters + size_t N = pts.size(); + int l_undef = -99; + int l_noise = 0; + std::vector label(N,l_undef); + + for(size_t i=0; i> neighbours = this->GetNeighbours(i,pts,false); + //std::cout<> seed_set = neighbours; + for(size_t q=0; q> new_neighbours = this->GetNeighbours(iq,pts,true);//Get neighbours of this point, including itslef eh. + + if((int)new_neighbours.size() >= m_minpts ){ //expand the seed set + //Guanqun: change vector while looping over its elements + //new elements are pushed back to seed_set + this->UnionSets(seed_set, new_neighbours); + } + } + } + return label; + + } + + + + std::vector> seaDBSCAN::GetNeighbours(size_t ipoint, std::vector>&pts,bool include_self){ + std::vector> neighbours; + std::vector point = pts[ipoint]; + + //VERY simple, will update soon to a DB + + + for(size_t ip=0; ip p = pts[ip]; + + double dist = this->SimpleDist( p[0], p[1], point[0], point[1]); + + if(include_self){ + if(dist <= m_eps){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + }else{ + if(dist <= m_eps && p != point ){ + std::vector tp = {p[0],p[1],(double)ip};//Push back original index too + neighbours.push_back(tp); + } + + } + } + return neighbours; + } + + int seaDBSCAN::UnionSets(std::vector> &seed, std::vector> &pts){ + + //VERY simple, will update soon if it works + for(auto &p:pts){ + + bool is_in=false; + for(auto &s:seed){ + if(s==p){ + is_in = true; + break; + } + } + + if(is_in == false){ + seed.push_back(p); + } + + } + + + + return 0; + } + + double seaDBSCAN::SimpleDist(double w1, double t1, double w2, double t2){ + // Guanqun: wire and tick conversion to distance??, if so should only be done on plane 2 + double wire_con = 0.3; + double tick_con = 1.0/25.0; + + return sqrt(pow(w1*wire_con-w2*wire_con,2)+pow(t1*tick_con-t2*tick_con,2)); + + } + + +} From 000a8fce97cdee29f20d6855374a280279205587 Mon Sep 17 00:00:00 2001 From: Ooohu <393558728@qq.com> Date: Fri, 5 Aug 2022 12:55:25 -0500 Subject: [PATCH 53/54] add TruncMean.cxx --- .../Libraries/TruncMean.cxx | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx diff --git a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx new file mode 100644 index 000000000..246a3d1e0 --- /dev/null +++ b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx @@ -0,0 +1,162 @@ +#include "TruncMean.h" + +namespace single_photon +{ + + double TruncMean::CalcIterativeTruncMean(std::vector v, const size_t& nmin, + const size_t& nmax, const size_t& currentiteration, + const size_t& lmin, + const double& convergencelimit, + const double& nsigma, const double& oldmed) + { + + auto const& mean = Mean(v); + auto const& med = Median(v); + auto const& rms = RMS(v); + + // if the vector length is below the lower limit -> return + if (v.size() < lmin) + return mean; + + // if we have passed the maximum number of iterations -> return + if (currentiteration >= nmax) + return mean; + + // if we passed the minimum number of iterations and the mean is close enough to the old value + double fracdiff = fabs(med-oldmed) / oldmed; + if ( (currentiteration >= nmin) && (fracdiff < convergencelimit) ) + return mean; + + // if reached here it means we have to go on for another iteration + + // cutoff tails of distribution surrounding the mean + // use erase-remove : https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom + // https://stackoverflow.com/questions/17270837/stdvector-removing-elements-which-fulfill-some-conditions + v.erase( std::remove_if( v.begin(), v.end(), + [med,nsigma,rms](const double& x) { return ( (x < (med-nsigma*rms)) || (x > (med+nsigma*rms)) ); }), // lamdda condition for events to be removed + v.end()); + + return CalcIterativeTruncMean(v, nmin, nmax, lmin, currentiteration+1, convergencelimit, nsigma, med); + } + + void TruncMean::CalcTruncMeanProfile(const std::vector& rr_v, const std::vector& dq_v, + std::vector& dq_trunc_v, const double& nsigma) + { + + // how many points to sample + int Nneighbor = (int)(_rad * 3 * 2); + + dq_trunc_v.clear(); + dq_trunc_v.reserve( rr_v.size() ); + + int Nmax = dq_v.size()-1; + + for (size_t n=0; n < dq_v.size(); n++) { // rr_v and dq_v have the same size + + // current residual range + double rr = rr_v.at(n); + + int nmin = n - Nneighbor; + int nmax = n + Nneighbor; + + if (nmin < 0) nmin = 0; + if (nmax > Nmax) nmax = Nmax; + + // vector for local dq values + std::vector dq_local_v; + + for (int i=nmin; i < nmax; i++) { + + double dr = rr - rr_v[i]; + if (dr < 0) dr *= -1; + + if (dr > _rad) continue; + + dq_local_v.push_back( dq_v[i] ); //save for ticks that are close enough + + }// for all ticks we want to scan + + if (dq_local_v.size() == 0 ) { + dq_trunc_v.push_back( dq_v.at(n) ); // if no neighbours, push back dq of itself + continue; + } + + // calculate median and rms + double median = Median(dq_local_v); + double rms = RMS(dq_local_v); + + double truncated_dq = 0.; + int npts = 0; + for (auto const& dq : dq_local_v) { + if ( ( dq < (median+rms * nsigma) ) && ( dq > (median-rms * nsigma) ) ){ + truncated_dq += dq; + npts += 1; + } + } + + dq_trunc_v.push_back( truncated_dq / npts ); // push back averaged dq for these sitting within nsigma + + if(dq_trunc_v.back() != dq_trunc_v.back()){ + std::cout<<"ERROR::TruncMean.cxx || NAN "<& v) + { + + double mean = 0.; + for (auto const& n : v) mean += n; + mean /= v.size(); + + return mean; + } + + double TruncMean::Median(const std::vector& v) + { + + if (v.size() == 1) return v[0]; + + std::vector vcpy = v; + + std::sort(vcpy.begin(), vcpy.end()); //sort to ascending order + + double median = vcpy[ vcpy.size() / 2 ]; // what if v has even # of elements? there is a choice + + return median; + } + + double TruncMean::RMS(const std::vector& v) + { + + if(v.size()==1) return v.front(); + + double avg = 0.; + for (auto const& val : v) avg += val; + avg /= v.size(); + double rms = 0.; + for (auto const& val : v) rms += (val-avg)*(val-avg); + rms = sqrt( rms / ( v.size() - 1 ) ); + + + if(rms!=rms){ + std::cout<<"ERROR || TruncMean::RMS || is returning nan."< Date: Fri, 5 Aug 2022 16:14:02 -0500 Subject: [PATCH 54/54] fix 'include' pathes --- sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx | 2 +- sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h | 7 +++---- sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx | 2 +- sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h | 6 +++--- sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx | 2 +- sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h | 6 +++--- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx index 246a3d1e0..b126844ca 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx +++ b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.cxx @@ -1,4 +1,4 @@ -#include "TruncMean.h" +#include "sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h" namespace single_photon { diff --git a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h index 90474d742..8d06ef517 100644 --- a/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h +++ b/sbncode/SinglePhotonAnalysis/Libraries/TruncMean.h @@ -10,8 +10,8 @@ * */ -#ifndef TRUNCMEAN_H -#define TRUNCMEAN_H +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H +#define SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H #include #include @@ -106,5 +106,4 @@ namespace single_photon } -#endif -/** @} */ // end of doxygen group +#endif // SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx index 83e29ca2b..b92a2be67 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.cxx @@ -1,4 +1,4 @@ -#include "SEAviewer.h" +#include "sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h" #include #include diff --git a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h index 6f5e9c58a..10863c7c6 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h +++ b/sbncode/SinglePhotonAnalysis/SEAview/SEAviewer.h @@ -1,5 +1,5 @@ -#ifndef SEAVIEWER_H -#define SEAVIEWER_H +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H +#define SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H #include @@ -449,5 +449,5 @@ namespace seaview { }// namespace -#endif +#endif // SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx index dfe888712..d4e5a70d4 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.cxx @@ -1,4 +1,4 @@ -#include "seaDBSCAN.h" +#include "sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h" namespace seaview{ diff --git a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h index 14893e77b..d76fb259e 100644 --- a/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h +++ b/sbncode/SinglePhotonAnalysis/SEAview/seaDBSCAN.h @@ -8,8 +8,8 @@ * Written 20th May 2019. */ -#ifndef seaDBSCAN_H -#define seaDBSCAN_H +#ifndef SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H +#define SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H #include #include @@ -45,4 +45,4 @@ class seaDBSCAN{ } -#endif +#endif // SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H